UNPKG

2.86 MBJavaScriptView Raw
1/**
2 * @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3 * @version v27.3.0
4 * @link https://www.ag-grid.com/
5 * @license MIT
6 */
7// @ag-grid-community/all-modules v27.3.0
8(function webpackUniversalModuleDefinition(root, factory) {
9 if(typeof exports === 'object' && typeof module === 'object')
10 module.exports = factory();
11 else if(typeof define === 'function' && define.amd)
12 define([], factory);
13 else if(typeof exports === 'object')
14 exports["agGrid"] = factory();
15 else
16 root["agGrid"] = factory();
17})(window, function() {
18return /******/ (function(modules) { // webpackBootstrap
19/******/ // The module cache
20/******/ var installedModules = {};
21/******/
22/******/ // The require function
23/******/ function __webpack_require__(moduleId) {
24/******/
25/******/ // Check if module is in cache
26/******/ if(installedModules[moduleId]) {
27/******/ return installedModules[moduleId].exports;
28/******/ }
29/******/ // Create a new module (and put it into the cache)
30/******/ var module = installedModules[moduleId] = {
31/******/ i: moduleId,
32/******/ l: false,
33/******/ exports: {}
34/******/ };
35/******/
36/******/ // Execute the module function
37/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
38/******/
39/******/ // Flag the module as loaded
40/******/ module.l = true;
41/******/
42/******/ // Return the exports of the module
43/******/ return module.exports;
44/******/ }
45/******/
46/******/
47/******/ // expose the modules object (__webpack_modules__)
48/******/ __webpack_require__.m = modules;
49/******/
50/******/ // expose the module cache
51/******/ __webpack_require__.c = installedModules;
52/******/
53/******/ // define getter function for harmony exports
54/******/ __webpack_require__.d = function(exports, name, getter) {
55/******/ if(!__webpack_require__.o(exports, name)) {
56/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
57/******/ }
58/******/ };
59/******/
60/******/ // define __esModule on exports
61/******/ __webpack_require__.r = function(exports) {
62/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
63/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
64/******/ }
65/******/ Object.defineProperty(exports, '__esModule', { value: true });
66/******/ };
67/******/
68/******/ // create a fake namespace object
69/******/ // mode & 1: value is a module id, require it
70/******/ // mode & 2: merge all properties of value into the ns
71/******/ // mode & 4: return value when already ns object
72/******/ // mode & 8|1: behave like require
73/******/ __webpack_require__.t = function(value, mode) {
74/******/ if(mode & 1) value = __webpack_require__(value);
75/******/ if(mode & 8) return value;
76/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
77/******/ var ns = Object.create(null);
78/******/ __webpack_require__.r(ns);
79/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
80/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
81/******/ return ns;
82/******/ };
83/******/
84/******/ // getDefaultExport function for compatibility with non-harmony modules
85/******/ __webpack_require__.n = function(module) {
86/******/ var getter = module && module.__esModule ?
87/******/ function getDefault() { return module['default']; } :
88/******/ function getModuleExports() { return module; };
89/******/ __webpack_require__.d(getter, 'a', getter);
90/******/ return getter;
91/******/ };
92/******/
93/******/ // Object.prototype.hasOwnProperty.call
94/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
95/******/
96/******/ // __webpack_public_path__
97/******/ __webpack_require__.p = "";
98/******/
99/******/
100/******/ // Load entry module and return exports
101/******/ return __webpack_require__(__webpack_require__.s = 0);
102/******/ })
103/************************************************************************/
104/******/ ([
105/* 0 */
106/***/ (function(module, exports, __webpack_require__) {
107
108/**
109 * AUTOMATICALLY GENERATED FILE, DO NOT EDIT MANUALLY!
110 * Update this file by running `lerna run webpack-updater` in the monorepo root folder.
111 */
112var ClientSideRowModelModule = __webpack_require__(1);
113var GridCoreModule = __webpack_require__(3);
114var CsvExportModule = __webpack_require__(259);
115var InfiniteRowModelModule = __webpack_require__(269);
116var agGrid = __webpack_require__(274);
117Object.keys(agGrid).forEach(function(key) {
118 exports[key] = agGrid[key];
119});
120agGrid.ModuleRegistry.register(ClientSideRowModelModule.ClientSideRowModelModule);
121agGrid.ModuleRegistry.register(CsvExportModule.CsvExportModule);
122agGrid.ModuleRegistry.register(InfiniteRowModelModule.InfiniteRowModelModule);
123
124
125/***/ }),
126/* 1 */
127/***/ (function(module, __webpack_exports__, __webpack_require__) {
128
129"use strict";
130__webpack_require__.r(__webpack_exports__);
131/* harmony import */ var _clientSideRowModelModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
132/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelModule", function() { return _clientSideRowModelModule__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelModule"]; });
133
134
135
136
137/***/ }),
138/* 2 */
139/***/ (function(module, __webpack_exports__, __webpack_require__) {
140
141"use strict";
142__webpack_require__.r(__webpack_exports__);
143/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelModule", function() { return ClientSideRowModelModule; });
144/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
145/* harmony import */ var _clientSideRowModel_clientSideRowModel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
146/* harmony import */ var _clientSideRowModel_filterStage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(253);
147/* harmony import */ var _clientSideRowModel_sortStage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(254);
148/* harmony import */ var _clientSideRowModel_flattenStage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(255);
149/* harmony import */ var _clientSideRowModel_sortService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(256);
150/* harmony import */ var _clientSideRowModel_filterService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(257);
151/* harmony import */ var _clientSideRowModel_immutableService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(258);
152
153
154
155
156
157
158
159
160var ClientSideRowModelModule = {
161 moduleName: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ModuleNames"].ClientSideRowModelModule,
162 beans: [_clientSideRowModel_filterStage__WEBPACK_IMPORTED_MODULE_2__["FilterStage"], _clientSideRowModel_sortStage__WEBPACK_IMPORTED_MODULE_3__["SortStage"], _clientSideRowModel_flattenStage__WEBPACK_IMPORTED_MODULE_4__["FlattenStage"], _clientSideRowModel_sortService__WEBPACK_IMPORTED_MODULE_5__["SortService"], _clientSideRowModel_filterService__WEBPACK_IMPORTED_MODULE_6__["FilterService"], _clientSideRowModel_immutableService__WEBPACK_IMPORTED_MODULE_7__["ImmutableService"]],
163 rowModels: { clientSide: _clientSideRowModel_clientSideRowModel__WEBPACK_IMPORTED_MODULE_1__["ClientSideRowModel"] }
164};
165
166
167/***/ }),
168/* 3 */
169/***/ (function(module, __webpack_exports__, __webpack_require__) {
170
171"use strict";
172__webpack_require__.r(__webpack_exports__);
173/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _columns_columnFactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
174/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnFactory", function() { return _columns_columnFactory__WEBPACK_IMPORTED_MODULE_0__["ColumnFactory"]; });
175
176/* harmony import */ var _columns_columnModel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
177/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnModel", function() { return _columns_columnModel__WEBPACK_IMPORTED_MODULE_1__["ColumnModel"]; });
178
179/* harmony import */ var _columns_columnKeyCreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
180/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnKeyCreator", function() { return _columns_columnKeyCreator__WEBPACK_IMPORTED_MODULE_2__["ColumnKeyCreator"]; });
181
182/* harmony import */ var _columns_columnUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28);
183/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnUtils", function() { return _columns_columnUtils__WEBPACK_IMPORTED_MODULE_3__["ColumnUtils"]; });
184
185/* harmony import */ var _columns_displayedGroupCreator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29);
186/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DisplayedGroupCreator", function() { return _columns_displayedGroupCreator__WEBPACK_IMPORTED_MODULE_4__["DisplayedGroupCreator"]; });
187
188/* harmony import */ var _columns_groupInstanceIdCreator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25);
189/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupInstanceIdCreator", function() { return _columns_groupInstanceIdCreator__WEBPACK_IMPORTED_MODULE_5__["GroupInstanceIdCreator"]; });
190
191/* harmony import */ var _components_componentUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30);
192/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentUtil", function() { return _components_componentUtil__WEBPACK_IMPORTED_MODULE_6__["ComponentUtil"]; });
193
194/* harmony import */ var _components_agStackComponentsRegistry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(32);
195/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgStackComponentsRegistry", function() { return _components_agStackComponentsRegistry__WEBPACK_IMPORTED_MODULE_7__["AgStackComponentsRegistry"]; });
196
197/* harmony import */ var _components_colDefUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(33);
198/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColDefUtil", function() { return _components_colDefUtil__WEBPACK_IMPORTED_MODULE_8__["ColDefUtil"]; });
199
200/* harmony import */ var _components_framework_userComponentRegistry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(34);
201/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UserComponentRegistry", function() { return _components_framework_userComponentRegistry__WEBPACK_IMPORTED_MODULE_9__["UserComponentRegistry"]; });
202
203/* harmony import */ var _components_framework_userComponentFactory__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(102);
204/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UserComponentFactory", function() { return _components_framework_userComponentFactory__WEBPACK_IMPORTED_MODULE_10__["UserComponentFactory"]; });
205
206/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(20);
207/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BeanStub", function() { return _context_beanStub__WEBPACK_IMPORTED_MODULE_11__["BeanStub"]; });
208
209/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(12);
210/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Context", function() { return _context_context__WEBPACK_IMPORTED_MODULE_12__["Context"]; });
211
212/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Autowired", function() { return _context_context__WEBPACK_IMPORTED_MODULE_12__["Autowired"]; });
213
214/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostConstruct", function() { return _context_context__WEBPACK_IMPORTED_MODULE_12__["PostConstruct"]; });
215
216/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PreConstruct", function() { return _context_context__WEBPACK_IMPORTED_MODULE_12__["PreConstruct"]; });
217
218/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Optional", function() { return _context_context__WEBPACK_IMPORTED_MODULE_12__["Optional"]; });
219
220/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bean", function() { return _context_context__WEBPACK_IMPORTED_MODULE_12__["Bean"]; });
221
222/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Qualifier", function() { return _context_context__WEBPACK_IMPORTED_MODULE_12__["Qualifier"]; });
223
224/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PreDestroy", function() { return _context_context__WEBPACK_IMPORTED_MODULE_12__["PreDestroy"]; });
225
226/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(57);
227/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuerySelector", function() { return _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_13__["QuerySelector"]; });
228
229/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RefSelector", function() { return _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_13__["RefSelector"]; });
230
231/* harmony import */ var _interfaces_iExcelCreator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(105);
232/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelFactoryMode", function() { return _interfaces_iExcelCreator__WEBPACK_IMPORTED_MODULE_14__["ExcelFactoryMode"]; });
233
234/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(97);
235/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragAndDropService", function() { return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_15__["DragAndDropService"]; });
236
237/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragSourceType", function() { return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_15__["DragSourceType"]; });
238
239/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HorizontalDirection", function() { return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_15__["HorizontalDirection"]; });
240
241/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VerticalDirection", function() { return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_15__["VerticalDirection"]; });
242
243/* harmony import */ var _dragAndDrop_dragService__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(106);
244/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragService", function() { return _dragAndDrop_dragService__WEBPACK_IMPORTED_MODULE_16__["DragService"]; });
245
246/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(10);
247/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _entities_column__WEBPACK_IMPORTED_MODULE_17__["Column"]; });
248
249/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(9);
250/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnGroup", function() { return _entities_columnGroup__WEBPACK_IMPORTED_MODULE_18__["ColumnGroup"]; });
251
252/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(8);
253/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProvidedColumnGroup", function() { return _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_19__["ProvidedColumnGroup"]; });
254
255/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(94);
256/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNode", function() { return _entities_rowNode__WEBPACK_IMPORTED_MODULE_20__["RowNode"]; });
257
258/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowHighlightPosition", function() { return _entities_rowNode__WEBPACK_IMPORTED_MODULE_20__["RowHighlightPosition"]; });
259
260/* harmony import */ var _filter_filterManager__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(107);
261/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterManager", function() { return _filter_filterManager__WEBPACK_IMPORTED_MODULE_21__["FilterManager"]; });
262
263/* harmony import */ var _filter_provided_providedFilter__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(62);
264/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProvidedFilter", function() { return _filter_provided_providedFilter__WEBPACK_IMPORTED_MODULE_22__["ProvidedFilter"]; });
265
266/* harmony import */ var _filter_provided_simpleFilter__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(60);
267/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleFilter", function() { return _filter_provided_simpleFilter__WEBPACK_IMPORTED_MODULE_23__["SimpleFilter"]; });
268
269/* harmony import */ var _filter_provided_scalarFilter__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(72);
270/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScalarFilter", function() { return _filter_provided_scalarFilter__WEBPACK_IMPORTED_MODULE_24__["ScalarFilter"]; });
271
272/* harmony import */ var _filter_provided_number_numberFilter__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(76);
273/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberFilter", function() { return _filter_provided_number_numberFilter__WEBPACK_IMPORTED_MODULE_25__["NumberFilter"]; });
274
275/* harmony import */ var _filter_provided_text_textFilter__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(79);
276/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextFilter", function() { return _filter_provided_text_textFilter__WEBPACK_IMPORTED_MODULE_26__["TextFilter"]; });
277
278/* harmony import */ var _filter_provided_date_dateFilter__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(58);
279/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateFilter", function() { return _filter_provided_date_dateFilter__WEBPACK_IMPORTED_MODULE_27__["DateFilter"]; });
280
281/* harmony import */ var _filter_provided_text_textFloatingFilter__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(80);
282/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextFloatingFilter", function() { return _filter_provided_text_textFloatingFilter__WEBPACK_IMPORTED_MODULE_28__["TextFloatingFilter"]; });
283
284/* harmony import */ var _headerRendering_cells_floatingFilter_headerFilterCellComp__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(108);
285/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellComp", function() { return _headerRendering_cells_floatingFilter_headerFilterCellComp__WEBPACK_IMPORTED_MODULE_29__["HeaderFilterCellComp"]; });
286
287/* harmony import */ var _filter_floating_floatingFilterMapper__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(104);
288/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FloatingFilterMapper", function() { return _filter_floating_floatingFilterMapper__WEBPACK_IMPORTED_MODULE_30__["FloatingFilterMapper"]; });
289
290/* harmony import */ var _gridBodyComp_gridBodyComp__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(110);
291/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridBodyComp", function() { return _gridBodyComp_gridBodyComp__WEBPACK_IMPORTED_MODULE_31__["GridBodyComp"]; });
292
293/* harmony import */ var _gridBodyComp_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(114);
294/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridBodyCtrl", function() { return _gridBodyComp_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_32__["GridBodyCtrl"]; });
295
296/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowAnimationCssClasses", function() { return _gridBodyComp_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_32__["RowAnimationCssClasses"]; });
297
298/* harmony import */ var _gridBodyComp_scrollVisibleService__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(137);
299/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollVisibleService", function() { return _gridBodyComp_scrollVisibleService__WEBPACK_IMPORTED_MODULE_33__["ScrollVisibleService"]; });
300
301/* harmony import */ var _gridBodyComp_mouseEventService__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(138);
302/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MouseEventService", function() { return _gridBodyComp_mouseEventService__WEBPACK_IMPORTED_MODULE_34__["MouseEventService"]; });
303
304/* harmony import */ var _gridBodyComp_navigationService__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(139);
305/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NavigationService", function() { return _gridBodyComp_navigationService__WEBPACK_IMPORTED_MODULE_35__["NavigationService"]; });
306
307/* harmony import */ var _gridBodyComp_rowContainer_rowContainerComp__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(140);
308/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerComp", function() { return _gridBodyComp_rowContainer_rowContainerComp__WEBPACK_IMPORTED_MODULE_36__["RowContainerComp"]; });
309
310/* harmony import */ var _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(118);
311/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerName", function() { return _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_37__["RowContainerName"]; });
312
313/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerCtrl", function() { return _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_37__["RowContainerCtrl"]; });
314
315/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerType", function() { return _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_37__["RowContainerType"]; });
316
317/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRowContainerTypeForName", function() { return _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_37__["getRowContainerTypeForName"]; });
318
319/* harmony import */ var _headerRendering_columnDrag_bodyDropPivotTarget__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(144);
320/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BodyDropPivotTarget", function() { return _headerRendering_columnDrag_bodyDropPivotTarget__WEBPACK_IMPORTED_MODULE_38__["BodyDropPivotTarget"]; });
321
322/* harmony import */ var _headerRendering_columnDrag_bodyDropTarget__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(145);
323/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BodyDropTarget", function() { return _headerRendering_columnDrag_bodyDropTarget__WEBPACK_IMPORTED_MODULE_39__["BodyDropTarget"]; });
324
325/* harmony import */ var _headerRendering_cells_cssClassApplier__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(147);
326/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassApplier", function() { return _headerRendering_cells_cssClassApplier__WEBPACK_IMPORTED_MODULE_40__["CssClassApplier"]; });
327
328/* harmony import */ var _headerRendering_rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(148);
329/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerComp", function() { return _headerRendering_rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_41__["HeaderRowContainerComp"]; });
330
331/* harmony import */ var _headerRendering_gridHeaderComp__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(167);
332/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridHeaderComp", function() { return _headerRendering_gridHeaderComp__WEBPACK_IMPORTED_MODULE_42__["GridHeaderComp"]; });
333
334/* harmony import */ var _headerRendering_gridHeaderCtrl__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(168);
335/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridHeaderCtrl", function() { return _headerRendering_gridHeaderCtrl__WEBPACK_IMPORTED_MODULE_43__["GridHeaderCtrl"]; });
336
337/* harmony import */ var _headerRendering_row_headerRowComp__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(149);
338/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowComp", function() { return _headerRendering_row_headerRowComp__WEBPACK_IMPORTED_MODULE_44__["HeaderRowComp"]; });
339
340/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowType", function() { return _headerRendering_row_headerRowComp__WEBPACK_IMPORTED_MODULE_44__["HeaderRowType"]; });
341
342/* harmony import */ var _headerRendering_row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(153);
343/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowCtrl", function() { return _headerRendering_row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_45__["HeaderRowCtrl"]; });
344
345/* harmony import */ var _headerRendering_cells_column_headerCellCtrl__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(160);
346/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderCellCtrl", function() { return _headerRendering_cells_column_headerCellCtrl__WEBPACK_IMPORTED_MODULE_46__["HeaderCellCtrl"]; });
347
348/* harmony import */ var _headerRendering_cells_floatingFilter_headerFilterCellCtrl__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(154);
349/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellCtrl", function() { return _headerRendering_cells_floatingFilter_headerFilterCellCtrl__WEBPACK_IMPORTED_MODULE_47__["HeaderFilterCellCtrl"]; });
350
351/* harmony import */ var _headerRendering_cells_columnGroup_headerGroupCellCtrl__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(164);
352/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupCellCtrl", function() { return _headerRendering_cells_columnGroup_headerGroupCellCtrl__WEBPACK_IMPORTED_MODULE_48__["HeaderGroupCellCtrl"]; });
353
354/* harmony import */ var _headerRendering_cells_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(155);
355/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AbstractHeaderCellCtrl", function() { return _headerRendering_cells_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_49__["AbstractHeaderCellCtrl"]; });
356
357/* harmony import */ var _headerRendering_rowContainer_headerRowContainerCtrl__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(152);
358/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerCtrl", function() { return _headerRendering_rowContainer_headerRowContainerCtrl__WEBPACK_IMPORTED_MODULE_50__["HeaderRowContainerCtrl"]; });
359
360/* harmony import */ var _headerRendering_common_horizontalResizeService__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(170);
361/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HorizontalResizeService", function() { return _headerRendering_common_horizontalResizeService__WEBPACK_IMPORTED_MODULE_51__["HorizontalResizeService"]; });
362
363/* harmony import */ var _headerRendering_columnDrag_moveColumnFeature__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(146);
364/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MoveColumnFeature", function() { return _headerRendering_columnDrag_moveColumnFeature__WEBPACK_IMPORTED_MODULE_52__["MoveColumnFeature"]; });
365
366/* harmony import */ var _headerRendering_cells_column_standardMenu__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(171);
367/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StandardMenuFactory", function() { return _headerRendering_cells_column_standardMenu__WEBPACK_IMPORTED_MODULE_53__["StandardMenuFactory"]; });
368
369/* harmony import */ var _layout_tabbedLayout__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(172);
370/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabbedLayout", function() { return _layout_tabbedLayout__WEBPACK_IMPORTED_MODULE_54__["TabbedLayout"]; });
371
372/* harmony import */ var _misc_simpleHttpRequest__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(173);
373/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "simpleHttpRequest", function() { return _misc_simpleHttpRequest__WEBPACK_IMPORTED_MODULE_55__["simpleHttpRequest"]; });
374
375/* harmony import */ var _misc_resizeObserverService__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(174);
376/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ResizeObserverService", function() { return _misc_resizeObserverService__WEBPACK_IMPORTED_MODULE_56__["ResizeObserverService"]; });
377
378/* harmony import */ var _misc_animationFrameService__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(175);
379/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameService", function() { return _misc_animationFrameService__WEBPACK_IMPORTED_MODULE_57__["AnimationFrameService"]; });
380
381/* harmony import */ var _rendering_cellEditors_largeTextCellEditor__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(84);
382/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LargeTextCellEditor", function() { return _rendering_cellEditors_largeTextCellEditor__WEBPACK_IMPORTED_MODULE_58__["LargeTextCellEditor"]; });
383
384/* harmony import */ var _rendering_cellEditors_popupEditorWrapper__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(143);
385/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupEditorWrapper", function() { return _rendering_cellEditors_popupEditorWrapper__WEBPACK_IMPORTED_MODULE_59__["PopupEditorWrapper"]; });
386
387/* harmony import */ var _rendering_cellEditors_popupSelectCellEditor__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(86);
388/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupSelectCellEditor", function() { return _rendering_cellEditors_popupSelectCellEditor__WEBPACK_IMPORTED_MODULE_60__["PopupSelectCellEditor"]; });
389
390/* harmony import */ var _rendering_cellEditors_popupTextCellEditor__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(88);
391/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupTextCellEditor", function() { return _rendering_cellEditors_popupTextCellEditor__WEBPACK_IMPORTED_MODULE_61__["PopupTextCellEditor"]; });
392
393/* harmony import */ var _rendering_cellEditors_selectCellEditor__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(87);
394/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectCellEditor", function() { return _rendering_cellEditors_selectCellEditor__WEBPACK_IMPORTED_MODULE_62__["SelectCellEditor"]; });
395
396/* harmony import */ var _rendering_cellEditors_textCellEditor__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(89);
397/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextCellEditor", function() { return _rendering_cellEditors_textCellEditor__WEBPACK_IMPORTED_MODULE_63__["TextCellEditor"]; });
398
399/* harmony import */ var _rendering_beans__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(128);
400/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Beans", function() { return _rendering_beans__WEBPACK_IMPORTED_MODULE_64__["Beans"]; });
401
402/* harmony import */ var _rendering_cellRenderers_animateShowChangeCellRenderer__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(90);
403/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimateShowChangeCellRenderer", function() { return _rendering_cellRenderers_animateShowChangeCellRenderer__WEBPACK_IMPORTED_MODULE_65__["AnimateShowChangeCellRenderer"]; });
404
405/* harmony import */ var _rendering_cellRenderers_animateSlideCellRenderer__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(91);
406/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimateSlideCellRenderer", function() { return _rendering_cellRenderers_animateSlideCellRenderer__WEBPACK_IMPORTED_MODULE_66__["AnimateSlideCellRenderer"]; });
407
408/* harmony import */ var _rendering_cellRenderers_groupCellRenderer__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(92);
409/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCellRenderer", function() { return _rendering_cellRenderers_groupCellRenderer__WEBPACK_IMPORTED_MODULE_67__["GroupCellRenderer"]; });
410
411/* harmony import */ var _rendering_cellRenderers_groupCellRendererCtrl__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(93);
412/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCellRendererCtrl", function() { return _rendering_cellRenderers_groupCellRendererCtrl__WEBPACK_IMPORTED_MODULE_68__["GroupCellRendererCtrl"]; });
413
414/* harmony import */ var _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(158);
415/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SetLeftFeature", function() { return _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_69__["SetLeftFeature"]; });
416
417/* harmony import */ var _rendering_features_positionableFeature__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(176);
418/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PositionableFeature", function() { return _rendering_features_positionableFeature__WEBPACK_IMPORTED_MODULE_70__["PositionableFeature"]; });
419
420/* harmony import */ var _rendering_autoWidthCalculator__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(177);
421/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoWidthCalculator", function() { return _rendering_autoWidthCalculator__WEBPACK_IMPORTED_MODULE_71__["AutoWidthCalculator"]; });
422
423/* harmony import */ var _rendering_checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(95);
424/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxSelectionComponent", function() { return _rendering_checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_72__["CheckboxSelectionComponent"]; });
425
426/* harmony import */ var _rendering_cell_cellComp__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(142);
427/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellComp", function() { return _rendering_cell_cellComp__WEBPACK_IMPORTED_MODULE_73__["CellComp"]; });
428
429/* harmony import */ var _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(121);
430/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellCtrl", function() { return _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_74__["CellCtrl"]; });
431
432/* harmony import */ var _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(120);
433/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowCtrl", function() { return _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_75__["RowCtrl"]; });
434
435/* harmony import */ var _rendering_rowRenderer__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(178);
436/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowRenderer", function() { return _rendering_rowRenderer__WEBPACK_IMPORTED_MODULE_76__["RowRenderer"]; });
437
438/* harmony import */ var _rendering_valueFormatterService__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(179);
439/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueFormatterService", function() { return _rendering_valueFormatterService__WEBPACK_IMPORTED_MODULE_77__["ValueFormatterService"]; });
440
441/* harmony import */ var _pinnedRowModel_pinnedRowModel__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(180);
442/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PinnedRowModel", function() { return _pinnedRowModel_pinnedRowModel__WEBPACK_IMPORTED_MODULE_78__["PinnedRowModel"]; });
443
444/* harmony import */ var _interfaces_serverSideTransaction__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(181);
445/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServerSideTransactionResultStatus", function() { return _interfaces_serverSideTransaction__WEBPACK_IMPORTED_MODULE_79__["ServerSideTransactionResultStatus"]; });
446
447/* harmony import */ var _utils_changedPath__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(182);
448/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChangedPath", function() { return _utils_changedPath__WEBPACK_IMPORTED_MODULE_80__["ChangedPath"]; });
449
450/* harmony import */ var _rowNodeCache_rowNodeBlock__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(183);
451/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlock", function() { return _rowNodeCache_rowNodeBlock__WEBPACK_IMPORTED_MODULE_81__["RowNodeBlock"]; });
452
453/* harmony import */ var _rowNodeCache_rowNodeBlockLoader__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(184);
454/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlockLoader", function() { return _rowNodeCache_rowNodeBlockLoader__WEBPACK_IMPORTED_MODULE_82__["RowNodeBlockLoader"]; });
455
456/* harmony import */ var _pagination_paginationProxy__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(185);
457/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PaginationProxy", function() { return _pagination_paginationProxy__WEBPACK_IMPORTED_MODULE_83__["PaginationProxy"]; });
458
459/* harmony import */ var _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(157);
460/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelSteps", function() { return _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_84__["ClientSideRowModelSteps"]; });
461
462/* harmony import */ var _styling_stylingService__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(186);
463/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylingService", function() { return _styling_stylingService__WEBPACK_IMPORTED_MODULE_85__["StylingService"]; });
464
465/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(111);
466/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LayoutCssClasses", function() { return _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_86__["LayoutCssClasses"]; });
467
468/* harmony import */ var _widgets_agAbstractField__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(67);
469/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgAbstractField", function() { return _widgets_agAbstractField__WEBPACK_IMPORTED_MODULE_87__["AgAbstractField"]; });
470
471/* harmony import */ var _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(163);
472/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgCheckbox", function() { return _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_88__["AgCheckbox"]; });
473
474/* harmony import */ var _widgets_agRadioButton__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(187);
475/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgRadioButton", function() { return _widgets_agRadioButton__WEBPACK_IMPORTED_MODULE_89__["AgRadioButton"]; });
476
477/* harmony import */ var _widgets_agToggleButton__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(188);
478/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgToggleButton", function() { return _widgets_agToggleButton__WEBPACK_IMPORTED_MODULE_90__["AgToggleButton"]; });
479
480/* harmony import */ var _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(189);
481/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputTextField", function() { return _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_91__["AgInputTextField"]; });
482
483/* harmony import */ var _widgets_agInputTextArea__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(190);
484/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputTextArea", function() { return _widgets_agInputTextArea__WEBPACK_IMPORTED_MODULE_92__["AgInputTextArea"]; });
485
486/* harmony import */ var _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(191);
487/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputNumberField", function() { return _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_93__["AgInputNumberField"]; });
488
489/* harmony import */ var _widgets_agInputRange__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(192);
490/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputRange", function() { return _widgets_agInputRange__WEBPACK_IMPORTED_MODULE_94__["AgInputRange"]; });
491
492/* harmony import */ var _widgets_agSelect__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(66);
493/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgSelect", function() { return _widgets_agSelect__WEBPACK_IMPORTED_MODULE_95__["AgSelect"]; });
494
495/* harmony import */ var _widgets_agSlider__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(193);
496/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgSlider", function() { return _widgets_agSlider__WEBPACK_IMPORTED_MODULE_96__["AgSlider"]; });
497
498/* harmony import */ var _widgets_agAngleSelect__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(194);
499/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgAngleSelect", function() { return _widgets_agAngleSelect__WEBPACK_IMPORTED_MODULE_97__["AgAngleSelect"]; });
500
501/* harmony import */ var _widgets_agColorPicker__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(195);
502/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgColorPicker", function() { return _widgets_agColorPicker__WEBPACK_IMPORTED_MODULE_98__["AgColorPicker"]; });
503
504/* harmony import */ var _widgets_agGroupComponent__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(199);
505/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgGroupComponent", function() { return _widgets_agGroupComponent__WEBPACK_IMPORTED_MODULE_99__["AgGroupComponent"]; });
506
507/* harmony import */ var _widgets_agMenuItemComponent__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(200);
508/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuItemComponent", function() { return _widgets_agMenuItemComponent__WEBPACK_IMPORTED_MODULE_100__["AgMenuItemComponent"]; });
509
510/* harmony import */ var _widgets_agMenuList__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(201);
511/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuList", function() { return _widgets_agMenuList__WEBPACK_IMPORTED_MODULE_101__["AgMenuList"]; });
512
513/* harmony import */ var _widgets_agMenuPanel__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(204);
514/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuPanel", function() { return _widgets_agMenuPanel__WEBPACK_IMPORTED_MODULE_102__["AgMenuPanel"]; });
515
516/* harmony import */ var _widgets_agDialog__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(197);
517/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgDialog", function() { return _widgets_agDialog__WEBPACK_IMPORTED_MODULE_103__["AgDialog"]; });
518
519/* harmony import */ var _widgets_agPanel__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(198);
520/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPanel", function() { return _widgets_agPanel__WEBPACK_IMPORTED_MODULE_104__["AgPanel"]; });
521
522/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(36);
523/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return _widgets_component__WEBPACK_IMPORTED_MODULE_105__["Component"]; });
524
525/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassManager", function() { return _widgets_component__WEBPACK_IMPORTED_MODULE_105__["CssClassManager"]; });
526
527/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(64);
528/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ManagedFocusFeature", function() { return _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_106__["ManagedFocusFeature"]; });
529
530/* harmony import */ var _widgets_tabGuardComp__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(202);
531/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabGuardComp", function() { return _widgets_tabGuardComp__WEBPACK_IMPORTED_MODULE_107__["TabGuardComp"]; });
532
533/* harmony import */ var _widgets_tabGuardCtrl__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(203);
534/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabGuardCtrl", function() { return _widgets_tabGuardCtrl__WEBPACK_IMPORTED_MODULE_108__["TabGuardCtrl"]; });
535
536/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(85);
537/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupComponent", function() { return _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_109__["PopupComponent"]; });
538
539/* harmony import */ var _widgets_popupService__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(205);
540/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupService", function() { return _widgets_popupService__WEBPACK_IMPORTED_MODULE_110__["PopupService"]; });
541
542/* harmony import */ var _widgets_touchListener__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(82);
543/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TouchListener", function() { return _widgets_touchListener__WEBPACK_IMPORTED_MODULE_111__["TouchListener"]; });
544
545/* harmony import */ var _widgets_virtualList__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(207);
546/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualList", function() { return _widgets_virtualList__WEBPACK_IMPORTED_MODULE_112__["VirtualList"]; });
547
548/* harmony import */ var _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(123);
549/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRangeType", function() { return _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_113__["CellRangeType"]; });
550
551/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionHandleType", function() { return _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_113__["SelectionHandleType"]; });
552
553/* harmony import */ var _autoScrollService__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(117);
554/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoScrollService", function() { return _autoScrollService__WEBPACK_IMPORTED_MODULE_114__["AutoScrollService"]; });
555
556/* harmony import */ var _vanillaFrameworkOverrides__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(208);
557/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VanillaFrameworkOverrides", function() { return _vanillaFrameworkOverrides__WEBPACK_IMPORTED_MODULE_115__["VanillaFrameworkOverrides"]; });
558
559/* harmony import */ var _cellNavigationService__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(209);
560/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellNavigationService", function() { return _cellNavigationService__WEBPACK_IMPORTED_MODULE_116__["CellNavigationService"]; });
561
562/* harmony import */ var _alignedGridsService__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(210);
563/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AlignedGridsService", function() { return _alignedGridsService__WEBPACK_IMPORTED_MODULE_117__["AlignedGridsService"]; });
564
565/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(15);
566/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Constants", function() { return _constants_constants__WEBPACK_IMPORTED_MODULE_118__["Constants"]; });
567
568/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(65);
569/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "KeyCode", function() { return _constants_keyCode__WEBPACK_IMPORTED_MODULE_119__["KeyCode"]; });
570
571/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(211);
572/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _grid__WEBPACK_IMPORTED_MODULE_120__["Grid"]; });
573
574/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridCoreCreator", function() { return _grid__WEBPACK_IMPORTED_MODULE_120__["GridCoreCreator"]; });
575
576/* harmony import */ var _gridApi__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(156);
577/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridApi", function() { return _gridApi__WEBPACK_IMPORTED_MODULE_121__["GridApi"]; });
578
579/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(24);
580/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return _eventKeys__WEBPACK_IMPORTED_MODULE_122__["Events"]; });
581
582/* harmony import */ var _focusService__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(206);
583/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FocusService", function() { return _focusService__WEBPACK_IMPORTED_MODULE_123__["FocusService"]; });
584
585/* harmony import */ var _functions__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(248);
586/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultGroupComparator", function() { return _functions__WEBPACK_IMPORTED_MODULE_124__["defaultGroupComparator"]; });
587
588/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(112);
589/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridOptionsWrapper", function() { return _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_125__["GridOptionsWrapper"]; });
590
591/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(11);
592/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EventService", function() { return _eventService__WEBPACK_IMPORTED_MODULE_126__["EventService"]; });
593
594/* harmony import */ var _rowNodes_selectableService__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(231);
595/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectableService", function() { return _rowNodes_selectableService__WEBPACK_IMPORTED_MODULE_127__["SelectableService"]; });
596
597/* harmony import */ var _rowNodes_rowNodeSorter__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(241);
598/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeSorter", function() { return _rowNodes_rowNodeSorter__WEBPACK_IMPORTED_MODULE_128__["RowNodeSorter"]; });
599
600/* harmony import */ var _ctrlsService__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(242);
601/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CtrlsService", function() { return _ctrlsService__WEBPACK_IMPORTED_MODULE_129__["CtrlsService"]; });
602
603/* harmony import */ var _gridComp_gridComp__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(218);
604/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridComp", function() { return _gridComp_gridComp__WEBPACK_IMPORTED_MODULE_130__["GridComp"]; });
605
606/* harmony import */ var _gridComp_gridCtrl__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(219);
607/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridCtrl", function() { return _gridComp_gridCtrl__WEBPACK_IMPORTED_MODULE_131__["GridCtrl"]; });
608
609/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(217);
610/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return _logger__WEBPACK_IMPORTED_MODULE_132__["Logger"]; });
611
612/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoggerFactory", function() { return _logger__WEBPACK_IMPORTED_MODULE_132__["LoggerFactory"]; });
613
614/* harmony import */ var _selectionService__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(212);
615/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionService", function() { return _selectionService__WEBPACK_IMPORTED_MODULE_133__["SelectionService"]; });
616
617/* harmony import */ var _sortController__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(220);
618/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortController", function() { return _sortController__WEBPACK_IMPORTED_MODULE_134__["SortController"]; });
619
620/* harmony import */ var _templateService__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(216);
621/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TemplateService", function() { return _templateService__WEBPACK_IMPORTED_MODULE_135__["TemplateService"]; });
622
623/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(37);
624/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["Color"]; });
625
626/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stringToArray", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["stringToArray"]; });
627
628/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["_"]; });
629
630/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberSequence", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["NumberSequence"]; });
631
632/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromiseStatus", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["AgPromiseStatus"]; });
633
634/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromise", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["AgPromise"]; });
635
636/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["Timer"]; });
637
638/* harmony import */ var _valueService_valueService__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(214);
639/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueService", function() { return _valueService_valueService__WEBPACK_IMPORTED_MODULE_137__["ValueService"]; });
640
641/* harmony import */ var _valueService_valueCache__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(225);
642/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueCache", function() { return _valueService_valueCache__WEBPACK_IMPORTED_MODULE_138__["ValueCache"]; });
643
644/* harmony import */ var _valueService_expressionService__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(215);
645/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionService", function() { return _valueService_expressionService__WEBPACK_IMPORTED_MODULE_139__["ExpressionService"]; });
646
647/* harmony import */ var _entities_cellPosition__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(235);
648/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellPositionUtils", function() { return _entities_cellPosition__WEBPACK_IMPORTED_MODULE_140__["CellPositionUtils"]; });
649
650/* harmony import */ var _entities_rowPosition__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(234);
651/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowPositionUtils", function() { return _entities_rowPosition__WEBPACK_IMPORTED_MODULE_141__["RowPositionUtils"]; });
652
653/* harmony import */ var _headerRendering_common_headerPosition__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(238);
654/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderPositionUtils", function() { return _headerRendering_common_headerPosition__WEBPACK_IMPORTED_MODULE_142__["HeaderPositionUtils"]; });
655
656/* harmony import */ var _headerRendering_common_headerNavigationService__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(169);
657/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationService", function() { return _headerRendering_common_headerNavigationService__WEBPACK_IMPORTED_MODULE_143__["HeaderNavigationService"]; });
658
659/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationDirection", function() { return _headerRendering_common_headerNavigationService__WEBPACK_IMPORTED_MODULE_143__["HeaderNavigationDirection"]; });
660
661/* harmony import */ var _propertyKeys__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(31);
662/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PropertyKeys", function() { return _propertyKeys__WEBPACK_IMPORTED_MODULE_144__["PropertyKeys"]; });
663
664/* harmony import */ var _columns_columnApi__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(213);
665/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnApi", function() { return _columns_columnApi__WEBPACK_IMPORTED_MODULE_145__["ColumnApi"]; });
666
667/* harmony import */ var _components_framework_frameworkComponentWrapper__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(249);
668/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseComponentWrapper", function() { return _components_framework_frameworkComponentWrapper__WEBPACK_IMPORTED_MODULE_146__["BaseComponentWrapper"]; });
669
670/* harmony import */ var _environment__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(229);
671/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Environment", function() { return _environment__WEBPACK_IMPORTED_MODULE_147__["Environment"]; });
672
673/* harmony import */ var _widgets_customTooltipFeature__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(56);
674/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomTooltipFeature", function() { return _widgets_customTooltipFeature__WEBPACK_IMPORTED_MODULE_148__["CustomTooltipFeature"]; });
675
676/* harmony import */ var _interfaces_iSparklineCellRendererParams__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(250);
677/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BarColumnLabelPlacement", function() { return _interfaces_iSparklineCellRendererParams__WEBPACK_IMPORTED_MODULE_149__["BarColumnLabelPlacement"]; });
678
679/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(16);
680/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModuleNames", function() { return _modules_moduleNames__WEBPACK_IMPORTED_MODULE_150__["ModuleNames"]; });
681
682/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(17);
683/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModuleRegistry", function() { return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_151__["ModuleRegistry"]; });
684
685/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(23);
686/* empty/unused harmony star reexport *//**
687 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
688 * @version v27.3.0
689 * @link https://www.ag-grid.com/
690 * @license MIT
691 */
692var globalObj = typeof global === 'undefined' ? {} : global;
693globalObj.HTMLElement = typeof HTMLElement === 'undefined' ? {} : HTMLElement;
694globalObj.HTMLButtonElement = typeof HTMLButtonElement === 'undefined' ? {} : HTMLButtonElement;
695globalObj.HTMLSelectElement = typeof HTMLSelectElement === 'undefined' ? {} : HTMLSelectElement;
696globalObj.HTMLInputElement = typeof HTMLInputElement === 'undefined' ? {} : HTMLInputElement;
697globalObj.Node = typeof Node === 'undefined' ? {} : Node;
698globalObj.MouseEvent = typeof MouseEvent === 'undefined' ? {} : MouseEvent;
699// columns
700
701
702
703
704
705
706// components
707
708
709
710
711
712// context
713
714
715
716// excel
717
718// dragAndDrop
719
720
721// entities
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736// gridPanel
737
738
739
740
741
742// rowContainer
743
744
745// headerRendering
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762// layout
763
764// misc
765
766
767
768
769
770
771
772
773
774// rendering / cellRenderers
775
776
777
778
779
780// features
781
782
783// rendering
784
785
786
787
788
789
790
791// row models
792
793
794
795
796
797
798
799//styling
800
801
802// widgets
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829// range
830
831// root
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867// sparklines
868
869
870
871// events
872
873
874
875
876/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
877
878/***/ }),
879/* 4 */
880/***/ (function(module, exports) {
881
882var g;
883
884// This works in non-strict mode
885g = (function() {
886 return this;
887})();
888
889try {
890 // This works if eval is allowed (see CSP)
891 g = g || new Function("return this")();
892} catch (e) {
893 // This works if the window reference is available
894 if (typeof window === "object") g = window;
895}
896
897// g can still be undefined, but nothing to do about it...
898// We return undefined, instead of nothing here, so it's
899// easier to handle this case. if(!global) { ...}
900
901module.exports = g;
902
903
904/***/ }),
905/* 5 */
906/***/ (function(module, __webpack_exports__, __webpack_require__) {
907
908"use strict";
909__webpack_require__.r(__webpack_exports__);
910/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnFactory", function() { return ColumnFactory; });
911/* harmony import */ var _columnKeyCreator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
912/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
913/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
914/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
915/* harmony import */ var _entities_defaultColumnTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19);
916/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20);
917/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15);
918/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(13);
919/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7);
920/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(18);
921/**
922 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
923 * @version v27.3.0
924 * @link https://www.ag-grid.com/
925 * @license MIT
926 */
927var __extends = (undefined && undefined.__extends) || (function () {
928 var extendStatics = function (d, b) {
929 extendStatics = Object.setPrototypeOf ||
930 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
931 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
932 return extendStatics(d, b);
933 };
934 return function (d, b) {
935 extendStatics(d, b);
936 function __() { this.constructor = d; }
937 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
938 };
939})();
940var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
941 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
942 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
943 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
944 return c > 3 && r && Object.defineProperty(target, key, r), r;
945};
946var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
947 return function (target, key) { decorator(target, key, paramIndex); }
948};
949
950
951
952
953
954
955
956
957
958
959// takes ColDefs and ColGroupDefs and turns them into Columns and OriginalGroups
960var ColumnFactory = /** @class */ (function (_super) {
961 __extends(ColumnFactory, _super);
962 function ColumnFactory() {
963 return _super !== null && _super.apply(this, arguments) || this;
964 }
965 ColumnFactory.prototype.setBeans = function (loggerFactory) {
966 this.logger = loggerFactory.create('ColumnFactory');
967 };
968 ColumnFactory.prototype.createColumnTree = function (defs, primaryColumns, existingTree) {
969 // column key creator dishes out unique column id's in a deterministic way,
970 // so if we have two grids (that could be master/slave) with same column definitions,
971 // then this ensures the two grids use identical id's.
972 var columnKeyCreator = new _columnKeyCreator__WEBPACK_IMPORTED_MODULE_0__["ColumnKeyCreator"]();
973 var _a = this.extractExistingTreeData(existingTree), existingCols = _a.existingCols, existingGroups = _a.existingGroups, existingColKeys = _a.existingColKeys;
974 columnKeyCreator.addExistingKeys(existingColKeys);
975 // create am unbalanced tree that maps the provided definitions
976 var unbalancedTree = this.recursivelyCreateColumns(defs, 0, primaryColumns, existingCols, columnKeyCreator, existingGroups);
977 var treeDept = this.findMaxDept(unbalancedTree, 0);
978 this.logger.log('Number of levels for grouped columns is ' + treeDept);
979 var columnTree = this.balanceColumnTree(unbalancedTree, 0, treeDept, columnKeyCreator);
980 var deptFirstCallback = function (child, parent) {
981 if (child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
982 child.setupExpandable();
983 }
984 // we set the original parents at the end, rather than when we go along, as balancing the tree
985 // adds extra levels into the tree. so we can only set parents when balancing is done.
986 child.setOriginalParent(parent);
987 };
988 this.columnUtils.depthFirstOriginalTreeSearch(null, columnTree, deptFirstCallback);
989 return {
990 columnTree: columnTree,
991 treeDept: treeDept
992 };
993 };
994 ColumnFactory.prototype.extractExistingTreeData = function (existingTree) {
995 var existingCols = [];
996 var existingGroups = [];
997 var existingColKeys = [];
998 if (existingTree) {
999 this.columnUtils.depthFirstOriginalTreeSearch(null, existingTree, function (item) {
1000 if (item instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
1001 var group = item;
1002 existingGroups.push(group);
1003 }
1004 else {
1005 var col = item;
1006 existingColKeys.push(col.getId());
1007 existingCols.push(col);
1008 }
1009 });
1010 }
1011 return { existingCols: existingCols, existingGroups: existingGroups, existingColKeys: existingColKeys };
1012 };
1013 ColumnFactory.prototype.createForAutoGroups = function (autoGroupCols, gridBalancedTree) {
1014 var _this = this;
1015 return autoGroupCols.map(function (col) { return _this.createAutoGroupTreeItem(gridBalancedTree, col); });
1016 };
1017 ColumnFactory.prototype.createAutoGroupTreeItem = function (balancedColumnTree, column) {
1018 var dept = this.findDepth(balancedColumnTree);
1019 // at the end, this will be the top of the tree item.
1020 var nextChild = column;
1021 for (var i = dept - 1; i >= 0; i--) {
1022 var autoGroup = new _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"](null, "FAKE_PATH_" + column.getId() + "}_" + i, true, i);
1023 this.context.createBean(autoGroup);
1024 autoGroup.setChildren([nextChild]);
1025 nextChild.setOriginalParent(autoGroup);
1026 nextChild = autoGroup;
1027 }
1028 // at this point, the nextChild is the top most item in the tree
1029 return nextChild;
1030 };
1031 ColumnFactory.prototype.findDepth = function (balancedColumnTree) {
1032 var dept = 0;
1033 var pointer = balancedColumnTree;
1034 while (pointer && pointer[0] && pointer[0] instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
1035 dept++;
1036 pointer = pointer[0].getChildren();
1037 }
1038 return dept;
1039 };
1040 ColumnFactory.prototype.balanceColumnTree = function (unbalancedTree, currentDept, columnDept, columnKeyCreator) {
1041 var result = [];
1042 // go through each child, for groups, recurse a level deeper,
1043 // for columns we need to pad
1044 for (var i = 0; i < unbalancedTree.length; i++) {
1045 var child = unbalancedTree[i];
1046 if (child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
1047 // child is a group, all we do is go to the next level of recursion
1048 var originalGroup = child;
1049 var newChildren = this.balanceColumnTree(originalGroup.getChildren(), currentDept + 1, columnDept, columnKeyCreator);
1050 originalGroup.setChildren(newChildren);
1051 result.push(originalGroup);
1052 }
1053 else {
1054 // child is a column - so here we add in the padded column groups if needed
1055 var firstPaddedGroup = void 0;
1056 var currentPaddedGroup = void 0;
1057 // this for loop will NOT run any loops if no padded column groups are needed
1058 for (var j = columnDept - 1; j >= currentDept; j--) {
1059 var newColId = columnKeyCreator.getUniqueKey(null, null);
1060 var colGroupDefMerged = this.createMergedColGroupDef(null);
1061 var paddedGroup = new _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"](colGroupDefMerged, newColId, true, currentDept);
1062 this.context.createBean(paddedGroup);
1063 if (currentPaddedGroup) {
1064 currentPaddedGroup.setChildren([paddedGroup]);
1065 }
1066 currentPaddedGroup = paddedGroup;
1067 if (!firstPaddedGroup) {
1068 firstPaddedGroup = currentPaddedGroup;
1069 }
1070 }
1071 // likewise this if statement will not run if no padded groups
1072 if (firstPaddedGroup && currentPaddedGroup) {
1073 result.push(firstPaddedGroup);
1074 var hasGroups = unbalancedTree.some(function (leaf) { return leaf instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]; });
1075 if (hasGroups) {
1076 currentPaddedGroup.setChildren([child]);
1077 continue;
1078 }
1079 else {
1080 currentPaddedGroup.setChildren(unbalancedTree);
1081 break;
1082 }
1083 }
1084 result.push(child);
1085 }
1086 }
1087 return result;
1088 };
1089 ColumnFactory.prototype.findMaxDept = function (treeChildren, dept) {
1090 var maxDeptThisLevel = dept;
1091 for (var i = 0; i < treeChildren.length; i++) {
1092 var abstractColumn = treeChildren[i];
1093 if (abstractColumn instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
1094 var originalGroup = abstractColumn;
1095 var newDept = this.findMaxDept(originalGroup.getChildren(), dept + 1);
1096 if (maxDeptThisLevel < newDept) {
1097 maxDeptThisLevel = newDept;
1098 }
1099 }
1100 }
1101 return maxDeptThisLevel;
1102 };
1103 ColumnFactory.prototype.recursivelyCreateColumns = function (defs, level, primaryColumns, existingColsCopy, columnKeyCreator, existingGroups) {
1104 var _this = this;
1105 return (defs || []).map(function (def) {
1106 if (_this.isColumnGroup(def)) {
1107 return _this.createColumnGroup(primaryColumns, def, level, existingColsCopy, columnKeyCreator, existingGroups);
1108 }
1109 else {
1110 return _this.createColumn(primaryColumns, def, existingColsCopy, columnKeyCreator);
1111 }
1112 });
1113 };
1114 ColumnFactory.prototype.createColumnGroup = function (primaryColumns, colGroupDef, level, existingColumns, columnKeyCreator, existingGroups) {
1115 var colGroupDefMerged = this.createMergedColGroupDef(colGroupDef);
1116 var groupId = columnKeyCreator.getUniqueKey(colGroupDefMerged.groupId || null, null);
1117 var providedGroup = new _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"](colGroupDefMerged, groupId, false, level);
1118 this.context.createBean(providedGroup);
1119 var existingGroup = this.findExistingGroup(colGroupDef, existingGroups);
1120 // make sure we remove, so if user provided duplicate id, then we don't have more than
1121 // one column instance for colDef with common id
1122 if (existingGroup) {
1123 Object(_utils_array__WEBPACK_IMPORTED_MODULE_9__["removeFromArray"])(existingGroups, existingGroup);
1124 }
1125 if (existingGroup && existingGroup.isExpanded()) {
1126 providedGroup.setExpanded(true);
1127 }
1128 var children = this.recursivelyCreateColumns(colGroupDefMerged.children, level + 1, primaryColumns, existingColumns, columnKeyCreator, existingGroups);
1129 providedGroup.setChildren(children);
1130 return providedGroup;
1131 };
1132 ColumnFactory.prototype.createMergedColGroupDef = function (colGroupDef) {
1133 var colGroupDefMerged = {};
1134 Object.assign(colGroupDefMerged, this.gridOptionsWrapper.getDefaultColGroupDef());
1135 Object.assign(colGroupDefMerged, colGroupDef);
1136 this.checkForDeprecatedItems(colGroupDefMerged);
1137 return colGroupDefMerged;
1138 };
1139 ColumnFactory.prototype.createColumn = function (primaryColumns, colDef, existingColsCopy, columnKeyCreator) {
1140 var colDefMerged = this.mergeColDefs(colDef);
1141 this.checkForDeprecatedItems(colDefMerged);
1142 // see if column already exists
1143 var column = this.findExistingColumn(colDef, existingColsCopy);
1144 // make sure we remove, so if user provided duplicate id, then we don't have more than
1145 // one column instance for colDef with common id
1146 if (existingColsCopy && column) {
1147 Object(_utils_array__WEBPACK_IMPORTED_MODULE_9__["removeFromArray"])(existingColsCopy, column);
1148 }
1149 if (!column) {
1150 // no existing column, need to create one
1151 var colId = columnKeyCreator.getUniqueKey(colDefMerged.colId, colDefMerged.field);
1152 column = new _entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"](colDefMerged, colDef, colId, primaryColumns);
1153 this.context.createBean(column);
1154 }
1155 else {
1156 column.setColDef(colDefMerged, colDef);
1157 this.applyColumnState(column, colDefMerged);
1158 }
1159 return column;
1160 };
1161 ColumnFactory.prototype.applyColumnState = function (column, colDef) {
1162 // flex
1163 var flex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_8__["attrToNumber"])(colDef.flex);
1164 if (flex !== undefined) {
1165 column.setFlex(flex);
1166 }
1167 // width - we only set width if column is not flexing
1168 var noFlexThisCol = column.getFlex() <= 0;
1169 if (noFlexThisCol) {
1170 // both null and undefined means we skip, as it's not possible to 'clear' width (a column must have a width)
1171 var width = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_8__["attrToNumber"])(colDef.width);
1172 if (width != null) {
1173 column.setActualWidth(width);
1174 }
1175 else {
1176 // otherwise set the width again, in case min or max width has changed,
1177 // and width needs to be adjusted.
1178 var widthBeforeUpdate = column.getActualWidth();
1179 column.setActualWidth(widthBeforeUpdate);
1180 }
1181 }
1182 // sort - anything but undefined will set sort, thus null or empty string will clear the sort
1183 if (colDef.sort !== undefined) {
1184 if (colDef.sort == _constants_constants__WEBPACK_IMPORTED_MODULE_6__["Constants"].SORT_ASC || colDef.sort == _constants_constants__WEBPACK_IMPORTED_MODULE_6__["Constants"].SORT_DESC) {
1185 column.setSort(colDef.sort);
1186 }
1187 else {
1188 column.setSort(undefined);
1189 }
1190 }
1191 // sorted at - anything but undefined, thus null will clear the sortIndex
1192 var sortIndex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_8__["attrToNumber"])(colDef.sortIndex);
1193 if (sortIndex !== undefined) {
1194 column.setSortIndex(sortIndex);
1195 }
1196 // hide - anything but undefined, thus null will clear the hide
1197 var hide = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_8__["attrToBoolean"])(colDef.hide);
1198 if (hide !== undefined) {
1199 column.setVisible(!hide);
1200 }
1201 // pinned - anything but undefined, thus null or empty string will remove pinned
1202 if (colDef.pinned !== undefined) {
1203 column.setPinned(colDef.pinned);
1204 }
1205 };
1206 ColumnFactory.prototype.findExistingColumn = function (newColDef, existingColsCopy) {
1207 return (existingColsCopy || []).find(function (existingCol) {
1208 var existingColDef = existingCol.getUserProvidedColDef();
1209 if (!existingColDef) {
1210 return false;
1211 }
1212 var newHasId = newColDef.colId != null;
1213 var newHasField = newColDef.field != null;
1214 if (newHasId) {
1215 return existingCol.getId() === newColDef.colId;
1216 }
1217 if (newHasField) {
1218 return existingColDef.field === newColDef.field;
1219 }
1220 // if no id or field present, then try object equivalence.
1221 if (existingColDef === newColDef) {
1222 return true;
1223 }
1224 return false;
1225 });
1226 };
1227 ColumnFactory.prototype.findExistingGroup = function (newGroupDef, existingGroups) {
1228 return existingGroups.find(function (existingGroup) {
1229 var existingDef = existingGroup.getColGroupDef();
1230 if (!existingDef) {
1231 return false;
1232 }
1233 var newHasId = newGroupDef.groupId != null;
1234 if (newHasId) {
1235 return existingGroup.getId() === newGroupDef.groupId;
1236 }
1237 return false;
1238 });
1239 };
1240 ColumnFactory.prototype.mergeColDefs = function (colDef) {
1241 // start with empty merged definition
1242 var colDefMerged = {};
1243 // merge properties from default column definitions
1244 var defaultColDef = this.gridOptionsWrapper.getDefaultColDef();
1245 Object(_utils_object__WEBPACK_IMPORTED_MODULE_7__["mergeDeep"])(colDefMerged, defaultColDef, false, true);
1246 // merge properties from column type properties
1247 var columnType = colDef.type;
1248 if (!columnType) {
1249 columnType = defaultColDef && defaultColDef.type;
1250 }
1251 // if type of both colDef and defaultColDef, then colDef gets preference
1252 if (columnType) {
1253 this.assignColumnTypes(columnType, colDefMerged);
1254 }
1255 // merge properties from column definitions
1256 Object(_utils_object__WEBPACK_IMPORTED_MODULE_7__["mergeDeep"])(colDefMerged, colDef, false, true);
1257 return colDefMerged;
1258 };
1259 ColumnFactory.prototype.assignColumnTypes = function (type, colDefMerged) {
1260 var typeKeys = [];
1261 if (type instanceof Array) {
1262 var invalidArray = type.some(function (a) { return typeof a !== 'string'; });
1263 if (invalidArray) {
1264 console.warn("AG Grid: if colDef.type is supplied an array it should be of type 'string[]'");
1265 }
1266 else {
1267 typeKeys = type;
1268 }
1269 }
1270 else if (typeof type === 'string') {
1271 typeKeys = type.split(',');
1272 }
1273 else {
1274 console.warn("AG Grid: colDef.type should be of type 'string' | 'string[]'");
1275 return;
1276 }
1277 // merge user defined with default column types
1278 var allColumnTypes = Object.assign({}, _entities_defaultColumnTypes__WEBPACK_IMPORTED_MODULE_4__["DefaultColumnTypes"]);
1279 var userTypes = this.gridOptionsWrapper.getColumnTypes() || {};
1280 Object(_utils_object__WEBPACK_IMPORTED_MODULE_7__["iterateObject"])(userTypes, function (key, value) {
1281 if (key in allColumnTypes) {
1282 console.warn("AG Grid: the column type '" + key + "' is a default column type and cannot be overridden.");
1283 }
1284 else {
1285 allColumnTypes[key] = value;
1286 }
1287 });
1288 typeKeys.forEach(function (t) {
1289 var typeColDef = allColumnTypes[t.trim()];
1290 if (typeColDef) {
1291 Object(_utils_object__WEBPACK_IMPORTED_MODULE_7__["mergeDeep"])(colDefMerged, typeColDef, false, true);
1292 }
1293 else {
1294 console.warn("AG Grid: colDef.type '" + t + "' does not correspond to defined gridOptions.columnTypes");
1295 }
1296 });
1297 };
1298 ColumnFactory.prototype.checkForDeprecatedItems = function (colDef) {
1299 if (colDef) {
1300 var colDefNoType = colDef; // take out the type, so we can access attributes not defined in the type
1301 if (colDefNoType.group !== undefined) {
1302 console.warn('AG Grid: colDef.group is invalid, please check documentation on how to do grouping as it changed in version 3');
1303 }
1304 if (colDefNoType.headerGroup !== undefined) {
1305 console.warn('AG Grid: colDef.headerGroup is invalid, please check documentation on how to do grouping as it changed in version 3');
1306 }
1307 if (colDefNoType.headerGroupShow !== undefined) {
1308 console.warn('AG Grid: colDef.headerGroupShow is invalid, should be columnGroupShow, please check documentation on how to do grouping as it changed in version 3');
1309 }
1310 if (colDefNoType.suppressRowGroup !== undefined) {
1311 console.warn('AG Grid: colDef.suppressRowGroup is deprecated, please use colDef.type instead');
1312 }
1313 if (colDefNoType.suppressAggregation !== undefined) {
1314 console.warn('AG Grid: colDef.suppressAggregation is deprecated, please use colDef.type instead');
1315 }
1316 if (colDefNoType.suppressRowGroup || colDefNoType.suppressAggregation) {
1317 console.warn('AG Grid: colDef.suppressAggregation and colDef.suppressRowGroup are deprecated, use allowRowGroup, allowPivot and allowValue instead');
1318 }
1319 if (colDefNoType.displayName) {
1320 console.warn("AG Grid: Found displayName " + colDefNoType.displayName + ", please use headerName instead, displayName is deprecated.");
1321 colDefNoType.headerName = colDefNoType.displayName;
1322 }
1323 }
1324 };
1325 // if object has children, we assume it's a group
1326 ColumnFactory.prototype.isColumnGroup = function (abstractColDef) {
1327 return abstractColDef.children !== undefined;
1328 };
1329 __decorate([
1330 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('columnUtils')
1331 ], ColumnFactory.prototype, "columnUtils", void 0);
1332 __decorate([
1333 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Qualifier"])('loggerFactory'))
1334 ], ColumnFactory.prototype, "setBeans", null);
1335 ColumnFactory = __decorate([
1336 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Bean"])('columnFactory')
1337 ], ColumnFactory);
1338 return ColumnFactory;
1339}(_context_beanStub__WEBPACK_IMPORTED_MODULE_5__["BeanStub"]));
1340
1341
1342
1343
1344
1345/***/ }),
1346/* 6 */
1347/***/ (function(module, __webpack_exports__, __webpack_require__) {
1348
1349"use strict";
1350__webpack_require__.r(__webpack_exports__);
1351/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnKeyCreator", function() { return ColumnKeyCreator; });
1352/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
1353/**
1354 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1355 * @version v27.3.0
1356 * @link https://www.ag-grid.com/
1357 * @license MIT
1358 */
1359// class returns a unique id to use for the column. it checks the existing columns, and if the requested
1360// id is already taken, it will start appending numbers until it gets a unique id.
1361// eg, if the col field is 'name', it will try ids: {name, name_1, name_2...}
1362// if no field or id provided in the col, it will try the ids of natural numbers
1363
1364var ColumnKeyCreator = /** @class */ (function () {
1365 function ColumnKeyCreator() {
1366 this.existingKeys = {};
1367 }
1368 ColumnKeyCreator.prototype.addExistingKeys = function (keys) {
1369 for (var i = 0; i < keys.length; i++) {
1370 this.existingKeys[keys[i]] = true;
1371 }
1372 };
1373 ColumnKeyCreator.prototype.getUniqueKey = function (colId, colField) {
1374 // in case user passed in number for colId, convert to string
1375 colId = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["toStringOrNull"])(colId);
1376 var count = 0;
1377 while (true) {
1378 var idToTry = void 0;
1379 if (colId) {
1380 idToTry = colId;
1381 if (count !== 0) {
1382 idToTry += '_' + count;
1383 }
1384 }
1385 else if (colField) {
1386 idToTry = colField;
1387 if (count !== 0) {
1388 idToTry += '_' + count;
1389 }
1390 }
1391 else {
1392 idToTry = '' + count;
1393 }
1394 if (!this.existingKeys[idToTry]) {
1395 this.existingKeys[idToTry] = true;
1396 return idToTry;
1397 }
1398 count++;
1399 }
1400 };
1401 return ColumnKeyCreator;
1402}());
1403
1404
1405
1406
1407
1408/***/ }),
1409/* 7 */
1410/***/ (function(module, __webpack_exports__, __webpack_require__) {
1411
1412"use strict";
1413__webpack_require__.r(__webpack_exports__);
1414/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeNull", function() { return makeNull; });
1415/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exists", function() { return exists; });
1416/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "missing", function() { return missing; });
1417/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "missingOrEmpty", function() { return missingOrEmpty; });
1418/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toStringOrNull", function() { return toStringOrNull; });
1419/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attrToNumber", function() { return attrToNumber; });
1420/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attrToBoolean", function() { return attrToBoolean; });
1421/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attrToString", function() { return attrToString; });
1422/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "referenceCompare", function() { return referenceCompare; });
1423/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsonEquals", function() { return jsonEquals; });
1424/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultComparator", function() { return defaultComparator; });
1425/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; });
1426/**
1427 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1428 * @version v27.3.0
1429 * @link https://www.ag-grid.com/
1430 * @license MIT
1431 */
1432/**
1433 * If value is undefined, null or blank, returns null, otherwise returns the value
1434 * @param {T} value
1435 * @returns {T | null}
1436 */
1437function makeNull(value) {
1438 if (value == null || value === '') {
1439 return null;
1440 }
1441 return value;
1442}
1443function exists(value, allowEmptyString) {
1444 if (allowEmptyString === void 0) { allowEmptyString = false; }
1445 return value != null && (value !== '' || allowEmptyString);
1446}
1447function missing(value) {
1448 return !exists(value);
1449}
1450function missingOrEmpty(value) {
1451 return value == null || value.length === 0;
1452}
1453function toStringOrNull(value) {
1454 return value != null && typeof value.toString === 'function' ? value.toString() : null;
1455}
1456// for parsing html attributes, where we want empty strings and missing attributes to be undefined
1457function attrToNumber(value) {
1458 if (value === undefined) {
1459 // undefined or empty means ignore the value
1460 return;
1461 }
1462 if (value === null || value === '') {
1463 // null or blank means clear
1464 return null;
1465 }
1466 if (typeof value === 'number') {
1467 return isNaN(value) ? undefined : value;
1468 }
1469 var valueParsed = parseInt(value, 10);
1470 return isNaN(valueParsed) ? undefined : valueParsed;
1471}
1472// for parsing html attributes, where we want empty strings and missing attributes to be undefined
1473function attrToBoolean(value) {
1474 if (value === undefined) {
1475 // undefined or empty means ignore the value
1476 return;
1477 }
1478 if (value === null || value === '') {
1479 // null means clear
1480 return false;
1481 }
1482 if (typeof value === 'boolean') {
1483 // if simple boolean, return the boolean
1484 return value;
1485 }
1486 // if equal to the string 'true' (ignoring case) then return true
1487 return (/true/i).test(value);
1488}
1489// for parsing html attributes, where we want empty strings and missing attributes to be undefined
1490function attrToString(value) {
1491 if (value == null || value === '') {
1492 return;
1493 }
1494 return value;
1495}
1496/** @deprecated */
1497function referenceCompare(left, right) {
1498 if (left == null && right == null) {
1499 return true;
1500 }
1501 if (left == null && right != null) {
1502 return false;
1503 }
1504 if (left != null && right == null) {
1505 return false;
1506 }
1507 return left === right;
1508}
1509function jsonEquals(val1, val2) {
1510 var val1Json = val1 ? JSON.stringify(val1) : null;
1511 var val2Json = val2 ? JSON.stringify(val2) : null;
1512 return val1Json === val2Json;
1513}
1514function defaultComparator(valueA, valueB, accentedCompare) {
1515 if (accentedCompare === void 0) { accentedCompare = false; }
1516 var valueAMissing = valueA == null;
1517 var valueBMissing = valueB == null;
1518 // this is for aggregations sum and avg, where the result can be a number that is wrapped.
1519 // if we didn't do this, then the toString() value would be used, which would result in
1520 // the strings getting used instead of the numbers.
1521 if (valueA && valueA.toNumber) {
1522 valueA = valueA.toNumber();
1523 }
1524 if (valueB && valueB.toNumber) {
1525 valueB = valueB.toNumber();
1526 }
1527 if (valueAMissing && valueBMissing) {
1528 return 0;
1529 }
1530 if (valueAMissing) {
1531 return -1;
1532 }
1533 if (valueBMissing) {
1534 return 1;
1535 }
1536 function doQuickCompare(a, b) {
1537 return (a > b ? 1 : (a < b ? -1 : 0));
1538 }
1539 if (typeof valueA !== 'string') {
1540 return doQuickCompare(valueA, valueB);
1541 }
1542 if (!accentedCompare) {
1543 return doQuickCompare(valueA, valueB);
1544 }
1545 try {
1546 // using local compare also allows chinese comparisons
1547 return valueA.localeCompare(valueB);
1548 }
1549 catch (e) {
1550 // if something wrong with localeCompare, eg not supported
1551 // by browser, then just continue with the quick one
1552 return doQuickCompare(valueA, valueB);
1553 }
1554}
1555function values(object) {
1556 if (object instanceof Set || object instanceof Map) {
1557 var arr_1 = [];
1558 object.forEach(function (value) { return arr_1.push(value); });
1559 return arr_1;
1560 }
1561 return Object.values(object);
1562}
1563
1564
1565
1566
1567/***/ }),
1568/* 8 */
1569/***/ (function(module, __webpack_exports__, __webpack_require__) {
1570
1571"use strict";
1572__webpack_require__.r(__webpack_exports__);
1573/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProvidedColumnGroup", function() { return ProvidedColumnGroup; });
1574/* harmony import */ var _columnGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
1575/* harmony import */ var _column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
1576/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
1577/**
1578 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1579 * @version v27.3.0
1580 * @link https://www.ag-grid.com/
1581 * @license MIT
1582 */
1583
1584
1585
1586var ProvidedColumnGroup = /** @class */ (function () {
1587 function ProvidedColumnGroup(colGroupDef, groupId, padding, level) {
1588 this.localEventService = new _eventService__WEBPACK_IMPORTED_MODULE_2__["EventService"]();
1589 this.expandable = false;
1590 this.colGroupDef = colGroupDef;
1591 this.groupId = groupId;
1592 this.expanded = !!colGroupDef && !!colGroupDef.openByDefault;
1593 this.padding = padding;
1594 this.level = level;
1595 }
1596 ProvidedColumnGroup.prototype.setOriginalParent = function (originalParent) {
1597 this.originalParent = originalParent;
1598 };
1599 ProvidedColumnGroup.prototype.getOriginalParent = function () {
1600 return this.originalParent;
1601 };
1602 ProvidedColumnGroup.prototype.getLevel = function () {
1603 return this.level;
1604 };
1605 ProvidedColumnGroup.prototype.isVisible = function () {
1606 // return true if at least one child is visible
1607 if (this.children) {
1608 return this.children.some(function (child) { return child.isVisible(); });
1609 }
1610 return false;
1611 };
1612 ProvidedColumnGroup.prototype.isPadding = function () {
1613 return this.padding;
1614 };
1615 ProvidedColumnGroup.prototype.setExpanded = function (expanded) {
1616 this.expanded = expanded === undefined ? false : expanded;
1617 var event = {
1618 type: ProvidedColumnGroup.EVENT_EXPANDED_CHANGED
1619 };
1620 this.localEventService.dispatchEvent(event);
1621 };
1622 ProvidedColumnGroup.prototype.isExpandable = function () {
1623 return this.expandable;
1624 };
1625 ProvidedColumnGroup.prototype.isExpanded = function () {
1626 return this.expanded;
1627 };
1628 ProvidedColumnGroup.prototype.getGroupId = function () {
1629 return this.groupId;
1630 };
1631 ProvidedColumnGroup.prototype.getId = function () {
1632 return this.getGroupId();
1633 };
1634 ProvidedColumnGroup.prototype.setChildren = function (children) {
1635 this.children = children;
1636 };
1637 ProvidedColumnGroup.prototype.getChildren = function () {
1638 return this.children;
1639 };
1640 ProvidedColumnGroup.prototype.getColGroupDef = function () {
1641 return this.colGroupDef;
1642 };
1643 ProvidedColumnGroup.prototype.getLeafColumns = function () {
1644 var result = [];
1645 this.addLeafColumns(result);
1646 return result;
1647 };
1648 ProvidedColumnGroup.prototype.addLeafColumns = function (leafColumns) {
1649 if (!this.children) {
1650 return;
1651 }
1652 this.children.forEach(function (child) {
1653 if (child instanceof _column__WEBPACK_IMPORTED_MODULE_1__["Column"]) {
1654 leafColumns.push(child);
1655 }
1656 else if (child instanceof ProvidedColumnGroup) {
1657 child.addLeafColumns(leafColumns);
1658 }
1659 });
1660 };
1661 ProvidedColumnGroup.prototype.getColumnGroupShow = function () {
1662 var colGroupDef = this.colGroupDef;
1663 if (!colGroupDef) {
1664 return;
1665 }
1666 return colGroupDef.columnGroupShow;
1667 };
1668 // need to check that this group has at least one col showing when both expanded and contracted.
1669 // if not, then we don't allow expanding and contracting on this group
1670 ProvidedColumnGroup.prototype.setupExpandable = function () {
1671 var _this = this;
1672 this.setExpandable();
1673 // note - we should be removing this event listener
1674 this.getLeafColumns().forEach(function (col) { return col.addEventListener(_column__WEBPACK_IMPORTED_MODULE_1__["Column"].EVENT_VISIBLE_CHANGED, _this.onColumnVisibilityChanged.bind(_this)); });
1675 };
1676 ProvidedColumnGroup.prototype.setExpandable = function () {
1677 if (this.isPadding()) {
1678 return;
1679 }
1680 // want to make sure the group doesn't disappear when it's open
1681 var atLeastOneShowingWhenOpen = false;
1682 // want to make sure the group doesn't disappear when it's closed
1683 var atLeastOneShowingWhenClosed = false;
1684 // want to make sure the group has something to show / hide
1685 var atLeastOneChangeable = false;
1686 var children = this.findChildrenRemovingPadding();
1687 for (var i = 0, j = children.length; i < j; i++) {
1688 var abstractColumn = children[i];
1689 if (!abstractColumn.isVisible()) {
1690 continue;
1691 }
1692 // if the abstractColumn is a grid generated group, there will be no colDef
1693 var headerGroupShow = abstractColumn.getColumnGroupShow();
1694 if (headerGroupShow === _columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"].HEADER_GROUP_SHOW_OPEN) {
1695 atLeastOneShowingWhenOpen = true;
1696 atLeastOneChangeable = true;
1697 }
1698 else if (headerGroupShow === _columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"].HEADER_GROUP_SHOW_CLOSED) {
1699 atLeastOneShowingWhenClosed = true;
1700 atLeastOneChangeable = true;
1701 }
1702 else {
1703 atLeastOneShowingWhenOpen = true;
1704 atLeastOneShowingWhenClosed = true;
1705 }
1706 }
1707 var expandable = atLeastOneShowingWhenOpen && atLeastOneShowingWhenClosed && atLeastOneChangeable;
1708 if (this.expandable !== expandable) {
1709 this.expandable = expandable;
1710 var event_1 = {
1711 type: ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED
1712 };
1713 this.localEventService.dispatchEvent(event_1);
1714 }
1715 };
1716 ProvidedColumnGroup.prototype.findChildrenRemovingPadding = function () {
1717 var res = [];
1718 var process = function (items) {
1719 items.forEach(function (item) {
1720 // if padding, we add this children instead of the padding
1721 var skipBecausePadding = item instanceof ProvidedColumnGroup && item.isPadding();
1722 if (skipBecausePadding) {
1723 process(item.children);
1724 }
1725 else {
1726 res.push(item);
1727 }
1728 });
1729 };
1730 process(this.children);
1731 return res;
1732 };
1733 ProvidedColumnGroup.prototype.onColumnVisibilityChanged = function () {
1734 this.setExpandable();
1735 };
1736 ProvidedColumnGroup.prototype.addEventListener = function (eventType, listener) {
1737 this.localEventService.addEventListener(eventType, listener);
1738 };
1739 ProvidedColumnGroup.prototype.removeEventListener = function (eventType, listener) {
1740 this.localEventService.removeEventListener(eventType, listener);
1741 };
1742 ProvidedColumnGroup.EVENT_EXPANDED_CHANGED = 'expandedChanged';
1743 ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED = 'expandableChanged';
1744 return ProvidedColumnGroup;
1745}());
1746
1747
1748
1749
1750
1751/***/ }),
1752/* 9 */
1753/***/ (function(module, __webpack_exports__, __webpack_require__) {
1754
1755"use strict";
1756__webpack_require__.r(__webpack_exports__);
1757/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnGroup", function() { return ColumnGroup; });
1758/* harmony import */ var _column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
1759/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
1760/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
1761/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
1762/**
1763 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1764 * @version v27.3.0
1765 * @link https://www.ag-grid.com/
1766 * @license MIT
1767 */
1768var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1769 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1770 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1771 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1772 return c > 3 && r && Object.defineProperty(target, key, r), r;
1773};
1774
1775
1776
1777
1778var ColumnGroup = /** @class */ (function () {
1779 function ColumnGroup(providedColumnGroup, groupId, instanceId, pinned) {
1780 // depends on the open/closed state of the group, only displaying columns are stored here
1781 this.displayedChildren = [];
1782 this.localEventService = new _eventService__WEBPACK_IMPORTED_MODULE_1__["EventService"]();
1783 this.groupId = groupId;
1784 this.instanceId = instanceId;
1785 this.providedColumnGroup = providedColumnGroup;
1786 this.pinned = pinned;
1787 }
1788 // this is static, a it is used outside of this class
1789 ColumnGroup.createUniqueId = function (groupId, instanceId) {
1790 return groupId + '_' + instanceId;
1791 };
1792 // as the user is adding and removing columns, the groups are recalculated.
1793 // this reset clears out all children, ready for children to be added again
1794 ColumnGroup.prototype.reset = function () {
1795 this.parent = null;
1796 this.children = null;
1797 this.displayedChildren = null;
1798 };
1799 ColumnGroup.prototype.getParent = function () {
1800 return this.parent;
1801 };
1802 ColumnGroup.prototype.setParent = function (parent) {
1803 this.parent = parent;
1804 };
1805 ColumnGroup.prototype.getUniqueId = function () {
1806 return ColumnGroup.createUniqueId(this.groupId, this.instanceId);
1807 };
1808 ColumnGroup.prototype.isEmptyGroup = function () {
1809 return this.displayedChildren.length === 0;
1810 };
1811 ColumnGroup.prototype.isMoving = function () {
1812 var allLeafColumns = this.getProvidedColumnGroup().getLeafColumns();
1813 if (!allLeafColumns || allLeafColumns.length === 0) {
1814 return false;
1815 }
1816 return allLeafColumns.every(function (col) { return col.isMoving(); });
1817 };
1818 ColumnGroup.prototype.checkLeft = function () {
1819 // first get all children to setLeft, as it impacts our decision below
1820 this.displayedChildren.forEach(function (child) {
1821 if (child instanceof ColumnGroup) {
1822 child.checkLeft();
1823 }
1824 });
1825 // set our left based on first displayed column
1826 if (this.displayedChildren.length > 0) {
1827 if (this.gridOptionsWrapper.isEnableRtl()) {
1828 var lastChild = Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(this.displayedChildren);
1829 var lastChildLeft = lastChild.getLeft();
1830 this.setLeft(lastChildLeft);
1831 }
1832 else {
1833 var firstChildLeft = this.displayedChildren[0].getLeft();
1834 this.setLeft(firstChildLeft);
1835 }
1836 }
1837 else {
1838 // this should never happen, as if we have no displayed columns, then
1839 // this groups should not even exist.
1840 this.setLeft(null);
1841 }
1842 };
1843 ColumnGroup.prototype.getLeft = function () {
1844 return this.left;
1845 };
1846 ColumnGroup.prototype.getOldLeft = function () {
1847 return this.oldLeft;
1848 };
1849 ColumnGroup.prototype.setLeft = function (left) {
1850 this.oldLeft = left;
1851 if (this.left !== left) {
1852 this.left = left;
1853 this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_LEFT_CHANGED));
1854 }
1855 };
1856 ColumnGroup.prototype.getPinned = function () {
1857 return this.pinned;
1858 };
1859 ColumnGroup.prototype.createAgEvent = function (type) {
1860 return { type: type };
1861 };
1862 ColumnGroup.prototype.addEventListener = function (eventType, listener) {
1863 this.localEventService.addEventListener(eventType, listener);
1864 };
1865 ColumnGroup.prototype.removeEventListener = function (eventType, listener) {
1866 this.localEventService.removeEventListener(eventType, listener);
1867 };
1868 ColumnGroup.prototype.getGroupId = function () {
1869 return this.groupId;
1870 };
1871 ColumnGroup.prototype.getInstanceId = function () {
1872 return this.instanceId;
1873 };
1874 ColumnGroup.prototype.isChildInThisGroupDeepSearch = function (wantedChild) {
1875 var result = false;
1876 this.children.forEach(function (foundChild) {
1877 if (wantedChild === foundChild) {
1878 result = true;
1879 }
1880 if (foundChild instanceof ColumnGroup) {
1881 if (foundChild.isChildInThisGroupDeepSearch(wantedChild)) {
1882 result = true;
1883 }
1884 }
1885 });
1886 return result;
1887 };
1888 ColumnGroup.prototype.getActualWidth = function () {
1889 var groupActualWidth = 0;
1890 if (this.displayedChildren) {
1891 this.displayedChildren.forEach(function (child) {
1892 groupActualWidth += child.getActualWidth();
1893 });
1894 }
1895 return groupActualWidth;
1896 };
1897 ColumnGroup.prototype.isResizable = function () {
1898 if (!this.displayedChildren) {
1899 return false;
1900 }
1901 // if at least one child is resizable, then the group is resizable
1902 var result = false;
1903 this.displayedChildren.forEach(function (child) {
1904 if (child.isResizable()) {
1905 result = true;
1906 }
1907 });
1908 return result;
1909 };
1910 ColumnGroup.prototype.getMinWidth = function () {
1911 var result = 0;
1912 this.displayedChildren.forEach(function (groupChild) {
1913 result += groupChild.getMinWidth() || 0;
1914 });
1915 return result;
1916 };
1917 ColumnGroup.prototype.addChild = function (child) {
1918 if (!this.children) {
1919 this.children = [];
1920 }
1921 this.children.push(child);
1922 };
1923 ColumnGroup.prototype.getDisplayedChildren = function () {
1924 return this.displayedChildren;
1925 };
1926 ColumnGroup.prototype.getLeafColumns = function () {
1927 var result = [];
1928 this.addLeafColumns(result);
1929 return result;
1930 };
1931 ColumnGroup.prototype.getDisplayedLeafColumns = function () {
1932 var result = [];
1933 this.addDisplayedLeafColumns(result);
1934 return result;
1935 };
1936 // why two methods here doing the same thing?
1937 ColumnGroup.prototype.getDefinition = function () {
1938 return this.providedColumnGroup.getColGroupDef();
1939 };
1940 ColumnGroup.prototype.getColGroupDef = function () {
1941 return this.providedColumnGroup.getColGroupDef();
1942 };
1943 ColumnGroup.prototype.isPadding = function () {
1944 return this.providedColumnGroup.isPadding();
1945 };
1946 ColumnGroup.prototype.isExpandable = function () {
1947 return this.providedColumnGroup.isExpandable();
1948 };
1949 ColumnGroup.prototype.isExpanded = function () {
1950 return this.providedColumnGroup.isExpanded();
1951 };
1952 ColumnGroup.prototype.setExpanded = function (expanded) {
1953 this.providedColumnGroup.setExpanded(expanded);
1954 };
1955 ColumnGroup.prototype.addDisplayedLeafColumns = function (leafColumns) {
1956 this.displayedChildren.forEach(function (child) {
1957 if (child instanceof _column__WEBPACK_IMPORTED_MODULE_0__["Column"]) {
1958 leafColumns.push(child);
1959 }
1960 else if (child instanceof ColumnGroup) {
1961 child.addDisplayedLeafColumns(leafColumns);
1962 }
1963 });
1964 };
1965 ColumnGroup.prototype.addLeafColumns = function (leafColumns) {
1966 this.children.forEach(function (child) {
1967 if (child instanceof _column__WEBPACK_IMPORTED_MODULE_0__["Column"]) {
1968 leafColumns.push(child);
1969 }
1970 else if (child instanceof ColumnGroup) {
1971 child.addLeafColumns(leafColumns);
1972 }
1973 });
1974 };
1975 ColumnGroup.prototype.getChildren = function () {
1976 return this.children;
1977 };
1978 ColumnGroup.prototype.getColumnGroupShow = function () {
1979 return this.providedColumnGroup.getColumnGroupShow();
1980 };
1981 ColumnGroup.prototype.getProvidedColumnGroup = function () {
1982 return this.providedColumnGroup;
1983 };
1984 /** @deprecated getOriginalColumnGroup is deprecated, use getOriginalColumnGroup. */
1985 ColumnGroup.prototype.getOriginalColumnGroup = function () {
1986 console.warn('AG Grid: columnGroup.getOriginalColumnGroup() is deprecated due to a method rename, use columnGroup.getProvidedColumnGroup() instead');
1987 return this.getProvidedColumnGroup();
1988 };
1989 ColumnGroup.prototype.getPaddingLevel = function () {
1990 var parent = this.getParent();
1991 if (!this.isPadding() || !parent || !parent.isPadding()) {
1992 return 0;
1993 }
1994 return 1 + parent.getPaddingLevel();
1995 };
1996 ColumnGroup.prototype.calculateDisplayedColumns = function () {
1997 var _this = this;
1998 // clear out last time we calculated
1999 this.displayedChildren = [];
2000 // find the column group that is controlling expandable. this is relevant when we have padding (empty)
2001 // groups, where the expandable is actually the first parent that is not a padding group.
2002 var parentWithExpansion = this;
2003 while (parentWithExpansion != null && parentWithExpansion.isPadding()) {
2004 parentWithExpansion = parentWithExpansion.getParent();
2005 }
2006 var isExpandable = parentWithExpansion ? parentWithExpansion.providedColumnGroup.isExpandable() : false;
2007 // it not expandable, everything is visible
2008 if (!isExpandable) {
2009 this.displayedChildren = this.children;
2010 this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED));
2011 return;
2012 }
2013 // Add cols based on columnGroupShow
2014 // Note - the below also adds padding groups, these are always added because they never have
2015 // colDef.columnGroupShow set.
2016 this.children.forEach(function (child) {
2017 // never add empty groups
2018 var emptyGroup = child instanceof ColumnGroup && (!child.displayedChildren || !child.displayedChildren.length);
2019 if (emptyGroup) {
2020 return;
2021 }
2022 var headerGroupShow = child.getColumnGroupShow();
2023 switch (headerGroupShow) {
2024 case ColumnGroup.HEADER_GROUP_SHOW_OPEN:
2025 // when set to open, only show col if group is open
2026 if (parentWithExpansion.providedColumnGroup.isExpanded()) {
2027 _this.displayedChildren.push(child);
2028 }
2029 break;
2030 case ColumnGroup.HEADER_GROUP_SHOW_CLOSED:
2031 // when set to open, only show col if group is open
2032 if (!parentWithExpansion.providedColumnGroup.isExpanded()) {
2033 _this.displayedChildren.push(child);
2034 }
2035 break;
2036 default:
2037 _this.displayedChildren.push(child);
2038 break;
2039 }
2040 });
2041 this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED));
2042 };
2043 ColumnGroup.HEADER_GROUP_SHOW_OPEN = 'open';
2044 ColumnGroup.HEADER_GROUP_SHOW_CLOSED = 'closed';
2045 ColumnGroup.EVENT_LEFT_CHANGED = 'leftChanged';
2046 ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED = 'displayedChildrenChanged';
2047 __decorate([
2048 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('gridOptionsWrapper')
2049 ], ColumnGroup.prototype, "gridOptionsWrapper", void 0);
2050 return ColumnGroup;
2051}());
2052
2053
2054
2055
2056
2057/***/ }),
2058/* 10 */
2059/***/ (function(module, __webpack_exports__, __webpack_require__) {
2060
2061"use strict";
2062__webpack_require__.r(__webpack_exports__);
2063/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return Column; });
2064/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
2065/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
2066/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
2067/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
2068/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17);
2069/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
2070/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14);
2071/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(13);
2072/**
2073 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
2074 * @version v27.3.0
2075 * @link https://www.ag-grid.com/
2076 * @license MIT
2077 */
2078var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2079 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2080 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2081 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2082 return c > 3 && r && Object.defineProperty(target, key, r), r;
2083};
2084
2085
2086
2087
2088
2089
2090
2091
2092var instanceIdSequence = 0;
2093// Wrapper around a user provide column definition. The grid treats the column definition as ready only.
2094// This class contains all the runtime information about a column, plus some logic (the definition has no logic).
2095// This class implements both interfaces ColumnGroupChild and ProvidedColumnGroupChild as the class can
2096// appear as a child of either the original tree or the displayed tree. However the relevant group classes
2097// for each type only implements one, as each group can only appear in it's associated tree (eg ProvidedColumnGroup
2098// can only appear in OriginalColumn tree).
2099var Column = /** @class */ (function () {
2100 function Column(colDef, userProvidedColDef, colId, primary) {
2101 // used by React (and possibly other frameworks) as key for rendering
2102 this.instanceId = instanceIdSequence++;
2103 this.moving = false;
2104 this.menuVisible = false;
2105 this.filterActive = false;
2106 this.eventService = new _eventService__WEBPACK_IMPORTED_MODULE_0__["EventService"]();
2107 this.rowGroupActive = false;
2108 this.pivotActive = false;
2109 this.aggregationActive = false;
2110 this.colDef = colDef;
2111 this.userProvidedColDef = userProvidedColDef;
2112 this.colId = colId;
2113 this.primary = primary;
2114 this.setState(colDef);
2115 }
2116 Column.prototype.getInstanceId = function () {
2117 return this.instanceId;
2118 };
2119 Column.prototype.setState = function (colDef) {
2120 // sort
2121 if (colDef.sort !== undefined) {
2122 if (colDef.sort === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_ASC || colDef.sort === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_DESC) {
2123 this.sort = colDef.sort;
2124 }
2125 }
2126 else {
2127 if (colDef.initialSort === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_ASC || colDef.initialSort === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_DESC) {
2128 this.sort = colDef.initialSort;
2129 }
2130 }
2131 // sortIndex
2132 var sortIndex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["attrToNumber"])(colDef.sortIndex);
2133 var initialSortIndex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["attrToNumber"])(colDef.initialSortIndex);
2134 if (sortIndex !== undefined) {
2135 if (sortIndex !== null) {
2136 this.sortIndex = sortIndex;
2137 }
2138 }
2139 else {
2140 if (initialSortIndex !== null) {
2141 this.sortIndex = initialSortIndex;
2142 }
2143 }
2144 // hide
2145 var hide = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["attrToBoolean"])(colDef.hide);
2146 var initialHide = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["attrToBoolean"])(colDef.initialHide);
2147 if (hide !== undefined) {
2148 this.visible = !hide;
2149 }
2150 else {
2151 this.visible = !initialHide;
2152 }
2153 // pinned
2154 if (colDef.pinned !== undefined) {
2155 this.setPinned(colDef.pinned);
2156 }
2157 else {
2158 this.setPinned(colDef.initialPinned);
2159 }
2160 // flex
2161 var flex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["attrToNumber"])(colDef.flex);
2162 var initialFlex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["attrToNumber"])(colDef.initialFlex);
2163 if (flex !== undefined) {
2164 this.flex = flex;
2165 }
2166 else if (initialFlex !== undefined) {
2167 this.flex = initialFlex;
2168 }
2169 };
2170 // gets called when user provides an alternative colDef, eg
2171 Column.prototype.setColDef = function (colDef, userProvidedColDef) {
2172 this.colDef = colDef;
2173 this.userProvidedColDef = userProvidedColDef;
2174 this.initMinAndMaxWidths();
2175 this.initDotNotation();
2176 };
2177 /**
2178 * Returns the column definition provided by the application.
2179 * This may not be correct, as items can be superseded by default column options.
2180 * However it's useful for comparison, eg to know which application column definition matches that column.
2181 */
2182 Column.prototype.getUserProvidedColDef = function () {
2183 return this.userProvidedColDef;
2184 };
2185 Column.prototype.setParent = function (parent) {
2186 this.parent = parent;
2187 };
2188 /** Returns the parent column group, if column grouping is active. */
2189 Column.prototype.getParent = function () {
2190 return this.parent;
2191 };
2192 Column.prototype.setOriginalParent = function (originalParent) {
2193 this.originalParent = originalParent;
2194 };
2195 Column.prototype.getOriginalParent = function () {
2196 return this.originalParent;
2197 };
2198 // this is done after constructor as it uses gridOptionsWrapper
2199 Column.prototype.initialise = function () {
2200 this.initMinAndMaxWidths();
2201 this.resetActualWidth('gridInitializing');
2202 this.initDotNotation();
2203 this.validate();
2204 };
2205 Column.prototype.initDotNotation = function () {
2206 var suppressDotNotation = this.gridOptionsWrapper.isSuppressFieldDotNotation();
2207 this.fieldContainsDots = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(this.colDef.field) && this.colDef.field.indexOf('.') >= 0 && !suppressDotNotation;
2208 this.tooltipFieldContainsDots = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(this.colDef.tooltipField) && this.colDef.tooltipField.indexOf('.') >= 0 && !suppressDotNotation;
2209 };
2210 Column.prototype.initMinAndMaxWidths = function () {
2211 var colDef = this.colDef;
2212 this.minWidth = this.columnUtils.calculateColMinWidth(colDef);
2213 this.maxWidth = this.columnUtils.calculateColMaxWidth(colDef);
2214 };
2215 Column.prototype.resetActualWidth = function (source) {
2216 if (source === void 0) { source = 'api'; }
2217 var initialWidth = this.columnUtils.calculateColInitialWidth(this.colDef);
2218 this.setActualWidth(initialWidth, source, true);
2219 };
2220 Column.prototype.isEmptyGroup = function () {
2221 return false;
2222 };
2223 Column.prototype.isRowGroupDisplayed = function (colId) {
2224 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missing"])(this.colDef) || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missing"])(this.colDef.showRowGroup)) {
2225 return false;
2226 }
2227 var showingAllGroups = this.colDef.showRowGroup === true;
2228 var showingThisGroup = this.colDef.showRowGroup === colId;
2229 return showingAllGroups || showingThisGroup;
2230 };
2231 /** Returns `true` if column is a primary column, `false` if secondary. Secondary columns are used for pivoting. */
2232 Column.prototype.isPrimary = function () {
2233 return this.primary;
2234 };
2235 /** Returns `true` if column filtering is allowed. */
2236 Column.prototype.isFilterAllowed = function () {
2237 // filter defined means it's a string, class or true.
2238 // if its false, null or undefined then it's false.
2239 var filterDefined = !!this.colDef.filter || !!this.colDef.filterFramework;
2240 return filterDefined;
2241 };
2242 Column.prototype.isFieldContainsDots = function () {
2243 return this.fieldContainsDots;
2244 };
2245 Column.prototype.isTooltipFieldContainsDots = function () {
2246 return this.tooltipFieldContainsDots;
2247 };
2248 Column.prototype.validate = function () {
2249 var colDefAny = this.colDef;
2250 function warnOnce(msg, key, obj) {
2251 Object(_utils_function__WEBPACK_IMPORTED_MODULE_6__["doOnce"])(function () {
2252 if (obj) {
2253 console.warn(msg, obj);
2254 }
2255 else {
2256 Object(_utils_function__WEBPACK_IMPORTED_MODULE_6__["doOnce"])(function () { return console.warn(msg); }, key);
2257 }
2258 }, key);
2259 }
2260 var usingCSRM = this.gridOptionsWrapper.isRowModelDefault();
2261 if (usingCSRM && !_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].RowGroupingModule)) {
2262 var rowGroupingItems = ['enableRowGroup', 'rowGroup', 'rowGroupIndex', 'enablePivot', 'enableValue', 'pivot', 'pivotIndex', 'aggFunc'];
2263 rowGroupingItems.forEach(function (item) {
2264 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(colDefAny[item])) {
2265 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__["ModuleRegistry"].isPackageBased()) {
2266 warnOnce("AG Grid: " + item + " is only valid in ag-grid-enterprise, your column definition should not have " + item, 'ColumnRowGroupingMissing' + item);
2267 }
2268 else {
2269 warnOnce("AG Grid: " + item + " is only valid with AG Grid Enterprise Module " + _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].RowGroupingModule + " - your column definition should not have " + item, 'ColumnRowGroupingMissing' + item);
2270 }
2271 }
2272 });
2273 }
2274 if (!_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].RichSelectModule)) {
2275 if (this.colDef.cellEditor === 'agRichSelect') {
2276 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__["ModuleRegistry"].isPackageBased()) {
2277 warnOnce("AG Grid: " + this.colDef.cellEditor + " can only be used with ag-grid-enterprise", 'ColumnRichSelectMissing');
2278 }
2279 else {
2280 warnOnce("AG Grid: " + this.colDef.cellEditor + " can only be used with AG Grid Enterprise Module " + _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].RichSelectModule, 'ColumnRichSelectMissing');
2281 }
2282 }
2283 }
2284 if (this.gridOptionsWrapper.isTreeData()) {
2285 var itemsNotAllowedWithTreeData = ['rowGroup', 'rowGroupIndex', 'pivot', 'pivotIndex'];
2286 itemsNotAllowedWithTreeData.forEach(function (item) {
2287 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(colDefAny[item])) {
2288 warnOnce("AG Grid: " + item + " is not possible when doing tree data, your column definition should not have " + item, 'TreeDataCannotRowGroup');
2289 }
2290 });
2291 }
2292 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(this.colDef.width) && typeof this.colDef.width !== 'number') {
2293 warnOnce('AG Grid: colDef.width should be a number, not ' + typeof this.colDef.width, 'ColumnCheck_asdfawef');
2294 }
2295 if (colDefAny.pinnedRowCellRenderer) {
2296 warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');
2297 }
2298 if (colDefAny.pinnedRowCellRendererParams) {
2299 warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');
2300 }
2301 if (colDefAny.pinnedRowCellRendererFramework) {
2302 warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');
2303 }
2304 if (colDefAny.pinnedRowValueGetter) {
2305 warnOnce('AG Grid: pinnedRowCellRenderer is deprecated, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue.', 'colDef.pinnedRowCellRenderer-deprecated');
2306 }
2307 };
2308 /** Add an event listener to the column. */
2309 Column.prototype.addEventListener = function (eventType, listener) {
2310 this.eventService.addEventListener(eventType, listener);
2311 };
2312 /** Remove event listener from the column. */
2313 Column.prototype.removeEventListener = function (eventType, listener) {
2314 this.eventService.removeEventListener(eventType, listener);
2315 };
2316 Column.prototype.createColumnFunctionCallbackParams = function (rowNode) {
2317 return {
2318 node: rowNode,
2319 data: rowNode.data,
2320 column: this,
2321 colDef: this.colDef,
2322 context: this.gridOptionsWrapper.getContext(),
2323 api: this.gridOptionsWrapper.getApi(),
2324 columnApi: this.gridOptionsWrapper.getColumnApi()
2325 };
2326 };
2327 Column.prototype.isSuppressNavigable = function (rowNode) {
2328 // if boolean set, then just use it
2329 if (typeof this.colDef.suppressNavigable === 'boolean') {
2330 return this.colDef.suppressNavigable;
2331 }
2332 // if function, then call the function to find out
2333 if (typeof this.colDef.suppressNavigable === 'function') {
2334 var params = this.createColumnFunctionCallbackParams(rowNode);
2335 var userFunc = this.colDef.suppressNavigable;
2336 return userFunc(params);
2337 }
2338 return false;
2339 };
2340 Column.prototype.isCellEditable = function (rowNode) {
2341 // only allow editing of groups if the user has this option enabled
2342 if (rowNode.group && !this.gridOptionsWrapper.isEnableGroupEdit()) {
2343 return false;
2344 }
2345 return this.isColumnFunc(rowNode, this.colDef.editable);
2346 };
2347 Column.prototype.isSuppressFillHandle = function () {
2348 return !!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["attrToBoolean"])(this.colDef.suppressFillHandle);
2349 };
2350 Column.prototype.isAutoHeight = function () {
2351 return !!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["attrToBoolean"])(this.colDef.autoHeight);
2352 };
2353 Column.prototype.isRowDrag = function (rowNode) {
2354 return this.isColumnFunc(rowNode, this.colDef.rowDrag);
2355 };
2356 Column.prototype.isDndSource = function (rowNode) {
2357 return this.isColumnFunc(rowNode, this.colDef.dndSource);
2358 };
2359 Column.prototype.isCellCheckboxSelection = function (rowNode) {
2360 return this.isColumnFunc(rowNode, this.colDef.checkboxSelection);
2361 };
2362 Column.prototype.isSuppressPaste = function (rowNode) {
2363 return this.isColumnFunc(rowNode, this.colDef ? this.colDef.suppressPaste : null);
2364 };
2365 Column.prototype.isResizable = function () {
2366 return !!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["attrToBoolean"])(this.colDef.resizable);
2367 };
2368 Column.prototype.isColumnFunc = function (rowNode, value) {
2369 // if boolean set, then just use it
2370 if (typeof value === 'boolean') {
2371 return value;
2372 }
2373 // if function, then call the function to find out
2374 if (typeof value === 'function') {
2375 var params = this.createColumnFunctionCallbackParams(rowNode);
2376 var editableFunc = value;
2377 return editableFunc(params);
2378 }
2379 return false;
2380 };
2381 Column.prototype.setMoving = function (moving, source) {
2382 if (source === void 0) { source = "api"; }
2383 this.moving = moving;
2384 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_MOVING_CHANGED, source));
2385 };
2386 Column.prototype.createColumnEvent = function (type, source) {
2387 return {
2388 api: this.gridApi,
2389 columnApi: this.columnApi,
2390 type: type,
2391 column: this,
2392 columns: [this],
2393 source: source
2394 };
2395 };
2396 Column.prototype.isMoving = function () {
2397 return this.moving;
2398 };
2399 /** If sorting is active, returns the sort direction e.g. `'asc'` or `'desc'`. */
2400 Column.prototype.getSort = function () {
2401 return this.sort;
2402 };
2403 Column.prototype.setSort = function (sort, source) {
2404 if (source === void 0) { source = "api"; }
2405 if (this.sort !== sort) {
2406 this.sort = sort;
2407 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_SORT_CHANGED, source));
2408 }
2409 };
2410 Column.prototype.setMenuVisible = function (visible, source) {
2411 if (source === void 0) { source = "api"; }
2412 if (this.menuVisible !== visible) {
2413 this.menuVisible = visible;
2414 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_MENU_VISIBLE_CHANGED, source));
2415 }
2416 };
2417 Column.prototype.isMenuVisible = function () {
2418 return this.menuVisible;
2419 };
2420 Column.prototype.isSortAscending = function () {
2421 return this.sort === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_ASC;
2422 };
2423 Column.prototype.isSortDescending = function () {
2424 return this.sort === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_DESC;
2425 };
2426 Column.prototype.isSortNone = function () {
2427 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missing"])(this.sort);
2428 };
2429 Column.prototype.isSorting = function () {
2430 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(this.sort);
2431 };
2432 Column.prototype.getSortIndex = function () {
2433 return this.sortIndex;
2434 };
2435 Column.prototype.setSortIndex = function (sortOrder) {
2436 this.sortIndex = sortOrder;
2437 };
2438 Column.prototype.setAggFunc = function (aggFunc) {
2439 this.aggFunc = aggFunc;
2440 };
2441 /** If aggregation is set for the column, returns the aggregation function. */
2442 Column.prototype.getAggFunc = function () {
2443 return this.aggFunc;
2444 };
2445 Column.prototype.getLeft = function () {
2446 return this.left;
2447 };
2448 Column.prototype.getOldLeft = function () {
2449 return this.oldLeft;
2450 };
2451 Column.prototype.getRight = function () {
2452 return this.left + this.actualWidth;
2453 };
2454 Column.prototype.setLeft = function (left, source) {
2455 if (source === void 0) { source = "api"; }
2456 this.oldLeft = this.left;
2457 if (this.left !== left) {
2458 this.left = left;
2459 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_LEFT_CHANGED, source));
2460 }
2461 };
2462 /** Returns `true` if filter is active on the column. */
2463 Column.prototype.isFilterActive = function () {
2464 return this.filterActive;
2465 };
2466 // additionalEventAttributes is used by provided simple floating filter, so it can add 'floatingFilter=true' to the event
2467 Column.prototype.setFilterActive = function (active, source, additionalEventAttributes) {
2468 if (source === void 0) { source = "api"; }
2469 if (this.filterActive !== active) {
2470 this.filterActive = active;
2471 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_FILTER_ACTIVE_CHANGED, source));
2472 }
2473 var filterChangedEvent = this.createColumnEvent(Column.EVENT_FILTER_CHANGED, source);
2474 if (additionalEventAttributes) {
2475 Object(_utils_object__WEBPACK_IMPORTED_MODULE_7__["mergeDeep"])(filterChangedEvent, additionalEventAttributes);
2476 }
2477 this.eventService.dispatchEvent(filterChangedEvent);
2478 };
2479 Column.prototype.setPinned = function (pinned) {
2480 if (pinned === true || pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_LEFT) {
2481 this.pinned = _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_LEFT;
2482 }
2483 else if (pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_RIGHT) {
2484 this.pinned = _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_RIGHT;
2485 }
2486 else {
2487 this.pinned = null;
2488 }
2489 };
2490 Column.prototype.setFirstRightPinned = function (firstRightPinned, source) {
2491 if (source === void 0) { source = "api"; }
2492 if (this.firstRightPinned !== firstRightPinned) {
2493 this.firstRightPinned = firstRightPinned;
2494 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, source));
2495 }
2496 };
2497 Column.prototype.setLastLeftPinned = function (lastLeftPinned, source) {
2498 if (source === void 0) { source = "api"; }
2499 if (this.lastLeftPinned !== lastLeftPinned) {
2500 this.lastLeftPinned = lastLeftPinned;
2501 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_LAST_LEFT_PINNED_CHANGED, source));
2502 }
2503 };
2504 Column.prototype.isFirstRightPinned = function () {
2505 return this.firstRightPinned;
2506 };
2507 Column.prototype.isLastLeftPinned = function () {
2508 return this.lastLeftPinned;
2509 };
2510 Column.prototype.isPinned = function () {
2511 return this.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_LEFT || this.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_RIGHT;
2512 };
2513 Column.prototype.isPinnedLeft = function () {
2514 return this.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_LEFT;
2515 };
2516 Column.prototype.isPinnedRight = function () {
2517 return this.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_RIGHT;
2518 };
2519 Column.prototype.getPinned = function () {
2520 return this.pinned;
2521 };
2522 Column.prototype.setVisible = function (visible, source) {
2523 if (source === void 0) { source = "api"; }
2524 var newValue = visible === true;
2525 if (this.visible !== newValue) {
2526 this.visible = newValue;
2527 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_VISIBLE_CHANGED, source));
2528 }
2529 };
2530 Column.prototype.isVisible = function () {
2531 return this.visible;
2532 };
2533 /** Returns the column definition for this column.
2534 * The column definition will be the result of merging the application provided column definition with any provided defaults
2535 * (e.g. `defaultColDef` grid option, or column types.
2536 *
2537 * Equivalent: `getDefinition` */
2538 Column.prototype.getColDef = function () {
2539 return this.colDef;
2540 };
2541 Column.prototype.getColumnGroupShow = function () {
2542 return this.colDef.columnGroupShow;
2543 };
2544 /**
2545 * Returns the unique ID for the column.
2546 *
2547 * Equivalent: `getId`, `getUniqueId` */
2548 Column.prototype.getColId = function () {
2549 return this.colId;
2550 };
2551 /**
2552 * Returns the unique ID for the column.
2553 *
2554 * Equivalent: `getColId`, `getUniqueId` */
2555 Column.prototype.getId = function () {
2556 return this.getColId();
2557 };
2558 /**
2559 * Returns the unique ID for the column.
2560 *
2561 * Equivalent: `getColId`, `getId` */
2562 Column.prototype.getUniqueId = function () {
2563 return this.getId();
2564 };
2565 Column.prototype.getDefinition = function () {
2566 return this.colDef;
2567 };
2568 /** Returns the current width of the column. If the column is resized, the actual width is the new size. */
2569 Column.prototype.getActualWidth = function () {
2570 return this.actualWidth;
2571 };
2572 Column.prototype.createBaseColDefParams = function (rowNode) {
2573 var params = {
2574 node: rowNode,
2575 data: rowNode.data,
2576 colDef: this.colDef,
2577 column: this,
2578 api: this.gridOptionsWrapper.getApi(),
2579 columnApi: this.gridOptionsWrapper.getColumnApi(),
2580 context: this.gridOptionsWrapper.getContext()
2581 };
2582 return params;
2583 };
2584 Column.prototype.getColSpan = function (rowNode) {
2585 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missing"])(this.colDef.colSpan)) {
2586 return 1;
2587 }
2588 var params = this.createBaseColDefParams(rowNode);
2589 var colSpan = this.colDef.colSpan(params);
2590 // colSpan must be number equal to or greater than 1
2591 return Math.max(colSpan, 1);
2592 };
2593 Column.prototype.getRowSpan = function (rowNode) {
2594 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missing"])(this.colDef.rowSpan)) {
2595 return 1;
2596 }
2597 var params = this.createBaseColDefParams(rowNode);
2598 var rowSpan = this.colDef.rowSpan(params);
2599 // rowSpan must be number equal to or greater than 1
2600 return Math.max(rowSpan, 1);
2601 };
2602 Column.prototype.setActualWidth = function (actualWidth, source, silent) {
2603 if (source === void 0) { source = "api"; }
2604 if (silent === void 0) { silent = false; }
2605 if (this.minWidth != null) {
2606 actualWidth = Math.max(actualWidth, this.minWidth);
2607 }
2608 if (this.maxWidth != null) {
2609 actualWidth = Math.min(actualWidth, this.maxWidth);
2610 }
2611 if (this.actualWidth !== actualWidth) {
2612 // disable flex for this column if it was manually resized.
2613 this.actualWidth = actualWidth;
2614 if (this.flex && source !== 'flex' && source !== 'gridInitializing') {
2615 this.flex = null;
2616 }
2617 if (!silent) {
2618 this.fireColumnWidthChangedEvent(source);
2619 }
2620 }
2621 };
2622 Column.prototype.fireColumnWidthChangedEvent = function (source) {
2623 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_WIDTH_CHANGED, source));
2624 };
2625 Column.prototype.isGreaterThanMax = function (width) {
2626 if (this.maxWidth != null) {
2627 return width > this.maxWidth;
2628 }
2629 return false;
2630 };
2631 Column.prototype.getMinWidth = function () {
2632 return this.minWidth;
2633 };
2634 Column.prototype.getMaxWidth = function () {
2635 return this.maxWidth;
2636 };
2637 Column.prototype.getFlex = function () {
2638 return this.flex || 0;
2639 };
2640 // this method should only be used by the columnModel to
2641 // change flex when required by the setColumnState method.
2642 Column.prototype.setFlex = function (flex) {
2643 if (this.flex !== flex) {
2644 this.flex = flex;
2645 }
2646 };
2647 Column.prototype.setMinimum = function (source) {
2648 if (source === void 0) { source = "api"; }
2649 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(this.minWidth)) {
2650 this.setActualWidth(this.minWidth, source);
2651 }
2652 };
2653 Column.prototype.setRowGroupActive = function (rowGroup, source) {
2654 if (source === void 0) { source = "api"; }
2655 if (this.rowGroupActive !== rowGroup) {
2656 this.rowGroupActive = rowGroup;
2657 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_ROW_GROUP_CHANGED, source));
2658 }
2659 };
2660 /** Returns `true` if row group is currently active for this column. */
2661 Column.prototype.isRowGroupActive = function () {
2662 return this.rowGroupActive;
2663 };
2664 Column.prototype.setPivotActive = function (pivot, source) {
2665 if (source === void 0) { source = "api"; }
2666 if (this.pivotActive !== pivot) {
2667 this.pivotActive = pivot;
2668 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_PIVOT_CHANGED, source));
2669 }
2670 };
2671 /** Returns `true` if pivot is currently active for this column. */
2672 Column.prototype.isPivotActive = function () {
2673 return this.pivotActive;
2674 };
2675 Column.prototype.isAnyFunctionActive = function () {
2676 return this.isPivotActive() || this.isRowGroupActive() || this.isValueActive();
2677 };
2678 Column.prototype.isAnyFunctionAllowed = function () {
2679 return this.isAllowPivot() || this.isAllowRowGroup() || this.isAllowValue();
2680 };
2681 Column.prototype.setValueActive = function (value, source) {
2682 if (source === void 0) { source = "api"; }
2683 if (this.aggregationActive !== value) {
2684 this.aggregationActive = value;
2685 this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_VALUE_CHANGED, source));
2686 }
2687 };
2688 /** Returns `true` if value (aggregation) is currently active for this column. */
2689 Column.prototype.isValueActive = function () {
2690 return this.aggregationActive;
2691 };
2692 Column.prototype.isAllowPivot = function () {
2693 return this.colDef.enablePivot === true;
2694 };
2695 Column.prototype.isAllowValue = function () {
2696 return this.colDef.enableValue === true;
2697 };
2698 Column.prototype.isAllowRowGroup = function () {
2699 return this.colDef.enableRowGroup === true;
2700 };
2701 Column.prototype.getMenuTabs = function (defaultValues) {
2702 var menuTabs = this.getColDef().menuTabs;
2703 if (menuTabs == null) {
2704 menuTabs = defaultValues;
2705 }
2706 return menuTabs;
2707 };
2708 // this used to be needed, as previous version of ag-grid had lockPosition as column state,
2709 // so couldn't depend on colDef version.
2710 Column.prototype.isLockPosition = function () {
2711 console.warn('AG Grid: since v21, col.isLockPosition() should not be used, please use col.getColDef().lockPosition instead.');
2712 return this.colDef ? !!this.colDef.lockPosition : false;
2713 };
2714 // this used to be needed, as previous version of ag-grid had lockVisible as column state,
2715 // so couldn't depend on colDef version.
2716 Column.prototype.isLockVisible = function () {
2717 console.warn('AG Grid: since v21, col.isLockVisible() should not be used, please use col.getColDef().lockVisible instead.');
2718 return this.colDef ? !!this.colDef.lockVisible : false;
2719 };
2720 // this used to be needed, as previous version of ag-grid had lockPinned as column state,
2721 // so couldn't depend on colDef version.
2722 Column.prototype.isLockPinned = function () {
2723 console.warn('AG Grid: since v21, col.isLockPinned() should not be used, please use col.getColDef().lockPinned instead.');
2724 return this.colDef ? !!this.colDef.lockPinned : false;
2725 };
2726 // + renderedHeaderCell - for making header cell transparent when moving
2727 Column.EVENT_MOVING_CHANGED = 'movingChanged';
2728 // + renderedCell - changing left position
2729 Column.EVENT_LEFT_CHANGED = 'leftChanged';
2730 // + renderedCell - changing width
2731 Column.EVENT_WIDTH_CHANGED = 'widthChanged';
2732 // + renderedCell - for changing pinned classes
2733 Column.EVENT_LAST_LEFT_PINNED_CHANGED = 'lastLeftPinnedChanged';
2734 Column.EVENT_FIRST_RIGHT_PINNED_CHANGED = 'firstRightPinnedChanged';
2735 // + renderedColumn - for changing visibility icon
2736 Column.EVENT_VISIBLE_CHANGED = 'visibleChanged';
2737 // + every time the filter changes, used in the floating filters
2738 Column.EVENT_FILTER_CHANGED = 'filterChanged';
2739 // + renderedHeaderCell - marks the header with filter icon
2740 Column.EVENT_FILTER_ACTIVE_CHANGED = 'filterActiveChanged';
2741 // + renderedHeaderCell - marks the header with sort icon
2742 Column.EVENT_SORT_CHANGED = 'sortChanged';
2743 Column.EVENT_MENU_VISIBLE_CHANGED = 'menuVisibleChanged';
2744 // + toolpanel, for gui updates
2745 Column.EVENT_ROW_GROUP_CHANGED = 'columnRowGroupChanged';
2746 // + toolpanel, for gui updates
2747 Column.EVENT_PIVOT_CHANGED = 'columnPivotChanged';
2748 // + toolpanel, for gui updates
2749 Column.EVENT_VALUE_CHANGED = 'columnValueChanged';
2750 __decorate([
2751 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptionsWrapper')
2752 ], Column.prototype, "gridOptionsWrapper", void 0);
2753 __decorate([
2754 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnUtils')
2755 ], Column.prototype, "columnUtils", void 0);
2756 __decorate([
2757 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnApi')
2758 ], Column.prototype, "columnApi", void 0);
2759 __decorate([
2760 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridApi')
2761 ], Column.prototype, "gridApi", void 0);
2762 __decorate([
2763 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('context')
2764 ], Column.prototype, "context", void 0);
2765 __decorate([
2766 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
2767 ], Column.prototype, "initialise", null);
2768 return Column;
2769}());
2770
2771
2772
2773
2774
2775/***/ }),
2776/* 11 */
2777/***/ (function(module, __webpack_exports__, __webpack_require__) {
2778
2779"use strict";
2780__webpack_require__.r(__webpack_exports__);
2781/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventService", function() { return EventService; });
2782/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
2783/**
2784 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
2785 * @version v27.3.0
2786 * @link https://www.ag-grid.com/
2787 * @license MIT
2788 */
2789var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2790 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2791 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2792 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2793 return c > 3 && r && Object.defineProperty(target, key, r), r;
2794};
2795var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
2796 return function (target, key) { decorator(target, key, paramIndex); }
2797};
2798
2799var EventService = /** @class */ (function () {
2800 function EventService() {
2801 this.allSyncListeners = new Map();
2802 this.allAsyncListeners = new Map();
2803 this.globalSyncListeners = new Set();
2804 this.globalAsyncListeners = new Set();
2805 this.asyncFunctionsQueue = [];
2806 this.scheduled = false;
2807 // using an object performs better than a Set for the number of different events we have
2808 this.firedEvents = {};
2809 }
2810 // because this class is used both inside the context and outside the context, we do not
2811 // use autowired attributes, as that would be confusing, as sometimes the attributes
2812 // would be wired, and sometimes not.
2813 //
2814 // the global event servers used by AG Grid is autowired by the context once, and this
2815 // setBeans method gets called once.
2816 //
2817 // the times when this class is used outside of the context (eg RowNode has an instance of this
2818 // class) then it is not a bean, and this setBeans method is not called.
2819 EventService.prototype.setBeans = function (loggerFactory, gridOptionsWrapper, frameworkOverrides, globalEventListener) {
2820 if (globalEventListener === void 0) { globalEventListener = null; }
2821 this.frameworkOverrides = frameworkOverrides;
2822 if (globalEventListener) {
2823 var async = gridOptionsWrapper.useAsyncEvents();
2824 this.addGlobalListener(globalEventListener, async);
2825 }
2826 };
2827 EventService.prototype.getListeners = function (eventType, async, autoCreateListenerCollection) {
2828 var listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;
2829 var listeners = listenerMap.get(eventType);
2830 // Note: 'autoCreateListenerCollection' should only be 'true' if a listener is about to be added. For instance
2831 // getListeners() is also called during event dispatch even though no listeners are added. This measure protects
2832 // against 'memory bloat' as empty collections will prevent the RowNode's event service from being removed after
2833 // the RowComp is destroyed, see noRegisteredListenersExist() below.
2834 if (!listeners && autoCreateListenerCollection) {
2835 listeners = new Set();
2836 listenerMap.set(eventType, listeners);
2837 }
2838 return listeners;
2839 };
2840 EventService.prototype.noRegisteredListenersExist = function () {
2841 return this.allSyncListeners.size === 0 && this.allAsyncListeners.size === 0 &&
2842 this.globalSyncListeners.size === 0 && this.globalAsyncListeners.size === 0;
2843 };
2844 EventService.prototype.addEventListener = function (eventType, listener, async) {
2845 if (async === void 0) { async = false; }
2846 this.getListeners(eventType, async, true).add(listener);
2847 };
2848 EventService.prototype.removeEventListener = function (eventType, listener, async) {
2849 if (async === void 0) { async = false; }
2850 var listeners = this.getListeners(eventType, async, false);
2851 if (!listeners) {
2852 return;
2853 }
2854 listeners.delete(listener);
2855 if (listeners.size === 0) {
2856 var listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;
2857 listenerMap.delete(eventType);
2858 }
2859 };
2860 EventService.prototype.addGlobalListener = function (listener, async) {
2861 if (async === void 0) { async = false; }
2862 (async ? this.globalAsyncListeners : this.globalSyncListeners).add(listener);
2863 };
2864 EventService.prototype.removeGlobalListener = function (listener, async) {
2865 if (async === void 0) { async = false; }
2866 (async ? this.globalAsyncListeners : this.globalSyncListeners).delete(listener);
2867 };
2868 EventService.prototype.dispatchEvent = function (event) {
2869 this.dispatchToListeners(event, true);
2870 this.dispatchToListeners(event, false);
2871 this.firedEvents[event.type] = true;
2872 };
2873 EventService.prototype.dispatchEventOnce = function (event) {
2874 if (!this.firedEvents[event.type]) {
2875 this.dispatchEvent(event);
2876 }
2877 };
2878 EventService.prototype.dispatchToListeners = function (event, async) {
2879 var _this = this;
2880 var eventType = event.type;
2881 var processEventListeners = function (listeners) { return listeners.forEach(function (listener) {
2882 if (async) {
2883 _this.dispatchAsync(function () { return listener(event); });
2884 }
2885 else {
2886 listener(event);
2887 }
2888 }); };
2889 var listeners = this.getListeners(eventType, async, false);
2890 if (listeners) {
2891 processEventListeners(listeners);
2892 }
2893 var globalListeners = async ? this.globalAsyncListeners : this.globalSyncListeners;
2894 globalListeners.forEach(function (listener) {
2895 if (async) {
2896 _this.dispatchAsync(function () { return _this.frameworkOverrides.dispatchEvent(eventType, function () { return listener(eventType, event); }, true); });
2897 }
2898 else {
2899 _this.frameworkOverrides.dispatchEvent(eventType, function () { return listener(eventType, event); }, true);
2900 }
2901 });
2902 };
2903 // this gets called inside the grid's thread, for each event that it
2904 // wants to set async. the grid then batches the events into one setTimeout()
2905 // because setTimeout() is an expensive operation. ideally we would have
2906 // each event in it's own setTimeout(), but we batch for performance.
2907 EventService.prototype.dispatchAsync = function (func) {
2908 // add to the queue for executing later in the next VM turn
2909 this.asyncFunctionsQueue.push(func);
2910 // check if timeout is already scheduled. the first time the grid calls
2911 // this within it's thread turn, this should be false, so it will schedule
2912 // the 'flush queue' method the first time it comes here. then the flag is
2913 // set to 'true' so it will know it's already scheduled for subsequent calls.
2914 if (!this.scheduled) {
2915 // if not scheduled, schedule one
2916 window.setTimeout(this.flushAsyncQueue.bind(this), 0);
2917 // mark that it is scheduled
2918 this.scheduled = true;
2919 }
2920 };
2921 // this happens in the next VM turn only, and empties the queue of events
2922 EventService.prototype.flushAsyncQueue = function () {
2923 this.scheduled = false;
2924 // we take a copy, because the event listener could be using
2925 // the grid, which would cause more events, which would be potentially
2926 // added to the queue, so safe to take a copy, the new events will
2927 // get executed in a later VM turn rather than risk updating the
2928 // queue as we are flushing it.
2929 var queueCopy = this.asyncFunctionsQueue.slice();
2930 this.asyncFunctionsQueue = [];
2931 // execute the queue
2932 queueCopy.forEach(function (func) { return func(); });
2933 };
2934 __decorate([
2935 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('loggerFactory')),
2936 __param(1, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('gridOptionsWrapper')),
2937 __param(2, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('frameworkOverrides')),
2938 __param(3, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('globalEventListener'))
2939 ], EventService.prototype, "setBeans", null);
2940 EventService = __decorate([
2941 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('eventService')
2942 ], EventService);
2943 return EventService;
2944}());
2945
2946
2947
2948
2949
2950/***/ }),
2951/* 12 */
2952/***/ (function(module, __webpack_exports__, __webpack_require__) {
2953
2954"use strict";
2955__webpack_require__.r(__webpack_exports__);
2956/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Context", function() { return Context; });
2957/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreConstruct", function() { return PreConstruct; });
2958/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostConstruct", function() { return PostConstruct; });
2959/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreDestroy", function() { return PreDestroy; });
2960/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bean", function() { return Bean; });
2961/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Autowired", function() { return Autowired; });
2962/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Optional", function() { return Optional; });
2963/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qualifier", function() { return Qualifier; });
2964/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
2965/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
2966/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
2967/**
2968 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
2969 * @version v27.3.0
2970 * @link https://www.ag-grid.com/
2971 * @license MIT
2972 */
2973
2974
2975
2976var Context = /** @class */ (function () {
2977 function Context(params, logger) {
2978 this.beanWrappers = {};
2979 this.destroyed = false;
2980 if (!params || !params.beanClasses) {
2981 return;
2982 }
2983 this.contextParams = params;
2984 this.logger = logger;
2985 this.logger.log(">> creating ag-Application Context");
2986 this.createBeans();
2987 var beanInstances = this.getBeanInstances();
2988 this.wireBeans(beanInstances);
2989 this.logger.log(">> ag-Application Context ready - component is alive");
2990 }
2991 Context.prototype.getBeanInstances = function () {
2992 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["values"])(this.beanWrappers).map(function (beanEntry) { return beanEntry.beanInstance; });
2993 };
2994 Context.prototype.createBean = function (bean, afterPreCreateCallback) {
2995 if (!bean) {
2996 throw Error("Can't wire to bean since it is null");
2997 }
2998 this.wireBeans([bean], afterPreCreateCallback);
2999 return bean;
3000 };
3001 Context.prototype.wireBeans = function (beanInstances, afterPreCreateCallback) {
3002 this.autoWireBeans(beanInstances);
3003 this.methodWireBeans(beanInstances);
3004 this.callLifeCycleMethods(beanInstances, 'preConstructMethods');
3005 // the callback sets the attributes, so the component has access to attributes
3006 // before postConstruct methods in the component are executed
3007 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["exists"])(afterPreCreateCallback)) {
3008 beanInstances.forEach(afterPreCreateCallback);
3009 }
3010 this.callLifeCycleMethods(beanInstances, 'postConstructMethods');
3011 };
3012 Context.prototype.createBeans = function () {
3013 var _this = this;
3014 // register all normal beans
3015 this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this));
3016 // register override beans, these will overwrite beans above of same name
3017 // instantiate all beans - overridden beans will be left out
3018 Object(_utils_object__WEBPACK_IMPORTED_MODULE_1__["iterateObject"])(this.beanWrappers, function (key, beanEntry) {
3019 var constructorParamsMeta;
3020 if (beanEntry.bean.__agBeanMetaData && beanEntry.bean.__agBeanMetaData.autowireMethods && beanEntry.bean.__agBeanMetaData.autowireMethods.agConstructor) {
3021 constructorParamsMeta = beanEntry.bean.__agBeanMetaData.autowireMethods.agConstructor;
3022 }
3023 var constructorParams = _this.getBeansForParameters(constructorParamsMeta, beanEntry.bean.name);
3024 var newInstance = applyToConstructor(beanEntry.bean, constructorParams);
3025 beanEntry.beanInstance = newInstance;
3026 });
3027 var createdBeanNames = Object.keys(this.beanWrappers).join(', ');
3028 this.logger.log("created beans: " + createdBeanNames);
3029 };
3030 // tslint:disable-next-line
3031 Context.prototype.createBeanWrapper = function (BeanClass) {
3032 var metaData = BeanClass.__agBeanMetaData;
3033 if (!metaData) {
3034 var beanName = void 0;
3035 if (BeanClass.prototype.constructor) {
3036 beanName = Object(_utils_function__WEBPACK_IMPORTED_MODULE_2__["getFunctionName"])(BeanClass.prototype.constructor);
3037 }
3038 else {
3039 beanName = "" + BeanClass;
3040 }
3041 console.error("Context item " + beanName + " is not a bean");
3042 return;
3043 }
3044 var beanEntry = {
3045 bean: BeanClass,
3046 beanInstance: null,
3047 beanName: metaData.beanName
3048 };
3049 this.beanWrappers[metaData.beanName] = beanEntry;
3050 };
3051 Context.prototype.autoWireBeans = function (beanInstances) {
3052 var _this = this;
3053 beanInstances.forEach(function (beanInstance) {
3054 _this.forEachMetaDataInHierarchy(beanInstance, function (metaData, beanName) {
3055 var attributes = metaData.agClassAttributes;
3056 if (!attributes) {
3057 return;
3058 }
3059 attributes.forEach(function (attribute) {
3060 var otherBean = _this.lookupBeanInstance(beanName, attribute.beanName, attribute.optional);
3061 beanInstance[attribute.attributeName] = otherBean;
3062 });
3063 });
3064 });
3065 };
3066 Context.prototype.methodWireBeans = function (beanInstances) {
3067 var _this = this;
3068 beanInstances.forEach(function (beanInstance) {
3069 _this.forEachMetaDataInHierarchy(beanInstance, function (metaData, beanName) {
3070 Object(_utils_object__WEBPACK_IMPORTED_MODULE_1__["iterateObject"])(metaData.autowireMethods, function (methodName, wireParams) {
3071 // skip constructor, as this is dealt with elsewhere
3072 if (methodName === "agConstructor") {
3073 return;
3074 }
3075 var initParams = _this.getBeansForParameters(wireParams, beanName);
3076 beanInstance[methodName].apply(beanInstance, initParams);
3077 });
3078 });
3079 });
3080 };
3081 Context.prototype.forEachMetaDataInHierarchy = function (beanInstance, callback) {
3082 var prototype = Object.getPrototypeOf(beanInstance);
3083 while (prototype != null) {
3084 var constructor = prototype.constructor;
3085 if (constructor.hasOwnProperty('__agBeanMetaData')) {
3086 var metaData = constructor.__agBeanMetaData;
3087 var beanName = this.getBeanName(constructor);
3088 callback(metaData, beanName);
3089 }
3090 prototype = Object.getPrototypeOf(prototype);
3091 }
3092 };
3093 Context.prototype.getBeanName = function (constructor) {
3094 if (constructor.__agBeanMetaData && constructor.__agBeanMetaData.beanName) {
3095 return constructor.__agBeanMetaData.beanName;
3096 }
3097 var constructorString = constructor.toString();
3098 var beanName = constructorString.substring(9, constructorString.indexOf("("));
3099 return beanName;
3100 };
3101 Context.prototype.getBeansForParameters = function (parameters, beanName) {
3102 var _this = this;
3103 var beansList = [];
3104 if (parameters) {
3105 Object(_utils_object__WEBPACK_IMPORTED_MODULE_1__["iterateObject"])(parameters, function (paramIndex, otherBeanName) {
3106 var otherBean = _this.lookupBeanInstance(beanName, otherBeanName);
3107 beansList[Number(paramIndex)] = otherBean;
3108 });
3109 }
3110 return beansList;
3111 };
3112 Context.prototype.lookupBeanInstance = function (wiringBean, beanName, optional) {
3113 if (optional === void 0) { optional = false; }
3114 if (beanName === "context") {
3115 return this;
3116 }
3117 if (this.contextParams.providedBeanInstances && this.contextParams.providedBeanInstances.hasOwnProperty(beanName)) {
3118 return this.contextParams.providedBeanInstances[beanName];
3119 }
3120 var beanEntry = this.beanWrappers[beanName];
3121 if (beanEntry) {
3122 return beanEntry.beanInstance;
3123 }
3124 if (!optional) {
3125 console.error("AG Grid: unable to find bean reference " + beanName + " while initialising " + wiringBean);
3126 }
3127 return null;
3128 };
3129 Context.prototype.callLifeCycleMethods = function (beanInstances, lifeCycleMethod) {
3130 var _this = this;
3131 beanInstances.forEach(function (beanInstance) { return _this.callLifeCycleMethodsOnBean(beanInstance, lifeCycleMethod); });
3132 };
3133 Context.prototype.callLifeCycleMethodsOnBean = function (beanInstance, lifeCycleMethod, methodToIgnore) {
3134 // putting all methods into a map removes duplicates
3135 var allMethods = {};
3136 // dump methods from each level of the metadata hierarchy
3137 this.forEachMetaDataInHierarchy(beanInstance, function (metaData) {
3138 var methods = metaData[lifeCycleMethod];
3139 if (methods) {
3140 methods.forEach(function (methodName) {
3141 if (methodName != methodToIgnore) {
3142 allMethods[methodName] = true;
3143 }
3144 });
3145 }
3146 });
3147 var allMethodsList = Object.keys(allMethods);
3148 allMethodsList.forEach(function (methodName) { return beanInstance[methodName](); });
3149 };
3150 Context.prototype.getBean = function (name) {
3151 return this.lookupBeanInstance("getBean", name, true);
3152 };
3153 Context.prototype.destroy = function () {
3154 if (this.destroyed) {
3155 return;
3156 }
3157 this.logger.log(">> Shutting down ag-Application Context");
3158 var beanInstances = this.getBeanInstances();
3159 this.destroyBeans(beanInstances);
3160 this.contextParams.providedBeanInstances = null;
3161 this.destroyed = true;
3162 this.logger.log(">> ag-Application Context shut down - component is dead");
3163 };
3164 Context.prototype.destroyBean = function (bean) {
3165 if (!bean) {
3166 return;
3167 }
3168 this.destroyBeans([bean]);
3169 };
3170 Context.prototype.destroyBeans = function (beans) {
3171 var _this = this;
3172 if (!beans) {
3173 return [];
3174 }
3175 beans.forEach(function (bean) {
3176 _this.callLifeCycleMethodsOnBean(bean, 'preDestroyMethods', 'destroy');
3177 // call destroy() explicitly if it exists
3178 var beanAny = bean;
3179 if (typeof beanAny.destroy === 'function') {
3180 beanAny.destroy();
3181 }
3182 });
3183 return [];
3184 };
3185 return Context;
3186}());
3187
3188// taken from: http://stackoverflow.com/questions/3362471/how-can-i-call-a-javascript-constructor-using-call-or-apply
3189// allows calling 'apply' on a constructor
3190function applyToConstructor(constructor, argArray) {
3191 var args = [null].concat(argArray);
3192 var factoryFunction = constructor.bind.apply(constructor, args);
3193 return new factoryFunction();
3194}
3195function PreConstruct(target, methodName, descriptor) {
3196 var props = getOrCreateProps(target.constructor);
3197 if (!props.preConstructMethods) {
3198 props.preConstructMethods = [];
3199 }
3200 props.preConstructMethods.push(methodName);
3201}
3202function PostConstruct(target, methodName, descriptor) {
3203 var props = getOrCreateProps(target.constructor);
3204 if (!props.postConstructMethods) {
3205 props.postConstructMethods = [];
3206 }
3207 props.postConstructMethods.push(methodName);
3208}
3209function PreDestroy(target, methodName, descriptor) {
3210 var props = getOrCreateProps(target.constructor);
3211 if (!props.preDestroyMethods) {
3212 props.preDestroyMethods = [];
3213 }
3214 props.preDestroyMethods.push(methodName);
3215}
3216function Bean(beanName) {
3217 return function (classConstructor) {
3218 var props = getOrCreateProps(classConstructor);
3219 props.beanName = beanName;
3220 };
3221}
3222function Autowired(name) {
3223 return function (target, propertyKey, descriptor) {
3224 autowiredFunc(target, name, false, target, propertyKey, null);
3225 };
3226}
3227function Optional(name) {
3228 return function (target, propertyKey, descriptor) {
3229 autowiredFunc(target, name, true, target, propertyKey, null);
3230 };
3231}
3232function autowiredFunc(target, name, optional, classPrototype, methodOrAttributeName, index) {
3233 if (name === null) {
3234 console.error("AG Grid: Autowired name should not be null");
3235 return;
3236 }
3237 if (typeof index === "number") {
3238 console.error("AG Grid: Autowired should be on an attribute");
3239 return;
3240 }
3241 // it's an attribute on the class
3242 var props = getOrCreateProps(target.constructor);
3243 if (!props.agClassAttributes) {
3244 props.agClassAttributes = [];
3245 }
3246 props.agClassAttributes.push({
3247 attributeName: methodOrAttributeName,
3248 beanName: name,
3249 optional: optional
3250 });
3251}
3252function Qualifier(name) {
3253 return function (classPrototype, methodOrAttributeName, index) {
3254 var constructor = typeof classPrototype == "function" ? classPrototype : classPrototype.constructor;
3255 var props;
3256 if (typeof index === "number") {
3257 // it's a parameter on a method
3258 var methodName = void 0;
3259 if (methodOrAttributeName) {
3260 props = getOrCreateProps(constructor);
3261 methodName = methodOrAttributeName;
3262 }
3263 else {
3264 props = getOrCreateProps(constructor);
3265 methodName = "agConstructor";
3266 }
3267 if (!props.autowireMethods) {
3268 props.autowireMethods = {};
3269 }
3270 if (!props.autowireMethods[methodName]) {
3271 props.autowireMethods[methodName] = {};
3272 }
3273 props.autowireMethods[methodName][index] = name;
3274 }
3275 };
3276}
3277function getOrCreateProps(target) {
3278 if (!target.hasOwnProperty("__agBeanMetaData")) {
3279 target.__agBeanMetaData = {};
3280 }
3281 return target.__agBeanMetaData;
3282}
3283
3284
3285
3286
3287/***/ }),
3288/* 13 */
3289/***/ (function(module, __webpack_exports__, __webpack_require__) {
3290
3291"use strict";
3292__webpack_require__.r(__webpack_exports__);
3293/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterateObject", function() { return iterateObject; });
3294/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneObject", function() { return cloneObject; });
3295/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepCloneObject", function() { return deepCloneObject; });
3296/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepCloneDefinition", function() { return deepCloneDefinition; });
3297/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getProperty", function() { return getProperty; });
3298/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setProperty", function() { return setProperty; });
3299/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copyPropertiesIfPresent", function() { return copyPropertiesIfPresent; });
3300/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copyPropertyIfPresent", function() { return copyPropertyIfPresent; });
3301/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllKeysInObjects", function() { return getAllKeysInObjects; });
3302/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllValuesInObject", function() { return getAllValuesInObject; });
3303/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeDeep", function() { return mergeDeep; });
3304/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "missingOrEmptyObject", function() { return missingOrEmptyObject; });
3305/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; });
3306/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
3307/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepFreeze", function() { return deepFreeze; });
3308/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getValueUsingField", function() { return getValueUsingField; });
3309/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAllReferences", function() { return removeAllReferences; });
3310/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNonNullObject", function() { return isNonNullObject; });
3311/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
3312/**
3313 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3314 * @version v27.3.0
3315 * @link https://www.ag-grid.com/
3316 * @license MIT
3317 */
3318
3319function iterateObject(object, callback) {
3320 if (object == null) {
3321 return;
3322 }
3323 if (Array.isArray(object)) {
3324 object.forEach(function (value, index) { return callback("" + index, value); });
3325 }
3326 else {
3327 Object.keys(object).forEach(function (key) { return callback(key, object[key]); });
3328 }
3329}
3330function cloneObject(object) {
3331 var copy = {};
3332 var keys = Object.keys(object);
3333 for (var i = 0; i < keys.length; i++) {
3334 var key = keys[i];
3335 var value = object[key];
3336 copy[key] = value;
3337 }
3338 return copy;
3339}
3340function deepCloneObject(object) {
3341 return JSON.parse(JSON.stringify(object));
3342}
3343// returns copy of an object, doing a deep clone of any objects with that object.
3344// this is used for eg creating copies of Column Definitions, where we want to
3345// deep copy all objects, but do not want to deep copy functions (eg when user provides
3346// a function or class for colDef.cellRenderer)
3347function deepCloneDefinition(object, keysToSkip) {
3348 if (!object) {
3349 return;
3350 }
3351 var obj = object;
3352 var res = {};
3353 Object.keys(obj).forEach(function (key) {
3354 if (keysToSkip && keysToSkip.indexOf(key) >= 0) {
3355 return;
3356 }
3357 var value = obj[key];
3358 // 'simple object' means a bunch of key/value pairs, eg {filter: 'myFilter'}. it does
3359 // NOT include the following:
3360 // 1) arrays
3361 // 2) functions or classes (eg ColumnAPI instance)
3362 var sourceIsSimpleObject = isNonNullObject(value) && value.constructor === Object;
3363 if (sourceIsSimpleObject) {
3364 res[key] = deepCloneDefinition(value);
3365 }
3366 else {
3367 res[key] = value;
3368 }
3369 });
3370 return res;
3371}
3372function getProperty(object, key) {
3373 return object[key];
3374}
3375function setProperty(object, key, value) {
3376 object[key] = value;
3377}
3378/**
3379 * Will copy the specified properties from `source` into the equivalent properties on `target`, ignoring properties with
3380 * a value of `undefined`.
3381 */
3382function copyPropertiesIfPresent(source, target) {
3383 var properties = [];
3384 for (var _i = 2; _i < arguments.length; _i++) {
3385 properties[_i - 2] = arguments[_i];
3386 }
3387 properties.forEach(function (p) { return copyPropertyIfPresent(source, target, p); });
3388}
3389/**
3390 * Will copy the specified property from `source` into the equivalent property on `target`, unless the property has a
3391 * value of `undefined`. If a transformation is provided, it will be applied to the value before being set on `target`.
3392 */
3393function copyPropertyIfPresent(source, target, property, transform) {
3394 var value = getProperty(source, property);
3395 if (value !== undefined) {
3396 setProperty(target, property, transform ? transform(value) : value);
3397 }
3398}
3399function getAllKeysInObjects(objects) {
3400 var allValues = {};
3401 objects.filter(function (obj) { return obj != null; }).forEach(function (obj) {
3402 Object.keys(obj).forEach(function (key) { return allValues[key] = null; });
3403 });
3404 return Object.keys(allValues);
3405}
3406function getAllValuesInObject(obj) {
3407 if (!obj) {
3408 return [];
3409 }
3410 var anyObject = Object;
3411 if (typeof anyObject.values === 'function') {
3412 return anyObject.values(obj);
3413 }
3414 var ret = [];
3415 for (var key in obj) {
3416 if (obj.hasOwnProperty(key) && obj.propertyIsEnumerable(key)) {
3417 ret.push(obj[key]);
3418 }
3419 }
3420 return ret;
3421}
3422function mergeDeep(dest, source, copyUndefined, makeCopyOfSimpleObjects) {
3423 if (copyUndefined === void 0) { copyUndefined = true; }
3424 if (makeCopyOfSimpleObjects === void 0) { makeCopyOfSimpleObjects = false; }
3425 if (!Object(_generic__WEBPACK_IMPORTED_MODULE_0__["exists"])(source)) {
3426 return;
3427 }
3428 iterateObject(source, function (key, sourceValue) {
3429 var destValue = dest[key];
3430 if (destValue === sourceValue) {
3431 return;
3432 }
3433 // when creating params, we don't want to just copy objects over. otherwise merging ColDefs (eg DefaultColDef
3434 // and Column Types) would result in params getting shared between objects.
3435 // by putting an empty value into destValue first, it means we end up copying over values from
3436 // the source object, rather than just copying in the source object in it's entirety.
3437 if (makeCopyOfSimpleObjects) {
3438 var objectIsDueToBeCopied = destValue == null && sourceValue != null;
3439 if (objectIsDueToBeCopied) {
3440 // 'simple object' means a bunch of key/value pairs, eg {filter: 'myFilter'}, as opposed
3441 // to a Class instance (such as ColumnAPI instance).
3442 var sourceIsSimpleObject = typeof sourceValue === 'object' && sourceValue.constructor === Object;
3443 var dontCopy = sourceIsSimpleObject;
3444 if (dontCopy) {
3445 destValue = {};
3446 dest[key] = destValue;
3447 }
3448 }
3449 }
3450 if (isNonNullObject(sourceValue) && isNonNullObject(destValue) && !Array.isArray(destValue)) {
3451 mergeDeep(destValue, sourceValue, copyUndefined, makeCopyOfSimpleObjects);
3452 }
3453 else if (copyUndefined || sourceValue !== undefined) {
3454 dest[key] = sourceValue;
3455 }
3456 });
3457}
3458function missingOrEmptyObject(value) {
3459 return Object(_generic__WEBPACK_IMPORTED_MODULE_0__["missing"])(value) || Object.keys(value).length === 0;
3460}
3461function get(source, expression, defaultValue) {
3462 if (source == null) {
3463 return defaultValue;
3464 }
3465 var keys = expression.split('.');
3466 var objectToRead = source;
3467 while (keys.length > 1) {
3468 objectToRead = objectToRead[keys.shift()];
3469 if (objectToRead == null) {
3470 return defaultValue;
3471 }
3472 }
3473 var value = objectToRead[keys[0]];
3474 return value != null ? value : defaultValue;
3475}
3476function set(target, expression, value) {
3477 if (target == null) {
3478 return;
3479 }
3480 var keys = expression.split('.');
3481 var objectToUpdate = target;
3482 while (keys.length > 1) {
3483 objectToUpdate = objectToUpdate[keys.shift()];
3484 if (objectToUpdate == null) {
3485 return;
3486 }
3487 }
3488 objectToUpdate[keys[0]] = value;
3489}
3490function deepFreeze(object) {
3491 Object.freeze(object);
3492 Object(_generic__WEBPACK_IMPORTED_MODULE_0__["values"])(object).forEach(function (v) {
3493 if (isNonNullObject(v) || typeof v === 'function') {
3494 deepFreeze(v);
3495 }
3496 });
3497 return object;
3498}
3499function getValueUsingField(data, field, fieldContainsDots) {
3500 if (!field || !data) {
3501 return;
3502 }
3503 // if no '.', then it's not a deep value
3504 if (!fieldContainsDots) {
3505 return data[field];
3506 }
3507 // otherwise it is a deep value, so need to dig for it
3508 var fields = field.split('.');
3509 var currentObject = data;
3510 for (var i = 0; i < fields.length; i++) {
3511 if (currentObject == null) {
3512 return undefined;
3513 }
3514 currentObject = currentObject[fields[i]];
3515 }
3516 return currentObject;
3517}
3518// used by ColumnAPI and GridAPI to remove all references, so keeping grid in memory resulting in a
3519// memory leak if user is not disposing of the GridAPI or ColumnApi references
3520function removeAllReferences(obj, objectName) {
3521 Object.keys(obj).forEach(function (key) {
3522 var value = obj[key];
3523 // we want to replace all the @autowired services, which are objects. any simple types (boolean, string etc)
3524 // we don't care about
3525 if (typeof value === 'object') {
3526 obj[key] = undefined;
3527 }
3528 });
3529 var proto = Object.getPrototypeOf(obj);
3530 var properties = {};
3531 Object.keys(proto).forEach(function (key) {
3532 var value = proto[key];
3533 // leave all basic types - this is needed for GridAPI to leave the "destroyed: boolean" attribute alone
3534 if (typeof value === 'function') {
3535 var func = function () {
3536 console.warn("AG Grid: " + objectName + " function " + key + "() cannot be called as the grid has been destroyed.\n Please don't call grid API functions on destroyed grids - as a matter of fact you shouldn't\n be keeping the API reference, your application has a memory leak! Remove the API reference\n when the grid is destroyed.");
3537 };
3538 properties[key] = { value: func, writable: true };
3539 }
3540 });
3541 Object.defineProperties(obj, properties);
3542}
3543function isNonNullObject(value) {
3544 return typeof value === 'object' && value !== null;
3545}
3546
3547
3548
3549
3550/***/ }),
3551/* 14 */
3552/***/ (function(module, __webpack_exports__, __webpack_require__) {
3553
3554"use strict";
3555__webpack_require__.r(__webpack_exports__);
3556/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doOnce", function() { return doOnce; });
3557/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFunctionName", function() { return getFunctionName; });
3558/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFunctionParameters", function() { return getFunctionParameters; });
3559/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; });
3560/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "executeInAWhile", function() { return executeInAWhile; });
3561/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "executeNextVMTurn", function() { return executeNextVMTurn; });
3562/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "executeAfter", function() { return executeAfter; });
3563/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
3564/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
3565/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "waitUntil", function() { return waitUntil; });
3566/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
3567/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "callIfPresent", function() { return callIfPresent; });
3568/**
3569 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3570 * @version v27.3.0
3571 * @link https://www.ag-grid.com/
3572 * @license MIT
3573 */
3574var FUNCTION_STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
3575var FUNCTION_ARGUMENT_NAMES = /([^\s,]+)/g;
3576var doOnceFlags = {};
3577/**
3578 * If the key was passed before, then doesn't execute the func
3579 * @param {Function} func
3580 * @param {string} key
3581 */
3582function doOnce(func, key) {
3583 if (doOnceFlags[key]) {
3584 return;
3585 }
3586 func();
3587 doOnceFlags[key] = true;
3588}
3589function getFunctionName(funcConstructor) {
3590 // for every other browser in the world
3591 if (funcConstructor.name) {
3592 return funcConstructor.name;
3593 }
3594 // for the pestilence that is ie11
3595 var matches = /function\s+([^\(]+)/.exec(funcConstructor.toString());
3596 return matches && matches.length === 2 ? matches[1].trim() : null;
3597}
3598/** @deprecated */
3599function getFunctionParameters(func) {
3600 var fnStr = func.toString().replace(FUNCTION_STRIP_COMMENTS, '');
3601 return fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(FUNCTION_ARGUMENT_NAMES) || [];
3602}
3603function isFunction(val) {
3604 return !!(val && val.constructor && val.call && val.apply);
3605}
3606function executeInAWhile(funcs) {
3607 executeAfter(funcs, 400);
3608}
3609var executeNextVMTurnFuncs = [];
3610var executeNextVMTurnPending = false;
3611function executeNextVMTurn(func) {
3612 executeNextVMTurnFuncs.push(func);
3613 if (executeNextVMTurnPending) {
3614 return;
3615 }
3616 executeNextVMTurnPending = true;
3617 window.setTimeout(function () {
3618 var funcsCopy = executeNextVMTurnFuncs.slice();
3619 executeNextVMTurnFuncs.length = 0;
3620 executeNextVMTurnPending = false;
3621 funcsCopy.forEach(function (func) { return func(); });
3622 }, 0);
3623}
3624function executeAfter(funcs, milliseconds) {
3625 if (milliseconds === void 0) { milliseconds = 0; }
3626 if (funcs.length > 0) {
3627 window.setTimeout(function () { return funcs.forEach(function (func) { return func(); }); }, milliseconds);
3628 }
3629}
3630/**
3631 * from https://stackoverflow.com/questions/24004791/can-someone-explain-the-debounce-function-in-javascript
3632 * @param {Function} func The function to be debounced
3633 * @param {number} wait The time in ms to debounce
3634 * @param {boolean} immediate If it should run immediately or wait for the initial debounce delay
3635 * @return {Function} The debounced function
3636 */
3637function debounce(func, wait, immediate) {
3638 if (immediate === void 0) { immediate = false; }
3639 // 'private' variable for instance
3640 // The returned function will be able to reference this due to closure.
3641 // Each call to the returned function will share this common timer.
3642 var timeout;
3643 // Calling debounce returns a new anonymous function
3644 return function () {
3645 var args = [];
3646 for (var _i = 0; _i < arguments.length; _i++) {
3647 args[_i] = arguments[_i];
3648 }
3649 // reference the context and args for the setTimeout function
3650 var context = this;
3651 // Should the function be called now? If immediate is true
3652 // and not already in a timeout then the answer is: Yes
3653 var callNow = immediate && !timeout;
3654 // This is the basic debounce behaviour where you can call this
3655 // function several times, but it will only execute once
3656 // [before or after imposing a delay].
3657 // Each time the returned function is called, the timer starts over.
3658 window.clearTimeout(timeout);
3659 // Set the new timeout
3660 timeout = window.setTimeout(function () {
3661 // Inside the timeout function, clear the timeout variable
3662 // which will let the next execution run when in 'immediate' mode
3663 timeout = null;
3664 // Check if the function already ran with the immediate flag
3665 if (!immediate) {
3666 // Call the original function with apply
3667 // apply lets you define the 'this' object as well as the arguments
3668 // (both captured before setTimeout)
3669 func.apply(context, args);
3670 }
3671 }, wait);
3672 // Immediate mode and no wait timer? Execute the function..
3673 if (callNow) {
3674 func.apply(context, args);
3675 }
3676 };
3677}
3678/**
3679 * @param {Function} func The function to be throttled
3680 * @param {number} wait The time in ms to throttle
3681 * @return {Function} The throttled function
3682 */
3683function throttle(func, wait) {
3684 var previousCall = 0;
3685 return function () {
3686 var args = [];
3687 for (var _i = 0; _i < arguments.length; _i++) {
3688 args[_i] = arguments[_i];
3689 }
3690 var context = this;
3691 var currentCall = new Date().getTime();
3692 if (currentCall - previousCall < wait) {
3693 return;
3694 }
3695 previousCall = currentCall;
3696 func.apply(context, args);
3697 };
3698}
3699function waitUntil(condition, callback, timeout, timeoutMessage) {
3700 if (timeout === void 0) { timeout = 100; }
3701 var timeStamp = new Date().getTime();
3702 var interval = null;
3703 var executed = false;
3704 var internalCallback = function () {
3705 var reachedTimeout = ((new Date().getTime()) - timeStamp) > timeout;
3706 if (condition() || reachedTimeout) {
3707 callback();
3708 executed = true;
3709 if (interval != null) {
3710 window.clearInterval(interval);
3711 interval = null;
3712 }
3713 if (reachedTimeout && timeoutMessage) {
3714 console.warn(timeoutMessage);
3715 }
3716 }
3717 };
3718 internalCallback();
3719 if (!executed) {
3720 interval = window.setInterval(internalCallback, 10);
3721 }
3722}
3723function compose() {
3724 var fns = [];
3725 for (var _i = 0; _i < arguments.length; _i++) {
3726 fns[_i] = arguments[_i];
3727 }
3728 return function (arg) { return fns.reduce(function (composed, f) { return f(composed); }, arg); };
3729}
3730function callIfPresent(func) {
3731 if (func) {
3732 func();
3733 }
3734}
3735
3736
3737
3738
3739/***/ }),
3740/* 15 */
3741/***/ (function(module, __webpack_exports__, __webpack_require__) {
3742
3743"use strict";
3744__webpack_require__.r(__webpack_exports__);
3745/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Constants", function() { return Constants; });
3746/**
3747 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3748 * @version v27.3.0
3749 * @link https://www.ag-grid.com/
3750 * @license MIT
3751 */
3752var Constants = /** @class */ (function () {
3753 function Constants() {
3754 }
3755 Constants.ROW_BUFFER_SIZE = 10;
3756 Constants.LAYOUT_INTERVAL = 500;
3757 Constants.BATCH_WAIT_MILLIS = 50;
3758 Constants.EXPORT_TYPE_DRAG_COPY = 'dragCopy';
3759 Constants.EXPORT_TYPE_CLIPBOARD = 'clipboard';
3760 Constants.EXPORT_TYPE_EXCEL = 'excel';
3761 Constants.EXPORT_TYPE_CSV = 'csv';
3762 Constants.ROW_MODEL_TYPE_INFINITE = 'infinite';
3763 Constants.ROW_MODEL_TYPE_VIEWPORT = 'viewport';
3764 Constants.ROW_MODEL_TYPE_CLIENT_SIDE = 'clientSide';
3765 Constants.ROW_MODEL_TYPE_SERVER_SIDE = 'serverSide';
3766 Constants.ALWAYS = 'always';
3767 Constants.ONLY_WHEN_GROUPING = 'onlyWhenGrouping';
3768 Constants.PINNED_TOP = 'top';
3769 Constants.PINNED_BOTTOM = 'bottom';
3770 Constants.DOM_LAYOUT_NORMAL = 'normal';
3771 Constants.DOM_LAYOUT_PRINT = 'print';
3772 Constants.DOM_LAYOUT_AUTO_HEIGHT = 'autoHeight';
3773 Constants.GROUP_AUTO_COLUMN_ID = 'ag-Grid-AutoColumn';
3774 Constants.SOURCE_PASTE = 'paste';
3775 Constants.PINNED_RIGHT = 'right';
3776 Constants.PINNED_LEFT = 'left';
3777 Constants.SORT_ASC = 'asc';
3778 Constants.SORT_DESC = 'desc';
3779 Constants.INPUT_SELECTOR = 'input, select, button, textarea';
3780 Constants.FOCUSABLE_SELECTOR = '[tabindex], input, select, button, textarea';
3781 Constants.FOCUSABLE_EXCLUDE = '.ag-hidden, .ag-hidden *, [disabled], .ag-disabled, .ag-disabled *';
3782 return Constants;
3783}());
3784
3785
3786
3787
3788
3789/***/ }),
3790/* 16 */
3791/***/ (function(module, __webpack_exports__, __webpack_require__) {
3792
3793"use strict";
3794__webpack_require__.r(__webpack_exports__);
3795/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleNames", function() { return ModuleNames; });
3796/**
3797 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3798 * @version v27.3.0
3799 * @link https://www.ag-grid.com/
3800 * @license MIT
3801 */
3802var ModuleNames;
3803(function (ModuleNames) {
3804 // when using modules, user references this
3805 ModuleNames["CommunityCoreModule"] = "@ag-grid-community/core";
3806 // when not using modules, user references this
3807 ModuleNames["CommunityAllModules"] = "@ag-grid-community/all";
3808 // community modules
3809 ModuleNames["InfiniteRowModelModule"] = "@ag-grid-community/infinite-row-model";
3810 ModuleNames["ClientSideRowModelModule"] = "@ag-grid-community/client-side-row-model";
3811 ModuleNames["CsvExportModule"] = "@ag-grid-community/csv-export";
3812 // enterprise core - users never import on this, but other enterprise modules do
3813 ModuleNames["EnterpriseCoreModule"] = "@ag-grid-enterprise/core";
3814 // when not using modules, user references this
3815 ModuleNames["EnterpriseAllModules"] = "@ag-grid-enterprise/all";
3816 // enterprise modules
3817 ModuleNames["RowGroupingModule"] = "@ag-grid-enterprise/row-grouping";
3818 ModuleNames["ColumnToolPanelModule"] = "@ag-grid-enterprise/column-tool-panel";
3819 ModuleNames["FiltersToolPanelModule"] = "@ag-grid-enterprise/filter-tool-panel";
3820 ModuleNames["MenuModule"] = "@ag-grid-enterprise/menu";
3821 ModuleNames["SetFilterModule"] = "@ag-grid-enterprise/set-filter";
3822 ModuleNames["MultiFilterModule"] = "@ag-grid-enterprise/multi-filter";
3823 ModuleNames["StatusBarModule"] = "@ag-grid-enterprise/status-bar";
3824 ModuleNames["SideBarModule"] = "@ag-grid-enterprise/side-bar";
3825 ModuleNames["RangeSelectionModule"] = "@ag-grid-enterprise/range-selection";
3826 ModuleNames["MasterDetailModule"] = "@ag-grid-enterprise/master-detail";
3827 ModuleNames["RichSelectModule"] = "@ag-grid-enterprise/rich-select";
3828 ModuleNames["GridChartsModule"] = "@ag-grid-enterprise/charts";
3829 ModuleNames["ViewportRowModelModule"] = "@ag-grid-enterprise/viewport-row-model";
3830 ModuleNames["ServerSideRowModelModule"] = "@ag-grid-enterprise/server-side-row-model";
3831 ModuleNames["ExcelExportModule"] = "@ag-grid-enterprise/excel-export";
3832 ModuleNames["ClipboardModule"] = "@ag-grid-enterprise/clipboard";
3833 ModuleNames["SparklinesModule"] = "@ag-grid-enterprise/sparklines";
3834 // framework wrappers currently don't provide beans, comps etc, so no need to be modules,
3835 // however i argue they should be as in theory they 'could' provide beans etc
3836 ModuleNames["AngularModule"] = "@ag-grid-community/angular";
3837 ModuleNames["ReactModule"] = "@ag-grid-community/react";
3838 ModuleNames["VueModule"] = "@ag-grid-community/vue";
3839 ModuleNames["PolymerModule"] = "@ag-grid-community/polymer";
3840 // and then this, which is definitely not a grid module, as it should not have any dependency
3841 // on the grid (ie shouldn't even reference the Module interface)
3842 // ChartsModule = "@ag-grid-community/charts-core",
3843})(ModuleNames || (ModuleNames = {}));
3844
3845
3846
3847
3848/***/ }),
3849/* 17 */
3850/***/ (function(module, __webpack_exports__, __webpack_require__) {
3851
3852"use strict";
3853__webpack_require__.r(__webpack_exports__);
3854/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleRegistry", function() { return ModuleRegistry; });
3855/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
3856/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
3857/**
3858 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3859 * @version v27.3.0
3860 * @link https://www.ag-grid.com/
3861 * @license MIT
3862 */
3863
3864
3865var ModuleRegistry = /** @class */ (function () {
3866 function ModuleRegistry() {
3867 }
3868 ModuleRegistry.register = function (module, moduleBased) {
3869 if (moduleBased === void 0) { moduleBased = true; }
3870 ModuleRegistry.modulesMap[module.moduleName] = module;
3871 if (ModuleRegistry.moduleBased === undefined) {
3872 ModuleRegistry.moduleBased = moduleBased;
3873 }
3874 else {
3875 if (ModuleRegistry.moduleBased !== moduleBased) {
3876 Object(_utils_function__WEBPACK_IMPORTED_MODULE_0__["doOnce"])(function () {
3877 console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms.");
3878 console.warn('Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.');
3879 }, 'ModulePackageCheck');
3880 }
3881 }
3882 };
3883 // noinspection JSUnusedGlobalSymbols
3884 ModuleRegistry.registerModules = function (modules, moduleBased) {
3885 if (moduleBased === void 0) { moduleBased = true; }
3886 if (!modules) {
3887 return;
3888 }
3889 modules.forEach(function (module) { return ModuleRegistry.register(module, moduleBased); });
3890 };
3891 ModuleRegistry.assertRegistered = function (moduleName, reason) {
3892 if (this.isRegistered(moduleName)) {
3893 return true;
3894 }
3895 var warningKey = reason + moduleName;
3896 var warningMessage;
3897 if (ModuleRegistry.moduleBased) {
3898 warningMessage = "AG Grid: unable to use " + reason + " as module " + moduleName + " is not present. Please see: https://www.ag-grid.com/javascript-grid/modules/";
3899 }
3900 else {
3901 warningMessage = "AG Grid: unable to use " + reason + " as package 'ag-grid-enterprise' is not present. Please see: https://www.ag-grid.com/javascript-grid/packages/";
3902 }
3903 Object(_utils_function__WEBPACK_IMPORTED_MODULE_0__["doOnce"])(function () {
3904 console.warn(warningMessage);
3905 }, warningKey);
3906 return false;
3907 };
3908 ModuleRegistry.isRegistered = function (moduleName) {
3909 return !!ModuleRegistry.modulesMap[moduleName];
3910 };
3911 ModuleRegistry.getRegisteredModules = function () {
3912 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_1__["values"])(ModuleRegistry.modulesMap);
3913 };
3914 ModuleRegistry.isPackageBased = function () {
3915 return !ModuleRegistry.moduleBased;
3916 };
3917 // having in a map a) removes duplicates and b) allows fast lookup
3918 ModuleRegistry.modulesMap = {};
3919 return ModuleRegistry;
3920}());
3921
3922
3923
3924
3925
3926/***/ }),
3927/* 18 */
3928/***/ (function(module, __webpack_exports__, __webpack_require__) {
3929
3930"use strict";
3931__webpack_require__.r(__webpack_exports__);
3932/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstExistingValue", function() { return firstExistingValue; });
3933/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "existsAndNotEmpty", function() { return existsAndNotEmpty; });
3934/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; });
3935/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areEqual", function() { return areEqual; });
3936/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareArrays", function() { return compareArrays; });
3937/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shallowCompare", function() { return shallowCompare; });
3938/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortNumerically", function() { return sortNumerically; });
3939/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeRepeatsFromArray", function() { return removeRepeatsFromArray; });
3940/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeFromArray", function() { return removeFromArray; });
3941/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAllFromArray", function() { return removeAllFromArray; });
3942/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertIntoArray", function() { return insertIntoArray; });
3943/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrayIntoArray", function() { return insertArrayIntoArray; });
3944/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "moveInArray", function() { return moveInArray; });
3945/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "includes", function() { return includes; });
3946/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flatten", function() { return flatten; });
3947/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pushAll", function() { return pushAll; });
3948/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toStrings", function() { return toStrings; });
3949/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEachReverse", function() { return forEachReverse; });
3950/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
3951/**
3952 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3953 * @version v27.3.0
3954 * @link https://www.ag-grid.com/
3955 * @license MIT
3956 */
3957
3958function firstExistingValue() {
3959 var values = [];
3960 for (var _i = 0; _i < arguments.length; _i++) {
3961 values[_i] = arguments[_i];
3962 }
3963 for (var i = 0; i < values.length; i++) {
3964 var value = values[i];
3965 if (Object(_generic__WEBPACK_IMPORTED_MODULE_0__["exists"])(value)) {
3966 return value;
3967 }
3968 }
3969 return null;
3970}
3971function existsAndNotEmpty(value) {
3972 return value != null && value.length > 0;
3973}
3974function last(arr) {
3975 if (!arr || !arr.length) {
3976 return;
3977 }
3978 return arr[arr.length - 1];
3979}
3980function areEqual(a, b, comparator) {
3981 if (a == null && b == null) {
3982 return true;
3983 }
3984 return a != null &&
3985 b != null &&
3986 a.length === b.length &&
3987 a.every(function (value, index) { return comparator ? comparator(value, b[index]) : b[index] === value; });
3988}
3989/** @deprecated */
3990function compareArrays(array1, array2) {
3991 return areEqual(array1, array2);
3992}
3993/** @deprecated */
3994function shallowCompare(arr1, arr2) {
3995 return areEqual(arr1, arr2);
3996}
3997function sortNumerically(array) {
3998 return array.sort(function (a, b) { return a - b; });
3999}
4000function removeRepeatsFromArray(array, object) {
4001 if (!array) {
4002 return;
4003 }
4004 for (var index = array.length - 2; index >= 0; index--) {
4005 var thisOneMatches = array[index] === object;
4006 var nextOneMatches = array[index + 1] === object;
4007 if (thisOneMatches && nextOneMatches) {
4008 array.splice(index + 1, 1);
4009 }
4010 }
4011}
4012function removeFromArray(array, object) {
4013 var index = array.indexOf(object);
4014 if (index >= 0) {
4015 array.splice(index, 1);
4016 }
4017}
4018function removeAllFromArray(array, toRemove) {
4019 toRemove.forEach(function (item) { return removeFromArray(array, item); });
4020}
4021function insertIntoArray(array, object, toIndex) {
4022 array.splice(toIndex, 0, object);
4023}
4024function insertArrayIntoArray(dest, src, toIndex) {
4025 if (dest == null || src == null) {
4026 return;
4027 }
4028 // put items in backwards, otherwise inserted items end up in reverse order
4029 for (var i = src.length - 1; i >= 0; i--) {
4030 var item = src[i];
4031 insertIntoArray(dest, item, toIndex);
4032 }
4033}
4034function moveInArray(array, objectsToMove, toIndex) {
4035 // first take out items from the array
4036 removeAllFromArray(array, objectsToMove);
4037 // now add the objects, in same order as provided to us, that means we start at the end
4038 // as the objects will be pushed to the right as they are inserted
4039 objectsToMove.slice().reverse().forEach(function (obj) { return insertIntoArray(array, obj, toIndex); });
4040}
4041function includes(array, value) {
4042 return array.indexOf(value) > -1;
4043}
4044function flatten(arrayOfArrays) {
4045 return [].concat.apply([], arrayOfArrays);
4046}
4047function pushAll(target, source) {
4048 if (source == null || target == null) {
4049 return;
4050 }
4051 source.forEach(function (value) { return target.push(value); });
4052}
4053function toStrings(array) {
4054 return array.map(_generic__WEBPACK_IMPORTED_MODULE_0__["toStringOrNull"]);
4055}
4056function forEachReverse(list, action) {
4057 if (list == null) {
4058 return;
4059 }
4060 for (var i = list.length - 1; i >= 0; i--) {
4061 action(list[i], i);
4062 }
4063}
4064
4065
4066
4067
4068/***/ }),
4069/* 19 */
4070/***/ (function(module, __webpack_exports__, __webpack_require__) {
4071
4072"use strict";
4073__webpack_require__.r(__webpack_exports__);
4074/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultColumnTypes", function() { return DefaultColumnTypes; });
4075/**
4076 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
4077 * @version v27.3.0
4078 * @link https://www.ag-grid.com/
4079 * @license MIT
4080 */
4081var DefaultColumnTypes = {
4082 numericColumn: {
4083 headerClass: 'ag-right-aligned-header',
4084 cellClass: 'ag-right-aligned-cell'
4085 },
4086 rightAligned: {
4087 headerClass: 'ag-right-aligned-header',
4088 cellClass: 'ag-right-aligned-cell'
4089 }
4090};
4091
4092
4093
4094
4095/***/ }),
4096/* 20 */
4097/***/ (function(module, __webpack_exports__, __webpack_require__) {
4098
4099"use strict";
4100__webpack_require__.r(__webpack_exports__);
4101/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BeanStub", function() { return BeanStub; });
4102/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
4103/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
4104/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21);
4105/**
4106 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
4107 * @version v27.3.0
4108 * @link https://www.ag-grid.com/
4109 * @license MIT
4110 */
4111var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
4112 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4113 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4114 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4115 return c > 3 && r && Object.defineProperty(target, key, r), r;
4116};
4117
4118
4119
4120var BeanStub = /** @class */ (function () {
4121 function BeanStub() {
4122 var _this = this;
4123 this.destroyFunctions = [];
4124 this.destroyed = false;
4125 // for vue 3 - prevents Vue from trying to make this (and obviously any sub classes) from being reactive
4126 // prevents vue from creating proxies for created objects and prevents identity related issues
4127 this.__v_skip = true;
4128 this.isAlive = function () { return !_this.destroyed; };
4129 }
4130 // this was a test constructor niall built, when active, it prints after 5 seconds all beans/components that are
4131 // not destroyed. to use, create a new grid, then api.destroy() before 5 seconds. then anything that gets printed
4132 // points to a bean or component that was not properly disposed of.
4133 // constructor() {
4134 // setTimeout(()=> {
4135 // if (this.isAlive()) {
4136 // let prototype: any = Object.getPrototypeOf(this);
4137 // const constructor: any = prototype.constructor;
4138 // const constructorString = constructor.toString();
4139 // const beanName = constructorString.substring(9, constructorString.indexOf("("));
4140 // console.log('is alive ' + beanName);
4141 // }
4142 // }, 5000);
4143 // }
4144 // CellComp and GridComp and override this because they get the FrameworkOverrides from the Beans bean
4145 BeanStub.prototype.getFrameworkOverrides = function () {
4146 return this.frameworkOverrides;
4147 };
4148 BeanStub.prototype.getContext = function () {
4149 return this.context;
4150 };
4151 BeanStub.prototype.destroy = function () {
4152 // let prototype: any = Object.getPrototypeOf(this);
4153 // const constructor: any = prototype.constructor;
4154 // const constructorString = constructor.toString();
4155 // const beanName = constructorString.substring(9, constructorString.indexOf("("));
4156 this.destroyFunctions.forEach(function (func) { return func(); });
4157 this.destroyFunctions.length = 0;
4158 this.destroyed = true;
4159 this.dispatchEvent({ type: BeanStub.EVENT_DESTROYED });
4160 };
4161 BeanStub.prototype.addEventListener = function (eventType, listener) {
4162 if (!this.localEventService) {
4163 this.localEventService = new _eventService__WEBPACK_IMPORTED_MODULE_0__["EventService"]();
4164 }
4165 this.localEventService.addEventListener(eventType, listener);
4166 };
4167 BeanStub.prototype.removeEventListener = function (eventType, listener) {
4168 if (this.localEventService) {
4169 this.localEventService.removeEventListener(eventType, listener);
4170 }
4171 };
4172 BeanStub.prototype.dispatchEventAsync = function (event) {
4173 var _this = this;
4174 window.setTimeout(function () { return _this.dispatchEvent(event); }, 0);
4175 };
4176 BeanStub.prototype.dispatchEvent = function (event) {
4177 if (this.localEventService) {
4178 this.localEventService.dispatchEvent(event);
4179 }
4180 };
4181 BeanStub.prototype.addManagedListener = function (object, event, listener) {
4182 var _this = this;
4183 if (this.destroyed) {
4184 return;
4185 }
4186 if (object instanceof HTMLElement) {
4187 Object(_utils_event__WEBPACK_IMPORTED_MODULE_2__["addSafePassiveEventListener"])(this.getFrameworkOverrides(), object, event, listener);
4188 }
4189 else {
4190 object.addEventListener(event, listener);
4191 }
4192 var destroyFunc = function () {
4193 object.removeEventListener(event, listener);
4194 _this.destroyFunctions = _this.destroyFunctions.filter(function (fn) { return fn !== destroyFunc; });
4195 return null;
4196 };
4197 this.destroyFunctions.push(destroyFunc);
4198 return destroyFunc;
4199 };
4200 BeanStub.prototype.addDestroyFunc = function (func) {
4201 // if we are already destroyed, we execute the func now
4202 if (this.isAlive()) {
4203 this.destroyFunctions.push(func);
4204 }
4205 else {
4206 func();
4207 }
4208 };
4209 BeanStub.prototype.createManagedBean = function (bean, context) {
4210 var res = this.createBean(bean, context);
4211 this.addDestroyFunc(this.destroyBean.bind(this, bean, context));
4212 return res;
4213 };
4214 BeanStub.prototype.createBean = function (bean, context, afterPreCreateCallback) {
4215 return (context || this.getContext()).createBean(bean, afterPreCreateCallback);
4216 };
4217 BeanStub.prototype.destroyBean = function (bean, context) {
4218 return (context || this.getContext()).destroyBean(bean);
4219 };
4220 BeanStub.prototype.destroyBeans = function (beans, context) {
4221 var _this = this;
4222 if (beans) {
4223 beans.forEach(function (bean) { return _this.destroyBean(bean, context); });
4224 }
4225 return [];
4226 };
4227 BeanStub.EVENT_DESTROYED = 'destroyed';
4228 __decorate([
4229 Object(_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('frameworkOverrides')
4230 ], BeanStub.prototype, "frameworkOverrides", void 0);
4231 __decorate([
4232 Object(_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('context')
4233 ], BeanStub.prototype, "context", void 0);
4234 __decorate([
4235 Object(_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('eventService')
4236 ], BeanStub.prototype, "eventService", void 0);
4237 __decorate([
4238 Object(_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptionsWrapper')
4239 ], BeanStub.prototype, "gridOptionsWrapper", void 0);
4240 __decorate([
4241 _context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
4242 ], BeanStub.prototype, "destroy", null);
4243 return BeanStub;
4244}());
4245
4246
4247
4248
4249
4250/***/ }),
4251/* 21 */
4252/***/ (function(module, __webpack_exports__, __webpack_require__) {
4253
4254"use strict";
4255__webpack_require__.r(__webpack_exports__);
4256/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopPropagationForAgGrid", function() { return stopPropagationForAgGrid; });
4257/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isStopPropagationForAgGrid", function() { return isStopPropagationForAgGrid; });
4258/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEventSupported", function() { return isEventSupported; });
4259/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCtrlForEvent", function() { return getCtrlForEvent; });
4260/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addChangeListener", function() { return addChangeListener; });
4261/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isElementInEventPath", function() { return isElementInEventPath; });
4262/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEventPath", function() { return createEventPath; });
4263/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addAgGridEventPath", function() { return addAgGridEventPath; });
4264/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEventPath", function() { return getEventPath; });
4265/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSafePassiveEventListener", function() { return addSafePassiveEventListener; });
4266/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
4267/**
4268 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
4269 * @version v27.3.0
4270 * @link https://www.ag-grid.com/
4271 * @license MIT
4272 */
4273
4274var AG_GRID_STOP_PROPAGATION = '__ag_Grid_Stop_Propagation';
4275var PASSIVE_EVENTS = ['touchstart', 'touchend', 'touchmove', 'touchcancel'];
4276var supports = {};
4277/**
4278 * a user once raised an issue - they said that when you opened a popup (eg context menu)
4279 * and then clicked on a selection checkbox, the popup wasn't closed. this is because the
4280 * popup listens for clicks on the body, however ag-grid WAS stopping propagation on the
4281 * checkbox clicks (so the rows didn't pick them up as row selection selection clicks).
4282 * to get around this, we have a pattern to stop propagation for the purposes of AG Grid,
4283 * but we still let the event pass back to the body.
4284 * @param {Event} event
4285 */
4286function stopPropagationForAgGrid(event) {
4287 event[AG_GRID_STOP_PROPAGATION] = true;
4288}
4289function isStopPropagationForAgGrid(event) {
4290 return event[AG_GRID_STOP_PROPAGATION] === true;
4291}
4292var isEventSupported = (function () {
4293 var tags = {
4294 select: 'input',
4295 change: 'input',
4296 submit: 'form',
4297 reset: 'form',
4298 error: 'img',
4299 load: 'img',
4300 abort: 'img'
4301 };
4302 var eventChecker = function (eventName) {
4303 if (typeof supports[eventName] === 'boolean') {
4304 return supports[eventName];
4305 }
4306 var el = document.createElement(tags[eventName] || 'div');
4307 eventName = 'on' + eventName;
4308 return supports[eventName] = (eventName in el);
4309 };
4310 return eventChecker;
4311})();
4312function getCtrlForEvent(gridOptionsWrapper, event, type) {
4313 var sourceElement = event.target;
4314 while (sourceElement) {
4315 var renderedComp = gridOptionsWrapper.getDomData(sourceElement, type);
4316 if (renderedComp) {
4317 return renderedComp;
4318 }
4319 sourceElement = sourceElement.parentElement;
4320 }
4321 return null;
4322}
4323/**
4324 * @deprecated
4325 * Adds all type of change listeners to an element, intended to be a text field
4326 * @param {HTMLElement} element
4327 * @param {EventListener} listener
4328 */
4329function addChangeListener(element, listener) {
4330 element.addEventListener('changed', listener);
4331 element.addEventListener('paste', listener);
4332 element.addEventListener('input', listener);
4333}
4334function isElementInEventPath(element, event) {
4335 if (!event || !element) {
4336 return false;
4337 }
4338 return getEventPath(event).indexOf(element) >= 0;
4339}
4340function createEventPath(event) {
4341 var res = [];
4342 var pointer = event.target;
4343 while (pointer) {
4344 res.push(pointer);
4345 pointer = pointer.parentElement;
4346 }
4347 return res;
4348}
4349/**
4350 * firefox doesn't have event.path set, or any alternative to it, so we hack
4351 * it in. this is needed as it's to late to work out the path when the item is
4352 * removed from the dom. used by MouseEventService, where it works out if a click
4353 * was from the current grid, or a detail grid (master / detail).
4354 * @param {Event} event
4355 */
4356function addAgGridEventPath(event) {
4357 event.__agGridEventPath = getEventPath(event);
4358}
4359/**
4360 * Gets the path for an Event.
4361 * https://stackoverflow.com/questions/39245488/event-path-undefined-with-firefox-and-vue-js
4362 * https://developer.mozilla.org/en-US/docs/Web/API/Event
4363 * @param {Event} event
4364 * @returns {EventTarget[]}
4365 */
4366function getEventPath(event) {
4367 var eventNoType = event;
4368 if (eventNoType.path) {
4369 // Chrome supports path
4370 return eventNoType.path;
4371 }
4372 if (eventNoType.composedPath) {
4373 // Firefox supports composePath
4374 return eventNoType.composedPath();
4375 }
4376 if (eventNoType.__agGridEventPath) {
4377 // Firefox supports composePath
4378 return eventNoType.__agGridEventPath;
4379 }
4380 // and finally, if none of the above worked,
4381 // we create the path ourselves
4382 return createEventPath(event);
4383}
4384function addSafePassiveEventListener(frameworkOverrides, eElement, event, listener) {
4385 var isPassive = Object(_array__WEBPACK_IMPORTED_MODULE_0__["includes"])(PASSIVE_EVENTS, event);
4386 var options = isPassive ? { passive: true } : undefined;
4387 // this check is here for certain scenarios where I believe the user must be destroying
4388 // the grid somehow but continuing for it to be used
4389 if (frameworkOverrides && frameworkOverrides.addEventListener) {
4390 frameworkOverrides.addEventListener(eElement, event, listener, options);
4391 }
4392}
4393
4394
4395
4396
4397/***/ }),
4398/* 22 */
4399/***/ (function(module, __webpack_exports__, __webpack_require__) {
4400
4401"use strict";
4402__webpack_require__.r(__webpack_exports__);
4403/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnModel", function() { return ColumnModel; });
4404/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
4405/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
4406/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
4407/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
4408/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
4409/* harmony import */ var _groupInstanceIdCreator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25);
4410/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(12);
4411/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(15);
4412/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(18);
4413/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7);
4414/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(26);
4415/* harmony import */ var _utils_map__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(27);
4416/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14);
4417/**
4418 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
4419 * @version v27.3.0
4420 * @link https://www.ag-grid.com/
4421 * @license MIT
4422 */
4423var __extends = (undefined && undefined.__extends) || (function () {
4424 var extendStatics = function (d, b) {
4425 extendStatics = Object.setPrototypeOf ||
4426 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
4427 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
4428 return extendStatics(d, b);
4429 };
4430 return function (d, b) {
4431 extendStatics(d, b);
4432 function __() { this.constructor = d; }
4433 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4434 };
4435})();
4436var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
4437 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4438 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4439 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4440 return c > 3 && r && Object.defineProperty(target, key, r), r;
4441};
4442var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
4443 return function (target, key) { decorator(target, key, paramIndex); }
4444};
4445var __values = (undefined && undefined.__values) || function(o) {
4446 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4447 if (m) return m.call(o);
4448 if (o && typeof o.length === "number") return {
4449 next: function () {
4450 if (o && i >= o.length) o = void 0;
4451 return { value: o && o[i++], done: !o };
4452 }
4453 };
4454 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
4455};
4456var __read = (undefined && undefined.__read) || function (o, n) {
4457 var m = typeof Symbol === "function" && o[Symbol.iterator];
4458 if (!m) return o;
4459 var i = m.call(o), r, ar = [], e;
4460 try {
4461 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
4462 }
4463 catch (error) { e = { error: error }; }
4464 finally {
4465 try {
4466 if (r && !r.done && (m = i["return"])) m.call(i);
4467 }
4468 finally { if (e) throw e.error; }
4469 }
4470 return ar;
4471};
4472var __spread = (undefined && undefined.__spread) || function () {
4473 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
4474 return ar;
4475};
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489var ColumnModel = /** @class */ (function (_super) {
4490 __extends(ColumnModel, _super);
4491 function ColumnModel() {
4492 var _this = _super !== null && _super.apply(this, arguments) || this;
4493 // header row count, based on user provided columns
4494 _this.primaryHeaderRowCount = 0;
4495 _this.secondaryHeaderRowCount = 0;
4496 // header row count, either above, or based on pivoting if we are pivoting
4497 _this.gridHeaderRowCount = 0;
4498 // leave level columns of the displayed trees
4499 _this.displayedColumnsLeft = [];
4500 _this.displayedColumnsRight = [];
4501 _this.displayedColumnsCenter = [];
4502 // all three lists above combined
4503 _this.displayedColumns = [];
4504 // for fast lookup, to see if a column or group is still displayed
4505 _this.displayedColumnsAndGroupsMap = {};
4506 // all columns to be rendered
4507 _this.viewportColumns = [];
4508 // all columns to be rendered in the centre
4509 _this.viewportColumnsCenter = [];
4510 _this.autoHeightActiveAtLeastOnce = false;
4511 _this.rowGroupColumns = [];
4512 _this.valueColumns = [];
4513 _this.pivotColumns = [];
4514 _this.ready = false;
4515 _this.autoGroupsNeedBuilding = false;
4516 _this.forceRecreateAutoGroups = false;
4517 _this.pivotMode = false;
4518 _this.bodyWidth = 0;
4519 _this.leftWidth = 0;
4520 _this.rightWidth = 0;
4521 _this.bodyWidthDirty = true;
4522 _this.colDefVersion = 0;
4523 _this.flexColsCalculatedAtLestOnce = false;
4524 return _this;
4525 }
4526 ColumnModel.prototype.init = function () {
4527 var _this = this;
4528 this.suppressColumnVirtualisation = this.gridOptionsWrapper.isSuppressColumnVirtualisation();
4529 var pivotMode = this.gridOptionsWrapper.isPivotMode();
4530 if (this.isPivotSettingAllowed(pivotMode)) {
4531 this.pivotMode = pivotMode;
4532 }
4533 this.usingTreeData = this.gridOptionsWrapper.isTreeData();
4534 this.addManagedListener(this.gridOptionsWrapper, 'autoGroupColumnDef', function () { return _this.onAutoGroupColumnDefChanged(); });
4535 this.addManagedListener(this.gridOptionsWrapper, 'defaultColDef', function () { return _this.onDefaultColDefChanged(); });
4536 };
4537 ColumnModel.prototype.onAutoGroupColumnDefChanged = function () {
4538 this.autoGroupsNeedBuilding = true;
4539 this.forceRecreateAutoGroups = true;
4540 this.updateGridColumns();
4541 this.updateDisplayedColumns('gridOptionsChanged');
4542 };
4543 ColumnModel.prototype.onDefaultColDefChanged = function () {
4544 // col def's should get revisited, even if specific column hasn't changed,
4545 // as the defaultColDef impacts all columns, so each column should assume it's Col Def has changed.
4546 this.colDefVersion++;
4547 // likewise for autoGroupCol, the default col def impacts this
4548 this.forceRecreateAutoGroups = true;
4549 this.createColumnsFromColumnDefs(true);
4550 };
4551 ColumnModel.prototype.getColDefVersion = function () {
4552 return this.colDefVersion;
4553 };
4554 ColumnModel.prototype.setColumnDefs = function (columnDefs, source) {
4555 if (source === void 0) { source = 'api'; }
4556 var colsPreviouslyExisted = !!this.columnDefs;
4557 this.colDefVersion++;
4558 this.columnDefs = columnDefs;
4559 this.createColumnsFromColumnDefs(colsPreviouslyExisted, source);
4560 };
4561 ColumnModel.prototype.createColumnsFromColumnDefs = function (colsPreviouslyExisted, source) {
4562 var _this = this;
4563 if (source === void 0) { source = 'api'; }
4564 // only need to raise before/after events if updating columns, never if setting columns for first time
4565 var raiseEventsFunc = colsPreviouslyExisted ? this.compareColumnStatesAndRaiseEvents(source) : undefined;
4566 // always invalidate cache on changing columns, as the column id's for the new columns
4567 // could overlap with the old id's, so the cache would return old values for new columns.
4568 this.valueCache.expire();
4569 // NOTE ==================
4570 // we should be destroying the existing columns and groups if they exist, for example, the original column
4571 // group adds a listener to the columns, it should be also removing the listeners
4572 this.autoGroupsNeedBuilding = true;
4573 var oldPrimaryColumns = this.primaryColumns;
4574 var oldPrimaryTree = this.primaryColumnTree;
4575 var balancedTreeResult = this.columnFactory.createColumnTree(this.columnDefs, true, oldPrimaryTree);
4576 this.primaryColumnTree = balancedTreeResult.columnTree;
4577 this.primaryHeaderRowCount = balancedTreeResult.treeDept + 1;
4578 this.primaryColumns = this.getColumnsFromTree(this.primaryColumnTree);
4579 this.primaryColumnsMap = {};
4580 this.primaryColumns.forEach(function (col) { return _this.primaryColumnsMap[col.getId()] = col; });
4581 this.extractRowGroupColumns(source, oldPrimaryColumns);
4582 this.extractPivotColumns(source, oldPrimaryColumns);
4583 this.extractValueColumns(source, oldPrimaryColumns);
4584 this.ready = true;
4585 // if we are showing secondary columns, then no need to update grid columns
4586 // at this point, as it's the pivot service responsibility to change these
4587 // if we are no longer pivoting (ie and need to revert back to primary, otherwise
4588 // we shouldn't be touching the primary).
4589 var gridColsNotProcessed = this.gridColsArePrimary === undefined;
4590 var processGridCols = this.gridColsArePrimary || gridColsNotProcessed;
4591 if (processGridCols) {
4592 this.updateGridColumns();
4593 if (colsPreviouslyExisted && !this.gridOptionsWrapper.isMaintainColumnOrder()) {
4594 this.orderGridColumnsLikePrimary();
4595 }
4596 this.updateDisplayedColumns(source);
4597 this.checkViewportColumns();
4598 }
4599 // this event is not used by AG Grid, but left here for backwards compatibility,
4600 // in case applications use it
4601 this.dispatchEverythingChanged(source);
4602 raiseEventsFunc && raiseEventsFunc();
4603 this.dispatchNewColumnsLoaded();
4604 };
4605 ColumnModel.prototype.dispatchNewColumnsLoaded = function () {
4606 var newColumnsLoadedEvent = {
4607 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_NEW_COLUMNS_LOADED,
4608 api: this.gridApi,
4609 columnApi: this.columnApi
4610 };
4611 this.eventService.dispatchEvent(newColumnsLoadedEvent);
4612 };
4613 // this event is legacy, no grid code listens to it. instead the grid listens to New Columns Loaded
4614 ColumnModel.prototype.dispatchEverythingChanged = function (source) {
4615 if (source === void 0) { source = 'api'; }
4616 var eventEverythingChanged = {
4617 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_EVERYTHING_CHANGED,
4618 api: this.gridApi,
4619 columnApi: this.columnApi,
4620 source: source
4621 };
4622 this.eventService.dispatchEvent(eventEverythingChanged);
4623 };
4624 ColumnModel.prototype.orderGridColumnsLikePrimary = function () {
4625 var _this = this;
4626 var primaryColumns = this.primaryColumns;
4627 if (!primaryColumns) {
4628 return;
4629 }
4630 this.gridColumns.sort(function (colA, colB) {
4631 var primaryIndexA = primaryColumns.indexOf(colA);
4632 var primaryIndexB = primaryColumns.indexOf(colB);
4633 // if both cols are present in primary, then we just return the position,
4634 // so position is maintained.
4635 var indexAPresent = primaryIndexA >= 0;
4636 var indexBPresent = primaryIndexB >= 0;
4637 if (indexAPresent && indexBPresent) {
4638 return primaryIndexA - primaryIndexB;
4639 }
4640 if (indexAPresent) {
4641 // B is auto group column, so put B first
4642 return 1;
4643 }
4644 if (indexBPresent) {
4645 // A is auto group column, so put A first
4646 return -1;
4647 }
4648 // otherwise both A and B are auto-group columns. so we just keep the order
4649 // as they were already in.
4650 var gridIndexA = _this.gridColumns.indexOf(colA);
4651 var gridIndexB = _this.gridColumns.indexOf(colB);
4652 return gridIndexA - gridIndexB;
4653 });
4654 };
4655 ColumnModel.prototype.getAllDisplayedAutoHeightCols = function () {
4656 return this.displayedAutoHeightCols;
4657 };
4658 ColumnModel.prototype.setViewport = function () {
4659 if (this.gridOptionsWrapper.isEnableRtl()) {
4660 this.viewportLeft = this.bodyWidth - this.scrollPosition - this.scrollWidth;
4661 this.viewportRight = this.bodyWidth - this.scrollPosition;
4662 }
4663 else {
4664 this.viewportLeft = this.scrollPosition;
4665 this.viewportRight = this.scrollWidth + this.scrollPosition;
4666 }
4667 };
4668 // used by clipboard service, to know what columns to paste into
4669 ColumnModel.prototype.getDisplayedColumnsStartingAt = function (column) {
4670 var currentColumn = column;
4671 var columns = [];
4672 while (currentColumn != null) {
4673 columns.push(currentColumn);
4674 currentColumn = this.getDisplayedColAfter(currentColumn);
4675 }
4676 return columns;
4677 };
4678 // checks what columns are currently displayed due to column virtualisation. fires an event
4679 // if the list of columns has changed.
4680 // + setColumnWidth(), setViewportPosition(), setColumnDefs(), sizeColumnsToFit()
4681 ColumnModel.prototype.checkViewportColumns = function () {
4682 // check displayCenterColumnTree exists first, as it won't exist when grid is initialising
4683 if (this.displayedColumnsCenter == null) {
4684 return;
4685 }
4686 var hashBefore = this.viewportColumns.map(function (column) { return column.getId(); }).join('#');
4687 this.extractViewport();
4688 var hashAfter = this.viewportColumns.map(function (column) { return column.getId(); }).join('#');
4689 if (hashBefore !== hashAfter) {
4690 var event_1 = {
4691 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_VIRTUAL_COLUMNS_CHANGED,
4692 api: this.gridApi,
4693 columnApi: this.columnApi
4694 };
4695 this.eventService.dispatchEvent(event_1);
4696 }
4697 };
4698 ColumnModel.prototype.setViewportPosition = function (scrollWidth, scrollPosition) {
4699 if (scrollWidth !== this.scrollWidth || scrollPosition !== this.scrollPosition || this.bodyWidthDirty) {
4700 this.scrollWidth = scrollWidth;
4701 this.scrollPosition = scrollPosition;
4702 // we need to call setVirtualViewportLeftAndRight() at least once after the body width changes,
4703 // as the viewport can stay the same, but in RTL, if body width changes, we need to work out the
4704 // virtual columns again
4705 this.bodyWidthDirty = true;
4706 this.setViewport();
4707 if (this.ready) {
4708 this.checkViewportColumns();
4709 }
4710 }
4711 };
4712 ColumnModel.prototype.isPivotMode = function () {
4713 return this.pivotMode;
4714 };
4715 ColumnModel.prototype.isPivotSettingAllowed = function (pivot) {
4716 if (pivot && this.gridOptionsWrapper.isTreeData()) {
4717 console.warn("AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'");
4718 return false;
4719 }
4720 return true;
4721 };
4722 ColumnModel.prototype.setPivotMode = function (pivotMode, source) {
4723 if (source === void 0) { source = 'api'; }
4724 if (pivotMode === this.pivotMode || !this.isPivotSettingAllowed(this.pivotMode)) {
4725 return;
4726 }
4727 this.pivotMode = pivotMode;
4728 // we need to update grid columns to cover the scenario where user has groupSuppressAutoColumn=true, as
4729 // this means we don't use auto group column UNLESS we are in pivot mode (it's mandatory in pivot mode),
4730 // so need to updateGridColumn() to check it autoGroupCol needs to be added / removed
4731 this.autoGroupsNeedBuilding = true;
4732 this.updateGridColumns();
4733 this.updateDisplayedColumns(source);
4734 var event = {
4735 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED,
4736 api: this.gridApi,
4737 columnApi: this.columnApi
4738 };
4739 this.eventService.dispatchEvent(event);
4740 };
4741 ColumnModel.prototype.getSecondaryPivotColumn = function (pivotKeys, valueColKey) {
4742 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.secondaryColumns)) {
4743 return null;
4744 }
4745 var valueColumnToFind = this.getPrimaryColumn(valueColKey);
4746 var foundColumn = null;
4747 this.secondaryColumns.forEach(function (column) {
4748 var thisPivotKeys = column.getColDef().pivotKeys;
4749 var pivotValueColumn = column.getColDef().pivotValueColumn;
4750 var pivotKeyMatches = Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["areEqual"])(thisPivotKeys, pivotKeys);
4751 var pivotValueMatches = pivotValueColumn === valueColumnToFind;
4752 if (pivotKeyMatches && pivotValueMatches) {
4753 foundColumn = column;
4754 }
4755 });
4756 return foundColumn;
4757 };
4758 ColumnModel.prototype.setBeans = function (loggerFactory) {
4759 this.logger = loggerFactory.create('columnModel');
4760 };
4761 ColumnModel.prototype.setFirstRightAndLastLeftPinned = function (source) {
4762 var lastLeft;
4763 var firstRight;
4764 if (this.gridOptionsWrapper.isEnableRtl()) {
4765 lastLeft = this.displayedColumnsLeft ? this.displayedColumnsLeft[0] : null;
4766 firstRight = this.displayedColumnsRight ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["last"])(this.displayedColumnsRight) : null;
4767 }
4768 else {
4769 lastLeft = this.displayedColumnsLeft ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["last"])(this.displayedColumnsLeft) : null;
4770 firstRight = this.displayedColumnsRight ? this.displayedColumnsRight[0] : null;
4771 }
4772 this.gridColumns.forEach(function (column) {
4773 column.setLastLeftPinned(column === lastLeft, source);
4774 column.setFirstRightPinned(column === firstRight, source);
4775 });
4776 };
4777 ColumnModel.prototype.autoSizeColumns = function (params) {
4778 var _this = this;
4779 var columns = params.columns, skipHeader = params.skipHeader, skipHeaderGroups = params.skipHeaderGroups, stopAtGroup = params.stopAtGroup, _a = params.source, source = _a === void 0 ? 'api' : _a;
4780 // because of column virtualisation, we can only do this function on columns that are
4781 // actually rendered, as non-rendered columns (outside the viewport and not rendered
4782 // due to column virtualisation) are not present. this can result in all rendered columns
4783 // getting narrowed, which in turn introduces more rendered columns on the RHS which
4784 // did not get autosized in the original run, leaving the visible grid with columns on
4785 // the LHS sized, but RHS no. so we keep looping through the visible columns until
4786 // no more cols are available (rendered) to be resized
4787 // we autosize after animation frames finish in case any cell renderers need to complete first. this can
4788 // happen eg if client code is calling api.autoSizeAllColumns() straight after grid is initialised, but grid
4789 // hasn't fully drawn out all the cells yet (due to cell renderers in animation frames).
4790 this.animationFrameService.flushAllFrames();
4791 // keep track of which cols we have resized in here
4792 var columnsAutosized = [];
4793 // initialise with anything except 0 so that while loop executes at least once
4794 var changesThisTimeAround = -1;
4795 var shouldSkipHeader = skipHeader != null ? skipHeader : this.gridOptionsWrapper.isSkipHeaderOnAutoSize();
4796 var shouldSkipHeaderGroups = skipHeaderGroups != null ? skipHeaderGroups : shouldSkipHeader;
4797 while (changesThisTimeAround !== 0) {
4798 changesThisTimeAround = 0;
4799 this.actionOnGridColumns(columns, function (column) {
4800 // if already autosized, skip it
4801 if (columnsAutosized.indexOf(column) >= 0) {
4802 return false;
4803 }
4804 // get how wide this col should be
4805 var preferredWidth = _this.autoWidthCalculator.getPreferredWidthForColumn(column, shouldSkipHeader);
4806 // preferredWidth = -1 if this col is not on the screen
4807 if (preferredWidth > 0) {
4808 var newWidth = _this.normaliseColumnWidth(column, preferredWidth);
4809 column.setActualWidth(newWidth, source);
4810 columnsAutosized.push(column);
4811 changesThisTimeAround++;
4812 }
4813 return true;
4814 }, source);
4815 }
4816 if (!shouldSkipHeaderGroups) {
4817 this.autoSizeColumnGroupsByColumns(columns, stopAtGroup);
4818 }
4819 this.fireColumnResizedEvent(columnsAutosized, true, 'autosizeColumns');
4820 };
4821 ColumnModel.prototype.fireColumnResizedEvent = function (columns, finished, source, flexColumns) {
4822 if (flexColumns === void 0) { flexColumns = null; }
4823 if (columns && columns.length) {
4824 var event_2 = {
4825 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_RESIZED,
4826 columns: columns,
4827 column: columns.length === 1 ? columns[0] : null,
4828 flexColumns: flexColumns,
4829 finished: finished,
4830 api: this.gridApi,
4831 columnApi: this.columnApi,
4832 source: source
4833 };
4834 this.eventService.dispatchEvent(event_2);
4835 }
4836 };
4837 ColumnModel.prototype.autoSizeColumn = function (key, skipHeader, source) {
4838 if (source === void 0) { source = "api"; }
4839 if (key) {
4840 this.autoSizeColumns({ columns: [key], skipHeader: skipHeader, skipHeaderGroups: true, source: source });
4841 }
4842 };
4843 ColumnModel.prototype.autoSizeColumnGroupsByColumns = function (keys, stopAtGroup) {
4844 var e_1, _a, e_2, _b;
4845 var columnGroups = new Set();
4846 var columns = this.getGridColumns(keys);
4847 columns.forEach(function (col) {
4848 var parent = col.getParent();
4849 while (parent && parent != stopAtGroup) {
4850 if (!parent.isPadding()) {
4851 columnGroups.add(parent);
4852 }
4853 parent = parent.getParent();
4854 }
4855 });
4856 var headerGroupCtrl;
4857 var resizedColumns = [];
4858 try {
4859 for (var columnGroups_1 = __values(columnGroups), columnGroups_1_1 = columnGroups_1.next(); !columnGroups_1_1.done; columnGroups_1_1 = columnGroups_1.next()) {
4860 var columnGroup = columnGroups_1_1.value;
4861 try {
4862 for (var _c = (e_2 = void 0, __values(this.ctrlsService.getHeaderRowContainerCtrls())), _d = _c.next(); !_d.done; _d = _c.next()) {
4863 var headerContainerCtrl = _d.value;
4864 headerGroupCtrl = headerContainerCtrl.getHeaderCtrlForColumn(columnGroup);
4865 if (headerGroupCtrl) {
4866 break;
4867 }
4868 }
4869 }
4870 catch (e_2_1) { e_2 = { error: e_2_1 }; }
4871 finally {
4872 try {
4873 if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
4874 }
4875 finally { if (e_2) throw e_2.error; }
4876 }
4877 if (headerGroupCtrl) {
4878 headerGroupCtrl.resizeLeafColumnsToFit();
4879 }
4880 }
4881 }
4882 catch (e_1_1) { e_1 = { error: e_1_1 }; }
4883 finally {
4884 try {
4885 if (columnGroups_1_1 && !columnGroups_1_1.done && (_a = columnGroups_1.return)) _a.call(columnGroups_1);
4886 }
4887 finally { if (e_1) throw e_1.error; }
4888 }
4889 return resizedColumns;
4890 };
4891 ColumnModel.prototype.autoSizeAllColumns = function (skipHeader, source) {
4892 if (source === void 0) { source = "api"; }
4893 var allDisplayedColumns = this.getAllDisplayedColumns();
4894 this.autoSizeColumns({ columns: allDisplayedColumns, skipHeader: skipHeader, source: source });
4895 };
4896 // Possible candidate for reuse (alot of recursive traversal duplication)
4897 ColumnModel.prototype.getColumnsFromTree = function (rootColumns) {
4898 var result = [];
4899 var recursiveFindColumns = function (childColumns) {
4900 for (var i = 0; i < childColumns.length; i++) {
4901 var child = childColumns[i];
4902 if (child instanceof _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"]) {
4903 result.push(child);
4904 }
4905 else if (child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"]) {
4906 recursiveFindColumns(child.getChildren());
4907 }
4908 }
4909 };
4910 recursiveFindColumns(rootColumns);
4911 return result;
4912 };
4913 ColumnModel.prototype.getAllDisplayedTrees = function () {
4914 if (this.displayedTreeLeft && this.displayedTreeRight && this.displayedTreeCentre) {
4915 return this.displayedTreeLeft
4916 .concat(this.displayedTreeCentre)
4917 .concat(this.displayedTreeRight);
4918 }
4919 return null;
4920 };
4921 // + columnSelectPanel
4922 ColumnModel.prototype.getPrimaryColumnTree = function () {
4923 return this.primaryColumnTree;
4924 };
4925 // + gridPanel -> for resizing the body and setting top margin
4926 ColumnModel.prototype.getHeaderRowCount = function () {
4927 return this.gridHeaderRowCount;
4928 };
4929 // + headerRenderer -> setting pinned body width
4930 ColumnModel.prototype.getDisplayedTreeLeft = function () {
4931 return this.displayedTreeLeft;
4932 };
4933 // + headerRenderer -> setting pinned body width
4934 ColumnModel.prototype.getDisplayedTreeRight = function () {
4935 return this.displayedTreeRight;
4936 };
4937 // + headerRenderer -> setting pinned body width
4938 ColumnModel.prototype.getDisplayedTreeCentre = function () {
4939 return this.displayedTreeCentre;
4940 };
4941 // gridPanel -> ensureColumnVisible
4942 ColumnModel.prototype.isColumnDisplayed = function (column) {
4943 return this.getAllDisplayedColumns().indexOf(column) >= 0;
4944 };
4945 // + csvCreator
4946 ColumnModel.prototype.getAllDisplayedColumns = function () {
4947 return this.displayedColumns;
4948 };
4949 ColumnModel.prototype.getViewportColumns = function () {
4950 return this.viewportColumns;
4951 };
4952 ColumnModel.prototype.getDisplayedLeftColumnsForRow = function (rowNode) {
4953 if (!this.colSpanActive) {
4954 return this.displayedColumnsLeft;
4955 }
4956 return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsLeft);
4957 };
4958 ColumnModel.prototype.getDisplayedRightColumnsForRow = function (rowNode) {
4959 if (!this.colSpanActive) {
4960 return this.displayedColumnsRight;
4961 }
4962 return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsRight);
4963 };
4964 ColumnModel.prototype.getDisplayedColumnsForRow = function (rowNode, displayedColumns, filterCallback, emptySpaceBeforeColumn) {
4965 var result = [];
4966 var lastConsideredCol = null;
4967 var _loop_1 = function (i) {
4968 var col = displayedColumns[i];
4969 var maxAllowedColSpan = displayedColumns.length - i;
4970 var colSpan = Math.min(col.getColSpan(rowNode), maxAllowedColSpan);
4971 var columnsToCheckFilter = [col];
4972 if (colSpan > 1) {
4973 var colsToRemove = colSpan - 1;
4974 for (var j = 1; j <= colsToRemove; j++) {
4975 columnsToCheckFilter.push(displayedColumns[i + j]);
4976 }
4977 i += colsToRemove;
4978 }
4979 // see which cols we should take out for column virtualisation
4980 var filterPasses;
4981 if (filterCallback) {
4982 // if user provided a callback, means some columns may not be in the viewport.
4983 // the user will NOT provide a callback if we are talking about pinned areas,
4984 // as pinned areas have no horizontal scroll and do not virtualise the columns.
4985 // if lots of columns, that means column spanning, and we set filterPasses = true
4986 // if one or more of the columns spanned pass the filter.
4987 filterPasses = false;
4988 columnsToCheckFilter.forEach(function (colForFilter) {
4989 if (filterCallback(colForFilter)) {
4990 filterPasses = true;
4991 }
4992 });
4993 }
4994 else {
4995 filterPasses = true;
4996 }
4997 if (filterPasses) {
4998 if (result.length === 0 && lastConsideredCol) {
4999 var gapBeforeColumn = emptySpaceBeforeColumn ? emptySpaceBeforeColumn(col) : false;
5000 if (gapBeforeColumn) {
5001 result.push(lastConsideredCol);
5002 }
5003 }
5004 result.push(col);
5005 }
5006 lastConsideredCol = col;
5007 out_i_1 = i;
5008 };
5009 var out_i_1;
5010 for (var i = 0; i < displayedColumns.length; i++) {
5011 _loop_1(i);
5012 i = out_i_1;
5013 }
5014 return result;
5015 };
5016 // + rowRenderer
5017 // if we are not column spanning, this just returns back the virtual centre columns,
5018 // however if we are column spanning, then different rows can have different virtual
5019 // columns, so we have to work out the list for each individual row.
5020 ColumnModel.prototype.getViewportCenterColumnsForRow = function (rowNode) {
5021 var _this = this;
5022 if (!this.colSpanActive) {
5023 return this.viewportColumnsCenter;
5024 }
5025 var emptySpaceBeforeColumn = function (col) {
5026 var left = col.getLeft();
5027 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(left) && left > _this.viewportLeft;
5028 };
5029 // if doing column virtualisation, then we filter based on the viewport.
5030 var filterCallback = this.suppressColumnVirtualisation ? null : this.isColumnInViewport.bind(this);
5031 return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsCenter, filterCallback, emptySpaceBeforeColumn);
5032 };
5033 ColumnModel.prototype.getAriaColumnIndex = function (col) {
5034 return this.getAllGridColumns().indexOf(col) + 1;
5035 };
5036 ColumnModel.prototype.isColumnInViewport = function (col) {
5037 // we never filter out autoHeight columns, as we need them in the DOM for calculating Auto Height
5038 if (col.isAutoHeight()) {
5039 return true;
5040 }
5041 var columnLeft = col.getLeft() || 0;
5042 var columnRight = columnLeft + col.getActualWidth();
5043 // adding 200 for buffer size, so some cols off viewport are rendered.
5044 // this helps horizontal scrolling so user rarely sees white space (unless
5045 // they scroll horizontally fast). however we are conservative, as the more
5046 // buffer the slower the vertical redraw speed
5047 var leftBounds = this.viewportLeft - 200;
5048 var rightBounds = this.viewportRight + 200;
5049 var columnToMuchLeft = columnLeft < leftBounds && columnRight < leftBounds;
5050 var columnToMuchRight = columnLeft > rightBounds && columnRight > rightBounds;
5051 return !columnToMuchLeft && !columnToMuchRight;
5052 };
5053 // used by:
5054 // + angularGrid -> setting pinned body width
5055 // note: this should be cached
5056 ColumnModel.prototype.getDisplayedColumnsLeftWidth = function () {
5057 return this.getWidthOfColsInList(this.displayedColumnsLeft);
5058 };
5059 // note: this should be cached
5060 ColumnModel.prototype.getDisplayedColumnsRightWidth = function () {
5061 return this.getWidthOfColsInList(this.displayedColumnsRight);
5062 };
5063 ColumnModel.prototype.updatePrimaryColumnList = function (keys, masterList, actionIsAdd, columnCallback, eventType, source) {
5064 var _this = this;
5065 if (source === void 0) { source = "api"; }
5066 if (!keys || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missingOrEmpty"])(keys)) {
5067 return;
5068 }
5069 var atLeastOne = false;
5070 keys.forEach(function (key) {
5071 var columnToAdd = _this.getPrimaryColumn(key);
5072 if (!columnToAdd) {
5073 return;
5074 }
5075 if (actionIsAdd) {
5076 if (masterList.indexOf(columnToAdd) >= 0) {
5077 return;
5078 }
5079 masterList.push(columnToAdd);
5080 }
5081 else {
5082 if (masterList.indexOf(columnToAdd) < 0) {
5083 return;
5084 }
5085 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(masterList, columnToAdd);
5086 }
5087 columnCallback(columnToAdd);
5088 atLeastOne = true;
5089 });
5090 if (!atLeastOne) {
5091 return;
5092 }
5093 if (this.autoGroupsNeedBuilding) {
5094 this.updateGridColumns();
5095 }
5096 this.updateDisplayedColumns(source);
5097 var event = {
5098 type: eventType,
5099 columns: masterList,
5100 column: masterList.length === 1 ? masterList[0] : null,
5101 api: this.gridApi,
5102 columnApi: this.columnApi,
5103 source: source
5104 };
5105 this.eventService.dispatchEvent(event);
5106 };
5107 ColumnModel.prototype.setRowGroupColumns = function (colKeys, source) {
5108 if (source === void 0) { source = "api"; }
5109 this.autoGroupsNeedBuilding = true;
5110 this.setPrimaryColumnList(colKeys, this.rowGroupColumns, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, this.setRowGroupActive.bind(this), source);
5111 };
5112 ColumnModel.prototype.setRowGroupActive = function (active, column, source) {
5113 if (active === column.isRowGroupActive()) {
5114 return;
5115 }
5116 column.setRowGroupActive(active, source);
5117 if (!active && !this.gridOptionsWrapper.isSuppressMakeColumnVisibleAfterUnGroup()) {
5118 column.setVisible(true, source);
5119 }
5120 };
5121 ColumnModel.prototype.addRowGroupColumn = function (key, source) {
5122 if (source === void 0) { source = "api"; }
5123 if (key) {
5124 this.addRowGroupColumns([key], source);
5125 }
5126 };
5127 ColumnModel.prototype.addRowGroupColumns = function (keys, source) {
5128 if (source === void 0) { source = "api"; }
5129 this.autoGroupsNeedBuilding = true;
5130 this.updatePrimaryColumnList(keys, this.rowGroupColumns, true, this.setRowGroupActive.bind(this, true), _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, source);
5131 };
5132 ColumnModel.prototype.removeRowGroupColumns = function (keys, source) {
5133 if (source === void 0) { source = "api"; }
5134 this.autoGroupsNeedBuilding = true;
5135 this.updatePrimaryColumnList(keys, this.rowGroupColumns, false, this.setRowGroupActive.bind(this, false), _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, source);
5136 };
5137 ColumnModel.prototype.removeRowGroupColumn = function (key, source) {
5138 if (source === void 0) { source = "api"; }
5139 if (key) {
5140 this.removeRowGroupColumns([key], source);
5141 }
5142 };
5143 ColumnModel.prototype.addPivotColumns = function (keys, source) {
5144 if (source === void 0) { source = "api"; }
5145 this.updatePrimaryColumnList(keys, this.pivotColumns, true, function (column) { return column.setPivotActive(true, source); }, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_CHANGED, source);
5146 };
5147 ColumnModel.prototype.setPivotColumns = function (colKeys, source) {
5148 if (source === void 0) { source = "api"; }
5149 this.setPrimaryColumnList(colKeys, this.pivotColumns, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_CHANGED, function (added, column) {
5150 column.setPivotActive(added, source);
5151 }, source);
5152 };
5153 ColumnModel.prototype.addPivotColumn = function (key, source) {
5154 if (source === void 0) { source = "api"; }
5155 this.addPivotColumns([key], source);
5156 };
5157 ColumnModel.prototype.removePivotColumns = function (keys, source) {
5158 if (source === void 0) { source = "api"; }
5159 this.updatePrimaryColumnList(keys, this.pivotColumns, false, function (column) { return column.setPivotActive(false, source); }, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_CHANGED, source);
5160 };
5161 ColumnModel.prototype.removePivotColumn = function (key, source) {
5162 if (source === void 0) { source = "api"; }
5163 this.removePivotColumns([key], source);
5164 };
5165 ColumnModel.prototype.setPrimaryColumnList = function (colKeys, masterList, eventName, columnCallback, source) {
5166 var _this = this;
5167 masterList.length = 0;
5168 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(colKeys)) {
5169 colKeys.forEach(function (key) {
5170 var column = _this.getPrimaryColumn(key);
5171 if (column) {
5172 masterList.push(column);
5173 }
5174 });
5175 }
5176 (this.primaryColumns || []).forEach(function (column) {
5177 var added = masterList.indexOf(column) >= 0;
5178 columnCallback(added, column);
5179 });
5180 if (this.autoGroupsNeedBuilding) {
5181 this.updateGridColumns();
5182 }
5183 this.updateDisplayedColumns(source);
5184 this.fireColumnEvent(eventName, masterList, source);
5185 };
5186 ColumnModel.prototype.setValueColumns = function (colKeys, source) {
5187 if (source === void 0) { source = "api"; }
5188 this.setPrimaryColumnList(colKeys, this.valueColumns, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, this.setValueActive.bind(this), source);
5189 };
5190 ColumnModel.prototype.setValueActive = function (active, column, source) {
5191 if (active === column.isValueActive()) {
5192 return;
5193 }
5194 column.setValueActive(active, source);
5195 if (active && !column.getAggFunc()) {
5196 var initialAggFunc = this.aggFuncService.getDefaultAggFunc(column);
5197 column.setAggFunc(initialAggFunc);
5198 }
5199 };
5200 ColumnModel.prototype.addValueColumns = function (keys, source) {
5201 if (source === void 0) { source = "api"; }
5202 this.updatePrimaryColumnList(keys, this.valueColumns, true, this.setValueActive.bind(this, true), _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, source);
5203 };
5204 ColumnModel.prototype.addValueColumn = function (colKey, source) {
5205 if (source === void 0) { source = "api"; }
5206 if (colKey) {
5207 this.addValueColumns([colKey], source);
5208 }
5209 };
5210 ColumnModel.prototype.removeValueColumn = function (colKey, source) {
5211 if (source === void 0) { source = "api"; }
5212 this.removeValueColumns([colKey], source);
5213 };
5214 ColumnModel.prototype.removeValueColumns = function (keys, source) {
5215 if (source === void 0) { source = "api"; }
5216 this.updatePrimaryColumnList(keys, this.valueColumns, false, this.setValueActive.bind(this, false), _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, source);
5217 };
5218 // returns the width we can set to this col, taking into consideration min and max widths
5219 ColumnModel.prototype.normaliseColumnWidth = function (column, newWidth) {
5220 var minWidth = column.getMinWidth();
5221 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(minWidth) && newWidth < minWidth) {
5222 newWidth = minWidth;
5223 }
5224 var maxWidth = column.getMaxWidth();
5225 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(maxWidth) && column.isGreaterThanMax(newWidth)) {
5226 newWidth = maxWidth;
5227 }
5228 return newWidth;
5229 };
5230 ColumnModel.prototype.getPrimaryOrGridColumn = function (key) {
5231 var column = this.getPrimaryColumn(key);
5232 return column || this.getGridColumn(key);
5233 };
5234 ColumnModel.prototype.setColumnWidths = function (columnWidths, shiftKey, // @takeFromAdjacent - if user has 'shift' pressed, then pixels are taken from adjacent column
5235 finished, // @finished - ends up in the event, tells the user if more events are to come
5236 source) {
5237 var _this = this;
5238 if (source === void 0) { source = "api"; }
5239 var sets = [];
5240 columnWidths.forEach(function (columnWidth) {
5241 var col = _this.getPrimaryOrGridColumn(columnWidth.key);
5242 if (!col) {
5243 return;
5244 }
5245 sets.push({
5246 width: columnWidth.newWidth,
5247 ratios: [1],
5248 columns: [col]
5249 });
5250 // if user wants to do shift resize by default, then we invert the shift operation
5251 var defaultIsShift = _this.gridOptionsWrapper.getColResizeDefault() === 'shift';
5252 if (defaultIsShift) {
5253 shiftKey = !shiftKey;
5254 }
5255 if (shiftKey) {
5256 var otherCol = _this.getDisplayedColAfter(col);
5257 if (!otherCol) {
5258 return;
5259 }
5260 var widthDiff = col.getActualWidth() - columnWidth.newWidth;
5261 var otherColWidth = otherCol.getActualWidth() + widthDiff;
5262 sets.push({
5263 width: otherColWidth,
5264 ratios: [1],
5265 columns: [otherCol]
5266 });
5267 }
5268 });
5269 if (sets.length === 0) {
5270 return;
5271 }
5272 this.resizeColumnSets({
5273 resizeSets: sets,
5274 finished: finished,
5275 source: source
5276 });
5277 };
5278 ColumnModel.prototype.checkMinAndMaxWidthsForSet = function (columnResizeSet) {
5279 var columns = columnResizeSet.columns, width = columnResizeSet.width;
5280 // every col has a min width, so sum them all up and see if we have enough room
5281 // for all the min widths
5282 var minWidthAccumulated = 0;
5283 var maxWidthAccumulated = 0;
5284 var maxWidthActive = true;
5285 columns.forEach(function (col) {
5286 var minWidth = col.getMinWidth();
5287 minWidthAccumulated += minWidth || 0;
5288 var maxWidth = col.getMaxWidth();
5289 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(maxWidth) && maxWidth > 0) {
5290 maxWidthAccumulated += maxWidth;
5291 }
5292 else {
5293 // if at least one columns has no max width, it means the group of columns
5294 // then has no max width, as at least one column can take as much width as possible
5295 maxWidthActive = false;
5296 }
5297 });
5298 var minWidthPasses = width >= minWidthAccumulated;
5299 var maxWidthPasses = !maxWidthActive || (width <= maxWidthAccumulated);
5300 return minWidthPasses && maxWidthPasses;
5301 };
5302 // method takes sets of columns and resizes them. either all sets will be resized, or nothing
5303 // be resized. this is used for example when user tries to resize a group and holds shift key,
5304 // then both the current group (grows), and the adjacent group (shrinks), will get resized,
5305 // so that's two sets for this method.
5306 ColumnModel.prototype.resizeColumnSets = function (params) {
5307 var _this = this;
5308 var resizeSets = params.resizeSets, finished = params.finished, source = params.source;
5309 var passMinMaxCheck = !resizeSets || resizeSets.every(function (columnResizeSet) { return _this.checkMinAndMaxWidthsForSet(columnResizeSet); });
5310 if (!passMinMaxCheck) {
5311 // even though we are not going to resize beyond min/max size, we still need to raise event when finished
5312 if (finished) {
5313 var columns = resizeSets && resizeSets.length > 0 ? resizeSets[0].columns : null;
5314 this.fireColumnResizedEvent(columns, finished, source);
5315 }
5316 return; // don't resize!
5317 }
5318 var changedCols = [];
5319 var allResizedCols = [];
5320 resizeSets.forEach(function (set) {
5321 var width = set.width, columns = set.columns, ratios = set.ratios;
5322 // keep track of pixels used, and last column gets the remaining,
5323 // to cater for rounding errors, and min width adjustments
5324 var newWidths = {};
5325 var finishedCols = {};
5326 columns.forEach(function (col) { return allResizedCols.push(col); });
5327 // the loop below goes through each col. if a col exceeds it's min/max width,
5328 // it then gets set to its min/max width and the column is removed marked as 'finished'
5329 // and the calculation is done again leaving this column out. take for example columns
5330 // {A, width: 50, maxWidth: 100}
5331 // {B, width: 50}
5332 // {C, width: 50}
5333 // and then the set is set to width 600 - on the first pass the grid tries to set each column
5334 // to 200. it checks A and sees 200 > 100 and so sets the width to 100. col A is then marked
5335 // as 'finished' and the calculation is done again with the remaining cols B and C, which end up
5336 // splitting the remaining 500 pixels.
5337 var finishedColsGrew = true;
5338 var loopCount = 0;
5339 var _loop_2 = function () {
5340 loopCount++;
5341 if (loopCount > 1000) {
5342 // this should never happen, but in the future, someone might introduce a bug here,
5343 // so we stop the browser from hanging and report bug properly
5344 console.error('AG Grid: infinite loop in resizeColumnSets');
5345 return "break";
5346 }
5347 finishedColsGrew = false;
5348 var subsetCols = [];
5349 var subsetRatioTotal = 0;
5350 var pixelsToDistribute = width;
5351 columns.forEach(function (col, index) {
5352 var thisColFinished = finishedCols[col.getId()];
5353 if (thisColFinished) {
5354 pixelsToDistribute -= newWidths[col.getId()];
5355 }
5356 else {
5357 subsetCols.push(col);
5358 var ratioThisCol = ratios[index];
5359 subsetRatioTotal += ratioThisCol;
5360 }
5361 });
5362 // because we are not using all of the ratios (cols can be missing),
5363 // we scale the ratio. if all columns are included, then subsetRatioTotal=1,
5364 // and so the ratioScale will be 1.
5365 var ratioScale = 1 / subsetRatioTotal;
5366 subsetCols.forEach(function (col, index) {
5367 var lastCol = index === (subsetCols.length - 1);
5368 var colNewWidth;
5369 if (lastCol) {
5370 colNewWidth = pixelsToDistribute;
5371 }
5372 else {
5373 colNewWidth = Math.round(ratios[index] * width * ratioScale);
5374 pixelsToDistribute -= colNewWidth;
5375 }
5376 var minWidth = col.getMinWidth();
5377 var maxWidth = col.getMaxWidth();
5378 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(minWidth) && colNewWidth < minWidth) {
5379 colNewWidth = minWidth;
5380 finishedCols[col.getId()] = true;
5381 finishedColsGrew = true;
5382 }
5383 else if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(maxWidth) && maxWidth > 0 && colNewWidth > maxWidth) {
5384 colNewWidth = maxWidth;
5385 finishedCols[col.getId()] = true;
5386 finishedColsGrew = true;
5387 }
5388 newWidths[col.getId()] = colNewWidth;
5389 });
5390 };
5391 while (finishedColsGrew) {
5392 var state_1 = _loop_2();
5393 if (state_1 === "break")
5394 break;
5395 }
5396 columns.forEach(function (col) {
5397 var newWidth = newWidths[col.getId()];
5398 var actualWidth = col.getActualWidth();
5399 if (actualWidth !== newWidth) {
5400 col.setActualWidth(newWidth, source);
5401 changedCols.push(col);
5402 }
5403 });
5404 });
5405 // if no cols changed, then no need to update more or send event.
5406 var atLeastOneColChanged = changedCols.length > 0;
5407 var flexedCols = [];
5408 if (atLeastOneColChanged) {
5409 flexedCols = this.refreshFlexedColumns({ resizingCols: allResizedCols, skipSetLeft: true });
5410 this.setLeftValues(source);
5411 this.updateBodyWidths();
5412 this.checkViewportColumns();
5413 }
5414 // check for change first, to avoid unnecessary firing of events
5415 // however we always fire 'finished' events. this is important
5416 // when groups are resized, as if the group is changing slowly,
5417 // eg 1 pixel at a time, then each change will fire change events
5418 // in all the columns in the group, but only one with get the pixel.
5419 var colsForEvent = allResizedCols.concat(flexedCols);
5420 if (atLeastOneColChanged || finished) {
5421 this.fireColumnResizedEvent(colsForEvent, finished, source, flexedCols);
5422 }
5423 };
5424 ColumnModel.prototype.setColumnAggFunc = function (key, aggFunc, source) {
5425 if (source === void 0) { source = "api"; }
5426 if (!key) {
5427 return;
5428 }
5429 var column = this.getPrimaryColumn(key);
5430 if (!column) {
5431 return;
5432 }
5433 column.setAggFunc(aggFunc);
5434 this.fireColumnEvent(_events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, [column], source);
5435 };
5436 ColumnModel.prototype.fireColumnEvent = function (type, columns, source) {
5437 var event = {
5438 type: type,
5439 columns: columns,
5440 column: (columns && columns.length == 1) ? columns[0] : null,
5441 api: this.gridApi,
5442 columnApi: this.columnApi,
5443 source: source
5444 };
5445 this.eventService.dispatchEvent(event);
5446 };
5447 ColumnModel.prototype.moveRowGroupColumn = function (fromIndex, toIndex, source) {
5448 if (source === void 0) { source = "api"; }
5449 var column = this.rowGroupColumns[fromIndex];
5450 this.rowGroupColumns.splice(fromIndex, 1);
5451 this.rowGroupColumns.splice(toIndex, 0, column);
5452 var event = {
5453 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED,
5454 columns: this.rowGroupColumns,
5455 column: this.rowGroupColumns.length === 1 ? this.rowGroupColumns[0] : null,
5456 api: this.gridApi,
5457 columnApi: this.columnApi,
5458 source: source
5459 };
5460 this.eventService.dispatchEvent(event);
5461 };
5462 ColumnModel.prototype.moveColumns = function (columnsToMoveKeys, toIndex, source) {
5463 if (source === void 0) { source = "api"; }
5464 this.columnAnimationService.start();
5465 if (toIndex > this.gridColumns.length - columnsToMoveKeys.length) {
5466 console.warn('AG Grid: tried to insert columns in invalid location, toIndex = ' + toIndex);
5467 console.warn('AG Grid: remember that you should not count the moving columns when calculating the new index');
5468 return;
5469 }
5470 // we want to pull all the columns out first and put them into an ordered list
5471 var columnsToMove = this.getGridColumns(columnsToMoveKeys);
5472 var failedRules = !this.doesMovePassRules(columnsToMove, toIndex);
5473 if (failedRules) {
5474 return;
5475 }
5476 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["moveInArray"])(this.gridColumns, columnsToMove, toIndex);
5477 this.updateDisplayedColumns(source);
5478 var event = {
5479 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_MOVED,
5480 columns: columnsToMove,
5481 column: columnsToMove.length === 1 ? columnsToMove[0] : null,
5482 toIndex: toIndex,
5483 api: this.gridApi,
5484 columnApi: this.columnApi,
5485 source: source
5486 };
5487 this.eventService.dispatchEvent(event);
5488 this.columnAnimationService.finish();
5489 };
5490 ColumnModel.prototype.doesMovePassRules = function (columnsToMove, toIndex) {
5491 // make a copy of what the grid columns would look like after the move
5492 var proposedColumnOrder = this.gridColumns.slice();
5493 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["moveInArray"])(proposedColumnOrder, columnsToMove, toIndex);
5494 // then check that the new proposed order of the columns passes all rules
5495 if (!this.doesMovePassMarryChildren(proposedColumnOrder)) {
5496 return false;
5497 }
5498 if (!this.doesMovePassLockedPositions(proposedColumnOrder)) {
5499 return false;
5500 }
5501 return true;
5502 };
5503 // returns the provided cols sorted in same order as they appear in grid columns. eg if grid columns
5504 // contains [a,b,c,d,e] and col passed is [e,a] then the passed cols are sorted into [a,e]
5505 ColumnModel.prototype.sortColumnsLikeGridColumns = function (cols) {
5506 var _this = this;
5507 if (!cols || cols.length <= 1) {
5508 return;
5509 }
5510 var notAllColsInGridColumns = cols.filter(function (c) { return _this.gridColumns.indexOf(c) < 0; }).length > 0;
5511 if (notAllColsInGridColumns) {
5512 return;
5513 }
5514 cols.sort(function (a, b) {
5515 var indexA = _this.gridColumns.indexOf(a);
5516 var indexB = _this.gridColumns.indexOf(b);
5517 return indexA - indexB;
5518 });
5519 };
5520 ColumnModel.prototype.doesMovePassLockedPositions = function (proposedColumnOrder) {
5521 // Placement is a number indicating 'left' 'center' or 'right' as 0 1 2
5522 var lastPlacement = 0;
5523 var rulePassed = true;
5524 var lockPositionToPlacement = function (position) {
5525 if (!position) { // false or undefined
5526 return 1;
5527 }
5528 if (position === true) {
5529 return 0;
5530 }
5531 return position === 'left' ? 0 : 2; // Otherwise 'right'
5532 };
5533 proposedColumnOrder.forEach(function (col) {
5534 var placement = lockPositionToPlacement(col.getColDef().lockPosition);
5535 if (placement < lastPlacement) { // If placement goes down, we're not in the correct order
5536 rulePassed = false;
5537 }
5538 lastPlacement = placement;
5539 });
5540 return rulePassed;
5541 };
5542 ColumnModel.prototype.doesMovePassMarryChildren = function (allColumnsCopy) {
5543 var rulePassed = true;
5544 this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (child) {
5545 if (!(child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"])) {
5546 return;
5547 }
5548 var columnGroup = child;
5549 var colGroupDef = columnGroup.getColGroupDef();
5550 var marryChildren = colGroupDef && colGroupDef.marryChildren;
5551 if (!marryChildren) {
5552 return;
5553 }
5554 var newIndexes = [];
5555 columnGroup.getLeafColumns().forEach(function (col) {
5556 var newColIndex = allColumnsCopy.indexOf(col);
5557 newIndexes.push(newColIndex);
5558 });
5559 var maxIndex = Math.max.apply(Math, newIndexes);
5560 var minIndex = Math.min.apply(Math, newIndexes);
5561 // spread is how far the first column in this group is away from the last column
5562 var spread = maxIndex - minIndex;
5563 var maxSpread = columnGroup.getLeafColumns().length - 1;
5564 // if the columns
5565 if (spread > maxSpread) {
5566 rulePassed = false;
5567 }
5568 // console.log(`maxIndex = ${maxIndex}, minIndex = ${minIndex}, spread = ${spread}, maxSpread = ${maxSpread}, fail = ${spread > (count-1)}`)
5569 // console.log(allColumnsCopy.map( col => col.getColDef().field).join(','));
5570 });
5571 return rulePassed;
5572 };
5573 ColumnModel.prototype.moveColumn = function (key, toIndex, source) {
5574 if (source === void 0) { source = "api"; }
5575 this.moveColumns([key], toIndex, source);
5576 };
5577 ColumnModel.prototype.moveColumnByIndex = function (fromIndex, toIndex, source) {
5578 if (source === void 0) { source = "api"; }
5579 var column = this.gridColumns[fromIndex];
5580 this.moveColumn(column, toIndex, source);
5581 };
5582 ColumnModel.prototype.getColumnDefs = function () {
5583 var _this = this;
5584 if (!this.primaryColumns) {
5585 return;
5586 }
5587 var cols = this.primaryColumns.slice();
5588 if (this.gridColsArePrimary) {
5589 cols.sort(function (a, b) { return _this.gridColumns.indexOf(a) - _this.gridColumns.indexOf(b); });
5590 }
5591 else if (this.lastPrimaryOrder) {
5592 cols.sort(function (a, b) { return _this.lastPrimaryOrder.indexOf(a) - _this.lastPrimaryOrder.indexOf(b); });
5593 }
5594 return this.columnDefFactory.buildColumnDefs(cols, this.rowGroupColumns, this.pivotColumns);
5595 };
5596 // used by:
5597 // + angularGrid -> for setting body width
5598 // + rowController -> setting main row widths (when inserting and resizing)
5599 // need to cache this
5600 ColumnModel.prototype.getBodyContainerWidth = function () {
5601 return this.bodyWidth;
5602 };
5603 ColumnModel.prototype.getContainerWidth = function (pinned) {
5604 switch (pinned) {
5605 case _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_LEFT:
5606 return this.leftWidth;
5607 case _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_RIGHT:
5608 return this.rightWidth;
5609 default:
5610 return this.bodyWidth;
5611 }
5612 };
5613 // after setColumnWidth or updateGroupsAndDisplayedColumns
5614 ColumnModel.prototype.updateBodyWidths = function () {
5615 var newBodyWidth = this.getWidthOfColsInList(this.displayedColumnsCenter);
5616 var newLeftWidth = this.getWidthOfColsInList(this.displayedColumnsLeft);
5617 var newRightWidth = this.getWidthOfColsInList(this.displayedColumnsRight);
5618 // this is used by virtual col calculation, for RTL only, as a change to body width can impact displayed
5619 // columns, due to RTL inverting the y coordinates
5620 this.bodyWidthDirty = this.bodyWidth !== newBodyWidth;
5621 var atLeastOneChanged = this.bodyWidth !== newBodyWidth || this.leftWidth !== newLeftWidth || this.rightWidth !== newRightWidth;
5622 if (atLeastOneChanged) {
5623 this.bodyWidth = newBodyWidth;
5624 this.leftWidth = newLeftWidth;
5625 this.rightWidth = newRightWidth;
5626 // when this fires, it is picked up by the gridPanel, which ends up in
5627 // gridPanel calling setWidthAndScrollPosition(), which in turn calls setViewportPosition()
5628 var event_3 = {
5629 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,
5630 api: this.gridApi,
5631 columnApi: this.columnApi
5632 };
5633 this.eventService.dispatchEvent(event_3);
5634 }
5635 };
5636 // + rowController
5637 ColumnModel.prototype.getValueColumns = function () {
5638 return this.valueColumns ? this.valueColumns : [];
5639 };
5640 // + rowController
5641 ColumnModel.prototype.getPivotColumns = function () {
5642 return this.pivotColumns ? this.pivotColumns : [];
5643 };
5644 // + clientSideRowModel
5645 ColumnModel.prototype.isPivotActive = function () {
5646 return this.pivotColumns && this.pivotColumns.length > 0 && this.pivotMode;
5647 };
5648 // + toolPanel
5649 ColumnModel.prototype.getRowGroupColumns = function () {
5650 return this.rowGroupColumns ? this.rowGroupColumns : [];
5651 };
5652 // + rowController -> while inserting rows
5653 ColumnModel.prototype.getDisplayedCenterColumns = function () {
5654 return this.displayedColumnsCenter;
5655 };
5656 // + rowController -> while inserting rows
5657 ColumnModel.prototype.getDisplayedLeftColumns = function () {
5658 return this.displayedColumnsLeft;
5659 };
5660 ColumnModel.prototype.getDisplayedRightColumns = function () {
5661 return this.displayedColumnsRight;
5662 };
5663 ColumnModel.prototype.getDisplayedColumns = function (type) {
5664 switch (type) {
5665 case _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_LEFT:
5666 return this.getDisplayedLeftColumns();
5667 case _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_RIGHT:
5668 return this.getDisplayedRightColumns();
5669 default:
5670 return this.getDisplayedCenterColumns();
5671 }
5672 };
5673 // used by:
5674 // + clientSideRowController -> sorting, building quick filter text
5675 // + headerRenderer -> sorting (clearing icon)
5676 ColumnModel.prototype.getAllPrimaryColumns = function () {
5677 return this.primaryColumns ? this.primaryColumns.slice() : null;
5678 };
5679 ColumnModel.prototype.getSecondaryColumns = function () {
5680 return this.secondaryColumns ? this.secondaryColumns.slice() : null;
5681 };
5682 ColumnModel.prototype.getAllColumnsForQuickFilter = function () {
5683 return this.columnsForQuickFilter;
5684 };
5685 // + moveColumnController
5686 ColumnModel.prototype.getAllGridColumns = function () {
5687 return this.gridColumns;
5688 };
5689 ColumnModel.prototype.isEmpty = function () {
5690 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missingOrEmpty"])(this.gridColumns);
5691 };
5692 ColumnModel.prototype.isRowGroupEmpty = function () {
5693 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missingOrEmpty"])(this.rowGroupColumns);
5694 };
5695 ColumnModel.prototype.setColumnVisible = function (key, visible, source) {
5696 if (source === void 0) { source = "api"; }
5697 this.setColumnsVisible([key], visible, source);
5698 };
5699 ColumnModel.prototype.setColumnsVisible = function (keys, visible, source) {
5700 var _this = this;
5701 if (visible === void 0) { visible = false; }
5702 if (source === void 0) { source = "api"; }
5703 this.columnAnimationService.start();
5704 this.actionOnGridColumns(keys, function (column) {
5705 if (column.isVisible() !== visible) {
5706 column.setVisible(visible, source);
5707 return true;
5708 }
5709 return false;
5710 }, source, function () {
5711 var event = {
5712 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VISIBLE,
5713 visible: visible,
5714 column: null,
5715 columns: null,
5716 api: _this.gridApi,
5717 columnApi: _this.columnApi,
5718 source: source
5719 };
5720 return event;
5721 });
5722 this.columnAnimationService.finish();
5723 };
5724 ColumnModel.prototype.setColumnPinned = function (key, pinned, source) {
5725 if (source === void 0) { source = "api"; }
5726 if (key) {
5727 this.setColumnsPinned([key], pinned, source);
5728 }
5729 };
5730 ColumnModel.prototype.setColumnsPinned = function (keys, pinned, source) {
5731 var _this = this;
5732 if (source === void 0) { source = "api"; }
5733 if (this.gridOptionsWrapper.getDomLayout() === 'print') {
5734 console.warn("Changing the column pinning status is not allowed with domLayout='print'");
5735 return;
5736 }
5737 this.columnAnimationService.start();
5738 var actualPinned;
5739 if (pinned === true || pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_LEFT) {
5740 actualPinned = _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_LEFT;
5741 }
5742 else if (pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_RIGHT) {
5743 actualPinned = _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_RIGHT;
5744 }
5745 else {
5746 actualPinned = null;
5747 }
5748 this.actionOnGridColumns(keys, function (col) {
5749 if (col.getPinned() !== actualPinned) {
5750 col.setPinned(actualPinned);
5751 return true;
5752 }
5753 return false;
5754 }, source, function () {
5755 var event = {
5756 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PINNED,
5757 pinned: actualPinned,
5758 column: null,
5759 columns: null,
5760 api: _this.gridApi,
5761 columnApi: _this.columnApi,
5762 source: source
5763 };
5764 return event;
5765 });
5766 this.columnAnimationService.finish();
5767 };
5768 // does an action on a set of columns. provides common functionality for looking up the
5769 // columns based on key, getting a list of effected columns, and then updated the event
5770 // with either one column (if it was just one col) or a list of columns
5771 // used by: autoResize, setVisible, setPinned
5772 ColumnModel.prototype.actionOnGridColumns = function (// the column keys this action will be on
5773 keys,
5774 // the action to do - if this returns false, the column was skipped
5775 // and won't be included in the event
5776 action,
5777 // should return back a column event of the right type
5778 source, createEvent) {
5779 var _this = this;
5780 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missingOrEmpty"])(keys)) {
5781 return;
5782 }
5783 var updatedColumns = [];
5784 keys.forEach(function (key) {
5785 var column = _this.getGridColumn(key);
5786 if (!column) {
5787 return;
5788 }
5789 // need to check for false with type (ie !== instead of !=)
5790 // as not returning anything (undefined) would also be false
5791 var resultOfAction = action(column);
5792 if (resultOfAction !== false) {
5793 updatedColumns.push(column);
5794 }
5795 });
5796 if (!updatedColumns.length) {
5797 return;
5798 }
5799 this.updateDisplayedColumns(source);
5800 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(createEvent) && createEvent) {
5801 var event_4 = createEvent();
5802 event_4.columns = updatedColumns;
5803 event_4.column = updatedColumns.length === 1 ? updatedColumns[0] : null;
5804 this.eventService.dispatchEvent(event_4);
5805 }
5806 };
5807 ColumnModel.prototype.getDisplayedColBefore = function (col) {
5808 var allDisplayedColumns = this.getAllDisplayedColumns();
5809 var oldIndex = allDisplayedColumns.indexOf(col);
5810 if (oldIndex > 0) {
5811 return allDisplayedColumns[oldIndex - 1];
5812 }
5813 return null;
5814 };
5815 // used by:
5816 // + rowRenderer -> for navigation
5817 ColumnModel.prototype.getDisplayedColAfter = function (col) {
5818 var allDisplayedColumns = this.getAllDisplayedColumns();
5819 var oldIndex = allDisplayedColumns.indexOf(col);
5820 if (oldIndex < (allDisplayedColumns.length - 1)) {
5821 return allDisplayedColumns[oldIndex + 1];
5822 }
5823 return null;
5824 };
5825 ColumnModel.prototype.getDisplayedGroupAfter = function (columnGroup) {
5826 return this.getDisplayedGroupAtDirection(columnGroup, 'After');
5827 };
5828 ColumnModel.prototype.getDisplayedGroupBefore = function (columnGroup) {
5829 return this.getDisplayedGroupAtDirection(columnGroup, 'Before');
5830 };
5831 ColumnModel.prototype.getDisplayedGroupAtDirection = function (columnGroup, direction) {
5832 // pick the last displayed column in this group
5833 var requiredLevel = columnGroup.getProvidedColumnGroup().getLevel() + columnGroup.getPaddingLevel();
5834 var colGroupLeafColumns = columnGroup.getDisplayedLeafColumns();
5835 var col = direction === 'After' ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["last"])(colGroupLeafColumns) : colGroupLeafColumns[0];
5836 var getDisplayColMethod = "getDisplayedCol" + direction;
5837 while (true) {
5838 // keep moving to the next col, until we get to another group
5839 var column = this[getDisplayColMethod](col);
5840 if (!column) {
5841 return null;
5842 }
5843 var groupPointer = this.getColumnGroupAtLevel(column, requiredLevel);
5844 if (groupPointer !== columnGroup) {
5845 return groupPointer;
5846 }
5847 }
5848 };
5849 ColumnModel.prototype.getColumnGroupAtLevel = function (column, level) {
5850 // get group at same level as the one we are looking for
5851 var groupPointer = column.getParent();
5852 var originalGroupLevel;
5853 var groupPointerLevel;
5854 while (true) {
5855 var groupPointerProvidedColumnGroup = groupPointer.getProvidedColumnGroup();
5856 originalGroupLevel = groupPointerProvidedColumnGroup.getLevel();
5857 groupPointerLevel = groupPointer.getPaddingLevel();
5858 if (originalGroupLevel + groupPointerLevel <= level) {
5859 break;
5860 }
5861 groupPointer = groupPointer.getParent();
5862 }
5863 return groupPointer;
5864 };
5865 ColumnModel.prototype.isPinningLeft = function () {
5866 return this.displayedColumnsLeft.length > 0;
5867 };
5868 ColumnModel.prototype.isPinningRight = function () {
5869 return this.displayedColumnsRight.length > 0;
5870 };
5871 ColumnModel.prototype.getPrimaryAndSecondaryAndAutoColumns = function () {
5872 var _a;
5873 return (_a = []).concat.apply(_a, __spread([
5874 this.primaryColumns || [],
5875 this.groupAutoColumns || [],
5876 this.secondaryColumns || [],
5877 ]));
5878 };
5879 ColumnModel.prototype.getPrimaryAndAutoGroupCols = function () {
5880 var _a;
5881 return (_a = []).concat.apply(_a, __spread([
5882 this.primaryColumns || [],
5883 this.groupAutoColumns || [],
5884 ]));
5885 };
5886 ColumnModel.prototype.getPrimaryAndSecondaryColumns = function () {
5887 var _a;
5888 return (_a = []).concat.apply(_a, __spread([
5889 this.primaryColumns || [],
5890 this.secondaryColumns || [],
5891 ]));
5892 };
5893 ColumnModel.prototype.createStateItemFromColumn = function (column) {
5894 var rowGroupIndex = column.isRowGroupActive() ? this.rowGroupColumns.indexOf(column) : null;
5895 var pivotIndex = column.isPivotActive() ? this.pivotColumns.indexOf(column) : null;
5896 var aggFunc = column.isValueActive() ? column.getAggFunc() : null;
5897 var sort = column.getSort() != null ? column.getSort() : null;
5898 var sortIndex = column.getSortIndex() != null ? column.getSortIndex() : null;
5899 var flex = column.getFlex() != null && column.getFlex() > 0 ? column.getFlex() : null;
5900 var res = {
5901 colId: column.getColId(),
5902 width: column.getActualWidth(),
5903 hide: !column.isVisible(),
5904 pinned: column.getPinned(),
5905 sort: sort,
5906 sortIndex: sortIndex,
5907 aggFunc: aggFunc,
5908 rowGroup: column.isRowGroupActive(),
5909 rowGroupIndex: rowGroupIndex,
5910 pivot: column.isPivotActive(),
5911 pivotIndex: pivotIndex,
5912 flex: flex
5913 };
5914 return res;
5915 };
5916 ColumnModel.prototype.getColumnState = function () {
5917 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.primaryColumns) || !this.isAlive()) {
5918 return [];
5919 }
5920 var colsForState = this.getPrimaryAndSecondaryAndAutoColumns();
5921 var res = colsForState.map(this.createStateItemFromColumn.bind(this));
5922 this.orderColumnStateList(res);
5923 return res;
5924 };
5925 ColumnModel.prototype.orderColumnStateList = function (columnStateList) {
5926 // for fast looking, store the index of each column
5927 var colIdToGridIndexMap = Object(_utils_map__WEBPACK_IMPORTED_MODULE_11__["convertToMap"])(this.gridColumns.map(function (col, index) { return [col.getColId(), index]; }));
5928 columnStateList.sort(function (itemA, itemB) {
5929 var posA = colIdToGridIndexMap.has(itemA.colId) ? colIdToGridIndexMap.get(itemA.colId) : -1;
5930 var posB = colIdToGridIndexMap.has(itemB.colId) ? colIdToGridIndexMap.get(itemB.colId) : -1;
5931 return posA - posB;
5932 });
5933 };
5934 ColumnModel.prototype.resetColumnState = function (source) {
5935 // NOTE = there is one bug here that no customer has noticed - if a column has colDef.lockPosition,
5936 // this is ignored below when ordering the cols. to work, we should always put lockPosition cols first.
5937 // As a work around, developers should just put lockPosition columns first in their colDef list.
5938 if (source === void 0) { source = "api"; }
5939 // we can't use 'allColumns' as the order might of messed up, so get the primary ordered list
5940 var primaryColumns = this.getColumnsFromTree(this.primaryColumnTree);
5941 var columnStates = [];
5942 // we start at 1000, so if user has mix of rowGroup and group specified, it will work with both.
5943 // eg IF user has ColA.rowGroupIndex=0, ColB.rowGroupIndex=1, ColC.rowGroup=true,
5944 // THEN result will be ColA.rowGroupIndex=0, ColB.rowGroupIndex=1, ColC.rowGroup=1000
5945 var letRowGroupIndex = 1000;
5946 var letPivotIndex = 1000;
5947 var colsToProcess = [];
5948 if (this.groupAutoColumns) {
5949 colsToProcess = colsToProcess.concat(this.groupAutoColumns);
5950 }
5951 if (primaryColumns) {
5952 colsToProcess = colsToProcess.concat(primaryColumns);
5953 }
5954 colsToProcess.forEach(function (column) {
5955 var getValueOrNull = function (a, b) { return a != null ? a : b != null ? b : null; };
5956 var colDef = column.getColDef();
5957 var sort = getValueOrNull(colDef.sort, colDef.initialSort);
5958 var sortIndex = getValueOrNull(colDef.sortIndex, colDef.initialSortIndex);
5959 var hide = getValueOrNull(colDef.hide, colDef.initialHide);
5960 var pinned = getValueOrNull(colDef.pinned, colDef.initialPinned);
5961 var width = getValueOrNull(colDef.width, colDef.initialWidth);
5962 var flex = getValueOrNull(colDef.flex, colDef.initialFlex);
5963 var rowGroupIndex = getValueOrNull(colDef.rowGroupIndex, colDef.initialRowGroupIndex);
5964 var rowGroup = getValueOrNull(colDef.rowGroup, colDef.initialRowGroup);
5965 if (rowGroupIndex == null && (rowGroup == null || rowGroup == false)) {
5966 rowGroupIndex = null;
5967 rowGroup = null;
5968 }
5969 var pivotIndex = getValueOrNull(colDef.pivotIndex, colDef.initialPivotIndex);
5970 var pivot = getValueOrNull(colDef.pivot, colDef.initialPivot);
5971 if (pivotIndex == null && (pivot == null || pivot == false)) {
5972 pivotIndex = null;
5973 pivot = null;
5974 }
5975 var aggFunc = getValueOrNull(colDef.aggFunc, colDef.initialAggFunc);
5976 var stateItem = {
5977 colId: column.getColId(),
5978 sort: sort,
5979 sortIndex: sortIndex,
5980 hide: hide,
5981 pinned: pinned,
5982 width: width,
5983 flex: flex,
5984 rowGroup: rowGroup,
5985 rowGroupIndex: rowGroupIndex,
5986 pivot: pivot,
5987 pivotIndex: pivotIndex,
5988 aggFunc: aggFunc,
5989 };
5990 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(rowGroupIndex) && rowGroup) {
5991 stateItem.rowGroupIndex = letRowGroupIndex++;
5992 }
5993 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(pivotIndex) && pivot) {
5994 stateItem.pivotIndex = letPivotIndex++;
5995 }
5996 columnStates.push(stateItem);
5997 });
5998 this.applyColumnState({ state: columnStates, applyOrder: true }, source);
5999 };
6000 ColumnModel.prototype.applyColumnState = function (params, source) {
6001 var _this = this;
6002 if (source === void 0) { source = "api"; }
6003 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missingOrEmpty"])(this.primaryColumns)) {
6004 return false;
6005 }
6006 if (params && params.state && !params.state.forEach) {
6007 console.warn('AG Grid: applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.');
6008 return false;
6009 }
6010 var applyStates = function (states, existingColumns, getById) {
6011 var raiseEventsFunc = _this.compareColumnStatesAndRaiseEvents(source);
6012 _this.autoGroupsNeedBuilding = true;
6013 // at the end below, this list will have all columns we got no state for
6014 var columnsWithNoState = existingColumns.slice();
6015 var rowGroupIndexes = {};
6016 var pivotIndexes = {};
6017 var autoGroupColumnStates = [];
6018 // If pivoting is modified, these are the states we try to reapply after
6019 // the secondary columns are re-generated
6020 var unmatchedAndAutoStates = [];
6021 var unmatchedCount = 0;
6022 var previousRowGroupCols = _this.rowGroupColumns.slice();
6023 var previousPivotCols = _this.pivotColumns.slice();
6024 states.forEach(function (state) {
6025 var colId = state.colId || '';
6026 // auto group columns are re-created so deferring syncing with ColumnState
6027 var isAutoGroupColumn = colId.startsWith(_constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].GROUP_AUTO_COLUMN_ID);
6028 if (isAutoGroupColumn) {
6029 autoGroupColumnStates.push(state);
6030 unmatchedAndAutoStates.push(state);
6031 return;
6032 }
6033 var column = getById(colId);
6034 if (!column) {
6035 unmatchedAndAutoStates.push(state);
6036 unmatchedCount += 1;
6037 }
6038 else {
6039 _this.syncColumnWithStateItem(column, state, params.defaultState, rowGroupIndexes, pivotIndexes, false, source);
6040 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(columnsWithNoState, column);
6041 }
6042 });
6043 // anything left over, we got no data for, so add in the column as non-value, non-rowGroup and hidden
6044 var applyDefaultsFunc = function (col) {
6045 return _this.syncColumnWithStateItem(col, null, params.defaultState, rowGroupIndexes, pivotIndexes, false, source);
6046 };
6047 columnsWithNoState.forEach(applyDefaultsFunc);
6048 // sort the lists according to the indexes that were provided
6049 var comparator = function (indexes, oldList, colA, colB) {
6050 var indexA = indexes[colA.getId()];
6051 var indexB = indexes[colB.getId()];
6052 var aHasIndex = indexA != null;
6053 var bHasIndex = indexB != null;
6054 if (aHasIndex && bHasIndex) {
6055 // both a and b are new cols with index, so sort on index
6056 return indexA - indexB;
6057 }
6058 if (aHasIndex) {
6059 // a has an index, so it should be before a
6060 return -1;
6061 }
6062 if (bHasIndex) {
6063 // b has an index, so it should be before a
6064 return 1;
6065 }
6066 var oldIndexA = oldList.indexOf(colA);
6067 var oldIndexB = oldList.indexOf(colB);
6068 var aHasOldIndex = oldIndexA >= 0;
6069 var bHasOldIndex = oldIndexB >= 0;
6070 if (aHasOldIndex && bHasOldIndex) {
6071 // both a and b are old cols, so sort based on last order
6072 return oldIndexA - oldIndexB;
6073 }
6074 if (aHasOldIndex) {
6075 // a is old, b is new, so b is first
6076 return -1;
6077 }
6078 // this bit does matter, means both are new cols
6079 // but without index or that b is old and a is new
6080 return 1;
6081 };
6082 _this.rowGroupColumns.sort(comparator.bind(_this, rowGroupIndexes, previousRowGroupCols));
6083 _this.pivotColumns.sort(comparator.bind(_this, pivotIndexes, previousPivotCols));
6084 _this.updateGridColumns();
6085 // sync newly created auto group columns with ColumnState
6086 var autoGroupColsCopy = _this.groupAutoColumns ? _this.groupAutoColumns.slice() : [];
6087 autoGroupColumnStates.forEach(function (stateItem) {
6088 var autoCol = _this.getAutoColumn(stateItem.colId);
6089 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(autoGroupColsCopy, autoCol);
6090 _this.syncColumnWithStateItem(autoCol, stateItem, params.defaultState, null, null, true, source);
6091 });
6092 // autogroup cols with nothing else, apply the default
6093 autoGroupColsCopy.forEach(applyDefaultsFunc);
6094 _this.applyOrderAfterApplyState(params);
6095 _this.updateDisplayedColumns(source);
6096 _this.dispatchEverythingChanged(source);
6097 raiseEventsFunc(); // Will trigger secondary column changes if pivoting modified
6098 return { unmatchedAndAutoStates: unmatchedAndAutoStates, unmatchedCount: unmatchedCount };
6099 };
6100 this.columnAnimationService.start();
6101 var _a = applyStates(params.state || [], this.primaryColumns || [], function (id) { return _this.getPrimaryColumn(id); }), unmatchedAndAutoStates = _a.unmatchedAndAutoStates, unmatchedCount = _a.unmatchedCount;
6102 // If there are still states left over, see if we can apply them to newly generated
6103 // secondary or auto columns. Also if defaults exist, ensure they are applied to secondary cols
6104 if (unmatchedAndAutoStates.length > 0 || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(params.defaultState)) {
6105 unmatchedCount = applyStates(unmatchedAndAutoStates, this.secondaryColumns || [], function (id) { return _this.getSecondaryColumn(id); }).unmatchedCount;
6106 }
6107 this.columnAnimationService.finish();
6108 return unmatchedCount === 0; // Successful if no states unaccounted for
6109 };
6110 ColumnModel.prototype.applyOrderAfterApplyState = function (params) {
6111 var _this = this;
6112 if (!params.applyOrder || !params.state) {
6113 return;
6114 }
6115 var newOrder = [];
6116 var processedColIds = {};
6117 params.state.forEach(function (item) {
6118 if (!item.colId || processedColIds[item.colId]) {
6119 return;
6120 }
6121 var col = _this.gridColumnsMap[item.colId];
6122 if (col) {
6123 newOrder.push(col);
6124 processedColIds[item.colId] = true;
6125 }
6126 });
6127 // add in all other columns
6128 var autoGroupInsertIndex = 0;
6129 this.gridColumns.forEach(function (col) {
6130 var colId = col.getColId();
6131 var alreadyProcessed = processedColIds[colId] != null;
6132 if (alreadyProcessed) {
6133 return;
6134 }
6135 var isAutoGroupCol = colId.startsWith(_constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].GROUP_AUTO_COLUMN_ID);
6136 if (isAutoGroupCol) {
6137 // auto group columns, if missing from state list, are added to the start.
6138 // it's common to have autoGroup missing, as grouping could be on by default
6139 // on a column, but the user could of since removed the grouping via the UI.
6140 // if we don't inc the insert index, autoGroups will be inserted in reverse order
6141 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["insertIntoArray"])(newOrder, col, autoGroupInsertIndex++);
6142 }
6143 else {
6144 // normal columns, if missing from state list, are added at the end
6145 newOrder.push(col);
6146 }
6147 });
6148 // this is already done in updateGridColumns, however we changed the order above (to match the order of the state
6149 // columns) so we need to do it again. we could of put logic into the order above to take into account fixed
6150 // columns, however if we did then we would have logic for updating fixed columns twice. reusing the logic here
6151 // is less sexy for the code here, but it keeps consistency.
6152 newOrder = this.placeLockedColumns(newOrder);
6153 if (!this.doesMovePassMarryChildren(newOrder)) {
6154 console.warn('AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.');
6155 return;
6156 }
6157 this.gridColumns = newOrder;
6158 };
6159 ColumnModel.prototype.compareColumnStatesAndRaiseEvents = function (source) {
6160 var _this = this;
6161 var startState = {
6162 rowGroupColumns: this.rowGroupColumns.slice(),
6163 pivotColumns: this.pivotColumns.slice(),
6164 valueColumns: this.valueColumns.slice()
6165 };
6166 var columnStateBefore = this.getColumnState();
6167 var columnStateBeforeMap = {};
6168 columnStateBefore.forEach(function (col) {
6169 columnStateBeforeMap[col.colId] = col;
6170 });
6171 return function () {
6172 if (_this.gridOptionsWrapper.isSuppressColumnStateEvents()) {
6173 return;
6174 }
6175 var colsForState = _this.getPrimaryAndSecondaryAndAutoColumns();
6176 // raises generic ColumnEvents where all columns are returned rather than what has changed
6177 var raiseWhenListsDifferent = function (eventType, colsBefore, colsAfter, idMapper) {
6178 var beforeList = colsBefore.map(idMapper);
6179 var afterList = colsAfter.map(idMapper);
6180 var unchanged = Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["areEqual"])(beforeList, afterList);
6181 if (unchanged) {
6182 return;
6183 }
6184 // returning all columns rather than what has changed!
6185 var event = {
6186 type: eventType,
6187 columns: colsAfter,
6188 column: colsAfter.length === 1 ? colsAfter[0] : null,
6189 api: _this.gridApi,
6190 columnApi: _this.columnApi,
6191 source: source
6192 };
6193 _this.eventService.dispatchEvent(event);
6194 };
6195 // determines which columns have changed according to supplied predicate
6196 var getChangedColumns = function (changedPredicate) {
6197 var changedColumns = [];
6198 colsForState.forEach(function (column) {
6199 var colStateBefore = columnStateBeforeMap[column.getColId()];
6200 if (colStateBefore && changedPredicate(colStateBefore, column)) {
6201 changedColumns.push(column);
6202 }
6203 });
6204 return changedColumns;
6205 };
6206 var columnIdMapper = function (c) { return c.getColId(); };
6207 raiseWhenListsDifferent(_events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, startState.rowGroupColumns, _this.rowGroupColumns, columnIdMapper);
6208 raiseWhenListsDifferent(_events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_CHANGED, startState.pivotColumns, _this.pivotColumns, columnIdMapper);
6209 var valueChangePredicate = function (cs, c) {
6210 var oldActive = cs.aggFunc != null;
6211 var activeChanged = oldActive != c.isValueActive();
6212 // we only check aggFunc if the agg is active
6213 var aggFuncChanged = oldActive && cs.aggFunc != c.getAggFunc();
6214 return activeChanged || aggFuncChanged;
6215 };
6216 var changedValues = getChangedColumns(valueChangePredicate);
6217 if (changedValues.length > 0) {
6218 // we pass all value columns, now the ones that changed. this is the same
6219 // as pivot and rowGroup cols, but different to all other properties below.
6220 // this is more for backwards compatibility, as it's always been this way.
6221 // really it should be the other way, as the order of the cols makes no difference
6222 // for valueColumns (apart from displaying them in the tool panel).
6223 _this.fireColumnEvent(_events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, _this.valueColumns, source);
6224 }
6225 var resizeChangePredicate = function (cs, c) { return cs.width != c.getActualWidth(); };
6226 _this.fireColumnResizedEvent(getChangedColumns(resizeChangePredicate), true, source);
6227 var pinnedChangePredicate = function (cs, c) { return cs.pinned != c.getPinned(); };
6228 _this.raiseColumnPinnedEvent(getChangedColumns(pinnedChangePredicate), source);
6229 var visibilityChangePredicate = function (cs, c) { return cs.hide == c.isVisible(); };
6230 _this.raiseColumnVisibleEvent(getChangedColumns(visibilityChangePredicate), source);
6231 var sortChangePredicate = function (cs, c) { return cs.sort != c.getSort() || cs.sortIndex != c.getSortIndex(); };
6232 if (getChangedColumns(sortChangePredicate).length > 0) {
6233 _this.sortController.dispatchSortChangedEvents(source);
6234 }
6235 // special handling for moved column events
6236 _this.raiseColumnMovedEvent(columnStateBefore, source);
6237 };
6238 };
6239 ColumnModel.prototype.raiseColumnPinnedEvent = function (changedColumns, source) {
6240 if (!changedColumns.length) {
6241 return;
6242 }
6243 // if just one column, we use this, otherwise we don't include the col
6244 var column = changedColumns.length === 1 ? changedColumns[0] : null;
6245 // only include visible if it's common in all columns
6246 var pinned = this.getCommonValue(changedColumns, function (col) { return col.getPinned(); });
6247 var event = {
6248 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PINNED,
6249 // mistake in typing, 'undefined' should be allowed, as 'null' means 'not pinned'
6250 pinned: pinned != null ? pinned : null,
6251 columns: changedColumns,
6252 column: column,
6253 api: this.gridApi,
6254 columnApi: this.columnApi,
6255 source: source
6256 };
6257 this.eventService.dispatchEvent(event);
6258 };
6259 ColumnModel.prototype.getCommonValue = function (cols, valueGetter) {
6260 if (!cols || cols.length == 0) {
6261 return undefined;
6262 }
6263 // compare each value to the first value. if nothing differs, then value is common so return it.
6264 var firstValue = valueGetter(cols[0]);
6265 for (var i = 1; i < cols.length; i++) {
6266 if (firstValue !== valueGetter(cols[i])) {
6267 // values differ, no common value
6268 return undefined;
6269 }
6270 }
6271 return firstValue;
6272 };
6273 ColumnModel.prototype.raiseColumnVisibleEvent = function (changedColumns, source) {
6274 if (!changedColumns.length) {
6275 return;
6276 }
6277 // if just one column, we use this, otherwise we don't include the col
6278 var column = changedColumns.length === 1 ? changedColumns[0] : null;
6279 // only include visible if it's common in all columns
6280 var visible = this.getCommonValue(changedColumns, function (col) { return col.isVisible(); });
6281 var event = {
6282 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VISIBLE,
6283 visible: visible,
6284 columns: changedColumns,
6285 column: column,
6286 api: this.gridApi,
6287 columnApi: this.columnApi,
6288 source: source
6289 };
6290 this.eventService.dispatchEvent(event);
6291 };
6292 ColumnModel.prototype.raiseColumnMovedEvent = function (colStateBefore, source) {
6293 // we are only interested in columns that were both present and visible before and after
6294 var _this = this;
6295 var colStateAfter = this.getColumnState();
6296 var colStateAfterMapped = {};
6297 colStateAfter.forEach(function (s) { return colStateAfterMapped[s.colId] = s; });
6298 // get id's of cols in both before and after lists
6299 var colsIntersectIds = {};
6300 colStateBefore.forEach(function (s) {
6301 if (colStateAfterMapped[s.colId]) {
6302 colsIntersectIds[s.colId] = true;
6303 }
6304 });
6305 // filter state lists, so we only have cols that were present before and after
6306 var beforeFiltered = colStateBefore.filter(function (c) { return colsIntersectIds[c.colId]; });
6307 var afterFiltered = colStateAfter.filter(function (c) { return colsIntersectIds[c.colId]; });
6308 // see if any cols are in a different location
6309 var movedColumns = [];
6310 afterFiltered.forEach(function (csAfter, index) {
6311 var csBefore = beforeFiltered && beforeFiltered[index];
6312 if (csBefore && csBefore.colId !== csAfter.colId) {
6313 var gridCol = _this.getGridColumn(csBefore.colId);
6314 if (gridCol) {
6315 movedColumns.push(gridCol);
6316 }
6317 }
6318 });
6319 if (!movedColumns.length) {
6320 return;
6321 }
6322 var event = {
6323 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_MOVED,
6324 columns: movedColumns,
6325 column: null,
6326 api: this.gridApi,
6327 columnApi: this.columnApi,
6328 source: source
6329 };
6330 this.eventService.dispatchEvent(event);
6331 };
6332 ColumnModel.prototype.syncColumnWithStateItem = function (column, stateItem, defaultState, rowGroupIndexes, pivotIndexes, autoCol, source) {
6333 if (!column) {
6334 return;
6335 }
6336 var getValue = function (key1, key2) {
6337 var obj = { value1: undefined, value2: undefined };
6338 var calculated = false;
6339 if (stateItem) {
6340 if (stateItem[key1] !== undefined) {
6341 obj.value1 = stateItem[key1];
6342 calculated = true;
6343 }
6344 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(key2) && stateItem[key2] !== undefined) {
6345 obj.value2 = stateItem[key2];
6346 calculated = true;
6347 }
6348 }
6349 if (!calculated && defaultState) {
6350 if (defaultState[key1] !== undefined) {
6351 obj.value1 = defaultState[key1];
6352 }
6353 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(key2) && defaultState[key2] !== undefined) {
6354 obj.value2 = defaultState[key2];
6355 }
6356 }
6357 return obj;
6358 };
6359 // following ensures we are left with boolean true or false, eg converts (null, undefined, 0) all to true
6360 var hide = getValue('hide').value1;
6361 if (hide !== undefined) {
6362 column.setVisible(!hide, source);
6363 }
6364 // sets pinned to 'left' or 'right'
6365 var pinned = getValue('pinned').value1;
6366 if (pinned !== undefined) {
6367 column.setPinned(pinned);
6368 }
6369 // if width provided and valid, use it, otherwise stick with the old width
6370 var minColWidth = this.columnUtils.calculateColMinWidth(column.getColDef());
6371 // flex
6372 var flex = getValue('flex').value1;
6373 if (flex !== undefined) {
6374 column.setFlex(flex);
6375 }
6376 // width - we only set width if column is not flexing
6377 var noFlexThisCol = column.getFlex() <= 0;
6378 if (noFlexThisCol) {
6379 // both null and undefined means we skip, as it's not possible to 'clear' width (a column must have a width)
6380 var width = getValue('width').value1;
6381 if (width != null) {
6382 if (minColWidth != null && width >= minColWidth) {
6383 column.setActualWidth(width, source);
6384 }
6385 }
6386 }
6387 var sort = getValue('sort').value1;
6388 if (sort !== undefined) {
6389 if (sort === _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].SORT_DESC || sort === _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].SORT_ASC) {
6390 column.setSort(sort, source);
6391 }
6392 else {
6393 column.setSort(undefined, source);
6394 }
6395 }
6396 var sortIndex = getValue('sortIndex').value1;
6397 if (sortIndex !== undefined) {
6398 column.setSortIndex(sortIndex);
6399 }
6400 // we do not do aggFunc, rowGroup or pivot for auto cols or secondary cols
6401 if (autoCol || !column.isPrimary()) {
6402 return;
6403 }
6404 var aggFunc = getValue('aggFunc').value1;
6405 if (aggFunc !== undefined) {
6406 if (typeof aggFunc === 'string') {
6407 column.setAggFunc(aggFunc);
6408 if (!column.isValueActive()) {
6409 column.setValueActive(true, source);
6410 this.valueColumns.push(column);
6411 }
6412 }
6413 else {
6414 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(aggFunc)) {
6415 console.warn('AG Grid: stateItem.aggFunc must be a string. if using your own aggregation ' +
6416 'functions, register the functions first before using them in get/set state. This is because it is ' +
6417 'intended for the column state to be stored and retrieved as simple JSON.');
6418 }
6419 // Note: we do not call column.setAggFunc(null), so that next time we aggregate
6420 // by this column (eg drag the column to the agg section int he toolpanel) it will
6421 // default to the last aggregation function.
6422 if (column.isValueActive()) {
6423 column.setValueActive(false, source);
6424 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(this.valueColumns, column);
6425 }
6426 }
6427 }
6428 var _a = getValue('rowGroup', 'rowGroupIndex'), rowGroup = _a.value1, rowGroupIndex = _a.value2;
6429 if (rowGroup !== undefined || rowGroupIndex !== undefined) {
6430 if (typeof rowGroupIndex === 'number' || rowGroup) {
6431 if (!column.isRowGroupActive()) {
6432 column.setRowGroupActive(true, source);
6433 this.rowGroupColumns.push(column);
6434 }
6435 if (rowGroupIndexes && typeof rowGroupIndex === 'number') {
6436 rowGroupIndexes[column.getId()] = rowGroupIndex;
6437 }
6438 }
6439 else {
6440 if (column.isRowGroupActive()) {
6441 column.setRowGroupActive(false, source);
6442 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(this.rowGroupColumns, column);
6443 }
6444 }
6445 }
6446 var _b = getValue('pivot', 'pivotIndex'), pivot = _b.value1, pivotIndex = _b.value2;
6447 if (pivot !== undefined || pivotIndex !== undefined) {
6448 if (typeof pivotIndex === 'number' || pivot) {
6449 if (!column.isPivotActive()) {
6450 column.setPivotActive(true, source);
6451 this.pivotColumns.push(column);
6452 }
6453 if (pivotIndexes && typeof pivotIndex === 'number') {
6454 pivotIndexes[column.getId()] = pivotIndex;
6455 }
6456 }
6457 else {
6458 if (column.isPivotActive()) {
6459 column.setPivotActive(false, source);
6460 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(this.pivotColumns, column);
6461 }
6462 }
6463 }
6464 };
6465 ColumnModel.prototype.getGridColumns = function (keys) {
6466 return this.getColumns(keys, this.getGridColumn.bind(this));
6467 };
6468 ColumnModel.prototype.getColumns = function (keys, columnLookupCallback) {
6469 var foundColumns = [];
6470 if (keys) {
6471 keys.forEach(function (key) {
6472 var column = columnLookupCallback(key);
6473 if (column) {
6474 foundColumns.push(column);
6475 }
6476 });
6477 }
6478 return foundColumns;
6479 };
6480 // used by growGroupPanel
6481 ColumnModel.prototype.getColumnWithValidation = function (key) {
6482 if (key == null) {
6483 return null;
6484 }
6485 var column = this.getGridColumn(key);
6486 if (!column) {
6487 console.warn('AG Grid: could not find column ' + key);
6488 }
6489 return column;
6490 };
6491 ColumnModel.prototype.getPrimaryColumn = function (key) {
6492 if (!this.primaryColumns) {
6493 return null;
6494 }
6495 return this.getColumn(key, this.primaryColumns, this.primaryColumnsMap);
6496 };
6497 ColumnModel.prototype.getGridColumn = function (key) {
6498 return this.getColumn(key, this.gridColumns, this.gridColumnsMap);
6499 };
6500 ColumnModel.prototype.getSecondaryColumn = function (key) {
6501 if (!this.secondaryColumns) {
6502 return null;
6503 }
6504 return this.getColumn(key, this.secondaryColumns, this.secondaryColumnsMap);
6505 };
6506 ColumnModel.prototype.getColumn = function (key, columnList, columnMap) {
6507 if (!key) {
6508 return null;
6509 }
6510 // most of the time this method gets called the key is a string, so we put this shortcut in
6511 // for performance reasons, to see if we can match for ID (it doesn't do auto columns, that's done below)
6512 if (typeof key == 'string' && columnMap[key]) {
6513 return columnMap[key];
6514 }
6515 for (var i = 0; i < columnList.length; i++) {
6516 if (this.columnsMatch(columnList[i], key)) {
6517 return columnList[i];
6518 }
6519 }
6520 return this.getAutoColumn(key);
6521 };
6522 ColumnModel.prototype.getAutoColumn = function (key) {
6523 var _this = this;
6524 if (!this.groupAutoColumns ||
6525 !Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(this.groupAutoColumns) ||
6526 Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.groupAutoColumns)) {
6527 return null;
6528 }
6529 return this.groupAutoColumns.find(function (groupCol) { return _this.columnsMatch(groupCol, key); }) || null;
6530 };
6531 ColumnModel.prototype.columnsMatch = function (column, key) {
6532 var columnMatches = column === key;
6533 var colDefMatches = column.getColDef() === key;
6534 var idMatches = column.getColId() == key;
6535 return columnMatches || colDefMatches || idMatches;
6536 };
6537 ColumnModel.prototype.getDisplayNameForColumn = function (column, location, includeAggFunc) {
6538 if (includeAggFunc === void 0) { includeAggFunc = false; }
6539 if (!column) {
6540 return null;
6541 }
6542 var headerName = this.getHeaderName(column.getColDef(), column, null, null, location);
6543 if (includeAggFunc) {
6544 return this.wrapHeaderNameWithAggFunc(column, headerName);
6545 }
6546 return headerName;
6547 };
6548 ColumnModel.prototype.getDisplayNameForProvidedColumnGroup = function (columnGroup, providedColumnGroup, location) {
6549 var colGroupDef = providedColumnGroup ? providedColumnGroup.getColGroupDef() : null;
6550 if (colGroupDef) {
6551 return this.getHeaderName(colGroupDef, null, columnGroup, providedColumnGroup, location);
6552 }
6553 return null;
6554 };
6555 ColumnModel.prototype.getDisplayNameForColumnGroup = function (columnGroup, location) {
6556 return this.getDisplayNameForProvidedColumnGroup(columnGroup, columnGroup.getProvidedColumnGroup(), location);
6557 };
6558 // location is where the column is going to appear, ie who is calling us
6559 ColumnModel.prototype.getHeaderName = function (colDef, column, columnGroup, providedColumnGroup, location) {
6560 var headerValueGetter = colDef.headerValueGetter;
6561 if (headerValueGetter) {
6562 var params = {
6563 colDef: colDef,
6564 column: column,
6565 columnGroup: columnGroup,
6566 providedColumnGroup: providedColumnGroup,
6567 location: location,
6568 api: this.gridOptionsWrapper.getApi(),
6569 columnApi: this.gridOptionsWrapper.getColumnApi(),
6570 context: this.gridOptionsWrapper.getContext()
6571 };
6572 if (typeof headerValueGetter === 'function') {
6573 // valueGetter is a function, so just call it
6574 return headerValueGetter(params);
6575 }
6576 else if (typeof headerValueGetter === 'string') {
6577 // valueGetter is an expression, so execute the expression
6578 return this.expressionService.evaluate(headerValueGetter, params);
6579 }
6580 console.warn('ag-grid: headerValueGetter must be a function or a string');
6581 return '';
6582 }
6583 else if (colDef.headerName != null) {
6584 return colDef.headerName;
6585 }
6586 else if (colDef.field) {
6587 return Object(_utils_string__WEBPACK_IMPORTED_MODULE_10__["camelCaseToHumanText"])(colDef.field);
6588 }
6589 return '';
6590 };
6591 ColumnModel.prototype.wrapHeaderNameWithAggFunc = function (column, headerName) {
6592 if (this.gridOptionsWrapper.isSuppressAggFuncInHeader()) {
6593 return headerName;
6594 }
6595 // only columns with aggregation active can have aggregations
6596 var pivotValueColumn = column.getColDef().pivotValueColumn;
6597 var pivotActiveOnThisColumn = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(pivotValueColumn);
6598 var aggFunc = null;
6599 var aggFuncFound;
6600 // otherwise we have a measure that is active, and we are doing aggregation on it
6601 if (pivotActiveOnThisColumn) {
6602 var isCollapsedHeaderEnabled = this.gridOptionsWrapper.isRemovePivotHeaderRowWhenSingleValueColumn() && this.valueColumns.length === 1;
6603 var isTotalColumn = column.getColDef().pivotTotalColumnIds !== undefined;
6604 if (isCollapsedHeaderEnabled && !isTotalColumn) {
6605 return headerName; // Skip decorating the header - in this case the label is the pivot key, not the value col
6606 }
6607 aggFunc = pivotValueColumn ? pivotValueColumn.getAggFunc() : null;
6608 aggFuncFound = true;
6609 }
6610 else {
6611 var measureActive = column.isValueActive();
6612 var aggregationPresent = this.pivotMode || !this.isRowGroupEmpty();
6613 if (measureActive && aggregationPresent) {
6614 aggFunc = column.getAggFunc();
6615 aggFuncFound = true;
6616 }
6617 else {
6618 aggFuncFound = false;
6619 }
6620 }
6621 if (aggFuncFound) {
6622 var aggFuncString = (typeof aggFunc === 'string') ? aggFunc : 'func';
6623 var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
6624 var aggFuncStringTranslated = localeTextFunc(aggFuncString, aggFuncString);
6625 return aggFuncStringTranslated + "(" + headerName + ")";
6626 }
6627 return headerName;
6628 };
6629 // returns the group with matching colId and instanceId. If instanceId is missing,
6630 // matches only on the colId.
6631 ColumnModel.prototype.getColumnGroup = function (colId, instanceId) {
6632 if (!colId) {
6633 return null;
6634 }
6635 if (colId instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
6636 return colId;
6637 }
6638 var allColumnGroups = this.getAllDisplayedTrees();
6639 var checkInstanceId = typeof instanceId === 'number';
6640 var result = null;
6641 this.columnUtils.depthFirstAllColumnTreeSearch(allColumnGroups, function (child) {
6642 if (child instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
6643 var columnGroup = child;
6644 var matched = void 0;
6645 if (checkInstanceId) {
6646 matched = colId === columnGroup.getGroupId() && instanceId === columnGroup.getInstanceId();
6647 }
6648 else {
6649 matched = colId === columnGroup.getGroupId();
6650 }
6651 if (matched) {
6652 result = columnGroup;
6653 }
6654 }
6655 });
6656 return result;
6657 };
6658 ColumnModel.prototype.isReady = function () {
6659 return this.ready;
6660 };
6661 ColumnModel.prototype.extractValueColumns = function (source, oldPrimaryColumns) {
6662 this.valueColumns = this.extractColumns(oldPrimaryColumns, this.valueColumns, function (col, flag) { return col.setValueActive(flag, source); },
6663 // aggFunc doesn't have index variant, cos order of value cols doesn't matter, so always return null
6664 function () { return undefined; }, function () { return undefined; },
6665 // aggFunc is a string, so return it's existence
6666 function (colDef) {
6667 var aggFunc = colDef.aggFunc;
6668 // null or empty string means clear
6669 if (aggFunc === null || aggFunc === '') {
6670 return null;
6671 }
6672 if (aggFunc === undefined) {
6673 return;
6674 }
6675 return !!aggFunc;
6676 }, function (colDef) {
6677 // return false if any of the following: null, undefined, empty string
6678 return colDef.initialAggFunc != null && colDef.initialAggFunc != '';
6679 });
6680 // all new columns added will have aggFunc missing, so set it to what is in the colDef
6681 this.valueColumns.forEach(function (col) {
6682 var colDef = col.getColDef();
6683 // if aggFunc provided, we always override, as reactive property
6684 if (colDef.aggFunc != null && colDef.aggFunc != '') {
6685 col.setAggFunc(colDef.aggFunc);
6686 }
6687 else {
6688 // otherwise we use initialAggFunc only if no agg func set - which happens when new column only
6689 if (!col.getAggFunc()) {
6690 col.setAggFunc(colDef.initialAggFunc);
6691 }
6692 }
6693 });
6694 };
6695 ColumnModel.prototype.extractRowGroupColumns = function (source, oldPrimaryColumns) {
6696 this.rowGroupColumns = this.extractColumns(oldPrimaryColumns, this.rowGroupColumns, function (col, flag) { return col.setRowGroupActive(flag, source); }, function (colDef) { return colDef.rowGroupIndex; }, function (colDef) { return colDef.initialRowGroupIndex; }, function (colDef) { return colDef.rowGroup; }, function (colDef) { return colDef.initialRowGroup; });
6697 };
6698 ColumnModel.prototype.extractColumns = function (oldPrimaryColumns, previousCols, setFlagFunc, getIndexFunc, getInitialIndexFunc, getValueFunc, getInitialValueFunc) {
6699 if (oldPrimaryColumns === void 0) { oldPrimaryColumns = []; }
6700 if (previousCols === void 0) { previousCols = []; }
6701 var colsWithIndex = [];
6702 var colsWithValue = [];
6703 // go though all cols.
6704 // if value, change
6705 // if default only, change only if new
6706 (this.primaryColumns || []).forEach(function (col) {
6707 var colIsNew = oldPrimaryColumns.indexOf(col) < 0;
6708 var colDef = col.getColDef();
6709 var value = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["attrToBoolean"])(getValueFunc(colDef));
6710 var initialValue = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["attrToBoolean"])(getInitialValueFunc(colDef));
6711 var index = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["attrToNumber"])(getIndexFunc(colDef));
6712 var initialIndex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["attrToNumber"])(getInitialIndexFunc(colDef));
6713 var include;
6714 var valuePresent = value !== undefined;
6715 var indexPresent = index !== undefined;
6716 var initialValuePresent = initialValue !== undefined;
6717 var initialIndexPresent = initialIndex !== undefined;
6718 if (valuePresent) {
6719 include = value; // boolean value is guaranteed as attrToBoolean() is used above
6720 }
6721 else if (indexPresent) {
6722 if (index === null) {
6723 // if col is new we don't want to use the default / initial if index is set to null. Similarly,
6724 // we don't want to include the property for existing columns, i.e. we want to 'clear' it.
6725 include = false;
6726 }
6727 else {
6728 // note that 'null >= 0' evaluates to true which means 'rowGroupIndex = null' would enable row
6729 // grouping if the null check didn't exist above.
6730 include = index >= 0;
6731 }
6732 }
6733 else {
6734 if (colIsNew) {
6735 // as no value or index is 'present' we use the default / initial when col is new
6736 if (initialValuePresent) {
6737 include = initialValue;
6738 }
6739 else if (initialIndexPresent) {
6740 include = initialIndex != null && initialIndex >= 0;
6741 }
6742 else {
6743 include = false;
6744 }
6745 }
6746 else {
6747 // otherwise include it if included last time, e.g. if we are extracting row group cols and this col
6748 // is an existing row group col (i.e. it exists in 'previousCols') then we should include it.
6749 include = previousCols.indexOf(col) >= 0;
6750 }
6751 }
6752 if (include) {
6753 var useIndex = colIsNew ? (index != null || initialIndex != null) : index != null;
6754 useIndex ? colsWithIndex.push(col) : colsWithValue.push(col);
6755 }
6756 });
6757 var getIndexForCol = function (col) {
6758 var index = getIndexFunc(col.getColDef());
6759 var defaultIndex = getInitialIndexFunc(col.getColDef());
6760 return index != null ? index : defaultIndex;
6761 };
6762 // sort cols with index, and add these first
6763 colsWithIndex.sort(function (colA, colB) {
6764 var indexA = getIndexForCol(colA);
6765 var indexB = getIndexForCol(colB);
6766 if (indexA === indexB) {
6767 return 0;
6768 }
6769 if (indexA < indexB) {
6770 return -1;
6771 }
6772 return 1;
6773 });
6774 var res = [].concat(colsWithIndex);
6775 // second add columns that were there before and in the same order as they were before,
6776 // so we are preserving order of current grouping of columns that simply have rowGroup=true
6777 previousCols.forEach(function (col) {
6778 if (colsWithValue.indexOf(col) >= 0) {
6779 res.push(col);
6780 }
6781 });
6782 // lastly put in all remaining cols
6783 colsWithValue.forEach(function (col) {
6784 if (res.indexOf(col) < 0) {
6785 res.push(col);
6786 }
6787 });
6788 // set flag=false for removed cols
6789 previousCols.forEach(function (col) {
6790 if (res.indexOf(col) < 0) {
6791 setFlagFunc(col, false);
6792 }
6793 });
6794 // set flag=true for newly added cols
6795 res.forEach(function (col) {
6796 if (previousCols.indexOf(col) < 0) {
6797 setFlagFunc(col, true);
6798 }
6799 });
6800 return res;
6801 };
6802 ColumnModel.prototype.extractPivotColumns = function (source, oldPrimaryColumns) {
6803 this.pivotColumns = this.extractColumns(oldPrimaryColumns, this.pivotColumns, function (col, flag) { return col.setPivotActive(flag, source); }, function (colDef) { return colDef.pivotIndex; }, function (colDef) { return colDef.initialPivotIndex; }, function (colDef) { return colDef.pivot; }, function (colDef) { return colDef.initialPivot; });
6804 };
6805 ColumnModel.prototype.resetColumnGroupState = function (source) {
6806 if (source === void 0) { source = "api"; }
6807 var stateItems = [];
6808 this.columnUtils.depthFirstOriginalTreeSearch(null, this.primaryColumnTree, function (child) {
6809 if (child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"]) {
6810 var colGroupDef = child.getColGroupDef();
6811 var groupState = {
6812 groupId: child.getGroupId(),
6813 open: !colGroupDef ? undefined : colGroupDef.openByDefault
6814 };
6815 stateItems.push(groupState);
6816 }
6817 });
6818 this.setColumnGroupState(stateItems, source);
6819 };
6820 ColumnModel.prototype.getColumnGroupState = function () {
6821 var columnGroupState = [];
6822 this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (node) {
6823 if (node instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"]) {
6824 columnGroupState.push({
6825 groupId: node.getGroupId(),
6826 open: node.isExpanded()
6827 });
6828 }
6829 });
6830 return columnGroupState;
6831 };
6832 ColumnModel.prototype.setColumnGroupState = function (stateItems, source) {
6833 var _this = this;
6834 if (source === void 0) { source = "api"; }
6835 this.columnAnimationService.start();
6836 var impactedGroups = [];
6837 stateItems.forEach(function (stateItem) {
6838 var groupKey = stateItem.groupId;
6839 var newValue = stateItem.open;
6840 var providedColumnGroup = _this.getProvidedColumnGroup(groupKey);
6841 if (!providedColumnGroup) {
6842 return;
6843 }
6844 if (providedColumnGroup.isExpanded() === newValue) {
6845 return;
6846 }
6847 _this.logger.log('columnGroupOpened(' + providedColumnGroup.getGroupId() + ',' + newValue + ')');
6848 providedColumnGroup.setExpanded(newValue);
6849 impactedGroups.push(providedColumnGroup);
6850 });
6851 this.updateGroupsAndDisplayedColumns(source);
6852 this.setFirstRightAndLastLeftPinned(source);
6853 impactedGroups.forEach(function (providedColumnGroup) {
6854 var event = {
6855 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_GROUP_OPENED,
6856 columnGroup: providedColumnGroup,
6857 api: _this.gridApi,
6858 columnApi: _this.columnApi
6859 };
6860 _this.eventService.dispatchEvent(event);
6861 });
6862 this.columnAnimationService.finish();
6863 };
6864 // called by headerRenderer - when a header is opened or closed
6865 ColumnModel.prototype.setColumnGroupOpened = function (key, newValue, source) {
6866 if (source === void 0) { source = "api"; }
6867 var keyAsString;
6868 if (key instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"]) {
6869 keyAsString = key.getId();
6870 }
6871 else {
6872 keyAsString = key || '';
6873 }
6874 this.setColumnGroupState([{ groupId: keyAsString, open: newValue }], source);
6875 };
6876 ColumnModel.prototype.getProvidedColumnGroup = function (key) {
6877 // if (key instanceof ProvidedColumnGroup) { return key; }
6878 if (typeof key !== 'string') {
6879 console.error('AG Grid: group key must be a string');
6880 }
6881 // otherwise, search for the column group by id
6882 var res = null;
6883 this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (node) {
6884 if (node instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"]) {
6885 if (node.getId() === key) {
6886 res = node;
6887 }
6888 }
6889 });
6890 return res;
6891 };
6892 ColumnModel.prototype.calculateColumnsForDisplay = function () {
6893 var _this = this;
6894 var columnsForDisplay;
6895 if (this.pivotMode && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.secondaryColumns)) {
6896 // pivot mode is on, but we are not pivoting, so we only
6897 // show columns we are aggregating on
6898 columnsForDisplay = this.gridColumns.filter(function (column) {
6899 var isAutoGroupCol = _this.groupAutoColumns && Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["includes"])(_this.groupAutoColumns, column);
6900 var isValueCol = _this.valueColumns && Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["includes"])(_this.valueColumns, column);
6901 return isAutoGroupCol || isValueCol;
6902 });
6903 }
6904 else {
6905 // otherwise continue as normal. this can be working on the primary
6906 // or secondary columns, whatever the gridColumns are set to
6907 columnsForDisplay = this.gridColumns.filter(function (column) {
6908 // keep col if a) it's auto-group or b) it's visible
6909 var isAutoGroupCol = _this.groupAutoColumns && Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["includes"])(_this.groupAutoColumns, column);
6910 return isAutoGroupCol || column.isVisible();
6911 });
6912 }
6913 return columnsForDisplay;
6914 };
6915 ColumnModel.prototype.checkColSpanActiveInCols = function (columns) {
6916 var result = false;
6917 columns.forEach(function (col) {
6918 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(col.getColDef().colSpan)) {
6919 result = true;
6920 }
6921 });
6922 return result;
6923 };
6924 ColumnModel.prototype.calculateColumnsForGroupDisplay = function () {
6925 var _this = this;
6926 this.groupDisplayColumns = [];
6927 var checkFunc = function (col) {
6928 var colDef = col.getColDef();
6929 if (colDef && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(colDef.showRowGroup)) {
6930 _this.groupDisplayColumns.push(col);
6931 }
6932 };
6933 this.gridColumns.forEach(checkFunc);
6934 if (this.groupAutoColumns) {
6935 this.groupAutoColumns.forEach(checkFunc);
6936 }
6937 };
6938 ColumnModel.prototype.getGroupDisplayColumns = function () {
6939 return this.groupDisplayColumns;
6940 };
6941 ColumnModel.prototype.updateDisplayedColumns = function (source) {
6942 var columnsForDisplay = this.calculateColumnsForDisplay();
6943 this.buildDisplayedTrees(columnsForDisplay);
6944 this.calculateColumnsForGroupDisplay();
6945 // also called when group opened/closed
6946 this.updateGroupsAndDisplayedColumns(source);
6947 // also called when group opened/closed
6948 this.setFirstRightAndLastLeftPinned(source);
6949 };
6950 ColumnModel.prototype.isSecondaryColumnsPresent = function () {
6951 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(this.secondaryColumns);
6952 };
6953 ColumnModel.prototype.setSecondaryColumns = function (colDefs, source) {
6954 var _this = this;
6955 if (source === void 0) { source = "api"; }
6956 var newColsPresent = colDefs && colDefs.length > 0;
6957 // if not cols passed, and we had no cols anyway, then do nothing
6958 if (!newColsPresent && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.secondaryColumns)) {
6959 return;
6960 }
6961 if (newColsPresent) {
6962 this.processSecondaryColumnDefinitions(colDefs);
6963 var balancedTreeResult = this.columnFactory.createColumnTree(colDefs, false, this.secondaryBalancedTree || this.previousSecondaryColumns || undefined);
6964 this.secondaryBalancedTree = balancedTreeResult.columnTree;
6965 this.secondaryHeaderRowCount = balancedTreeResult.treeDept + 1;
6966 this.secondaryColumns = this.getColumnsFromTree(this.secondaryBalancedTree);
6967 this.secondaryColumnsMap = {};
6968 this.secondaryColumns.forEach(function (col) { return _this.secondaryColumnsMap[col.getId()] = col; });
6969 this.previousSecondaryColumns = null;
6970 }
6971 else {
6972 this.previousSecondaryColumns = this.secondaryBalancedTree;
6973 this.secondaryBalancedTree = null;
6974 this.secondaryHeaderRowCount = -1;
6975 this.secondaryColumns = null;
6976 this.secondaryColumnsMap = {};
6977 }
6978 this.updateGridColumns();
6979 this.updateDisplayedColumns(source);
6980 };
6981 ColumnModel.prototype.processSecondaryColumnDefinitions = function (colDefs) {
6982 var columnCallback = this.gridOptionsWrapper.getProcessSecondaryColDefFunc();
6983 var groupCallback = this.gridOptionsWrapper.getProcessSecondaryColGroupDefFunc();
6984 if (!columnCallback && !groupCallback) {
6985 return undefined;
6986 }
6987 var searchForColDefs = function (colDefs2) {
6988 colDefs2.forEach(function (abstractColDef) {
6989 var isGroup = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(abstractColDef.children);
6990 if (isGroup) {
6991 var colGroupDef = abstractColDef;
6992 if (groupCallback) {
6993 groupCallback(colGroupDef);
6994 }
6995 searchForColDefs(colGroupDef.children);
6996 }
6997 else {
6998 var colDef = abstractColDef;
6999 if (columnCallback) {
7000 columnCallback(colDef);
7001 }
7002 }
7003 });
7004 };
7005 if (colDefs) {
7006 searchForColDefs(colDefs);
7007 }
7008 };
7009 // called from: setColumnState, setColumnDefs, setSecondaryColumns
7010 ColumnModel.prototype.updateGridColumns = function () {
7011 var _this = this;
7012 if (this.gridColsArePrimary) {
7013 this.lastPrimaryOrder = this.gridColumns;
7014 }
7015 else {
7016 this.lastSecondaryOrder = this.gridColumns;
7017 }
7018 if (this.secondaryColumns && this.secondaryBalancedTree) {
7019 var hasSameColumns = this.secondaryColumns.every(function (col) {
7020 return _this.gridColumnsMap[col.getColId()] !== undefined;
7021 });
7022 this.gridBalancedTree = this.secondaryBalancedTree.slice();
7023 this.gridHeaderRowCount = this.secondaryHeaderRowCount;
7024 this.gridColumns = this.secondaryColumns.slice();
7025 this.gridColsArePrimary = false;
7026 // If the current columns are the same or a subset of the previous
7027 // we keep the previous order, otherwise we go back to the order the pivot
7028 // cols are generated in
7029 if (hasSameColumns) {
7030 this.orderGridColsLike(this.lastSecondaryOrder);
7031 }
7032 }
7033 else if (this.primaryColumns) {
7034 this.gridBalancedTree = this.primaryColumnTree.slice();
7035 this.gridHeaderRowCount = this.primaryHeaderRowCount;
7036 this.gridColumns = this.primaryColumns.slice();
7037 this.gridColsArePrimary = true;
7038 // updateGridColumns gets called after user adds a row group. we want to maintain the order of the columns
7039 // when this happens (eg if user moved a column) rather than revert back to the original column order.
7040 // likewise if changing in/out of pivot mode, we want to maintain the order of the cols
7041 this.orderGridColsLike(this.lastPrimaryOrder);
7042 }
7043 this.addAutoGroupToGridColumns();
7044 this.gridColumns = this.placeLockedColumns(this.gridColumns);
7045 this.setupQuickFilterColumns();
7046 this.clearDisplayedAndViewportColumns();
7047 this.colSpanActive = this.checkColSpanActiveInCols(this.gridColumns);
7048 this.gridColumnsMap = {};
7049 this.gridColumns.forEach(function (col) { return _this.gridColumnsMap[col.getId()] = col; });
7050 this.setAutoHeightActive();
7051 var event = {
7052 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_GRID_COLUMNS_CHANGED,
7053 api: this.gridApi,
7054 columnApi: this.columnApi
7055 };
7056 this.eventService.dispatchEvent(event);
7057 };
7058 ColumnModel.prototype.setAutoHeightActive = function () {
7059 this.autoHeightActive = this.gridColumns.filter(function (col) { return col.isAutoHeight(); }).length > 0;
7060 if (this.autoHeightActive) {
7061 this.autoHeightActiveAtLeastOnce = true;
7062 var rowModelType = this.rowModel.getType();
7063 var supportedRowModel = rowModelType === _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE || rowModelType === _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].ROW_MODEL_TYPE_SERVER_SIDE;
7064 if (!supportedRowModel) {
7065 var message_1 = 'AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.';
7066 Object(_utils_function__WEBPACK_IMPORTED_MODULE_12__["doOnce"])(function () { return console.warn(message_1); }, 'autoHeightActive.wrongRowModel');
7067 }
7068 }
7069 };
7070 ColumnModel.prototype.orderGridColsLike = function (colsOrder) {
7071 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(colsOrder)) {
7072 return;
7073 }
7074 var lastOrderMapped = Object(_utils_map__WEBPACK_IMPORTED_MODULE_11__["convertToMap"])(colsOrder.map(function (col, index) { return [col, index]; }));
7075 // only do the sort if at least one column is accounted for. columns will be not accounted for
7076 // if changing from secondary to primary columns
7077 var noColsFound = true;
7078 this.gridColumns.forEach(function (col) {
7079 if (lastOrderMapped.has(col)) {
7080 noColsFound = false;
7081 }
7082 });
7083 if (noColsFound) {
7084 return;
7085 }
7086 // order cols in the same order as before. we need to make sure that all
7087 // cols still exists, so filter out any that no longer exist.
7088 var gridColsMap = Object(_utils_map__WEBPACK_IMPORTED_MODULE_11__["convertToMap"])(this.gridColumns.map(function (col) { return [col, true]; }));
7089 var oldColsOrdered = colsOrder.filter(function (col) { return gridColsMap.has(col); });
7090 var oldColsMap = Object(_utils_map__WEBPACK_IMPORTED_MODULE_11__["convertToMap"])(oldColsOrdered.map(function (col) { return [col, true]; }));
7091 var newColsOrdered = this.gridColumns.filter(function (col) { return !oldColsMap.has(col); });
7092 // add in the new columns, at the end (if no group), or at the end of the group (if a group)
7093 var newGridColumns = oldColsOrdered.slice();
7094 newColsOrdered.forEach(function (newCol) {
7095 var parent = newCol.getOriginalParent();
7096 // if no parent, means we are not grouping, so just add the column to the end
7097 if (!parent) {
7098 newGridColumns.push(newCol);
7099 return;
7100 }
7101 // find the group the column belongs to. if no siblings at the current level (eg col in group on it's
7102 // own) then go up one level and look for siblings there.
7103 var siblings = [];
7104 while (!siblings.length && parent) {
7105 var leafCols = parent.getLeafColumns();
7106 leafCols.forEach(function (leafCol) {
7107 var presentInNewGriColumns = newGridColumns.indexOf(leafCol) >= 0;
7108 var noYetInSiblings = siblings.indexOf(leafCol) < 0;
7109 if (presentInNewGriColumns && noYetInSiblings) {
7110 siblings.push(leafCol);
7111 }
7112 });
7113 parent = parent.getOriginalParent();
7114 }
7115 // if no siblings exist at any level, this means the col is in a group (or parent groups) on it's own
7116 if (!siblings.length) {
7117 newGridColumns.push(newCol);
7118 return;
7119 }
7120 // find index of last column in the group
7121 var indexes = siblings.map(function (col) { return newGridColumns.indexOf(col); });
7122 var lastIndex = Math.max.apply(Math, __spread(indexes));
7123 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["insertIntoArray"])(newGridColumns, newCol, lastIndex + 1);
7124 });
7125 this.gridColumns = newGridColumns;
7126 };
7127 ColumnModel.prototype.isPrimaryColumnGroupsPresent = function () {
7128 return this.primaryHeaderRowCount > 1;
7129 };
7130 // if we are using autoGroupCols, then they should be included for quick filter. this covers the
7131 // following scenarios:
7132 // a) user provides 'field' into autoGroupCol of normal grid, so now because a valid col to filter leafs on
7133 // b) using tree data and user depends on autoGroupCol for first col, and we also want to filter on this
7134 // (tree data is a bit different, as parent rows can be filtered on, unlike row grouping)
7135 ColumnModel.prototype.setupQuickFilterColumns = function () {
7136 if (this.groupAutoColumns) {
7137 this.columnsForQuickFilter = (this.primaryColumns || []).concat(this.groupAutoColumns);
7138 }
7139 else if (this.primaryColumns) {
7140 this.columnsForQuickFilter = this.primaryColumns;
7141 }
7142 };
7143 ColumnModel.prototype.placeLockedColumns = function (cols) {
7144 var left = [];
7145 var normal = [];
7146 var right = [];
7147 cols.forEach(function (col) {
7148 var position = col.getColDef().lockPosition;
7149 if (position === 'right') {
7150 right.push(col);
7151 }
7152 else if (position === 'left' || position === true) {
7153 left.push(col);
7154 }
7155 else {
7156 normal.push(col);
7157 }
7158 });
7159 return __spread(left, normal, right);
7160 };
7161 ColumnModel.prototype.addAutoGroupToGridColumns = function () {
7162 // add in auto-group here
7163 this.createGroupAutoColumnsIfNeeded();
7164 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.groupAutoColumns)) {
7165 return;
7166 }
7167 this.gridColumns = this.groupAutoColumns ? this.groupAutoColumns.concat(this.gridColumns) : this.gridColumns;
7168 var autoColBalancedTree = this.columnFactory.createForAutoGroups(this.groupAutoColumns, this.gridBalancedTree);
7169 this.gridBalancedTree = autoColBalancedTree.concat(this.gridBalancedTree);
7170 };
7171 // gets called after we copy down grid columns, to make sure any part of the gui
7172 // that tries to draw, eg the header, it will get empty lists of columns rather
7173 // than stale columns. for example, the header will received gridColumnsChanged
7174 // event, so will try and draw, but it will draw successfully when it acts on the
7175 // virtualColumnsChanged event
7176 ColumnModel.prototype.clearDisplayedAndViewportColumns = function () {
7177 this.displayedTreeLeft = [];
7178 this.displayedTreeRight = [];
7179 this.displayedTreeCentre = [];
7180 this.viewportRowLeft = {};
7181 this.viewportRowRight = {};
7182 this.viewportRowCenter = {};
7183 this.displayedColumnsLeft = [];
7184 this.displayedColumnsRight = [];
7185 this.displayedColumnsCenter = [];
7186 this.displayedColumns = [];
7187 this.viewportColumns = [];
7188 };
7189 ColumnModel.prototype.updateGroupsAndDisplayedColumns = function (source) {
7190 this.updateOpenClosedVisibilityInColumnGroups();
7191 this.deriveDisplayedColumns(source);
7192 this.refreshFlexedColumns();
7193 this.extractViewport();
7194 this.updateBodyWidths();
7195 // this event is picked up by the gui, headerRenderer and rowRenderer, to recalculate what columns to display
7196 var event = {
7197 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED,
7198 api: this.gridApi,
7199 columnApi: this.columnApi
7200 };
7201 this.eventService.dispatchEvent(event);
7202 };
7203 ColumnModel.prototype.deriveDisplayedColumns = function (source) {
7204 this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft, this.displayedColumnsLeft);
7205 this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre, this.displayedColumnsCenter);
7206 this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight, this.displayedColumnsRight);
7207 this.joinDisplayedColumns();
7208 this.setLeftValues(source);
7209 this.displayedAutoHeightCols = this.displayedColumns.filter(function (col) { return col.isAutoHeight(); });
7210 };
7211 ColumnModel.prototype.isAutoRowHeightActive = function () {
7212 return this.autoHeightActive;
7213 };
7214 ColumnModel.prototype.wasAutoRowHeightEverActive = function () {
7215 return this.autoHeightActiveAtLeastOnce;
7216 };
7217 ColumnModel.prototype.joinDisplayedColumns = function () {
7218 if (this.gridOptionsWrapper.isEnableRtl()) {
7219 this.displayedColumns = this.displayedColumnsRight
7220 .concat(this.displayedColumnsCenter)
7221 .concat(this.displayedColumnsLeft);
7222 }
7223 else {
7224 this.displayedColumns = this.displayedColumnsLeft
7225 .concat(this.displayedColumnsCenter)
7226 .concat(this.displayedColumnsRight);
7227 }
7228 };
7229 // sets the left pixel position of each column
7230 ColumnModel.prototype.setLeftValues = function (source) {
7231 this.setLeftValuesOfColumns(source);
7232 this.setLeftValuesOfGroups();
7233 };
7234 ColumnModel.prototype.setLeftValuesOfColumns = function (source) {
7235 var _this = this;
7236 if (!this.primaryColumns) {
7237 return;
7238 }
7239 // go through each list of displayed columns
7240 var allColumns = this.primaryColumns.slice(0);
7241 // let totalColumnWidth = this.getWidthOfColsInList()
7242 var doingRtl = this.gridOptionsWrapper.isEnableRtl();
7243 [
7244 this.displayedColumnsLeft,
7245 this.displayedColumnsRight,
7246 this.displayedColumnsCenter
7247 ].forEach(function (columns) {
7248 if (doingRtl) {
7249 // when doing RTL, we start at the top most pixel (ie RHS) and work backwards
7250 var left_1 = _this.getWidthOfColsInList(columns);
7251 columns.forEach(function (column) {
7252 left_1 -= column.getActualWidth();
7253 column.setLeft(left_1, source);
7254 });
7255 }
7256 else {
7257 // otherwise normal LTR, we start at zero
7258 var left_2 = 0;
7259 columns.forEach(function (column) {
7260 column.setLeft(left_2, source);
7261 left_2 += column.getActualWidth();
7262 });
7263 }
7264 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeAllFromArray"])(allColumns, columns);
7265 });
7266 // items left in allColumns are columns not displayed, so remove the left position. this is
7267 // important for the rows, as if a col is made visible, then taken out, then made visible again,
7268 // we don't want the animation of the cell floating in from the old position, whatever that was.
7269 allColumns.forEach(function (column) {
7270 column.setLeft(null, source);
7271 });
7272 };
7273 ColumnModel.prototype.setLeftValuesOfGroups = function () {
7274 // a groups left value is the lest left value of it's children
7275 [
7276 this.displayedTreeLeft,
7277 this.displayedTreeRight,
7278 this.displayedTreeCentre
7279 ].forEach(function (columns) {
7280 columns.forEach(function (column) {
7281 if (column instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
7282 var columnGroup = column;
7283 columnGroup.checkLeft();
7284 }
7285 });
7286 });
7287 };
7288 ColumnModel.prototype.derivedDisplayedColumnsFromDisplayedTree = function (tree, columns) {
7289 columns.length = 0;
7290 this.columnUtils.depthFirstDisplayedColumnTreeSearch(tree, function (child) {
7291 if (child instanceof _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"]) {
7292 columns.push(child);
7293 }
7294 });
7295 };
7296 ColumnModel.prototype.extractViewportColumns = function () {
7297 if (this.suppressColumnVirtualisation) {
7298 // no virtualisation, so don't filter
7299 this.viewportColumnsCenter = this.displayedColumnsCenter;
7300 }
7301 else {
7302 // filter out what should be visible
7303 this.viewportColumnsCenter = this.filterOutColumnsWithinViewport();
7304 }
7305 this.viewportColumns = this.viewportColumnsCenter
7306 .concat(this.displayedColumnsLeft)
7307 .concat(this.displayedColumnsRight);
7308 };
7309 ColumnModel.prototype.getVirtualHeaderGroupRow = function (type, dept) {
7310 var result;
7311 switch (type) {
7312 case _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_LEFT:
7313 result = this.viewportRowLeft[dept];
7314 break;
7315 case _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_RIGHT:
7316 result = this.viewportRowRight[dept];
7317 break;
7318 default:
7319 result = this.viewportRowCenter[dept];
7320 break;
7321 }
7322 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(result)) {
7323 result = [];
7324 }
7325 return result;
7326 };
7327 ColumnModel.prototype.extractViewportRows = function () {
7328 // go through each group, see if any of it's cols are displayed, and if yes,
7329 // then this group is included
7330 this.viewportRowLeft = {};
7331 this.viewportRowRight = {};
7332 this.viewportRowCenter = {};
7333 // for easy lookup when building the groups.
7334 var virtualColIds = {};
7335 this.viewportColumns.forEach(function (col) { return virtualColIds[col.getId()] = true; });
7336 var testGroup = function (children, result, dept) {
7337 var returnValue = false;
7338 for (var i = 0; i < children.length; i++) {
7339 // see if this item is within viewport
7340 var child = children[i];
7341 var addThisItem = false;
7342 if (child instanceof _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"]) {
7343 // for column, test if column is included
7344 addThisItem = virtualColIds[child.getId()] === true;
7345 }
7346 else {
7347 // if group, base decision on children
7348 var columnGroup = child;
7349 var displayedChildren = columnGroup.getDisplayedChildren();
7350 if (displayedChildren) {
7351 addThisItem = testGroup(displayedChildren, result, dept + 1);
7352 }
7353 }
7354 if (addThisItem) {
7355 returnValue = true;
7356 if (!result[dept]) {
7357 result[dept] = [];
7358 }
7359 result[dept].push(child);
7360 }
7361 }
7362 return returnValue;
7363 };
7364 testGroup(this.displayedTreeLeft, this.viewportRowLeft, 0);
7365 testGroup(this.displayedTreeRight, this.viewportRowRight, 0);
7366 testGroup(this.displayedTreeCentre, this.viewportRowCenter, 0);
7367 };
7368 ColumnModel.prototype.extractViewport = function () {
7369 this.extractViewportColumns();
7370 this.extractViewportRows();
7371 };
7372 ColumnModel.prototype.filterOutColumnsWithinViewport = function () {
7373 return this.displayedColumnsCenter.filter(this.isColumnInViewport.bind(this));
7374 };
7375 ColumnModel.prototype.refreshFlexedColumns = function (params) {
7376 var _this = this;
7377 if (params === void 0) { params = {}; }
7378 var source = params.source ? params.source : 'flex';
7379 if (params.viewportWidth != null) {
7380 this.flexViewportWidth = params.viewportWidth;
7381 }
7382 if (!this.flexViewportWidth) {
7383 return [];
7384 }
7385 // If the grid has left-over space, divide it between flexing columns in proportion to their flex value.
7386 // A "flexing column" is one that has a 'flex' value set and is not currently being constrained by its
7387 // minWidth or maxWidth rules.
7388 var flexAfterDisplayIndex = -1;
7389 if (params.resizingCols) {
7390 params.resizingCols.forEach(function (col) {
7391 var indexOfCol = _this.displayedColumnsCenter.indexOf(col);
7392 if (flexAfterDisplayIndex < indexOfCol) {
7393 flexAfterDisplayIndex = indexOfCol;
7394 }
7395 });
7396 }
7397 var isColFlex = function (col) {
7398 var afterResizingCols = _this.displayedColumnsCenter.indexOf(col) > flexAfterDisplayIndex;
7399 return col.getFlex() && afterResizingCols;
7400 };
7401 var knownWidthColumns = this.displayedColumnsCenter.filter(function (col) { return !isColFlex(col); });
7402 var flexingColumns = this.displayedColumnsCenter.filter(function (col) { return isColFlex(col); });
7403 var changedColumns = [];
7404 if (!flexingColumns.length) {
7405 return [];
7406 }
7407 var flexingColumnSizes = [];
7408 var spaceForFlexingColumns;
7409 outer: while (true) {
7410 var totalFlex = flexingColumns.reduce(function (count, col) { return count + col.getFlex(); }, 0);
7411 spaceForFlexingColumns = this.flexViewportWidth - this.getWidthOfColsInList(knownWidthColumns);
7412 for (var i = 0; i < flexingColumns.length; i++) {
7413 var col = flexingColumns[i];
7414 var widthByFlexRule = spaceForFlexingColumns * col.getFlex() / totalFlex;
7415 var constrainedWidth = 0;
7416 var minWidth = col.getMinWidth();
7417 var maxWidth = col.getMaxWidth();
7418 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(minWidth) && widthByFlexRule < minWidth) {
7419 constrainedWidth = minWidth;
7420 }
7421 else if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(maxWidth) && widthByFlexRule > maxWidth) {
7422 constrainedWidth = maxWidth;
7423 }
7424 if (constrainedWidth) {
7425 // This column is not in fact flexing as it is being constrained to a specific size
7426 // so remove it from the list of flexing columns and start again
7427 col.setActualWidth(constrainedWidth, source);
7428 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(flexingColumns, col);
7429 changedColumns.push(col);
7430 knownWidthColumns.push(col);
7431 continue outer;
7432 }
7433 flexingColumnSizes[i] = Math.round(widthByFlexRule);
7434 }
7435 break;
7436 }
7437 var remainingSpace = spaceForFlexingColumns;
7438 flexingColumns.forEach(function (col, i) {
7439 col.setActualWidth(Math.min(flexingColumnSizes[i], remainingSpace), source);
7440 changedColumns.push(col);
7441 remainingSpace -= flexingColumnSizes[i];
7442 });
7443 if (!params.skipSetLeft) {
7444 this.setLeftValues(source);
7445 }
7446 if (params.updateBodyWidths) {
7447 this.updateBodyWidths();
7448 }
7449 if (params.fireResizedEvent) {
7450 this.fireColumnResizedEvent(changedColumns, true, source, flexingColumns);
7451 }
7452 // if the user sets rowData directly into GridOptions, then the row data is set before
7453 // grid is attached to the DOM. this means the columns are not flexed, and then the rows
7454 // have the wrong height (as they depend on column widths). so once the columns have
7455 // been flexed for the first time (only happens once grid is attached to DOM, as dependency
7456 // on getting the grid width, which only happens after attached after ResizeObserver fires)
7457 // we get get rows to re-calc their heights.
7458 if (!this.flexColsCalculatedAtLestOnce) {
7459 if (this.gridOptionsWrapper.isRowModelDefault()) {
7460 this.rowModel.resetRowHeights();
7461 }
7462 this.flexColsCalculatedAtLestOnce = true;
7463 }
7464 return flexingColumns;
7465 };
7466 // called from api
7467 ColumnModel.prototype.sizeColumnsToFit = function (gridWidth, source, silent) {
7468 if (source === void 0) { source = "sizeColumnsToFit"; }
7469 // avoid divide by zero
7470 var allDisplayedColumns = this.getAllDisplayedColumns();
7471 if (gridWidth <= 0 || !allDisplayedColumns.length) {
7472 return;
7473 }
7474 var colsToSpread = [];
7475 var colsToNotSpread = [];
7476 allDisplayedColumns.forEach(function (column) {
7477 if (column.getColDef().suppressSizeToFit === true) {
7478 colsToNotSpread.push(column);
7479 }
7480 else {
7481 colsToSpread.push(column);
7482 }
7483 });
7484 // make a copy of the cols that are going to be resized
7485 var colsToFireEventFor = colsToSpread.slice(0);
7486 var finishedResizing = false;
7487 var moveToNotSpread = function (column) {
7488 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(colsToSpread, column);
7489 colsToNotSpread.push(column);
7490 };
7491 // resetting cols to their original width makes the sizeColumnsToFit more deterministic,
7492 // rather than depending on the current size of the columns. most users call sizeColumnsToFit
7493 // immediately after grid is created, so will make no difference. however if application is calling
7494 // sizeColumnsToFit repeatedly (eg after column group is opened / closed repeatedly) we don't want
7495 // the columns to start shrinking / growing over time.
7496 //
7497 // NOTE: the process below will assign values to `this.actualWidth` of each column without firing events
7498 // for this reason we need to manually fire resize events after the resize has been done for each column.
7499 colsToSpread.forEach(function (column) { return column.resetActualWidth(source); });
7500 while (!finishedResizing) {
7501 finishedResizing = true;
7502 var availablePixels = gridWidth - this.getWidthOfColsInList(colsToNotSpread);
7503 if (availablePixels <= 0) {
7504 // no width, set everything to minimum
7505 colsToSpread.forEach(function (column) {
7506 column.setMinimum(source);
7507 });
7508 }
7509 else {
7510 var scale = availablePixels / this.getWidthOfColsInList(colsToSpread);
7511 // we set the pixels for the last col based on what's left, as otherwise
7512 // we could be a pixel or two short or extra because of rounding errors.
7513 var pixelsForLastCol = availablePixels;
7514 // backwards through loop, as we are removing items as we go
7515 for (var i = colsToSpread.length - 1; i >= 0; i--) {
7516 var column = colsToSpread[i];
7517 var minWidth = column.getMinWidth();
7518 var maxWidth = column.getMaxWidth();
7519 var newWidth = Math.round(column.getActualWidth() * scale);
7520 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(minWidth) && newWidth < minWidth) {
7521 newWidth = minWidth;
7522 moveToNotSpread(column);
7523 finishedResizing = false;
7524 }
7525 else if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(maxWidth) && column.isGreaterThanMax(newWidth)) {
7526 newWidth = maxWidth;
7527 moveToNotSpread(column);
7528 finishedResizing = false;
7529 }
7530 else if (i === 0) { // if this is the last column
7531 newWidth = pixelsForLastCol;
7532 }
7533 column.setActualWidth(newWidth, source, true);
7534 pixelsForLastCol -= newWidth;
7535 }
7536 }
7537 }
7538 // see notes above
7539 colsToFireEventFor.forEach(function (col) {
7540 col.fireColumnWidthChangedEvent(source);
7541 });
7542 this.setLeftValues(source);
7543 this.updateBodyWidths();
7544 if (silent) {
7545 return;
7546 }
7547 this.fireColumnResizedEvent(colsToFireEventFor, true, source);
7548 };
7549 ColumnModel.prototype.buildDisplayedTrees = function (visibleColumns) {
7550 var leftVisibleColumns = [];
7551 var rightVisibleColumns = [];
7552 var centerVisibleColumns = [];
7553 visibleColumns.forEach(function (column) {
7554 switch (column.getPinned()) {
7555 case "left":
7556 leftVisibleColumns.push(column);
7557 break;
7558 case "right":
7559 rightVisibleColumns.push(column);
7560 break;
7561 default:
7562 centerVisibleColumns.push(column);
7563 break;
7564 }
7565 });
7566 var groupInstanceIdCreator = new _groupInstanceIdCreator__WEBPACK_IMPORTED_MODULE_5__["GroupInstanceIdCreator"]();
7567 this.displayedTreeLeft = this.displayedGroupCreator.createDisplayedGroups(leftVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_LEFT, this.displayedTreeLeft);
7568 this.displayedTreeRight = this.displayedGroupCreator.createDisplayedGroups(rightVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, _constants_constants__WEBPACK_IMPORTED_MODULE_7__["Constants"].PINNED_RIGHT, this.displayedTreeRight);
7569 this.displayedTreeCentre = this.displayedGroupCreator.createDisplayedGroups(centerVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, null, this.displayedTreeCentre);
7570 this.updateDisplayedMap();
7571 };
7572 ColumnModel.prototype.updateDisplayedMap = function () {
7573 var _this = this;
7574 this.displayedColumnsAndGroupsMap = {};
7575 var func = function (child) {
7576 _this.displayedColumnsAndGroupsMap[child.getUniqueId()] = child;
7577 };
7578 this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre, func);
7579 this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft, func);
7580 this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight, func);
7581 };
7582 ColumnModel.prototype.isDisplayed = function (item) {
7583 var fromMap = this.displayedColumnsAndGroupsMap[item.getUniqueId()];
7584 // check for reference, in case new column / group with same id is now present
7585 return fromMap === item;
7586 };
7587 ColumnModel.prototype.updateOpenClosedVisibilityInColumnGroups = function () {
7588 var allColumnGroups = this.getAllDisplayedTrees();
7589 this.columnUtils.depthFirstAllColumnTreeSearch(allColumnGroups, function (child) {
7590 if (child instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
7591 var columnGroup = child;
7592 columnGroup.calculateDisplayedColumns();
7593 }
7594 });
7595 };
7596 ColumnModel.prototype.getGroupAutoColumns = function () {
7597 return this.groupAutoColumns;
7598 };
7599 ColumnModel.prototype.createGroupAutoColumnsIfNeeded = function () {
7600 if (!this.autoGroupsNeedBuilding) {
7601 return;
7602 }
7603 this.autoGroupsNeedBuilding = false;
7604 var groupFullWidthRow = this.gridOptionsWrapper.isGroupUseEntireRow(this.pivotMode);
7605 // we need to allow suppressing auto-column separately for group and pivot as the normal situation
7606 // is CSRM and user provides group column themselves for normal view, but when they go into pivot the
7607 // columns are generated by the grid so no opportunity for user to provide group column. so need a way
7608 // to suppress auto-col for grouping only, and not pivot.
7609 // however if using Viewport RM or SSRM and user is providing the columns, the user may wish full control
7610 // of the group column in this instance.
7611 var suppressAutoColumn = this.pivotMode ?
7612 this.gridOptionsWrapper.isPivotSuppressAutoColumn() : this.gridOptionsWrapper.isGroupSuppressAutoColumn();
7613 var groupingActive = this.rowGroupColumns.length > 0 || this.usingTreeData;
7614 var needAutoColumns = groupingActive && !suppressAutoColumn && !groupFullWidthRow;
7615 if (needAutoColumns) {
7616 var existingCols = this.groupAutoColumns || [];
7617 var newAutoGroupCols = this.autoGroupColService.createAutoGroupColumns(existingCols, this.rowGroupColumns);
7618 var autoColsDifferent = !this.autoColsEqual(newAutoGroupCols, this.groupAutoColumns);
7619 // we force recreate when suppressColumnStateEvents changes, so new group cols pick up the new
7620 // definitions. otherwise we could ignore the new cols because they appear to be the same.
7621 if (autoColsDifferent || this.forceRecreateAutoGroups) {
7622 this.groupAutoColumns = newAutoGroupCols;
7623 }
7624 }
7625 else {
7626 this.groupAutoColumns = null;
7627 }
7628 };
7629 ColumnModel.prototype.autoColsEqual = function (colsA, colsB) {
7630 return Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["areEqual"])(colsA, colsB, function (a, b) { return a.getColId() === b.getColId(); });
7631 };
7632 ColumnModel.prototype.getWidthOfColsInList = function (columnList) {
7633 return columnList.reduce(function (width, col) { return width + col.getActualWidth(); }, 0);
7634 };
7635 ColumnModel.prototype.getGridBalancedTree = function () {
7636 return this.gridBalancedTree;
7637 };
7638 ColumnModel.prototype.hasFloatingFilters = function () {
7639 if (!this.gridColumns) {
7640 return false;
7641 }
7642 var res = this.gridColumns.some(function (col) { return col.getColDef().floatingFilter; });
7643 return res;
7644 };
7645 ColumnModel.prototype.getFirstDisplayedColumn = function () {
7646 var isRtl = this.gridOptionsWrapper.isEnableRtl();
7647 var queryOrder = [
7648 'getDisplayedLeftColumns',
7649 'getDisplayedCenterColumns',
7650 'getDisplayedRightColumns'
7651 ];
7652 if (isRtl) {
7653 queryOrder.reverse();
7654 }
7655 for (var i = 0; i < queryOrder.length; i++) {
7656 var container = this[queryOrder[i]]();
7657 if (container.length) {
7658 return isRtl ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["last"])(container) : container[0];
7659 }
7660 }
7661 return null;
7662 };
7663 __decorate([
7664 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('expressionService')
7665 ], ColumnModel.prototype, "expressionService", void 0);
7666 __decorate([
7667 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('columnFactory')
7668 ], ColumnModel.prototype, "columnFactory", void 0);
7669 __decorate([
7670 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('displayedGroupCreator')
7671 ], ColumnModel.prototype, "displayedGroupCreator", void 0);
7672 __decorate([
7673 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('ctrlsService')
7674 ], ColumnModel.prototype, "ctrlsService", void 0);
7675 __decorate([
7676 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('autoWidthCalculator')
7677 ], ColumnModel.prototype, "autoWidthCalculator", void 0);
7678 __decorate([
7679 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('columnUtils')
7680 ], ColumnModel.prototype, "columnUtils", void 0);
7681 __decorate([
7682 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('columnAnimationService')
7683 ], ColumnModel.prototype, "columnAnimationService", void 0);
7684 __decorate([
7685 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('autoGroupColService')
7686 ], ColumnModel.prototype, "autoGroupColService", void 0);
7687 __decorate([
7688 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Optional"])('aggFuncService')
7689 ], ColumnModel.prototype, "aggFuncService", void 0);
7690 __decorate([
7691 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Optional"])('valueCache')
7692 ], ColumnModel.prototype, "valueCache", void 0);
7693 __decorate([
7694 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Optional"])('animationFrameService')
7695 ], ColumnModel.prototype, "animationFrameService", void 0);
7696 __decorate([
7697 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('rowModel')
7698 ], ColumnModel.prototype, "rowModel", void 0);
7699 __decorate([
7700 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('columnApi')
7701 ], ColumnModel.prototype, "columnApi", void 0);
7702 __decorate([
7703 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('gridApi')
7704 ], ColumnModel.prototype, "gridApi", void 0);
7705 __decorate([
7706 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('sortController')
7707 ], ColumnModel.prototype, "sortController", void 0);
7708 __decorate([
7709 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('columnDefFactory')
7710 ], ColumnModel.prototype, "columnDefFactory", void 0);
7711 __decorate([
7712 _context_context__WEBPACK_IMPORTED_MODULE_6__["PostConstruct"]
7713 ], ColumnModel.prototype, "init", null);
7714 __decorate([
7715 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Qualifier"])('loggerFactory'))
7716 ], ColumnModel.prototype, "setBeans", null);
7717 ColumnModel = __decorate([
7718 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Bean"])('columnModel')
7719 ], ColumnModel);
7720 return ColumnModel;
7721}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
7722
7723
7724
7725
7726
7727/***/ }),
7728/* 23 */
7729/***/ (function(module, __webpack_exports__, __webpack_require__) {
7730
7731"use strict";
7732__webpack_require__.r(__webpack_exports__);
7733/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24);
7734/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return _eventKeys__WEBPACK_IMPORTED_MODULE_0__["Events"]; });
7735
7736/**
7737 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
7738 * @version v27.3.0
7739 * @link https://www.ag-grid.com/
7740 * @license MIT
7741 */
7742
7743
7744
7745
7746
7747/***/ }),
7748/* 24 */
7749/***/ (function(module, __webpack_exports__, __webpack_require__) {
7750
7751"use strict";
7752__webpack_require__.r(__webpack_exports__);
7753/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return Events; });
7754/**
7755 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
7756 * @version v27.3.0
7757 * @link https://www.ag-grid.com/
7758 * @license MIT
7759 */
7760var Events = /** @class */ (function () {
7761 function Events() {
7762 }
7763 /** Everything has changed with the columns. Either complete new set of columns set, or user called setState() */
7764 /** @deprecated - grid no longer uses this, and setSate() also fires individual events */
7765 Events.EVENT_COLUMN_EVERYTHING_CHANGED = 'columnEverythingChanged';
7766 /** User has set in new columns. */
7767 Events.EVENT_NEW_COLUMNS_LOADED = 'newColumnsLoaded';
7768 /** The pivot mode flag was changed */
7769 Events.EVENT_COLUMN_PIVOT_MODE_CHANGED = 'columnPivotModeChanged';
7770 /** A row group column was added, removed or order changed. */
7771 Events.EVENT_COLUMN_ROW_GROUP_CHANGED = 'columnRowGroupChanged';
7772 /** expandAll / collapseAll was called from the api. */
7773 Events.EVENT_EXPAND_COLLAPSE_ALL = 'expandOrCollapseAll';
7774 /** A pivot column was added, removed or order changed. */
7775 Events.EVENT_COLUMN_PIVOT_CHANGED = 'columnPivotChanged';
7776 /** The list of grid columns has changed. */
7777 Events.EVENT_GRID_COLUMNS_CHANGED = 'gridColumnsChanged';
7778 /** A value column was added, removed or agg function was changed. */
7779 Events.EVENT_COLUMN_VALUE_CHANGED = 'columnValueChanged';
7780 /** A column was moved */
7781 Events.EVENT_COLUMN_MOVED = 'columnMoved';
7782 /** One or more columns was shown / hidden */
7783 Events.EVENT_COLUMN_VISIBLE = 'columnVisible';
7784 /** One or more columns was pinned / unpinned*/
7785 Events.EVENT_COLUMN_PINNED = 'columnPinned';
7786 /** A column group was opened / closed */
7787 Events.EVENT_COLUMN_GROUP_OPENED = 'columnGroupOpened';
7788 /** One or more columns was resized. If just one, the column in the event is set. */
7789 Events.EVENT_COLUMN_RESIZED = 'columnResized';
7790 /** The list of displayed columns has changed, can result from columns open / close, column move, pivot, group, etc */
7791 Events.EVENT_DISPLAYED_COLUMNS_CHANGED = 'displayedColumnsChanged';
7792 /** The list of virtual columns has changed, results from viewport changing */
7793 Events.EVENT_VIRTUAL_COLUMNS_CHANGED = 'virtualColumnsChanged';
7794 /** Async Transactions Executed */
7795 Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED = 'asyncTransactionsFlushed';
7796 /** A row group was opened / closed */
7797 Events.EVENT_ROW_GROUP_OPENED = 'rowGroupOpened';
7798 /** The client has set new data into the grid */
7799 Events.EVENT_ROW_DATA_CHANGED = 'rowDataChanged';
7800 /** The client has updated data for the grid */
7801 Events.EVENT_ROW_DATA_UPDATED = 'rowDataUpdated';
7802 /** The client has set new floating data into the grid */
7803 Events.EVENT_PINNED_ROW_DATA_CHANGED = 'pinnedRowDataChanged';
7804 /** Range selection has changed */
7805 Events.EVENT_RANGE_SELECTION_CHANGED = 'rangeSelectionChanged';
7806 /** Chart was created */
7807 Events.EVENT_CHART_CREATED = 'chartCreated';
7808 /** Chart Range selection has changed */
7809 Events.EVENT_CHART_RANGE_SELECTION_CHANGED = 'chartRangeSelectionChanged';
7810 /** Chart Options have changed */
7811 Events.EVENT_CHART_OPTIONS_CHANGED = 'chartOptionsChanged';
7812 /** Chart was destroyed */
7813 Events.EVENT_CHART_DESTROYED = 'chartDestroyed';
7814 /** For when the tool panel is shown / hidden */
7815 Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED = 'toolPanelVisibleChanged';
7816 Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START = 'columnPanelItemDragStart';
7817 Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END = 'columnPanelItemDragEnd';
7818 /** Model was updated - grid updates the drawn rows when this happens */
7819 Events.EVENT_MODEL_UPDATED = 'modelUpdated';
7820 Events.EVENT_PASTE_START = 'pasteStart';
7821 Events.EVENT_PASTE_END = 'pasteEnd';
7822 Events.EVENT_FILL_START = 'fillStart';
7823 Events.EVENT_FILL_END = 'fillEnd';
7824 Events.EVENT_CELL_CLICKED = 'cellClicked';
7825 Events.EVENT_CELL_DOUBLE_CLICKED = 'cellDoubleClicked';
7826 Events.EVENT_CELL_MOUSE_DOWN = 'cellMouseDown';
7827 Events.EVENT_CELL_CONTEXT_MENU = 'cellContextMenu';
7828 Events.EVENT_CELL_VALUE_CHANGED = 'cellValueChanged';
7829 Events.EVENT_CELL_EDIT_REQUEST = 'cellEditRequest';
7830 Events.EVENT_ROW_VALUE_CHANGED = 'rowValueChanged';
7831 Events.EVENT_CELL_FOCUSED = 'cellFocused';
7832 Events.EVENT_FULL_WIDTH_ROW_FOCUSED = 'fullWidthRowFocused';
7833 Events.EVENT_ROW_SELECTED = 'rowSelected';
7834 Events.EVENT_SELECTION_CHANGED = 'selectionChanged';
7835 Events.EVENT_CELL_KEY_DOWN = 'cellKeyDown';
7836 Events.EVENT_CELL_KEY_PRESS = 'cellKeyPress';
7837 Events.EVENT_CELL_MOUSE_OVER = 'cellMouseOver';
7838 Events.EVENT_CELL_MOUSE_OUT = 'cellMouseOut';
7839 /** 2 events for filtering. The grid LISTENS for filterChanged and afterFilterChanged */
7840 Events.EVENT_FILTER_CHANGED = 'filterChanged';
7841 /** Filter was change but not applied. Only useful if apply buttons are used in filters. */
7842 Events.EVENT_FILTER_MODIFIED = 'filterModified';
7843 Events.EVENT_FILTER_OPENED = 'filterOpened';
7844 Events.EVENT_SORT_CHANGED = 'sortChanged';
7845 /** A row was removed from the dom, for any reason. Use to clean up resources (if any) used by the row. */
7846 Events.EVENT_VIRTUAL_ROW_REMOVED = 'virtualRowRemoved';
7847 Events.EVENT_ROW_CLICKED = 'rowClicked';
7848 Events.EVENT_ROW_DOUBLE_CLICKED = 'rowDoubleClicked';
7849 /** Gets called once after the grid has finished initialising. */
7850 Events.EVENT_GRID_READY = 'gridReady';
7851 /** Width of height of the main grid div has changed. Grid listens for this and does layout of grid if it's
7852 * changed, so always filling the space it was given. */
7853 Events.EVENT_GRID_SIZE_CHANGED = 'gridSizeChanged';
7854 /** The indexes of the rows rendered has changed, eg user has scrolled to a new vertical position. */
7855 Events.EVENT_VIEWPORT_CHANGED = 'viewportChanged';
7856 /* The width of the scrollbar has been calculated */
7857 Events.EVENT_SCROLLBAR_WIDTH_CHANGED = 'scrollbarWidthChanged';
7858 /** Rows were rendered for the first time (ie on async data load). */
7859 Events.EVENT_FIRST_DATA_RENDERED = 'firstDataRendered';
7860 /** A column drag has started, either resizing a column or moving a column. */
7861 Events.EVENT_DRAG_STARTED = 'dragStarted';
7862 /** A column drag has stopped */
7863 Events.EVENT_DRAG_STOPPED = 'dragStopped';
7864 Events.EVENT_CHECKBOX_CHANGED = 'checkboxChanged';
7865 Events.EVENT_ROW_EDITING_STARTED = 'rowEditingStarted';
7866 Events.EVENT_ROW_EDITING_STOPPED = 'rowEditingStopped';
7867 Events.EVENT_CELL_EDITING_STARTED = 'cellEditingStarted';
7868 Events.EVENT_CELL_EDITING_STOPPED = 'cellEditingStopped';
7869 /** Main body of grid has scrolled, either horizontally or vertically */
7870 Events.EVENT_BODY_SCROLL = 'bodyScroll';
7871 /** Main body of the grid has stopped scrolling, either horizontally or vertically */
7872 Events.EVENT_BODY_SCROLL_END = 'bodyScrollEnd';
7873 Events.EVENT_HEIGHT_SCALE_CHANGED = 'heightScaleChanged';
7874 /** The displayed page for pagination has changed. For example the data was filtered or sorted,
7875 * or the user has moved to a different page. */
7876 Events.EVENT_PAGINATION_CHANGED = 'paginationChanged';
7877 /** Only used by React, Angular, Web Components and VueJS AG Grid components
7878 * (not used if doing plain JavaScript). If the grid receives changes due
7879 * to bound properties, this event fires after the grid has finished processing the change. */
7880 Events.EVENT_COMPONENT_STATE_CHANGED = 'componentStateChanged';
7881 /***************************** INTERNAL EVENTS: START ******************************************* */
7882 /** Please remember to add to ComponentUtil.EXCLUDED_INTERNAL_EVENTS to not have these events exposed to framework components. */
7883 /** All items from here down are used internally by the grid, not intended for external use. */
7884 // not documented, either experimental, or we just don't want users using an depending on them
7885 Events.EVENT_BODY_HEIGHT_CHANGED = 'bodyHeightChanged';
7886 Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED = 'displayedColumnsWidthChanged';
7887 Events.EVENT_SCROLL_VISIBILITY_CHANGED = 'scrollVisibilityChanged';
7888 Events.EVENT_COLUMN_HOVER_CHANGED = 'columnHoverChanged';
7889 Events.EVENT_FLASH_CELLS = 'flashCells';
7890 Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED = 'paginationPixelOffsetChanged';
7891 Events.EVENT_DISPLAYED_ROWS_CHANGED = 'displayedRowsChanged';
7892 Events.EVENT_LEFT_PINNED_WIDTH_CHANGED = 'leftPinnedWidthChanged';
7893 Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED = 'rightPinnedWidthChanged';
7894 Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED = 'rowContainerHeightChanged';
7895 Events.EVENT_ROW_DRAG_ENTER = 'rowDragEnter';
7896 Events.EVENT_ROW_DRAG_MOVE = 'rowDragMove';
7897 Events.EVENT_ROW_DRAG_LEAVE = 'rowDragLeave';
7898 Events.EVENT_ROW_DRAG_END = 'rowDragEnd';
7899 // primarily for charts
7900 Events.EVENT_POPUP_TO_FRONT = 'popupToFront';
7901 // these are used for server side group and agg - only used by CS with Viewport Row Model - intention is
7902 // to design these better around server side functions and then release to general public when fully working with
7903 // all the row models.
7904 Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST = 'columnRowGroupChangeRequest';
7905 Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST = 'columnPivotChangeRequest';
7906 Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST = 'columnValueChangeRequest';
7907 Events.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST = 'columnAggFuncChangeRequest';
7908 Events.EVENT_KEYBOARD_FOCUS = 'keyboardFocus';
7909 Events.EVENT_MOUSE_FOCUS = 'mouseFocus';
7910 Events.EVENT_STORE_UPDATED = 'storeUpdated';
7911 return Events;
7912}());
7913
7914
7915
7916
7917
7918/***/ }),
7919/* 25 */
7920/***/ (function(module, __webpack_exports__, __webpack_require__) {
7921
7922"use strict";
7923__webpack_require__.r(__webpack_exports__);
7924/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupInstanceIdCreator", function() { return GroupInstanceIdCreator; });
7925/**
7926 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
7927 * @version v27.3.0
7928 * @link https://www.ag-grid.com/
7929 * @license MIT
7930 */
7931// class returns unique instance id's for columns.
7932// eg, the following calls (in this order) will result in:
7933//
7934// getInstanceIdForKey('country') => 0
7935// getInstanceIdForKey('country') => 1
7936// getInstanceIdForKey('country') => 2
7937// getInstanceIdForKey('country') => 3
7938// getInstanceIdForKey('age') => 0
7939// getInstanceIdForKey('age') => 1
7940// getInstanceIdForKey('country') => 4
7941var GroupInstanceIdCreator = /** @class */ (function () {
7942 function GroupInstanceIdCreator() {
7943 // this map contains keys to numbers, so we remember what the last call was
7944 this.existingIds = {};
7945 }
7946 GroupInstanceIdCreator.prototype.getInstanceIdForKey = function (key) {
7947 var lastResult = this.existingIds[key];
7948 var result;
7949 if (typeof lastResult !== 'number') {
7950 // first time this key
7951 result = 0;
7952 }
7953 else {
7954 result = lastResult + 1;
7955 }
7956 this.existingIds[key] = result;
7957 return result;
7958 };
7959 return GroupInstanceIdCreator;
7960}());
7961
7962
7963
7964
7965
7966/***/ }),
7967/* 26 */
7968/***/ (function(module, __webpack_exports__, __webpack_require__) {
7969
7970"use strict";
7971__webpack_require__.r(__webpack_exports__);
7972/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utf8_encode", function() { return utf8_encode; });
7973/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "camelCaseToHyphen", function() { return camelCaseToHyphen; });
7974/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hyphenToCamelCase", function() { return hyphenToCamelCase; });
7975/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "capitalise", function() { return capitalise; });
7976/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "escapeString", function() { return escapeString; });
7977/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "camelCaseToHumanText", function() { return camelCaseToHumanText; });
7978/**
7979 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
7980 * @version v27.3.0
7981 * @link https://www.ag-grid.com/
7982 * @license MIT
7983 */
7984var reUnescapedHtml = /[&<>"']/g;
7985/**
7986 * HTML Escapes.
7987 */
7988var HTML_ESCAPES = {
7989 '&': '&amp;',
7990 '<': '&lt;',
7991 '>': '&gt;',
7992 '"': '&quot;',
7993 "'": '&#39;'
7994};
7995/**
7996 * It encodes any string in UTF-8 format
7997 * taken from https://github.com/mathiasbynens/utf8.js
7998 * @param {string} s
7999 * @returns {string}
8000 */
8001function utf8_encode(s) {
8002 var stringFromCharCode = String.fromCharCode;
8003 function ucs2decode(string) {
8004 var output = [];
8005 if (!string) {
8006 return [];
8007 }
8008 var len = string.length;
8009 var counter = 0;
8010 var value;
8011 var extra;
8012 while (counter < len) {
8013 value = string.charCodeAt(counter++);
8014 if (value >= 0xD800 && value <= 0xDBFF && counter < len) {
8015 // high surrogate, and there is a next character
8016 extra = string.charCodeAt(counter++);
8017 if ((extra & 0xFC00) == 0xDC00) { // low surrogate
8018 output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
8019 }
8020 else {
8021 // unmatched surrogate; only append this code unit, in case the next
8022 // code unit is the high surrogate of a surrogate pair
8023 output.push(value);
8024 counter--;
8025 }
8026 }
8027 else {
8028 output.push(value);
8029 }
8030 }
8031 return output;
8032 }
8033 function checkScalarValue(point) {
8034 if (point >= 0xD800 && point <= 0xDFFF) {
8035 throw Error('Lone surrogate U+' + point.toString(16).toUpperCase() +
8036 ' is not a scalar value');
8037 }
8038 }
8039 function createByte(point, shift) {
8040 return stringFromCharCode(((point >> shift) & 0x3F) | 0x80);
8041 }
8042 function encodeCodePoint(point) {
8043 if ((point >= 0 && point <= 31 && point !== 10)) {
8044 var convertedCode = point.toString(16).toUpperCase();
8045 var paddedCode = convertedCode.padStart(4, '0');
8046 return "_x" + paddedCode + "_";
8047 }
8048 if ((point & 0xFFFFFF80) == 0) { // 1-byte sequence
8049 return stringFromCharCode(point);
8050 }
8051 var symbol = '';
8052 if ((point & 0xFFFFF800) == 0) { // 2-byte sequence
8053 symbol = stringFromCharCode(((point >> 6) & 0x1F) | 0xC0);
8054 }
8055 else if ((point & 0xFFFF0000) == 0) { // 3-byte sequence
8056 checkScalarValue(point);
8057 symbol = stringFromCharCode(((point >> 12) & 0x0F) | 0xE0);
8058 symbol += createByte(point, 6);
8059 }
8060 else if ((point & 0xFFE00000) == 0) { // 4-byte sequence
8061 symbol = stringFromCharCode(((point >> 18) & 0x07) | 0xF0);
8062 symbol += createByte(point, 12);
8063 symbol += createByte(point, 6);
8064 }
8065 symbol += stringFromCharCode((point & 0x3F) | 0x80);
8066 return symbol;
8067 }
8068 var codePoints = ucs2decode(s);
8069 var length = codePoints.length;
8070 var index = -1;
8071 var codePoint;
8072 var byteString = '';
8073 while (++index < length) {
8074 codePoint = codePoints[index];
8075 byteString += encodeCodePoint(codePoint);
8076 }
8077 return byteString;
8078}
8079/**
8080 * Converts a camelCase string into hyphenated string
8081 * from https://gist.github.com/youssman/745578062609e8acac9f
8082 * @param {string} str
8083 * @return {string}
8084 */
8085function camelCaseToHyphen(str) {
8086 if (str === null || str === undefined) {
8087 return null;
8088 }
8089 return str.replace(/([A-Z])/g, function (g) { return '-' + g[0].toLowerCase(); });
8090}
8091/**
8092 * Converts a hyphenated string into camelCase string
8093 * from https://stackoverflow.com/questions/6660977/convert-hyphens-to-camel-case-camelcase
8094 * @param {string} str
8095 * @return {string}
8096 */
8097function hyphenToCamelCase(str) {
8098 if (str === null || str === undefined) {
8099 return null;
8100 }
8101 return str.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });
8102}
8103function capitalise(str) {
8104 return str[0].toUpperCase() + str.substr(1).toLowerCase();
8105}
8106function escapeString(toEscape) {
8107 // we call toString() twice, in case value is an object, where user provides
8108 // a toString() method, and first call to toString() returns back something other
8109 // than a string (eg a number to render)
8110 return toEscape == null ? null : toEscape.toString().toString().replace(reUnescapedHtml, function (chr) { return HTML_ESCAPES[chr]; });
8111}
8112/**
8113 * Converts a camelCase string into regular text
8114 * from: https://stackoverflow.com/questions/15369566/putting-space-in-camel-case-string-using-regular-expression
8115 * @param {string} camelCase
8116 * @return {string}
8117 */
8118function camelCaseToHumanText(camelCase) {
8119 if (!camelCase || camelCase == null) {
8120 return null;
8121 }
8122 var rex = /([A-Z])([A-Z])([a-z])|([a-z])([A-Z])/g;
8123 var words = camelCase.replace(rex, '$1$4 $2$3$5').replace('.', ' ').split(' ');
8124 return words.map(function (word) { return word.substring(0, 1).toUpperCase() + ((word.length > 1) ? word.substring(1, word.length) : ''); }).join(' ');
8125}
8126
8127
8128
8129
8130/***/ }),
8131/* 27 */
8132/***/ (function(module, __webpack_exports__, __webpack_require__) {
8133
8134"use strict";
8135__webpack_require__.r(__webpack_exports__);
8136/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToMap", function() { return convertToMap; });
8137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapById", function() { return mapById; });
8138/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return keys; });
8139/**
8140 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8141 * @version v27.3.0
8142 * @link https://www.ag-grid.com/
8143 * @license MIT
8144 */
8145function convertToMap(arr) {
8146 var map = new Map();
8147 arr.forEach(function (pair) { return map.set(pair[0], pair[1]); });
8148 return map;
8149}
8150// handy for organising a list into a map, where each item is mapped by an attribute, eg mapping Columns by ID
8151function mapById(arr, callback) {
8152 var map = new Map();
8153 arr.forEach(function (item) { return map.set(callback(item), item); });
8154 return map;
8155}
8156function keys(map) {
8157 var arr = [];
8158 map.forEach(function (_, key) { return arr.push(key); });
8159 return arr;
8160}
8161
8162
8163
8164
8165/***/ }),
8166/* 28 */
8167/***/ (function(module, __webpack_exports__, __webpack_require__) {
8168
8169"use strict";
8170__webpack_require__.r(__webpack_exports__);
8171/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnUtils", function() { return ColumnUtils; });
8172/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
8173/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
8174/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
8175/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
8176/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
8177/**
8178 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8179 * @version v27.3.0
8180 * @link https://www.ag-grid.com/
8181 * @license MIT
8182 */
8183var __extends = (undefined && undefined.__extends) || (function () {
8184 var extendStatics = function (d, b) {
8185 extendStatics = Object.setPrototypeOf ||
8186 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8187 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
8188 return extendStatics(d, b);
8189 };
8190 return function (d, b) {
8191 extendStatics(d, b);
8192 function __() { this.constructor = d; }
8193 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
8194 };
8195})();
8196var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
8197 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8198 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8199 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
8200 return c > 3 && r && Object.defineProperty(target, key, r), r;
8201};
8202
8203
8204
8205
8206
8207// takes in a list of columns, as specified by the column definitions, and returns column groups
8208var ColumnUtils = /** @class */ (function (_super) {
8209 __extends(ColumnUtils, _super);
8210 function ColumnUtils() {
8211 return _super !== null && _super.apply(this, arguments) || this;
8212 }
8213 ColumnUtils.prototype.calculateColMinWidth = function (colDef) {
8214 return colDef.minWidth != null ? colDef.minWidth : this.gridOptionsWrapper.getMinColWidth();
8215 };
8216 ColumnUtils.prototype.calculateColMaxWidth = function (colDef) {
8217 return colDef.maxWidth != null ? colDef.maxWidth : (this.gridOptionsWrapper.getMaxColWidth() || Number.MAX_SAFE_INTEGER);
8218 };
8219 ColumnUtils.prototype.calculateColInitialWidth = function (colDef) {
8220 var minColWidth = this.calculateColMinWidth(colDef);
8221 var maxColWidth = this.calculateColMaxWidth(colDef);
8222 var width;
8223 var colDefWidth = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToNumber"])(colDef.width);
8224 var colDefInitialWidth = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToNumber"])(colDef.initialWidth);
8225 if (colDefWidth != null) {
8226 width = colDefWidth;
8227 }
8228 else if (colDefInitialWidth != null) {
8229 width = colDefInitialWidth;
8230 }
8231 else {
8232 width = this.gridOptionsWrapper.getColWidth();
8233 }
8234 return Math.max(Math.min(width, maxColWidth), minColWidth);
8235 };
8236 ColumnUtils.prototype.getOriginalPathForColumn = function (column, originalBalancedTree) {
8237 var result = [];
8238 var found = false;
8239 var recursePath = function (balancedColumnTree, dept) {
8240 for (var i = 0; i < balancedColumnTree.length; i++) {
8241 if (found) {
8242 return;
8243 }
8244 // quit the search, so 'result' is kept with the found result
8245 var node = balancedColumnTree[i];
8246 if (node instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
8247 var nextNode = node;
8248 recursePath(nextNode.getChildren(), dept + 1);
8249 result[dept] = node;
8250 }
8251 else if (node === column) {
8252 found = true;
8253 }
8254 }
8255 };
8256 recursePath(originalBalancedTree, 0);
8257 // we should always find the path, but in case there is a bug somewhere, returning null
8258 // will make it fail rather than provide a 'hard to track down' bug
8259 return found ? result : null;
8260 };
8261 ColumnUtils.prototype.depthFirstOriginalTreeSearch = function (parent, tree, callback) {
8262 var _this = this;
8263 if (!tree) {
8264 return;
8265 }
8266 tree.forEach(function (child) {
8267 if (child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
8268 _this.depthFirstOriginalTreeSearch(child, child.getChildren(), callback);
8269 }
8270 callback(child, parent);
8271 });
8272 };
8273 ColumnUtils.prototype.depthFirstAllColumnTreeSearch = function (tree, callback) {
8274 var _this = this;
8275 if (!tree) {
8276 return;
8277 }
8278 tree.forEach(function (child) {
8279 if (child instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
8280 _this.depthFirstAllColumnTreeSearch(child.getChildren(), callback);
8281 }
8282 callback(child);
8283 });
8284 };
8285 ColumnUtils.prototype.depthFirstDisplayedColumnTreeSearch = function (tree, callback) {
8286 var _this = this;
8287 if (!tree) {
8288 return;
8289 }
8290 tree.forEach(function (child) {
8291 if (child instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
8292 _this.depthFirstDisplayedColumnTreeSearch(child.getDisplayedChildren(), callback);
8293 }
8294 callback(child);
8295 });
8296 };
8297 ColumnUtils = __decorate([
8298 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('columnUtils')
8299 ], ColumnUtils);
8300 return ColumnUtils;
8301}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
8302
8303
8304
8305
8306
8307/***/ }),
8308/* 29 */
8309/***/ (function(module, __webpack_exports__, __webpack_require__) {
8310
8311"use strict";
8312__webpack_require__.r(__webpack_exports__);
8313/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DisplayedGroupCreator", function() { return DisplayedGroupCreator; });
8314/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
8315/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
8316/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
8317/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
8318/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18);
8319/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
8320/**
8321 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8322 * @version v27.3.0
8323 * @link https://www.ag-grid.com/
8324 * @license MIT
8325 */
8326var __extends = (undefined && undefined.__extends) || (function () {
8327 var extendStatics = function (d, b) {
8328 extendStatics = Object.setPrototypeOf ||
8329 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8330 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
8331 return extendStatics(d, b);
8332 };
8333 return function (d, b) {
8334 extendStatics(d, b);
8335 function __() { this.constructor = d; }
8336 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
8337 };
8338})();
8339var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
8340 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8341 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8342 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
8343 return c > 3 && r && Object.defineProperty(target, key, r), r;
8344};
8345
8346
8347
8348
8349
8350
8351// takes in a list of columns, as specified by the column definitions, and returns column groups
8352var DisplayedGroupCreator = /** @class */ (function (_super) {
8353 __extends(DisplayedGroupCreator, _super);
8354 function DisplayedGroupCreator() {
8355 return _super !== null && _super.apply(this, arguments) || this;
8356 }
8357 DisplayedGroupCreator.prototype.createDisplayedGroups = function (
8358 // all displayed columns sorted - this is the columns the grid should show
8359 sortedVisibleColumns,
8360 // the tree of columns, as provided by the users, used to know what groups columns roll up into
8361 balancedColumnTree,
8362 // creates unique id's for the group
8363 groupInstanceIdCreator,
8364 // whether it's left, right or center col
8365 pinned,
8366 // we try to reuse old groups if we can, to allow gui to do animation
8367 oldDisplayedGroups) {
8368 var _this = this;
8369 var result = [];
8370 var previousRealPath;
8371 var previousOriginalPath;
8372 var oldColumnsMapped = this.mapOldGroupsById(oldDisplayedGroups);
8373 // go through each column, then do a bottom up comparison to the previous column, and start
8374 // to share groups if they converge at any point.
8375 sortedVisibleColumns.forEach(function (currentColumn) {
8376 var currentOriginalPath = _this.getOriginalPathForColumn(balancedColumnTree, currentColumn);
8377 var currentRealPath = [];
8378 var firstColumn = !previousOriginalPath;
8379 for (var i = 0; i < currentOriginalPath.length; i++) {
8380 if (firstColumn || currentOriginalPath[i] !== previousOriginalPath[i]) {
8381 // new group needed
8382 var newGroup = _this.createColumnGroup(currentOriginalPath[i], groupInstanceIdCreator, oldColumnsMapped, pinned);
8383 currentRealPath[i] = newGroup;
8384 // if top level, add to result, otherwise add to parent
8385 if (i == 0) {
8386 result.push(newGroup);
8387 }
8388 else {
8389 currentRealPath[i - 1].addChild(newGroup);
8390 }
8391 }
8392 else {
8393 // reuse old group
8394 currentRealPath[i] = previousRealPath[i];
8395 }
8396 }
8397 var noColumnGroups = currentRealPath.length === 0;
8398 if (noColumnGroups) {
8399 // if we are not grouping, then the result of the above is an empty
8400 // path (no groups), and we just add the column to the root list.
8401 result.push(currentColumn);
8402 }
8403 else {
8404 var leafGroup = Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(currentRealPath);
8405 leafGroup.addChild(currentColumn);
8406 }
8407 previousRealPath = currentRealPath;
8408 previousOriginalPath = currentOriginalPath;
8409 });
8410 this.setupParentsIntoColumns(result, null);
8411 return result;
8412 };
8413 DisplayedGroupCreator.prototype.createColumnGroup = function (providedGroup, groupInstanceIdCreator, oldColumnsMapped, pinned) {
8414 var groupId = providedGroup.getGroupId();
8415 var instanceId = groupInstanceIdCreator.getInstanceIdForKey(groupId);
8416 var uniqueId = _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"].createUniqueId(groupId, instanceId);
8417 var columnGroup = oldColumnsMapped[uniqueId];
8418 // if the user is setting new colDefs, it is possible that the id's overlap, and we
8419 // would have a false match from above. so we double check we are talking about the
8420 // same original column group.
8421 if (columnGroup && columnGroup.getProvidedColumnGroup() !== providedGroup) {
8422 columnGroup = null;
8423 }
8424 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(columnGroup)) {
8425 // clean out the old column group here, as we will be adding children into it again
8426 columnGroup.reset();
8427 }
8428 else {
8429 columnGroup = new _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"](providedGroup, groupId, instanceId, pinned);
8430 this.context.createBean(columnGroup);
8431 }
8432 return columnGroup;
8433 };
8434 // returns back a 2d map of ColumnGroup as follows: groupId -> instanceId -> ColumnGroup
8435 DisplayedGroupCreator.prototype.mapOldGroupsById = function (displayedGroups) {
8436 var result = {};
8437 var recursive = function (columnsOrGroups) {
8438 columnsOrGroups.forEach(function (columnOrGroup) {
8439 if (columnOrGroup instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
8440 var columnGroup = columnOrGroup;
8441 result[columnOrGroup.getUniqueId()] = columnGroup;
8442 recursive(columnGroup.getChildren());
8443 }
8444 });
8445 };
8446 if (displayedGroups) {
8447 recursive(displayedGroups);
8448 }
8449 return result;
8450 };
8451 DisplayedGroupCreator.prototype.setupParentsIntoColumns = function (columnsOrGroups, parent) {
8452 var _this = this;
8453 columnsOrGroups.forEach(function (columnsOrGroup) {
8454 columnsOrGroup.setParent(parent);
8455 if (columnsOrGroup instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
8456 var columnGroup = columnsOrGroup;
8457 _this.setupParentsIntoColumns(columnGroup.getChildren(), columnGroup);
8458 }
8459 });
8460 };
8461 DisplayedGroupCreator.prototype.getOriginalPathForColumn = function (balancedColumnTree, column) {
8462 var result = [];
8463 var found = false;
8464 var recursePath = function (columnTree, dept) {
8465 for (var i = 0; i < columnTree.length; i++) {
8466 // quit the search, so 'result' is kept with the found result
8467 if (found) {
8468 return;
8469 }
8470 var node = columnTree[i];
8471 if (node instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
8472 recursePath(node.getChildren(), dept + 1);
8473 result[dept] = node;
8474 }
8475 else if (node === column) {
8476 found = true;
8477 }
8478 }
8479 };
8480 recursePath(balancedColumnTree, 0);
8481 // it's possible we didn't find a path. this happens if the column is generated
8482 // by the grid (auto-group), in that the definition didn't come from the client. in this case,
8483 // we create a fake original path.
8484 if (found) {
8485 return result;
8486 }
8487 console.warn('AG Grid: could not get path');
8488 return null;
8489 };
8490 DisplayedGroupCreator = __decorate([
8491 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('displayedGroupCreator')
8492 ], DisplayedGroupCreator);
8493 return DisplayedGroupCreator;
8494}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
8495
8496
8497
8498
8499
8500/***/ }),
8501/* 30 */
8502/***/ (function(module, __webpack_exports__, __webpack_require__) {
8503
8504"use strict";
8505__webpack_require__.r(__webpack_exports__);
8506/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentUtil", function() { return ComponentUtil; });
8507/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
8508/* harmony import */ var _propertyKeys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31);
8509/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
8510/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
8511/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
8512/**
8513 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8514 * @version v27.3.0
8515 * @link https://www.ag-grid.com/
8516 * @license MIT
8517 */
8518var __assign = (undefined && undefined.__assign) || function () {
8519 __assign = Object.assign || function(t) {
8520 for (var s, i = 1, n = arguments.length; i < n; i++) {
8521 s = arguments[i];
8522 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8523 t[p] = s[p];
8524 }
8525 return t;
8526 };
8527 return __assign.apply(this, arguments);
8528};
8529var __read = (undefined && undefined.__read) || function (o, n) {
8530 var m = typeof Symbol === "function" && o[Symbol.iterator];
8531 if (!m) return o;
8532 var i = m.call(o), r, ar = [], e;
8533 try {
8534 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8535 }
8536 catch (error) { e = { error: error }; }
8537 finally {
8538 try {
8539 if (r && !r.done && (m = i["return"])) m.call(i);
8540 }
8541 finally { if (e) throw e.error; }
8542 }
8543 return ar;
8544};
8545var __spread = (undefined && undefined.__spread) || function () {
8546 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
8547 return ar;
8548};
8549
8550
8551
8552
8553
8554var ComponentUtil = /** @class */ (function () {
8555 function ComponentUtil() {
8556 }
8557 ComponentUtil.getEventCallbacks = function () {
8558 if (!ComponentUtil.EVENT_CALLBACKS) {
8559 ComponentUtil.EVENT_CALLBACKS = ComponentUtil.EVENTS.map(function (event) { return ComponentUtil.getCallbackForEvent(event); });
8560 }
8561 return ComponentUtil.EVENT_CALLBACKS;
8562 };
8563 ComponentUtil.copyAttributesToGridOptions = function (gridOptions, component, skipEventDeprecationCheck) {
8564 if (skipEventDeprecationCheck === void 0) { skipEventDeprecationCheck = false; }
8565 // create empty grid options if none were passed
8566 if (typeof gridOptions !== 'object') {
8567 gridOptions = {};
8568 }
8569 // to allow array style lookup in TypeScript, take type away from 'this' and 'gridOptions'
8570 var pGridOptions = gridOptions;
8571 var keyExists = function (key) { return typeof component[key] !== 'undefined'; };
8572 // if groupAggFiltering exists and isn't a function, handle as a boolean.
8573 if (keyExists('groupAggFiltering') && typeof component.groupAggFiltering !== 'function') {
8574 pGridOptions.groupAggFiltering = ComponentUtil.toBoolean(component.groupAggFiltering);
8575 delete component.groupAggFiltering;
8576 }
8577 // add in all the simple properties
8578 __spread(ComponentUtil.ARRAY_PROPERTIES, ComponentUtil.STRING_PROPERTIES, ComponentUtil.OBJECT_PROPERTIES, ComponentUtil.FUNCTION_PROPERTIES, ComponentUtil.getEventCallbacks()).filter(keyExists)
8579 .forEach(function (key) { return pGridOptions[key] = component[key]; });
8580 ComponentUtil.BOOLEAN_PROPERTIES
8581 .filter(keyExists)
8582 .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toBoolean(component[key]); });
8583 ComponentUtil.NUMBER_PROPERTIES
8584 .filter(keyExists)
8585 .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toNumber(component[key]); });
8586 return gridOptions;
8587 };
8588 ComponentUtil.getCallbackForEvent = function (eventName) {
8589 if (!eventName || eventName.length < 2) {
8590 return eventName;
8591 }
8592 return 'on' + eventName[0].toUpperCase() + eventName.substr(1);
8593 };
8594 ComponentUtil.processOnChange = function (changes, gridOptions, api, columnApi) {
8595 if (!changes) {
8596 return;
8597 }
8598 var changesToApply = __assign({}, changes);
8599 // to allow array style lookup in TypeScript, take type away from 'this' and 'gridOptions'
8600 var pGridOptions = gridOptions;
8601 var keyExists = function (key) { return changesToApply[key]; };
8602 // if groupAggFiltering exists and isn't a function, handle as a boolean.
8603 if (keyExists('groupAggFiltering')) {
8604 if (typeof changesToApply.groupAggFiltering === 'function') {
8605 pGridOptions.groupAggFiltering = changesToApply.groupAggFiltering;
8606 }
8607 else {
8608 pGridOptions.groupAggFiltering = ComponentUtil.toBoolean(changesToApply.groupAggFiltering);
8609 }
8610 delete changesToApply.groupAggFiltering;
8611 }
8612 // we need to do this before the generic handling, otherwise value gets set before we
8613 // try to set it, and the grid then doesn't refresh the rows as it doesn't see any change.
8614 // also it's possible we use the generic code setXXX below and put it up there instead,
8615 // cover all cases.
8616 if (changesToApply.rowClass) {
8617 api.setRowClass(changesToApply.rowClass.currentValue);
8618 delete changesToApply.rowClass;
8619 }
8620 // check if any change for the simple types, and if so, then just copy in the new value
8621 __spread(ComponentUtil.ARRAY_PROPERTIES, ComponentUtil.OBJECT_PROPERTIES, ComponentUtil.STRING_PROPERTIES, ComponentUtil.getEventCallbacks()).filter(keyExists)
8622 .forEach(function (key) { return pGridOptions[key] = changesToApply[key].currentValue; });
8623 ComponentUtil.BOOLEAN_PROPERTIES
8624 .filter(keyExists)
8625 .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toBoolean(changesToApply[key].currentValue); });
8626 ComponentUtil.NUMBER_PROPERTIES
8627 .filter(keyExists)
8628 .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toNumber(changesToApply[key].currentValue); });
8629 if (changesToApply.enableCellTextSelection) {
8630 api.setEnableCellTextSelection(ComponentUtil.toBoolean(changesToApply.enableCellTextSelection.currentValue));
8631 delete changesToApply.enableCellTextSelection;
8632 }
8633 if (changesToApply.quickFilterText) {
8634 api.setQuickFilter(changesToApply.quickFilterText.currentValue);
8635 delete changesToApply.quickFilterText;
8636 }
8637 if (changesToApply.autoGroupColumnDef) {
8638 api.setAutoGroupColumnDef(changesToApply.autoGroupColumnDef.currentValue, "gridOptionsChanged");
8639 delete changesToApply.autoGroupColumnDef;
8640 }
8641 if (changesToApply.columnDefs) {
8642 api.setColumnDefs(changesToApply.columnDefs.currentValue, "gridOptionsChanged");
8643 delete changesToApply.columnDefs;
8644 }
8645 if (changesToApply.defaultColDef) {
8646 api.setDefaultColDef(changesToApply.defaultColDef.currentValue, "gridOptionsChanged");
8647 delete changesToApply.defaultColDef;
8648 }
8649 if (changesToApply.paginationPageSize) {
8650 api.paginationSetPageSize(ComponentUtil.toNumber(changesToApply.paginationPageSize.currentValue));
8651 delete changesToApply.paginationPageSize;
8652 }
8653 if (changesToApply.pivotMode) {
8654 columnApi.setPivotMode(ComponentUtil.toBoolean(changesToApply.pivotMode.currentValue));
8655 delete changesToApply.pivotMode;
8656 }
8657 if (changesToApply.groupRemoveSingleChildren) {
8658 api.setGroupRemoveSingleChildren(ComponentUtil.toBoolean(changesToApply.groupRemoveSingleChildren.currentValue));
8659 delete changesToApply.groupRemoveSingleChildren;
8660 }
8661 if (changesToApply.suppressRowDrag) {
8662 api.setSuppressRowDrag(ComponentUtil.toBoolean(changesToApply.suppressRowDrag.currentValue));
8663 delete changesToApply.suppressRowDrag;
8664 }
8665 if (changesToApply.suppressMoveWhenRowDragging) {
8666 api.setSuppressMoveWhenRowDragging(ComponentUtil.toBoolean(changesToApply.suppressMoveWhenRowDragging.currentValue));
8667 delete changesToApply.suppressMoveWhenRowDragging;
8668 }
8669 if (changesToApply.suppressRowClickSelection) {
8670 api.setSuppressRowClickSelection(ComponentUtil.toBoolean(changesToApply.suppressRowClickSelection.currentValue));
8671 delete changesToApply.suppressRowClickSelection;
8672 }
8673 if (changesToApply.suppressClipboardPaste) {
8674 api.setSuppressClipboardPaste(ComponentUtil.toBoolean(changesToApply.suppressClipboardPaste.currentValue));
8675 delete changesToApply.suppressClipboardPaste;
8676 }
8677 if (changesToApply.headerHeight) {
8678 api.setHeaderHeight(ComponentUtil.toNumber(changesToApply.headerHeight.currentValue));
8679 delete changesToApply.headerHeight;
8680 }
8681 // any remaining properties can be set in a generic way
8682 // ie the setter takes the form of setXXX and the argument requires no formatting/translation first
8683 var dynamicApi = api;
8684 Object.keys(changesToApply)
8685 .forEach(function (property) {
8686 var setterName = "set" + property.charAt(0).toUpperCase() + property.substring(1);
8687 if (dynamicApi[setterName]) {
8688 dynamicApi[setterName](changes[property].currentValue);
8689 }
8690 });
8691 // copy changes into an event for dispatch
8692 var event = {
8693 type: _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COMPONENT_STATE_CHANGED,
8694 api: gridOptions.api,
8695 columnApi: gridOptions.columnApi
8696 };
8697 Object(_utils_object__WEBPACK_IMPORTED_MODULE_2__["iterateObject"])(changes, function (key, value) {
8698 event[key] = value;
8699 });
8700 api.dispatchEvent(event);
8701 };
8702 ComponentUtil.toBoolean = function (value) {
8703 if (typeof value === 'boolean') {
8704 return value;
8705 }
8706 if (typeof value === 'string') {
8707 // for boolean, compare to empty String to allow attributes appearing with
8708 // no value to be treated as 'true'
8709 return value.toUpperCase() === 'TRUE' || value == '';
8710 }
8711 return false;
8712 };
8713 ComponentUtil.toNumber = function (value) {
8714 if (typeof value === 'number') {
8715 return value;
8716 }
8717 if (typeof value === 'string') {
8718 return Number(value);
8719 }
8720 };
8721 // all the events are populated in here AFTER this class (at the bottom of the file).
8722 ComponentUtil.EVENTS = [];
8723 // events that are available for use by users of AG Grid and so should be documented
8724 ComponentUtil.PUBLIC_EVENTS = [];
8725 // events that are internal to AG Grid and should not be exposed to users via documentation or generated framework components
8726 ComponentUtil.EXCLUDED_INTERNAL_EVENTS = [];
8727 ComponentUtil.STRING_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].STRING_PROPERTIES;
8728 ComponentUtil.OBJECT_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].OBJECT_PROPERTIES;
8729 ComponentUtil.ARRAY_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].ARRAY_PROPERTIES;
8730 ComponentUtil.NUMBER_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].NUMBER_PROPERTIES;
8731 ComponentUtil.BOOLEAN_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].BOOLEAN_PROPERTIES;
8732 ComponentUtil.FUNCTION_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].FUNCTION_PROPERTIES;
8733 ComponentUtil.ALL_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].ALL_PROPERTIES;
8734 return ComponentUtil;
8735}());
8736
8737ComponentUtil.EVENTS = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["values"])(_events__WEBPACK_IMPORTED_MODULE_0__["Events"]);
8738/** Exclude the following internal events from code generation to prevent exposing these events via framework components */
8739ComponentUtil.EXCLUDED_INTERNAL_EVENTS = [
8740 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SCROLLBAR_WIDTH_CHANGED,
8741 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CHECKBOX_CHANGED,
8742 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_HEIGHT_SCALE_CHANGED,
8743 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_BODY_HEIGHT_CHANGED,
8744 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,
8745 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED,
8746 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_HOVER_CHANGED,
8747 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FLASH_CELLS,
8748 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,
8749 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_DISPLAYED_ROWS_CHANGED,
8750 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_LEFT_PINNED_WIDTH_CHANGED,
8751 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_RIGHT_PINNED_WIDTH_CHANGED,
8752 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_ROW_CONTAINER_HEIGHT_CHANGED,
8753 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_POPUP_TO_FRONT,
8754 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_KEYBOARD_FOCUS,
8755 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_MOUSE_FOCUS,
8756 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_STORE_UPDATED,
8757 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PANEL_ITEM_DRAG_START,
8758 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PANEL_ITEM_DRAG_END,
8759 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FILL_START,
8760 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FILL_END,
8761 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FULL_WIDTH_ROW_FOCUSED
8762];
8763/** EVENTS that should be exposed via code generation for the framework components. */
8764ComponentUtil.PUBLIC_EVENTS = ComponentUtil.EVENTS.filter(function (e) { return !Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["includes"])(ComponentUtil.EXCLUDED_INTERNAL_EVENTS, e); });
8765
8766
8767
8768
8769/***/ }),
8770/* 31 */
8771/***/ (function(module, __webpack_exports__, __webpack_require__) {
8772
8773"use strict";
8774__webpack_require__.r(__webpack_exports__);
8775/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyKeys", function() { return PropertyKeys; });
8776/**
8777 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8778 * @version v27.3.0
8779 * @link https://www.ag-grid.com/
8780 * @license MIT
8781 */
8782var __read = (undefined && undefined.__read) || function (o, n) {
8783 var m = typeof Symbol === "function" && o[Symbol.iterator];
8784 if (!m) return o;
8785 var i = m.call(o), r, ar = [], e;
8786 try {
8787 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8788 }
8789 catch (error) { e = { error: error }; }
8790 finally {
8791 try {
8792 if (r && !r.done && (m = i["return"])) m.call(i);
8793 }
8794 finally { if (e) throw e.error; }
8795 }
8796 return ar;
8797};
8798var __spread = (undefined && undefined.__spread) || function () {
8799 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
8800 return ar;
8801};
8802/**
8803 * These keys are used for validating properties supplied on a gridOptions object, and for code generation.
8804 * If you change the properties on the gridOptions interface, you *must* update this file as well to be consistent.
8805 */
8806var PropertyKeys = /** @class */ (function () {
8807 function PropertyKeys() {
8808 }
8809 PropertyKeys.STRING_PROPERTIES = [
8810 'sortingOrder', 'rowClass', 'rowSelection', 'overlayLoadingTemplate', 'overlayNoRowsTemplate',
8811 'quickFilterText', 'rowModelType', 'editType', 'domLayout', 'clipboardDelimiter', 'rowGroupPanelShow',
8812 'multiSortKey', 'pivotColumnGroupTotals', 'pivotRowTotals', 'pivotPanelShow', 'fillHandleDirection',
8813 'serverSideStoreType', 'groupDisplayType', 'treeDataDisplayType'
8814 ];
8815 PropertyKeys.OBJECT_PROPERTIES = [
8816 'components', 'frameworkComponents', 'rowStyle', 'context', 'autoGroupColumnDef', 'localeText', 'icons',
8817 'datasource', 'serverSideDatasource', 'viewportDatasource', 'groupRowRendererParams', 'aggFuncs', 'fullWidthCellRendererParams',
8818 'defaultColGroupDef', 'defaultColDef', 'defaultExportParams', 'defaultCsvExportParams', 'defaultExcelExportParams', 'columnTypes',
8819 'rowClassRules', 'detailCellRendererParams', 'loadingCellRendererParams', 'loadingOverlayComponentParams',
8820 'noRowsOverlayComponentParams', 'popupParent', 'colResizeDefault', 'statusBar', 'sideBar', 'chartThemeOverrides',
8821 'customChartThemes'
8822 ];
8823 PropertyKeys.ARRAY_PROPERTIES = [
8824 'alignedGrids', 'rowData', 'columnDefs', 'excelStyles', 'pinnedTopRowData', 'pinnedBottomRowData', 'chartThemes'
8825 ];
8826 PropertyKeys.NUMBER_PROPERTIES = [
8827 'rowHeight', 'detailRowHeight', 'rowBuffer', 'colWidth', 'headerHeight', 'groupHeaderHeight', 'floatingFiltersHeight',
8828 'pivotHeaderHeight', 'pivotGroupHeaderHeight', 'groupDefaultExpanded', 'minColWidth', 'maxColWidth', 'viewportRowModelPageSize',
8829 'viewportRowModelBufferSize', 'autoSizePadding', 'maxBlocksInCache', 'maxConcurrentDatasourceRequests', 'tooltipShowDelay',
8830 'tooltipHideDelay', 'cacheOverflowSize', 'paginationPageSize', 'cacheBlockSize', 'infiniteInitialRowCount', 'scrollbarWidth',
8831 'batchUpdateWaitMillis', 'asyncTransactionWaitMillis', 'blockLoadDebounceMillis', 'keepDetailRowsCount',
8832 'undoRedoCellEditingLimit', 'cellFlashDelay', 'cellFadeDelay', 'tabIndex'
8833 ];
8834 PropertyKeys.BOOLEAN_PROPERTIES = [
8835 'suppressMakeColumnVisibleAfterUnGroup', 'suppressRowClickSelection', 'suppressCellSelection', 'suppressCellFocus', 'suppressHorizontalScroll',
8836 'alwaysShowHorizontalScroll', 'alwaysShowVerticalScroll', 'debug', 'enableBrowserTooltips', 'enableCellExpressions',
8837 'angularCompileRows', 'angularCompileFilters', 'groupSuppressAutoColumn', 'groupSelectsChildren', 'groupIncludeFooter',
8838 'groupIncludeTotalFooter', 'groupUseEntireRow', 'groupSuppressBlankHeader', 'suppressMenuHide', 'suppressRowDeselection',
8839 'unSortIcon', 'suppressMultiSort', 'alwaysMultiSort', 'singleClickEdit', 'suppressLoadingOverlay', 'suppressNoRowsOverlay', 'suppressAutoSize',
8840 'skipHeaderOnAutoSize', 'suppressParentsInRowNodes', 'suppressColumnMoveAnimation', 'suppressMovableColumns',
8841 'suppressFieldDotNotation', 'enableRangeSelection', 'enableRangeHandle', 'enableFillHandle', 'suppressClearOnFillReduction',
8842 'deltaSort', 'suppressTouch', 'suppressAsyncEvents', 'allowContextMenuWithControlKey', 'suppressContextMenu',
8843 'rememberGroupStateWhenNewData', 'enableCellChangeFlash', 'suppressDragLeaveHidesColumns', 'suppressMiddleClickScrolls',
8844 'suppressPreventDefaultOnMouseWheel', 'suppressCopyRowsToClipboard', 'copyHeadersToClipboard', 'copyGroupHeadersToClipboard',
8845 'pivotMode', 'suppressAggFuncInHeader', 'suppressColumnVirtualisation', 'suppressAggAtRootLevel', 'suppressFocusAfterRefresh',
8846 'functionsPassive', 'functionsReadOnly', 'animateRows', 'groupSelectsFiltered', 'groupRemoveSingleChildren',
8847 'groupRemoveLowestSingleChildren', 'enableRtl', 'suppressClickEdit', 'rowDragEntireRow', 'rowDragManaged', 'suppressRowDrag',
8848 'suppressMoveWhenRowDragging', 'rowDragMultiRow', 'enableGroupEdit', 'embedFullWidthRows', 'deprecatedEmbedFullWidthRows',
8849 'suppressPaginationPanel', 'groupHideOpenParents', 'groupMultiAutoColumn', 'pagination',
8850 'stopEditingWhenGridLosesFocus', 'paginationAutoPageSize', 'suppressScrollOnNewData', 'suppressScrollWhenPopupsAreOpen',
8851 'purgeClosedRowNodes', 'cacheQuickFilter', 'deltaRowDataMode', 'ensureDomOrder', 'accentedSort', 'suppressChangeDetection',
8852 'valueCache', 'valueCacheNeverExpires', 'aggregateOnlyChangedColumns', 'suppressAnimationFrame', 'suppressExcelExport',
8853 'suppressCsvExport', 'treeData', 'masterDetail', 'suppressMultiRangeSelection', 'enterMovesDownAfterEdit', 'enterMovesDown',
8854 'suppressPropertyNamesCheck', 'rowMultiSelectWithClick', 'suppressEnterpriseResetOnNewColumns',
8855 'suppressRowHoverHighlight', 'suppressRowTransform', 'suppressClipboardPaste', 'suppressLastEmptyLineOnPaste',
8856 'serverSideSortingAlwaysResets', 'suppressSetColumnStateEvents', 'suppressColumnStateEvents', 'enableCharts', 'deltaColumnMode',
8857 'suppressMaintainUnsortedOrder', 'enableCellTextSelection', 'suppressBrowserResizeObserver', 'suppressMaxRenderedRowRestriction',
8858 'excludeChildrenWhenTreeDataFiltering', 'tooltipMouseTrack', 'keepDetailRows', 'paginateChildRows', 'preventDefaultOnContextMenu',
8859 'undoRedoCellEditing', 'allowDragFromColumnsToolPanel', 'immutableData', 'immutableColumns', 'pivotSuppressAutoColumn',
8860 'suppressExpandablePivotGroups', 'applyColumnDefOrder', 'debounceVerticalScrollbar', 'detailRowAutoHeight',
8861 'serverSideFilteringAlwaysResets', 'suppressAggFilteredOnly', 'showOpenedGroup', 'suppressClipboardApi',
8862 'suppressModelUpdateAfterUpdateTransaction', 'stopEditingWhenCellsLoseFocus', 'maintainColumnOrder', 'groupMaintainOrder',
8863 'columnHoverHighlight', 'reactUi', 'suppressReactUi', 'readOnlyEdit', 'suppressRowVirtualisation',
8864 'resetRowDataOnUpdate', 'removePivotHeaderRowWhenSingleValueColumn', 'suppressCopySingleCellRanges'
8865 ];
8866 /** You do not need to include event callbacks in this list, as they are generated automatically. */
8867 PropertyKeys.FUNCTION_PROPERTIES = [
8868 'localeTextFunc', 'getLocaleText', 'groupRowInnerRenderer', 'groupRowInnerRendererFramework',
8869 'groupRowRenderer', 'groupRowRendererFramework', 'isExternalFilterPresent', 'getRowHeight', 'doesExternalFilterPass',
8870 'getRowClass', 'getRowStyle', 'getContextMenuItems', 'getMainMenuItems', 'processRowPostCreate', 'processCellForClipboard',
8871 'groupRowAggNodes', 'getGroupRowAgg', 'getRowNodeId', 'isFullWidthCell', 'isFullWidthRow', 'fullWidthCellRenderer', 'fullWidthCellRendererFramework',
8872 'processSecondaryColDef', 'processSecondaryColGroupDef',
8873 'getBusinessKeyForNode', 'sendToClipboard', 'navigateToNextHeader',
8874 'tabToNextHeader', 'navigateToNextCell', 'tabToNextCell', 'processCellFromClipboard', 'getDocument', 'postProcessPopup',
8875 'getChildCount', 'getDataPath', 'loadingCellRenderer', 'loadingCellRendererFramework', 'loadingOverlayComponent',
8876 'loadingOverlayComponentFramework', 'noRowsOverlayComponent', 'noRowsOverlayComponentFramework', 'detailCellRenderer',
8877 'detailCellRendererFramework', 'isRowMaster', 'isRowSelectable', 'postSort', 'postSortRows', 'processHeaderForClipboard', 'processGroupHeaderForClipboard',
8878 'paginationNumberFormatter', 'processDataFromClipboard', 'getServerSideGroupKey', 'isServerSideGroup', 'suppressKeyboardEvent',
8879 'createChartContainer', 'getChartToolbarItems', 'fillOperation', 'isApplyServerSideTransaction', 'getServerSideStoreParams',
8880 'isServerSideGroupOpenByDefault', 'isGroupOpenByDefault', 'defaultGroupSortComparator', 'defaultGroupOrderComparator', 'initialGroupOrderComparator',
8881 'loadingCellRendererSelector', 'getRowId', 'groupAggFiltering'
8882 ];
8883 PropertyKeys.ALL_PROPERTIES = __spread(PropertyKeys.ARRAY_PROPERTIES, PropertyKeys.OBJECT_PROPERTIES, PropertyKeys.STRING_PROPERTIES, PropertyKeys.NUMBER_PROPERTIES, PropertyKeys.FUNCTION_PROPERTIES, PropertyKeys.BOOLEAN_PROPERTIES);
8884 /**
8885 * Used when performing property checks. This avoids noise caused when using frameworks, which can add their own
8886 * framework-specific properties to colDefs, gridOptions etc.
8887 */
8888 PropertyKeys.FRAMEWORK_PROPERTIES = [
8889 '__ob__', '__v_skip', '__metadata__', 'mappedColumnProperties', 'hasChildColumns', 'toColDef', 'createColDefFromGridColumn'
8890 ];
8891 return PropertyKeys;
8892}());
8893
8894
8895
8896
8897
8898/***/ }),
8899/* 32 */
8900/***/ (function(module, __webpack_exports__, __webpack_require__) {
8901
8902"use strict";
8903__webpack_require__.r(__webpack_exports__);
8904/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgStackComponentsRegistry", function() { return AgStackComponentsRegistry; });
8905/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
8906/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
8907/**
8908 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8909 * @version v27.3.0
8910 * @link https://www.ag-grid.com/
8911 * @license MIT
8912 */
8913var __extends = (undefined && undefined.__extends) || (function () {
8914 var extendStatics = function (d, b) {
8915 extendStatics = Object.setPrototypeOf ||
8916 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8917 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
8918 return extendStatics(d, b);
8919 };
8920 return function (d, b) {
8921 extendStatics(d, b);
8922 function __() { this.constructor = d; }
8923 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
8924 };
8925})();
8926var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
8927 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8928 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8929 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
8930 return c > 3 && r && Object.defineProperty(target, key, r), r;
8931};
8932
8933
8934var AgStackComponentsRegistry = /** @class */ (function (_super) {
8935 __extends(AgStackComponentsRegistry, _super);
8936 function AgStackComponentsRegistry() {
8937 var _this = _super !== null && _super.apply(this, arguments) || this;
8938 _this.componentsMappedByName = {};
8939 return _this;
8940 }
8941 AgStackComponentsRegistry.prototype.setupComponents = function (components) {
8942 var _this = this;
8943 if (components) {
8944 components.forEach(function (componentMeta) { return _this.addComponent(componentMeta); });
8945 }
8946 };
8947 AgStackComponentsRegistry.prototype.addComponent = function (componentMeta) {
8948 // get name of the class as a string
8949 // let className = getNameOfClass(ComponentClass);
8950 // insert a dash after every capital letter
8951 // let classEscaped = className.replace(/([A-Z])/g, "-$1").toLowerCase();
8952 var classEscaped = componentMeta.componentName.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
8953 // put all to upper case
8954 var classUpperCase = classEscaped.toUpperCase();
8955 // finally store
8956 this.componentsMappedByName[classUpperCase] = componentMeta.componentClass;
8957 };
8958 AgStackComponentsRegistry.prototype.getComponentClass = function (htmlTag) {
8959 return this.componentsMappedByName[htmlTag];
8960 };
8961 AgStackComponentsRegistry = __decorate([
8962 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('agStackComponentsRegistry')
8963 ], AgStackComponentsRegistry);
8964 return AgStackComponentsRegistry;
8965}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
8966
8967
8968
8969
8970
8971/***/ }),
8972/* 33 */
8973/***/ (function(module, __webpack_exports__, __webpack_require__) {
8974
8975"use strict";
8976__webpack_require__.r(__webpack_exports__);
8977/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColDefUtil", function() { return ColDefUtil; });
8978/**
8979 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8980 * @version v27.3.0
8981 * @link https://www.ag-grid.com/
8982 * @license MIT
8983 */
8984var __read = (undefined && undefined.__read) || function (o, n) {
8985 var m = typeof Symbol === "function" && o[Symbol.iterator];
8986 if (!m) return o;
8987 var i = m.call(o), r, ar = [], e;
8988 try {
8989 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8990 }
8991 catch (error) { e = { error: error }; }
8992 finally {
8993 try {
8994 if (r && !r.done && (m = i["return"])) m.call(i);
8995 }
8996 finally { if (e) throw e.error; }
8997 }
8998 return ar;
8999};
9000var __spread = (undefined && undefined.__spread) || function () {
9001 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
9002 return ar;
9003};
9004var ColDefUtil = /** @class */ (function () {
9005 function ColDefUtil() {
9006 }
9007 ColDefUtil.STRING_PROPERTIES = [
9008 'headerName',
9009 'columnGroupShow',
9010 'headerClass',
9011 'toolPanelClass',
9012 'headerValueGetter',
9013 'pivotKeys',
9014 'groupId',
9015 'colId',
9016 'sort',
9017 'initialSort',
9018 'field',
9019 'type',
9020 'tooltipComponent',
9021 'tooltipField',
9022 'headerTooltip',
9023 'cellClass',
9024 'showRowGroup',
9025 'filter',
9026 'initialAggFunc',
9027 'defaultAggFunc',
9028 'aggFunc',
9029 'pinned',
9030 'initialPinned',
9031 'chartDataType',
9032 'cellEditorPopupPosition'
9033 ];
9034 ColDefUtil.OBJECT_PROPERTIES = [
9035 'headerGroupComponent',
9036 'headerGroupComponentFramework',
9037 'headerGroupComponentParams',
9038 'cellStyle',
9039 'cellRenderer',
9040 'cellRendererParams',
9041 'cellRendererFramework',
9042 'cellEditor',
9043 'cellEditorFramework',
9044 'cellEditorParams',
9045 'pinnedRowCellRendererFramework',
9046 'pinnedRowCellRendererParams',
9047 'filterFramework',
9048 'filterParams',
9049 'pivotValueColumn',
9050 'headerComponent',
9051 'headerComponentFramework',
9052 'headerComponentParams',
9053 'floatingFilterComponent',
9054 'floatingFilterComponentParams',
9055 'floatingFilterComponentFramework',
9056 'floatingFilterFramework',
9057 'tooltipComponent',
9058 'tooltipComponentParams',
9059 'tooltipComponentFramework',
9060 'refData',
9061 'columnsMenuParams'
9062 ];
9063 ColDefUtil.ARRAY_PROPERTIES = [
9064 'children',
9065 'sortingOrder',
9066 'allowedAggFuncs',
9067 'menuTabs',
9068 'pivotTotalColumnIds',
9069 'cellClassRules',
9070 'icons'
9071 ];
9072 ColDefUtil.NUMBER_PROPERTIES = [
9073 'sortedAt',
9074 'sortIndex',
9075 'initialSortIndex',
9076 'flex',
9077 'initialFlex',
9078 'width',
9079 'initialWidth',
9080 'minWidth',
9081 'maxWidth',
9082 'rowGroupIndex',
9083 'initialRowGroupIndex',
9084 'pivotIndex',
9085 'initialPivotIndex'
9086 ];
9087 ColDefUtil.BOOLEAN_PROPERTIES = [
9088 'suppressCellFlash',
9089 'suppressColumnsToolPanel',
9090 'suppressFiltersToolPanel',
9091 'openByDefault',
9092 'marryChildren',
9093 'hide',
9094 'initialHide',
9095 'rowGroup',
9096 'initialRowGroup',
9097 'pivot',
9098 'initialPivot',
9099 'checkboxSelection',
9100 'headerCheckboxSelection',
9101 'headerCheckboxSelectionFilteredOnly',
9102 'suppressMenu',
9103 'suppressMovable',
9104 'lockPosition',
9105 'lockVisible',
9106 'lockPinned',
9107 'unSortIcon',
9108 'suppressSizeToFit',
9109 'suppressAutoSize',
9110 'enableRowGroup',
9111 'enablePivot',
9112 'enableValue',
9113 'editable',
9114 'suppressPaste',
9115 'suppressNavigable',
9116 'enableCellChangeFlash',
9117 'rowDrag',
9118 'dndSource',
9119 'autoHeight',
9120 'wrapText',
9121 'sortable',
9122 'resizable',
9123 'singleClickEdit',
9124 'floatingFilter',
9125 'cellEditorPopup',
9126 'suppressFillHandle'
9127 ];
9128 ColDefUtil.FUNCTION_PROPERTIES = [
9129 'dndSourceOnRowDrag',
9130 'valueGetter',
9131 'valueSetter',
9132 'filterValueGetter',
9133 'keyCreator',
9134 'pinnedRowCellRenderer',
9135 'valueFormatter',
9136 'pinnedRowValueFormatter',
9137 'valueParser',
9138 'comparator',
9139 'equals',
9140 'pivotComparator',
9141 'suppressKeyboardEvent',
9142 'suppressHeaderKeyboardEvent',
9143 'colSpan',
9144 'rowSpan',
9145 'getQuickFilterText',
9146 'newValueHandler',
9147 'onCellValueChanged',
9148 'onCellClicked',
9149 'onCellDoubleClicked',
9150 'onCellContextMenu',
9151 'rowDragText',
9152 'tooltipValueGetter',
9153 'tooltipComponent',
9154 'tooltipComponentFramework',
9155 'cellRendererSelector',
9156 'cellEditorSelector'
9157 ];
9158 ColDefUtil.ALL_PROPERTIES = __spread(ColDefUtil.ARRAY_PROPERTIES, ColDefUtil.OBJECT_PROPERTIES, ColDefUtil.STRING_PROPERTIES, ColDefUtil.NUMBER_PROPERTIES, ColDefUtil.FUNCTION_PROPERTIES, ColDefUtil.BOOLEAN_PROPERTIES);
9159 // used when doing property checks - this causes noise when using frameworks which can add their own fw specific
9160 // properties to colDefs, gridOptions etc
9161 ColDefUtil.FRAMEWORK_PROPERTIES = [
9162 '__ob__',
9163 '__v_skip',
9164 '__metadata__',
9165 'mappedColumnProperties',
9166 'hasChildColumns',
9167 'toColDef',
9168 'createColDefFromGridColumn'
9169 ];
9170 return ColDefUtil;
9171}());
9172
9173
9174
9175
9176
9177/***/ }),
9178/* 34 */
9179/***/ (function(module, __webpack_exports__, __webpack_require__) {
9180
9181"use strict";
9182__webpack_require__.r(__webpack_exports__);
9183/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserComponentRegistry", function() { return UserComponentRegistry; });
9184/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
9185/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
9186/* harmony import */ var _filter_floating_provided_readOnlyFloatingFilter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35);
9187/* harmony import */ var _filter_provided_date_dateFilter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(58);
9188/* harmony import */ var _filter_provided_date_dateFloatingFilter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(73);
9189/* harmony import */ var _filter_provided_date_defaultDateComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75);
9190/* harmony import */ var _filter_provided_number_numberFilter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(76);
9191/* harmony import */ var _filter_provided_number_numberFloatingFilter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(77);
9192/* harmony import */ var _filter_provided_text_textFilter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(79);
9193/* harmony import */ var _filter_provided_text_textFloatingFilter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(80);
9194/* harmony import */ var _headerRendering_cells_column_headerComp__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(81);
9195/* harmony import */ var _headerRendering_cells_columnGroup_headerGroupComp__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(83);
9196/* harmony import */ var _rendering_cellEditors_largeTextCellEditor__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(84);
9197/* harmony import */ var _rendering_cellEditors_popupSelectCellEditor__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(86);
9198/* harmony import */ var _rendering_cellEditors_popupTextCellEditor__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(88);
9199/* harmony import */ var _rendering_cellEditors_selectCellEditor__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(87);
9200/* harmony import */ var _rendering_cellEditors_textCellEditor__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(89);
9201/* harmony import */ var _rendering_cellRenderers_animateShowChangeCellRenderer__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(90);
9202/* harmony import */ var _rendering_cellRenderers_animateSlideCellRenderer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(91);
9203/* harmony import */ var _rendering_cellRenderers_groupCellRenderer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(92);
9204/* harmony import */ var _rendering_cellRenderers_loadingCellRenderer__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(98);
9205/* harmony import */ var _rendering_overlays_loadingOverlayComponent__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(99);
9206/* harmony import */ var _rendering_overlays_noRowsOverlayComponent__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(100);
9207/* harmony import */ var _rendering_tooltipComponent__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(101);
9208/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(14);
9209/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(13);
9210/**
9211 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9212 * @version v27.3.0
9213 * @link https://www.ag-grid.com/
9214 * @license MIT
9215 */
9216var __extends = (undefined && undefined.__extends) || (function () {
9217 var extendStatics = function (d, b) {
9218 extendStatics = Object.setPrototypeOf ||
9219 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9220 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
9221 return extendStatics(d, b);
9222 };
9223 return function (d, b) {
9224 extendStatics(d, b);
9225 function __() { this.constructor = d; }
9226 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
9227 };
9228})();
9229var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
9230 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9231 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9232 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9233 return c > 3 && r && Object.defineProperty(target, key, r), r;
9234};
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261var UserComponentRegistry = /** @class */ (function (_super) {
9262 __extends(UserComponentRegistry, _super);
9263 function UserComponentRegistry() {
9264 var _this = _super !== null && _super.apply(this, arguments) || this;
9265 _this.agGridDefaults = {
9266 //date
9267 agDateInput: _filter_provided_date_defaultDateComponent__WEBPACK_IMPORTED_MODULE_5__["DefaultDateComponent"],
9268 //header
9269 agColumnHeader: _headerRendering_cells_column_headerComp__WEBPACK_IMPORTED_MODULE_10__["HeaderComp"],
9270 agColumnGroupHeader: _headerRendering_cells_columnGroup_headerGroupComp__WEBPACK_IMPORTED_MODULE_11__["HeaderGroupComp"],
9271 //floating filters
9272 agTextColumnFloatingFilter: _filter_provided_text_textFloatingFilter__WEBPACK_IMPORTED_MODULE_9__["TextFloatingFilter"],
9273 agNumberColumnFloatingFilter: _filter_provided_number_numberFloatingFilter__WEBPACK_IMPORTED_MODULE_7__["NumberFloatingFilter"],
9274 agDateColumnFloatingFilter: _filter_provided_date_dateFloatingFilter__WEBPACK_IMPORTED_MODULE_4__["DateFloatingFilter"],
9275 agReadOnlyFloatingFilter: _filter_floating_provided_readOnlyFloatingFilter__WEBPACK_IMPORTED_MODULE_2__["ReadOnlyFloatingFilter"],
9276 // renderers
9277 agAnimateShowChangeCellRenderer: _rendering_cellRenderers_animateShowChangeCellRenderer__WEBPACK_IMPORTED_MODULE_17__["AnimateShowChangeCellRenderer"],
9278 agAnimateSlideCellRenderer: _rendering_cellRenderers_animateSlideCellRenderer__WEBPACK_IMPORTED_MODULE_18__["AnimateSlideCellRenderer"],
9279 agGroupCellRenderer: _rendering_cellRenderers_groupCellRenderer__WEBPACK_IMPORTED_MODULE_19__["GroupCellRenderer"],
9280 agGroupRowRenderer: _rendering_cellRenderers_groupCellRenderer__WEBPACK_IMPORTED_MODULE_19__["GroupCellRenderer"],
9281 agLoadingCellRenderer: _rendering_cellRenderers_loadingCellRenderer__WEBPACK_IMPORTED_MODULE_20__["LoadingCellRenderer"],
9282 //editors
9283 agCellEditor: _rendering_cellEditors_textCellEditor__WEBPACK_IMPORTED_MODULE_16__["TextCellEditor"],
9284 agTextCellEditor: _rendering_cellEditors_textCellEditor__WEBPACK_IMPORTED_MODULE_16__["TextCellEditor"],
9285 agSelectCellEditor: _rendering_cellEditors_selectCellEditor__WEBPACK_IMPORTED_MODULE_15__["SelectCellEditor"],
9286 agPopupTextCellEditor: _rendering_cellEditors_popupTextCellEditor__WEBPACK_IMPORTED_MODULE_14__["PopupTextCellEditor"],
9287 agPopupSelectCellEditor: _rendering_cellEditors_popupSelectCellEditor__WEBPACK_IMPORTED_MODULE_13__["PopupSelectCellEditor"],
9288 agLargeTextCellEditor: _rendering_cellEditors_largeTextCellEditor__WEBPACK_IMPORTED_MODULE_12__["LargeTextCellEditor"],
9289 //filter
9290 agTextColumnFilter: _filter_provided_text_textFilter__WEBPACK_IMPORTED_MODULE_8__["TextFilter"],
9291 agNumberColumnFilter: _filter_provided_number_numberFilter__WEBPACK_IMPORTED_MODULE_6__["NumberFilter"],
9292 agDateColumnFilter: _filter_provided_date_dateFilter__WEBPACK_IMPORTED_MODULE_3__["DateFilter"],
9293 //overlays
9294 agLoadingOverlay: _rendering_overlays_loadingOverlayComponent__WEBPACK_IMPORTED_MODULE_21__["LoadingOverlayComponent"],
9295 agNoRowsOverlay: _rendering_overlays_noRowsOverlayComponent__WEBPACK_IMPORTED_MODULE_22__["NoRowsOverlayComponent"],
9296 // tooltips
9297 agTooltipComponent: _rendering_tooltipComponent__WEBPACK_IMPORTED_MODULE_23__["TooltipComponent"]
9298 };
9299 _this.agDeprecatedNames = {
9300 set: {
9301 newComponentName: 'agSetColumnFilter',
9302 propertyHolder: 'filter'
9303 },
9304 text: {
9305 newComponentName: 'agTextColumnFilter',
9306 propertyHolder: 'filter'
9307 },
9308 number: {
9309 newComponentName: 'agNumberColumnFilter',
9310 propertyHolder: 'filter'
9311 },
9312 date: {
9313 newComponentName: 'agDateColumnFilter',
9314 propertyHolder: 'filter'
9315 },
9316 group: {
9317 newComponentName: 'agGroupCellRenderer',
9318 propertyHolder: 'cellRenderer'
9319 },
9320 animateShowChange: {
9321 newComponentName: 'agAnimateShowChangeCellRenderer',
9322 propertyHolder: 'cellRenderer'
9323 },
9324 animateSlide: {
9325 newComponentName: 'agAnimateSlideCellRenderer',
9326 propertyHolder: 'cellRenderer'
9327 },
9328 select: {
9329 newComponentName: 'agSelectCellEditor',
9330 propertyHolder: 'cellEditor'
9331 },
9332 largeText: {
9333 newComponentName: 'agLargeTextCellEditor',
9334 propertyHolder: 'cellEditor'
9335 },
9336 popupSelect: {
9337 newComponentName: 'agPopupSelectCellEditor',
9338 propertyHolder: 'cellEditor'
9339 },
9340 popupText: {
9341 newComponentName: 'agPopupTextCellEditor',
9342 propertyHolder: 'cellEditor'
9343 },
9344 richSelect: {
9345 newComponentName: 'agRichSelectCellEditor',
9346 propertyHolder: 'cellEditor'
9347 },
9348 headerComponent: {
9349 newComponentName: 'agColumnHeader',
9350 propertyHolder: 'headerComponent'
9351 }
9352 };
9353 _this.jsComps = {};
9354 _this.fwComps = {};
9355 return _this;
9356 }
9357 UserComponentRegistry.prototype.init = function () {
9358 var _this = this;
9359 if (this.gridOptions.components != null) {
9360 Object(_utils_object__WEBPACK_IMPORTED_MODULE_25__["iterateObject"])(this.gridOptions.components, function (key, component) { return _this.registerJsComponent(key, component); });
9361 }
9362 if (this.gridOptions.frameworkComponents != null) {
9363 Object(_utils_object__WEBPACK_IMPORTED_MODULE_25__["iterateObject"])(this.gridOptions.frameworkComponents, function (key, component) { return _this.registerFwComponent(key, component); });
9364 }
9365 };
9366 UserComponentRegistry.prototype.registerDefaultComponent = function (rawName, component) {
9367 var name = this.translateIfDeprecated(rawName);
9368 if (this.agGridDefaults[name]) {
9369 console.error("Trying to overwrite a default component. You should call registerComponent");
9370 return;
9371 }
9372 this.agGridDefaults[name] = component;
9373 };
9374 UserComponentRegistry.prototype.registerJsComponent = function (rawName, component) {
9375 var name = this.translateIfDeprecated(rawName);
9376 if (this.fwComps[name]) {
9377 console.error("Trying to register a component that you have already registered for frameworks: " + name);
9378 return;
9379 }
9380 this.jsComps[name] = component;
9381 };
9382 /**
9383 * B the business interface (ie IHeader)
9384 * A the agGridComponent interface (ie IHeaderComp). The final object acceptable by ag-grid
9385 */
9386 UserComponentRegistry.prototype.registerFwComponent = function (rawName, component) {
9387 var warningMessage = "AG Grid: As of v27, registering components via grid property frameworkComponents is deprecated. Instead register both JavaScript AND Framework Components via the components property.";
9388 Object(_utils_function__WEBPACK_IMPORTED_MODULE_24__["doOnce"])(function () { return console.warn(warningMessage); }, "UserComponentRegistry.frameworkComponentsDeprecated");
9389 var name = this.translateIfDeprecated(rawName);
9390 this.fwComps[name] = component;
9391 };
9392 UserComponentRegistry.prototype.retrieve = function (rawName) {
9393 var name = this.translateIfDeprecated(rawName);
9394 var createResult = function (component, componentFromFramework) { return ({ componentFromFramework: componentFromFramework, component: component }); };
9395 // FrameworkOverrides.frameworkComponent() is used in two locations:
9396 // 1) for Vue, user provided components get registered via a framework specific way.
9397 // 2) for React, it's how the React UI provides alternative default components (eg GroupCellRenderer and DetailCellRenderer)
9398 var registeredViaFrameworkComp = this.getFrameworkOverrides().frameworkComponent(name);
9399 if (registeredViaFrameworkComp != null) {
9400 return createResult(registeredViaFrameworkComp, true);
9401 }
9402 var frameworkComponent = this.fwComps[name];
9403 if (frameworkComponent) {
9404 return createResult(frameworkComponent, true);
9405 }
9406 var jsComponent = this.jsComps[name];
9407 if (jsComponent) {
9408 var isFwkComp = this.getFrameworkOverrides().isFrameworkComponent(jsComponent);
9409 return createResult(jsComponent, isFwkComp);
9410 }
9411 var defaultComponent = this.agGridDefaults[name];
9412 if (defaultComponent) {
9413 return createResult(defaultComponent, false);
9414 }
9415 if (Object.keys(this.agGridDefaults).indexOf(name) < 0) {
9416 console.warn("AG Grid: Looking for component [" + name + "] but it wasn't found.");
9417 }
9418 return null;
9419 };
9420 UserComponentRegistry.prototype.translateIfDeprecated = function (raw) {
9421 var deprecatedInfo = this.agDeprecatedNames[raw];
9422 if (deprecatedInfo != null) {
9423 Object(_utils_function__WEBPACK_IMPORTED_MODULE_24__["doOnce"])(function () {
9424 console.warn("ag-grid. Since v15.0 component names have been renamed to be namespaced. You should rename " + deprecatedInfo.propertyHolder + ":" + raw + " to " + deprecatedInfo.propertyHolder + ":" + deprecatedInfo.newComponentName);
9425 }, 'DEPRECATE_COMPONENT_' + raw);
9426 return deprecatedInfo.newComponentName;
9427 }
9428 return raw;
9429 };
9430 __decorate([
9431 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptions')
9432 ], UserComponentRegistry.prototype, "gridOptions", void 0);
9433 __decorate([
9434 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('agComponentUtils')
9435 ], UserComponentRegistry.prototype, "agComponentUtils", void 0);
9436 __decorate([
9437 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
9438 ], UserComponentRegistry.prototype, "init", null);
9439 UserComponentRegistry = __decorate([
9440 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('userComponentRegistry')
9441 ], UserComponentRegistry);
9442 return UserComponentRegistry;
9443}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
9444
9445
9446
9447
9448
9449/***/ }),
9450/* 35 */
9451/***/ (function(module, __webpack_exports__, __webpack_require__) {
9452
9453"use strict";
9454__webpack_require__.r(__webpack_exports__);
9455/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReadOnlyFloatingFilter", function() { return ReadOnlyFloatingFilter; });
9456/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
9457/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
9458/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
9459/**
9460 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9461 * @version v27.3.0
9462 * @link https://www.ag-grid.com/
9463 * @license MIT
9464 */
9465var __extends = (undefined && undefined.__extends) || (function () {
9466 var extendStatics = function (d, b) {
9467 extendStatics = Object.setPrototypeOf ||
9468 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9469 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
9470 return extendStatics(d, b);
9471 };
9472 return function (d, b) {
9473 extendStatics(d, b);
9474 function __() { this.constructor = d; }
9475 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
9476 };
9477})();
9478var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
9479 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9480 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9481 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9482 return c > 3 && r && Object.defineProperty(target, key, r), r;
9483};
9484
9485
9486
9487// optional floating filter for user provided filters - instead of providing a floating filter,
9488// they can provide a getModelAsString() method on the filter instead. this class just displays
9489// the string returned from getModelAsString()
9490var ReadOnlyFloatingFilter = /** @class */ (function (_super) {
9491 __extends(ReadOnlyFloatingFilter, _super);
9492 function ReadOnlyFloatingFilter() {
9493 return _super.call(this, /* html */ "\n <div class=\"ag-floating-filter-input\" role=\"presentation\">\n <ag-input-text-field ref=\"eFloatingFilterText\"></ag-input-text-field>\n </div>") || this;
9494 }
9495 // this is a user component, and IComponent has "public destroy()" as part of the interface.
9496 // so we need to override destroy() just to make the method public.
9497 ReadOnlyFloatingFilter.prototype.destroy = function () {
9498 _super.prototype.destroy.call(this);
9499 };
9500 ReadOnlyFloatingFilter.prototype.init = function (params) {
9501 this.params = params;
9502 var displayName = this.columnModel.getDisplayNameForColumn(params.column, 'header', true);
9503 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
9504 this.eFloatingFilterText
9505 .setDisabled(true)
9506 .setInputAriaLabel(displayName + " " + translate('ariaFilterInput', 'Filter Input'));
9507 };
9508 ReadOnlyFloatingFilter.prototype.onParentModelChanged = function (parentModel) {
9509 var _this = this;
9510 if (!parentModel) {
9511 this.eFloatingFilterText.setValue('');
9512 return;
9513 }
9514 this.params.parentFilterInstance(function (filterInstance) {
9515 // it would be nice to check if getModelAsString was present before creating this component,
9516 // however that is not possible, as React Hooks and VueJS don't attached the methods to the Filter until
9517 // AFTER the filter is created, not allowing inspection before this (we create floating filters as columns
9518 // are drawn, but the parent filters are only created when needed).
9519 if (filterInstance.getModelAsString) {
9520 var modelAsString = filterInstance.getModelAsString(parentModel);
9521 _this.eFloatingFilterText.setValue(modelAsString);
9522 }
9523 });
9524 };
9525 __decorate([
9526 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eFloatingFilterText')
9527 ], ReadOnlyFloatingFilter.prototype, "eFloatingFilterText", void 0);
9528 __decorate([
9529 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
9530 ], ReadOnlyFloatingFilter.prototype, "columnModel", void 0);
9531 return ReadOnlyFloatingFilter;
9532}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
9533
9534
9535
9536
9537
9538/***/ }),
9539/* 36 */
9540/***/ (function(module, __webpack_exports__, __webpack_require__) {
9541
9542"use strict";
9543__webpack_require__.r(__webpack_exports__);
9544/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CssClassManager", function() { return CssClassManager; });
9545/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return Component; });
9546/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
9547/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
9548/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(37);
9549/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
9550/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
9551/* harmony import */ var _customTooltipFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(56);
9552/**
9553 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9554 * @version v27.3.0
9555 * @link https://www.ag-grid.com/
9556 * @license MIT
9557 */
9558var __extends = (undefined && undefined.__extends) || (function () {
9559 var extendStatics = function (d, b) {
9560 extendStatics = Object.setPrototypeOf ||
9561 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9562 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
9563 return extendStatics(d, b);
9564 };
9565 return function (d, b) {
9566 extendStatics(d, b);
9567 function __() { this.constructor = d; }
9568 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
9569 };
9570})();
9571var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
9572 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9573 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9574 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9575 return c > 3 && r && Object.defineProperty(target, key, r), r;
9576};
9577
9578
9579
9580
9581
9582
9583var compIdSequence = new _utils__WEBPACK_IMPORTED_MODULE_2__["NumberSequence"]();
9584var CssClassManager = /** @class */ (function () {
9585 function CssClassManager(getGui) {
9586 // to minimise DOM hits, we only apply CSS classes if they have changed. as adding a CSS class that is already
9587 // there, or removing one that wasn't present, all takes CPU.
9588 this.cssClassStates = {};
9589 this.getGui = getGui;
9590 }
9591 CssClassManager.prototype.addCssClass = function (className) {
9592 var _this = this;
9593 var list = (className || '').split(' ');
9594 if (list.length > 1) {
9595 list.forEach(function (cls) { return _this.addCssClass(cls); });
9596 return;
9597 }
9598 var updateNeeded = this.cssClassStates[className] !== true;
9599 if (updateNeeded && className.length) {
9600 this.getGui().classList.add(className);
9601 this.cssClassStates[className] = true;
9602 }
9603 };
9604 CssClassManager.prototype.removeCssClass = function (className) {
9605 var _this = this;
9606 var list = (className || '').split(' ');
9607 if (list.length > 1) {
9608 list.forEach(function (cls) { return _this.removeCssClass(cls); });
9609 return;
9610 }
9611 var updateNeeded = this.cssClassStates[className] !== false;
9612 if (updateNeeded && className.length) {
9613 this.getGui().classList.remove(className);
9614 this.cssClassStates[className] = false;
9615 }
9616 };
9617 CssClassManager.prototype.containsCssClass = function (className) {
9618 return this.getGui().classList.contains(className);
9619 };
9620 CssClassManager.prototype.addOrRemoveCssClass = function (className, addOrRemove) {
9621 var _this = this;
9622 var list = (className || '').split(' ');
9623 if (list.length > 1) {
9624 list.forEach(function (cls) { return _this.addOrRemoveCssClass(cls, addOrRemove); });
9625 return;
9626 }
9627 var updateNeeded = this.cssClassStates[className] !== addOrRemove;
9628 if (updateNeeded && className.length) {
9629 this.getGui().classList.toggle(className, addOrRemove);
9630 this.cssClassStates[className] = addOrRemove;
9631 }
9632 };
9633 return CssClassManager;
9634}());
9635
9636var Component = /** @class */ (function (_super) {
9637 __extends(Component, _super);
9638 function Component(template) {
9639 var _this = _super.call(this) || this;
9640 // if false, then CSS class "ag-hidden" is applied, which sets "display: none"
9641 _this.displayed = true;
9642 // if false, then CSS class "ag-invisible" is applied, which sets "visibility: hidden"
9643 _this.visible = true;
9644 // unique id for this row component. this is used for getting a reference to the HTML dom.
9645 // we cannot use the RowNode id as this is not unique (due to animation, old rows can be lying
9646 // around as we create a new rowComp instance for the same row node).
9647 _this.compId = compIdSequence.next();
9648 _this.cssClassManager = new CssClassManager(function () { return _this.eGui; });
9649 if (template) {
9650 _this.setTemplate(template);
9651 }
9652 return _this;
9653 }
9654 Component.prototype.preConstructOnComponent = function () {
9655 this.usingBrowserTooltips = this.gridOptionsWrapper.isEnableBrowserTooltips();
9656 };
9657 Component.prototype.getCompId = function () {
9658 return this.compId;
9659 };
9660 Component.prototype.getTooltipParams = function () {
9661 return {
9662 value: this.tooltipText,
9663 location: 'UNKNOWN'
9664 };
9665 };
9666 Component.prototype.setTooltip = function (newTooltipText) {
9667 var _this = this;
9668 var removeTooltip = function () {
9669 if (_this.usingBrowserTooltips) {
9670 _this.getGui().removeAttribute('title');
9671 }
9672 else {
9673 _this.tooltipFeature = _this.destroyBean(_this.tooltipFeature);
9674 }
9675 };
9676 var addTooltip = function () {
9677 if (_this.usingBrowserTooltips) {
9678 _this.getGui().setAttribute('title', _this.tooltipText);
9679 }
9680 else {
9681 _this.tooltipFeature = _this.createBean(new _customTooltipFeature__WEBPACK_IMPORTED_MODULE_5__["CustomTooltipFeature"](_this));
9682 }
9683 };
9684 if (this.tooltipText != newTooltipText) {
9685 if (this.tooltipText) {
9686 removeTooltip();
9687 }
9688 if (newTooltipText != null) {
9689 this.tooltipText = newTooltipText;
9690 if (this.tooltipText) {
9691 addTooltip();
9692 }
9693 }
9694 }
9695 };
9696 // for registered components only, eg creates AgCheckbox instance from ag-checkbox HTML tag
9697 Component.prototype.createChildComponentsFromTags = function (parentNode, paramsMap) {
9698 var _this = this;
9699 // we MUST take a copy of the list first, as the 'swapComponentForNode' adds comments into the DOM
9700 // which messes up the traversal order of the children.
9701 var childNodeList = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["copyNodeList"])(parentNode.childNodes);
9702 childNodeList.forEach(function (childNode) {
9703 if (!(childNode instanceof HTMLElement)) {
9704 return;
9705 }
9706 var childComp = _this.createComponentFromElement(childNode, function (childComp) {
9707 // copy over all attributes, including css classes, so any attributes user put on the tag
9708 // wll be carried across
9709 var childGui = childComp.getGui();
9710 if (childGui) {
9711 _this.copyAttributesFromNode(childNode, childComp.getGui());
9712 }
9713 }, paramsMap);
9714 if (childComp) {
9715 if (childComp.addItems && childNode.children.length) {
9716 _this.createChildComponentsFromTags(childNode, paramsMap);
9717 // converting from HTMLCollection to Array
9718 var items = Array.prototype.slice.call(childNode.children);
9719 childComp.addItems(items);
9720 }
9721 // replace the tag (eg ag-checkbox) with the proper HTMLElement (eg 'div') in the dom
9722 _this.swapComponentForNode(childComp, parentNode, childNode);
9723 }
9724 else if (childNode.childNodes) {
9725 _this.createChildComponentsFromTags(childNode, paramsMap);
9726 }
9727 });
9728 };
9729 Component.prototype.createComponentFromElement = function (element, afterPreCreateCallback, paramsMap) {
9730 var key = element.nodeName;
9731 var componentParams = paramsMap ? paramsMap[element.getAttribute('ref')] : undefined;
9732 var ComponentClass = this.agStackComponentsRegistry.getComponentClass(key);
9733 if (ComponentClass) {
9734 Component.elementGettingCreated = element;
9735 var newComponent = new ComponentClass(componentParams);
9736 newComponent.setParentComponent(this);
9737 this.createBean(newComponent, null, afterPreCreateCallback);
9738 return newComponent;
9739 }
9740 return null;
9741 };
9742 Component.prototype.copyAttributesFromNode = function (source, dest) {
9743 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["iterateNamedNodeMap"])(source.attributes, function (name, value) { return dest.setAttribute(name, value); });
9744 };
9745 Component.prototype.swapComponentForNode = function (newComponent, parentNode, childNode) {
9746 var eComponent = newComponent.getGui();
9747 parentNode.replaceChild(eComponent, childNode);
9748 parentNode.insertBefore(document.createComment(childNode.nodeName), eComponent);
9749 this.addDestroyFunc(this.destroyBean.bind(this, newComponent));
9750 this.swapInComponentForQuerySelectors(newComponent, childNode);
9751 };
9752 Component.prototype.swapInComponentForQuerySelectors = function (newComponent, childNode) {
9753 var thisNoType = this;
9754 this.iterateOverQuerySelectors(function (querySelector) {
9755 if (thisNoType[querySelector.attributeName] === childNode) {
9756 thisNoType[querySelector.attributeName] = newComponent;
9757 }
9758 });
9759 };
9760 Component.prototype.iterateOverQuerySelectors = function (action) {
9761 var thisPrototype = Object.getPrototypeOf(this);
9762 while (thisPrototype != null) {
9763 var metaData = thisPrototype.__agComponentMetaData;
9764 var currentProtoName = Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["getFunctionName"])(thisPrototype.constructor);
9765 if (metaData && metaData[currentProtoName] && metaData[currentProtoName].querySelectors) {
9766 metaData[currentProtoName].querySelectors.forEach(function (querySelector) { return action(querySelector); });
9767 }
9768 thisPrototype = Object.getPrototypeOf(thisPrototype);
9769 }
9770 };
9771 Component.prototype.setTemplate = function (template, paramsMap) {
9772 var eGui = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["loadTemplate"])(template);
9773 this.setTemplateFromElement(eGui, paramsMap);
9774 };
9775 Component.prototype.setTemplateFromElement = function (element, paramsMap) {
9776 this.eGui = element;
9777 this.eGui.__agComponent = this;
9778 this.wireQuerySelectors();
9779 // context will not be available when user sets template in constructor
9780 if (!!this.getContext()) {
9781 this.createChildComponentsFromTags(this.getGui(), paramsMap);
9782 }
9783 };
9784 Component.prototype.createChildComponentsPreConstruct = function () {
9785 // ui exists if user sets template in constructor. when this happens, we have to wait for the context
9786 // to be autoWired first before we can create child components.
9787 if (!!this.getGui()) {
9788 this.createChildComponentsFromTags(this.getGui());
9789 }
9790 };
9791 Component.prototype.wireQuerySelectors = function () {
9792 var _this = this;
9793 if (!this.eGui) {
9794 return;
9795 }
9796 var thisNoType = this;
9797 this.iterateOverQuerySelectors(function (querySelector) {
9798 var setResult = function (result) { return thisNoType[querySelector.attributeName] = result; };
9799 // if it's a ref selector, and match is on top level component, we return
9800 // the element. otherwise no way of components putting ref=xxx on the top
9801 // level element as querySelector only looks at children.
9802 var topLevelRefMatch = querySelector.refSelector
9803 && _this.eGui.getAttribute('ref') === querySelector.refSelector;
9804 if (topLevelRefMatch) {
9805 setResult(_this.eGui);
9806 }
9807 else {
9808 // otherwise use querySelector, which looks at children
9809 var resultOfQuery = _this.eGui.querySelector(querySelector.querySelector);
9810 if (resultOfQuery) {
9811 setResult(resultOfQuery.__agComponent || resultOfQuery);
9812 }
9813 }
9814 });
9815 };
9816 Component.prototype.getGui = function () {
9817 return this.eGui;
9818 };
9819 Component.prototype.getFocusableElement = function () {
9820 return this.eGui;
9821 };
9822 Component.prototype.setParentComponent = function (component) {
9823 this.parentComponent = component;
9824 };
9825 Component.prototype.getParentComponent = function () {
9826 return this.parentComponent;
9827 };
9828 // this method is for older code, that wants to provide the gui element,
9829 // it is not intended for this to be in ag-Stack
9830 Component.prototype.setGui = function (eGui) {
9831 this.eGui = eGui;
9832 };
9833 Component.prototype.queryForHtmlElement = function (cssSelector) {
9834 return this.eGui.querySelector(cssSelector);
9835 };
9836 Component.prototype.queryForHtmlInputElement = function (cssSelector) {
9837 return this.eGui.querySelector(cssSelector);
9838 };
9839 Component.prototype.appendChild = function (newChild, container) {
9840 if (!container) {
9841 container = this.eGui;
9842 }
9843 if (newChild == null) {
9844 return;
9845 }
9846 if (Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["isNodeOrElement"])(newChild)) {
9847 container.appendChild(newChild);
9848 }
9849 else {
9850 var childComponent = newChild;
9851 container.appendChild(childComponent.getGui());
9852 this.addDestroyFunc(this.destroyBean.bind(this, childComponent));
9853 }
9854 };
9855 Component.prototype.isDisplayed = function () {
9856 return this.displayed;
9857 };
9858 Component.prototype.setVisible = function (visible) {
9859 if (visible !== this.visible) {
9860 this.visible = visible;
9861 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setVisible"])(this.eGui, visible);
9862 }
9863 };
9864 Component.prototype.setDisplayed = function (displayed) {
9865 if (displayed !== this.displayed) {
9866 this.displayed = displayed;
9867 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setDisplayed"])(this.eGui, displayed);
9868 var event_1 = {
9869 type: Component.EVENT_DISPLAYED_CHANGED,
9870 visible: this.displayed
9871 };
9872 this.dispatchEvent(event_1);
9873 }
9874 };
9875 Component.prototype.destroy = function () {
9876 if (this.tooltipFeature) {
9877 this.tooltipFeature = this.destroyBean(this.tooltipFeature);
9878 }
9879 _super.prototype.destroy.call(this);
9880 };
9881 Component.prototype.addGuiEventListener = function (event, listener) {
9882 var _this = this;
9883 this.eGui.addEventListener(event, listener);
9884 this.addDestroyFunc(function () { return _this.eGui.removeEventListener(event, listener); });
9885 };
9886 Component.prototype.addCssClass = function (className) {
9887 this.cssClassManager.addCssClass(className);
9888 };
9889 Component.prototype.removeCssClass = function (className) {
9890 this.cssClassManager.removeCssClass(className);
9891 };
9892 Component.prototype.containsCssClass = function (className) {
9893 return this.cssClassManager.containsCssClass(className);
9894 };
9895 Component.prototype.addOrRemoveCssClass = function (className, addOrRemove) {
9896 this.cssClassManager.addOrRemoveCssClass(className, addOrRemove);
9897 };
9898 Component.prototype.getAttribute = function (key) {
9899 var eGui = this.eGui;
9900 return eGui ? eGui.getAttribute(key) : null;
9901 };
9902 Component.prototype.getRefElement = function (refName) {
9903 return this.queryForHtmlElement("[ref=\"" + refName + "\"]");
9904 };
9905 Component.EVENT_DISPLAYED_CHANGED = 'displayedChanged';
9906 __decorate([
9907 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('agStackComponentsRegistry')
9908 ], Component.prototype, "agStackComponentsRegistry", void 0);
9909 __decorate([
9910 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreConstruct"]
9911 ], Component.prototype, "preConstructOnComponent", null);
9912 __decorate([
9913 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreConstruct"]
9914 ], Component.prototype, "createChildComponentsPreConstruct", null);
9915 return Component;
9916}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
9917
9918
9919
9920
9921
9922/***/ }),
9923/* 37 */
9924/***/ (function(module, __webpack_exports__, __webpack_require__) {
9925
9926"use strict";
9927__webpack_require__.r(__webpack_exports__);
9928/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
9929/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return _color__WEBPACK_IMPORTED_MODULE_0__["Color"]; });
9930
9931/* harmony import */ var _csv__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
9932/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stringToArray", function() { return _csv__WEBPACK_IMPORTED_MODULE_1__["stringToArray"]; });
9933
9934/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(40);
9935/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["_"]; });
9936
9937/* harmony import */ var _numberSequence__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53);
9938/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberSequence", function() { return _numberSequence__WEBPACK_IMPORTED_MODULE_3__["NumberSequence"]; });
9939
9940/* harmony import */ var _promise__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54);
9941/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromiseStatus", function() { return _promise__WEBPACK_IMPORTED_MODULE_4__["AgPromiseStatus"]; });
9942
9943/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromise", function() { return _promise__WEBPACK_IMPORTED_MODULE_4__["AgPromise"]; });
9944
9945/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(55);
9946/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return _timer__WEBPACK_IMPORTED_MODULE_5__["Timer"]; });
9947
9948/**
9949 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9950 * @version v27.3.0
9951 * @link https://www.ag-grid.com/
9952 * @license MIT
9953 */
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964/***/ }),
9965/* 38 */
9966/***/ (function(module, __webpack_exports__, __webpack_require__) {
9967
9968"use strict";
9969__webpack_require__.r(__webpack_exports__);
9970/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
9971/**
9972 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9973 * @version v27.3.0
9974 * @link https://www.ag-grid.com/
9975 * @license MIT
9976 */
9977var __read = (undefined && undefined.__read) || function (o, n) {
9978 var m = typeof Symbol === "function" && o[Symbol.iterator];
9979 if (!m) return o;
9980 var i = m.call(o), r, ar = [], e;
9981 try {
9982 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
9983 }
9984 catch (error) { e = { error: error }; }
9985 finally {
9986 try {
9987 if (r && !r.done && (m = i["return"])) m.call(i);
9988 }
9989 finally { if (e) throw e.error; }
9990 }
9991 return ar;
9992};
9993var Color = /** @class */ (function () {
9994 /**
9995 * Every color component should be in the [0, 1] range.
9996 * Some easing functions (such as elastic easing) can overshoot the target value by some amount.
9997 * So, when animating colors, if the source or target color components are already near
9998 * or at the edge of the allowed [0, 1] range, it is possible for the intermediate color
9999 * component value to end up outside of that range mid-animation. For this reason the constructor
10000 * performs range checking/constraining.
10001 * @param r Red component.
10002 * @param g Green component.
10003 * @param b Blue component.
10004 * @param a Alpha (opacity) component.
10005 */
10006 function Color(r, g, b, a) {
10007 if (a === void 0) { a = 1; }
10008 // NaN is treated as 0.
10009 this.r = Math.min(1, Math.max(0, r || 0));
10010 this.g = Math.min(1, Math.max(0, g || 0));
10011 this.b = Math.min(1, Math.max(0, b || 0));
10012 this.a = Math.min(1, Math.max(0, a || 0));
10013 }
10014 /**
10015 * The given string can be in one of the following formats:
10016 * - #rgb
10017 * - #rrggbb
10018 * - rgb(r, g, b)
10019 * - rgba(r, g, b, a)
10020 * - CSS color name such as 'white', 'orange', 'cyan', etc.
10021 * @param str
10022 */
10023 Color.fromString = function (str) {
10024 // hexadecimal notation
10025 if (str.indexOf('#') >= 0) { // there can be some leading whitespace
10026 return Color.fromHexString(str);
10027 }
10028 // color name
10029 var hex = Color.nameToHex[str];
10030 if (hex) {
10031 return Color.fromHexString(hex);
10032 }
10033 // rgb(a) notation
10034 if (str.indexOf('rgb') >= 0) {
10035 return Color.fromRgbaString(str);
10036 }
10037 throw new Error("Invalid color string: '" + str + "'");
10038 };
10039 // See https://drafts.csswg.org/css-color/#hex-notation
10040 Color.parseHex = function (input) {
10041 input = input.replace(/ /g, '').slice(1);
10042 var parts;
10043 switch (input.length) {
10044 case 6:
10045 case 8:
10046 parts = [];
10047 for (var i = 0; i < input.length; i += 2) {
10048 parts.push(parseInt("" + input[i] + input[i + 1], 16));
10049 }
10050 break;
10051 case 3:
10052 case 4:
10053 parts = input.split('').map(function (p) { return parseInt(p, 16); }).map(function (p) { return p + p * 16; });
10054 break;
10055 }
10056 if (parts.length >= 3) {
10057 if (parts.every(function (p) { return p >= 0; })) {
10058 if (parts.length === 3) {
10059 parts.push(255);
10060 }
10061 return parts;
10062 }
10063 }
10064 };
10065 Color.fromHexString = function (str) {
10066 var values = Color.parseHex(str);
10067 if (values) {
10068 var _a = __read(values, 4), r = _a[0], g = _a[1], b = _a[2], a = _a[3];
10069 return new Color(r / 255, g / 255, b / 255, a / 255);
10070 }
10071 throw new Error("Malformed hexadecimal color string: '" + str + "'");
10072 };
10073 Color.stringToRgba = function (str) {
10074 // Find positions of opening and closing parentheses.
10075 var _a = __read([NaN, NaN], 2), po = _a[0], pc = _a[1];
10076 for (var i = 0; i < str.length; i++) {
10077 var c = str[i];
10078 if (!po && c === '(') {
10079 po = i;
10080 }
10081 else if (c === ')') {
10082 pc = i;
10083 break;
10084 }
10085 }
10086 var contents = po && pc && str.substring(po + 1, pc);
10087 if (!contents) {
10088 return;
10089 }
10090 var parts = contents.split(',');
10091 var rgba = [];
10092 for (var i = 0; i < parts.length; i++) {
10093 var part = parts[i];
10094 var value = parseFloat(part);
10095 if (isNaN(value)) {
10096 return;
10097 }
10098 if (part.indexOf('%') >= 0) { // percentage r, g, or b value
10099 value = Math.max(0, Math.min(100, value));
10100 value /= 100;
10101 }
10102 else {
10103 if (i === 3) { // alpha component
10104 value = Math.max(0, Math.min(1, value));
10105 }
10106 else { // absolute r, g, or b value
10107 value = Math.max(0, Math.min(255, value));
10108 value /= 255;
10109 }
10110 }
10111 rgba.push(value);
10112 }
10113 return rgba;
10114 };
10115 Color.fromRgbaString = function (str) {
10116 var rgba = Color.stringToRgba(str);
10117 if (rgba) {
10118 if (rgba.length === 3) {
10119 return new Color(rgba[0], rgba[1], rgba[2]);
10120 }
10121 else if (rgba.length === 4) {
10122 return new Color(rgba[0], rgba[1], rgba[2], rgba[3]);
10123 }
10124 }
10125 throw new Error("Malformed rgb/rgba color string: '" + str + "'");
10126 };
10127 Color.fromArray = function (arr) {
10128 if (arr.length === 4) {
10129 return new Color(arr[0], arr[1], arr[2], arr[3]);
10130 }
10131 if (arr.length === 3) {
10132 return new Color(arr[0], arr[1], arr[2]);
10133 }
10134 throw new Error('The given array should contain 3 or 4 color components (numbers).');
10135 };
10136 Color.fromHSB = function (h, s, b, alpha) {
10137 if (alpha === void 0) { alpha = 1; }
10138 var rgb = Color.HSBtoRGB(h, s, b);
10139 return new Color(rgb[0], rgb[1], rgb[2], alpha);
10140 };
10141 Color.padHex = function (str) {
10142 // Can't use `padStart(2, '0')` here because of IE.
10143 return str.length === 1 ? '0' + str : str;
10144 };
10145 Color.prototype.toHexString = function () {
10146 var hex = '#'
10147 + Color.padHex(Math.round(this.r * 255).toString(16))
10148 + Color.padHex(Math.round(this.g * 255).toString(16))
10149 + Color.padHex(Math.round(this.b * 255).toString(16));
10150 if (this.a < 1) {
10151 hex += Color.padHex(Math.round(this.a * 255).toString(16));
10152 }
10153 return hex;
10154 };
10155 Color.prototype.toRgbaString = function (fractionDigits) {
10156 if (fractionDigits === void 0) { fractionDigits = 3; }
10157 var components = [
10158 Math.round(this.r * 255),
10159 Math.round(this.g * 255),
10160 Math.round(this.b * 255)
10161 ];
10162 var k = Math.pow(10, fractionDigits);
10163 if (this.a !== 1) {
10164 components.push(Math.round(this.a * k) / k);
10165 return "rgba(" + components.join(', ') + ")";
10166 }
10167 return "rgb(" + components.join(', ') + ")";
10168 };
10169 Color.prototype.toString = function () {
10170 if (this.a === 1) {
10171 return this.toHexString();
10172 }
10173 return this.toRgbaString();
10174 };
10175 Color.prototype.toHSB = function () {
10176 return Color.RGBtoHSB(this.r, this.g, this.b);
10177 };
10178 /**
10179 * Converts the given RGB triple to an array of HSB (HSV) components.
10180 * The hue component will be `NaN` for achromatic colors.
10181 */
10182 Color.RGBtoHSB = function (r, g, b) {
10183 var min = Math.min(r, g, b);
10184 var max = Math.max(r, g, b);
10185 var S = max !== 0 ? (max - min) / max : 0;
10186 var H = NaN;
10187 // min == max, means all components are the same
10188 // and the color is a shade of gray with no hue (H is NaN)
10189 if (min !== max) {
10190 var delta = max - min;
10191 var rc = (max - r) / delta;
10192 var gc = (max - g) / delta;
10193 var bc = (max - b) / delta;
10194 if (r === max) {
10195 H = bc - gc;
10196 }
10197 else if (g === max) {
10198 H = 2.0 + rc - bc;
10199 }
10200 else {
10201 H = 4.0 + gc - rc;
10202 }
10203 H /= 6.0;
10204 if (H < 0) {
10205 H = H + 1.0;
10206 }
10207 }
10208 return [H * 360, S, max];
10209 };
10210 /**
10211 * Converts the given HSB (HSV) triple to an array of RGB components.
10212 */
10213 Color.HSBtoRGB = function (H, S, B) {
10214 if (isNaN(H)) {
10215 H = 0;
10216 }
10217 H = (((H % 360) + 360) % 360) / 360; // normalize hue to [0, 360] interval, then scale to [0, 1]
10218 var r = 0;
10219 var g = 0;
10220 var b = 0;
10221 if (S === 0) {
10222 r = g = b = B;
10223 }
10224 else {
10225 var h = (H - Math.floor(H)) * 6;
10226 var f = h - Math.floor(h);
10227 var p = B * (1 - S);
10228 var q = B * (1 - S * f);
10229 var t = B * (1 - (S * (1 - f)));
10230 switch (h >> 0) { // discard the floating point part of the number
10231 case 0:
10232 r = B;
10233 g = t;
10234 b = p;
10235 break;
10236 case 1:
10237 r = q;
10238 g = B;
10239 b = p;
10240 break;
10241 case 2:
10242 r = p;
10243 g = B;
10244 b = t;
10245 break;
10246 case 3:
10247 r = p;
10248 g = q;
10249 b = B;
10250 break;
10251 case 4:
10252 r = t;
10253 g = p;
10254 b = B;
10255 break;
10256 case 5:
10257 r = B;
10258 g = p;
10259 b = q;
10260 break;
10261 }
10262 }
10263 return [r, g, b];
10264 };
10265 Color.prototype.derive = function (hueShift, saturationFactor, brightnessFactor, opacityFactor) {
10266 var hsb = Color.RGBtoHSB(this.r, this.g, this.b);
10267 var b = hsb[2];
10268 if (b == 0 && brightnessFactor > 1.0) {
10269 b = 0.05;
10270 }
10271 var h = (((hsb[0] + hueShift) % 360) + 360) % 360;
10272 var s = Math.max(Math.min(hsb[1] * saturationFactor, 1.0), 0.0);
10273 b = Math.max(Math.min(b * brightnessFactor, 1.0), 0.0);
10274 var a = Math.max(Math.min(this.a * opacityFactor, 1.0), 0.0);
10275 var rgba = Color.HSBtoRGB(h, s, b);
10276 rgba.push(a);
10277 return Color.fromArray(rgba);
10278 };
10279 Color.prototype.brighter = function () {
10280 return this.derive(0, 1.0, 1.0 / 0.7, 1.0);
10281 };
10282 Color.prototype.darker = function () {
10283 return this.derive(0, 1.0, 0.7, 1.0);
10284 };
10285 /**
10286 * CSS Color Module Level 4:
10287 * https://drafts.csswg.org/css-color/#named-colors
10288 */
10289 Color.nameToHex = Object.freeze({
10290 aliceblue: '#F0F8FF',
10291 antiquewhite: '#FAEBD7',
10292 aqua: '#00FFFF',
10293 aquamarine: '#7FFFD4',
10294 azure: '#F0FFFF',
10295 beige: '#F5F5DC',
10296 bisque: '#FFE4C4',
10297 black: '#000000',
10298 blanchedalmond: '#FFEBCD',
10299 blue: '#0000FF',
10300 blueviolet: '#8A2BE2',
10301 brown: '#A52A2A',
10302 burlywood: '#DEB887',
10303 cadetblue: '#5F9EA0',
10304 chartreuse: '#7FFF00',
10305 chocolate: '#D2691E',
10306 coral: '#FF7F50',
10307 cornflowerblue: '#6495ED',
10308 cornsilk: '#FFF8DC',
10309 crimson: '#DC143C',
10310 cyan: '#00FFFF',
10311 darkblue: '#00008B',
10312 darkcyan: '#008B8B',
10313 darkgoldenrod: '#B8860B',
10314 darkgray: '#A9A9A9',
10315 darkgreen: '#006400',
10316 darkgrey: '#A9A9A9',
10317 darkkhaki: '#BDB76B',
10318 darkmagenta: '#8B008B',
10319 darkolivegreen: '#556B2F',
10320 darkorange: '#FF8C00',
10321 darkorchid: '#9932CC',
10322 darkred: '#8B0000',
10323 darksalmon: '#E9967A',
10324 darkseagreen: '#8FBC8F',
10325 darkslateblue: '#483D8B',
10326 darkslategray: '#2F4F4F',
10327 darkslategrey: '#2F4F4F',
10328 darkturquoise: '#00CED1',
10329 darkviolet: '#9400D3',
10330 deeppink: '#FF1493',
10331 deepskyblue: '#00BFFF',
10332 dimgray: '#696969',
10333 dimgrey: '#696969',
10334 dodgerblue: '#1E90FF',
10335 firebrick: '#B22222',
10336 floralwhite: '#FFFAF0',
10337 forestgreen: '#228B22',
10338 fuchsia: '#FF00FF',
10339 gainsboro: '#DCDCDC',
10340 ghostwhite: '#F8F8FF',
10341 gold: '#FFD700',
10342 goldenrod: '#DAA520',
10343 gray: '#808080',
10344 green: '#008000',
10345 greenyellow: '#ADFF2F',
10346 grey: '#808080',
10347 honeydew: '#F0FFF0',
10348 hotpink: '#FF69B4',
10349 indianred: '#CD5C5C',
10350 indigo: '#4B0082',
10351 ivory: '#FFFFF0',
10352 khaki: '#F0E68C',
10353 lavender: '#E6E6FA',
10354 lavenderblush: '#FFF0F5',
10355 lawngreen: '#7CFC00',
10356 lemonchiffon: '#FFFACD',
10357 lightblue: '#ADD8E6',
10358 lightcoral: '#F08080',
10359 lightcyan: '#E0FFFF',
10360 lightgoldenrodyellow: '#FAFAD2',
10361 lightgray: '#D3D3D3',
10362 lightgreen: '#90EE90',
10363 lightgrey: '#D3D3D3',
10364 lightpink: '#FFB6C1',
10365 lightsalmon: '#FFA07A',
10366 lightseagreen: '#20B2AA',
10367 lightskyblue: '#87CEFA',
10368 lightslategray: '#778899',
10369 lightslategrey: '#778899',
10370 lightsteelblue: '#B0C4DE',
10371 lightyellow: '#FFFFE0',
10372 lime: '#00FF00',
10373 limegreen: '#32CD32',
10374 linen: '#FAF0E6',
10375 magenta: '#FF00FF',
10376 maroon: '#800000',
10377 mediumaquamarine: '#66CDAA',
10378 mediumblue: '#0000CD',
10379 mediumorchid: '#BA55D3',
10380 mediumpurple: '#9370DB',
10381 mediumseagreen: '#3CB371',
10382 mediumslateblue: '#7B68EE',
10383 mediumspringgreen: '#00FA9A',
10384 mediumturquoise: '#48D1CC',
10385 mediumvioletred: '#C71585',
10386 midnightblue: '#191970',
10387 mintcream: '#F5FFFA',
10388 mistyrose: '#FFE4E1',
10389 moccasin: '#FFE4B5',
10390 navajowhite: '#FFDEAD',
10391 navy: '#000080',
10392 oldlace: '#FDF5E6',
10393 olive: '#808000',
10394 olivedrab: '#6B8E23',
10395 orange: '#FFA500',
10396 orangered: '#FF4500',
10397 orchid: '#DA70D6',
10398 palegoldenrod: '#EEE8AA',
10399 palegreen: '#98FB98',
10400 paleturquoise: '#AFEEEE',
10401 palevioletred: '#DB7093',
10402 papayawhip: '#FFEFD5',
10403 peachpuff: '#FFDAB9',
10404 peru: '#CD853F',
10405 pink: '#FFC0CB',
10406 plum: '#DDA0DD',
10407 powderblue: '#B0E0E6',
10408 purple: '#800080',
10409 rebeccapurple: '#663399',
10410 red: '#FF0000',
10411 rosybrown: '#BC8F8F',
10412 royalblue: '#4169E1',
10413 saddlebrown: '#8B4513',
10414 salmon: '#FA8072',
10415 sandybrown: '#F4A460',
10416 seagreen: '#2E8B57',
10417 seashell: '#FFF5EE',
10418 sienna: '#A0522D',
10419 silver: '#C0C0C0',
10420 skyblue: '#87CEEB',
10421 slateblue: '#6A5ACD',
10422 slategray: '#708090',
10423 slategrey: '#708090',
10424 snow: '#FFFAFA',
10425 springgreen: '#00FF7F',
10426 steelblue: '#4682B4',
10427 tan: '#D2B48C',
10428 teal: '#008080',
10429 thistle: '#D8BFD8',
10430 tomato: '#FF6347',
10431 turquoise: '#40E0D0',
10432 violet: '#EE82EE',
10433 wheat: '#F5DEB3',
10434 white: '#FFFFFF',
10435 whitesmoke: '#F5F5F5',
10436 yellow: '#FFFF00',
10437 yellowgreen: '#9ACD32'
10438 });
10439 return Color;
10440}());
10441
10442
10443
10444
10445
10446/***/ }),
10447/* 39 */
10448/***/ (function(module, __webpack_exports__, __webpack_require__) {
10449
10450"use strict";
10451__webpack_require__.r(__webpack_exports__);
10452/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringToArray", function() { return stringToArray; });
10453/**
10454 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
10455 * @version v27.3.0
10456 * @link https://www.ag-grid.com/
10457 * @license MIT
10458 */
10459// Based on https://stackoverflow.com/a/14991797
10460// This will parse a delimited string into an array of arrays.
10461function stringToArray(strData, delimiter) {
10462 if (delimiter === void 0) { delimiter = ','; }
10463 var data = [];
10464 var isNewline = function (char) { return char === '\r' || char === '\n'; };
10465 var insideQuotedField = false;
10466 if (strData === '') {
10467 return [['']];
10468 }
10469 var _loop_1 = function (row, column, position) {
10470 var previousChar = strData[position - 1];
10471 var currentChar = strData[position];
10472 var nextChar = strData[position + 1];
10473 var ensureDataExists = function () {
10474 if (!data[row]) {
10475 // create row if it doesn't exist
10476 data[row] = [];
10477 }
10478 if (!data[row][column]) {
10479 // create column if it doesn't exist
10480 data[row][column] = '';
10481 }
10482 };
10483 ensureDataExists();
10484 if (currentChar === '"') {
10485 if (insideQuotedField) {
10486 if (nextChar === '"') {
10487 // unescape double quote
10488 data[row][column] += '"';
10489 position++;
10490 }
10491 else {
10492 // exit quoted field
10493 insideQuotedField = false;
10494 }
10495 return out_row_1 = row, out_column_1 = column, out_position_1 = position, "continue";
10496 }
10497 else if (previousChar === undefined || previousChar === delimiter || isNewline(previousChar)) {
10498 // enter quoted field
10499 insideQuotedField = true;
10500 return out_row_1 = row, out_column_1 = column, out_position_1 = position, "continue";
10501 }
10502 }
10503 if (!insideQuotedField) {
10504 if (currentChar === delimiter) {
10505 // move to next column
10506 column++;
10507 ensureDataExists();
10508 return out_row_1 = row, out_column_1 = column, out_position_1 = position, "continue";
10509 }
10510 else if (isNewline(currentChar)) {
10511 // move to next row
10512 column = 0;
10513 row++;
10514 ensureDataExists();
10515 if (currentChar === '\r' && nextChar === '\n') {
10516 // skip over second newline character if it exists
10517 position++;
10518 }
10519 return out_row_1 = row, out_column_1 = column, out_position_1 = position, "continue";
10520 }
10521 }
10522 // add current character to current column
10523 data[row][column] += currentChar;
10524 out_row_1 = row;
10525 out_column_1 = column;
10526 out_position_1 = position;
10527 };
10528 var out_row_1, out_column_1, out_position_1;
10529 // iterate over each character, keep track of current row and column (of the returned array)
10530 for (var row = 0, column = 0, position = 0; position < strData.length; position++) {
10531 _loop_1(row, column, position);
10532 row = out_row_1;
10533 column = out_column_1;
10534 position = out_position_1;
10535 }
10536 return data;
10537}
10538
10539
10540
10541
10542/***/ }),
10543/* 40 */
10544/***/ (function(module, __webpack_exports__, __webpack_require__) {
10545
10546"use strict";
10547__webpack_require__.r(__webpack_exports__);
10548/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_", function() { return _; });
10549/* harmony import */ var _general__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
10550/* harmony import */ var _aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
10551/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
10552/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43);
10553/* harmony import */ var _csv__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39);
10554/* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45);
10555/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42);
10556/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21);
10557/* harmony import */ var _function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14);
10558/* harmony import */ var _fuzzyMatch__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47);
10559/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7);
10560/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(48);
10561/* harmony import */ var _keyboard__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(49);
10562/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(27);
10563/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(50);
10564/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(46);
10565/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(13);
10566/* harmony import */ var _rowNode__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(51);
10567/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(52);
10568/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(26);
10569/**
10570 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
10571 * @version v27.3.0
10572 * @link https://www.ag-grid.com/
10573 * @license MIT
10574 */
10575var __assign = (undefined && undefined.__assign) || function () {
10576 __assign = Object.assign || function(t) {
10577 for (var s, i = 1, n = arguments.length; i < n; i++) {
10578 s = arguments[i];
10579 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10580 t[p] = s[p];
10581 }
10582 return t;
10583 };
10584 return __assign.apply(this, arguments);
10585};
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606var utils = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, _general__WEBPACK_IMPORTED_MODULE_0__), _aria__WEBPACK_IMPORTED_MODULE_1__), _array__WEBPACK_IMPORTED_MODULE_2__), _browser__WEBPACK_IMPORTED_MODULE_3__), _csv__WEBPACK_IMPORTED_MODULE_4__), _date__WEBPACK_IMPORTED_MODULE_5__), _dom__WEBPACK_IMPORTED_MODULE_6__), _event__WEBPACK_IMPORTED_MODULE_7__), _function__WEBPACK_IMPORTED_MODULE_8__), _fuzzyMatch__WEBPACK_IMPORTED_MODULE_9__), _generic__WEBPACK_IMPORTED_MODULE_10__), _icon__WEBPACK_IMPORTED_MODULE_11__), _keyboard__WEBPACK_IMPORTED_MODULE_12__), _map__WEBPACK_IMPORTED_MODULE_13__), _mouse__WEBPACK_IMPORTED_MODULE_14__), _number__WEBPACK_IMPORTED_MODULE_15__), _object__WEBPACK_IMPORTED_MODULE_16__), _rowNode__WEBPACK_IMPORTED_MODULE_17__), _set__WEBPACK_IMPORTED_MODULE_18__), _string__WEBPACK_IMPORTED_MODULE_19__);
10607var _ = utils;
10608
10609
10610
10611
10612/***/ }),
10613/* 41 */
10614/***/ (function(module, __webpack_exports__, __webpack_require__) {
10615
10616"use strict";
10617__webpack_require__.r(__webpack_exports__);
10618/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNameOfClass", function() { return getNameOfClass; });
10619/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findLineByLeastSquares", function() { return findLineByLeastSquares; });
10620/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cssStyleObjectToMarkup", function() { return cssStyleObjectToMarkup; });
10621/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "message", function() { return message; });
10622/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCellRendererToHtmlElement", function() { return bindCellRendererToHtmlElement; });
10623/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42);
10624/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26);
10625/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
10626/**
10627 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
10628 * @version v27.3.0
10629 * @link https://www.ag-grid.com/
10630 * @license MIT
10631 */
10632
10633
10634
10635/** @deprecated */
10636function getNameOfClass(theClass) {
10637 var funcNameRegex = /function (.{1,})\(/;
10638 var funcAsString = theClass.toString();
10639 var results = funcNameRegex.exec(funcAsString);
10640 return results && results.length > 1 ? results[1] : "";
10641}
10642function findLineByLeastSquares(values) {
10643 var len = values.length;
10644 var maxDecimals = 0;
10645 if (len <= 1) {
10646 return values;
10647 }
10648 for (var i = 0; i < values.length; i++) {
10649 var value = values[i];
10650 var splitExponent = value.toString().split('e-');
10651 if (splitExponent.length > 1) {
10652 maxDecimals = Math.max(maxDecimals, parseInt(splitExponent[1], 10));
10653 continue;
10654 }
10655 if (Math.floor(value) === value) {
10656 continue;
10657 }
10658 maxDecimals = Math.max(maxDecimals, value.toString().split('.')[1].length);
10659 }
10660 var sum_x = 0;
10661 var sum_y = 0;
10662 var sum_xy = 0;
10663 var sum_xx = 0;
10664 var y = 0;
10665 for (var x = 0; x < len; x++) {
10666 y = values[x];
10667 sum_x += x;
10668 sum_y += y;
10669 sum_xx += x * x;
10670 sum_xy += x * y;
10671 }
10672 var m = (len * sum_xy - sum_x * sum_y) / (len * sum_xx - sum_x * sum_x);
10673 var b = (sum_y / len) - (m * sum_x) / len;
10674 var result = [];
10675 for (var x = 0; x <= len; x++) {
10676 result.push(parseFloat((x * m + b).toFixed(maxDecimals)));
10677 }
10678 return result;
10679}
10680/**
10681 * Converts a CSS object into string
10682 * @param {Object} stylesToUse an object eg: {color: 'black', top: '25px'}
10683 * @return {string} A string like "color: black; top: 25px;" for html
10684 */
10685function cssStyleObjectToMarkup(stylesToUse) {
10686 if (!stylesToUse) {
10687 return '';
10688 }
10689 var resParts = [];
10690 Object(_object__WEBPACK_IMPORTED_MODULE_2__["iterateObject"])(stylesToUse, function (styleKey, styleValue) {
10691 var styleKeyDashed = Object(_string__WEBPACK_IMPORTED_MODULE_1__["camelCaseToHyphen"])(styleKey);
10692 resParts.push(styleKeyDashed + ": " + styleValue + ";");
10693 });
10694 return resParts.join(' ');
10695}
10696/**
10697 * Displays a message to the browser. this is useful in iPad, where you can't easily see the console.
10698 * so the javascript code can use this to give feedback. this is NOT intended to be called in production.
10699 * it is intended the AG Grid developer calls this to troubleshoot, but then takes out the calls before
10700 * checking in.
10701 * @param {string} msg
10702 */
10703function message(msg) {
10704 var eMessage = document.createElement('div');
10705 var eBox = document.querySelector('#__ag__message');
10706 eMessage.innerHTML = msg;
10707 if (!eBox) {
10708 var template = "<div id=\"__ag__message\" style=\"display: inline-block; position: absolute; top: 0px; left: 0px; color: white; background-color: black; z-index: 20; padding: 2px; border: 1px solid darkred; height: 200px; overflow-y: auto;\"></div>";
10709 eBox = Object(_dom__WEBPACK_IMPORTED_MODULE_0__["loadTemplate"])(template);
10710 if (document.body) {
10711 document.body.appendChild(eBox);
10712 }
10713 }
10714 eBox.insertBefore(eMessage, eBox.children[0]);
10715}
10716/**
10717 * cell renderers are used in a few places. they bind to dom slightly differently to other cell renderes as they
10718 * can return back strings (instead of html elemnt) in the getGui() method. common code placed here to handle that.
10719 * @param {AgPromise<ICellRendererComp>} cellRendererPromise
10720 * @param {HTMLElement} eTarget
10721 */
10722function bindCellRendererToHtmlElement(cellRendererPromise, eTarget) {
10723 cellRendererPromise.then(function (cellRenderer) {
10724 var gui = cellRenderer.getGui();
10725 if (gui != null) {
10726 if (typeof gui === 'object') {
10727 eTarget.appendChild(gui);
10728 }
10729 else {
10730 eTarget.innerHTML = gui;
10731 }
10732 }
10733 });
10734}
10735
10736
10737
10738
10739/***/ }),
10740/* 42 */
10741/***/ (function(module, __webpack_exports__, __webpack_require__) {
10742
10743"use strict";
10744__webpack_require__.r(__webpack_exports__);
10745/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "radioCssClass", function() { return radioCssClass; });
10746/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFocusableFormField", function() { return isFocusableFormField; });
10747/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDisplayed", function() { return setDisplayed; });
10748/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setVisible", function() { return setVisible; });
10749/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDisabled", function() { return setDisabled; });
10750/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isElementChildOfClass", function() { return isElementChildOfClass; });
10751/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementSize", function() { return getElementSize; });
10752/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInnerHeight", function() { return getInnerHeight; });
10753/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInnerWidth", function() { return getInnerWidth; });
10754/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAbsoluteHeight", function() { return getAbsoluteHeight; });
10755/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAbsoluteWidth", function() { return getAbsoluteWidth; });
10756/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRtlNegativeScroll", function() { return isRtlNegativeScroll; });
10757/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getScrollLeft", function() { return getScrollLeft; });
10758/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setScrollLeft", function() { return setScrollLeft; });
10759/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearElement", function() { return clearElement; });
10760/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return removeElement; });
10761/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeFromParent", function() { return removeFromParent; });
10762/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVisible", function() { return isVisible; });
10763/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadTemplate", function() { return loadTemplate; });
10764/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendHtml", function() { return appendHtml; });
10765/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementAttribute", function() { return getElementAttribute; });
10766/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "offsetHeight", function() { return offsetHeight; });
10767/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "offsetWidth", function() { return offsetWidth; });
10768/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ensureDomOrder", function() { return ensureDomOrder; });
10769/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDomChildOrder", function() { return setDomChildOrder; });
10770/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertWithDomOrder", function() { return insertWithDomOrder; });
10771/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prependDC", function() { return prependDC; });
10772/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addStylesToElement", function() { return addStylesToElement; });
10773/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isHorizontalScrollShowing", function() { return isHorizontalScrollShowing; });
10774/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVerticalScrollShowing", function() { return isVerticalScrollShowing; });
10775/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setElementWidth", function() { return setElementWidth; });
10776/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFixedWidth", function() { return setFixedWidth; });
10777/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setElementHeight", function() { return setElementHeight; });
10778/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFixedHeight", function() { return setFixedHeight; });
10779/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatSize", function() { return formatSize; });
10780/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNode", function() { return isNode; });
10781/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isElement", function() { return isElement; });
10782/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNodeOrElement", function() { return isNodeOrElement; });
10783/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copyNodeList", function() { return copyNodeList; });
10784/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterateNamedNodeMap", function() { return iterateNamedNodeMap; });
10785/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCheckboxState", function() { return setCheckboxState; });
10786/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addOrRemoveAttribute", function() { return addOrRemoveAttribute; });
10787/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nodeListForEach", function() { return nodeListForEach; });
10788/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43);
10789/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
10790/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
10791/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
10792/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15);
10793/**
10794 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
10795 * @version v27.3.0
10796 * @link https://www.ag-grid.com/
10797 * @license MIT
10798 */
10799
10800
10801
10802
10803
10804var rtlNegativeScroll;
10805/**
10806 * This method adds a class to an element and remove that class from all siblings.
10807 * Useful for toggling state.
10808 * @param {HTMLElement} element The element to receive the class
10809 * @param {string} elementClass The class to be assigned to the element
10810 * @param {boolean} otherElementClass The class to be assigned to siblings of the element, but not the element itself
10811 */
10812function radioCssClass(element, elementClass, otherElementClass) {
10813 var parent = element.parentElement;
10814 var sibling = parent && parent.firstChild;
10815 while (sibling) {
10816 if (elementClass) {
10817 sibling.classList.toggle(elementClass, sibling === element);
10818 }
10819 if (otherElementClass) {
10820 sibling.classList.toggle(otherElementClass, sibling !== element);
10821 }
10822 sibling = sibling.nextSibling;
10823 }
10824}
10825function isFocusableFormField(element) {
10826 var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;
10827 var isFocusable = matches.call(element, _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].INPUT_SELECTOR);
10828 var isNotFocusable = matches.call(element, _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].FOCUSABLE_EXCLUDE);
10829 var isElementVisible = isVisible(element);
10830 var focusable = isFocusable && !isNotFocusable && isElementVisible;
10831 return focusable;
10832}
10833function setDisplayed(element, displayed) {
10834 element.classList.toggle('ag-hidden', !displayed);
10835}
10836function setVisible(element, visible) {
10837 element.classList.toggle('ag-invisible', !visible);
10838}
10839function setDisabled(element, disabled) {
10840 var attributeName = 'disabled';
10841 var addOrRemoveDisabledAttribute = disabled ?
10842 function (e) { return e.setAttribute(attributeName, ''); } :
10843 function (e) { return e.removeAttribute(attributeName); };
10844 addOrRemoveDisabledAttribute(element);
10845 nodeListForEach(element.querySelectorAll('input'), function (input) { return addOrRemoveDisabledAttribute(input); });
10846}
10847function isElementChildOfClass(element, cls, maxNest) {
10848 var counter = 0;
10849 while (element) {
10850 if (element.classList.contains(cls)) {
10851 return true;
10852 }
10853 element = element.parentElement;
10854 if (maxNest && ++counter > maxNest) {
10855 break;
10856 }
10857 }
10858 return false;
10859}
10860// returns back sizes as doubles instead of strings. similar to
10861// getBoundingClientRect, however getBoundingClientRect does not:
10862// a) work with fractions (eg browser is zooming)
10863// b) has CSS transitions applied (eg CSS scale, browser zoom), which we don't want, we want the un-transitioned values
10864function getElementSize(el) {
10865 var _a = window.getComputedStyle(el), height = _a.height, width = _a.width, paddingTop = _a.paddingTop, paddingRight = _a.paddingRight, paddingBottom = _a.paddingBottom, paddingLeft = _a.paddingLeft, marginTop = _a.marginTop, marginRight = _a.marginRight, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, boxSizing = _a.boxSizing;
10866 return {
10867 height: parseFloat(height),
10868 width: parseFloat(width),
10869 paddingTop: parseFloat(paddingTop),
10870 paddingRight: parseFloat(paddingRight),
10871 paddingBottom: parseFloat(paddingBottom),
10872 paddingLeft: parseFloat(paddingLeft),
10873 marginTop: parseFloat(marginTop),
10874 marginRight: parseFloat(marginRight),
10875 marginBottom: parseFloat(marginBottom),
10876 marginLeft: parseFloat(marginLeft),
10877 boxSizing: boxSizing
10878 };
10879}
10880function getInnerHeight(el) {
10881 var size = getElementSize(el);
10882 if (size.boxSizing === 'border-box') {
10883 return size.height - size.paddingTop - size.paddingBottom;
10884 }
10885 return size.height;
10886}
10887function getInnerWidth(el) {
10888 var size = getElementSize(el);
10889 if (size.boxSizing === 'border-box') {
10890 return size.width - size.paddingLeft - size.paddingRight;
10891 }
10892 return size.width;
10893}
10894function getAbsoluteHeight(el) {
10895 var size = getElementSize(el);
10896 var marginRight = size.marginBottom + size.marginTop;
10897 return Math.ceil(el.offsetHeight + marginRight);
10898}
10899function getAbsoluteWidth(el) {
10900 var size = getElementSize(el);
10901 var marginWidth = size.marginLeft + size.marginRight;
10902 return Math.ceil(el.offsetWidth + marginWidth);
10903}
10904function isRtlNegativeScroll() {
10905 if (typeof rtlNegativeScroll === "boolean") {
10906 return rtlNegativeScroll;
10907 }
10908 var template = document.createElement('div');
10909 template.style.direction = 'rtl';
10910 template.style.width = '1px';
10911 template.style.height = '1px';
10912 template.style.position = 'fixed';
10913 template.style.top = '0px';
10914 template.style.overflow = 'hidden';
10915 template.dir = 'rtl';
10916 template.innerHTML = /* html */
10917 "<div style=\"width: 2px\">\n <span style=\"display: inline-block; width: 1px\"></span>\n <span style=\"display: inline-block; width: 1px\"></span>\n </div>";
10918 document.body.appendChild(template);
10919 template.scrollLeft = 1;
10920 rtlNegativeScroll = Math.floor(template.scrollLeft) === 0;
10921 document.body.removeChild(template);
10922 return rtlNegativeScroll;
10923}
10924function getScrollLeft(element, rtl) {
10925 var scrollLeft = element.scrollLeft;
10926 if (rtl) {
10927 // Absolute value - for FF that reports RTL scrolls in negative numbers
10928 scrollLeft = Math.abs(scrollLeft);
10929 if (Object(_browser__WEBPACK_IMPORTED_MODULE_0__["isBrowserChrome"])() && !isRtlNegativeScroll()) {
10930 scrollLeft = element.scrollWidth - element.clientWidth - scrollLeft;
10931 }
10932 }
10933 return scrollLeft;
10934}
10935function setScrollLeft(element, value, rtl) {
10936 if (rtl) {
10937 // Chrome and Safari when doing RTL have the END position of the scroll as zero, not the start
10938 if (isRtlNegativeScroll()) {
10939 value *= -1;
10940 }
10941 else if (Object(_browser__WEBPACK_IMPORTED_MODULE_0__["isBrowserSafari"])() || Object(_browser__WEBPACK_IMPORTED_MODULE_0__["isBrowserChrome"])()) {
10942 value = element.scrollWidth - element.clientWidth - value;
10943 }
10944 }
10945 element.scrollLeft = value;
10946}
10947function clearElement(el) {
10948 while (el && el.firstChild) {
10949 el.removeChild(el.firstChild);
10950 }
10951}
10952/** @deprecated */
10953function removeElement(parent, cssSelector) {
10954 removeFromParent(parent.querySelector(cssSelector));
10955}
10956function removeFromParent(node) {
10957 if (node && node.parentNode) {
10958 node.parentNode.removeChild(node);
10959 }
10960}
10961function isVisible(element) {
10962 return element.offsetParent !== null;
10963}
10964/**
10965 * Loads the template and returns it as an element. makes up for no simple way in
10966 * the dom api to load html directly, eg we cannot do this: document.createElement(template)
10967 * @param {string} template
10968 * @returns {HTMLElement}
10969 */
10970function loadTemplate(template) {
10971 // we try the DOMParser first, as SalesForce doesn't like using innerHTML on a div
10972 if (DOMParser !== null) {
10973 var parser = new DOMParser();
10974 var doc = parser.parseFromString(template, "text/html");
10975 return doc.body.firstChild;
10976 }
10977 var tempDiv = document.createElement('div');
10978 tempDiv.innerHTML = (template || '').trim();
10979 return tempDiv.firstChild;
10980}
10981function appendHtml(eContainer, htmlTemplate) {
10982 if (eContainer.lastChild) {
10983 // https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML
10984 // we put the items at the start, so new items appear underneath old items,
10985 // so when expanding/collapsing groups, the new rows don't go on top of the
10986 // rows below that are moving our of the way
10987 eContainer.insertAdjacentHTML('afterbegin', htmlTemplate);
10988 }
10989 else {
10990 eContainer.innerHTML = htmlTemplate;
10991 }
10992}
10993/** @deprecated */
10994function getElementAttribute(element, attributeName) {
10995 if (element.attributes && element.attributes[attributeName]) {
10996 var attribute = element.attributes[attributeName];
10997 return attribute.value;
10998 }
10999 return null;
11000}
11001function offsetHeight(element) {
11002 return element && element.clientHeight ? element.clientHeight : 0;
11003}
11004function offsetWidth(element) {
11005 return element && element.clientWidth ? element.clientWidth : 0;
11006}
11007function ensureDomOrder(eContainer, eChild, eChildBefore) {
11008 // if already in right order, do nothing
11009 if (eChildBefore && eChildBefore.nextSibling === eChild) {
11010 return;
11011 }
11012 if (eChildBefore) {
11013 if (eChildBefore.nextSibling) {
11014 // insert between the eRowBefore and the row after it
11015 eContainer.insertBefore(eChild, eChildBefore.nextSibling);
11016 }
11017 else {
11018 // if nextSibling is missing, means other row is at end, so just append new row at the end
11019 eContainer.appendChild(eChild);
11020 }
11021 }
11022 else {
11023 // otherwise put at start
11024 if (eContainer.firstChild && eContainer.firstChild !== eChild) {
11025 // insert it at the first location
11026 eContainer.insertAdjacentElement('afterbegin', eChild);
11027 }
11028 }
11029}
11030function setDomChildOrder(eContainer, orderedChildren) {
11031 for (var i = 0; i < orderedChildren.length; i++) {
11032 var correctCellAtIndex = orderedChildren[i];
11033 var actualCellAtIndex = eContainer.children[i];
11034 if (actualCellAtIndex !== correctCellAtIndex) {
11035 eContainer.insertBefore(correctCellAtIndex, actualCellAtIndex);
11036 }
11037 }
11038}
11039function insertWithDomOrder(eContainer, eToInsert, eChildBefore) {
11040 if (eChildBefore) {
11041 // if previous element exists, just slot in after the previous element
11042 eChildBefore.insertAdjacentElement('afterend', eToInsert);
11043 }
11044 else {
11045 if (eContainer.firstChild) {
11046 // insert it at the first location
11047 eContainer.insertAdjacentElement('afterbegin', eToInsert);
11048 }
11049 else {
11050 // otherwise eContainer is empty, so just append it
11051 eContainer.appendChild(eToInsert);
11052 }
11053 }
11054}
11055/** @deprecated */
11056function prependDC(parent, documentFragment) {
11057 if (Object(_generic__WEBPACK_IMPORTED_MODULE_1__["exists"])(parent.firstChild)) {
11058 parent.insertBefore(documentFragment, parent.firstChild);
11059 }
11060 else {
11061 parent.appendChild(documentFragment);
11062 }
11063}
11064function addStylesToElement(eElement, styles) {
11065 if (!styles) {
11066 return;
11067 }
11068 Object.keys(styles).forEach(function (key) {
11069 var keyCamelCase = Object(_string__WEBPACK_IMPORTED_MODULE_3__["hyphenToCamelCase"])(key);
11070 if (keyCamelCase) {
11071 eElement.style[keyCamelCase] = styles[key];
11072 }
11073 });
11074}
11075function isHorizontalScrollShowing(element) {
11076 return element.clientWidth < element.scrollWidth;
11077}
11078function isVerticalScrollShowing(element) {
11079 return element.clientHeight < element.scrollHeight;
11080}
11081function setElementWidth(element, width) {
11082 if (width === 'flex') {
11083 element.style.removeProperty('width');
11084 element.style.removeProperty('minWidth');
11085 element.style.removeProperty('maxWidth');
11086 element.style.flex = '1 1 auto';
11087 }
11088 else {
11089 setFixedWidth(element, width);
11090 }
11091}
11092function setFixedWidth(element, width) {
11093 width = formatSize(width);
11094 element.style.width = width.toString();
11095 element.style.maxWidth = width.toString();
11096 element.style.minWidth = width.toString();
11097}
11098function setElementHeight(element, height) {
11099 if (height === 'flex') {
11100 element.style.removeProperty('height');
11101 element.style.removeProperty('minHeight');
11102 element.style.removeProperty('maxHeight');
11103 element.style.flex = '1 1 auto';
11104 }
11105 else {
11106 setFixedHeight(element, height);
11107 }
11108}
11109function setFixedHeight(element, height) {
11110 height = formatSize(height);
11111 element.style.height = height.toString();
11112 element.style.maxHeight = height.toString();
11113 element.style.minHeight = height.toString();
11114}
11115function formatSize(size) {
11116 if (typeof size === 'number') {
11117 return size + "px";
11118 }
11119 return size;
11120}
11121/**
11122 * Returns true if it is a DOM node
11123 * taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
11124 * @param {any} o
11125 * @return {boolean}
11126 */
11127function isNode(o) {
11128 return (typeof Node === 'function'
11129 ? o instanceof Node
11130 : o && typeof o === 'object' && typeof o.nodeType === 'number' && typeof o.nodeName === 'string');
11131}
11132//
11133/**
11134 * Returns true if it is a DOM element
11135 * taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
11136 * @param {any} o
11137 * @returns {boolean}
11138 */
11139function isElement(o) {
11140 return (typeof HTMLElement === 'function'
11141 ? o instanceof HTMLElement //DOM2
11142 : o && Object(_object__WEBPACK_IMPORTED_MODULE_2__["isNonNullObject"])(o) && o.nodeType === 1 && typeof o.nodeName === 'string');
11143}
11144function isNodeOrElement(o) {
11145 return isNode(o) || isElement(o);
11146}
11147/**
11148 * Makes a copy of a node list into a list
11149 * @param {NodeList} nodeList
11150 * @returns {Node[]}
11151 */
11152function copyNodeList(nodeList) {
11153 if (nodeList == null) {
11154 return [];
11155 }
11156 var result = [];
11157 nodeListForEach(nodeList, function (node) { return result.push(node); });
11158 return result;
11159}
11160function iterateNamedNodeMap(map, callback) {
11161 if (!map) {
11162 return;
11163 }
11164 for (var i = 0; i < map.length; i++) {
11165 var attr = map[i];
11166 callback(attr.name, attr.value);
11167 }
11168}
11169/** @deprecated */
11170function setCheckboxState(eCheckbox, state) {
11171 if (typeof state === 'boolean') {
11172 eCheckbox.checked = state;
11173 eCheckbox.indeterminate = false;
11174 }
11175 else {
11176 // isNodeSelected returns back undefined if it's a group and the children
11177 // are a mix of selected and unselected
11178 eCheckbox.indeterminate = true;
11179 }
11180}
11181function addOrRemoveAttribute(element, name, value) {
11182 if (value == null) {
11183 element.removeAttribute(name);
11184 }
11185 else {
11186 element.setAttribute(name, value.toString());
11187 }
11188}
11189function nodeListForEach(nodeList, action) {
11190 if (nodeList == null) {
11191 return;
11192 }
11193 for (var i = 0; i < nodeList.length; i++) {
11194 action(nodeList[i]);
11195 }
11196}
11197
11198
11199
11200
11201/***/ }),
11202/* 43 */
11203/***/ (function(module, __webpack_exports__, __webpack_require__) {
11204
11205"use strict";
11206__webpack_require__.r(__webpack_exports__);
11207/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowserEdge", function() { return isBrowserEdge; });
11208/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowserSafari", function() { return isBrowserSafari; });
11209/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowserChrome", function() { return isBrowserChrome; });
11210/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowserFirefox", function() { return isBrowserFirefox; });
11211/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIOSUserAgent", function() { return isIOSUserAgent; });
11212/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTabIndex", function() { return getTabIndex; });
11213/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMaxDivHeight", function() { return getMaxDivHeight; });
11214/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getScrollbarWidth", function() { return getScrollbarWidth; });
11215/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInvisibleScrollbar", function() { return isInvisibleScrollbar; });
11216/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasOverflowScrolling", function() { return hasOverflowScrolling; });
11217/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBodyWidth", function() { return getBodyWidth; });
11218/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBodyHeight", function() { return getBodyHeight; });
11219/**
11220 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11221 * @version v27.3.0
11222 * @link https://www.ag-grid.com/
11223 * @license MIT
11224 */
11225var __values = (undefined && undefined.__values) || function(o) {
11226 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
11227 if (m) return m.call(o);
11228 if (o && typeof o.length === "number") return {
11229 next: function () {
11230 if (o && i >= o.length) o = void 0;
11231 return { value: o && o[i++], done: !o };
11232 }
11233 };
11234 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
11235};
11236/**
11237 * These variables are lazy loaded, as otherwise they try and get initialised when we are loading
11238 * unit tests and we don't have references to window or document in the unit tests
11239 * from http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
11240 */
11241var isSafari;
11242var isIE;
11243var isEdge;
11244var isChrome;
11245var isFirefox;
11246var isIOS;
11247var invisibleScrollbar;
11248var browserScrollbarWidth;
11249function isBrowserIE() {
11250 if (isIE === undefined) {
11251 isIE = /*@cc_on!@*/ false || !!document.documentMode; // At least IE6
11252 }
11253 return isIE;
11254}
11255function isBrowserEdge() {
11256 if (isEdge === undefined) {
11257 isEdge = !isBrowserIE() && !!window.StyleMedia;
11258 }
11259 return isEdge;
11260}
11261function isBrowserSafari() {
11262 if (isSafari === undefined) {
11263 // taken from https://stackoverflow.com/a/23522755/1388233
11264 isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
11265 }
11266 return isSafari;
11267}
11268function isBrowserChrome() {
11269 if (isChrome === undefined) {
11270 var win = window;
11271 isChrome = (!!win.chrome && (!!win.chrome.webstore || !!win.chrome.runtime)) ||
11272 (/Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor));
11273 }
11274 return isChrome;
11275}
11276function isBrowserFirefox() {
11277 if (isFirefox === undefined) {
11278 var win = window;
11279 isFirefox = typeof win.InstallTrigger !== 'undefined';
11280 }
11281 return isFirefox;
11282}
11283function isIOSUserAgent() {
11284 if (isIOS === undefined) {
11285 // taken from https://stackoverflow.com/a/58064481/1388233
11286 isIOS = (/iPad|iPhone|iPod/.test(navigator.platform) ||
11287 // eslint-disable-next-line
11288 (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&
11289 // @ts-ignore
11290 !window.MSStream;
11291 }
11292 return isIOS;
11293}
11294function getTabIndex(el) {
11295 if (!el) {
11296 return null;
11297 }
11298 var numberTabIndex = el.tabIndex;
11299 var tabIndex = el.getAttribute('tabIndex');
11300 if (numberTabIndex === -1 && (tabIndex === null || (tabIndex === '' && !isBrowserFirefox()))) {
11301 return null;
11302 }
11303 return numberTabIndex.toString();
11304}
11305function getMaxDivHeight() {
11306 if (!document.body) {
11307 return -1;
11308 }
11309 var res = 1000000;
11310 // FF reports the height back but still renders blank after ~6M px
11311 var testUpTo = navigator.userAgent.toLowerCase().match(/firefox/) ? 6000000 : 1000000000;
11312 var div = document.createElement('div');
11313 document.body.appendChild(div);
11314 while (true) {
11315 var test = res * 2;
11316 div.style.height = test + 'px';
11317 if (test > testUpTo || div.clientHeight !== test) {
11318 break;
11319 }
11320 else {
11321 res = test;
11322 }
11323 }
11324 document.body.removeChild(div);
11325 return res;
11326}
11327function getScrollbarWidth() {
11328 if (browserScrollbarWidth == null) {
11329 initScrollbarWidthAndVisibility();
11330 }
11331 return browserScrollbarWidth;
11332}
11333function initScrollbarWidthAndVisibility() {
11334 var body = document.body;
11335 var div = document.createElement('div');
11336 div.style.width = div.style.height = '100px';
11337 div.style.opacity = '0';
11338 div.style.overflow = 'scroll';
11339 div.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps
11340 div.style.position = 'absolute';
11341 body.appendChild(div);
11342 var width = div.offsetWidth - div.clientWidth;
11343 // if width is 0 and client width is 0, means the DOM isn't ready
11344 if (width === 0 && div.clientWidth === 0) {
11345 width = null;
11346 }
11347 // remove div
11348 if (div.parentNode) {
11349 div.parentNode.removeChild(div);
11350 }
11351 if (width != null) {
11352 browserScrollbarWidth = width;
11353 invisibleScrollbar = width === 0;
11354 }
11355}
11356function isInvisibleScrollbar() {
11357 if (invisibleScrollbar == null) {
11358 initScrollbarWidthAndVisibility();
11359 }
11360 return invisibleScrollbar;
11361}
11362/** @deprecated */
11363function hasOverflowScrolling() {
11364 var e_1, _a;
11365 var prefixes = ['webkit', 'moz', 'o', 'ms'];
11366 var div = document.createElement('div');
11367 var body = document.getElementsByTagName('body')[0];
11368 var found = false;
11369 var p;
11370 body.appendChild(div);
11371 div.setAttribute('style', prefixes.map(function (prefix) { return "-" + prefix + "-overflow-scrolling: touch"; }).concat('overflow-scrolling: touch').join(';'));
11372 var computedStyle = window.getComputedStyle(div);
11373 if (computedStyle.overflowScrolling === 'touch') {
11374 found = true;
11375 }
11376 if (!found) {
11377 try {
11378 for (var prefixes_1 = __values(prefixes), prefixes_1_1 = prefixes_1.next(); !prefixes_1_1.done; prefixes_1_1 = prefixes_1.next()) {
11379 p = prefixes_1_1.value;
11380 if (computedStyle[p + "OverflowScrolling"] === 'touch') {
11381 found = true;
11382 break;
11383 }
11384 }
11385 }
11386 catch (e_1_1) { e_1 = { error: e_1_1 }; }
11387 finally {
11388 try {
11389 if (prefixes_1_1 && !prefixes_1_1.done && (_a = prefixes_1.return)) _a.call(prefixes_1);
11390 }
11391 finally { if (e_1) throw e_1.error; }
11392 }
11393 }
11394 if (div.parentNode) {
11395 div.parentNode.removeChild(div);
11396 }
11397 return found;
11398}
11399/**
11400 * Gets the document body width
11401 * from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code
11402 * @returns {number}
11403 */
11404function getBodyWidth() {
11405 if (document.body) {
11406 return document.body.clientWidth;
11407 }
11408 if (window.innerHeight) {
11409 return window.innerWidth;
11410 }
11411 if (document.documentElement && document.documentElement.clientWidth) {
11412 return document.documentElement.clientWidth;
11413 }
11414 return -1;
11415}
11416/**
11417 * Gets the body height
11418 * from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code
11419 * @returns {number}
11420 */
11421function getBodyHeight() {
11422 if (document.body) {
11423 return document.body.clientHeight;
11424 }
11425 if (window.innerHeight) {
11426 return window.innerHeight;
11427 }
11428 if (document.documentElement && document.documentElement.clientHeight) {
11429 return document.documentElement.clientHeight;
11430 }
11431 return -1;
11432}
11433
11434
11435
11436
11437/***/ }),
11438/* 44 */
11439/***/ (function(module, __webpack_exports__, __webpack_require__) {
11440
11441"use strict";
11442__webpack_require__.r(__webpack_exports__);
11443/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaRole", function() { return setAriaRole; });
11444/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAriaSortState", function() { return getAriaSortState; });
11445/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAriaLevel", function() { return getAriaLevel; });
11446/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAriaPosInSet", function() { return getAriaPosInSet; });
11447/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAriaDescribedBy", function() { return getAriaDescribedBy; });
11448/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaLabel", function() { return setAriaLabel; });
11449/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaLabelledBy", function() { return setAriaLabelledBy; });
11450/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaDescription", function() { return setAriaDescription; });
11451/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaDescribedBy", function() { return setAriaDescribedBy; });
11452/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaLevel", function() { return setAriaLevel; });
11453/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaDisabled", function() { return setAriaDisabled; });
11454/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaExpanded", function() { return setAriaExpanded; });
11455/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAriaExpanded", function() { return removeAriaExpanded; });
11456/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaSetSize", function() { return setAriaSetSize; });
11457/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaPosInSet", function() { return setAriaPosInSet; });
11458/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaMultiSelectable", function() { return setAriaMultiSelectable; });
11459/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaRowCount", function() { return setAriaRowCount; });
11460/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaRowIndex", function() { return setAriaRowIndex; });
11461/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaColCount", function() { return setAriaColCount; });
11462/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaColIndex", function() { return setAriaColIndex; });
11463/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaColSpan", function() { return setAriaColSpan; });
11464/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaSort", function() { return setAriaSort; });
11465/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAriaSort", function() { return removeAriaSort; });
11466/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaSelected", function() { return setAriaSelected; });
11467/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaChecked", function() { return setAriaChecked; });
11468/**
11469 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11470 * @version v27.3.0
11471 * @link https://www.ag-grid.com/
11472 * @license MIT
11473 */
11474// ARIA HELPER FUNCTIONS
11475function setAriaAttribute(element, attribute, value) {
11476 element.setAttribute(ariaAttributeName(attribute), value.toString());
11477}
11478function removeAriaAttribute(element, attribute) {
11479 element.removeAttribute(ariaAttributeName(attribute));
11480}
11481function ariaAttributeName(attribute) {
11482 return "aria-" + attribute;
11483}
11484function setAriaRole(element, role) {
11485 if (role) {
11486 element.setAttribute('role', role);
11487 }
11488 else {
11489 element.removeAttribute('role');
11490 }
11491}
11492function getAriaSortState(column) {
11493 var sort;
11494 if (column.isSortAscending()) {
11495 sort = 'ascending';
11496 }
11497 else if (column.isSortDescending()) {
11498 sort = 'descending';
11499 }
11500 else {
11501 sort = 'none';
11502 }
11503 return sort;
11504}
11505// ARIA ATTRIBUTE GETTERS
11506function getAriaLevel(element) {
11507 return parseInt(element.getAttribute('aria-level'), 10);
11508}
11509function getAriaPosInSet(element) {
11510 return parseInt(element.getAttribute('aria-posinset'), 10);
11511}
11512function getAriaDescribedBy(element) {
11513 return element.getAttribute('aria-describedby') || '';
11514}
11515// ARIA ATTRIBUTE SETTERS
11516function setAriaLabel(element, label) {
11517 var key = 'label';
11518 if (label) {
11519 setAriaAttribute(element, key, label);
11520 }
11521 else {
11522 removeAriaAttribute(element, key);
11523 }
11524}
11525function setAriaLabelledBy(element, labelledBy) {
11526 var key = 'labelledby';
11527 if (labelledBy) {
11528 setAriaAttribute(element, key, labelledBy);
11529 }
11530 else {
11531 removeAriaAttribute(element, key);
11532 }
11533}
11534function setAriaDescription(element, description) {
11535 var key = 'description';
11536 if (description) {
11537 setAriaAttribute(element, key, description);
11538 }
11539 else {
11540 removeAriaAttribute(element, key);
11541 }
11542}
11543function setAriaDescribedBy(element, describedby) {
11544 var key = 'describedby';
11545 if (describedby) {
11546 setAriaAttribute(element, key, describedby);
11547 }
11548 else {
11549 removeAriaAttribute(element, key);
11550 }
11551}
11552function setAriaLevel(element, level) {
11553 setAriaAttribute(element, 'level', level);
11554}
11555function setAriaDisabled(element, disabled) {
11556 setAriaAttribute(element, 'disabled', disabled);
11557}
11558function setAriaExpanded(element, expanded) {
11559 setAriaAttribute(element, 'expanded', expanded);
11560}
11561function removeAriaExpanded(element) {
11562 removeAriaAttribute(element, 'expanded');
11563}
11564function setAriaSetSize(element, setsize) {
11565 setAriaAttribute(element, 'setsize', setsize);
11566}
11567function setAriaPosInSet(element, position) {
11568 setAriaAttribute(element, 'posinset', position);
11569}
11570function setAriaMultiSelectable(element, multiSelectable) {
11571 setAriaAttribute(element, 'multiselectable', multiSelectable);
11572}
11573function setAriaRowCount(element, rowCount) {
11574 setAriaAttribute(element, 'rowcount', rowCount);
11575}
11576function setAriaRowIndex(element, rowIndex) {
11577 setAriaAttribute(element, 'rowindex', rowIndex);
11578}
11579function setAriaColCount(element, colCount) {
11580 setAriaAttribute(element, 'colcount', colCount);
11581}
11582function setAriaColIndex(element, colIndex) {
11583 setAriaAttribute(element, 'colindex', colIndex);
11584}
11585function setAriaColSpan(element, colSpan) {
11586 setAriaAttribute(element, 'colspan', colSpan);
11587}
11588function setAriaSort(element, sort) {
11589 setAriaAttribute(element, 'sort', sort);
11590}
11591function removeAriaSort(element) {
11592 removeAriaAttribute(element, 'sort');
11593}
11594function setAriaSelected(element, selected) {
11595 var attributeName = 'selected';
11596 if (selected) {
11597 setAriaAttribute(element, attributeName, selected);
11598 }
11599 else {
11600 removeAriaAttribute(element, attributeName);
11601 }
11602}
11603function setAriaChecked(element, checked) {
11604 setAriaAttribute(element, 'checked', checked === undefined ? 'mixed' : checked);
11605}
11606
11607
11608
11609
11610/***/ }),
11611/* 45 */
11612/***/ (function(module, __webpack_exports__, __webpack_require__) {
11613
11614"use strict";
11615__webpack_require__.r(__webpack_exports__);
11616/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serialiseDate", function() { return serialiseDate; });
11617/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDateTimeFromString", function() { return parseDateTimeFromString; });
11618/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
11619/**
11620 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11621 * @version v27.3.0
11622 * @link https://www.ag-grid.com/
11623 * @license MIT
11624 */
11625var __read = (undefined && undefined.__read) || function (o, n) {
11626 var m = typeof Symbol === "function" && o[Symbol.iterator];
11627 if (!m) return o;
11628 var i = m.call(o), r, ar = [], e;
11629 try {
11630 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
11631 }
11632 catch (error) { e = { error: error }; }
11633 finally {
11634 try {
11635 if (r && !r.done && (m = i["return"])) m.call(i);
11636 }
11637 finally { if (e) throw e.error; }
11638 }
11639 return ar;
11640};
11641
11642/**
11643 * Serialises a Date to a string of format `yyyy-MM-dd HH:mm:ss`.
11644 * An alternative separator can be provided to be used instead of hyphens.
11645 * @param date The date to serialise
11646 * @param includeTime Whether to include the time in the serialised string
11647 * @param separator The separator to use between date parts
11648 */
11649function serialiseDate(date, includeTime, separator) {
11650 if (includeTime === void 0) { includeTime = true; }
11651 if (separator === void 0) { separator = '-'; }
11652 if (!date) {
11653 return null;
11654 }
11655 var serialised = [date.getFullYear(), date.getMonth() + 1, date.getDate()].map(function (part) { return Object(_number__WEBPACK_IMPORTED_MODULE_0__["padStartWidthZeros"])(part, 2); }).join(separator);
11656 if (includeTime) {
11657 serialised += ' ' + [date.getHours(), date.getMinutes(), date.getSeconds()].map(function (part) { return Object(_number__WEBPACK_IMPORTED_MODULE_0__["padStartWidthZeros"])(part, 2); }).join(':');
11658 }
11659 return serialised;
11660}
11661/**
11662 * Parses a date and time from a string in the format `yyyy-MM-dd HH:mm:ss`
11663 */
11664function parseDateTimeFromString(value) {
11665 if (!value) {
11666 return null;
11667 }
11668 var _a = __read(value.split(' '), 2), dateStr = _a[0], timeStr = _a[1];
11669 if (!dateStr) {
11670 return null;
11671 }
11672 var fields = dateStr.split('-').map(function (f) { return parseInt(f, 10); });
11673 if (fields.filter(function (f) { return !isNaN(f); }).length !== 3) {
11674 return null;
11675 }
11676 var _b = __read(fields, 3), year = _b[0], month = _b[1], day = _b[2];
11677 var date = new Date(year, month - 1, day);
11678 if (date.getFullYear() !== year ||
11679 date.getMonth() !== month - 1 ||
11680 date.getDate() !== day) {
11681 // date was not parsed as expected so must have been invalid
11682 return null;
11683 }
11684 if (!timeStr || timeStr === '00:00:00') {
11685 return date;
11686 }
11687 var _c = __read(timeStr.split(':').map(function (part) { return parseInt(part, 10); }), 3), hours = _c[0], minutes = _c[1], seconds = _c[2];
11688 if (hours >= 0 && hours < 24) {
11689 date.setHours(hours);
11690 }
11691 if (minutes >= 0 && minutes < 60) {
11692 date.setMinutes(minutes);
11693 }
11694 if (seconds >= 0 && seconds < 60) {
11695 date.setSeconds(seconds);
11696 }
11697 return date;
11698}
11699
11700
11701
11702
11703/***/ }),
11704/* 46 */
11705/***/ (function(module, __webpack_exports__, __webpack_require__) {
11706
11707"use strict";
11708__webpack_require__.r(__webpack_exports__);
11709/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "padStartWidthZeros", function() { return padStartWidthZeros; });
11710/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createArrayOfNumbers", function() { return createArrayOfNumbers; });
11711/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; });
11712/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanNumber", function() { return cleanNumber; });
11713/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decToHex", function() { return decToHex; });
11714/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatNumberTwoDecimalPlacesAndCommas", function() { return formatNumberTwoDecimalPlacesAndCommas; });
11715/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatNumberCommas", function() { return formatNumberCommas; });
11716/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return sum; });
11717/**
11718 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11719 * @version v27.3.0
11720 * @link https://www.ag-grid.com/
11721 * @license MIT
11722 */
11723function padStartWidthZeros(value, totalStringSize) {
11724 return value.toString().padStart(totalStringSize, '0');
11725}
11726function createArrayOfNumbers(first, last) {
11727 var result = [];
11728 for (var i = first; i <= last; i++) {
11729 result.push(i);
11730 }
11731 return result;
11732}
11733/**
11734 * Check if a value is numeric
11735 * from http://stackoverflow.com/questions/9716468/is-there-any-function-like-isnumeric-in-javascript-to-validate-numbers
11736 * @param {any} value
11737 * @return {boolean}
11738 */
11739function isNumeric(value) {
11740 return value !== '' && !isNaN(parseFloat(value)) && isFinite(value);
11741}
11742function cleanNumber(value) {
11743 if (typeof value === 'string') {
11744 value = parseInt(value, 10);
11745 }
11746 if (typeof value === 'number') {
11747 return Math.floor(value);
11748 }
11749 return null;
11750}
11751function decToHex(number, bytes) {
11752 var hex = '';
11753 for (var i = 0; i < bytes; i++) {
11754 hex += String.fromCharCode(number & 0xff);
11755 number >>>= 8;
11756 }
11757 return hex;
11758}
11759function formatNumberTwoDecimalPlacesAndCommas(value, thousandSeparator, decimalSeparator) {
11760 if (typeof value !== 'number') {
11761 return '';
11762 }
11763 return formatNumberCommas(Math.round(value * 100) / 100, thousandSeparator, decimalSeparator);
11764}
11765/**
11766 * the native method number.toLocaleString(undefined, {minimumFractionDigits: 0})
11767 * puts in decimal places in IE, so we use this method instead
11768 * from: http://blog.tompawlak.org/number-currency-formatting-javascript
11769 * @param {number} value
11770 * @returns {string}
11771 */
11772function formatNumberCommas(value, thousandSeparator, decimalSeparator) {
11773 if (typeof value !== 'number') {
11774 return '';
11775 }
11776 return value.toString().replace('.', decimalSeparator).replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1" + thousandSeparator);
11777}
11778function sum(values) {
11779 return values == null ? null : values.reduce(function (total, value) { return total + value; }, 0);
11780}
11781
11782
11783
11784
11785/***/ }),
11786/* 47 */
11787/***/ (function(module, __webpack_exports__, __webpack_require__) {
11788
11789"use strict";
11790__webpack_require__.r(__webpack_exports__);
11791/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fuzzyCheckStrings", function() { return fuzzyCheckStrings; });
11792/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fuzzySuggestions", function() { return fuzzySuggestions; });
11793/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get_bigrams", function() { return get_bigrams; });
11794/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "string_distances", function() { return string_distances; });
11795/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "string_weighted_distances", function() { return string_weighted_distances; });
11796/**
11797 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11798 * @version v27.3.0
11799 * @link https://www.ag-grid.com/
11800 * @license MIT
11801 */
11802function fuzzyCheckStrings(inputValues, validValues, allSuggestions) {
11803 var fuzzyMatches = {};
11804 var invalidInputs = inputValues.filter(function (inputValue) {
11805 return !validValues.some(function (validValue) { return validValue === inputValue; });
11806 });
11807 if (invalidInputs.length > 0) {
11808 invalidInputs.forEach(function (invalidInput) {
11809 return fuzzyMatches[invalidInput] = fuzzySuggestions(invalidInput, allSuggestions);
11810 });
11811 }
11812 return fuzzyMatches;
11813}
11814/**
11815 *
11816 * @param {String} inputValue The value to be compared against a list of strings
11817 * @param allSuggestions The list of strings to be compared against
11818 * @param hideIrrelevant By default, fuzzy suggestions will just sort the allSuggestions list, set this to true
11819 * to filter out the irrelevant values
11820 * @param weighted Set this to true, to make letters matched in the order they were typed have priority in the results.
11821 */
11822function fuzzySuggestions(inputValue, allSuggestions, hideIrrelevant, weighted) {
11823 var search = weighted ? string_weighted_distances : string_distances;
11824 var thisSuggestions = allSuggestions.map(function (text) { return ({
11825 value: text,
11826 relevance: search(inputValue.toLowerCase(), text.toLocaleLowerCase())
11827 }); });
11828 thisSuggestions.sort(function (a, b) { return b.relevance - a.relevance; });
11829 if (hideIrrelevant) {
11830 thisSuggestions = thisSuggestions.filter(function (suggestion) { return suggestion.relevance !== 0; });
11831 }
11832 return thisSuggestions.map(function (suggestion) { return suggestion.value; });
11833}
11834/**
11835 * Algorithm to do fuzzy search
11836 * from https://stackoverflow.com/questions/23305000/javascript-fuzzy-search-that-makes-sense
11837 * @param {string} from
11838 * @return {[]}
11839 */
11840function get_bigrams(from) {
11841 var s = from.toLowerCase();
11842 var v = new Array(s.length - 1);
11843 var i;
11844 var j;
11845 var ref;
11846 for (i = j = 0, ref = v.length; j <= ref; i = j += 1) {
11847 v[i] = s.slice(i, i + 2);
11848 }
11849 return v;
11850}
11851function string_distances(str1, str2) {
11852 if (str1.length === 0 && str2.length === 0) {
11853 return 0;
11854 }
11855 var pairs1 = get_bigrams(str1);
11856 var pairs2 = get_bigrams(str2);
11857 var union = pairs1.length + pairs2.length;
11858 var hit_count = 0;
11859 var j;
11860 var len;
11861 for (j = 0, len = pairs1.length; j < len; j++) {
11862 var x = pairs1[j];
11863 var k = void 0;
11864 var len1 = void 0;
11865 for (k = 0, len1 = pairs2.length; k < len1; k++) {
11866 var y = pairs2[k];
11867 if (x === y) {
11868 hit_count++;
11869 }
11870 }
11871 }
11872 return hit_count > 0 ? (2 * hit_count) / union : 0;
11873}
11874function string_weighted_distances(str1, str2) {
11875 var a = str1.replace(/\s/g, '');
11876 var b = str2.replace(/\s/g, '');
11877 var weight = 0;
11878 var lastIndex = 0;
11879 for (var i = 0; i < a.length; i++) {
11880 var idx = b.indexOf(a[i], lastIndex);
11881 if (idx === -1) {
11882 continue;
11883 }
11884 lastIndex = idx;
11885 weight += (100 - (lastIndex * 100 / 10000) * 100);
11886 }
11887 return weight;
11888}
11889
11890
11891
11892
11893/***/ }),
11894/* 48 */
11895/***/ (function(module, __webpack_exports__, __webpack_require__) {
11896
11897"use strict";
11898__webpack_require__.r(__webpack_exports__);
11899/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iconNameClassMap", function() { return iconNameClassMap; });
11900/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createIcon", function() { return createIcon; });
11901/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createIconNoSpan", function() { return createIconNoSpan; });
11902/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42);
11903/* harmony import */ var _aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
11904/**
11905 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11906 * @version v27.3.0
11907 * @link https://www.ag-grid.com/
11908 * @license MIT
11909 */
11910
11911
11912//
11913// IMPORTANT NOTE!
11914//
11915// If you change the list below, copy/paste the new content into the docs page javascript-grid-icons
11916//
11917var iconNameClassMap = {
11918 // header column group shown when expanded (click to contract)
11919 columnGroupOpened: 'expanded',
11920 // header column group shown when contracted (click to expand)
11921 columnGroupClosed: 'contracted',
11922 // tool panel column group contracted (click to expand)
11923 columnSelectClosed: 'tree-closed',
11924 // tool panel column group expanded (click to contract)
11925 columnSelectOpen: 'tree-open',
11926 // column tool panel header expand/collapse all button, shown when some children are expanded and
11927 // others are collapsed
11928 columnSelectIndeterminate: 'tree-indeterminate',
11929 // shown on ghost icon while dragging column to the side of the grid to pin
11930 columnMovePin: 'pin',
11931 // shown on ghost icon while dragging over part of the page that is not a drop zone
11932 columnMoveHide: 'eye-slash',
11933 // shown on ghost icon while dragging columns to reorder
11934 columnMoveMove: 'arrows',
11935 // animating icon shown when dragging a column to the right of the grid causes horizontal scrolling
11936 columnMoveLeft: 'left',
11937 // animating icon shown when dragging a column to the left of the grid causes horizontal scrolling
11938 columnMoveRight: 'right',
11939 // shown on ghost icon while dragging over Row Groups drop zone
11940 columnMoveGroup: 'group',
11941 // shown on ghost icon while dragging over Values drop zone
11942 columnMoveValue: 'aggregation',
11943 // shown on ghost icon while dragging over pivot drop zone
11944 columnMovePivot: 'pivot',
11945 // shown on ghost icon while dragging over drop zone that doesn't support it, e.g.
11946 // string column over aggregation drop zone
11947 dropNotAllowed: 'not-allowed',
11948 // shown on row group when contracted (click to expand)
11949 groupContracted: 'tree-closed',
11950 // shown on row group when expanded (click to contract)
11951 groupExpanded: 'tree-open',
11952 // context menu chart item
11953 chart: 'chart',
11954 // chart window title bar
11955 close: 'cross',
11956 // X (remove) on column 'pill' after adding it to a drop zone list
11957 cancel: 'cancel',
11958 // indicates the currently active pin state in the "Pin column" sub-menu of the column menu
11959 check: 'tick',
11960 // "go to first" button in pagination controls
11961 first: 'first',
11962 // "go to previous" button in pagination controls
11963 previous: 'previous',
11964 // "go to next" button in pagination controls
11965 next: 'next',
11966 // "go to last" button in pagination controls
11967 last: 'last',
11968 // shown on top right of chart when chart is linked to range data (click to unlink)
11969 linked: 'linked',
11970 // shown on top right of chart when chart is not linked to range data (click to link)
11971 unlinked: 'unlinked',
11972 // "Choose colour" button on chart settings tab
11973 colorPicker: 'color-picker',
11974 // rotating spinner shown by the loading cell renderer
11975 groupLoading: 'loading',
11976 // button to launch enterprise column menu
11977 menu: 'menu',
11978 // filter tool panel tab
11979 filter: 'filter',
11980 // column tool panel tab
11981 columns: 'columns',
11982 // button in chart regular size window title bar (click to maximise)
11983 maximize: 'maximize',
11984 // button in chart maximised window title bar (click to make regular size)
11985 minimize: 'minimize',
11986 // "Pin column" item in column header menu
11987 menuPin: 'pin',
11988 // "Value aggregation" column menu item (shown on numeric columns when grouping is active)"
11989 menuValue: 'aggregation',
11990 // "Group by {column-name}" item in column header menu
11991 menuAddRowGroup: 'group',
11992 // "Un-Group by {column-name}" item in column header menu
11993 menuRemoveRowGroup: 'group',
11994 // context menu copy item
11995 clipboardCopy: 'copy',
11996 // context menu paste item
11997 clipboardPaste: 'paste',
11998 // identifies the pivot drop zone
11999 pivotPanel: 'pivot',
12000 // "Row groups" drop zone in column tool panel
12001 rowGroupPanel: 'group',
12002 // columns tool panel Values drop zone
12003 valuePanel: 'aggregation',
12004 // drag handle used to pick up draggable columns
12005 columnDrag: 'grip',
12006 // drag handle used to pick up draggable rows
12007 rowDrag: 'grip',
12008 // context menu export item
12009 save: 'save',
12010 // csv export
12011 csvExport: 'csv',
12012 // excel export,
12013 excelExport: 'excel',
12014 // icon on dropdown editors
12015 smallDown: 'small-down',
12016 // version of small-right used in RTL mode
12017 smallLeft: 'small-left',
12018 // separater between column 'pills' when you add multiple columns to the header drop zone
12019 smallRight: 'small-right',
12020 smallUp: 'small-up',
12021 // show on column header when column is sorted ascending
12022 sortAscending: 'asc',
12023 // show on column header when column is sorted descending
12024 sortDescending: 'desc',
12025 // show on column header when column has no sort, only when enabled with gridOptions.unSortIcon=true
12026 sortUnSort: 'none'
12027};
12028/**
12029 * If icon provided, use this (either a string, or a function callback).
12030 * if not, then use the default icon from the theme
12031 * @param {string} iconName
12032 * @param {GridOptionsWrapper} gridOptionsWrapper
12033 * @param {Column | null} [column]
12034 * @returns {HTMLElement}
12035 */
12036function createIcon(iconName, gridOptionsWrapper, column) {
12037 var iconContents = createIconNoSpan(iconName, gridOptionsWrapper, column);
12038 if (iconContents && iconContents.className.indexOf('ag-icon') > -1) {
12039 return iconContents;
12040 }
12041 var eResult = document.createElement('span');
12042 eResult.appendChild(iconContents);
12043 return eResult;
12044}
12045function createIconNoSpan(iconName, gridOptionsWrapper, column, forceCreate) {
12046 var userProvidedIcon = null;
12047 // check col for icon first
12048 var icons = column && column.getColDef().icons;
12049 if (icons) {
12050 userProvidedIcon = icons[iconName];
12051 }
12052 // if not in col, try grid options
12053 if (gridOptionsWrapper && !userProvidedIcon) {
12054 var optionsIcons = gridOptionsWrapper.getIcons();
12055 if (optionsIcons) {
12056 userProvidedIcon = optionsIcons[iconName];
12057 }
12058 }
12059 // now if user provided, use it
12060 if (userProvidedIcon) {
12061 var rendererResult = void 0;
12062 if (typeof userProvidedIcon === 'function') {
12063 rendererResult = userProvidedIcon();
12064 }
12065 else if (typeof userProvidedIcon === 'string') {
12066 rendererResult = userProvidedIcon;
12067 }
12068 else {
12069 throw new Error('icon from grid options needs to be a string or a function');
12070 }
12071 if (typeof rendererResult === 'string') {
12072 return Object(_dom__WEBPACK_IMPORTED_MODULE_0__["loadTemplate"])(rendererResult);
12073 }
12074 if (Object(_dom__WEBPACK_IMPORTED_MODULE_0__["isNodeOrElement"])(rendererResult)) {
12075 return rendererResult;
12076 }
12077 console.warn('AG Grid: iconRenderer should return back a string or a dom object');
12078 }
12079 else {
12080 var span = document.createElement('span');
12081 var cssClass = iconNameClassMap[iconName];
12082 if (!cssClass) {
12083 if (!forceCreate) {
12084 console.warn("AG Grid: Did not find icon " + iconName);
12085 cssClass = '';
12086 }
12087 else {
12088 cssClass = iconName;
12089 }
12090 }
12091 span.setAttribute('class', "ag-icon ag-icon-" + cssClass);
12092 span.setAttribute('unselectable', 'on');
12093 Object(_aria__WEBPACK_IMPORTED_MODULE_1__["setAriaRole"])(span, 'presentation');
12094 return span;
12095 }
12096}
12097
12098
12099
12100
12101/***/ }),
12102/* 49 */
12103/***/ (function(module, __webpack_exports__, __webpack_require__) {
12104
12105"use strict";
12106__webpack_require__.r(__webpack_exports__);
12107/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEventFromPrintableCharacter", function() { return isEventFromPrintableCharacter; });
12108/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUserSuppressingKeyboardEvent", function() { return isUserSuppressingKeyboardEvent; });
12109/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUserSuppressingHeaderKeyboardEvent", function() { return isUserSuppressingHeaderKeyboardEvent; });
12110/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43);
12111/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
12112/**
12113 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12114 * @version v27.3.0
12115 * @link https://www.ag-grid.com/
12116 * @license MIT
12117 */
12118
12119
12120var NUMPAD_DEL_NUMLOCK_ON_KEY = 'Del';
12121var NUMPAD_DEL_NUMLOCK_ON_CHARCODE = 46;
12122function isEventFromPrintableCharacter(event) {
12123 // no allowed printable chars have alt or ctrl key combinations
12124 if (event.altKey || event.ctrlKey || event.metaKey) {
12125 return false;
12126 }
12127 // if key is length 1, eg if it is 'a' for the a key, or '2' for the '2' key.
12128 // non-printable characters have names, eg 'Enter' or 'Backspace'.
12129 var printableCharacter = event.key.length === 1;
12130 // IE11 & Edge treat the numpad del key differently - with numlock on we get "Del" for key,
12131 // so this addition checks if its IE11/Edge and handles that specific case the same was as all other browsers
12132 var numpadDelWithNumlockOnForEdgeOrIe = isNumpadDelWithNumLockOnForEdge(event);
12133 return printableCharacter || numpadDelWithNumlockOnForEdgeOrIe;
12134}
12135/**
12136 * Allows user to tell the grid to skip specific keyboard events
12137 * @param {GridOptionsWrapper} gridOptionsWrapper
12138 * @param {KeyboardEvent} keyboardEvent
12139 * @param {RowNode} rowNode
12140 * @param {Column} column
12141 * @param {boolean} editing
12142 * @returns {boolean}
12143 */
12144function isUserSuppressingKeyboardEvent(gridOptionsWrapper, keyboardEvent, rowNode, column, editing) {
12145 var gridOptionsFunc = gridOptionsWrapper.getSuppressKeyboardEventFunc();
12146 var colDefFunc = column ? column.getColDef().suppressKeyboardEvent : undefined;
12147 // if no callbacks provided by user, then do nothing
12148 if (!gridOptionsFunc && !colDefFunc) {
12149 return false;
12150 }
12151 var params = {
12152 event: keyboardEvent,
12153 editing: editing,
12154 column: column,
12155 api: gridOptionsWrapper.getApi(),
12156 node: rowNode,
12157 data: rowNode.data,
12158 colDef: column.getColDef(),
12159 context: gridOptionsWrapper.getContext(),
12160 columnApi: gridOptionsWrapper.getColumnApi()
12161 };
12162 // colDef get first preference on suppressing events
12163 if (colDefFunc) {
12164 var colDefFuncResult = colDefFunc(params);
12165 // if colDef func suppressed, then return now, no need to call gridOption func
12166 if (colDefFuncResult) {
12167 return true;
12168 }
12169 }
12170 if (gridOptionsFunc) {
12171 // if gridOption func, return the result
12172 return gridOptionsFunc(params);
12173 }
12174 // otherwise return false, don't suppress, as colDef didn't suppress and no func on gridOptions
12175 return false;
12176}
12177function isUserSuppressingHeaderKeyboardEvent(gridOptionsWrapper, keyboardEvent, headerRowIndex, column) {
12178 var colDef = column.getDefinition();
12179 var colDefFunc = colDef && colDef.suppressHeaderKeyboardEvent;
12180 if (!Object(_generic__WEBPACK_IMPORTED_MODULE_1__["exists"])(colDefFunc)) {
12181 return false;
12182 }
12183 var params = {
12184 api: gridOptionsWrapper.getApi(),
12185 columnApi: gridOptionsWrapper.getColumnApi(),
12186 context: gridOptionsWrapper.getContext(),
12187 colDef: colDef,
12188 column: column,
12189 headerRowIndex: headerRowIndex,
12190 event: keyboardEvent
12191 };
12192 return !!colDefFunc(params);
12193}
12194function isNumpadDelWithNumLockOnForEdge(event) {
12195 return (Object(_browser__WEBPACK_IMPORTED_MODULE_0__["isBrowserEdge"])()) &&
12196 event.key === NUMPAD_DEL_NUMLOCK_ON_KEY &&
12197 event.charCode === NUMPAD_DEL_NUMLOCK_ON_CHARCODE;
12198}
12199
12200
12201
12202
12203/***/ }),
12204/* 50 */
12205/***/ (function(module, __webpack_exports__, __webpack_require__) {
12206
12207"use strict";
12208__webpack_require__.r(__webpack_exports__);
12209/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areEventsNear", function() { return areEventsNear; });
12210/**
12211 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12212 * @version v27.3.0
12213 * @link https://www.ag-grid.com/
12214 * @license MIT
12215 */
12216/**
12217 * `True` if the event is close to the original event by X pixels either vertically or horizontally.
12218 * we only start dragging after X pixels so this allows us to know if we should start dragging yet.
12219 * @param {MouseEvent | TouchEvent} e1
12220 * @param {MouseEvent | TouchEvent} e2
12221 * @param {number} pixelCount
12222 * @returns {boolean}
12223 */
12224function areEventsNear(e1, e2, pixelCount) {
12225 // by default, we wait 4 pixels before starting the drag
12226 if (pixelCount === 0) {
12227 return false;
12228 }
12229 var diffX = Math.abs(e1.clientX - e2.clientX);
12230 var diffY = Math.abs(e1.clientY - e2.clientY);
12231 return Math.max(diffX, diffY) <= pixelCount;
12232}
12233
12234
12235
12236
12237/***/ }),
12238/* 51 */
12239/***/ (function(module, __webpack_exports__, __webpack_require__) {
12240
12241"use strict";
12242__webpack_require__.r(__webpack_exports__);
12243/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortRowNodesByOrder", function() { return sortRowNodesByOrder; });
12244/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "traverseNodesWithKey", function() { return traverseNodesWithKey; });
12245/**
12246 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12247 * @version v27.3.0
12248 * @link https://www.ag-grid.com/
12249 * @license MIT
12250 */
12251/**
12252 * Gets called by: a) ClientSideNodeManager and b) GroupStage to do sorting.
12253 * when in ClientSideNodeManager we always have indexes (as this sorts the items the
12254 * user provided) but when in GroupStage, the nodes can contain filler nodes that
12255 * don't have order id's
12256 * @param {RowNode[]} rowNodes
12257 * @param {Object} rowNodeOrder
12258 */
12259function sortRowNodesByOrder(rowNodes, rowNodeOrder) {
12260 if (!rowNodes) {
12261 return;
12262 }
12263 var comparator = function (nodeA, nodeB) {
12264 var positionA = rowNodeOrder[nodeA.id];
12265 var positionB = rowNodeOrder[nodeB.id];
12266 var aHasIndex = positionA !== undefined;
12267 var bHasIndex = positionB !== undefined;
12268 var bothNodesAreUserNodes = aHasIndex && bHasIndex;
12269 var bothNodesAreFillerNodes = !aHasIndex && !bHasIndex;
12270 if (bothNodesAreUserNodes) {
12271 // when comparing two nodes the user has provided, they always
12272 // have indexes
12273 return positionA - positionB;
12274 }
12275 if (bothNodesAreFillerNodes) {
12276 // when comparing two filler nodes, we have no index to compare them
12277 // against, however we want this sorting to be deterministic, so that
12278 // the rows don't jump around as the user does delta updates. so we
12279 // want the same sort result. so we use the __objectId - which doesn't make sense
12280 // from a sorting point of view, but does give consistent behaviour between
12281 // calls. otherwise groups jump around as delta updates are done.
12282 // note: previously here we used nodeId, however this gave a strange order
12283 // as string ordering of numbers is wrong, so using id based on creation order
12284 // as least gives better looking order.
12285 return nodeA.__objectId - nodeB.__objectId;
12286 }
12287 if (aHasIndex) {
12288 return 1;
12289 }
12290 return -1;
12291 };
12292 // check if the list first needs sorting
12293 var rowNodeA;
12294 var rowNodeB;
12295 var atLeastOneOutOfOrder = false;
12296 for (var i = 0; i < rowNodes.length - 1; i++) {
12297 rowNodeA = rowNodes[i];
12298 rowNodeB = rowNodes[i + 1];
12299 if (comparator(rowNodeA, rowNodeB) > 0) {
12300 atLeastOneOutOfOrder = true;
12301 break;
12302 }
12303 }
12304 if (atLeastOneOutOfOrder) {
12305 rowNodes.sort(comparator);
12306 }
12307}
12308function traverseNodesWithKey(nodes, callback) {
12309 var keyParts = [];
12310 recursiveSearchNodes(nodes);
12311 function recursiveSearchNodes(currentNodes) {
12312 if (!currentNodes) {
12313 return;
12314 }
12315 currentNodes.forEach(function (node) {
12316 // also checking for children for tree data
12317 if (node.group || node.hasChildren()) {
12318 keyParts.push(node.key);
12319 var key = keyParts.join('|');
12320 callback(node, key);
12321 recursiveSearchNodes(node.childrenAfterGroup);
12322 keyParts.pop();
12323 }
12324 });
12325 }
12326}
12327
12328
12329
12330
12331/***/ }),
12332/* 52 */
12333/***/ (function(module, __webpack_exports__, __webpack_require__) {
12334
12335"use strict";
12336__webpack_require__.r(__webpack_exports__);
12337/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToSet", function() { return convertToSet; });
12338/**
12339 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12340 * @version v27.3.0
12341 * @link https://www.ag-grid.com/
12342 * @license MIT
12343 */
12344function convertToSet(list) {
12345 var set = new Set();
12346 list.forEach(function (x) { return set.add(x); });
12347 return set;
12348}
12349
12350
12351
12352
12353/***/ }),
12354/* 53 */
12355/***/ (function(module, __webpack_exports__, __webpack_require__) {
12356
12357"use strict";
12358__webpack_require__.r(__webpack_exports__);
12359/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberSequence", function() { return NumberSequence; });
12360/**
12361 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12362 * @version v27.3.0
12363 * @link https://www.ag-grid.com/
12364 * @license MIT
12365 */
12366var NumberSequence = /** @class */ (function () {
12367 function NumberSequence(initValue, step) {
12368 if (initValue === void 0) { initValue = 0; }
12369 if (step === void 0) { step = 1; }
12370 this.nextValue = initValue;
12371 this.step = step;
12372 }
12373 NumberSequence.prototype.next = function () {
12374 var valToReturn = this.nextValue;
12375 this.nextValue += this.step;
12376 return valToReturn;
12377 };
12378 NumberSequence.prototype.peek = function () {
12379 return this.nextValue;
12380 };
12381 NumberSequence.prototype.skip = function (count) {
12382 this.nextValue += count;
12383 };
12384 return NumberSequence;
12385}());
12386
12387
12388
12389
12390
12391/***/ }),
12392/* 54 */
12393/***/ (function(module, __webpack_exports__, __webpack_require__) {
12394
12395"use strict";
12396__webpack_require__.r(__webpack_exports__);
12397/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgPromiseStatus", function() { return AgPromiseStatus; });
12398/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgPromise", function() { return AgPromise; });
12399/**
12400 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12401 * @version v27.3.0
12402 * @link https://www.ag-grid.com/
12403 * @license MIT
12404 */
12405var AgPromiseStatus;
12406(function (AgPromiseStatus) {
12407 AgPromiseStatus[AgPromiseStatus["IN_PROGRESS"] = 0] = "IN_PROGRESS";
12408 AgPromiseStatus[AgPromiseStatus["RESOLVED"] = 1] = "RESOLVED";
12409})(AgPromiseStatus || (AgPromiseStatus = {}));
12410var AgPromise = /** @class */ (function () {
12411 function AgPromise(callback) {
12412 var _this = this;
12413 this.status = AgPromiseStatus.IN_PROGRESS;
12414 this.resolution = null;
12415 this.waiters = [];
12416 callback(function (value) { return _this.onDone(value); }, function (params) { return _this.onReject(params); });
12417 }
12418 AgPromise.all = function (promises) {
12419 return new AgPromise(function (resolve) {
12420 var remainingToResolve = promises.length;
12421 var combinedValues = new Array(remainingToResolve);
12422 promises.forEach(function (promise, index) {
12423 promise.then(function (value) {
12424 combinedValues[index] = value;
12425 remainingToResolve--;
12426 if (remainingToResolve === 0) {
12427 resolve(combinedValues);
12428 }
12429 });
12430 });
12431 });
12432 };
12433 AgPromise.resolve = function (value) {
12434 if (value === void 0) { value = null; }
12435 return new AgPromise(function (resolve) { return resolve(value); });
12436 };
12437 AgPromise.prototype.then = function (func) {
12438 var _this = this;
12439 return new AgPromise(function (resolve) {
12440 if (_this.status === AgPromiseStatus.RESOLVED) {
12441 resolve(func(_this.resolution));
12442 }
12443 else {
12444 _this.waiters.push(function (value) { return resolve(func(value)); });
12445 }
12446 });
12447 };
12448 AgPromise.prototype.resolveNow = function (ifNotResolvedValue, ifResolved) {
12449 return this.status === AgPromiseStatus.RESOLVED ? ifResolved(this.resolution) : ifNotResolvedValue;
12450 };
12451 AgPromise.prototype.onDone = function (value) {
12452 this.status = AgPromiseStatus.RESOLVED;
12453 this.resolution = value;
12454 this.waiters.forEach(function (waiter) { return waiter(value); });
12455 };
12456 AgPromise.prototype.onReject = function (params) {
12457 console.warn('TBI');
12458 };
12459 return AgPromise;
12460}());
12461
12462
12463
12464
12465
12466/***/ }),
12467/* 55 */
12468/***/ (function(module, __webpack_exports__, __webpack_require__) {
12469
12470"use strict";
12471__webpack_require__.r(__webpack_exports__);
12472/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return Timer; });
12473/**
12474 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12475 * @version v27.3.0
12476 * @link https://www.ag-grid.com/
12477 * @license MIT
12478 */
12479/**
12480 * A Util Class only used when debugging for printing time to console
12481 */
12482var Timer = /** @class */ (function () {
12483 function Timer() {
12484 this.timestamp = new Date().getTime();
12485 }
12486 Timer.prototype.print = function (msg) {
12487 var duration = (new Date().getTime()) - this.timestamp;
12488 console.info(msg + " = " + duration);
12489 this.timestamp = new Date().getTime();
12490 };
12491 return Timer;
12492}());
12493
12494
12495
12496
12497
12498/***/ }),
12499/* 56 */
12500/***/ (function(module, __webpack_exports__, __webpack_require__) {
12501
12502"use strict";
12503__webpack_require__.r(__webpack_exports__);
12504/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomTooltipFeature", function() { return CustomTooltipFeature; });
12505/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
12506/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
12507/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
12508/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43);
12509/**
12510 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12511 * @version v27.3.0
12512 * @link https://www.ag-grid.com/
12513 * @license MIT
12514 */
12515var __extends = (undefined && undefined.__extends) || (function () {
12516 var extendStatics = function (d, b) {
12517 extendStatics = Object.setPrototypeOf ||
12518 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
12519 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
12520 return extendStatics(d, b);
12521 };
12522 return function (d, b) {
12523 extendStatics(d, b);
12524 function __() { this.constructor = d; }
12525 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12526 };
12527})();
12528var __assign = (undefined && undefined.__assign) || function () {
12529 __assign = Object.assign || function(t) {
12530 for (var s, i = 1, n = arguments.length; i < n; i++) {
12531 s = arguments[i];
12532 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
12533 t[p] = s[p];
12534 }
12535 return t;
12536 };
12537 return __assign.apply(this, arguments);
12538};
12539var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
12540 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
12541 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
12542 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
12543 return c > 3 && r && Object.defineProperty(target, key, r), r;
12544};
12545
12546
12547
12548
12549var TooltipStates;
12550(function (TooltipStates) {
12551 TooltipStates[TooltipStates["NOTHING"] = 0] = "NOTHING";
12552 TooltipStates[TooltipStates["WAITING_TO_SHOW"] = 1] = "WAITING_TO_SHOW";
12553 TooltipStates[TooltipStates["SHOWING"] = 2] = "SHOWING";
12554})(TooltipStates || (TooltipStates = {}));
12555var CustomTooltipFeature = /** @class */ (function (_super) {
12556 __extends(CustomTooltipFeature, _super);
12557 function CustomTooltipFeature(parentComp) {
12558 var _this = _super.call(this) || this;
12559 _this.DEFAULT_SHOW_TOOLTIP_DELAY = 2000;
12560 _this.DEFAULT_HIDE_TOOLTIP_DELAY = 10000;
12561 _this.SHOW_QUICK_TOOLTIP_DIFF = 1000;
12562 _this.FADE_OUT_TOOLTIP_TIMEOUT = 1000;
12563 _this.state = TooltipStates.NOTHING;
12564 // when showing the tooltip, we need to make sure it's the most recent instance we request, as due to
12565 // async we could request two tooltips before the first instance returns, in which case we should
12566 // disregard the second instance.
12567 _this.tooltipInstanceCount = 0;
12568 _this.tooltipMouseTrack = false;
12569 _this.parentComp = parentComp;
12570 return _this;
12571 }
12572 CustomTooltipFeature.prototype.postConstruct = function () {
12573 this.tooltipShowDelay = this.gridOptionsWrapper.getTooltipDelay('show') || this.DEFAULT_SHOW_TOOLTIP_DELAY;
12574 this.tooltipHideDelay = this.gridOptionsWrapper.getTooltipDelay('hide') || this.DEFAULT_HIDE_TOOLTIP_DELAY;
12575 this.tooltipMouseTrack = this.gridOptionsWrapper.isTooltipMouseTrack();
12576 var el = this.parentComp.getGui();
12577 this.addManagedListener(el, 'mouseenter', this.onMouseEnter.bind(this));
12578 this.addManagedListener(el, 'mouseleave', this.onMouseLeave.bind(this));
12579 this.addManagedListener(el, 'mousemove', this.onMouseMove.bind(this));
12580 this.addManagedListener(el, 'mousedown', this.onMouseDown.bind(this));
12581 this.addManagedListener(el, 'keydown', this.onKeyDown.bind(this));
12582 };
12583 CustomTooltipFeature.prototype.destroy = function () {
12584 // if this component gets destroyed while tooltip is showing, need to make sure
12585 // we don't end with no mouseLeave event resulting in zombie tooltip
12586 this.setToDoNothing();
12587 _super.prototype.destroy.call(this);
12588 };
12589 CustomTooltipFeature.prototype.onMouseEnter = function (e) {
12590 if (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isIOSUserAgent"])()) {
12591 return;
12592 }
12593 // every mouseenter should be following by a mouseleave, however for some unkonwn, it's possible for
12594 // mouseenter to be called twice in a row, which can happen if editing the cell. this was reported
12595 // in https://ag-grid.atlassian.net/browse/AG-4422. to get around this, we check the state, and if
12596 // state is !=nothing, then we know mouseenter was already received.
12597 if (this.state != TooltipStates.NOTHING) {
12598 return;
12599 }
12600 // if another tooltip was hidden very recently, we only wait 200ms to show, not the normal waiting time
12601 var delay = this.isLastTooltipHiddenRecently() ? 200 : this.tooltipShowDelay;
12602 this.showTooltipTimeoutId = window.setTimeout(this.showTooltip.bind(this), delay);
12603 this.lastMouseEvent = e;
12604 this.state = TooltipStates.WAITING_TO_SHOW;
12605 };
12606 CustomTooltipFeature.prototype.onMouseLeave = function () {
12607 this.setToDoNothing();
12608 };
12609 CustomTooltipFeature.prototype.onKeyDown = function () {
12610 this.setToDoNothing();
12611 };
12612 CustomTooltipFeature.prototype.setToDoNothing = function () {
12613 if (this.state === TooltipStates.SHOWING) {
12614 this.hideTooltip();
12615 }
12616 this.clearTimeouts();
12617 this.state = TooltipStates.NOTHING;
12618 };
12619 CustomTooltipFeature.prototype.onMouseMove = function (e) {
12620 // there is a delay from the time we mouseOver a component and the time the
12621 // tooltip is displayed, so we need to track mousemove to be able to correctly
12622 // position the tooltip when showTooltip is called.
12623 this.lastMouseEvent = e;
12624 if (this.tooltipMouseTrack &&
12625 this.state === TooltipStates.SHOWING &&
12626 this.tooltipComp) {
12627 this.positionTooltipUnderLastMouseEvent();
12628 }
12629 };
12630 CustomTooltipFeature.prototype.onMouseDown = function () {
12631 this.setToDoNothing();
12632 };
12633 CustomTooltipFeature.prototype.hideTooltip = function () {
12634 // check if comp exists - due to async, although we asked for
12635 // one, the instance may not be back yet
12636 if (this.tooltipComp) {
12637 this.destroyTooltipComp();
12638 CustomTooltipFeature.lastTooltipHideTime = new Date().getTime();
12639 }
12640 this.state = TooltipStates.NOTHING;
12641 };
12642 CustomTooltipFeature.prototype.destroyTooltipComp = function () {
12643 var _this = this;
12644 // add class to fade out the tooltip
12645 this.tooltipComp.getGui().classList.add('ag-tooltip-hiding');
12646 // make local copies of these variables, as we use them in the async function below,
12647 // and we clear then to 'undefined' later, so need to take a copy before they are undefined.
12648 var tooltipPopupDestroyFunc = this.tooltipPopupDestroyFunc;
12649 var tooltipComp = this.tooltipComp;
12650 window.setTimeout(function () {
12651 tooltipPopupDestroyFunc();
12652 _this.getContext().destroyBean(tooltipComp);
12653 }, this.FADE_OUT_TOOLTIP_TIMEOUT);
12654 this.tooltipPopupDestroyFunc = undefined;
12655 this.tooltipComp = undefined;
12656 };
12657 CustomTooltipFeature.prototype.isLastTooltipHiddenRecently = function () {
12658 // return true if <1000ms since last time we hid a tooltip
12659 var now = new Date().getTime();
12660 var then = CustomTooltipFeature.lastTooltipHideTime;
12661 return (now - then) < this.SHOW_QUICK_TOOLTIP_DIFF;
12662 };
12663 CustomTooltipFeature.prototype.showTooltip = function () {
12664 var params = __assign({}, this.parentComp.getTooltipParams());
12665 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(params.value)) {
12666 this.setToDoNothing();
12667 return;
12668 }
12669 this.state = TooltipStates.SHOWING;
12670 this.tooltipInstanceCount++;
12671 // we pass in tooltipInstanceCount so the callback knows what the count was when
12672 // we requested the tooltip, so if another tooltip was requested in the mean time
12673 // we disregard it
12674 var callback = this.newTooltipComponentCallback.bind(this, this.tooltipInstanceCount);
12675 var userDetails = this.userComponentFactory.getTooltipCompDetails(params);
12676 userDetails.newAgStackInstance().then(callback);
12677 };
12678 CustomTooltipFeature.prototype.newTooltipComponentCallback = function (tooltipInstanceCopy, tooltipComp) {
12679 var compNoLongerNeeded = this.state !== TooltipStates.SHOWING || this.tooltipInstanceCount !== tooltipInstanceCopy;
12680 if (compNoLongerNeeded) {
12681 this.getContext().destroyBean(tooltipComp);
12682 return;
12683 }
12684 var eGui = tooltipComp.getGui();
12685 this.tooltipComp = tooltipComp;
12686 if (!eGui.classList.contains('ag-tooltip')) {
12687 eGui.classList.add('ag-tooltip-custom');
12688 }
12689 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
12690 var addPopupRes = this.popupService.addPopup({
12691 eChild: eGui,
12692 ariaLabel: translate('ariaLabelTooltip', 'Tooltip')
12693 });
12694 if (addPopupRes) {
12695 this.tooltipPopupDestroyFunc = addPopupRes.hideFunc;
12696 }
12697 // this.tooltipPopupDestroyFunc = this.popupService.addPopup(false, eGui, false);
12698 this.positionTooltipUnderLastMouseEvent();
12699 this.hideTooltipTimeoutId = window.setTimeout(this.hideTooltip.bind(this), this.tooltipHideDelay);
12700 };
12701 CustomTooltipFeature.prototype.positionTooltipUnderLastMouseEvent = function () {
12702 this.popupService.positionPopupUnderMouseEvent({
12703 type: 'tooltip',
12704 mouseEvent: this.lastMouseEvent,
12705 ePopup: this.tooltipComp.getGui(),
12706 nudgeY: 18
12707 });
12708 };
12709 CustomTooltipFeature.prototype.clearTimeouts = function () {
12710 if (this.showTooltipTimeoutId) {
12711 window.clearTimeout(this.showTooltipTimeoutId);
12712 this.showTooltipTimeoutId = undefined;
12713 }
12714 if (this.hideTooltipTimeoutId) {
12715 window.clearTimeout(this.hideTooltipTimeoutId);
12716 this.hideTooltipTimeoutId = undefined;
12717 }
12718 };
12719 __decorate([
12720 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('popupService')
12721 ], CustomTooltipFeature.prototype, "popupService", void 0);
12722 __decorate([
12723 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('userComponentFactory')
12724 ], CustomTooltipFeature.prototype, "userComponentFactory", void 0);
12725 __decorate([
12726 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
12727 ], CustomTooltipFeature.prototype, "columnApi", void 0);
12728 __decorate([
12729 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
12730 ], CustomTooltipFeature.prototype, "gridApi", void 0);
12731 __decorate([
12732 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
12733 ], CustomTooltipFeature.prototype, "postConstruct", null);
12734 return CustomTooltipFeature;
12735}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
12736
12737
12738
12739
12740
12741/***/ }),
12742/* 57 */
12743/***/ (function(module, __webpack_exports__, __webpack_require__) {
12744
12745"use strict";
12746__webpack_require__.r(__webpack_exports__);
12747/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuerySelector", function() { return QuerySelector; });
12748/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RefSelector", function() { return RefSelector; });
12749/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
12750/**
12751 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12752 * @version v27.3.0
12753 * @link https://www.ag-grid.com/
12754 * @license MIT
12755 */
12756
12757function QuerySelector(selector) {
12758 return querySelectorFunc.bind(this, selector, undefined);
12759}
12760function RefSelector(ref) {
12761 return querySelectorFunc.bind(this, "[ref=" + ref + "]", ref);
12762}
12763function querySelectorFunc(selector, refSelector, classPrototype, methodOrAttributeName, index) {
12764 if (selector === null) {
12765 console.error('AG Grid: QuerySelector selector should not be null');
12766 return;
12767 }
12768 if (typeof index === 'number') {
12769 console.error('AG Grid: QuerySelector should be on an attribute');
12770 return;
12771 }
12772 addToObjectProps(classPrototype, 'querySelectors', {
12773 attributeName: methodOrAttributeName,
12774 querySelector: selector,
12775 refSelector: refSelector
12776 });
12777}
12778// // think we should take this out, put property bindings on the
12779// export function Method(eventName?: string): Function {
12780// return methodFunc.bind(this, eventName);
12781// }
12782//
12783// function methodFunc(alias: string, target: Object, methodName: string) {
12784// if (alias === null) {
12785// console.error("AG Grid: EventListener eventName should not be null");
12786// return;
12787// }
12788//
12789// addToObjectProps(target, 'methods', {
12790// methodName: methodName,
12791// alias: alias
12792// });
12793// }
12794function addToObjectProps(target, key, value) {
12795 // it's an attribute on the class
12796 var props = getOrCreateProps(target, Object(_utils_function__WEBPACK_IMPORTED_MODULE_0__["getFunctionName"])(target.constructor));
12797 if (!props[key]) {
12798 props[key] = [];
12799 }
12800 props[key].push(value);
12801}
12802function getOrCreateProps(target, instanceName) {
12803 if (!target.__agComponentMetaData) {
12804 target.__agComponentMetaData = {};
12805 }
12806 if (!target.__agComponentMetaData[instanceName]) {
12807 target.__agComponentMetaData[instanceName] = {};
12808 }
12809 return target.__agComponentMetaData[instanceName];
12810}
12811
12812
12813
12814
12815/***/ }),
12816/* 58 */
12817/***/ (function(module, __webpack_exports__, __webpack_require__) {
12818
12819"use strict";
12820__webpack_require__.r(__webpack_exports__);
12821/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateFilter", function() { return DateFilter; });
12822/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
12823/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
12824/* harmony import */ var _dateCompWrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59);
12825/* harmony import */ var _simpleFilter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60);
12826/* harmony import */ var _scalarFilter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(72);
12827/* harmony import */ var _utils_date__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45);
12828/**
12829 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12830 * @version v27.3.0
12831 * @link https://www.ag-grid.com/
12832 * @license MIT
12833 */
12834var __extends = (undefined && undefined.__extends) || (function () {
12835 var extendStatics = function (d, b) {
12836 extendStatics = Object.setPrototypeOf ||
12837 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
12838 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
12839 return extendStatics(d, b);
12840 };
12841 return function (d, b) {
12842 extendStatics(d, b);
12843 function __() { this.constructor = d; }
12844 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12845 };
12846})();
12847var __assign = (undefined && undefined.__assign) || function () {
12848 __assign = Object.assign || function(t) {
12849 for (var s, i = 1, n = arguments.length; i < n; i++) {
12850 s = arguments[i];
12851 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
12852 t[p] = s[p];
12853 }
12854 return t;
12855 };
12856 return __assign.apply(this, arguments);
12857};
12858var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
12859 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
12860 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
12861 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
12862 return c > 3 && r && Object.defineProperty(target, key, r), r;
12863};
12864
12865
12866
12867
12868
12869
12870var DEFAULT_MIN_YEAR = 1000;
12871var DEFAULT_MAX_YEAR = Infinity;
12872var DateFilter = /** @class */ (function (_super) {
12873 __extends(DateFilter, _super);
12874 function DateFilter() {
12875 var _this = _super.call(this, 'dateFilter') || this;
12876 _this.minValidYear = DEFAULT_MIN_YEAR;
12877 _this.maxValidYear = DEFAULT_MAX_YEAR;
12878 return _this;
12879 }
12880 DateFilter.prototype.afterGuiAttached = function (params) {
12881 _super.prototype.afterGuiAttached.call(this, params);
12882 this.dateCondition1FromComp.afterGuiAttached(params);
12883 };
12884 DateFilter.prototype.mapValuesFromModel = function (filterModel) {
12885 // unlike the other filters, we do two things here:
12886 // 1) allow for different attribute names (same as done for other filters) (eg the 'from' and 'to'
12887 // are in different locations in Date and Number filter models)
12888 // 2) convert the type (because Date filter uses Dates, however model is 'string')
12889 //
12890 // NOTE: The conversion of string to date also removes the timezone - i.e. when user picks
12891 // a date from the UI, it will have timezone info in it. This is lost when creating
12892 // the model. When we recreate the date again here, it's without a timezone.
12893 var _a = filterModel || {}, dateFrom = _a.dateFrom, dateTo = _a.dateTo, type = _a.type;
12894 return [
12895 dateFrom && Object(_utils_date__WEBPACK_IMPORTED_MODULE_5__["parseDateTimeFromString"])(dateFrom) || null,
12896 dateTo && Object(_utils_date__WEBPACK_IMPORTED_MODULE_5__["parseDateTimeFromString"])(dateTo) || null,
12897 ].slice(0, this.getNumberOfInputs(type));
12898 };
12899 DateFilter.prototype.comparator = function () {
12900 return this.dateFilterParams.comparator ? this.dateFilterParams.comparator : this.defaultComparator.bind(this);
12901 };
12902 DateFilter.prototype.defaultComparator = function (filterDate, cellValue) {
12903 // The default comparator assumes that the cellValue is a date
12904 var cellAsDate = cellValue;
12905 if (cellValue == null || cellAsDate < filterDate) {
12906 return -1;
12907 }
12908 if (cellAsDate > filterDate) {
12909 return 1;
12910 }
12911 return 0;
12912 };
12913 DateFilter.prototype.setParams = function (params) {
12914 _super.prototype.setParams.call(this, params);
12915 this.dateFilterParams = params;
12916 var yearParser = function (param, fallback) {
12917 if (params[param] != null) {
12918 if (!isNaN(params[param])) {
12919 return params[param] == null ? fallback : Number(params[param]);
12920 }
12921 else {
12922 console.warn("AG Grid: DateFilter " + param + " is not a number");
12923 }
12924 }
12925 return fallback;
12926 };
12927 this.minValidYear = yearParser('minValidYear', DEFAULT_MIN_YEAR);
12928 this.maxValidYear = yearParser('maxValidYear', DEFAULT_MAX_YEAR);
12929 if (this.minValidYear > this.maxValidYear) {
12930 console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear");
12931 }
12932 this.createDateComponents();
12933 };
12934 DateFilter.prototype.createDateComponents = function () {
12935 var _this = this;
12936 var createDateCompWrapper = function (element) {
12937 return new _dateCompWrapper__WEBPACK_IMPORTED_MODULE_2__["DateCompWrapper"](_this.getContext(), _this.userComponentFactory, {
12938 onDateChanged: function () { return _this.onUiChanged(); },
12939 filterParams: _this.dateFilterParams
12940 }, element);
12941 };
12942 this.dateCondition1FromComp = createDateCompWrapper(this.eCondition1PanelFrom);
12943 this.dateCondition1ToComp = createDateCompWrapper(this.eCondition1PanelTo);
12944 this.dateCondition2FromComp = createDateCompWrapper(this.eCondition2PanelFrom);
12945 this.dateCondition2ToComp = createDateCompWrapper(this.eCondition2PanelTo);
12946 this.addDestroyFunc(function () {
12947 _this.forEachInput(function (element) { return element.destroy(); });
12948 });
12949 };
12950 DateFilter.prototype.setElementValue = function (element, value, silent) {
12951 element.setDate(value);
12952 };
12953 DateFilter.prototype.setElementDisplayed = function (element, displayed) {
12954 element.setDisplayed(displayed);
12955 };
12956 DateFilter.prototype.setElementDisabled = function (element, disabled) {
12957 element.setDisabled(disabled);
12958 };
12959 DateFilter.prototype.getDefaultFilterOptions = function () {
12960 return DateFilter.DEFAULT_FILTER_OPTIONS;
12961 };
12962 DateFilter.prototype.createValueTemplate = function (position) {
12963 var pos = position === _simpleFilter__WEBPACK_IMPORTED_MODULE_3__["ConditionPosition"].One ? '1' : '2';
12964 return /* html */ "\n <div class=\"ag-filter-body\" ref=\"eCondition" + pos + "Body\">\n <div class=\"ag-filter-from ag-filter-date-from\" ref=\"eCondition" + pos + "PanelFrom\"></div>\n <div class=\"ag-filter-to ag-filter-date-to\" ref=\"eCondition" + pos + "PanelTo\"></div>\n </div>";
12965 };
12966 DateFilter.prototype.isConditionUiComplete = function (position) {
12967 var _this = this;
12968 if (!_super.prototype.isConditionUiComplete.call(this, position)) {
12969 return false;
12970 }
12971 var isValidDate = function (value) { return value != null
12972 && value.getUTCFullYear() >= _this.minValidYear
12973 && value.getUTCFullYear() <= _this.maxValidYear; };
12974 var valid = true;
12975 this.forEachInput(function (element, index, elPosition, numberOfInputs) {
12976 if (elPosition !== position || !valid || index >= numberOfInputs) {
12977 return;
12978 }
12979 valid = valid && isValidDate(element.getDate());
12980 });
12981 return valid;
12982 };
12983 DateFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {
12984 return aSimple.dateFrom === bSimple.dateFrom
12985 && aSimple.dateTo === bSimple.dateTo
12986 && aSimple.type === bSimple.type;
12987 };
12988 DateFilter.prototype.getFilterType = function () {
12989 return 'date';
12990 };
12991 DateFilter.prototype.createCondition = function (position) {
12992 var type = this.getConditionTypes()[position];
12993 var model = {};
12994 var values = this.getValues(position);
12995 if (values.length > 0) {
12996 model.dateFrom = Object(_utils_date__WEBPACK_IMPORTED_MODULE_5__["serialiseDate"])(values[0]);
12997 }
12998 if (values.length > 1) {
12999 model.dateTo = Object(_utils_date__WEBPACK_IMPORTED_MODULE_5__["serialiseDate"])(values[1]);
13000 }
13001 return __assign({ dateFrom: null, dateTo: null, filterType: this.getFilterType(), type: type }, model);
13002 };
13003 DateFilter.prototype.resetPlaceholder = function () {
13004 var globalTranslate = this.gridOptionsWrapper.getLocaleTextFunc();
13005 var placeholder = this.translate('dateFormatOoo');
13006 var ariaLabel = globalTranslate('ariaFilterValue', 'Filter Value');
13007 this.forEachInput(function (element) {
13008 element.setInputPlaceholder(placeholder);
13009 element.setInputAriaLabel(ariaLabel);
13010 });
13011 };
13012 DateFilter.prototype.getInputs = function () {
13013 return [
13014 [this.dateCondition1FromComp, this.dateCondition1ToComp],
13015 [this.dateCondition2FromComp, this.dateCondition2ToComp],
13016 ];
13017 };
13018 DateFilter.prototype.getValues = function (position) {
13019 var result = [];
13020 this.forEachInput(function (element, index, elPosition, numberOfInputs) {
13021 if (position === elPosition && index < numberOfInputs) {
13022 result.push(element.getDate());
13023 }
13024 });
13025 return result;
13026 };
13027 DateFilter.DEFAULT_FILTER_OPTIONS = [
13028 _scalarFilter__WEBPACK_IMPORTED_MODULE_4__["ScalarFilter"].EQUALS,
13029 _scalarFilter__WEBPACK_IMPORTED_MODULE_4__["ScalarFilter"].GREATER_THAN,
13030 _scalarFilter__WEBPACK_IMPORTED_MODULE_4__["ScalarFilter"].LESS_THAN,
13031 _scalarFilter__WEBPACK_IMPORTED_MODULE_4__["ScalarFilter"].NOT_EQUAL,
13032 _scalarFilter__WEBPACK_IMPORTED_MODULE_4__["ScalarFilter"].IN_RANGE,
13033 _scalarFilter__WEBPACK_IMPORTED_MODULE_4__["ScalarFilter"].BLANK,
13034 _scalarFilter__WEBPACK_IMPORTED_MODULE_4__["ScalarFilter"].NOT_BLANK,
13035 ];
13036 __decorate([
13037 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eCondition1PanelFrom')
13038 ], DateFilter.prototype, "eCondition1PanelFrom", void 0);
13039 __decorate([
13040 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eCondition1PanelTo')
13041 ], DateFilter.prototype, "eCondition1PanelTo", void 0);
13042 __decorate([
13043 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eCondition2PanelFrom')
13044 ], DateFilter.prototype, "eCondition2PanelFrom", void 0);
13045 __decorate([
13046 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eCondition2PanelTo')
13047 ], DateFilter.prototype, "eCondition2PanelTo", void 0);
13048 __decorate([
13049 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('userComponentFactory')
13050 ], DateFilter.prototype, "userComponentFactory", void 0);
13051 return DateFilter;
13052}(_scalarFilter__WEBPACK_IMPORTED_MODULE_4__["ScalarFilter"]));
13053
13054
13055
13056
13057
13058/***/ }),
13059/* 59 */
13060/***/ (function(module, __webpack_exports__, __webpack_require__) {
13061
13062"use strict";
13063__webpack_require__.r(__webpack_exports__);
13064/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateCompWrapper", function() { return DateCompWrapper; });
13065/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42);
13066/**
13067 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
13068 * @version v27.3.0
13069 * @link https://www.ag-grid.com/
13070 * @license MIT
13071 */
13072
13073/** Provides sync access to async component. Date component can be lazy created - this class encapsulates
13074 * this by keeping value locally until DateComp has loaded, then passing DateComp the value. */
13075var DateCompWrapper = /** @class */ (function () {
13076 function DateCompWrapper(context, userComponentFactory, dateComponentParams, eParent) {
13077 var _this = this;
13078 this.alive = true;
13079 this.context = context;
13080 this.eParent = eParent;
13081 var compDetails = userComponentFactory.getDateCompDetails(dateComponentParams);
13082 var promise = compDetails.newAgStackInstance();
13083 promise.then(function (dateComp) {
13084 // because async, check the filter still exists after component comes back
13085 if (!_this.alive) {
13086 context.destroyBean(dateComp);
13087 return;
13088 }
13089 _this.dateComp = dateComp;
13090 if (!dateComp) {
13091 return;
13092 }
13093 eParent.appendChild(dateComp.getGui());
13094 if (dateComp.afterGuiAttached) {
13095 dateComp.afterGuiAttached();
13096 }
13097 if (_this.tempValue) {
13098 dateComp.setDate(_this.tempValue);
13099 }
13100 if (_this.disabled != null) {
13101 _this.setDateCompDisabled(_this.disabled);
13102 }
13103 });
13104 }
13105 DateCompWrapper.prototype.destroy = function () {
13106 this.alive = false;
13107 this.dateComp = this.context.destroyBean(this.dateComp);
13108 };
13109 DateCompWrapper.prototype.getDate = function () {
13110 return this.dateComp ? this.dateComp.getDate() : this.tempValue;
13111 };
13112 DateCompWrapper.prototype.setDate = function (value) {
13113 if (this.dateComp) {
13114 this.dateComp.setDate(value);
13115 }
13116 else {
13117 this.tempValue = value;
13118 }
13119 };
13120 DateCompWrapper.prototype.setDisabled = function (disabled) {
13121 if (this.dateComp) {
13122 this.setDateCompDisabled(disabled);
13123 }
13124 else {
13125 this.disabled = disabled;
13126 }
13127 };
13128 DateCompWrapper.prototype.setDisplayed = function (displayed) {
13129 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__["setDisplayed"])(this.eParent, displayed);
13130 };
13131 DateCompWrapper.prototype.setInputPlaceholder = function (placeholder) {
13132 if (this.dateComp && this.dateComp.setInputPlaceholder) {
13133 this.dateComp.setInputPlaceholder(placeholder);
13134 }
13135 };
13136 DateCompWrapper.prototype.setInputAriaLabel = function (label) {
13137 if (this.dateComp && this.dateComp.setInputAriaLabel) {
13138 this.dateComp.setInputAriaLabel(label);
13139 }
13140 };
13141 DateCompWrapper.prototype.afterGuiAttached = function (params) {
13142 if (this.dateComp && typeof this.dateComp.afterGuiAttached === 'function') {
13143 this.dateComp.afterGuiAttached(params);
13144 }
13145 };
13146 DateCompWrapper.prototype.setDateCompDisabled = function (disabled) {
13147 if (this.dateComp == null) {
13148 return;
13149 }
13150 if (this.dateComp.setDisabled == null) {
13151 return;
13152 }
13153 this.dateComp.setDisabled(disabled);
13154 };
13155 return DateCompWrapper;
13156}());
13157
13158
13159
13160
13161
13162/***/ }),
13163/* 60 */
13164/***/ (function(module, __webpack_exports__, __webpack_require__) {
13165
13166"use strict";
13167__webpack_require__.r(__webpack_exports__);
13168/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConditionPosition", function() { return ConditionPosition; });
13169/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleFilter", function() { return SimpleFilter; });
13170/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
13171/* harmony import */ var _optionsFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61);
13172/* harmony import */ var _providedFilter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62);
13173/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37);
13174/* harmony import */ var _widgets_agSelect__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66);
13175/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18);
13176/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42);
13177/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(36);
13178/* harmony import */ var _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(71);
13179/**
13180 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
13181 * @version v27.3.0
13182 * @link https://www.ag-grid.com/
13183 * @license MIT
13184 */
13185var __extends = (undefined && undefined.__extends) || (function () {
13186 var extendStatics = function (d, b) {
13187 extendStatics = Object.setPrototypeOf ||
13188 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
13189 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
13190 return extendStatics(d, b);
13191 };
13192 return function (d, b) {
13193 extendStatics(d, b);
13194 function __() { this.constructor = d; }
13195 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13196 };
13197})();
13198var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
13199 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
13200 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
13201 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13202 return c > 3 && r && Object.defineProperty(target, key, r), r;
13203};
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213var ConditionPosition;
13214(function (ConditionPosition) {
13215 ConditionPosition[ConditionPosition["One"] = 0] = "One";
13216 ConditionPosition[ConditionPosition["Two"] = 1] = "Two";
13217})(ConditionPosition || (ConditionPosition = {}));
13218/**
13219 * Every filter with a dropdown where the user can specify a comparing type against the filter values.
13220 *
13221 * @param M type of filter-model managed by the concrete sub-class that extends this type
13222 * @param V type of value managed by the concrete sub-class that extends this type
13223 * @param E type of UI element used for collecting user-input
13224 */
13225var SimpleFilter = /** @class */ (function (_super) {
13226 __extends(SimpleFilter, _super);
13227 function SimpleFilter() {
13228 return _super !== null && _super.apply(this, arguments) || this;
13229 }
13230 SimpleFilter.prototype.getNumberOfInputs = function (type) {
13231 var customOpts = this.optionsFactory.getCustomOption(type);
13232 if (customOpts) {
13233 var numberOfInputs = customOpts.numberOfInputs;
13234 return numberOfInputs != null ? numberOfInputs : 1;
13235 }
13236 var zeroInputTypes = [
13237 SimpleFilter.EMPTY, SimpleFilter.NOT_BLANK, SimpleFilter.BLANK,
13238 ];
13239 if (type && zeroInputTypes.indexOf(type) >= 0) {
13240 return 0;
13241 }
13242 else if (type === SimpleFilter.IN_RANGE) {
13243 return 2;
13244 }
13245 return 1;
13246 };
13247 // floating filter calls this when user applies filter from floating filter
13248 SimpleFilter.prototype.onFloatingFilterChanged = function (type, value) {
13249 this.setTypeFromFloatingFilter(type);
13250 this.setValueFromFloatingFilter(value);
13251 this.onUiChanged(true);
13252 };
13253 SimpleFilter.prototype.setTypeFromFloatingFilter = function (type) {
13254 this.eType1.setValue(type);
13255 this.eType2.setValue(this.optionsFactory.getDefaultOption());
13256 (this.isDefaultOperator('AND') ? this.eJoinOperatorAnd : this.eJoinOperatorOr).setValue(true);
13257 };
13258 SimpleFilter.prototype.getModelFromUi = function () {
13259 if (!this.isConditionUiComplete(ConditionPosition.One)) {
13260 return null;
13261 }
13262 if (this.isAllowTwoConditions() && this.isConditionUiComplete(ConditionPosition.Two)) {
13263 return {
13264 filterType: this.getFilterType(),
13265 operator: this.getJoinOperator(),
13266 condition1: this.createCondition(ConditionPosition.One),
13267 condition2: this.createCondition(ConditionPosition.Two)
13268 };
13269 }
13270 return this.createCondition(ConditionPosition.One);
13271 };
13272 SimpleFilter.prototype.getConditionTypes = function () {
13273 return [
13274 this.eType1.getValue(),
13275 this.eType2.getValue(),
13276 ];
13277 };
13278 SimpleFilter.prototype.getJoinOperator = function () {
13279 return this.eJoinOperatorOr.getValue() === true ? 'OR' : 'AND';
13280 };
13281 SimpleFilter.prototype.areModelsEqual = function (a, b) {
13282 // both are missing
13283 if (!a && !b) {
13284 return true;
13285 }
13286 // one is missing, other present
13287 if ((!a && b) || (a && !b)) {
13288 return false;
13289 }
13290 // one is combined, the other is not
13291 var aIsSimple = !a.operator;
13292 var bIsSimple = !b.operator;
13293 var oneSimpleOneCombined = (!aIsSimple && bIsSimple) || (aIsSimple && !bIsSimple);
13294 if (oneSimpleOneCombined) {
13295 return false;
13296 }
13297 var res;
13298 // otherwise both present, so compare
13299 if (aIsSimple) {
13300 var aSimple = a;
13301 var bSimple = b;
13302 res = this.areSimpleModelsEqual(aSimple, bSimple);
13303 }
13304 else {
13305 var aCombined = a;
13306 var bCombined = b;
13307 res = aCombined.operator === bCombined.operator
13308 && this.areSimpleModelsEqual(aCombined.condition1, bCombined.condition1)
13309 && this.areSimpleModelsEqual(aCombined.condition2, bCombined.condition2);
13310 }
13311 return res;
13312 };
13313 SimpleFilter.prototype.setModelIntoUi = function (model) {
13314 var isCombined = model.operator;
13315 if (isCombined) {
13316 var combinedModel = model;
13317 var orChecked = combinedModel.operator === 'OR';
13318 this.eJoinOperatorAnd.setValue(!orChecked);
13319 this.eJoinOperatorOr.setValue(orChecked);
13320 this.eType1.setValue(combinedModel.condition1.type);
13321 this.eType2.setValue(combinedModel.condition2.type);
13322 this.setConditionIntoUi(combinedModel.condition1, ConditionPosition.One);
13323 this.setConditionIntoUi(combinedModel.condition2, ConditionPosition.Two);
13324 }
13325 else {
13326 var simpleModel = model;
13327 this.eJoinOperatorAnd.setValue(this.isDefaultOperator('AND'));
13328 this.eJoinOperatorOr.setValue(this.isDefaultOperator('OR'));
13329 this.eType1.setValue(simpleModel.type);
13330 this.eType2.setValue(this.optionsFactory.getDefaultOption());
13331 this.setConditionIntoUi(simpleModel, ConditionPosition.One);
13332 this.setConditionIntoUi(null, ConditionPosition.Two);
13333 }
13334 return _utils__WEBPACK_IMPORTED_MODULE_3__["AgPromise"].resolve();
13335 };
13336 SimpleFilter.prototype.doesFilterPass = function (params) {
13337 var _this = this;
13338 var model = this.getModel();
13339 if (model == null) {
13340 return true;
13341 }
13342 var operator = model.operator;
13343 var models = [];
13344 if (operator) {
13345 var combinedModel = model;
13346 models.push(combinedModel.condition1, combinedModel.condition2);
13347 }
13348 else {
13349 models.push(model);
13350 }
13351 var combineFunction = operator && operator === 'OR' ? 'some' : 'every';
13352 return models[combineFunction](function (m) { return _this.individualConditionPasses(params, m); });
13353 };
13354 SimpleFilter.prototype.setParams = function (params) {
13355 _super.prototype.setParams.call(this, params);
13356 this.optionsFactory = new _optionsFactory__WEBPACK_IMPORTED_MODULE_1__["OptionsFactory"]();
13357 this.optionsFactory.init(params, this.getDefaultFilterOptions());
13358 this.allowTwoConditions = !params.suppressAndOrCondition;
13359 this.alwaysShowBothConditions = !!params.alwaysShowBothConditions;
13360 this.defaultJoinOperator = this.getDefaultJoinOperator(params.defaultJoinOperator);
13361 this.putOptionsIntoDropdown();
13362 this.addChangedListeners();
13363 };
13364 SimpleFilter.prototype.getDefaultJoinOperator = function (defaultJoinOperator) {
13365 return Object(_utils_array__WEBPACK_IMPORTED_MODULE_5__["includes"])(['AND', 'OR'], defaultJoinOperator) ? defaultJoinOperator : 'AND';
13366 };
13367 SimpleFilter.prototype.putOptionsIntoDropdown = function () {
13368 var _this = this;
13369 var filterOptions = this.optionsFactory.getFilterOptions();
13370 var eTypes = [this.eType1, this.eType2];
13371 // Add specified options to all condition drop-downs.
13372 filterOptions.forEach(function (option) {
13373 var listOption = typeof option === 'string' ?
13374 _this.createBoilerplateListOption(option) :
13375 _this.createCustomListOption(option);
13376 eTypes.forEach(function (eType) { return eType.addOption(listOption); });
13377 });
13378 // Make drop-downs read-only if there is only one option.
13379 eTypes.forEach(function (eType) { return eType.setDisabled(filterOptions.length <= 1); });
13380 };
13381 SimpleFilter.prototype.createBoilerplateListOption = function (option) {
13382 return { value: option, text: this.translate(option) };
13383 };
13384 SimpleFilter.prototype.createCustomListOption = function (option) {
13385 var displayKey = option.displayKey;
13386 var customOption = this.optionsFactory.getCustomOption(option.displayKey);
13387 return {
13388 value: displayKey,
13389 text: customOption ?
13390 this.gridOptionsWrapper.getLocaleTextFunc()(customOption.displayKey, customOption.displayName) :
13391 this.translate(displayKey),
13392 };
13393 };
13394 SimpleFilter.prototype.isAllowTwoConditions = function () {
13395 return this.allowTwoConditions;
13396 };
13397 SimpleFilter.prototype.createBodyTemplate = function () {
13398 return /* html */ "\n <ag-select class=\"ag-filter-select\" ref=\"eOptions1\"></ag-select>\n " + this.createValueTemplate(ConditionPosition.One) + "\n <div class=\"ag-filter-condition\" ref=\"eJoinOperatorPanel\">\n <ag-radio-button ref=\"eJoinOperatorAnd\" class=\"ag-filter-condition-operator ag-filter-condition-operator-and\"></ag-radio-button>\n <ag-radio-button ref=\"eJoinOperatorOr\" class=\"ag-filter-condition-operator ag-filter-condition-operator-or\"></ag-radio-button>\n </div>\n <ag-select class=\"ag-filter-select\" ref=\"eOptions2\"></ag-select>\n " + this.createValueTemplate(ConditionPosition.Two);
13399 };
13400 SimpleFilter.prototype.getCssIdentifier = function () {
13401 return 'simple-filter';
13402 };
13403 SimpleFilter.prototype.updateUiVisibility = function () {
13404 var _this = this;
13405 var elementConditionGroups = [
13406 [this.eType1],
13407 [this.eType2, this.eJoinOperatorPanel, this.eJoinOperatorAnd, this.eJoinOperatorOr],
13408 ];
13409 var elementBodies = [this.eCondition1Body, this.eCondition2Body];
13410 elementConditionGroups.forEach(function (group, position) {
13411 var visible = _this.isConditionVisible(position);
13412 var disabled = _this.isConditionDisabled(position);
13413 group.forEach(function (element) {
13414 if (element instanceof _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_8__["AgAbstractInputField"] || element instanceof _widgets_agSelect__WEBPACK_IMPORTED_MODULE_4__["AgSelect"]) {
13415 element.setDisabled(disabled);
13416 element.setDisplayed(visible);
13417 }
13418 else {
13419 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["setDisabled"])(element, disabled);
13420 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["setDisplayed"])(element, visible);
13421 }
13422 });
13423 });
13424 elementBodies.forEach(function (element, index) {
13425 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["setDisplayed"])(element, _this.isConditionBodyVisible(index));
13426 });
13427 this.forEachInput(function (element, index, position, numberOfInputs) {
13428 _this.setElementDisplayed(element, index < numberOfInputs);
13429 _this.setElementDisabled(element, _this.isConditionDisabled(position));
13430 });
13431 this.resetPlaceholder();
13432 };
13433 SimpleFilter.prototype.afterGuiAttached = function (params) {
13434 _super.prototype.afterGuiAttached.call(this, params);
13435 this.resetPlaceholder();
13436 if (!params || (!params.suppressFocus && !this.isReadOnly())) {
13437 var firstInput = this.getInputs()[0][0];
13438 if (!firstInput) {
13439 return;
13440 }
13441 if (firstInput instanceof _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_8__["AgAbstractInputField"]) {
13442 firstInput.getInputElement().focus();
13443 }
13444 }
13445 };
13446 // allow sub-classes to reset HTML placeholders after UI update.
13447 SimpleFilter.prototype.resetPlaceholder = function () {
13448 var _this = this;
13449 var globalTranslate = this.gridOptionsWrapper.getLocaleTextFunc();
13450 this.forEachInput(function (element, index, _, numberOfInputs) {
13451 if (!(element instanceof _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_8__["AgAbstractInputField"])) {
13452 return;
13453 }
13454 var placeholder = index === 0 && numberOfInputs > 1 ? 'inRangeStart' :
13455 index === 0 ? 'filterOoo' :
13456 'inRangeEnd';
13457 var ariaLabel = index === 0 && numberOfInputs > 1 ? globalTranslate('ariaFilterFromValue', 'Filter from value') :
13458 index === 0 ? globalTranslate('ariaFilterValue', 'Filter Value') :
13459 globalTranslate('ariaFilterToValue', 'Filter to Value');
13460 element.setInputPlaceholder(_this.translate(placeholder));
13461 element.setInputAriaLabel(ariaLabel);
13462 });
13463 };
13464 SimpleFilter.prototype.setElementValue = function (element, value, silent) {
13465 if (element instanceof _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_8__["AgAbstractInputField"]) {
13466 element.setValue(value != null ? String(value) : null, silent);
13467 }
13468 };
13469 SimpleFilter.prototype.setElementDisplayed = function (element, displayed) {
13470 if (element instanceof _widgets_component__WEBPACK_IMPORTED_MODULE_7__["Component"]) {
13471 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["setDisplayed"])(element.getGui(), displayed);
13472 }
13473 };
13474 SimpleFilter.prototype.setElementDisabled = function (element, disabled) {
13475 if (element instanceof _widgets_component__WEBPACK_IMPORTED_MODULE_7__["Component"]) {
13476 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["setDisabled"])(element.getGui(), disabled);
13477 }
13478 };
13479 SimpleFilter.prototype.attachElementOnChange = function (element, listener) {
13480 if (element instanceof _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_8__["AgAbstractInputField"]) {
13481 element.onValueChange(listener);
13482 }
13483 };
13484 SimpleFilter.prototype.forEachInput = function (cb) {
13485 var _this = this;
13486 var inputs = this.getInputs();
13487 this.getConditionTypes().forEach(function (type, position) {
13488 var numberOfInputs = _this.getNumberOfInputs(type);
13489 for (var index = 0; index < inputs[position].length; index++) {
13490 var input = inputs[position][index];
13491 if (input != null) {
13492 cb(input, index, position, numberOfInputs);
13493 }
13494 }
13495 });
13496 };
13497 SimpleFilter.prototype.isConditionVisible = function (position) {
13498 if (position === 0) {
13499 return true;
13500 } // Position 0 should always be visible.
13501 if (!this.allowTwoConditions) {
13502 return false;
13503 } // Short-circuit if no tail conditions.
13504 if (this.isReadOnly()) {
13505 // Only display a condition when read-only if the condition is complete.
13506 return this.isConditionUiComplete(position);
13507 }
13508 if (this.alwaysShowBothConditions) {
13509 return true;
13510 }
13511 // Only display a 2nd or later condition when the previous condition is complete.
13512 return this.isConditionUiComplete(position - 1);
13513 };
13514 SimpleFilter.prototype.isConditionDisabled = function (position) {
13515 if (this.isReadOnly()) {
13516 return true;
13517 } // Read-only mode trumps everything.
13518 if (!this.isConditionVisible(position)) {
13519 return true;
13520 } // Invisible implies disabled.
13521 if (position === 0) {
13522 return false;
13523 } // Position 0 should typically be editable.
13524 // Only allow editing of a 2nd or later condition if the previous condition is complete.
13525 return !this.isConditionUiComplete(position - 1);
13526 };
13527 SimpleFilter.prototype.isConditionBodyVisible = function (position) {
13528 if (!this.isConditionVisible(position)) {
13529 return false;
13530 }
13531 // Check that the condition needs inputs.
13532 var type = this.getConditionTypes()[position];
13533 var numberOfInputs = this.getNumberOfInputs(type);
13534 return numberOfInputs > 0;
13535 };
13536 // returns true if the UI represents a working filter, eg all parts are filled out.
13537 // eg if text filter and textfield blank then returns false.
13538 SimpleFilter.prototype.isConditionUiComplete = function (position) {
13539 var type = this.getConditionTypes()[position];
13540 if (type === SimpleFilter.EMPTY) {
13541 return false;
13542 }
13543 if (this.getValues(position).some(function (v) { return v == null; })) {
13544 return false;
13545 }
13546 return true;
13547 };
13548 SimpleFilter.prototype.resetUiToDefaults = function (silent) {
13549 var _this = this;
13550 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
13551 var filteringLabel = translate('ariaFilteringOperator', 'Filtering operator');
13552 var uniqueGroupId = 'ag-simple-filter-and-or-' + this.getCompId();
13553 var defaultOption = this.optionsFactory.getDefaultOption();
13554 this.eType1
13555 .setValue(defaultOption, silent)
13556 .setAriaLabel(filteringLabel)
13557 .setDisabled(this.isReadOnly());
13558 this.eType2
13559 .setValue(this.optionsFactory.getDefaultOption(), silent)
13560 .setAriaLabel(filteringLabel)
13561 .setDisabled(this.isReadOnly());
13562 this.eJoinOperatorAnd
13563 .setValue(this.isDefaultOperator('AND'), silent)
13564 .setName(uniqueGroupId)
13565 .setLabel(this.translate('andCondition'))
13566 .setDisabled(this.isReadOnly());
13567 this.eJoinOperatorOr
13568 .setValue(this.isDefaultOperator('OR'), silent)
13569 .setName(uniqueGroupId)
13570 .setLabel(this.translate('orCondition'))
13571 .setDisabled(this.isReadOnly());
13572 this.forEachInput(function (element) {
13573 _this.setElementValue(element, null, silent);
13574 _this.setElementDisabled(element, _this.isReadOnly());
13575 });
13576 this.resetPlaceholder();
13577 return _utils__WEBPACK_IMPORTED_MODULE_3__["AgPromise"].resolve();
13578 };
13579 // puts model values into the UI
13580 SimpleFilter.prototype.setConditionIntoUi = function (model, position) {
13581 var _this = this;
13582 var values = this.mapValuesFromModel(model);
13583 this.forEachInput(function (element, index, elPosition, _) {
13584 if (elPosition !== position) {
13585 return;
13586 }
13587 _this.setElementValue(element, values[index] != null ? values[index] : null);
13588 });
13589 };
13590 // after floating filter changes, this sets the 'value' section. this is implemented by the base class
13591 // (as that's where value is controlled), the 'type' part from the floating filter is dealt with in this class.
13592 SimpleFilter.prototype.setValueFromFloatingFilter = function (value) {
13593 var _this = this;
13594 this.forEachInput(function (element, index, position, _) {
13595 _this.setElementValue(element, index === 0 && position === 0 ? value : null);
13596 });
13597 };
13598 SimpleFilter.prototype.isDefaultOperator = function (operator) {
13599 return operator === this.defaultJoinOperator;
13600 };
13601 SimpleFilter.prototype.addChangedListeners = function () {
13602 var _this = this;
13603 if (this.isReadOnly()) {
13604 return;
13605 }
13606 var listener = function () { return _this.onUiChanged(); };
13607 this.eType1.onValueChange(listener);
13608 this.eType2.onValueChange(listener);
13609 this.eJoinOperatorOr.onValueChange(listener);
13610 this.eJoinOperatorAnd.onValueChange(listener);
13611 this.forEachInput(function (element) {
13612 _this.attachElementOnChange(element, listener);
13613 });
13614 };
13615 /** returns true if the row passes the said condition */
13616 SimpleFilter.prototype.individualConditionPasses = function (params, filterModel) {
13617 var cellValue = this.getCellValue(params.node);
13618 var values = this.mapValuesFromModel(filterModel);
13619 var customFilterOption = this.optionsFactory.getCustomOption(filterModel.type);
13620 var customFilterResult = this.evaluateCustomFilter(customFilterOption, values, cellValue);
13621 if (customFilterResult != null) {
13622 return customFilterResult;
13623 }
13624 if (cellValue == null) {
13625 return this.evaluateNullValue(filterModel.type);
13626 }
13627 return this.evaluateNonNullValue(values, cellValue, filterModel, params);
13628 };
13629 SimpleFilter.prototype.evaluateCustomFilter = function (customFilterOption, values, cellValue) {
13630 if (customFilterOption == null) {
13631 return;
13632 }
13633 var predicate = customFilterOption.predicate;
13634 // only execute the custom filter if a value exists or a value isn't required, i.e. input is hidden
13635 if (predicate != null && !values.some(function (v) { return v == null; })) {
13636 return predicate(values, cellValue);
13637 }
13638 // No custom filter invocation, indicate that to the caller.
13639 return;
13640 };
13641 SimpleFilter.prototype.isBlank = function (cellValue) {
13642 return cellValue == null ||
13643 (typeof cellValue === 'string' && cellValue.trim().length === 0);
13644 };
13645 SimpleFilter.EMPTY = 'empty';
13646 SimpleFilter.BLANK = 'blank';
13647 SimpleFilter.NOT_BLANK = 'notBlank';
13648 SimpleFilter.EQUALS = 'equals';
13649 SimpleFilter.NOT_EQUAL = 'notEqual';
13650 SimpleFilter.LESS_THAN = 'lessThan';
13651 SimpleFilter.LESS_THAN_OR_EQUAL = 'lessThanOrEqual';
13652 SimpleFilter.GREATER_THAN = 'greaterThan';
13653 SimpleFilter.GREATER_THAN_OR_EQUAL = 'greaterThanOrEqual';
13654 SimpleFilter.IN_RANGE = 'inRange';
13655 SimpleFilter.CONTAINS = 'contains';
13656 SimpleFilter.NOT_CONTAINS = 'notContains';
13657 SimpleFilter.STARTS_WITH = 'startsWith';
13658 SimpleFilter.ENDS_WITH = 'endsWith';
13659 __decorate([
13660 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eOptions1')
13661 ], SimpleFilter.prototype, "eType1", void 0);
13662 __decorate([
13663 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eOptions2')
13664 ], SimpleFilter.prototype, "eType2", void 0);
13665 __decorate([
13666 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eJoinOperatorPanel')
13667 ], SimpleFilter.prototype, "eJoinOperatorPanel", void 0);
13668 __decorate([
13669 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eJoinOperatorAnd')
13670 ], SimpleFilter.prototype, "eJoinOperatorAnd", void 0);
13671 __decorate([
13672 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eJoinOperatorOr')
13673 ], SimpleFilter.prototype, "eJoinOperatorOr", void 0);
13674 __decorate([
13675 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eCondition1Body')
13676 ], SimpleFilter.prototype, "eCondition1Body", void 0);
13677 __decorate([
13678 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eCondition2Body')
13679 ], SimpleFilter.prototype, "eCondition2Body", void 0);
13680 return SimpleFilter;
13681}(_providedFilter__WEBPACK_IMPORTED_MODULE_2__["ProvidedFilter"]));
13682
13683
13684
13685
13686
13687/***/ }),
13688/* 61 */
13689/***/ (function(module, __webpack_exports__, __webpack_require__) {
13690
13691"use strict";
13692__webpack_require__.r(__webpack_exports__);
13693/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OptionsFactory", function() { return OptionsFactory; });
13694/**
13695 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
13696 * @version v27.3.0
13697 * @link https://www.ag-grid.com/
13698 * @license MIT
13699 */
13700var __assign = (undefined && undefined.__assign) || function () {
13701 __assign = Object.assign || function(t) {
13702 for (var s, i = 1, n = arguments.length; i < n; i++) {
13703 s = arguments[i];
13704 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
13705 t[p] = s[p];
13706 }
13707 return t;
13708 };
13709 return __assign.apply(this, arguments);
13710};
13711/* Common logic for options, used by both filters and floating filters. */
13712var OptionsFactory = /** @class */ (function () {
13713 function OptionsFactory() {
13714 this.customFilterOptions = {};
13715 }
13716 OptionsFactory.prototype.init = function (params, defaultOptions) {
13717 this.filterOptions = params.filterOptions || defaultOptions;
13718 this.mapCustomOptions();
13719 this.selectDefaultItem(params);
13720 this.checkForDeprecatedParams();
13721 };
13722 OptionsFactory.prototype.checkForDeprecatedParams = function () {
13723 if (this.filterOptions.some(function (opt) { return typeof opt != 'string' && opt.test != null; })) {
13724 console.warn("AG Grid: [IFilterOptionDef] since v26.2.0, test() has been replaced with predicate().");
13725 }
13726 if (this.filterOptions.some(function (opt) { return typeof opt != 'string' && opt.hideFilterInput != null; })) {
13727 console.warn("AG Grid: [IFilterOptionDef] since v26.2.0, useOfHideFilterInput has been replaced with numberOfInputs.");
13728 }
13729 };
13730 OptionsFactory.prototype.getFilterOptions = function () {
13731 return this.filterOptions;
13732 };
13733 OptionsFactory.prototype.mapCustomOptions = function () {
13734 var _this = this;
13735 if (!this.filterOptions) {
13736 return;
13737 }
13738 this.filterOptions.forEach(function (filterOption) {
13739 if (typeof filterOption === 'string') {
13740 return;
13741 }
13742 var requiredProperties = [['displayKey'], ['displayName'], ['predicate', 'test']];
13743 var propertyCheck = function (keys) {
13744 if (!keys.some(function (key) { return filterOption[key] != null; })) {
13745 console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '" + keys + "'");
13746 return false;
13747 }
13748 return true;
13749 };
13750 if (!requiredProperties.every(propertyCheck)) {
13751 _this.filterOptions = _this.filterOptions.filter(function (v) { return v === filterOption; }) || [];
13752 return;
13753 }
13754 var test = filterOption.test;
13755 var mutatedFilterOptions = __assign({}, filterOption);
13756 if (test != null && filterOption.predicate == null) {
13757 mutatedFilterOptions.predicate = function (v, cv) { return test(v[0], cv); };
13758 delete mutatedFilterOptions.test;
13759 }
13760 if (mutatedFilterOptions.hideFilterInput && mutatedFilterOptions.numberOfInputs == null) {
13761 mutatedFilterOptions.numberOfInputs = 0;
13762 delete mutatedFilterOptions.hideFilterInput;
13763 }
13764 _this.customFilterOptions[filterOption.displayKey] = mutatedFilterOptions;
13765 });
13766 };
13767 OptionsFactory.prototype.selectDefaultItem = function (params) {
13768 if (params.defaultOption) {
13769 this.defaultOption = params.defaultOption;
13770 }
13771 else if (this.filterOptions.length >= 1) {
13772 var firstFilterOption = this.filterOptions[0];
13773 if (typeof firstFilterOption === 'string') {
13774 this.defaultOption = firstFilterOption;
13775 }
13776 else if (firstFilterOption.displayKey) {
13777 this.defaultOption = firstFilterOption.displayKey;
13778 }
13779 else {
13780 console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'");
13781 }
13782 }
13783 else {
13784 console.warn('AG Grid: no filter options for filter');
13785 }
13786 };
13787 OptionsFactory.prototype.getDefaultOption = function () {
13788 return this.defaultOption;
13789 };
13790 OptionsFactory.prototype.getCustomOption = function (name) {
13791 return this.customFilterOptions[name];
13792 };
13793 return OptionsFactory;
13794}());
13795
13796
13797
13798
13799
13800/***/ }),
13801/* 62 */
13802/***/ (function(module, __webpack_exports__, __webpack_require__) {
13803
13804"use strict";
13805__webpack_require__.r(__webpack_exports__);
13806/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProvidedFilter", function() { return ProvidedFilter; });
13807/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
13808/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42);
13809/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
13810/* harmony import */ var _filterLocaleText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63);
13811/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(64);
13812/* harmony import */ var _utils_set__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52);
13813/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36);
13814/**
13815 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
13816 * @version v27.3.0
13817 * @link https://www.ag-grid.com/
13818 * @license MIT
13819 */
13820var __extends = (undefined && undefined.__extends) || (function () {
13821 var extendStatics = function (d, b) {
13822 extendStatics = Object.setPrototypeOf ||
13823 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
13824 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
13825 return extendStatics(d, b);
13826 };
13827 return function (d, b) {
13828 extendStatics(d, b);
13829 function __() { this.constructor = d; }
13830 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13831 };
13832})();
13833var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
13834 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
13835 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
13836 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13837 return c > 3 && r && Object.defineProperty(target, key, r), r;
13838};
13839
13840
13841
13842
13843
13844
13845
13846/**
13847 * Contains common logic to all provided filters (apply button, clear button, etc).
13848 * All the filters that come with AG Grid extend this class. User filters do not
13849 * extend this class.
13850 *
13851 * @param M type of filter-model managed by the concrete sub-class that extends this type
13852 * @param V type of value managed by the concrete sub-class that extends this type
13853 */
13854var ProvidedFilter = /** @class */ (function (_super) {
13855 __extends(ProvidedFilter, _super);
13856 function ProvidedFilter(filterNameKey) {
13857 var _this = _super.call(this) || this;
13858 _this.filterNameKey = filterNameKey;
13859 _this.applyActive = false;
13860 _this.hidePopup = null;
13861 // after the user hits 'apply' the model gets copied to here. this is then the model that we use for
13862 // all filtering. so if user changes UI but doesn't hit apply, then the UI will be out of sync with this model.
13863 // this is what we want, as the UI should only become the 'active' filter once it's applied. when apply is
13864 // inactive, this model will be in sync (following the debounce ms). if the UI is not a valid filter
13865 // (eg the value is missing so nothing to filter on, or for set filter all checkboxes are checked so filter
13866 // not active) then this appliedModel will be null/undefined.
13867 _this.appliedModel = null;
13868 return _this;
13869 }
13870 ProvidedFilter.prototype.postConstruct = function () {
13871 this.resetTemplate(); // do this first to create the DOM
13872 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_4__["ManagedFocusFeature"](this.getFocusableElement(), {
13873 handleKeyDown: this.handleKeyDown.bind(this)
13874 }));
13875 };
13876 // override
13877 ProvidedFilter.prototype.handleKeyDown = function (e) { };
13878 ProvidedFilter.prototype.getFilterTitle = function () {
13879 return this.translate(this.filterNameKey);
13880 };
13881 ProvidedFilter.prototype.isFilterActive = function () {
13882 // filter is active if we have a valid applied model
13883 return !!this.appliedModel;
13884 };
13885 ProvidedFilter.prototype.resetTemplate = function (paramsMap) {
13886 var templateString = /* html */ "\n <div class=\"ag-filter-wrapper\">\n <div class=\"ag-filter-body-wrapper ag-" + this.getCssIdentifier() + "-body-wrapper\">\n " + this.createBodyTemplate() + "\n </div>\n </div>";
13887 this.setTemplate(templateString, paramsMap);
13888 };
13889 ProvidedFilter.prototype.isReadOnly = function () {
13890 return !!this.providedFilterParams.readOnly;
13891 };
13892 ProvidedFilter.prototype.init = function (params) {
13893 var _this = this;
13894 this.setParams(params);
13895 this.resetUiToDefaults(true).then(function () {
13896 _this.updateUiVisibility();
13897 _this.setupOnBtApplyDebounce();
13898 });
13899 };
13900 ProvidedFilter.prototype.setParams = function (params) {
13901 this.providedFilterParams = params;
13902 this.applyActive = ProvidedFilter.isUseApplyButton(params);
13903 this.createButtonPanel();
13904 };
13905 ProvidedFilter.prototype.createButtonPanel = function () {
13906 var _this = this;
13907 var buttons = this.providedFilterParams.buttons;
13908 if (!buttons || buttons.length < 1 || this.isReadOnly()) {
13909 return;
13910 }
13911 var eButtonsPanel = document.createElement('div');
13912 eButtonsPanel.classList.add('ag-filter-apply-panel');
13913 var addButton = function (type) {
13914 var text;
13915 var clickListener;
13916 switch (type) {
13917 case 'apply':
13918 text = _this.translate('applyFilter');
13919 clickListener = function (e) { return _this.onBtApply(false, false, e); };
13920 break;
13921 case 'clear':
13922 text = _this.translate('clearFilter');
13923 clickListener = function () { return _this.onBtClear(); };
13924 break;
13925 case 'reset':
13926 text = _this.translate('resetFilter');
13927 clickListener = function () { return _this.onBtReset(); };
13928 break;
13929 case 'cancel':
13930 text = _this.translate('cancelFilter');
13931 clickListener = function (e) { _this.onBtCancel(e); };
13932 break;
13933 default:
13934 console.warn('AG Grid: Unknown button type specified');
13935 return;
13936 }
13937 var button = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["loadTemplate"])(
13938 /* html */
13939 "<button\n type=\"button\"\n ref=\"" + type + "FilterButton\"\n class=\"ag-standard-button ag-filter-apply-panel-button\"\n >" + text + "\n </button>");
13940 eButtonsPanel.appendChild(button);
13941 _this.addManagedListener(button, 'click', clickListener);
13942 };
13943 Object(_utils_set__WEBPACK_IMPORTED_MODULE_5__["convertToSet"])(buttons).forEach(function (type) { return addButton(type); });
13944 this.getGui().appendChild(eButtonsPanel);
13945 };
13946 // subclasses can override this to provide alternative debounce defaults
13947 ProvidedFilter.prototype.getDefaultDebounceMs = function () {
13948 return 0;
13949 };
13950 ProvidedFilter.prototype.setupOnBtApplyDebounce = function () {
13951 var debounceMs = ProvidedFilter.getDebounceMs(this.providedFilterParams, this.getDefaultDebounceMs());
13952 this.onBtApplyDebounce = Object(_utils_function__WEBPACK_IMPORTED_MODULE_2__["debounce"])(this.onBtApply.bind(this), debounceMs);
13953 };
13954 ProvidedFilter.prototype.getModel = function () {
13955 return this.appliedModel ? this.appliedModel : null;
13956 };
13957 ProvidedFilter.prototype.setModel = function (model) {
13958 var _this = this;
13959 var promise = model != null ? this.setModelIntoUi(model) : this.resetUiToDefaults();
13960 return promise.then(function () {
13961 _this.updateUiVisibility();
13962 // we set the model from the GUI, rather than the provided model,
13963 // so the model is consistent, e.g. handling of null/undefined will be the same,
13964 // or if model is case insensitive, then casing is removed.
13965 _this.applyModel();
13966 });
13967 };
13968 ProvidedFilter.prototype.onBtCancel = function (e) {
13969 var _this = this;
13970 var currentModel = this.getModel();
13971 var afterAppliedFunc = function () {
13972 _this.onUiChanged(false, 'prevent');
13973 if (_this.providedFilterParams.closeOnApply) {
13974 _this.close(e);
13975 }
13976 };
13977 if (currentModel != null) {
13978 this.setModelIntoUi(currentModel).then(afterAppliedFunc);
13979 }
13980 else {
13981 this.resetUiToDefaults().then(afterAppliedFunc);
13982 }
13983 };
13984 ProvidedFilter.prototype.onBtClear = function () {
13985 var _this = this;
13986 this.resetUiToDefaults().then(function () { return _this.onUiChanged(); });
13987 };
13988 ProvidedFilter.prototype.onBtReset = function () {
13989 this.onBtClear();
13990 this.onBtApply();
13991 };
13992 /**
13993 * Applies changes made in the UI to the filter, and returns true if the model has changed.
13994 */
13995 ProvidedFilter.prototype.applyModel = function () {
13996 var newModel = this.getModelFromUi();
13997 if (!this.isModelValid(newModel)) {
13998 return false;
13999 }
14000 var previousModel = this.appliedModel;
14001 this.appliedModel = newModel;
14002 // models can be same if user pasted same content into text field, or maybe just changed the case
14003 // and it's a case insensitive filter
14004 return !this.areModelsEqual(previousModel, newModel);
14005 };
14006 ProvidedFilter.prototype.isModelValid = function (model) {
14007 return true;
14008 };
14009 ProvidedFilter.prototype.onBtApply = function (afterFloatingFilter, afterDataChange, e) {
14010 if (afterFloatingFilter === void 0) { afterFloatingFilter = false; }
14011 if (afterDataChange === void 0) { afterDataChange = false; }
14012 if (this.applyModel()) {
14013 // the floating filter uses 'afterFloatingFilter' info, so it doesn't refresh after filter changed if change
14014 // came from floating filter
14015 this.providedFilterParams.filterChangedCallback({ afterFloatingFilter: afterFloatingFilter, afterDataChange: afterDataChange });
14016 }
14017 var closeOnApply = this.providedFilterParams.closeOnApply;
14018 // only close if an apply button is visible, otherwise we'd be closing every time a change was made!
14019 if (closeOnApply && this.applyActive && !afterFloatingFilter && !afterDataChange) {
14020 this.close(e);
14021 }
14022 };
14023 ProvidedFilter.prototype.onNewRowsLoaded = function () {
14024 };
14025 ProvidedFilter.prototype.close = function (e) {
14026 if (!this.hidePopup) {
14027 return;
14028 }
14029 var keyboardEvent = e;
14030 var key = keyboardEvent && keyboardEvent.key;
14031 var params;
14032 if (key === 'Enter' || key === 'Space') {
14033 params = { keyboardEvent: keyboardEvent };
14034 }
14035 this.hidePopup(params);
14036 this.hidePopup = null;
14037 };
14038 /**
14039 * By default, if the change came from a floating filter it will be applied immediately, otherwise if there is no
14040 * apply button it will be applied after a debounce, otherwise it will not be applied at all. This behaviour can
14041 * be adjusted by using the apply parameter.
14042 */
14043 ProvidedFilter.prototype.onUiChanged = function (fromFloatingFilter, apply) {
14044 if (fromFloatingFilter === void 0) { fromFloatingFilter = false; }
14045 this.updateUiVisibility();
14046 this.providedFilterParams.filterModifiedCallback();
14047 if (this.applyActive && !this.isReadOnly) {
14048 var isValid = this.isModelValid(this.getModelFromUi());
14049 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisabled"])(this.getRefElement('applyFilterButton'), !isValid);
14050 }
14051 if ((fromFloatingFilter && !apply) || apply === 'immediately') {
14052 this.onBtApply(fromFloatingFilter);
14053 }
14054 else if ((!this.applyActive && !apply) || apply === 'debounce') {
14055 this.onBtApplyDebounce();
14056 }
14057 };
14058 ProvidedFilter.prototype.afterGuiAttached = function (params) {
14059 if (params == null) {
14060 return;
14061 }
14062 this.hidePopup = params.hidePopup;
14063 };
14064 // static, as used by floating filter also
14065 ProvidedFilter.getDebounceMs = function (params, debounceDefault) {
14066 if (ProvidedFilter.isUseApplyButton(params)) {
14067 if (params.debounceMs != null) {
14068 console.warn('AG Grid: debounceMs is ignored when apply button is present');
14069 }
14070 return 0;
14071 }
14072 return params.debounceMs != null ? params.debounceMs : debounceDefault;
14073 };
14074 // static, as used by floating filter also
14075 ProvidedFilter.isUseApplyButton = function (params) {
14076 return !!params.buttons && params.buttons.indexOf('apply') >= 0;
14077 };
14078 ProvidedFilter.prototype.destroy = function () {
14079 this.hidePopup = null;
14080 _super.prototype.destroy.call(this);
14081 };
14082 ProvidedFilter.prototype.translate = function (key) {
14083 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
14084 return translate(key, _filterLocaleText__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_FILTER_LOCALE_TEXT"][key]);
14085 };
14086 ProvidedFilter.prototype.getCellValue = function (rowNode) {
14087 var _a = this.providedFilterParams, api = _a.api, colDef = _a.colDef, column = _a.column, columnApi = _a.columnApi, context = _a.context;
14088 return this.providedFilterParams.valueGetter({
14089 api: api,
14090 colDef: colDef,
14091 column: column,
14092 columnApi: columnApi,
14093 context: context,
14094 data: rowNode.data,
14095 getValue: function (field) { return rowNode.data[field]; },
14096 node: rowNode,
14097 });
14098 };
14099 __decorate([
14100 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
14101 ], ProvidedFilter.prototype, "rowModel", void 0);
14102 __decorate([
14103 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueService')
14104 ], ProvidedFilter.prototype, "valueService", void 0);
14105 __decorate([
14106 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
14107 ], ProvidedFilter.prototype, "postConstruct", null);
14108 return ProvidedFilter;
14109}(_widgets_component__WEBPACK_IMPORTED_MODULE_6__["Component"]));
14110
14111
14112
14113
14114
14115/***/ }),
14116/* 63 */
14117/***/ (function(module, __webpack_exports__, __webpack_require__) {
14118
14119"use strict";
14120__webpack_require__.r(__webpack_exports__);
14121/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_FILTER_LOCALE_TEXT", function() { return DEFAULT_FILTER_LOCALE_TEXT; });
14122/**
14123 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14124 * @version v27.3.0
14125 * @link https://www.ag-grid.com/
14126 * @license MIT
14127 */
14128var DEFAULT_FILTER_LOCALE_TEXT = {
14129 applyFilter: 'Apply',
14130 clearFilter: 'Clear',
14131 resetFilter: 'Reset',
14132 cancelFilter: 'Cancel',
14133 textFilter: 'Text Filter',
14134 numberFilter: 'Number Filter',
14135 dateFilter: 'Date Filter',
14136 setFilter: 'Set Filter',
14137 filterOoo: 'Filter...',
14138 empty: 'Choose One',
14139 equals: 'Equals',
14140 notEqual: 'Not equal',
14141 lessThan: 'Less than',
14142 greaterThan: 'Greater than',
14143 inRange: 'In range',
14144 inRangeStart: 'From',
14145 inRangeEnd: 'To',
14146 lessThanOrEqual: 'Less than or equals',
14147 greaterThanOrEqual: 'Greater than or equals',
14148 contains: 'Contains',
14149 notContains: 'Not contains',
14150 startsWith: 'Starts with',
14151 endsWith: 'Ends with',
14152 blank: 'Blank',
14153 notBlank: 'Not blank',
14154 andCondition: 'AND',
14155 orCondition: 'OR',
14156 dateFormatOoo: 'yyyy-mm-dd',
14157};
14158
14159
14160
14161
14162/***/ }),
14163/* 64 */
14164/***/ (function(module, __webpack_exports__, __webpack_require__) {
14165
14166"use strict";
14167__webpack_require__.r(__webpack_exports__);
14168/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ManagedFocusFeature", function() { return ManagedFocusFeature; });
14169/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
14170/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65);
14171/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21);
14172/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
14173/**
14174 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14175 * @version v27.3.0
14176 * @link https://www.ag-grid.com/
14177 * @license MIT
14178 */
14179var __extends = (undefined && undefined.__extends) || (function () {
14180 var extendStatics = function (d, b) {
14181 extendStatics = Object.setPrototypeOf ||
14182 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14183 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
14184 return extendStatics(d, b);
14185 };
14186 return function (d, b) {
14187 extendStatics(d, b);
14188 function __() { this.constructor = d; }
14189 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14190 };
14191})();
14192var __assign = (undefined && undefined.__assign) || function () {
14193 __assign = Object.assign || function(t) {
14194 for (var s, i = 1, n = arguments.length; i < n; i++) {
14195 s = arguments[i];
14196 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
14197 t[p] = s[p];
14198 }
14199 return t;
14200 };
14201 return __assign.apply(this, arguments);
14202};
14203var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
14204 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14205 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14206 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
14207 return c > 3 && r && Object.defineProperty(target, key, r), r;
14208};
14209
14210
14211
14212
14213var ManagedFocusFeature = /** @class */ (function (_super) {
14214 __extends(ManagedFocusFeature, _super);
14215 function ManagedFocusFeature(eFocusableElement, callbacks) {
14216 if (callbacks === void 0) { callbacks = {}; }
14217 var _this = _super.call(this) || this;
14218 _this.eFocusableElement = eFocusableElement;
14219 _this.callbacks = callbacks;
14220 _this.callbacks = __assign({ shouldStopEventPropagation: function () { return false; }, onTabKeyDown: function (e) {
14221 if (e.defaultPrevented) {
14222 return;
14223 }
14224 var nextRoot = _this.focusService.findNextFocusableElement(_this.eFocusableElement, false, e.shiftKey);
14225 if (!nextRoot) {
14226 return;
14227 }
14228 nextRoot.focus();
14229 e.preventDefault();
14230 } }, callbacks);
14231 return _this;
14232 }
14233 ManagedFocusFeature.prototype.postConstruct = function () {
14234 this.eFocusableElement.classList.add(ManagedFocusFeature.FOCUS_MANAGED_CLASS);
14235 this.addKeyDownListeners(this.eFocusableElement);
14236 if (this.callbacks.onFocusIn) {
14237 this.addManagedListener(this.eFocusableElement, 'focusin', this.callbacks.onFocusIn);
14238 }
14239 if (this.callbacks.onFocusOut) {
14240 this.addManagedListener(this.eFocusableElement, 'focusout', this.callbacks.onFocusOut);
14241 }
14242 };
14243 ManagedFocusFeature.prototype.addKeyDownListeners = function (eGui) {
14244 var _this = this;
14245 this.addManagedListener(eGui, 'keydown', function (e) {
14246 if (e.defaultPrevented || Object(_utils_event__WEBPACK_IMPORTED_MODULE_2__["isStopPropagationForAgGrid"])(e)) {
14247 return;
14248 }
14249 if (_this.callbacks.shouldStopEventPropagation(e)) {
14250 Object(_utils_event__WEBPACK_IMPORTED_MODULE_2__["stopPropagationForAgGrid"])(e);
14251 return;
14252 }
14253 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].TAB) {
14254 _this.callbacks.onTabKeyDown(e);
14255 }
14256 else if (_this.callbacks.handleKeyDown) {
14257 _this.callbacks.handleKeyDown(e);
14258 }
14259 });
14260 };
14261 ManagedFocusFeature.FOCUS_MANAGED_CLASS = 'ag-focus-managed';
14262 __decorate([
14263 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
14264 ], ManagedFocusFeature.prototype, "focusService", void 0);
14265 __decorate([
14266 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
14267 ], ManagedFocusFeature.prototype, "postConstruct", null);
14268 return ManagedFocusFeature;
14269}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
14270
14271
14272
14273
14274
14275/***/ }),
14276/* 65 */
14277/***/ (function(module, __webpack_exports__, __webpack_require__) {
14278
14279"use strict";
14280__webpack_require__.r(__webpack_exports__);
14281/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyCode", function() { return KeyCode; });
14282/**
14283 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14284 * @version v27.3.0
14285 * @link https://www.ag-grid.com/
14286 * @license MIT
14287 */
14288var KeyCode = /** @class */ (function () {
14289 function KeyCode() {
14290 }
14291 KeyCode.BACKSPACE = 'Backspace';
14292 KeyCode.TAB = 'Tab';
14293 KeyCode.ENTER = 'Enter';
14294 KeyCode.ESCAPE = 'Escape';
14295 KeyCode.SPACE = ' ';
14296 KeyCode.LEFT = 'ArrowLeft';
14297 KeyCode.UP = 'ArrowUp';
14298 KeyCode.RIGHT = 'ArrowRight';
14299 KeyCode.DOWN = 'ArrowDown';
14300 KeyCode.DELETE = 'Delete';
14301 KeyCode.F2 = 'F2';
14302 KeyCode.PAGE_UP = 'PageUp';
14303 KeyCode.PAGE_DOWN = 'PageDown';
14304 KeyCode.PAGE_HOME = 'Home';
14305 KeyCode.PAGE_END = 'End';
14306 // these should be used with `event.code` instead of `event.key`
14307 // as `event.key` changes when non-latin keyboards are used
14308 KeyCode.A = 'KeyA';
14309 KeyCode.C = 'KeyC';
14310 KeyCode.V = 'KeyV';
14311 KeyCode.D = 'KeyD';
14312 KeyCode.Z = 'KeyZ';
14313 KeyCode.Y = 'KeyY';
14314 return KeyCode;
14315}());
14316
14317
14318
14319
14320
14321/***/ }),
14322/* 66 */
14323/***/ (function(module, __webpack_exports__, __webpack_require__) {
14324
14325"use strict";
14326__webpack_require__.r(__webpack_exports__);
14327/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgSelect", function() { return AgSelect; });
14328/* harmony import */ var _agAbstractField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67);
14329/* harmony import */ var _agPickerField__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69);
14330/* harmony import */ var _agList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70);
14331/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
14332/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
14333/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(44);
14334/**
14335 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14336 * @version v27.3.0
14337 * @link https://www.ag-grid.com/
14338 * @license MIT
14339 */
14340var __extends = (undefined && undefined.__extends) || (function () {
14341 var extendStatics = function (d, b) {
14342 extendStatics = Object.setPrototypeOf ||
14343 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14344 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
14345 return extendStatics(d, b);
14346 };
14347 return function (d, b) {
14348 extendStatics(d, b);
14349 function __() { this.constructor = d; }
14350 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14351 };
14352})();
14353var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
14354 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14355 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14356 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
14357 return c > 3 && r && Object.defineProperty(target, key, r), r;
14358};
14359
14360
14361
14362
14363
14364
14365var AgSelect = /** @class */ (function (_super) {
14366 __extends(AgSelect, _super);
14367 function AgSelect(config) {
14368 return _super.call(this, config, 'ag-select', 'smallDown', 'listbox') || this;
14369 }
14370 AgSelect.prototype.init = function () {
14371 var _this = this;
14372 this.listComponent = this.createBean(new _agList__WEBPACK_IMPORTED_MODULE_2__["AgList"]('select'));
14373 this.listComponent.setParentComponent(this);
14374 this.eWrapper.tabIndex = 0;
14375 this.listComponent.addManagedListener(this.listComponent, _agList__WEBPACK_IMPORTED_MODULE_2__["AgList"].EVENT_ITEM_SELECTED, function () { if (_this.hideList) {
14376 _this.hideList();
14377 } });
14378 this.listComponent.addManagedListener(this.listComponent, _agAbstractField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractField"].EVENT_CHANGED, function () {
14379 _this.setValue(_this.listComponent.getValue(), false, true);
14380 if (_this.hideList) {
14381 _this.hideList();
14382 }
14383 });
14384 };
14385 AgSelect.prototype.showPicker = function () {
14386 var _this = this;
14387 var listGui = this.listComponent.getGui();
14388 var eDocument = this.gridOptionsWrapper.getDocument();
14389 var destroyMouseWheelFunc = this.addManagedListener(eDocument.body, 'wheel', function (e) {
14390 if (!listGui.contains(e.target) && _this.hideList) {
14391 _this.hideList();
14392 }
14393 });
14394 var destroyFocusOutFunc = this.addManagedListener(listGui, 'focusout', function (e) {
14395 if (!listGui.contains(e.relatedTarget) && _this.hideList) {
14396 _this.hideList();
14397 }
14398 });
14399 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
14400 var addPopupRes = this.popupService.addPopup({
14401 modal: true,
14402 eChild: listGui,
14403 closeOnEsc: true,
14404 closedCallback: function () {
14405 _this.hideList = null;
14406 _this.isPickerDisplayed = false;
14407 destroyFocusOutFunc();
14408 destroyMouseWheelFunc();
14409 if (_this.isAlive()) {
14410 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaExpanded"])(_this.eWrapper, false);
14411 _this.getFocusableElement().focus();
14412 }
14413 },
14414 ariaLabel: translate('ariaLabelSelectField', 'Select Field')
14415 });
14416 if (addPopupRes) {
14417 this.hideList = addPopupRes.hideFunc;
14418 }
14419 this.isPickerDisplayed = true;
14420 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setElementWidth"])(listGui, Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["getAbsoluteWidth"])(this.eWrapper));
14421 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaExpanded"])(this.eWrapper, true);
14422 listGui.style.maxHeight = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["getInnerHeight"])(this.popupService.getPopupParent()) + 'px';
14423 listGui.style.position = 'absolute';
14424 this.popupService.positionPopupUnderComponent({
14425 type: 'ag-list',
14426 eventSource: this.eWrapper,
14427 ePopup: listGui,
14428 keepWithinBounds: true
14429 });
14430 this.listComponent.refreshHighlighted();
14431 return this.listComponent;
14432 };
14433 AgSelect.prototype.addOptions = function (options) {
14434 var _this = this;
14435 options.forEach(function (option) { return _this.addOption(option); });
14436 return this;
14437 };
14438 AgSelect.prototype.addOption = function (option) {
14439 this.listComponent.addOption(option);
14440 return this;
14441 };
14442 AgSelect.prototype.setValue = function (value, silent, fromPicker) {
14443 if (this.value === value) {
14444 return this;
14445 }
14446 if (!fromPicker) {
14447 this.listComponent.setValue(value, true);
14448 }
14449 var newValue = this.listComponent.getValue();
14450 if (newValue === this.getValue()) {
14451 return this;
14452 }
14453 this.eDisplayField.innerHTML = this.listComponent.getDisplayValue();
14454 return _super.prototype.setValue.call(this, value, silent);
14455 };
14456 AgSelect.prototype.destroy = function () {
14457 if (this.hideList) {
14458 this.hideList();
14459 }
14460 this.destroyBean(this.listComponent);
14461 _super.prototype.destroy.call(this);
14462 };
14463 __decorate([
14464 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('popupService')
14465 ], AgSelect.prototype, "popupService", void 0);
14466 __decorate([
14467 _context_context__WEBPACK_IMPORTED_MODULE_3__["PostConstruct"]
14468 ], AgSelect.prototype, "init", null);
14469 return AgSelect;
14470}(_agPickerField__WEBPACK_IMPORTED_MODULE_1__["AgPickerField"]));
14471
14472
14473
14474
14475
14476/***/ }),
14477/* 67 */
14478/***/ (function(module, __webpack_exports__, __webpack_require__) {
14479
14480"use strict";
14481__webpack_require__.r(__webpack_exports__);
14482/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgAbstractField", function() { return AgAbstractField; });
14483/* harmony import */ var _agAbstractLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68);
14484/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42);
14485/**
14486 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14487 * @version v27.3.0
14488 * @link https://www.ag-grid.com/
14489 * @license MIT
14490 */
14491var __extends = (undefined && undefined.__extends) || (function () {
14492 var extendStatics = function (d, b) {
14493 extendStatics = Object.setPrototypeOf ||
14494 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14495 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
14496 return extendStatics(d, b);
14497 };
14498 return function (d, b) {
14499 extendStatics(d, b);
14500 function __() { this.constructor = d; }
14501 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14502 };
14503})();
14504
14505
14506var AgAbstractField = /** @class */ (function (_super) {
14507 __extends(AgAbstractField, _super);
14508 function AgAbstractField(config, template, className) {
14509 var _this = _super.call(this, config, template) || this;
14510 _this.className = className;
14511 _this.disabled = false;
14512 return _this;
14513 }
14514 AgAbstractField.prototype.postConstruct = function () {
14515 _super.prototype.postConstruct.call(this);
14516 if (this.className) {
14517 this.addCssClass(this.className);
14518 }
14519 };
14520 AgAbstractField.prototype.onValueChange = function (callbackFn) {
14521 var _this = this;
14522 this.addManagedListener(this, AgAbstractField.EVENT_CHANGED, function () { return callbackFn(_this.getValue()); });
14523 return this;
14524 };
14525 AgAbstractField.prototype.getWidth = function () {
14526 return this.getGui().clientWidth;
14527 };
14528 AgAbstractField.prototype.setWidth = function (width) {
14529 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setFixedWidth"])(this.getGui(), width);
14530 return this;
14531 };
14532 AgAbstractField.prototype.getPreviousValue = function () {
14533 return this.previousValue;
14534 };
14535 AgAbstractField.prototype.getValue = function () {
14536 return this.value;
14537 };
14538 AgAbstractField.prototype.setValue = function (value, silent) {
14539 if (this.value === value) {
14540 return this;
14541 }
14542 this.previousValue = this.value;
14543 this.value = value;
14544 if (!silent) {
14545 this.dispatchEvent({ type: AgAbstractField.EVENT_CHANGED });
14546 }
14547 return this;
14548 };
14549 AgAbstractField.prototype.setDisabled = function (disabled) {
14550 disabled = !!disabled;
14551 var element = this.getGui();
14552 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisabled"])(element, disabled);
14553 element.classList.toggle('ag-disabled', disabled);
14554 this.disabled = disabled;
14555 return this;
14556 };
14557 AgAbstractField.prototype.isDisabled = function () {
14558 return !!this.disabled;
14559 };
14560 AgAbstractField.EVENT_CHANGED = 'valueChange';
14561 return AgAbstractField;
14562}(_agAbstractLabel__WEBPACK_IMPORTED_MODULE_0__["AgAbstractLabel"]));
14563
14564
14565
14566
14567
14568/***/ }),
14569/* 68 */
14570/***/ (function(module, __webpack_exports__, __webpack_require__) {
14571
14572"use strict";
14573__webpack_require__.r(__webpack_exports__);
14574/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgAbstractLabel", function() { return AgAbstractLabel; });
14575/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
14576/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
14577/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
14578/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44);
14579/**
14580 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14581 * @version v27.3.0
14582 * @link https://www.ag-grid.com/
14583 * @license MIT
14584 */
14585var __extends = (undefined && undefined.__extends) || (function () {
14586 var extendStatics = function (d, b) {
14587 extendStatics = Object.setPrototypeOf ||
14588 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14589 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
14590 return extendStatics(d, b);
14591 };
14592 return function (d, b) {
14593 extendStatics(d, b);
14594 function __() { this.constructor = d; }
14595 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14596 };
14597})();
14598var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
14599 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14600 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14601 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
14602 return c > 3 && r && Object.defineProperty(target, key, r), r;
14603};
14604
14605
14606
14607
14608var AgAbstractLabel = /** @class */ (function (_super) {
14609 __extends(AgAbstractLabel, _super);
14610 function AgAbstractLabel(config, template) {
14611 var _this = _super.call(this, template) || this;
14612 _this.labelSeparator = '';
14613 _this.labelAlignment = 'left';
14614 _this.label = '';
14615 _this.config = config || {};
14616 return _this;
14617 }
14618 AgAbstractLabel.prototype.postConstruct = function () {
14619 this.addCssClass('ag-labeled');
14620 this.eLabel.classList.add('ag-label');
14621 var _a = this.config, labelSeparator = _a.labelSeparator, label = _a.label, labelWidth = _a.labelWidth, labelAlignment = _a.labelAlignment;
14622 if (labelSeparator != null) {
14623 this.setLabelSeparator(labelSeparator);
14624 }
14625 if (label != null) {
14626 this.setLabel(label);
14627 }
14628 if (labelWidth != null) {
14629 this.setLabelWidth(labelWidth);
14630 }
14631 this.setLabelAlignment(labelAlignment || this.labelAlignment);
14632 this.refreshLabel();
14633 };
14634 AgAbstractLabel.prototype.refreshLabel = function () {
14635 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["clearElement"])(this.eLabel);
14636 if (typeof this.label === 'string') {
14637 this.eLabel.innerText = this.label + this.labelSeparator;
14638 }
14639 else if (this.label) {
14640 this.eLabel.appendChild(this.label);
14641 }
14642 if (this.label === '') {
14643 this.eLabel.classList.add('ag-hidden');
14644 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaRole"])(this.eLabel, 'presentation');
14645 }
14646 else {
14647 this.eLabel.classList.remove('ag-hidden');
14648 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaRole"])(this.eLabel, null);
14649 }
14650 };
14651 AgAbstractLabel.prototype.setLabelSeparator = function (labelSeparator) {
14652 if (this.labelSeparator === labelSeparator) {
14653 return this;
14654 }
14655 this.labelSeparator = labelSeparator;
14656 if (this.label != null) {
14657 this.refreshLabel();
14658 }
14659 return this;
14660 };
14661 AgAbstractLabel.prototype.getLabelId = function () {
14662 this.eLabel.id = this.eLabel.id || "ag-" + this.getCompId() + "-label";
14663 return this.eLabel.id;
14664 };
14665 AgAbstractLabel.prototype.getLabel = function () {
14666 return this.label;
14667 };
14668 AgAbstractLabel.prototype.setLabel = function (label) {
14669 if (this.label === label) {
14670 return this;
14671 }
14672 this.label = label;
14673 this.refreshLabel();
14674 return this;
14675 };
14676 AgAbstractLabel.prototype.setLabelAlignment = function (alignment) {
14677 var eGui = this.getGui();
14678 var eGuiClassList = eGui.classList;
14679 eGuiClassList.toggle('ag-label-align-left', alignment === 'left');
14680 eGuiClassList.toggle('ag-label-align-right', alignment === 'right');
14681 eGuiClassList.toggle('ag-label-align-top', alignment === 'top');
14682 return this;
14683 };
14684 AgAbstractLabel.prototype.setLabelWidth = function (width) {
14685 if (this.label == null) {
14686 return this;
14687 }
14688 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setElementWidth"])(this.eLabel, width);
14689 return this;
14690 };
14691 __decorate([
14692 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
14693 ], AgAbstractLabel.prototype, "postConstruct", null);
14694 return AgAbstractLabel;
14695}(_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
14696
14697
14698
14699
14700
14701/***/ }),
14702/* 69 */
14703/***/ (function(module, __webpack_exports__, __webpack_require__) {
14704
14705"use strict";
14706__webpack_require__.r(__webpack_exports__);
14707/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgPickerField", function() { return AgPickerField; });
14708/* harmony import */ var _agAbstractField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67);
14709/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
14710/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44);
14711/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48);
14712/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
14713/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42);
14714/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(65);
14715/**
14716 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14717 * @version v27.3.0
14718 * @link https://www.ag-grid.com/
14719 * @license MIT
14720 */
14721var __extends = (undefined && undefined.__extends) || (function () {
14722 var extendStatics = function (d, b) {
14723 extendStatics = Object.setPrototypeOf ||
14724 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14725 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
14726 return extendStatics(d, b);
14727 };
14728 return function (d, b) {
14729 extendStatics(d, b);
14730 function __() { this.constructor = d; }
14731 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14732 };
14733})();
14734var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
14735 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14736 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14737 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
14738 return c > 3 && r && Object.defineProperty(target, key, r), r;
14739};
14740
14741
14742
14743
14744
14745
14746
14747var AgPickerField = /** @class */ (function (_super) {
14748 __extends(AgPickerField, _super);
14749 function AgPickerField(config, className, pickerIcon, ariaRole) {
14750 var _this = _super.call(this, config,
14751 /* html */ "<div class=\"ag-picker-field\" role=\"presentation\">\n <div ref=\"eLabel\"></div>\n <div ref=\"eWrapper\"\n class=\"ag-wrapper ag-picker-field-wrapper\"\n tabIndex=\"-1\"\n aria-expanded=\"false\"\n " + (ariaRole ? "role=\"" + ariaRole + "\"" : '') + "\n >\n <div ref=\"eDisplayField\" class=\"ag-picker-field-display\"></div>\n <div ref=\"eIcon\" class=\"ag-picker-field-icon\" aria-hidden=\"true\"></div>\n </div>\n </div>", className) || this;
14752 _this.pickerIcon = pickerIcon;
14753 _this.isPickerDisplayed = false;
14754 _this.isDestroyingPicker = false;
14755 _this.skipClick = false;
14756 return _this;
14757 }
14758 AgPickerField.prototype.postConstruct = function () {
14759 var _this = this;
14760 _super.prototype.postConstruct.call(this);
14761 var displayId = this.getCompId() + "-display";
14762 this.eDisplayField.setAttribute('id', displayId);
14763 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaDescribedBy"])(this.eWrapper, displayId);
14764 var clickHandler = function () {
14765 if (_this.skipClick) {
14766 _this.skipClick = false;
14767 return;
14768 }
14769 if (_this.isDisabled()) {
14770 return;
14771 }
14772 _this.pickerComponent = _this.showPicker();
14773 };
14774 var eGui = this.getGui();
14775 this.addManagedListener(eGui, 'mousedown', function (e) {
14776 if (!_this.skipClick &&
14777 _this.pickerComponent &&
14778 _this.pickerComponent.isAlive() &&
14779 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["isVisible"])(_this.pickerComponent.getGui()) &&
14780 eGui.contains(e.target)) {
14781 _this.skipClick = true;
14782 }
14783 });
14784 this.addManagedListener(eGui, 'keydown', function (e) {
14785 switch (e.key) {
14786 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].UP:
14787 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].DOWN:
14788 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].ENTER:
14789 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].SPACE:
14790 clickHandler();
14791 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].ESCAPE:
14792 if (_this.isPickerDisplayed) {
14793 e.preventDefault();
14794 }
14795 break;
14796 }
14797 });
14798 this.addManagedListener(this.eWrapper, 'click', clickHandler);
14799 this.addManagedListener(this.eLabel, 'click', clickHandler);
14800 if (this.pickerIcon) {
14801 var icon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIconNoSpan"])(this.pickerIcon, this.gridOptionsWrapper);
14802 if (icon) {
14803 this.eIcon.appendChild(icon);
14804 }
14805 }
14806 };
14807 AgPickerField.prototype.refreshLabel = function () {
14808 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(this.getLabel())) {
14809 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaLabelledBy"])(this.eWrapper, this.getLabelId());
14810 }
14811 else {
14812 this.eWrapper.removeAttribute('aria-labelledby');
14813 }
14814 _super.prototype.refreshLabel.call(this);
14815 };
14816 AgPickerField.prototype.setAriaLabel = function (label) {
14817 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaLabel"])(this.eWrapper, label);
14818 return this;
14819 };
14820 AgPickerField.prototype.setInputWidth = function (width) {
14821 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["setElementWidth"])(this.eWrapper, width);
14822 return this;
14823 };
14824 AgPickerField.prototype.getFocusableElement = function () {
14825 return this.eWrapper;
14826 };
14827 __decorate([
14828 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eLabel')
14829 ], AgPickerField.prototype, "eLabel", void 0);
14830 __decorate([
14831 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eWrapper')
14832 ], AgPickerField.prototype, "eWrapper", void 0);
14833 __decorate([
14834 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eDisplayField')
14835 ], AgPickerField.prototype, "eDisplayField", void 0);
14836 __decorate([
14837 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eIcon')
14838 ], AgPickerField.prototype, "eIcon", void 0);
14839 return AgPickerField;
14840}(_agAbstractField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractField"]));
14841
14842
14843
14844
14845
14846/***/ }),
14847/* 70 */
14848/***/ (function(module, __webpack_exports__, __webpack_require__) {
14849
14850"use strict";
14851__webpack_require__.r(__webpack_exports__);
14852/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgList", function() { return AgList; });
14853/* harmony import */ var _agAbstractField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67);
14854/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36);
14855/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
14856/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
14857/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65);
14858/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(44);
14859/**
14860 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14861 * @version v27.3.0
14862 * @link https://www.ag-grid.com/
14863 * @license MIT
14864 */
14865var __extends = (undefined && undefined.__extends) || (function () {
14866 var extendStatics = function (d, b) {
14867 extendStatics = Object.setPrototypeOf ||
14868 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14869 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
14870 return extendStatics(d, b);
14871 };
14872 return function (d, b) {
14873 extendStatics(d, b);
14874 function __() { this.constructor = d; }
14875 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14876 };
14877})();
14878var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
14879 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14880 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14881 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
14882 return c > 3 && r && Object.defineProperty(target, key, r), r;
14883};
14884
14885
14886
14887
14888
14889
14890var AgList = /** @class */ (function (_super) {
14891 __extends(AgList, _super);
14892 function AgList(cssIdentifier) {
14893 if (cssIdentifier === void 0) { cssIdentifier = 'default'; }
14894 var _this = _super.call(this, /* html */ "<div class=\"ag-list ag-" + cssIdentifier + "-list\" role=\"listbox\"></div>") || this;
14895 _this.cssIdentifier = cssIdentifier;
14896 _this.options = [];
14897 _this.itemEls = [];
14898 return _this;
14899 }
14900 AgList.prototype.init = function () {
14901 this.addManagedListener(this.getGui(), 'keydown', this.handleKeyDown.bind(this));
14902 };
14903 AgList.prototype.handleKeyDown = function (e) {
14904 var key = e.key;
14905 switch (key) {
14906 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].ENTER:
14907 if (!this.highlightedEl) {
14908 this.setValue(this.getValue());
14909 }
14910 else {
14911 var pos = this.itemEls.indexOf(this.highlightedEl);
14912 this.setValueByIndex(pos);
14913 }
14914 break;
14915 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].DOWN:
14916 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].UP:
14917 var isDown = key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].DOWN;
14918 var itemToHighlight = void 0;
14919 e.preventDefault();
14920 if (!this.highlightedEl) {
14921 itemToHighlight = this.itemEls[isDown ? 0 : this.itemEls.length - 1];
14922 }
14923 else {
14924 var currentIdx = this.itemEls.indexOf(this.highlightedEl);
14925 var nextPos = currentIdx + (isDown ? 1 : -1);
14926 nextPos = Math.min(Math.max(nextPos, 0), this.itemEls.length - 1);
14927 itemToHighlight = this.itemEls[nextPos];
14928 }
14929 this.highlightItem(itemToHighlight);
14930 break;
14931 }
14932 };
14933 AgList.prototype.addOptions = function (listOptions) {
14934 var _this = this;
14935 listOptions.forEach(function (listOption) { return _this.addOption(listOption); });
14936 return this;
14937 };
14938 AgList.prototype.addOption = function (listOption) {
14939 var value = listOption.value, text = listOption.text;
14940 var sanitisedText = Object(_utils_string__WEBPACK_IMPORTED_MODULE_3__["escapeString"])(text || value);
14941 this.options.push({ value: value, text: sanitisedText });
14942 this.renderOption(value, sanitisedText);
14943 this.updateIndices();
14944 return this;
14945 };
14946 AgList.prototype.updateIndices = function () {
14947 var options = this.getGui().querySelectorAll('.ag-list-item');
14948 options.forEach(function (option, idx) {
14949 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaPosInSet"])(option, idx + 1);
14950 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaSetSize"])(option, options.length);
14951 });
14952 };
14953 AgList.prototype.renderOption = function (value, text) {
14954 var _this = this;
14955 var itemEl = document.createElement('div');
14956 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaRole"])(itemEl, 'option');
14957 itemEl.classList.add('ag-list-item', "ag-" + this.cssIdentifier + "-list-item");
14958 itemEl.innerHTML = "<span>" + text + "</span>";
14959 itemEl.tabIndex = -1;
14960 this.itemEls.push(itemEl);
14961 this.addManagedListener(itemEl, 'mouseover', function () { return _this.highlightItem(itemEl); });
14962 this.addManagedListener(itemEl, 'mouseleave', function () { return _this.clearHighlighted(); });
14963 this.addManagedListener(itemEl, 'click', function () { return _this.setValue(value); });
14964 this.getGui().appendChild(itemEl);
14965 };
14966 AgList.prototype.setValue = function (value, silent) {
14967 if (this.value === value) {
14968 this.fireItemSelected();
14969 return this;
14970 }
14971 if (value == null) {
14972 this.reset();
14973 return this;
14974 }
14975 var idx = this.options.findIndex(function (option) { return option.value === value; });
14976 if (idx !== -1) {
14977 var option = this.options[idx];
14978 this.value = option.value;
14979 this.displayValue = option.text != null ? option.text : option.value;
14980 this.highlightItem(this.itemEls[idx]);
14981 if (!silent) {
14982 this.fireChangeEvent();
14983 }
14984 }
14985 return this;
14986 };
14987 AgList.prototype.setValueByIndex = function (idx) {
14988 return this.setValue(this.options[idx].value);
14989 };
14990 AgList.prototype.getValue = function () {
14991 return this.value;
14992 };
14993 AgList.prototype.getDisplayValue = function () {
14994 return this.displayValue;
14995 };
14996 AgList.prototype.refreshHighlighted = function () {
14997 var _this = this;
14998 this.clearHighlighted();
14999 var idx = this.options.findIndex(function (option) { return option.value === _this.value; });
15000 if (idx !== -1) {
15001 this.highlightItem(this.itemEls[idx]);
15002 }
15003 };
15004 AgList.prototype.reset = function () {
15005 this.value = null;
15006 this.displayValue = null;
15007 this.clearHighlighted();
15008 this.fireChangeEvent();
15009 };
15010 AgList.prototype.highlightItem = function (el) {
15011 if (!el.offsetParent) {
15012 return;
15013 }
15014 this.clearHighlighted();
15015 this.highlightedEl = el;
15016 this.highlightedEl.classList.add(AgList.ACTIVE_CLASS);
15017 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaSelected"])(this.highlightedEl, true);
15018 this.highlightedEl.focus();
15019 };
15020 AgList.prototype.clearHighlighted = function () {
15021 if (!this.highlightedEl || !this.highlightedEl.offsetParent) {
15022 return;
15023 }
15024 this.highlightedEl.classList.remove(AgList.ACTIVE_CLASS);
15025 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaSelected"])(this.highlightedEl, false);
15026 this.highlightedEl = null;
15027 };
15028 AgList.prototype.fireChangeEvent = function () {
15029 this.dispatchEvent({ type: _agAbstractField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractField"].EVENT_CHANGED });
15030 this.fireItemSelected();
15031 };
15032 AgList.prototype.fireItemSelected = function () {
15033 this.dispatchEvent({ type: AgList.EVENT_ITEM_SELECTED });
15034 };
15035 AgList.EVENT_ITEM_SELECTED = 'selectedItem';
15036 AgList.ACTIVE_CLASS = 'ag-active-item';
15037 __decorate([
15038 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
15039 ], AgList.prototype, "init", null);
15040 return AgList;
15041}(_component__WEBPACK_IMPORTED_MODULE_1__["Component"]));
15042
15043
15044
15045
15046
15047/***/ }),
15048/* 71 */
15049/***/ (function(module, __webpack_exports__, __webpack_require__) {
15050
15051"use strict";
15052__webpack_require__.r(__webpack_exports__);
15053/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgAbstractInputField", function() { return AgAbstractInputField; });
15054/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
15055/* harmony import */ var _agAbstractField__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67);
15056/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
15057/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44);
15058/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
15059/**
15060 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15061 * @version v27.3.0
15062 * @link https://www.ag-grid.com/
15063 * @license MIT
15064 */
15065var __extends = (undefined && undefined.__extends) || (function () {
15066 var extendStatics = function (d, b) {
15067 extendStatics = Object.setPrototypeOf ||
15068 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15069 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
15070 return extendStatics(d, b);
15071 };
15072 return function (d, b) {
15073 extendStatics(d, b);
15074 function __() { this.constructor = d; }
15075 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15076 };
15077})();
15078var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15079 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15080 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15081 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
15082 return c > 3 && r && Object.defineProperty(target, key, r), r;
15083};
15084
15085
15086
15087
15088
15089var AgAbstractInputField = /** @class */ (function (_super) {
15090 __extends(AgAbstractInputField, _super);
15091 function AgAbstractInputField(config, className, inputType, displayFieldTag) {
15092 if (inputType === void 0) { inputType = 'text'; }
15093 if (displayFieldTag === void 0) { displayFieldTag = 'input'; }
15094 var _this = _super.call(this, config, /* html */ "\n <div role=\"presentation\">\n <div ref=\"eLabel\" class=\"ag-input-field-label\"></div>\n <div ref=\"eWrapper\" class=\"ag-wrapper ag-input-wrapper\" role=\"presentation\">\n <" + displayFieldTag + " ref=\"eInput\" class=\"ag-input-field-input\"></" + displayFieldTag + ">\n </div>\n </div>", className) || this;
15095 _this.inputType = inputType;
15096 _this.displayFieldTag = displayFieldTag;
15097 return _this;
15098 }
15099 AgAbstractInputField.prototype.postConstruct = function () {
15100 _super.prototype.postConstruct.call(this);
15101 this.setInputType();
15102 this.eLabel.classList.add(this.className + "-label");
15103 this.eWrapper.classList.add(this.className + "-input-wrapper");
15104 this.eInput.classList.add(this.className + "-input");
15105 this.addCssClass('ag-input-field');
15106 this.eInput.id = this.eInput.id || "ag-" + this.getCompId() + "-input";
15107 var _a = this.config, width = _a.width, value = _a.value;
15108 if (width != null) {
15109 this.setWidth(width);
15110 }
15111 if (value != null) {
15112 this.setValue(value);
15113 }
15114 this.addInputListeners();
15115 };
15116 AgAbstractInputField.prototype.refreshLabel = function () {
15117 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(this.getLabel())) {
15118 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaLabelledBy"])(this.eInput, this.getLabelId());
15119 }
15120 else {
15121 this.eInput.removeAttribute('aria-labelledby');
15122 }
15123 _super.prototype.refreshLabel.call(this);
15124 };
15125 AgAbstractInputField.prototype.addInputListeners = function () {
15126 var _this = this;
15127 this.addManagedListener(this.eInput, 'input', function (e) { return _this.setValue(e.target.value); });
15128 };
15129 AgAbstractInputField.prototype.setInputType = function () {
15130 if (this.displayFieldTag === 'input') {
15131 this.eInput.setAttribute('type', this.inputType);
15132 }
15133 };
15134 AgAbstractInputField.prototype.getInputElement = function () {
15135 return this.eInput;
15136 };
15137 AgAbstractInputField.prototype.setInputWidth = function (width) {
15138 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setElementWidth"])(this.eWrapper, width);
15139 return this;
15140 };
15141 AgAbstractInputField.prototype.setInputName = function (name) {
15142 this.getInputElement().setAttribute('name', name);
15143 return this;
15144 };
15145 AgAbstractInputField.prototype.getFocusableElement = function () {
15146 return this.eInput;
15147 };
15148 AgAbstractInputField.prototype.setMaxLength = function (length) {
15149 var eInput = this.eInput;
15150 eInput.maxLength = length;
15151 return this;
15152 };
15153 AgAbstractInputField.prototype.setInputPlaceholder = function (placeholder) {
15154 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["addOrRemoveAttribute"])(this.eInput, 'placeholder', placeholder);
15155 return this;
15156 };
15157 AgAbstractInputField.prototype.setInputAriaLabel = function (label) {
15158 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaLabel"])(this.eInput, label);
15159 return this;
15160 };
15161 AgAbstractInputField.prototype.setDisabled = function (disabled) {
15162 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisabled"])(this.eInput, disabled);
15163 return _super.prototype.setDisabled.call(this, disabled);
15164 };
15165 __decorate([
15166 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eLabel')
15167 ], AgAbstractInputField.prototype, "eLabel", void 0);
15168 __decorate([
15169 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eWrapper')
15170 ], AgAbstractInputField.prototype, "eWrapper", void 0);
15171 __decorate([
15172 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eInput')
15173 ], AgAbstractInputField.prototype, "eInput", void 0);
15174 return AgAbstractInputField;
15175}(_agAbstractField__WEBPACK_IMPORTED_MODULE_1__["AgAbstractField"]));
15176
15177
15178
15179
15180
15181/***/ }),
15182/* 72 */
15183/***/ (function(module, __webpack_exports__, __webpack_require__) {
15184
15185"use strict";
15186__webpack_require__.r(__webpack_exports__);
15187/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScalarFilter", function() { return ScalarFilter; });
15188/* harmony import */ var _simpleFilter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60);
15189/**
15190 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15191 * @version v27.3.0
15192 * @link https://www.ag-grid.com/
15193 * @license MIT
15194 */
15195var __extends = (undefined && undefined.__extends) || (function () {
15196 var extendStatics = function (d, b) {
15197 extendStatics = Object.setPrototypeOf ||
15198 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15199 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
15200 return extendStatics(d, b);
15201 };
15202 return function (d, b) {
15203 extendStatics(d, b);
15204 function __() { this.constructor = d; }
15205 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15206 };
15207})();
15208
15209var ScalarFilter = /** @class */ (function (_super) {
15210 __extends(ScalarFilter, _super);
15211 function ScalarFilter() {
15212 return _super !== null && _super.apply(this, arguments) || this;
15213 }
15214 ScalarFilter.prototype.setParams = function (params) {
15215 _super.prototype.setParams.call(this, params);
15216 this.scalarFilterParams = params;
15217 };
15218 ScalarFilter.prototype.evaluateNullValue = function (filterType) {
15219 switch (filterType) {
15220 case ScalarFilter.EQUALS:
15221 case ScalarFilter.NOT_EQUAL:
15222 if (this.scalarFilterParams.includeBlanksInEquals) {
15223 return true;
15224 }
15225 break;
15226 case ScalarFilter.GREATER_THAN:
15227 case ScalarFilter.GREATER_THAN_OR_EQUAL:
15228 if (this.scalarFilterParams.includeBlanksInGreaterThan) {
15229 return true;
15230 }
15231 break;
15232 case ScalarFilter.LESS_THAN:
15233 case ScalarFilter.LESS_THAN_OR_EQUAL:
15234 if (this.scalarFilterParams.includeBlanksInLessThan) {
15235 return true;
15236 }
15237 break;
15238 case ScalarFilter.IN_RANGE:
15239 if (this.scalarFilterParams.includeBlanksInRange) {
15240 return true;
15241 }
15242 break;
15243 case ScalarFilter.BLANK:
15244 return true;
15245 case ScalarFilter.NOT_BLANK:
15246 return false;
15247 }
15248 return false;
15249 };
15250 ScalarFilter.prototype.evaluateNonNullValue = function (values, cellValue, filterModel) {
15251 var comparator = this.comparator();
15252 var compareResult = values[0] != null ? comparator(values[0], cellValue) : 0;
15253 switch (filterModel.type) {
15254 case ScalarFilter.EQUALS:
15255 return compareResult === 0;
15256 case ScalarFilter.NOT_EQUAL:
15257 return compareResult !== 0;
15258 case ScalarFilter.GREATER_THAN:
15259 return compareResult > 0;
15260 case ScalarFilter.GREATER_THAN_OR_EQUAL:
15261 return compareResult >= 0;
15262 case ScalarFilter.LESS_THAN:
15263 return compareResult < 0;
15264 case ScalarFilter.LESS_THAN_OR_EQUAL:
15265 return compareResult <= 0;
15266 case ScalarFilter.IN_RANGE: {
15267 var compareToResult = comparator(values[1], cellValue);
15268 return this.scalarFilterParams.inRangeInclusive ?
15269 compareResult >= 0 && compareToResult <= 0 :
15270 compareResult > 0 && compareToResult < 0;
15271 }
15272 case ScalarFilter.BLANK:
15273 return this.isBlank(cellValue);
15274 case ScalarFilter.NOT_BLANK:
15275 return !this.isBlank(cellValue);
15276 default:
15277 console.warn('AG Grid: Unexpected type of filter "' + filterModel.type + '", it looks like the filter was configured with incorrect Filter Options');
15278 return true;
15279 }
15280 };
15281 return ScalarFilter;
15282}(_simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"]));
15283
15284
15285
15286
15287
15288/***/ }),
15289/* 73 */
15290/***/ (function(module, __webpack_exports__, __webpack_require__) {
15291
15292"use strict";
15293__webpack_require__.r(__webpack_exports__);
15294/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateFloatingFilter", function() { return DateFloatingFilter; });
15295/* harmony import */ var _dateFilter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58);
15296/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
15297/* harmony import */ var _dateCompWrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59);
15298/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57);
15299/* harmony import */ var _simpleFilter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(60);
15300/* harmony import */ var _floating_provided_simpleFloatingFilter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(74);
15301/* harmony import */ var _providedFilter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(62);
15302/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(42);
15303/* harmony import */ var _utils_date__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(45);
15304/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(14);
15305/**
15306 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15307 * @version v27.3.0
15308 * @link https://www.ag-grid.com/
15309 * @license MIT
15310 */
15311var __extends = (undefined && undefined.__extends) || (function () {
15312 var extendStatics = function (d, b) {
15313 extendStatics = Object.setPrototypeOf ||
15314 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15315 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
15316 return extendStatics(d, b);
15317 };
15318 return function (d, b) {
15319 extendStatics(d, b);
15320 function __() { this.constructor = d; }
15321 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15322 };
15323})();
15324var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15325 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15326 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15327 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
15328 return c > 3 && r && Object.defineProperty(target, key, r), r;
15329};
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340var DateFloatingFilter = /** @class */ (function (_super) {
15341 __extends(DateFloatingFilter, _super);
15342 function DateFloatingFilter() {
15343 return _super.call(this, /* html */ "\n <div class=\"ag-floating-filter-input\" role=\"presentation\">\n <ag-input-text-field ref=\"eReadOnlyText\"></ag-input-text-field>\n <div ref=\"eDateWrapper\" style=\"display: flex;\"></div>\n </div>") || this;
15344 }
15345 DateFloatingFilter.prototype.getDefaultFilterOptions = function () {
15346 return _dateFilter__WEBPACK_IMPORTED_MODULE_0__["DateFilter"].DEFAULT_FILTER_OPTIONS;
15347 };
15348 DateFloatingFilter.prototype.conditionToString = function (condition, options) {
15349 var type = condition.type;
15350 var numberOfInputs = (options || {}).numberOfInputs;
15351 var isRange = type == _simpleFilter__WEBPACK_IMPORTED_MODULE_4__["SimpleFilter"].IN_RANGE || numberOfInputs === 2;
15352 var dateFrom = Object(_utils_date__WEBPACK_IMPORTED_MODULE_8__["parseDateTimeFromString"])(condition.dateFrom);
15353 var dateTo = Object(_utils_date__WEBPACK_IMPORTED_MODULE_8__["parseDateTimeFromString"])(condition.dateTo);
15354 if (isRange) {
15355 return Object(_utils_date__WEBPACK_IMPORTED_MODULE_8__["serialiseDate"])(dateFrom, false) + "-" + Object(_utils_date__WEBPACK_IMPORTED_MODULE_8__["serialiseDate"])(dateTo, false);
15356 }
15357 if (dateFrom != null) {
15358 return "" + Object(_utils_date__WEBPACK_IMPORTED_MODULE_8__["serialiseDate"])(dateFrom, false);
15359 }
15360 // cater for when the type doesn't need a value
15361 return "" + type;
15362 };
15363 DateFloatingFilter.prototype.init = function (params) {
15364 _super.prototype.init.call(this, params);
15365 this.params = params;
15366 this.createDateComponent();
15367 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
15368 this.eReadOnlyText
15369 .setDisabled(true)
15370 .setInputAriaLabel(translate('ariaDateFilterInput', 'Date Filter Input'));
15371 };
15372 DateFloatingFilter.prototype.setEditable = function (editable) {
15373 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_7__["setDisplayed"])(this.eDateWrapper, editable);
15374 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_7__["setDisplayed"])(this.eReadOnlyText.getGui(), !editable);
15375 };
15376 DateFloatingFilter.prototype.onParentModelChanged = function (model, event) {
15377 // We don't want to update the floating filter if the floating filter caused the change,
15378 // because the UI is already in sync. if we didn't do this, the UI would behave strangely
15379 // as it would be updating as the user is typing
15380 if (this.isEventFromFloatingFilter(event)) {
15381 return;
15382 }
15383 _super.prototype.setLastTypeFromModel.call(this, model);
15384 var allowEditing = !this.isReadOnly() &&
15385 this.canWeEditAfterModelFromParentFilter(model);
15386 this.setEditable(allowEditing);
15387 if (allowEditing) {
15388 if (model) {
15389 var dateModel = model;
15390 this.dateComp.setDate(Object(_utils_date__WEBPACK_IMPORTED_MODULE_8__["parseDateTimeFromString"])(dateModel.dateFrom));
15391 }
15392 else {
15393 this.dateComp.setDate(null);
15394 }
15395 this.eReadOnlyText.setValue('');
15396 }
15397 else {
15398 this.eReadOnlyText.setValue(this.getTextFromModel(model));
15399 this.dateComp.setDate(null);
15400 }
15401 };
15402 DateFloatingFilter.prototype.onDateChanged = function () {
15403 var _this = this;
15404 var filterValueDate = this.dateComp.getDate();
15405 var filterValueText = Object(_utils_date__WEBPACK_IMPORTED_MODULE_8__["serialiseDate"])(filterValueDate);
15406 this.params.parentFilterInstance(function (filterInstance) {
15407 if (filterInstance) {
15408 var date = Object(_utils_date__WEBPACK_IMPORTED_MODULE_8__["parseDateTimeFromString"])(filterValueText);
15409 filterInstance.onFloatingFilterChanged(_this.getLastType() || null, date);
15410 }
15411 });
15412 };
15413 DateFloatingFilter.prototype.createDateComponent = function () {
15414 var _this = this;
15415 var debounceMs = _providedFilter__WEBPACK_IMPORTED_MODULE_6__["ProvidedFilter"].getDebounceMs(this.params.filterParams, this.getDefaultDebounceMs());
15416 var dateComponentParams = {
15417 onDateChanged: Object(_utils_function__WEBPACK_IMPORTED_MODULE_9__["debounce"])(this.onDateChanged.bind(this), debounceMs),
15418 filterParams: this.params.column.getColDef().filterParams
15419 };
15420 this.dateComp = new _dateCompWrapper__WEBPACK_IMPORTED_MODULE_2__["DateCompWrapper"](this.getContext(), this.userComponentFactory, dateComponentParams, this.eDateWrapper);
15421 this.addDestroyFunc(function () { return _this.dateComp.destroy(); });
15422 };
15423 __decorate([
15424 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('userComponentFactory')
15425 ], DateFloatingFilter.prototype, "userComponentFactory", void 0);
15426 __decorate([
15427 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eReadOnlyText')
15428 ], DateFloatingFilter.prototype, "eReadOnlyText", void 0);
15429 __decorate([
15430 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eDateWrapper')
15431 ], DateFloatingFilter.prototype, "eDateWrapper", void 0);
15432 return DateFloatingFilter;
15433}(_floating_provided_simpleFloatingFilter__WEBPACK_IMPORTED_MODULE_5__["SimpleFloatingFilter"]));
15434
15435
15436
15437
15438
15439/***/ }),
15440/* 74 */
15441/***/ (function(module, __webpack_exports__, __webpack_require__) {
15442
15443"use strict";
15444__webpack_require__.r(__webpack_exports__);
15445/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleFloatingFilter", function() { return SimpleFloatingFilter; });
15446/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
15447/* harmony import */ var _provided_simpleFilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60);
15448/* harmony import */ var _provided_optionsFactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61);
15449/**
15450 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15451 * @version v27.3.0
15452 * @link https://www.ag-grid.com/
15453 * @license MIT
15454 */
15455var __extends = (undefined && undefined.__extends) || (function () {
15456 var extendStatics = function (d, b) {
15457 extendStatics = Object.setPrototypeOf ||
15458 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15459 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
15460 return extendStatics(d, b);
15461 };
15462 return function (d, b) {
15463 extendStatics(d, b);
15464 function __() { this.constructor = d; }
15465 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15466 };
15467})();
15468
15469
15470
15471var SimpleFloatingFilter = /** @class */ (function (_super) {
15472 __extends(SimpleFloatingFilter, _super);
15473 function SimpleFloatingFilter() {
15474 return _super !== null && _super.apply(this, arguments) || this;
15475 }
15476 SimpleFloatingFilter.prototype.getDefaultDebounceMs = function () {
15477 return 0;
15478 };
15479 // this is a user component, and IComponent has "public destroy()" as part of the interface.
15480 // so we need to override destroy() just to make the method public.
15481 SimpleFloatingFilter.prototype.destroy = function () {
15482 _super.prototype.destroy.call(this);
15483 };
15484 // used by:
15485 // 1) NumberFloatingFilter & TextFloatingFilter: Always, for both when editable and read only.
15486 // 2) DateFloatingFilter: Only when read only (as we show text rather than a date picker when read only)
15487 SimpleFloatingFilter.prototype.getTextFromModel = function (model) {
15488 if (!model) {
15489 return null;
15490 }
15491 var isCombined = model.operator != null;
15492 if (isCombined) {
15493 var combinedModel = model;
15494 var _a = combinedModel || {}, condition1 = _a.condition1, condition2 = _a.condition2;
15495 var customOption1 = this.optionsFactory.getCustomOption(condition1.type);
15496 var customOption2 = this.optionsFactory.getCustomOption(condition2.type);
15497 return [
15498 this.conditionToString(condition1, customOption1),
15499 combinedModel.operator,
15500 this.conditionToString(condition2, customOption2),
15501 ].join(' ');
15502 }
15503 else {
15504 var condition = model;
15505 var customOption = this.optionsFactory.getCustomOption(condition.type);
15506 // For custom filter options we display the Name of the filter instead
15507 // of displaying the `from` value, as it wouldn't be relevant
15508 var _b = customOption || {}, displayKey = _b.displayKey, displayName = _b.displayName, numberOfInputs = _b.numberOfInputs;
15509 if (displayKey && displayName && numberOfInputs === 0) {
15510 this.gridOptionsWrapper.getLocaleTextFunc()(displayKey, displayName);
15511 return displayName;
15512 }
15513 return this.conditionToString(condition, customOption);
15514 }
15515 };
15516 SimpleFloatingFilter.prototype.isEventFromFloatingFilter = function (event) {
15517 return event && event.afterFloatingFilter;
15518 };
15519 SimpleFloatingFilter.prototype.getLastType = function () {
15520 return this.lastType;
15521 };
15522 SimpleFloatingFilter.prototype.isReadOnly = function () {
15523 return this.readOnly;
15524 };
15525 SimpleFloatingFilter.prototype.setLastTypeFromModel = function (model) {
15526 // if no model provided by the parent filter use default
15527 if (!model) {
15528 this.lastType = this.optionsFactory.getDefaultOption();
15529 return;
15530 }
15531 var isCombined = model.operator;
15532 var condition;
15533 if (isCombined) {
15534 var combinedModel = model;
15535 condition = combinedModel.condition1;
15536 }
15537 else {
15538 condition = model;
15539 }
15540 this.lastType = condition.type;
15541 };
15542 SimpleFloatingFilter.prototype.canWeEditAfterModelFromParentFilter = function (model) {
15543 if (!model) {
15544 // if no model, then we can edit as long as the lastType is something we can edit, as this
15545 // is the type we will provide to the parent filter if the user decides to use the floating filter.
15546 return this.isTypeEditable(this.lastType);
15547 }
15548 // never allow editing if the filter is combined (ie has two parts)
15549 var isCombined = model.operator;
15550 if (isCombined) {
15551 return false;
15552 }
15553 var simpleModel = model;
15554 return this.isTypeEditable(simpleModel.type);
15555 };
15556 SimpleFloatingFilter.prototype.init = function (params) {
15557 this.optionsFactory = new _provided_optionsFactory__WEBPACK_IMPORTED_MODULE_2__["OptionsFactory"]();
15558 this.optionsFactory.init(params.filterParams, this.getDefaultFilterOptions());
15559 this.lastType = this.optionsFactory.getDefaultOption();
15560 // readOnly is a property of IProvidedFilterParams - we need to find a better (type-safe)
15561 // way to support reading this in the future.
15562 this.readOnly = !!params.filterParams.readOnly;
15563 // we are editable if:
15564 // 1) there is a type (user has configured filter wrong if not type)
15565 // AND
15566 // 2) the default type is not 'in range'
15567 var editable = this.isTypeEditable(this.lastType);
15568 this.setEditable(editable);
15569 };
15570 SimpleFloatingFilter.prototype.doesFilterHaveSingleInput = function (filterType) {
15571 var customFilterOption = this.optionsFactory.getCustomOption(filterType);
15572 var numberOfInputs = (customFilterOption || {}).numberOfInputs;
15573 return numberOfInputs == null || numberOfInputs == 1;
15574 };
15575 SimpleFloatingFilter.prototype.isTypeEditable = function (type) {
15576 var uneditableTypes = [
15577 _provided_simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].IN_RANGE, _provided_simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].EMPTY, _provided_simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].BLANK, _provided_simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].NOT_BLANK,
15578 ];
15579 return !!type &&
15580 !this.isReadOnly() &&
15581 this.doesFilterHaveSingleInput(type) &&
15582 uneditableTypes.indexOf(type) < 0;
15583 };
15584 return SimpleFloatingFilter;
15585}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
15586
15587
15588
15589
15590
15591/***/ }),
15592/* 75 */
15593/***/ (function(module, __webpack_exports__, __webpack_require__) {
15594
15595"use strict";
15596__webpack_require__.r(__webpack_exports__);
15597/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultDateComponent", function() { return DefaultDateComponent; });
15598/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
15599/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
15600/* harmony import */ var _utils_date__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
15601/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43);
15602/**
15603 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15604 * @version v27.3.0
15605 * @link https://www.ag-grid.com/
15606 * @license MIT
15607 */
15608var __extends = (undefined && undefined.__extends) || (function () {
15609 var extendStatics = function (d, b) {
15610 extendStatics = Object.setPrototypeOf ||
15611 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15612 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
15613 return extendStatics(d, b);
15614 };
15615 return function (d, b) {
15616 extendStatics(d, b);
15617 function __() { this.constructor = d; }
15618 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15619 };
15620})();
15621var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15622 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15623 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15624 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
15625 return c > 3 && r && Object.defineProperty(target, key, r), r;
15626};
15627
15628
15629
15630
15631var DefaultDateComponent = /** @class */ (function (_super) {
15632 __extends(DefaultDateComponent, _super);
15633 function DefaultDateComponent() {
15634 return _super.call(this, /* html */ "\n <div class=\"ag-filter-filter\">\n <ag-input-text-field class=\"ag-date-filter\" ref=\"eDateInput\"></ag-input-text-field>\n </div>") || this;
15635 }
15636 // this is a user component, and IComponent has "public destroy()" as part of the interface.
15637 // so we need to override destroy() just to make the method public.
15638 DefaultDateComponent.prototype.destroy = function () {
15639 _super.prototype.destroy.call(this);
15640 };
15641 DefaultDateComponent.prototype.init = function (params) {
15642 var _this = this;
15643 var eDocument = this.gridOptionsWrapper.getDocument();
15644 var inputElement = this.eDateInput.getInputElement();
15645 if (this.shouldUseBrowserDatePicker(params)) {
15646 inputElement.type = 'date';
15647 }
15648 // ensures that the input element is focussed when a clear button is clicked
15649 this.addManagedListener(inputElement, 'mousedown', function () {
15650 if (_this.eDateInput.isDisabled()) {
15651 return;
15652 }
15653 inputElement.focus();
15654 });
15655 this.addManagedListener(inputElement, 'input', function (e) {
15656 if (e.target !== eDocument.activeElement) {
15657 return;
15658 }
15659 if (_this.eDateInput.isDisabled()) {
15660 return;
15661 }
15662 params.onDateChanged();
15663 });
15664 var _a = params.filterParams || {}, minValidYear = _a.minValidYear, maxValidYear = _a.maxValidYear;
15665 if (minValidYear) {
15666 inputElement.min = minValidYear + "-01-01";
15667 }
15668 if (maxValidYear) {
15669 inputElement.max = maxValidYear + "-12-31";
15670 }
15671 };
15672 DefaultDateComponent.prototype.getDate = function () {
15673 return Object(_utils_date__WEBPACK_IMPORTED_MODULE_2__["parseDateTimeFromString"])(this.eDateInput.getValue());
15674 };
15675 DefaultDateComponent.prototype.setDate = function (date) {
15676 this.eDateInput.setValue(Object(_utils_date__WEBPACK_IMPORTED_MODULE_2__["serialiseDate"])(date, false));
15677 };
15678 DefaultDateComponent.prototype.setInputPlaceholder = function (placeholder) {
15679 this.eDateInput.setInputPlaceholder(placeholder);
15680 };
15681 DefaultDateComponent.prototype.setDisabled = function (disabled) {
15682 this.eDateInput.setDisabled(disabled);
15683 };
15684 DefaultDateComponent.prototype.afterGuiAttached = function (params) {
15685 if (!params || !params.suppressFocus) {
15686 this.eDateInput.getInputElement().focus();
15687 }
15688 };
15689 DefaultDateComponent.prototype.shouldUseBrowserDatePicker = function (params) {
15690 if (params.filterParams && params.filterParams.browserDatePicker != null) {
15691 return params.filterParams.browserDatePicker;
15692 }
15693 return Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isBrowserChrome"])() || Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isBrowserFirefox"])();
15694 };
15695 __decorate([
15696 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eDateInput')
15697 ], DefaultDateComponent.prototype, "eDateInput", void 0);
15698 return DefaultDateComponent;
15699}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
15700
15701
15702
15703
15704
15705/***/ }),
15706/* 76 */
15707/***/ (function(module, __webpack_exports__, __webpack_require__) {
15708
15709"use strict";
15710__webpack_require__.r(__webpack_exports__);
15711/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberFilter", function() { return NumberFilter; });
15712/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
15713/* harmony import */ var _simpleFilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60);
15714/* harmony import */ var _scalarFilter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(72);
15715/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
15716/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43);
15717/**
15718 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15719 * @version v27.3.0
15720 * @link https://www.ag-grid.com/
15721 * @license MIT
15722 */
15723var __extends = (undefined && undefined.__extends) || (function () {
15724 var extendStatics = function (d, b) {
15725 extendStatics = Object.setPrototypeOf ||
15726 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15727 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
15728 return extendStatics(d, b);
15729 };
15730 return function (d, b) {
15731 extendStatics(d, b);
15732 function __() { this.constructor = d; }
15733 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15734 };
15735})();
15736var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15737 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15738 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15739 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
15740 return c > 3 && r && Object.defineProperty(target, key, r), r;
15741};
15742
15743
15744
15745
15746
15747var NumberFilter = /** @class */ (function (_super) {
15748 __extends(NumberFilter, _super);
15749 function NumberFilter() {
15750 return _super.call(this, 'numberFilter') || this;
15751 }
15752 NumberFilter.prototype.mapValuesFromModel = function (filterModel) {
15753 var _a = filterModel || {}, filter = _a.filter, filterTo = _a.filterTo, type = _a.type;
15754 return [
15755 filter == null ? null : filter,
15756 filterTo == null ? null : filterTo,
15757 ].slice(0, this.getNumberOfInputs(type));
15758 };
15759 NumberFilter.prototype.getDefaultDebounceMs = function () {
15760 return 500;
15761 };
15762 NumberFilter.prototype.comparator = function () {
15763 return function (left, right) {
15764 if (left === right) {
15765 return 0;
15766 }
15767 return left < right ? 1 : -1;
15768 };
15769 };
15770 NumberFilter.prototype.setParams = function (params) {
15771 this.numberFilterParams = params;
15772 var allowedCharPattern = this.getAllowedCharPattern();
15773 if (allowedCharPattern) {
15774 var config = { allowedCharPattern: allowedCharPattern };
15775 this.resetTemplate({
15776 'eValue-index0-1': config,
15777 'eValue-index1-1': config,
15778 'eValue-index0-2': config,
15779 'eValue-index1-2': config,
15780 });
15781 }
15782 _super.prototype.setParams.call(this, params);
15783 };
15784 NumberFilter.prototype.getDefaultFilterOptions = function () {
15785 return NumberFilter.DEFAULT_FILTER_OPTIONS;
15786 };
15787 NumberFilter.prototype.createValueTemplate = function (position) {
15788 var pos = position === _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["ConditionPosition"].One ? '1' : '2';
15789 var allowedCharPattern = this.getAllowedCharPattern();
15790 var agElementTag = allowedCharPattern ? 'ag-input-text-field' : 'ag-input-number-field';
15791 return /* html */ "\n <div class=\"ag-filter-body\" ref=\"eCondition" + pos + "Body\" role=\"presentation\">\n <" + agElementTag + " class=\"ag-filter-from ag-filter-filter\" ref=\"eValue-index0-" + pos + "\"></" + agElementTag + ">\n <" + agElementTag + " class=\"ag-filter-to ag-filter-filter\" ref=\"eValue-index1-" + pos + "\"></" + agElementTag + ">\n </div>";
15792 };
15793 NumberFilter.prototype.getValues = function (position) {
15794 var _this = this;
15795 var result = [];
15796 this.forEachInput(function (element, index, elPosition, numberOfInputs) {
15797 if (position === elPosition && index < numberOfInputs) {
15798 result.push(_this.stringToFloat(element.getValue()));
15799 }
15800 });
15801 return result;
15802 };
15803 NumberFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {
15804 return aSimple.filter === bSimple.filter
15805 && aSimple.filterTo === bSimple.filterTo
15806 && aSimple.type === bSimple.type;
15807 };
15808 NumberFilter.prototype.getFilterType = function () {
15809 return 'number';
15810 };
15811 NumberFilter.prototype.stringToFloat = function (value) {
15812 if (typeof value === 'number') {
15813 return value;
15814 }
15815 var filterText = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["makeNull"])(value);
15816 if (filterText != null && filterText.trim() === '') {
15817 filterText = null;
15818 }
15819 if (this.numberFilterParams.numberParser) {
15820 return this.numberFilterParams.numberParser(filterText);
15821 }
15822 return filterText == null || filterText.trim() === '-' ? null : parseFloat(filterText);
15823 };
15824 NumberFilter.prototype.createCondition = function (position) {
15825 var type = this.getConditionTypes()[position];
15826 var model = {
15827 filterType: this.getFilterType(),
15828 type: type
15829 };
15830 var values = this.getValues(position);
15831 if (values.length > 0) {
15832 model.filter = values[0];
15833 }
15834 if (values.length > 1) {
15835 model.filterTo = values[1];
15836 }
15837 return model;
15838 };
15839 NumberFilter.prototype.getInputs = function () {
15840 return [
15841 [this.eValueFrom1, this.eValueTo1],
15842 [this.eValueFrom2, this.eValueTo2],
15843 ];
15844 };
15845 NumberFilter.prototype.getAllowedCharPattern = function () {
15846 var allowedCharPattern = (this.numberFilterParams || {}).allowedCharPattern;
15847 if (allowedCharPattern) {
15848 return allowedCharPattern;
15849 }
15850 if (!Object(_utils_browser__WEBPACK_IMPORTED_MODULE_4__["isBrowserChrome"])() && !Object(_utils_browser__WEBPACK_IMPORTED_MODULE_4__["isBrowserEdge"])()) {
15851 // only Chrome and Edge support the HTML5 number field, so for other browsers we provide an equivalent
15852 // constraint instead
15853 return '\\d\\-\\.';
15854 }
15855 return null;
15856 };
15857 NumberFilter.DEFAULT_FILTER_OPTIONS = [
15858 _scalarFilter__WEBPACK_IMPORTED_MODULE_2__["ScalarFilter"].EQUALS,
15859 _scalarFilter__WEBPACK_IMPORTED_MODULE_2__["ScalarFilter"].NOT_EQUAL,
15860 _scalarFilter__WEBPACK_IMPORTED_MODULE_2__["ScalarFilter"].LESS_THAN,
15861 _scalarFilter__WEBPACK_IMPORTED_MODULE_2__["ScalarFilter"].LESS_THAN_OR_EQUAL,
15862 _scalarFilter__WEBPACK_IMPORTED_MODULE_2__["ScalarFilter"].GREATER_THAN,
15863 _scalarFilter__WEBPACK_IMPORTED_MODULE_2__["ScalarFilter"].GREATER_THAN_OR_EQUAL,
15864 _scalarFilter__WEBPACK_IMPORTED_MODULE_2__["ScalarFilter"].IN_RANGE,
15865 _scalarFilter__WEBPACK_IMPORTED_MODULE_2__["ScalarFilter"].BLANK,
15866 _scalarFilter__WEBPACK_IMPORTED_MODULE_2__["ScalarFilter"].NOT_BLANK,
15867 ];
15868 __decorate([
15869 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eValue-index0-1')
15870 ], NumberFilter.prototype, "eValueFrom1", void 0);
15871 __decorate([
15872 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eValue-index1-1')
15873 ], NumberFilter.prototype, "eValueTo1", void 0);
15874 __decorate([
15875 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eValue-index0-2')
15876 ], NumberFilter.prototype, "eValueFrom2", void 0);
15877 __decorate([
15878 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eValue-index1-2')
15879 ], NumberFilter.prototype, "eValueTo2", void 0);
15880 return NumberFilter;
15881}(_scalarFilter__WEBPACK_IMPORTED_MODULE_2__["ScalarFilter"]));
15882
15883
15884
15885
15886
15887/***/ }),
15888/* 77 */
15889/***/ (function(module, __webpack_exports__, __webpack_require__) {
15890
15891"use strict";
15892__webpack_require__.r(__webpack_exports__);
15893/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberFloatingFilter", function() { return NumberFloatingFilter; });
15894/* harmony import */ var _numberFilter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76);
15895/* harmony import */ var _floating_provided_textInputFloatingFilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78);
15896/**
15897 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15898 * @version v27.3.0
15899 * @link https://www.ag-grid.com/
15900 * @license MIT
15901 */
15902var __extends = (undefined && undefined.__extends) || (function () {
15903 var extendStatics = function (d, b) {
15904 extendStatics = Object.setPrototypeOf ||
15905 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15906 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
15907 return extendStatics(d, b);
15908 };
15909 return function (d, b) {
15910 extendStatics(d, b);
15911 function __() { this.constructor = d; }
15912 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15913 };
15914})();
15915
15916
15917var NumberFloatingFilter = /** @class */ (function (_super) {
15918 __extends(NumberFloatingFilter, _super);
15919 function NumberFloatingFilter() {
15920 return _super !== null && _super.apply(this, arguments) || this;
15921 }
15922 NumberFloatingFilter.prototype.getDefaultFilterOptions = function () {
15923 return _numberFilter__WEBPACK_IMPORTED_MODULE_0__["NumberFilter"].DEFAULT_FILTER_OPTIONS;
15924 };
15925 return NumberFloatingFilter;
15926}(_floating_provided_textInputFloatingFilter__WEBPACK_IMPORTED_MODULE_1__["TextInputFloatingFilter"]));
15927
15928
15929
15930
15931
15932/***/ }),
15933/* 78 */
15934/***/ (function(module, __webpack_exports__, __webpack_require__) {
15935
15936"use strict";
15937__webpack_require__.r(__webpack_exports__);
15938/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextInputFloatingFilter", function() { return TextInputFloatingFilter; });
15939/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
15940/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
15941/* harmony import */ var _provided_providedFilter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62);
15942/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
15943/* harmony import */ var _simpleFloatingFilter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(74);
15944/* harmony import */ var _provided_simpleFilter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(60);
15945/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(65);
15946/* harmony import */ var _provided_text_textFilter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(79);
15947/**
15948 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15949 * @version v27.3.0
15950 * @link https://www.ag-grid.com/
15951 * @license MIT
15952 */
15953var __extends = (undefined && undefined.__extends) || (function () {
15954 var extendStatics = function (d, b) {
15955 extendStatics = Object.setPrototypeOf ||
15956 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15957 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
15958 return extendStatics(d, b);
15959 };
15960 return function (d, b) {
15961 extendStatics(d, b);
15962 function __() { this.constructor = d; }
15963 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15964 };
15965})();
15966var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15967 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15968 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15969 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
15970 return c > 3 && r && Object.defineProperty(target, key, r), r;
15971};
15972
15973
15974
15975
15976
15977
15978
15979
15980var TextInputFloatingFilter = /** @class */ (function (_super) {
15981 __extends(TextInputFloatingFilter, _super);
15982 function TextInputFloatingFilter() {
15983 return _super !== null && _super.apply(this, arguments) || this;
15984 }
15985 TextInputFloatingFilter.prototype.postConstruct = function () {
15986 this.resetTemplate();
15987 };
15988 TextInputFloatingFilter.prototype.resetTemplate = function (paramsMap) {
15989 this.setTemplate(/* html */ "\n <div class=\"ag-floating-filter-input\" role=\"presentation\">\n <ag-input-text-field ref=\"eFloatingFilterInput\"></ag-input-text-field>\n </div>\n ", paramsMap);
15990 };
15991 TextInputFloatingFilter.prototype.getDefaultDebounceMs = function () {
15992 return 500;
15993 };
15994 TextInputFloatingFilter.prototype.onParentModelChanged = function (model, event) {
15995 if (this.isEventFromFloatingFilter(event)) {
15996 // if the floating filter triggered the change, it is already in sync
15997 return;
15998 }
15999 this.setLastTypeFromModel(model);
16000 this.eFloatingFilterInput.setValue(this.getTextFromModel(model));
16001 this.setEditable(this.canWeEditAfterModelFromParentFilter(model));
16002 };
16003 TextInputFloatingFilter.prototype.init = function (params) {
16004 _super.prototype.init.call(this, params);
16005 this.params = params;
16006 this.applyActive = _provided_providedFilter__WEBPACK_IMPORTED_MODULE_2__["ProvidedFilter"].isUseApplyButton(this.params.filterParams);
16007 var allowedCharPattern = this.params.filterParams.allowedCharPattern;
16008 if (allowedCharPattern != null) {
16009 this.resetTemplate({ eFloatingFilterInput: { allowedCharPattern: allowedCharPattern } });
16010 }
16011 if (!this.isReadOnly()) {
16012 var debounceMs = _provided_providedFilter__WEBPACK_IMPORTED_MODULE_2__["ProvidedFilter"].getDebounceMs(this.params.filterParams, this.getDefaultDebounceMs());
16013 var toDebounce = Object(_utils_function__WEBPACK_IMPORTED_MODULE_1__["debounce"])(this.syncUpWithParentFilter.bind(this), debounceMs);
16014 var filterGui = this.eFloatingFilterInput.getGui();
16015 this.addManagedListener(filterGui, 'input', toDebounce);
16016 this.addManagedListener(filterGui, 'keypress', toDebounce);
16017 this.addManagedListener(filterGui, 'keydown', toDebounce);
16018 }
16019 var columnDef = params.column.getDefinition();
16020 if (this.isReadOnly() || (columnDef.filterParams &&
16021 columnDef.filterParams.filterOptions &&
16022 columnDef.filterParams.filterOptions.length === 1 &&
16023 columnDef.filterParams.filterOptions[0] === 'inRange')) {
16024 this.eFloatingFilterInput.setDisabled(true);
16025 }
16026 var displayName = this.columnModel.getDisplayNameForColumn(params.column, 'header', true);
16027 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
16028 this.eFloatingFilterInput.setInputAriaLabel(displayName + " " + translate('ariaFilterInput', 'Filter Input'));
16029 };
16030 TextInputFloatingFilter.prototype.syncUpWithParentFilter = function (e) {
16031 var _this = this;
16032 var enterKeyPressed = e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].ENTER;
16033 if (this.applyActive && !enterKeyPressed) {
16034 return;
16035 }
16036 var value = this.eFloatingFilterInput.getValue();
16037 if (this.params.filterParams.trimInput) {
16038 value = _provided_text_textFilter__WEBPACK_IMPORTED_MODULE_7__["TextFilter"].trimInput(value);
16039 this.eFloatingFilterInput.setValue(value, true); // ensure visible value is trimmed
16040 }
16041 this.params.parentFilterInstance(function (filterInstance) {
16042 if (filterInstance) {
16043 filterInstance.onFloatingFilterChanged(_this.getLastType() || null, value || null);
16044 }
16045 });
16046 };
16047 TextInputFloatingFilter.prototype.conditionToString = function (condition, options) {
16048 var numberOfInputs = (options || {}).numberOfInputs;
16049 var isRange = condition.type == _provided_simpleFilter__WEBPACK_IMPORTED_MODULE_5__["SimpleFilter"].IN_RANGE || numberOfInputs === 2;
16050 if (isRange) {
16051 return condition.filter + "-" + condition.filterTo;
16052 }
16053 // cater for when the type doesn't need a value
16054 if (condition.filter != null) {
16055 return "" + condition.filter;
16056 }
16057 return "" + condition.type;
16058 };
16059 TextInputFloatingFilter.prototype.setEditable = function (editable) {
16060 this.eFloatingFilterInput.setDisabled(!editable);
16061 };
16062 __decorate([
16063 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('columnModel')
16064 ], TextInputFloatingFilter.prototype, "columnModel", void 0);
16065 __decorate([
16066 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eFloatingFilterInput')
16067 ], TextInputFloatingFilter.prototype, "eFloatingFilterInput", void 0);
16068 __decorate([
16069 _context_context__WEBPACK_IMPORTED_MODULE_3__["PostConstruct"]
16070 ], TextInputFloatingFilter.prototype, "postConstruct", null);
16071 return TextInputFloatingFilter;
16072}(_simpleFloatingFilter__WEBPACK_IMPORTED_MODULE_4__["SimpleFloatingFilter"]));
16073
16074
16075
16076
16077
16078/***/ }),
16079/* 79 */
16080/***/ (function(module, __webpack_exports__, __webpack_require__) {
16081
16082"use strict";
16083__webpack_require__.r(__webpack_exports__);
16084/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextFilter", function() { return TextFilter; });
16085/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
16086/* harmony import */ var _simpleFilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60);
16087/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
16088/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37);
16089/**
16090 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16091 * @version v27.3.0
16092 * @link https://www.ag-grid.com/
16093 * @license MIT
16094 */
16095var __extends = (undefined && undefined.__extends) || (function () {
16096 var extendStatics = function (d, b) {
16097 extendStatics = Object.setPrototypeOf ||
16098 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16099 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
16100 return extendStatics(d, b);
16101 };
16102 return function (d, b) {
16103 extendStatics(d, b);
16104 function __() { this.constructor = d; }
16105 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16106 };
16107})();
16108var __assign = (undefined && undefined.__assign) || function () {
16109 __assign = Object.assign || function(t) {
16110 for (var s, i = 1, n = arguments.length; i < n; i++) {
16111 s = arguments[i];
16112 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
16113 t[p] = s[p];
16114 }
16115 return t;
16116 };
16117 return __assign.apply(this, arguments);
16118};
16119var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16120 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16121 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16122 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
16123 return c > 3 && r && Object.defineProperty(target, key, r), r;
16124};
16125
16126
16127
16128
16129var TextFilter = /** @class */ (function (_super) {
16130 __extends(TextFilter, _super);
16131 function TextFilter() {
16132 return _super.call(this, 'textFilter') || this;
16133 }
16134 TextFilter.trimInput = function (value) {
16135 var trimmedInput = value && value.trim();
16136 // trim the input, unless it is all whitespace (this is consistent with Excel behaviour)
16137 return trimmedInput === '' ? value : trimmedInput;
16138 };
16139 TextFilter.prototype.getDefaultDebounceMs = function () {
16140 return 500;
16141 };
16142 TextFilter.prototype.setParams = function (params) {
16143 _super.prototype.setParams.call(this, params);
16144 this.textFilterParams = params;
16145 this.matcher = this.getTextMatcher();
16146 this.formatter = this.textFilterParams.textFormatter ||
16147 (this.textFilterParams.caseSensitive ? TextFilter.DEFAULT_FORMATTER : TextFilter.DEFAULT_LOWERCASE_FORMATTER);
16148 };
16149 TextFilter.prototype.getTextMatcher = function () {
16150 var legacyComparator = this.textFilterParams.textCustomComparator;
16151 if (legacyComparator) {
16152 _utils__WEBPACK_IMPORTED_MODULE_3__["_"].doOnce(function () { return console.warn('AG Grid - textCustomComparator is deprecated, use textMatcher instead.'); }, 'textCustomComparator.deprecated');
16153 return function (_a) {
16154 var filterOption = _a.filterOption, value = _a.value, filterText = _a.filterText;
16155 return legacyComparator(filterOption, value, filterText);
16156 };
16157 }
16158 return this.textFilterParams.textMatcher || TextFilter.DEFAULT_MATCHER;
16159 };
16160 TextFilter.prototype.createCondition = function (position) {
16161 var type = this.getConditionTypes()[position];
16162 var model = {
16163 filterType: this.getFilterType(),
16164 type: type,
16165 };
16166 var values = this.getValues(position);
16167 if (values.length > 0) {
16168 model.filter = values[0];
16169 }
16170 if (values.length > 1) {
16171 model.filterTo = values[1];
16172 }
16173 return model;
16174 };
16175 TextFilter.prototype.getFilterType = function () {
16176 return 'text';
16177 };
16178 TextFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {
16179 return aSimple.filter === bSimple.filter &&
16180 aSimple.filterTo === bSimple.filterTo &&
16181 aSimple.type === bSimple.type;
16182 };
16183 TextFilter.prototype.getInputs = function () {
16184 return [
16185 [this.eValueFrom1, this.eValueTo1],
16186 [this.eValueFrom2, this.eValueTo2],
16187 ];
16188 };
16189 TextFilter.prototype.getValues = function (position) {
16190 var _this = this;
16191 var result = [];
16192 this.forEachInput(function (element, index, elPosition, numberOfInputs) {
16193 if (position === elPosition && index < numberOfInputs) {
16194 var value = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["makeNull"])(element.getValue());
16195 var cleanValue = (_this.textFilterParams.trimInput ? TextFilter.trimInput(value) : value) || null;
16196 result.push(cleanValue);
16197 element.setValue(cleanValue, true); // ensure clean value is visible
16198 }
16199 });
16200 return result;
16201 };
16202 TextFilter.prototype.getDefaultFilterOptions = function () {
16203 return TextFilter.DEFAULT_FILTER_OPTIONS;
16204 };
16205 TextFilter.prototype.createValueTemplate = function (position) {
16206 var pos = position === _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["ConditionPosition"].One ? '1' : '2';
16207 return /* html */ "\n <div class=\"ag-filter-body\" ref=\"eCondition" + pos + "Body\" role=\"presentation\">\n <ag-input-text-field class=\".ag-filter-from ag-filter-filter\" ref=\"eValue-index0-" + pos + "\"></ag-input-text-field>\n <ag-input-text-field class=\"ag-filter-to ag-filter-filter\" ref=\"eValue-index1-" + pos + "\"></ag-input-text-field>\n </div>";
16208 };
16209 TextFilter.prototype.mapValuesFromModel = function (filterModel) {
16210 var _a = filterModel || {}, filter = _a.filter, filterTo = _a.filterTo, type = _a.type;
16211 return [
16212 filter || null,
16213 filterTo || null,
16214 ].slice(0, this.getNumberOfInputs(type));
16215 };
16216 TextFilter.prototype.evaluateNullValue = function (filterType) {
16217 var filterTypesAllowNulls = [
16218 _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].NOT_EQUAL, _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].NOT_CONTAINS, _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].BLANK,
16219 ];
16220 return filterType ? filterTypesAllowNulls.indexOf(filterType) >= 0 : false;
16221 };
16222 TextFilter.prototype.evaluateNonNullValue = function (values, cellValue, filterModel, params) {
16223 var _this = this;
16224 var formattedValues = values.map(function (v) { return _this.formatter(v); }) || [];
16225 var cellValueFormatted = this.formatter(cellValue);
16226 var _a = this.textFilterParams, api = _a.api, colDef = _a.colDef, column = _a.column, columnApi = _a.columnApi, context = _a.context, textFormatter = _a.textFormatter;
16227 if (filterModel.type === _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].BLANK) {
16228 return this.isBlank(cellValue);
16229 }
16230 else if (filterModel.type === _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].NOT_BLANK) {
16231 return !this.isBlank(cellValue);
16232 }
16233 var matcherParams = {
16234 api: api,
16235 colDef: colDef,
16236 column: column,
16237 columnApi: columnApi,
16238 context: context,
16239 node: params.node,
16240 data: params.data,
16241 filterOption: filterModel.type,
16242 value: cellValueFormatted,
16243 textFormatter: textFormatter,
16244 };
16245 return formattedValues.some(function (v) { return _this.matcher(__assign(__assign({}, matcherParams), { filterText: v })); });
16246 };
16247 TextFilter.DEFAULT_FILTER_OPTIONS = [
16248 _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].CONTAINS,
16249 _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].NOT_CONTAINS,
16250 _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].EQUALS,
16251 _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].NOT_EQUAL,
16252 _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].STARTS_WITH,
16253 _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].ENDS_WITH,
16254 _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].BLANK,
16255 _simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"].NOT_BLANK,
16256 ];
16257 TextFilter.DEFAULT_FORMATTER = function (from) { return from; };
16258 TextFilter.DEFAULT_LOWERCASE_FORMATTER = function (from) { return from == null ? null : from.toString().toLowerCase(); };
16259 TextFilter.DEFAULT_MATCHER = function (_a) {
16260 var filterOption = _a.filterOption, value = _a.value, filterText = _a.filterText;
16261 if (filterText == null) {
16262 return false;
16263 }
16264 switch (filterOption) {
16265 case TextFilter.CONTAINS:
16266 return value.indexOf(filterText) >= 0;
16267 case TextFilter.NOT_CONTAINS:
16268 return value.indexOf(filterText) < 0;
16269 case TextFilter.EQUALS:
16270 return value === filterText;
16271 case TextFilter.NOT_EQUAL:
16272 return value != filterText;
16273 case TextFilter.STARTS_WITH:
16274 return value.indexOf(filterText) === 0;
16275 case TextFilter.ENDS_WITH:
16276 var index = value.lastIndexOf(filterText);
16277 return index >= 0 && index === (value.length - filterText.length);
16278 default:
16279 return false;
16280 }
16281 };
16282 __decorate([
16283 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eValue-index0-1')
16284 ], TextFilter.prototype, "eValueFrom1", void 0);
16285 __decorate([
16286 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eValue-index1-1')
16287 ], TextFilter.prototype, "eValueTo1", void 0);
16288 __decorate([
16289 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eValue-index0-2')
16290 ], TextFilter.prototype, "eValueFrom2", void 0);
16291 __decorate([
16292 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eValue-index1-2')
16293 ], TextFilter.prototype, "eValueTo2", void 0);
16294 return TextFilter;
16295}(_simpleFilter__WEBPACK_IMPORTED_MODULE_1__["SimpleFilter"]));
16296
16297
16298
16299
16300
16301/***/ }),
16302/* 80 */
16303/***/ (function(module, __webpack_exports__, __webpack_require__) {
16304
16305"use strict";
16306__webpack_require__.r(__webpack_exports__);
16307/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextFloatingFilter", function() { return TextFloatingFilter; });
16308/* harmony import */ var _textFilter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79);
16309/* harmony import */ var _floating_provided_textInputFloatingFilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78);
16310/**
16311 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16312 * @version v27.3.0
16313 * @link https://www.ag-grid.com/
16314 * @license MIT
16315 */
16316var __extends = (undefined && undefined.__extends) || (function () {
16317 var extendStatics = function (d, b) {
16318 extendStatics = Object.setPrototypeOf ||
16319 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16320 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
16321 return extendStatics(d, b);
16322 };
16323 return function (d, b) {
16324 extendStatics(d, b);
16325 function __() { this.constructor = d; }
16326 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16327 };
16328})();
16329
16330
16331var TextFloatingFilter = /** @class */ (function (_super) {
16332 __extends(TextFloatingFilter, _super);
16333 function TextFloatingFilter() {
16334 return _super !== null && _super.apply(this, arguments) || this;
16335 }
16336 TextFloatingFilter.prototype.getDefaultFilterOptions = function () {
16337 return _textFilter__WEBPACK_IMPORTED_MODULE_0__["TextFilter"].DEFAULT_FILTER_OPTIONS;
16338 };
16339 return TextFloatingFilter;
16340}(_floating_provided_textInputFloatingFilter__WEBPACK_IMPORTED_MODULE_1__["TextInputFloatingFilter"]));
16341
16342
16343
16344
16345
16346/***/ }),
16347/* 81 */
16348/***/ (function(module, __webpack_exports__, __webpack_require__) {
16349
16350"use strict";
16351__webpack_require__.r(__webpack_exports__);
16352/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderComp", function() { return HeaderComp; });
16353/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
16354/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
16355/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
16356/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
16357/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43);
16358/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42);
16359/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7);
16360/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48);
16361/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(26);
16362/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(36);
16363/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(57);
16364/* harmony import */ var _widgets_touchListener__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(82);
16365/**
16366 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16367 * @version v27.3.0
16368 * @link https://www.ag-grid.com/
16369 * @license MIT
16370 */
16371var __extends = (undefined && undefined.__extends) || (function () {
16372 var extendStatics = function (d, b) {
16373 extendStatics = Object.setPrototypeOf ||
16374 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16375 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
16376 return extendStatics(d, b);
16377 };
16378 return function (d, b) {
16379 extendStatics(d, b);
16380 function __() { this.constructor = d; }
16381 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16382 };
16383})();
16384var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16385 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16386 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16387 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
16388 return c > 3 && r && Object.defineProperty(target, key, r), r;
16389};
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402var HeaderComp = /** @class */ (function (_super) {
16403 __extends(HeaderComp, _super);
16404 function HeaderComp() {
16405 var _this = _super !== null && _super.apply(this, arguments) || this;
16406 _this.lastMovingChanged = 0;
16407 return _this;
16408 }
16409 // this is a user component, and IComponent has "public destroy()" as part of the interface.
16410 // so we need to override destroy() just to make the method public.
16411 HeaderComp.prototype.destroy = function () {
16412 _super.prototype.destroy.call(this);
16413 };
16414 HeaderComp.prototype.refresh = function (params) {
16415 this.params = params;
16416 // if template changed, then recreate the whole comp, the code required to manage
16417 // a changing template is to difficult for what it's worth.
16418 if (this.workOutTemplate() != this.currentTemplate) {
16419 return false;
16420 }
16421 if (this.workOutShowMenu() != this.currentShowMenu) {
16422 return false;
16423 }
16424 if (this.workOutSort() != this.currentSort) {
16425 return false;
16426 }
16427 this.setDisplayName(params);
16428 return true;
16429 };
16430 HeaderComp.prototype.workOutTemplate = function () {
16431 var template = Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["firstExistingValue"])(this.params.template, HeaderComp.TEMPLATE);
16432 // take account of any newlines & whitespace before/after the actual template
16433 template = template && template.trim ? template.trim() : template;
16434 return template;
16435 };
16436 HeaderComp.prototype.init = function (params) {
16437 this.params = params;
16438 this.currentTemplate = this.workOutTemplate();
16439 this.setTemplate(this.currentTemplate);
16440 this.setupTap();
16441 this.setupIcons(params.column);
16442 this.setMenu();
16443 this.setupSort();
16444 this.setupFilterIcon();
16445 this.setDisplayName(params);
16446 };
16447 HeaderComp.prototype.setDisplayName = function (params) {
16448 if (this.currentDisplayName != params.displayName) {
16449 this.currentDisplayName = params.displayName;
16450 var displayNameSanitised = Object(_utils_string__WEBPACK_IMPORTED_MODULE_8__["escapeString"])(this.currentDisplayName);
16451 if (this.eText) {
16452 this.eText.innerHTML = displayNameSanitised;
16453 }
16454 }
16455 };
16456 HeaderComp.prototype.setupIcons = function (column) {
16457 this.addInIcon('sortAscending', this.eSortAsc, column);
16458 this.addInIcon('sortDescending', this.eSortDesc, column);
16459 this.addInIcon('sortUnSort', this.eSortNone, column);
16460 this.addInIcon('menu', this.eMenu, column);
16461 this.addInIcon('filter', this.eFilter, column);
16462 };
16463 HeaderComp.prototype.addInIcon = function (iconName, eParent, column) {
16464 if (eParent == null) {
16465 return;
16466 }
16467 var eIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_7__["createIconNoSpan"])(iconName, this.gridOptionsWrapper, column);
16468 if (eIcon) {
16469 eParent.appendChild(eIcon);
16470 }
16471 };
16472 HeaderComp.prototype.setupTap = function () {
16473 var _this = this;
16474 var options = this.gridOptionsWrapper;
16475 if (options.isSuppressTouch()) {
16476 return;
16477 }
16478 var touchListener = new _widgets_touchListener__WEBPACK_IMPORTED_MODULE_11__["TouchListener"](this.getGui(), true);
16479 var suppressMenuHide = options.isSuppressMenuHide();
16480 var tapMenuButton = suppressMenuHide && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["exists"])(this.eMenu);
16481 var menuTouchListener = tapMenuButton ? new _widgets_touchListener__WEBPACK_IMPORTED_MODULE_11__["TouchListener"](this.eMenu, true) : touchListener;
16482 if (this.params.enableMenu) {
16483 var eventType = tapMenuButton ? 'EVENT_TAP' : 'EVENT_LONG_TAP';
16484 var showMenuFn = function (event) {
16485 options.getApi().showColumnMenuAfterMouseClick(_this.params.column, event.touchStart);
16486 };
16487 this.addManagedListener(menuTouchListener, _widgets_touchListener__WEBPACK_IMPORTED_MODULE_11__["TouchListener"][eventType], showMenuFn);
16488 }
16489 if (this.params.enableSorting) {
16490 var tapListener = function (event) {
16491 var target = event.touchStart.target;
16492 // When suppressMenuHide is true, a tap on the menu icon will bubble up
16493 // to the header container, in that case we should not sort
16494 if (suppressMenuHide && _this.eMenu.contains(target)) {
16495 return;
16496 }
16497 _this.sortController.progressSort(_this.params.column, false, "uiColumnSorted");
16498 };
16499 this.addManagedListener(touchListener, _widgets_touchListener__WEBPACK_IMPORTED_MODULE_11__["TouchListener"].EVENT_TAP, tapListener);
16500 }
16501 // if tapMenuButton is true `touchListener` and `menuTouchListener` are different
16502 // so we need to make sure to destroy both listeners here
16503 this.addDestroyFunc(function () { return touchListener.destroy(); });
16504 if (tapMenuButton) {
16505 this.addDestroyFunc(function () { return menuTouchListener.destroy(); });
16506 }
16507 };
16508 HeaderComp.prototype.workOutShowMenu = function () {
16509 // we don't show the menu if on an iPad/iPhone, as the user cannot have a pointer device/
16510 // However if suppressMenuHide is set to true the menu will be displayed alwasys, so it's ok
16511 // to show it on iPad in this case (as hover isn't needed). If suppressMenuHide
16512 // is false (default) user will need to use longpress to display the menu.
16513 var menuHides = !this.gridOptionsWrapper.isSuppressMenuHide();
16514 var onIpadAndMenuHides = Object(_utils_browser__WEBPACK_IMPORTED_MODULE_4__["isIOSUserAgent"])() && menuHides;
16515 var showMenu = this.params.enableMenu && !onIpadAndMenuHides;
16516 return showMenu;
16517 };
16518 HeaderComp.prototype.setMenu = function () {
16519 var _this = this;
16520 // if no menu provided in template, do nothing
16521 if (!this.eMenu) {
16522 return;
16523 }
16524 this.currentShowMenu = this.workOutShowMenu();
16525 if (!this.currentShowMenu) {
16526 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.eMenu);
16527 return;
16528 }
16529 var suppressMenuHide = this.gridOptionsWrapper.isSuppressMenuHide();
16530 this.addManagedListener(this.eMenu, 'click', function () { return _this.showMenu(_this.eMenu); });
16531 this.eMenu.classList.toggle('ag-header-menu-always-show', suppressMenuHide);
16532 };
16533 HeaderComp.prototype.showMenu = function (eventSource) {
16534 if (!eventSource) {
16535 eventSource = this.eMenu;
16536 }
16537 this.menuFactory.showMenuAfterButtonClick(this.params.column, eventSource, 'columnMenu');
16538 };
16539 HeaderComp.prototype.removeSortIcons = function () {
16540 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.eSortAsc);
16541 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.eSortDesc);
16542 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.eSortNone);
16543 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.eSortOrder);
16544 };
16545 HeaderComp.prototype.workOutSort = function () {
16546 return this.params.enableSorting;
16547 };
16548 HeaderComp.prototype.setupSort = function () {
16549 var _this = this;
16550 this.currentSort = this.params.enableSorting;
16551 if (!this.currentSort) {
16552 this.removeSortIcons();
16553 return;
16554 }
16555 var sortUsingCtrl = this.gridOptionsWrapper.isMultiSortKeyCtrl();
16556 // keep track of last time the moving changed flag was set
16557 this.addManagedListener(this.params.column, _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"].EVENT_MOVING_CHANGED, function () {
16558 _this.lastMovingChanged = new Date().getTime();
16559 });
16560 // add the event on the header, so when clicked, we do sorting
16561 if (this.eLabel) {
16562 this.addManagedListener(this.eLabel, 'click', function (event) {
16563 // sometimes when moving a column via dragging, this was also firing a clicked event.
16564 // here is issue raised by user: https://ag-grid.zendesk.com/agent/tickets/1076
16565 // this check stops sort if a) column is moving or b) column moved less than 200ms ago (so caters for race condition)
16566 var moving = _this.params.column.isMoving();
16567 var nowTime = new Date().getTime();
16568 // typically there is <2ms if moving flag was set recently, as it would be done in same VM turn
16569 var movedRecently = (nowTime - _this.lastMovingChanged) < 50;
16570 var columnMoving = moving || movedRecently;
16571 if (!columnMoving) {
16572 var multiSort = sortUsingCtrl ? (event.ctrlKey || event.metaKey) : event.shiftKey;
16573 _this.params.progressSort(multiSort);
16574 }
16575 });
16576 }
16577 this.addManagedListener(this.params.column, _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"].EVENT_SORT_CHANGED, this.onSortChanged.bind(this));
16578 this.onSortChanged();
16579 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SORT_CHANGED, this.setMultiSortOrder.bind(this));
16580 this.setMultiSortOrder();
16581 };
16582 HeaderComp.prototype.onSortChanged = function () {
16583 this.addOrRemoveCssClass('ag-header-cell-sorted-asc', this.params.column.isSortAscending());
16584 this.addOrRemoveCssClass('ag-header-cell-sorted-desc', this.params.column.isSortDescending());
16585 this.addOrRemoveCssClass('ag-header-cell-sorted-none', this.params.column.isSortNone());
16586 if (this.eSortAsc) {
16587 this.eSortAsc.classList.toggle('ag-hidden', !this.params.column.isSortAscending());
16588 }
16589 if (this.eSortDesc) {
16590 this.eSortDesc.classList.toggle('ag-hidden', !this.params.column.isSortDescending());
16591 }
16592 if (this.eSortNone) {
16593 var alwaysHideNoSort = !this.params.column.getColDef().unSortIcon && !this.gridOptionsWrapper.isUnSortIcon();
16594 this.eSortNone.classList.toggle('ag-hidden', alwaysHideNoSort || !this.params.column.isSortNone());
16595 }
16596 };
16597 // we listen here for global sort events, NOT column sort events, as we want to do this
16598 // when sorting has been set on all column (if we listened just for our col (where we
16599 // set the asc / desc icons) then it's possible other cols are yet to get their sorting state.
16600 HeaderComp.prototype.setMultiSortOrder = function () {
16601 if (!this.eSortOrder) {
16602 return;
16603 }
16604 var col = this.params.column;
16605 var allColumnsWithSorting = this.sortController.getColumnsWithSortingOrdered();
16606 var indexThisCol = allColumnsWithSorting.indexOf(col);
16607 var moreThanOneColSorting = allColumnsWithSorting.length > 1;
16608 var showIndex = col.isSorting() && moreThanOneColSorting;
16609 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["setDisplayed"])(this.eSortOrder, showIndex);
16610 if (indexThisCol >= 0) {
16611 this.eSortOrder.innerHTML = (indexThisCol + 1).toString();
16612 }
16613 else {
16614 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["clearElement"])(this.eSortOrder);
16615 }
16616 };
16617 HeaderComp.prototype.setupFilterIcon = function () {
16618 if (!this.eFilter) {
16619 return;
16620 }
16621 this.addManagedListener(this.params.column, _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"].EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));
16622 this.onFilterChanged();
16623 };
16624 HeaderComp.prototype.onFilterChanged = function () {
16625 var filterPresent = this.params.column.isFilterActive();
16626 this.eFilter.classList.toggle('ag-hidden', !filterPresent);
16627 };
16628 HeaderComp.TEMPLATE = "<div class=\"ag-cell-label-container\" role=\"presentation\">\n <span ref=\"eMenu\" class=\"ag-header-icon ag-header-cell-menu-button\" aria-hidden=\"true\"></span>\n <div ref=\"eLabel\" class=\"ag-header-cell-label\" role=\"presentation\">\n <span ref=\"eText\" class=\"ag-header-cell-text\"></span>\n <span ref=\"eFilter\" class=\"ag-header-icon ag-header-label-icon ag-filter-icon\" aria-hidden=\"true\"></span>\n <span ref=\"eSortOrder\" class=\"ag-header-icon ag-header-label-icon ag-sort-order\" aria-hidden=\"true\"></span>\n <span ref=\"eSortAsc\" class=\"ag-header-icon ag-header-label-icon ag-sort-ascending-icon\" aria-hidden=\"true\"></span>\n <span ref=\"eSortDesc\" class=\"ag-header-icon ag-header-label-icon ag-sort-descending-icon\" aria-hidden=\"true\"></span>\n <span ref=\"eSortNone\" class=\"ag-header-icon ag-header-label-icon ag-sort-none-icon\" aria-hidden=\"true\"></span>\n </div>\n </div>";
16629 __decorate([
16630 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortController')
16631 ], HeaderComp.prototype, "sortController", void 0);
16632 __decorate([
16633 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('menuFactory')
16634 ], HeaderComp.prototype, "menuFactory", void 0);
16635 __decorate([
16636 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_10__["RefSelector"])('eFilter')
16637 ], HeaderComp.prototype, "eFilter", void 0);
16638 __decorate([
16639 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_10__["RefSelector"])('eSortAsc')
16640 ], HeaderComp.prototype, "eSortAsc", void 0);
16641 __decorate([
16642 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_10__["RefSelector"])('eSortDesc')
16643 ], HeaderComp.prototype, "eSortDesc", void 0);
16644 __decorate([
16645 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_10__["RefSelector"])('eSortNone')
16646 ], HeaderComp.prototype, "eSortNone", void 0);
16647 __decorate([
16648 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_10__["RefSelector"])('eSortOrder')
16649 ], HeaderComp.prototype, "eSortOrder", void 0);
16650 __decorate([
16651 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_10__["RefSelector"])('eMenu')
16652 ], HeaderComp.prototype, "eMenu", void 0);
16653 __decorate([
16654 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_10__["RefSelector"])('eLabel')
16655 ], HeaderComp.prototype, "eLabel", void 0);
16656 __decorate([
16657 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_10__["RefSelector"])('eText')
16658 ], HeaderComp.prototype, "eText", void 0);
16659 return HeaderComp;
16660}(_widgets_component__WEBPACK_IMPORTED_MODULE_9__["Component"]));
16661
16662
16663
16664
16665
16666/***/ }),
16667/* 82 */
16668/***/ (function(module, __webpack_exports__, __webpack_require__) {
16669
16670"use strict";
16671__webpack_require__.r(__webpack_exports__);
16672/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TouchListener", function() { return TouchListener; });
16673/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
16674/* harmony import */ var _utils_mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50);
16675/**
16676 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16677 * @version v27.3.0
16678 * @link https://www.ag-grid.com/
16679 * @license MIT
16680 */
16681
16682
16683var TouchListener = /** @class */ (function () {
16684 function TouchListener(eElement, preventMouseClick) {
16685 var _this = this;
16686 if (preventMouseClick === void 0) { preventMouseClick = false; }
16687 this.destroyFuncs = [];
16688 this.touching = false;
16689 this.eventService = new _eventService__WEBPACK_IMPORTED_MODULE_0__["EventService"]();
16690 this.eElement = eElement;
16691 this.preventMouseClick = preventMouseClick;
16692 var startListener = this.onTouchStart.bind(this);
16693 var moveListener = this.onTouchMove.bind(this);
16694 var endListener = this.onTouchEnd.bind(this);
16695 this.eElement.addEventListener("touchstart", startListener, { passive: true });
16696 this.eElement.addEventListener("touchmove", moveListener, { passive: true });
16697 // we set passive=false, as we want to prevent default on this event
16698 this.eElement.addEventListener("touchend", endListener, { passive: false });
16699 this.destroyFuncs.push(function () {
16700 _this.eElement.removeEventListener("touchstart", startListener, { passive: true });
16701 _this.eElement.removeEventListener("touchmove", moveListener, { passive: true });
16702 _this.eElement.removeEventListener("touchend", endListener, { passive: false });
16703 });
16704 }
16705 TouchListener.prototype.getActiveTouch = function (touchList) {
16706 for (var i = 0; i < touchList.length; i++) {
16707 var matches = touchList[i].identifier === this.touchStart.identifier;
16708 if (matches) {
16709 return touchList[i];
16710 }
16711 }
16712 return null;
16713 };
16714 TouchListener.prototype.addEventListener = function (eventType, listener) {
16715 this.eventService.addEventListener(eventType, listener);
16716 };
16717 TouchListener.prototype.removeEventListener = function (eventType, listener) {
16718 this.eventService.removeEventListener(eventType, listener);
16719 };
16720 TouchListener.prototype.onTouchStart = function (touchEvent) {
16721 var _this = this;
16722 // only looking at one touch point at any time
16723 if (this.touching) {
16724 return;
16725 }
16726 this.touchStart = touchEvent.touches[0];
16727 this.touching = true;
16728 this.moved = false;
16729 var touchStartCopy = this.touchStart;
16730 window.setTimeout(function () {
16731 var touchesMatch = _this.touchStart === touchStartCopy;
16732 if (_this.touching && touchesMatch && !_this.moved) {
16733 _this.moved = true;
16734 var event_1 = {
16735 type: TouchListener.EVENT_LONG_TAP,
16736 touchStart: _this.touchStart,
16737 touchEvent: touchEvent
16738 };
16739 _this.eventService.dispatchEvent(event_1);
16740 }
16741 }, 500);
16742 };
16743 TouchListener.prototype.onTouchMove = function (touchEvent) {
16744 if (!this.touching) {
16745 return;
16746 }
16747 var touch = this.getActiveTouch(touchEvent.touches);
16748 if (!touch) {
16749 return;
16750 }
16751 var eventIsFarAway = !Object(_utils_mouse__WEBPACK_IMPORTED_MODULE_1__["areEventsNear"])(touch, this.touchStart, 4);
16752 if (eventIsFarAway) {
16753 this.moved = true;
16754 }
16755 };
16756 TouchListener.prototype.onTouchEnd = function (touchEvent) {
16757 if (!this.touching) {
16758 return;
16759 }
16760 if (!this.moved) {
16761 var event_2 = {
16762 type: TouchListener.EVENT_TAP,
16763 touchStart: this.touchStart
16764 };
16765 this.eventService.dispatchEvent(event_2);
16766 this.checkForDoubleTap();
16767 }
16768 // stops the tap from also been processed as a mouse click
16769 if (this.preventMouseClick) {
16770 touchEvent.preventDefault();
16771 }
16772 this.touching = false;
16773 };
16774 TouchListener.prototype.checkForDoubleTap = function () {
16775 var now = new Date().getTime();
16776 if (this.lastTapTime && this.lastTapTime > 0) {
16777 // if previous tap, see if duration is short enough to be considered double tap
16778 var interval = now - this.lastTapTime;
16779 if (interval > TouchListener.DOUBLE_TAP_MILLIS) {
16780 // dispatch double tap event
16781 var event_3 = {
16782 type: TouchListener.EVENT_DOUBLE_TAP,
16783 touchStart: this.touchStart
16784 };
16785 this.eventService.dispatchEvent(event_3);
16786 // this stops a tripple tap ending up as two double taps
16787 this.lastTapTime = null;
16788 }
16789 else {
16790 this.lastTapTime = now;
16791 }
16792 }
16793 else {
16794 this.lastTapTime = now;
16795 }
16796 };
16797 TouchListener.prototype.destroy = function () {
16798 this.destroyFuncs.forEach(function (func) { return func(); });
16799 };
16800 TouchListener.EVENT_TAP = "tap";
16801 TouchListener.EVENT_DOUBLE_TAP = "doubleTap";
16802 TouchListener.EVENT_LONG_TAP = "longTap";
16803 TouchListener.DOUBLE_TAP_MILLIS = 500;
16804 return TouchListener;
16805}());
16806
16807
16808
16809
16810
16811/***/ }),
16812/* 83 */
16813/***/ (function(module, __webpack_exports__, __webpack_require__) {
16814
16815"use strict";
16816__webpack_require__.r(__webpack_exports__);
16817/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupComp", function() { return HeaderGroupComp; });
16818/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
16819/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
16820/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
16821/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21);
16822/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
16823/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
16824/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48);
16825/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(26);
16826/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(36);
16827/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(57);
16828/* harmony import */ var _widgets_touchListener__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(82);
16829/**
16830 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16831 * @version v27.3.0
16832 * @link https://www.ag-grid.com/
16833 * @license MIT
16834 */
16835var __extends = (undefined && undefined.__extends) || (function () {
16836 var extendStatics = function (d, b) {
16837 extendStatics = Object.setPrototypeOf ||
16838 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16839 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
16840 return extendStatics(d, b);
16841 };
16842 return function (d, b) {
16843 extendStatics(d, b);
16844 function __() { this.constructor = d; }
16845 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16846 };
16847})();
16848var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16849 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16850 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16851 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
16852 return c > 3 && r && Object.defineProperty(target, key, r), r;
16853};
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865var HeaderGroupComp = /** @class */ (function (_super) {
16866 __extends(HeaderGroupComp, _super);
16867 function HeaderGroupComp() {
16868 return _super.call(this, HeaderGroupComp.TEMPLATE) || this;
16869 }
16870 // this is a user component, and IComponent has "public destroy()" as part of the interface.
16871 // so we need to override destroy() just to make the method public.
16872 HeaderGroupComp.prototype.destroy = function () {
16873 _super.prototype.destroy.call(this);
16874 };
16875 HeaderGroupComp.prototype.init = function (params) {
16876 this.params = params;
16877 this.checkWarnings();
16878 this.setupLabel();
16879 this.addGroupExpandIcon();
16880 this.setupExpandIcons();
16881 };
16882 HeaderGroupComp.prototype.checkWarnings = function () {
16883 var paramsAny = this.params;
16884 if (paramsAny.template) {
16885 var message_1 = "AG Grid: A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)";
16886 Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["doOnce"])(function () { return console.warn(message_1); }, 'HeaderGroupComp.templateNotSupported');
16887 }
16888 };
16889 HeaderGroupComp.prototype.setupExpandIcons = function () {
16890 var _this = this;
16891 this.addInIcon("columnGroupOpened", "agOpened");
16892 this.addInIcon("columnGroupClosed", "agClosed");
16893 var expandAction = function (event) {
16894 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_3__["isStopPropagationForAgGrid"])(event)) {
16895 return;
16896 }
16897 var newExpandedValue = !_this.params.columnGroup.isExpanded();
16898 _this.columnModel.setColumnGroupOpened(_this.params.columnGroup.getProvidedColumnGroup(), newExpandedValue, "uiColumnExpanded");
16899 };
16900 this.addTouchAndClickListeners(this.eCloseIcon, expandAction);
16901 this.addTouchAndClickListeners(this.eOpenIcon, expandAction);
16902 var stopPropagationAction = function (event) {
16903 Object(_utils_event__WEBPACK_IMPORTED_MODULE_3__["stopPropagationForAgGrid"])(event);
16904 };
16905 // adding stopPropagation to the double click for the icons prevents double click action happening
16906 // when the icons are clicked. if the icons are double clicked, then the groups should open and
16907 // then close again straight away. if we also listened to double click, then the group would open,
16908 // close, then open, which is not what we want. double click should only action if the user double
16909 // clicks outside of the icons.
16910 this.addManagedListener(this.eCloseIcon, "dblclick", stopPropagationAction);
16911 this.addManagedListener(this.eOpenIcon, "dblclick", stopPropagationAction);
16912 this.addManagedListener(this.getGui(), "dblclick", expandAction);
16913 this.updateIconVisibility();
16914 var providedColumnGroup = this.params.columnGroup.getProvidedColumnGroup();
16915 this.addManagedListener(providedColumnGroup, _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"].EVENT_EXPANDED_CHANGED, this.updateIconVisibility.bind(this));
16916 this.addManagedListener(providedColumnGroup, _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"].EVENT_EXPANDABLE_CHANGED, this.updateIconVisibility.bind(this));
16917 };
16918 HeaderGroupComp.prototype.addTouchAndClickListeners = function (eElement, action) {
16919 var touchListener = new _widgets_touchListener__WEBPACK_IMPORTED_MODULE_10__["TouchListener"](eElement, true);
16920 this.addManagedListener(touchListener, _widgets_touchListener__WEBPACK_IMPORTED_MODULE_10__["TouchListener"].EVENT_TAP, action);
16921 this.addDestroyFunc(function () { return touchListener.destroy(); });
16922 this.addManagedListener(eElement, "click", action);
16923 };
16924 HeaderGroupComp.prototype.updateIconVisibility = function () {
16925 var columnGroup = this.params.columnGroup;
16926 if (columnGroup.isExpandable()) {
16927 var expanded = this.params.columnGroup.isExpanded();
16928 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eOpenIcon, expanded);
16929 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eCloseIcon, !expanded);
16930 }
16931 else {
16932 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eOpenIcon, false);
16933 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eCloseIcon, false);
16934 }
16935 };
16936 HeaderGroupComp.prototype.addInIcon = function (iconName, refName) {
16937 var eIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_6__["createIconNoSpan"])(iconName, this.gridOptionsWrapper, null);
16938 if (eIcon) {
16939 this.getRefElement(refName).appendChild(eIcon);
16940 }
16941 };
16942 HeaderGroupComp.prototype.addGroupExpandIcon = function () {
16943 if (!this.params.columnGroup.isExpandable()) {
16944 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eOpenIcon, false);
16945 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eCloseIcon, false);
16946 return;
16947 }
16948 };
16949 HeaderGroupComp.prototype.setupLabel = function () {
16950 // no renderer, default text render
16951 var displayName = this.params.displayName;
16952 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(displayName)) {
16953 var displayNameSanitised = Object(_utils_string__WEBPACK_IMPORTED_MODULE_7__["escapeString"])(displayName);
16954 this.getRefElement('agLabel').innerHTML = displayNameSanitised;
16955 }
16956 };
16957 HeaderGroupComp.TEMPLATE = "<div class=\"ag-header-group-cell-label\" ref=\"agContainer\" role=\"presentation\">\n <span ref=\"agLabel\" class=\"ag-header-group-text\" role=\"presentation\"></span>\n <span ref=\"agOpened\" class=\"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded\"></span>\n <span ref=\"agClosed\" class=\"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed\"></span>\n </div>";
16958 __decorate([
16959 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("columnModel")
16960 ], HeaderGroupComp.prototype, "columnModel", void 0);
16961 __decorate([
16962 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])("agOpened")
16963 ], HeaderGroupComp.prototype, "eOpenIcon", void 0);
16964 __decorate([
16965 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])("agClosed")
16966 ], HeaderGroupComp.prototype, "eCloseIcon", void 0);
16967 return HeaderGroupComp;
16968}(_widgets_component__WEBPACK_IMPORTED_MODULE_8__["Component"]));
16969
16970
16971
16972
16973
16974/***/ }),
16975/* 84 */
16976/***/ (function(module, __webpack_exports__, __webpack_require__) {
16977
16978"use strict";
16979__webpack_require__.r(__webpack_exports__);
16980/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LargeTextCellEditor", function() { return LargeTextCellEditor; });
16981/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85);
16982/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
16983/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
16984/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65);
16985/**
16986 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16987 * @version v27.3.0
16988 * @link https://www.ag-grid.com/
16989 * @license MIT
16990 */
16991var __extends = (undefined && undefined.__extends) || (function () {
16992 var extendStatics = function (d, b) {
16993 extendStatics = Object.setPrototypeOf ||
16994 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16995 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
16996 return extendStatics(d, b);
16997 };
16998 return function (d, b) {
16999 extendStatics(d, b);
17000 function __() { this.constructor = d; }
17001 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17002 };
17003})();
17004var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17005 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17006 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17007 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
17008 return c > 3 && r && Object.defineProperty(target, key, r), r;
17009};
17010
17011
17012
17013
17014var LargeTextCellEditor = /** @class */ (function (_super) {
17015 __extends(LargeTextCellEditor, _super);
17016 function LargeTextCellEditor() {
17017 return _super.call(this, LargeTextCellEditor.TEMPLATE) || this;
17018 }
17019 LargeTextCellEditor.prototype.init = function (params) {
17020 this.params = params;
17021 this.focusAfterAttached = params.cellStartedEdit;
17022 this.eTextArea
17023 .setMaxLength(params.maxLength || 200)
17024 .setCols(params.cols || 60)
17025 .setRows(params.rows || 10);
17026 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(params.value)) {
17027 this.eTextArea.setValue(params.value.toString(), true);
17028 }
17029 this.addGuiEventListener('keydown', this.onKeyDown.bind(this));
17030 };
17031 LargeTextCellEditor.prototype.onKeyDown = function (event) {
17032 var key = event.key;
17033 if (key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].LEFT ||
17034 key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP ||
17035 key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].RIGHT ||
17036 key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].DOWN ||
17037 (event.shiftKey && key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].ENTER)) { // shift+enter allows for newlines
17038 event.stopPropagation();
17039 }
17040 };
17041 LargeTextCellEditor.prototype.afterGuiAttached = function () {
17042 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
17043 this.eTextArea.setInputAriaLabel(translate('ariaInputEditor', 'Input Editor'));
17044 if (this.focusAfterAttached) {
17045 this.eTextArea.getFocusableElement().focus();
17046 }
17047 };
17048 LargeTextCellEditor.prototype.getValue = function () {
17049 return this.params.parseValue(this.eTextArea.getValue());
17050 };
17051 LargeTextCellEditor.TEMPLATE = "<div class=\"ag-large-text\" tabindex=\"0\">\n <ag-input-text-area ref=\"eTextArea\" class=\"ag-large-text-input\"></ag-input-text-area>\n </div>";
17052 __decorate([
17053 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])("eTextArea")
17054 ], LargeTextCellEditor.prototype, "eTextArea", void 0);
17055 return LargeTextCellEditor;
17056}(_widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__["PopupComponent"]));
17057
17058
17059
17060
17061
17062/***/ }),
17063/* 85 */
17064/***/ (function(module, __webpack_exports__, __webpack_require__) {
17065
17066"use strict";
17067__webpack_require__.r(__webpack_exports__);
17068/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupComponent", function() { return PopupComponent; });
17069/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
17070/**
17071 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17072 * @version v27.3.0
17073 * @link https://www.ag-grid.com/
17074 * @license MIT
17075 */
17076var __extends = (undefined && undefined.__extends) || (function () {
17077 var extendStatics = function (d, b) {
17078 extendStatics = Object.setPrototypeOf ||
17079 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17080 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17081 return extendStatics(d, b);
17082 };
17083 return function (d, b) {
17084 extendStatics(d, b);
17085 function __() { this.constructor = d; }
17086 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17087 };
17088})();
17089
17090var PopupComponent = /** @class */ (function (_super) {
17091 __extends(PopupComponent, _super);
17092 function PopupComponent() {
17093 return _super !== null && _super.apply(this, arguments) || this;
17094 }
17095 PopupComponent.prototype.isPopup = function () {
17096 return true;
17097 };
17098 PopupComponent.prototype.setParentComponent = function (container) {
17099 container.addCssClass('ag-has-popup');
17100 _super.prototype.setParentComponent.call(this, container);
17101 };
17102 PopupComponent.prototype.destroy = function () {
17103 var parentComp = this.parentComponent;
17104 var hasParent = parentComp && parentComp.isAlive();
17105 if (hasParent) {
17106 parentComp.getGui().classList.remove('ag-has-popup');
17107 }
17108 _super.prototype.destroy.call(this);
17109 };
17110 return PopupComponent;
17111}(_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
17112
17113
17114
17115
17116
17117/***/ }),
17118/* 86 */
17119/***/ (function(module, __webpack_exports__, __webpack_require__) {
17120
17121"use strict";
17122__webpack_require__.r(__webpack_exports__);
17123/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupSelectCellEditor", function() { return PopupSelectCellEditor; });
17124/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
17125/* harmony import */ var _selectCellEditor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87);
17126/**
17127 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17128 * @version v27.3.0
17129 * @link https://www.ag-grid.com/
17130 * @license MIT
17131 */
17132var __extends = (undefined && undefined.__extends) || (function () {
17133 var extendStatics = function (d, b) {
17134 extendStatics = Object.setPrototypeOf ||
17135 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17136 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17137 return extendStatics(d, b);
17138 };
17139 return function (d, b) {
17140 extendStatics(d, b);
17141 function __() { this.constructor = d; }
17142 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17143 };
17144})();
17145
17146
17147var PopupSelectCellEditor = /** @class */ (function (_super) {
17148 __extends(PopupSelectCellEditor, _super);
17149 function PopupSelectCellEditor() {
17150 var _this = _super.call(this) || this;
17151 Object(_utils_function__WEBPACK_IMPORTED_MODULE_0__["doOnce"])(function () { return console.warn('AG Grid: The PopupSelectCellEditor (agPopupSelectCellEditor) is deprecated. Instead use {cellEditor: "agSelectCellEditor", cellEditorPopup: true} '); }, 'PopupSelectCellEditor.deprecated');
17152 return _this;
17153 }
17154 PopupSelectCellEditor.prototype.isPopup = function () {
17155 return true;
17156 };
17157 return PopupSelectCellEditor;
17158}(_selectCellEditor__WEBPACK_IMPORTED_MODULE_1__["SelectCellEditor"]));
17159
17160
17161
17162
17163
17164/***/ }),
17165/* 87 */
17166/***/ (function(module, __webpack_exports__, __webpack_require__) {
17167
17168"use strict";
17169__webpack_require__.r(__webpack_exports__);
17170/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectCellEditor", function() { return SelectCellEditor; });
17171/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
17172/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85);
17173/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
17174/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
17175/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65);
17176/**
17177 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17178 * @version v27.3.0
17179 * @link https://www.ag-grid.com/
17180 * @license MIT
17181 */
17182var __extends = (undefined && undefined.__extends) || (function () {
17183 var extendStatics = function (d, b) {
17184 extendStatics = Object.setPrototypeOf ||
17185 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17186 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17187 return extendStatics(d, b);
17188 };
17189 return function (d, b) {
17190 extendStatics(d, b);
17191 function __() { this.constructor = d; }
17192 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17193 };
17194})();
17195var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17196 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17197 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17198 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
17199 return c > 3 && r && Object.defineProperty(target, key, r), r;
17200};
17201
17202
17203
17204
17205
17206var SelectCellEditor = /** @class */ (function (_super) {
17207 __extends(SelectCellEditor, _super);
17208 function SelectCellEditor() {
17209 var _this = _super.call(this, '<div class="ag-cell-edit-wrapper"><ag-select class="ag-cell-editor" ref="eSelect"></ag-select></div>') || this;
17210 _this.startedByEnter = false;
17211 return _this;
17212 }
17213 SelectCellEditor.prototype.init = function (params) {
17214 var _this = this;
17215 this.focusAfterAttached = params.cellStartedEdit;
17216 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(params.values)) {
17217 console.warn('AG Grid: no values found for select cellEditor');
17218 return;
17219 }
17220 this.startedByEnter = params.eventKey != null ? params.eventKey === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].ENTER : false;
17221 var hasValue = false;
17222 params.values.forEach(function (value) {
17223 var option = { value: value };
17224 var valueFormatted = _this.valueFormatterService.formatValue(params.column, null, null, value);
17225 var valueFormattedExits = valueFormatted !== null && valueFormatted !== undefined;
17226 option.text = valueFormattedExits ? valueFormatted : value;
17227 _this.eSelect.addOption(option);
17228 hasValue = hasValue || params.value === value;
17229 });
17230 if (hasValue) {
17231 this.eSelect.setValue(params.value, true);
17232 }
17233 else if (params.values.length) {
17234 this.eSelect.setValue(params.values[0], true);
17235 }
17236 // we don't want to add this if full row editing, otherwise selecting will stop the
17237 // full row editing.
17238 if (!this.gridOptionsWrapper.isFullRowEdit()) {
17239 this.eSelect.onValueChange(function () { return params.stopEditing(); });
17240 }
17241 };
17242 SelectCellEditor.prototype.afterGuiAttached = function () {
17243 if (this.focusAfterAttached) {
17244 this.eSelect.getFocusableElement().focus();
17245 }
17246 if (this.startedByEnter) {
17247 this.eSelect.showPicker();
17248 }
17249 };
17250 SelectCellEditor.prototype.focusIn = function () {
17251 this.eSelect.getFocusableElement().focus();
17252 };
17253 SelectCellEditor.prototype.getValue = function () {
17254 return this.eSelect.getValue();
17255 };
17256 SelectCellEditor.prototype.isPopup = function () {
17257 return false;
17258 };
17259 __decorate([
17260 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueFormatterService')
17261 ], SelectCellEditor.prototype, "valueFormatterService", void 0);
17262 __decorate([
17263 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('eSelect')
17264 ], SelectCellEditor.prototype, "eSelect", void 0);
17265 return SelectCellEditor;
17266}(_widgets_popupComponent__WEBPACK_IMPORTED_MODULE_1__["PopupComponent"]));
17267
17268
17269
17270
17271
17272/***/ }),
17273/* 88 */
17274/***/ (function(module, __webpack_exports__, __webpack_require__) {
17275
17276"use strict";
17277__webpack_require__.r(__webpack_exports__);
17278/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupTextCellEditor", function() { return PopupTextCellEditor; });
17279/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
17280/* harmony import */ var _textCellEditor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89);
17281/**
17282 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17283 * @version v27.3.0
17284 * @link https://www.ag-grid.com/
17285 * @license MIT
17286 */
17287var __extends = (undefined && undefined.__extends) || (function () {
17288 var extendStatics = function (d, b) {
17289 extendStatics = Object.setPrototypeOf ||
17290 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17291 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17292 return extendStatics(d, b);
17293 };
17294 return function (d, b) {
17295 extendStatics(d, b);
17296 function __() { this.constructor = d; }
17297 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17298 };
17299})();
17300
17301
17302var PopupTextCellEditor = /** @class */ (function (_super) {
17303 __extends(PopupTextCellEditor, _super);
17304 function PopupTextCellEditor() {
17305 var _this = _super.call(this) || this;
17306 Object(_utils_function__WEBPACK_IMPORTED_MODULE_0__["doOnce"])(function () { return console.warn('AG Grid: The PopupTextCellEditor (agPopupTextCellEditor) is deprecated. Instead use {cellEditor: "agTextCellEditor", cellEditorPopup: true} '); }, 'PopupTextCellEditor.deprecated');
17307 return _this;
17308 }
17309 PopupTextCellEditor.prototype.isPopup = function () {
17310 return true;
17311 };
17312 return PopupTextCellEditor;
17313}(_textCellEditor__WEBPACK_IMPORTED_MODULE_1__["TextCellEditor"]));
17314
17315
17316
17317
17318
17319/***/ }),
17320/* 89 */
17321/***/ (function(module, __webpack_exports__, __webpack_require__) {
17322
17323"use strict";
17324__webpack_require__.r(__webpack_exports__);
17325/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextCellEditor", function() { return TextCellEditor; });
17326/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85);
17327/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
17328/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
17329/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43);
17330/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65);
17331/**
17332 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17333 * @version v27.3.0
17334 * @link https://www.ag-grid.com/
17335 * @license MIT
17336 */
17337var __extends = (undefined && undefined.__extends) || (function () {
17338 var extendStatics = function (d, b) {
17339 extendStatics = Object.setPrototypeOf ||
17340 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17341 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17342 return extendStatics(d, b);
17343 };
17344 return function (d, b) {
17345 extendStatics(d, b);
17346 function __() { this.constructor = d; }
17347 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17348 };
17349})();
17350var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17351 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17352 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17353 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
17354 return c > 3 && r && Object.defineProperty(target, key, r), r;
17355};
17356
17357
17358
17359
17360
17361var TextCellEditor = /** @class */ (function (_super) {
17362 __extends(TextCellEditor, _super);
17363 function TextCellEditor() {
17364 return _super.call(this, TextCellEditor.TEMPLATE) || this;
17365 }
17366 TextCellEditor.prototype.init = function (params) {
17367 this.params = params;
17368 var eInput = this.eInput;
17369 var startValue;
17370 // cellStartedEdit is only false if we are doing fullRow editing
17371 if (params.cellStartedEdit) {
17372 this.focusAfterAttached = true;
17373 if (params.eventKey === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].BACKSPACE || params.eventKey === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].DELETE) {
17374 startValue = '';
17375 }
17376 else if (params.charPress) {
17377 startValue = params.charPress;
17378 }
17379 else {
17380 startValue = this.getStartValue(params);
17381 if (params.eventKey !== _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].F2) {
17382 this.highlightAllOnFocus = true;
17383 }
17384 }
17385 }
17386 else {
17387 this.focusAfterAttached = false;
17388 startValue = this.getStartValue(params);
17389 }
17390 if (startValue != null) {
17391 eInput.setValue(startValue, true);
17392 }
17393 this.addManagedListener(eInput.getGui(), 'keydown', function (event) {
17394 var key = event.key;
17395 if (key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_UP || key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_DOWN) {
17396 event.preventDefault();
17397 }
17398 });
17399 };
17400 TextCellEditor.prototype.afterGuiAttached = function () {
17401 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
17402 var eInput = this.eInput;
17403 eInput.setInputAriaLabel(translate('ariaInputEditor', 'Input Editor'));
17404 if (!this.focusAfterAttached) {
17405 return;
17406 }
17407 // Added for AG-3238. We can't remove this explicit focus() because Chrome requires an input
17408 // to be focused before setSelectionRange will work. But it triggers a bug in Safari where
17409 // explicitly focusing then blurring an empty field will cause the parent container to scroll.
17410 if (!Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isBrowserSafari"])()) {
17411 eInput.getFocusableElement().focus();
17412 }
17413 var inputEl = eInput.getInputElement();
17414 if (this.highlightAllOnFocus) {
17415 inputEl.select();
17416 }
17417 else {
17418 // when we started editing, we want the caret at the end, not the start.
17419 // this comes into play in two scenarios:
17420 // a) when user hits F2
17421 // b) when user hits a printable character
17422 var value = eInput.getValue();
17423 var len = (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(value) && value.length) || 0;
17424 if (len) {
17425 inputEl.setSelectionRange(len, len);
17426 }
17427 }
17428 };
17429 // gets called when tabbing trough cells and in full row edit mode
17430 TextCellEditor.prototype.focusIn = function () {
17431 var eInput = this.eInput;
17432 var focusEl = eInput.getFocusableElement();
17433 var inputEl = eInput.getInputElement();
17434 focusEl.focus();
17435 inputEl.select();
17436 };
17437 TextCellEditor.prototype.getValue = function () {
17438 var eInput = this.eInput;
17439 return this.params.parseValue(eInput.getValue());
17440 };
17441 TextCellEditor.prototype.getStartValue = function (params) {
17442 var formatValue = params.useFormatter || params.column.getColDef().refData;
17443 return formatValue ? params.formatValue(params.value) : params.value;
17444 };
17445 TextCellEditor.prototype.isPopup = function () {
17446 return false;
17447 };
17448 TextCellEditor.TEMPLATE = '<div class="ag-cell-edit-wrapper"><ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field></div>';
17449 __decorate([
17450 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eInput')
17451 ], TextCellEditor.prototype, "eInput", void 0);
17452 return TextCellEditor;
17453}(_widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__["PopupComponent"]));
17454
17455
17456
17457
17458
17459/***/ }),
17460/* 90 */
17461/***/ (function(module, __webpack_exports__, __webpack_require__) {
17462
17463"use strict";
17464__webpack_require__.r(__webpack_exports__);
17465/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimateShowChangeCellRenderer", function() { return AnimateShowChangeCellRenderer; });
17466/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
17467/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36);
17468/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
17469/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
17470/**
17471 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17472 * @version v27.3.0
17473 * @link https://www.ag-grid.com/
17474 * @license MIT
17475 */
17476var __extends = (undefined && undefined.__extends) || (function () {
17477 var extendStatics = function (d, b) {
17478 extendStatics = Object.setPrototypeOf ||
17479 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17480 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17481 return extendStatics(d, b);
17482 };
17483 return function (d, b) {
17484 extendStatics(d, b);
17485 function __() { this.constructor = d; }
17486 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17487 };
17488})();
17489var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17490 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17491 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17492 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
17493 return c > 3 && r && Object.defineProperty(target, key, r), r;
17494};
17495
17496
17497
17498
17499var ARROW_UP = '\u2191';
17500var ARROW_DOWN = '\u2193';
17501var AnimateShowChangeCellRenderer = /** @class */ (function (_super) {
17502 __extends(AnimateShowChangeCellRenderer, _super);
17503 function AnimateShowChangeCellRenderer() {
17504 var _this = _super.call(this, AnimateShowChangeCellRenderer.TEMPLATE) || this;
17505 _this.refreshCount = 0;
17506 return _this;
17507 }
17508 AnimateShowChangeCellRenderer.prototype.init = function (params) {
17509 // this.params = params;
17510 this.eValue = this.queryForHtmlElement('.ag-value-change-value');
17511 this.eDelta = this.queryForHtmlElement('.ag-value-change-delta');
17512 this.refresh(params);
17513 };
17514 AnimateShowChangeCellRenderer.prototype.showDelta = function (params, delta) {
17515 var absDelta = Math.abs(delta);
17516 var valueFormatted = params.formatValue(absDelta);
17517 var valueToUse = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(valueFormatted) ? valueFormatted : absDelta;
17518 var deltaUp = (delta >= 0);
17519 if (deltaUp) {
17520 this.eDelta.innerHTML = ARROW_UP + valueToUse;
17521 }
17522 else {
17523 // because negative, use ABS to remove sign
17524 this.eDelta.innerHTML = ARROW_DOWN + valueToUse;
17525 }
17526 this.eDelta.classList.toggle('ag-value-change-delta-up', deltaUp);
17527 this.eDelta.classList.toggle('ag-value-change-delta-down', !deltaUp);
17528 };
17529 AnimateShowChangeCellRenderer.prototype.setTimerToRemoveDelta = function () {
17530 var _this = this;
17531 // the refreshCount makes sure that if the value updates again while
17532 // the below timer is waiting, then the below timer will realise it
17533 // is not the most recent and will not try to remove the delta value.
17534 this.refreshCount++;
17535 var refreshCountCopy = this.refreshCount;
17536 window.setTimeout(function () {
17537 if (refreshCountCopy === _this.refreshCount) {
17538 _this.hideDeltaValue();
17539 }
17540 }, 2000);
17541 };
17542 AnimateShowChangeCellRenderer.prototype.hideDeltaValue = function () {
17543 this.eValue.classList.remove('ag-value-change-value-highlight');
17544 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["clearElement"])(this.eDelta);
17545 };
17546 AnimateShowChangeCellRenderer.prototype.refresh = function (params) {
17547 var value = params.value;
17548 if (value === this.lastValue) {
17549 return false;
17550 }
17551 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(params.valueFormatted)) {
17552 this.eValue.innerHTML = params.valueFormatted;
17553 }
17554 else if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(params.value)) {
17555 this.eValue.innerHTML = value;
17556 }
17557 else {
17558 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["clearElement"])(this.eValue);
17559 }
17560 // we don't show the delta if we are in the middle of a filter. see comment on FilterManager
17561 // with regards processingFilterChange
17562 if (this.filterManager.isSuppressFlashingCellsBecauseFiltering()) {
17563 return false;
17564 }
17565 if (typeof value === 'number' && typeof this.lastValue === 'number') {
17566 var delta = value - this.lastValue;
17567 this.showDelta(params, delta);
17568 }
17569 // highlight the current value, but only if it's not new, otherwise it
17570 // would get highlighted first time the value is shown
17571 if (this.lastValue) {
17572 this.eValue.classList.add('ag-value-change-value-highlight');
17573 }
17574 this.setTimerToRemoveDelta();
17575 this.lastValue = value;
17576 return true;
17577 };
17578 AnimateShowChangeCellRenderer.TEMPLATE = '<span>' +
17579 '<span class="ag-value-change-delta"></span>' +
17580 '<span class="ag-value-change-value"></span>' +
17581 '</span>';
17582 __decorate([
17583 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
17584 ], AnimateShowChangeCellRenderer.prototype, "filterManager", void 0);
17585 return AnimateShowChangeCellRenderer;
17586}(_widgets_component__WEBPACK_IMPORTED_MODULE_1__["Component"]));
17587
17588
17589
17590
17591
17592/***/ }),
17593/* 91 */
17594/***/ (function(module, __webpack_exports__, __webpack_require__) {
17595
17596"use strict";
17597__webpack_require__.r(__webpack_exports__);
17598/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimateSlideCellRenderer", function() { return AnimateSlideCellRenderer; });
17599/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
17600/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36);
17601/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
17602/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
17603/**
17604 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17605 * @version v27.3.0
17606 * @link https://www.ag-grid.com/
17607 * @license MIT
17608 */
17609var __extends = (undefined && undefined.__extends) || (function () {
17610 var extendStatics = function (d, b) {
17611 extendStatics = Object.setPrototypeOf ||
17612 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17613 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17614 return extendStatics(d, b);
17615 };
17616 return function (d, b) {
17617 extendStatics(d, b);
17618 function __() { this.constructor = d; }
17619 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17620 };
17621})();
17622var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17623 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17624 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17625 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
17626 return c > 3 && r && Object.defineProperty(target, key, r), r;
17627};
17628
17629
17630
17631
17632var AnimateSlideCellRenderer = /** @class */ (function (_super) {
17633 __extends(AnimateSlideCellRenderer, _super);
17634 function AnimateSlideCellRenderer() {
17635 var _this = _super.call(this, AnimateSlideCellRenderer.TEMPLATE) || this;
17636 _this.refreshCount = 0;
17637 _this.eCurrent = _this.queryForHtmlElement('.ag-value-slide-current');
17638 return _this;
17639 }
17640 AnimateSlideCellRenderer.prototype.init = function (params) {
17641 this.refresh(params);
17642 };
17643 AnimateSlideCellRenderer.prototype.addSlideAnimation = function () {
17644 var _this = this;
17645 this.refreshCount++;
17646 // below we keep checking this, and stop working on the animation
17647 // if it no longer matches - this means another animation has started
17648 // and this one is stale.
17649 var refreshCountCopy = this.refreshCount;
17650 // if old animation, remove it
17651 if (this.ePrevious) {
17652 this.getGui().removeChild(this.ePrevious);
17653 }
17654 this.ePrevious = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["loadTemplate"])('<span class="ag-value-slide-previous ag-value-slide-out"></span>');
17655 this.ePrevious.innerHTML = this.eCurrent.innerHTML;
17656 this.getGui().insertBefore(this.ePrevious, this.eCurrent);
17657 // having timeout of 0 allows use to skip to the next css turn,
17658 // so we know the previous css classes have been applied. so the
17659 // complex set of setTimeout below creates the animation
17660 window.setTimeout(function () {
17661 if (refreshCountCopy !== _this.refreshCount) {
17662 return;
17663 }
17664 _this.ePrevious.classList.add('ag-value-slide-out-end');
17665 }, 50);
17666 window.setTimeout(function () {
17667 if (refreshCountCopy !== _this.refreshCount) {
17668 return;
17669 }
17670 _this.getGui().removeChild(_this.ePrevious);
17671 _this.ePrevious = null;
17672 }, 3000);
17673 };
17674 AnimateSlideCellRenderer.prototype.refresh = function (params) {
17675 var value = params.value;
17676 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(value)) {
17677 value = '';
17678 }
17679 if (value === this.lastValue) {
17680 return false;
17681 }
17682 // we don't show the delta if we are in the middle of a filter. see comment on FilterManager
17683 // with regards processingFilterChange
17684 if (this.filterManager.isSuppressFlashingCellsBecauseFiltering()) {
17685 return false;
17686 }
17687 this.addSlideAnimation();
17688 this.lastValue = value;
17689 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(params.valueFormatted)) {
17690 this.eCurrent.innerHTML = params.valueFormatted;
17691 }
17692 else if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(params.value)) {
17693 this.eCurrent.innerHTML = value;
17694 }
17695 else {
17696 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["clearElement"])(this.eCurrent);
17697 }
17698 return true;
17699 };
17700 AnimateSlideCellRenderer.TEMPLATE = "<span>\n <span class=\"ag-value-slide-current\"></span>\n </span>";
17701 __decorate([
17702 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
17703 ], AnimateSlideCellRenderer.prototype, "filterManager", void 0);
17704 return AnimateSlideCellRenderer;
17705}(_widgets_component__WEBPACK_IMPORTED_MODULE_1__["Component"]));
17706
17707
17708
17709
17710
17711/***/ }),
17712/* 92 */
17713/***/ (function(module, __webpack_exports__, __webpack_require__) {
17714
17715"use strict";
17716__webpack_require__.r(__webpack_exports__);
17717/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupCellRenderer", function() { return GroupCellRenderer; });
17718/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44);
17719/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42);
17720/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36);
17721/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57);
17722/* harmony import */ var _groupCellRendererCtrl__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93);
17723/**
17724 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17725 * @version v27.3.0
17726 * @link https://www.ag-grid.com/
17727 * @license MIT
17728 */
17729var __extends = (undefined && undefined.__extends) || (function () {
17730 var extendStatics = function (d, b) {
17731 extendStatics = Object.setPrototypeOf ||
17732 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17733 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17734 return extendStatics(d, b);
17735 };
17736 return function (d, b) {
17737 extendStatics(d, b);
17738 function __() { this.constructor = d; }
17739 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17740 };
17741})();
17742var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17743 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17744 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17745 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
17746 return c > 3 && r && Object.defineProperty(target, key, r), r;
17747};
17748
17749
17750
17751
17752
17753var GroupCellRenderer = /** @class */ (function (_super) {
17754 __extends(GroupCellRenderer, _super);
17755 function GroupCellRenderer() {
17756 return _super.call(this, GroupCellRenderer.TEMPLATE) || this;
17757 }
17758 GroupCellRenderer.prototype.init = function (params) {
17759 var _this = this;
17760 var compProxy = {
17761 setInnerRenderer: function (compDetails, valueToDisplay) { return _this.setRenderDetails(compDetails, valueToDisplay); },
17762 setChildCount: function (count) { return _this.eChildCount.innerHTML = count; },
17763 addOrRemoveCssClass: function (cssClass, value) { return _this.addOrRemoveCssClass(cssClass, value); },
17764 setContractedDisplayed: function (expanded) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisplayed"])(_this.eContracted, expanded); },
17765 setExpandedDisplayed: function (expanded) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisplayed"])(_this.eExpanded, expanded); },
17766 setCheckboxVisible: function (visible) { return _this.eCheckbox.classList.toggle('ag-invisible', !visible); }
17767 };
17768 var ctrl = this.createManagedBean(new _groupCellRendererCtrl__WEBPACK_IMPORTED_MODULE_4__["GroupCellRendererCtrl"]());
17769 var fullWidth = !params.colDef;
17770 var eGui = this.getGui();
17771 ctrl.init(compProxy, eGui, this.eCheckbox, this.eExpanded, this.eContracted, this.constructor, params);
17772 if (fullWidth) {
17773 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_0__["setAriaRole"])(eGui, 'gridcell');
17774 }
17775 };
17776 GroupCellRenderer.prototype.setRenderDetails = function (compDetails, valueToDisplay) {
17777 var _this = this;
17778 if (compDetails) {
17779 var componentPromise = compDetails.newAgStackInstance();
17780 if (!componentPromise) {
17781 return;
17782 }
17783 componentPromise.then(function (comp) {
17784 if (!comp) {
17785 return;
17786 }
17787 var destroyComp = function () { return _this.context.destroyBean(comp); };
17788 if (_this.isAlive()) {
17789 _this.eValue.appendChild(comp.getGui());
17790 _this.addDestroyFunc(destroyComp);
17791 }
17792 else {
17793 destroyComp();
17794 }
17795 });
17796 }
17797 else {
17798 this.eValue.innerText = valueToDisplay;
17799 }
17800 };
17801 // this is a user component, and IComponent has "public destroy()" as part of the interface.
17802 // so we need to have public here instead of private or protected
17803 GroupCellRenderer.prototype.destroy = function () {
17804 this.getContext().destroyBean(this.innerCellRenderer);
17805 _super.prototype.destroy.call(this);
17806 };
17807 GroupCellRenderer.prototype.refresh = function () {
17808 return false;
17809 };
17810 GroupCellRenderer.TEMPLATE = "<span class=\"ag-cell-wrapper\">\n <span class=\"ag-group-expanded\" ref=\"eExpanded\"></span>\n <span class=\"ag-group-contracted\" ref=\"eContracted\"></span>\n <span class=\"ag-group-checkbox ag-invisible\" ref=\"eCheckbox\"></span>\n <span class=\"ag-group-value\" ref=\"eValue\"></span>\n <span class=\"ag-group-child-count\" ref=\"eChildCount\"></span>\n </span>";
17811 __decorate([
17812 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eExpanded')
17813 ], GroupCellRenderer.prototype, "eExpanded", void 0);
17814 __decorate([
17815 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eContracted')
17816 ], GroupCellRenderer.prototype, "eContracted", void 0);
17817 __decorate([
17818 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eCheckbox')
17819 ], GroupCellRenderer.prototype, "eCheckbox", void 0);
17820 __decorate([
17821 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eValue')
17822 ], GroupCellRenderer.prototype, "eValue", void 0);
17823 __decorate([
17824 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eChildCount')
17825 ], GroupCellRenderer.prototype, "eChildCount", void 0);
17826 return GroupCellRenderer;
17827}(_widgets_component__WEBPACK_IMPORTED_MODULE_2__["Component"]));
17828
17829
17830
17831
17832
17833/***/ }),
17834/* 93 */
17835/***/ (function(module, __webpack_exports__, __webpack_require__) {
17836
17837"use strict";
17838__webpack_require__.r(__webpack_exports__);
17839/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupCellRendererCtrl", function() { return GroupCellRendererCtrl; });
17840/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
17841/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65);
17842/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
17843/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
17844/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94);
17845/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21);
17846/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44);
17847/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14);
17848/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7);
17849/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(48);
17850/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(13);
17851/* harmony import */ var _checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(95);
17852/* harmony import */ var _row_rowDragComp__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(96);
17853/**
17854 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17855 * @version v27.3.0
17856 * @link https://www.ag-grid.com/
17857 * @license MIT
17858 */
17859var __extends = (undefined && undefined.__extends) || (function () {
17860 var extendStatics = function (d, b) {
17861 extendStatics = Object.setPrototypeOf ||
17862 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17863 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17864 return extendStatics(d, b);
17865 };
17866 return function (d, b) {
17867 extendStatics(d, b);
17868 function __() { this.constructor = d; }
17869 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17870 };
17871})();
17872var __assign = (undefined && undefined.__assign) || function () {
17873 __assign = Object.assign || function(t) {
17874 for (var s, i = 1, n = arguments.length; i < n; i++) {
17875 s = arguments[i];
17876 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
17877 t[p] = s[p];
17878 }
17879 return t;
17880 };
17881 return __assign.apply(this, arguments);
17882};
17883var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17884 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17885 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17886 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
17887 return c > 3 && r && Object.defineProperty(target, key, r), r;
17888};
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902var GroupCellRendererCtrl = /** @class */ (function (_super) {
17903 __extends(GroupCellRendererCtrl, _super);
17904 function GroupCellRendererCtrl() {
17905 return _super !== null && _super.apply(this, arguments) || this;
17906 }
17907 GroupCellRendererCtrl.prototype.init = function (comp, eGui, eCheckbox, eExpanded, eContracted, compClass, params) {
17908 this.params = params;
17909 this.eGui = eGui;
17910 this.eCheckbox = eCheckbox;
17911 this.eExpanded = eExpanded;
17912 this.eContracted = eContracted;
17913 this.comp = comp;
17914 this.compClass = compClass;
17915 var topLevelFooter = this.isTopLevelFooter();
17916 var embeddedRowMismatch = this.isEmbeddedRowMismatch();
17917 // This allows for empty strings to appear as groups since
17918 // it will only return for null or undefined.
17919 var nullValue = params.value == null;
17920 var skipCell = false;
17921 // if the groupCellRenderer is inside of a footer and groupHideOpenParents is true
17922 // we should only display the groupCellRenderer if the current column is the rowGroupedColumn
17923 if (this.gridOptionsWrapper.isGroupIncludeFooter() && this.gridOptionsWrapper.isGroupHideOpenParents()) {
17924 var node = params.node;
17925 if (node.footer) {
17926 var showRowGroup = params.colDef && params.colDef.showRowGroup;
17927 var rowGroupColumnId = node.rowGroupColumn && node.rowGroupColumn.getColId();
17928 skipCell = showRowGroup !== rowGroupColumnId;
17929 }
17930 }
17931 this.cellIsBlank = topLevelFooter ? false : (embeddedRowMismatch || nullValue || skipCell);
17932 if (this.cellIsBlank) {
17933 return;
17934 }
17935 this.setupShowingValueForOpenedParent();
17936 this.findDisplayedGroupNode();
17937 this.addFullWidthRowDraggerIfNeeded();
17938 this.addExpandAndContract();
17939 this.addCheckboxIfNeeded();
17940 this.addValueElement();
17941 this.setupIndent();
17942 this.refreshAriaExpanded();
17943 };
17944 GroupCellRendererCtrl.prototype.destroy = function () {
17945 _super.prototype.destroy.call(this);
17946 // property cleanup to avoid memory leaks
17947 this.expandListener = null;
17948 };
17949 GroupCellRendererCtrl.prototype.refreshAriaExpanded = function () {
17950 var _a = this.params, node = _a.node, eParentOfValue = _a.eParentOfValue;
17951 if (this.expandListener) {
17952 this.expandListener = this.expandListener();
17953 }
17954 if (!this.isExpandable()) {
17955 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_6__["removeAriaExpanded"])(eParentOfValue);
17956 return;
17957 }
17958 var listener = function () {
17959 // for react, we don't use JSX, as setting attributes via jsx is slower
17960 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_6__["setAriaExpanded"])(eParentOfValue, !!node.expanded);
17961 };
17962 this.expandListener = this.addManagedListener(node, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_EXPANDED_CHANGED, listener) || null;
17963 listener();
17964 };
17965 GroupCellRendererCtrl.prototype.isTopLevelFooter = function () {
17966 if (!this.gridOptionsWrapper.isGroupIncludeTotalFooter()) {
17967 return false;
17968 }
17969 if (this.params.value != null || this.params.node.level != -1) {
17970 return false;
17971 }
17972 // at this point, we know it's the root node and there is no value present, so it's a footer cell.
17973 // the only thing to work out is if we are displaying groups across multiple
17974 // columns (groupMultiAutoColumn=true), we only want 'total' to appear in the first column.
17975 var colDef = this.params.colDef;
17976 var doingFullWidth = colDef == null;
17977 if (doingFullWidth) {
17978 return true;
17979 }
17980 if (colDef.showRowGroup === true) {
17981 return true;
17982 }
17983 var rowGroupCols = this.columnModel.getRowGroupColumns();
17984 // this is a sanity check, rowGroupCols should always be present
17985 if (!rowGroupCols || rowGroupCols.length === 0) {
17986 return true;
17987 }
17988 var firstRowGroupCol = rowGroupCols[0];
17989 return firstRowGroupCol.getId() === colDef.showRowGroup;
17990 };
17991 // if we are doing embedded full width rows, we only show the renderer when
17992 // in the body, or if pinning in the pinned section, or if pinning and RTL,
17993 // in the right section. otherwise we would have the cell repeated in each section.
17994 GroupCellRendererCtrl.prototype.isEmbeddedRowMismatch = function () {
17995 if (!this.params.fullWidth || !this.gridOptionsWrapper.isEmbedFullWidthRows()) {
17996 return false;
17997 }
17998 var pinnedLeftCell = this.params.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_LEFT;
17999 var pinnedRightCell = this.params.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_RIGHT;
18000 var bodyCell = !pinnedLeftCell && !pinnedRightCell;
18001 if (this.gridOptionsWrapper.isEnableRtl()) {
18002 if (this.columnModel.isPinningLeft()) {
18003 return !pinnedRightCell;
18004 }
18005 return !bodyCell;
18006 }
18007 if (this.columnModel.isPinningLeft()) {
18008 return !pinnedLeftCell;
18009 }
18010 return !bodyCell;
18011 };
18012 GroupCellRendererCtrl.prototype.findDisplayedGroupNode = function () {
18013 var column = this.params.column;
18014 var rowNode = this.params.node;
18015 if (this.showingValueForOpenedParent) {
18016 var pointer = rowNode.parent;
18017 while (pointer != null) {
18018 if (pointer.rowGroupColumn && column.isRowGroupDisplayed(pointer.rowGroupColumn.getId())) {
18019 this.displayedGroupNode = pointer;
18020 break;
18021 }
18022 pointer = pointer.parent;
18023 }
18024 }
18025 // if we didn't find a displayed group, set it to the row node
18026 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_8__["missing"])(this.displayedGroupNode)) {
18027 this.displayedGroupNode = rowNode;
18028 }
18029 };
18030 GroupCellRendererCtrl.prototype.setupShowingValueForOpenedParent = function () {
18031 // note - this code depends on sortService.updateGroupDataForHiddenOpenParents, where group data
18032 // is updated to reflect the dragged down parents
18033 var rowNode = this.params.node;
18034 var column = this.params.column;
18035 if (!this.gridOptionsWrapper.isGroupHideOpenParents()) {
18036 this.showingValueForOpenedParent = false;
18037 return;
18038 }
18039 // hideOpenParents means rowNode.groupData can have data for the group this column is displaying, even though
18040 // this rowNode isn't grouping by the column we are displaying
18041 // if no groupData at all, we are not showing a parent value
18042 if (!rowNode.groupData) {
18043 this.showingValueForOpenedParent = false;
18044 return;
18045 }
18046 // this is the normal case, in that we are showing a group for which this column is configured. note that
18047 // this means the Row Group is closed (if it was open, we would not be displaying it)
18048 var showingGroupNode = rowNode.rowGroupColumn != null;
18049 if (showingGroupNode) {
18050 var keyOfGroupingColumn = rowNode.rowGroupColumn.getId();
18051 var configuredToShowThisGroupLevel = column.isRowGroupDisplayed(keyOfGroupingColumn);
18052 // if showing group as normal, we didn't take group info from parent
18053 if (configuredToShowThisGroupLevel) {
18054 this.showingValueForOpenedParent = false;
18055 return;
18056 }
18057 }
18058 // see if we are showing a Group Value for the Displayed Group. if we are showing a group value, and this Row Node
18059 // is not grouping by this Displayed Group, we must of gotten the value from a parent node
18060 var valPresent = rowNode.groupData[column.getId()] != null;
18061 this.showingValueForOpenedParent = valPresent;
18062 };
18063 GroupCellRendererCtrl.prototype.addValueElement = function () {
18064 if (this.displayedGroupNode.footer) {
18065 this.addFooterValue();
18066 }
18067 else {
18068 this.addGroupValue();
18069 this.addChildCount();
18070 }
18071 };
18072 GroupCellRendererCtrl.prototype.addGroupValue = function () {
18073 // we try and use the cellRenderer of the column used for the grouping if we can
18074 var paramsAdjusted = this.adjustParamsWithDetailsFromRelatedColumn();
18075 var innerCompDetails = this.getInnerCompDetails(paramsAdjusted);
18076 var valueFormatted = paramsAdjusted.valueFormatted, value = paramsAdjusted.value;
18077 var valueWhenNoRenderer = valueFormatted != null ? valueFormatted : value;
18078 this.comp.setInnerRenderer(innerCompDetails, valueWhenNoRenderer);
18079 };
18080 GroupCellRendererCtrl.prototype.adjustParamsWithDetailsFromRelatedColumn = function () {
18081 var relatedColumn = this.displayedGroupNode.rowGroupColumn;
18082 var column = this.params.column;
18083 if (!relatedColumn) {
18084 return this.params;
18085 }
18086 var notFullWidth = column != null;
18087 if (notFullWidth) {
18088 var showingThisRowGroup = column.isRowGroupDisplayed(relatedColumn.getId());
18089 if (!showingThisRowGroup) {
18090 return this.params;
18091 }
18092 }
18093 var params = this.params;
18094 var _a = this.params, value = _a.value, node = _a.node;
18095 var valueFormatted = this.valueFormatterService.formatValue(relatedColumn, node, value);
18096 // we don't update the original params, as they could of come through React,
18097 // as react has RowGroupCellRenderer, which means the params could be props which
18098 // would be read only
18099 var paramsAdjusted = __assign(__assign({}, params), { valueFormatted: valueFormatted });
18100 return paramsAdjusted;
18101 };
18102 GroupCellRendererCtrl.prototype.addFooterValue = function () {
18103 var footerValueGetter = this.params.footerValueGetter;
18104 var footerValue = '';
18105 if (footerValueGetter) {
18106 // params is same as we were given, except we set the value as the item to display
18107 var paramsClone = Object(_utils_object__WEBPACK_IMPORTED_MODULE_10__["cloneObject"])(this.params);
18108 paramsClone.value = this.params.value;
18109 if (typeof footerValueGetter === 'function') {
18110 footerValue = footerValueGetter(paramsClone);
18111 }
18112 else if (typeof footerValueGetter === 'string') {
18113 footerValue = this.expressionService.evaluate(footerValueGetter, paramsClone);
18114 }
18115 else {
18116 console.warn('AG Grid: footerValueGetter should be either a function or a string (expression)');
18117 }
18118 }
18119 else {
18120 footerValue = 'Total ' + (this.params.value != null ? this.params.value : '');
18121 }
18122 var innerCompDetails = this.getInnerCompDetails(this.params);
18123 this.comp.setInnerRenderer(innerCompDetails, footerValue);
18124 };
18125 GroupCellRendererCtrl.prototype.getInnerCompDetails = function (params) {
18126 var _this = this;
18127 // for full width rows, we don't do any of the below
18128 if (params.fullWidth) {
18129 return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptions.groupRowRendererParams, params);
18130 }
18131 // when grouping, the normal case is we use the cell renderer of the grouped column. eg if grouping by country
18132 // and then rating, we will use the country cell renderer for each country group row and likewise the rating
18133 // cell renderer for each rating group row.
18134 //
18135 // however if the user has innerCellRenderer defined, this gets preference and we don't use cell renderers
18136 // of the grouped columns.
18137 //
18138 // so we check and use in the following order:
18139 //
18140 // 1) thisColDef.cellRendererParams.innerRenderer of the column showing the groups (eg auto group column)
18141 // 2) groupedColDef.cellRenderer of the grouped column
18142 // 3) groupedColDef.cellRendererParams.innerRenderer
18143 // we check if cell renderer provided for the group cell renderer, eg colDef.cellRendererParams.innerRenderer
18144 var innerCompDetails = this.userComponentFactory
18145 .getInnerRendererDetails(params, params);
18146 // avoid using GroupCellRenderer again, otherwise stack overflow, as we insert same renderer again and again.
18147 // this covers off chance user is grouping by a column that is also configured with GroupCellRenderer
18148 var isGroupRowRenderer = function (details) { return details && details.componentClass == _this.compClass; };
18149 if (innerCompDetails && !isGroupRowRenderer(innerCompDetails)) {
18150 // use the renderer defined in cellRendererParams.innerRenderer
18151 return innerCompDetails;
18152 }
18153 var relatedColumn = this.displayedGroupNode.rowGroupColumn;
18154 var relatedColDef = relatedColumn ? relatedColumn.getColDef() : undefined;
18155 if (!relatedColDef) {
18156 return;
18157 }
18158 // otherwise see if we can use the cellRenderer of the column we are grouping by
18159 var relatedCompDetails = this.userComponentFactory
18160 .getCellRendererDetails(relatedColDef, params);
18161 if (relatedCompDetails && !isGroupRowRenderer(relatedCompDetails)) {
18162 // Only if the original column is using a specific renderer, it it is a using a DEFAULT one ignore it
18163 return relatedCompDetails;
18164 }
18165 if (isGroupRowRenderer(relatedCompDetails) &&
18166 relatedColDef.cellRendererParams &&
18167 relatedColDef.cellRendererParams.innerRenderer) {
18168 // edge case - this comes from a column which has been grouped dynamically, that has a renderer 'group'
18169 // and has an inner cell renderer
18170 var res = this.userComponentFactory.getInnerRendererDetails(relatedColDef.cellRendererParams, params);
18171 return res;
18172 }
18173 };
18174 GroupCellRendererCtrl.prototype.addChildCount = function () {
18175 // only include the child count if it's included, eg if user doing custom aggregation,
18176 // then this could be left out, or set to -1, ie no child count
18177 if (this.params.suppressCount) {
18178 return;
18179 }
18180 this.addManagedListener(this.displayedGroupNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_ALL_CHILDREN_COUNT_CHANGED, this.updateChildCount.bind(this));
18181 // filtering changes the child count, so need to cater for it
18182 this.updateChildCount();
18183 };
18184 GroupCellRendererCtrl.prototype.updateChildCount = function () {
18185 var allChildrenCount = this.displayedGroupNode.allChildrenCount;
18186 var showingGroupForThisNode = this.isShowRowGroupForThisRow();
18187 var showCount = showingGroupForThisNode && allChildrenCount != null && allChildrenCount >= 0;
18188 var countString = showCount ? "(" + allChildrenCount + ")" : "";
18189 this.comp.setChildCount(countString);
18190 };
18191 GroupCellRendererCtrl.prototype.isShowRowGroupForThisRow = function () {
18192 if (this.gridOptionsWrapper.isTreeData()) {
18193 return true;
18194 }
18195 var rowGroupColumn = this.displayedGroupNode.rowGroupColumn;
18196 if (!rowGroupColumn) {
18197 return false;
18198 }
18199 // column is null for fullWidthRows
18200 var column = this.params.column;
18201 var thisColumnIsInterested = column == null || column.isRowGroupDisplayed(rowGroupColumn.getId());
18202 return thisColumnIsInterested;
18203 };
18204 GroupCellRendererCtrl.prototype.addExpandAndContract = function () {
18205 var params = this.params;
18206 var eExpandedIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_9__["createIconNoSpan"])('groupExpanded', this.gridOptionsWrapper, null);
18207 var eContractedIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_9__["createIconNoSpan"])('groupContracted', this.gridOptionsWrapper, null);
18208 if (eExpandedIcon) {
18209 this.eExpanded.appendChild(eExpandedIcon);
18210 }
18211 if (eContractedIcon) {
18212 this.eContracted.appendChild(eContractedIcon);
18213 }
18214 var eGroupCell = params.eGridCell;
18215 // if editing groups, then double click is to start editing
18216 if (!this.gridOptionsWrapper.isEnableGroupEdit() && this.isExpandable() && !params.suppressDoubleClickExpand) {
18217 this.addManagedListener(eGroupCell, 'dblclick', this.onCellDblClicked.bind(this));
18218 }
18219 this.addManagedListener(this.eExpanded, 'click', this.onExpandClicked.bind(this));
18220 this.addManagedListener(this.eContracted, 'click', this.onExpandClicked.bind(this));
18221 // expand / contract as the user hits enter
18222 this.addManagedListener(eGroupCell, 'keydown', this.onKeyDown.bind(this));
18223 this.addManagedListener(params.node, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_EXPANDED_CHANGED, this.showExpandAndContractIcons.bind(this));
18224 this.showExpandAndContractIcons();
18225 // because we don't show the expand / contract when there are no children, we need to check every time
18226 // the number of children change.
18227 var expandableChangedListener = this.onRowNodeIsExpandableChanged.bind(this);
18228 this.addManagedListener(this.displayedGroupNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_ALL_CHILDREN_COUNT_CHANGED, expandableChangedListener);
18229 this.addManagedListener(this.displayedGroupNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_MASTER_CHANGED, expandableChangedListener);
18230 this.addManagedListener(this.displayedGroupNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_GROUP_CHANGED, expandableChangedListener);
18231 this.addManagedListener(this.displayedGroupNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_HAS_CHILDREN_CHANGED, expandableChangedListener);
18232 };
18233 GroupCellRendererCtrl.prototype.onExpandClicked = function (mouseEvent) {
18234 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["isStopPropagationForAgGrid"])(mouseEvent)) {
18235 return;
18236 }
18237 // so if we expand a node, it does not also get selected.
18238 Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["stopPropagationForAgGrid"])(mouseEvent);
18239 this.onExpandOrContract(mouseEvent);
18240 };
18241 GroupCellRendererCtrl.prototype.onExpandOrContract = function (e) {
18242 // must use the displayedGroup, so if data was dragged down, we expand the parent, not this row
18243 var rowNode = this.displayedGroupNode;
18244 var nextExpandState = !rowNode.expanded;
18245 rowNode.setExpanded(nextExpandState, e);
18246 };
18247 GroupCellRendererCtrl.prototype.isExpandable = function () {
18248 if (this.showingValueForOpenedParent) {
18249 return true;
18250 }
18251 var rowNode = this.displayedGroupNode;
18252 var reducedLeafNode = this.columnModel.isPivotMode() && rowNode.leafGroup;
18253 var expandableGroup = rowNode.isExpandable() && !rowNode.footer && !reducedLeafNode;
18254 if (!expandableGroup) {
18255 return false;
18256 }
18257 // column is null for fullWidthRows
18258 var column = this.params.column;
18259 var displayingForOneColumnOnly = column != null && typeof column.getColDef().showRowGroup === 'string';
18260 if (displayingForOneColumnOnly) {
18261 var showing = this.isShowRowGroupForThisRow();
18262 return showing;
18263 }
18264 return true;
18265 };
18266 GroupCellRendererCtrl.prototype.showExpandAndContractIcons = function () {
18267 var _a = this, params = _a.params, displayedGroup = _a.displayedGroupNode, columnModel = _a.columnModel;
18268 var node = params.node;
18269 var isExpandable = this.isExpandable();
18270 if (isExpandable) {
18271 // if expandable, show one based on expand state.
18272 // if we were dragged down, means our parent is always expanded
18273 var expanded = this.showingValueForOpenedParent ? true : node.expanded;
18274 this.comp.setExpandedDisplayed(expanded);
18275 this.comp.setContractedDisplayed(!expanded);
18276 }
18277 else {
18278 // it not expandable, show neither
18279 this.comp.setExpandedDisplayed(false);
18280 this.comp.setContractedDisplayed(false);
18281 }
18282 // compensation padding for leaf nodes, so there is blank space instead of the expand icon
18283 var pivotMode = columnModel.isPivotMode();
18284 var pivotModeAndLeafGroup = pivotMode && displayedGroup.leafGroup;
18285 var addExpandableCss = isExpandable && !pivotModeAndLeafGroup;
18286 var isTotalFooterNode = node.footer && node.level === -1;
18287 this.comp.addOrRemoveCssClass('ag-cell-expandable', addExpandableCss);
18288 this.comp.addOrRemoveCssClass('ag-row-group', addExpandableCss);
18289 if (pivotMode) {
18290 this.comp.addOrRemoveCssClass('ag-pivot-leaf-group', pivotModeAndLeafGroup);
18291 }
18292 else if (!isTotalFooterNode) {
18293 this.comp.addOrRemoveCssClass('ag-row-group-leaf-indent', !addExpandableCss);
18294 }
18295 };
18296 GroupCellRendererCtrl.prototype.onRowNodeIsExpandableChanged = function () {
18297 // maybe if no children now, we should hide the expand / contract icons
18298 this.showExpandAndContractIcons();
18299 // if we have no children, this impacts the indent
18300 this.setIndent();
18301 this.refreshAriaExpanded();
18302 };
18303 GroupCellRendererCtrl.prototype.setupIndent = function () {
18304 // only do this if an indent - as this overwrites the padding that
18305 // the theme set, which will make things look 'not aligned' for the
18306 // first group level.
18307 var node = this.params.node;
18308 var suppressPadding = this.params.suppressPadding;
18309 if (!suppressPadding) {
18310 this.addManagedListener(node, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_UI_LEVEL_CHANGED, this.setIndent.bind(this));
18311 this.setIndent();
18312 }
18313 };
18314 GroupCellRendererCtrl.prototype.setIndent = function () {
18315 if (this.gridOptionsWrapper.isGroupHideOpenParents()) {
18316 return;
18317 }
18318 var params = this.params;
18319 var rowNode = params.node;
18320 // if we are only showing one group column, we don't want to be indenting based on level
18321 var fullWithRow = !!params.colDef;
18322 var treeData = this.gridOptionsWrapper.isTreeData();
18323 var manyDimensionThisColumn = !fullWithRow || treeData || params.colDef.showRowGroup === true;
18324 var paddingCount = manyDimensionThisColumn ? rowNode.uiLevel : 0;
18325 var userProvidedPaddingPixelsTheDeprecatedWay = params.padding >= 0;
18326 if (userProvidedPaddingPixelsTheDeprecatedWay) {
18327 Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["doOnce"])(function () { return console.warn('AG Grid: cellRendererParams.padding no longer works, it was deprecated in since v14.2 and removed in v26, configuring padding for groupCellRenderer should be done with Sass variables and themes. Please see the AG Grid documentation page for Themes, in particular the property $row-group-indent-size.'); }, 'groupCellRenderer->doDeprecatedWay');
18328 }
18329 if (this.indentClass) {
18330 this.comp.addOrRemoveCssClass(this.indentClass, false);
18331 }
18332 this.indentClass = 'ag-row-group-indent-' + paddingCount;
18333 this.comp.addOrRemoveCssClass(this.indentClass, true);
18334 };
18335 GroupCellRendererCtrl.prototype.addFullWidthRowDraggerIfNeeded = function () {
18336 var _this = this;
18337 if (!this.params.fullWidth || !this.params.rowDrag) {
18338 return;
18339 }
18340 var rowDragComp = new _row_rowDragComp__WEBPACK_IMPORTED_MODULE_12__["RowDragComp"](function () { return _this.params.value; }, this.params.node);
18341 this.createManagedBean(rowDragComp, this.context);
18342 this.eGui.insertAdjacentElement('afterbegin', rowDragComp.getGui());
18343 };
18344 GroupCellRendererCtrl.prototype.isUserWantsSelected = function () {
18345 var paramsCheckbox = this.params.checkbox;
18346 if (typeof paramsCheckbox === 'function') {
18347 return paramsCheckbox(this.params);
18348 }
18349 return paramsCheckbox === true;
18350 };
18351 GroupCellRendererCtrl.prototype.addCheckboxIfNeeded = function () {
18352 var _this = this;
18353 var rowNode = this.displayedGroupNode;
18354 var checkboxNeeded = this.isUserWantsSelected() &&
18355 // footers cannot be selected
18356 !rowNode.footer &&
18357 // pinned rows cannot be selected
18358 !rowNode.rowPinned &&
18359 // details cannot be selected
18360 !rowNode.detail;
18361 if (checkboxNeeded) {
18362 var cbSelectionComponent_1 = new _checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_11__["CheckboxSelectionComponent"]();
18363 this.getContext().createBean(cbSelectionComponent_1);
18364 cbSelectionComponent_1.init({ rowNode: rowNode, column: this.params.column });
18365 this.eCheckbox.appendChild(cbSelectionComponent_1.getGui());
18366 this.addDestroyFunc(function () { return _this.getContext().destroyBean(cbSelectionComponent_1); });
18367 }
18368 this.comp.setCheckboxVisible(checkboxNeeded);
18369 };
18370 GroupCellRendererCtrl.prototype.onKeyDown = function (event) {
18371 var enterKeyPressed = event.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ENTER;
18372 if (!enterKeyPressed || this.params.suppressEnterExpand) {
18373 return;
18374 }
18375 var cellEditable = this.params.column && this.params.column.isCellEditable(this.params.node);
18376 if (cellEditable) {
18377 return;
18378 }
18379 this.onExpandOrContract(event);
18380 };
18381 GroupCellRendererCtrl.prototype.onCellDblClicked = function (mouseEvent) {
18382 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["isStopPropagationForAgGrid"])(mouseEvent)) {
18383 return;
18384 }
18385 // we want to avoid acting on double click events on the expand / contract icon,
18386 // as that icons already has expand / collapse functionality on it. otherwise if
18387 // the icon was double clicked, we would get 'click', 'click', 'dblclick' which
18388 // is open->close->open, however double click should be open->close only.
18389 var targetIsExpandIcon = Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["isElementInEventPath"])(this.eExpanded, mouseEvent)
18390 || Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["isElementInEventPath"])(this.eContracted, mouseEvent);
18391 if (!targetIsExpandIcon) {
18392 this.onExpandOrContract(mouseEvent);
18393 }
18394 };
18395 __decorate([
18396 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('expressionService')
18397 ], GroupCellRendererCtrl.prototype, "expressionService", void 0);
18398 __decorate([
18399 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('valueFormatterService')
18400 ], GroupCellRendererCtrl.prototype, "valueFormatterService", void 0);
18401 __decorate([
18402 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('columnModel')
18403 ], GroupCellRendererCtrl.prototype, "columnModel", void 0);
18404 __decorate([
18405 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('userComponentFactory')
18406 ], GroupCellRendererCtrl.prototype, "userComponentFactory", void 0);
18407 __decorate([
18408 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('gridOptions')
18409 ], GroupCellRendererCtrl.prototype, "gridOptions", void 0);
18410 return GroupCellRendererCtrl;
18411}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
18412
18413
18414
18415
18416
18417/***/ }),
18418/* 94 */
18419/***/ (function(module, __webpack_exports__, __webpack_require__) {
18420
18421"use strict";
18422__webpack_require__.r(__webpack_exports__);
18423/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowHighlightPosition", function() { return RowHighlightPosition; });
18424/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowNode", function() { return RowNode; });
18425/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
18426/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
18427/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
18428/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
18429/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
18430/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14);
18431/**
18432 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
18433 * @version v27.3.0
18434 * @link https://www.ag-grid.com/
18435 * @license MIT
18436 */
18437
18438
18439
18440
18441
18442
18443var RowHighlightPosition;
18444(function (RowHighlightPosition) {
18445 RowHighlightPosition[RowHighlightPosition["Above"] = 0] = "Above";
18446 RowHighlightPosition[RowHighlightPosition["Below"] = 1] = "Below";
18447})(RowHighlightPosition || (RowHighlightPosition = {}));
18448var RowNode = /** @class */ (function () {
18449 function RowNode(beans) {
18450 /** The current row index. If the row is filtered out or in a collapsed group, this value will be `null`. */
18451 this.rowIndex = null;
18452 /** The key for the group eg Ireland, UK, USA */
18453 this.key = null;
18454 /** Children mapped by the pivot columns. */
18455 this.childrenMapped = {};
18456 /**
18457 * This will be `true` if it has a rowIndex assigned, otherwise `false`.
18458 */
18459 this.displayed = false;
18460 /** The row top position in pixels. */
18461 this.rowTop = null;
18462 /** The top pixel for this row last time, makes sense if data set was ordered or filtered,
18463 * it is used so new rows can animate in from their old position. */
18464 this.oldRowTop = null;
18465 /** `true` by default - can be overridden via gridOptions.isRowSelectable(rowNode) */
18466 this.selectable = true;
18467 /** Used by sorting service - to give deterministic sort to groups. Previously we
18468 * just id for this, however id is a string and had slower sorting compared to numbers. */
18469 this.__objectId = RowNode.OBJECT_ID_SEQUENCE++;
18470 /** When one or more Columns are using autoHeight, this keeps track of height of each autoHeight Cell,
18471 * indexed by the Column ID. */
18472 this.__autoHeights = {};
18473 /** `true` when nodes with the same id are being removed and added as part of the same batch transaction */
18474 this.alreadyRendered = false;
18475 this.highlighted = null;
18476 this.selected = false;
18477 this.onRowHeightChangedDebounced = Object(_utils_function__WEBPACK_IMPORTED_MODULE_5__["debounce"])(this.onRowHeightChanged.bind(this), 100);
18478 this.beans = beans;
18479 }
18480 /** Replaces the data on the `rowNode`. When complete, the grid will refresh the the entire rendered row if it is showing. */
18481 RowNode.prototype.setData = function (data) {
18482 this.setDataCommon(data, false);
18483 };
18484 // similar to setRowData, however it is expected that the data is the same data item. this
18485 // is intended to be used with Redux type stores, where the whole data can be changed. we are
18486 // guaranteed that the data is the same entity (so grid doesn't need to worry about the id of the
18487 // underlying data changing, hence doesn't need to worry about selection). the grid, upon receiving
18488 // dataChanged event, will refresh the cells rather than rip them all out (so user can show transitions).
18489 RowNode.prototype.updateData = function (data) {
18490 this.setDataCommon(data, true);
18491 };
18492 RowNode.prototype.setDataCommon = function (data, update) {
18493 var oldData = this.data;
18494 this.data = data;
18495 this.beans.valueCache.onDataChanged();
18496 this.updateDataOnDetailNode();
18497 this.checkRowSelectable();
18498 var event = this.createDataChangedEvent(data, oldData, update);
18499 this.dispatchLocalEvent(event);
18500 };
18501 // when we are doing master / detail, the detail node is lazy created, but then kept around.
18502 // so if we show / hide the detail, the same detail rowNode is used. so we need to keep the data
18503 // in sync, otherwise expand/collapse of the detail would still show the old values.
18504 RowNode.prototype.updateDataOnDetailNode = function () {
18505 if (this.detailNode) {
18506 this.detailNode.data = this.data;
18507 }
18508 };
18509 RowNode.prototype.createDataChangedEvent = function (newData, oldData, update) {
18510 return {
18511 type: RowNode.EVENT_DATA_CHANGED,
18512 node: this,
18513 oldData: oldData,
18514 newData: newData,
18515 update: update
18516 };
18517 };
18518 RowNode.prototype.createLocalRowEvent = function (type) {
18519 return {
18520 type: type,
18521 node: this
18522 };
18523 };
18524 RowNode.prototype.getRowIndexString = function () {
18525 if (this.rowPinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP) {
18526 return 't-' + this.rowIndex;
18527 }
18528 if (this.rowPinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM) {
18529 return 'b-' + this.rowIndex;
18530 }
18531 return this.rowIndex.toString();
18532 };
18533 RowNode.prototype.createDaemonNode = function () {
18534 var oldNode = new RowNode(this.beans);
18535 // just copy the id and data, this is enough for the node to be used
18536 // in the selection controller (the selection controller is the only
18537 // place where daemon nodes can live).
18538 oldNode.id = this.id;
18539 oldNode.data = this.data;
18540 oldNode.daemon = true;
18541 oldNode.selected = this.selected;
18542 oldNode.level = this.level;
18543 return oldNode;
18544 };
18545 RowNode.prototype.setDataAndId = function (data, id) {
18546 var oldNode = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(this.id) ? this.createDaemonNode() : null;
18547 var oldData = this.data;
18548 this.data = data;
18549 this.updateDataOnDetailNode();
18550 this.setId(id);
18551 this.beans.selectionService.syncInRowNode(this, oldNode);
18552 this.checkRowSelectable();
18553 var event = this.createDataChangedEvent(data, oldData, false);
18554 this.dispatchLocalEvent(event);
18555 };
18556 RowNode.prototype.checkRowSelectable = function () {
18557 var isRowSelectableFunc = this.beans.gridOptionsWrapper.getIsRowSelectableFunc();
18558 this.setRowSelectable(isRowSelectableFunc ? isRowSelectableFunc(this) : true);
18559 };
18560 RowNode.prototype.setRowSelectable = function (newVal) {
18561 if (this.selectable !== newVal) {
18562 this.selectable = newVal;
18563 if (this.eventService) {
18564 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_SELECTABLE_CHANGED));
18565 }
18566 }
18567 };
18568 RowNode.prototype.setId = function (id) {
18569 // see if user is providing the id's
18570 var getRowIdFunc = this.beans.gridOptionsWrapper.getRowIdFunc();
18571 if (getRowIdFunc) {
18572 // if user is providing the id's, then we set the id only after the data has been set.
18573 // this is important for virtual pagination and viewport, where empty rows exist.
18574 if (this.data) {
18575 // we pass 'true' as we skip this level when generating keys,
18576 // as we don't always have the key for this level (eg when updating
18577 // data via transaction on SSRM, we are getting key to look up the
18578 // RowNode, don't have the RowNode yet, thus no way to get the current key)
18579 var parentKeys = this.getGroupKeys(true);
18580 this.id = getRowIdFunc({
18581 data: this.data,
18582 parentKeys: parentKeys.length > 0 ? parentKeys : undefined,
18583 level: this.level
18584 });
18585 // make sure id provided doesn't start with 'row-group-' as this is reserved. also check that
18586 // it has 'startsWith' in case the user provided a number.
18587 if (this.id !== null && typeof this.id === 'string' && this.id.startsWith(RowNode.ID_PREFIX_ROW_GROUP)) {
18588 console.error("AG Grid: Row IDs cannot start with " + RowNode.ID_PREFIX_ROW_GROUP + ", this is a reserved prefix for AG Grid's row grouping feature.");
18589 }
18590 // force id to be a string
18591 if (this.id !== null && typeof this.id !== 'string') {
18592 this.id = '' + this.id;
18593 }
18594 }
18595 else {
18596 // this can happen if user has set blank into the rowNode after the row previously
18597 // having data. this happens in virtual page row model, when data is delete and
18598 // the page is refreshed.
18599 this.id = undefined;
18600 }
18601 }
18602 else {
18603 this.id = id;
18604 }
18605 };
18606 RowNode.prototype.getGroupKeys = function (excludeSelf) {
18607 if (excludeSelf === void 0) { excludeSelf = false; }
18608 var keys = [];
18609 var pointer = this;
18610 if (excludeSelf) {
18611 pointer = pointer.parent;
18612 }
18613 while (pointer && pointer.level >= 0) {
18614 keys.push(pointer.key);
18615 pointer = pointer.parent;
18616 }
18617 keys.reverse();
18618 return keys;
18619 };
18620 RowNode.prototype.isPixelInRange = function (pixel) {
18621 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(this.rowTop) || !Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(this.rowHeight)) {
18622 return false;
18623 }
18624 return pixel >= this.rowTop && pixel < (this.rowTop + this.rowHeight);
18625 };
18626 RowNode.prototype.setFirstChild = function (firstChild) {
18627 if (this.firstChild === firstChild) {
18628 return;
18629 }
18630 this.firstChild = firstChild;
18631 if (this.eventService) {
18632 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_FIRST_CHILD_CHANGED));
18633 }
18634 };
18635 RowNode.prototype.setLastChild = function (lastChild) {
18636 if (this.lastChild === lastChild) {
18637 return;
18638 }
18639 this.lastChild = lastChild;
18640 if (this.eventService) {
18641 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_LAST_CHILD_CHANGED));
18642 }
18643 };
18644 RowNode.prototype.setChildIndex = function (childIndex) {
18645 if (this.childIndex === childIndex) {
18646 return;
18647 }
18648 this.childIndex = childIndex;
18649 if (this.eventService) {
18650 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_CHILD_INDEX_CHANGED));
18651 }
18652 };
18653 RowNode.prototype.setRowTop = function (rowTop) {
18654 this.oldRowTop = this.rowTop;
18655 if (this.rowTop === rowTop) {
18656 return;
18657 }
18658 this.rowTop = rowTop;
18659 if (this.eventService) {
18660 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_TOP_CHANGED));
18661 }
18662 this.setDisplayed(rowTop !== null);
18663 };
18664 RowNode.prototype.clearRowTopAndRowIndex = function () {
18665 this.oldRowTop = null;
18666 this.setRowTop(null);
18667 this.setRowIndex(null);
18668 };
18669 RowNode.prototype.setDisplayed = function (displayed) {
18670 if (this.displayed === displayed) {
18671 return;
18672 }
18673 this.displayed = displayed;
18674 if (this.eventService) {
18675 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_DISPLAYED_CHANGED));
18676 }
18677 };
18678 RowNode.prototype.setDragging = function (dragging) {
18679 if (this.dragging === dragging) {
18680 return;
18681 }
18682 this.dragging = dragging;
18683 if (this.eventService) {
18684 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_DRAGGING_CHANGED));
18685 }
18686 };
18687 RowNode.prototype.setHighlighted = function (highlighted) {
18688 if (highlighted === this.highlighted) {
18689 return;
18690 }
18691 this.highlighted = highlighted;
18692 if (this.eventService) {
18693 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HIGHLIGHT_CHANGED));
18694 }
18695 };
18696 RowNode.prototype.setAllChildrenCount = function (allChildrenCount) {
18697 if (this.allChildrenCount === allChildrenCount) {
18698 return;
18699 }
18700 this.allChildrenCount = allChildrenCount;
18701 if (this.eventService) {
18702 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED));
18703 }
18704 };
18705 RowNode.prototype.setMaster = function (master) {
18706 if (this.master === master) {
18707 return;
18708 }
18709 // if changing AWAY from master, then unexpand, otherwise
18710 // next time it's shown it is expanded again
18711 if (this.master && !master) {
18712 this.expanded = false;
18713 }
18714 this.master = master;
18715 if (this.eventService) {
18716 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_MASTER_CHANGED));
18717 }
18718 };
18719 RowNode.prototype.setGroup = function (group) {
18720 if (this.group === group) {
18721 return;
18722 }
18723 // if we used to be a group, and no longer, then close the node
18724 if (this.group && !group) {
18725 this.expanded = false;
18726 }
18727 this.group = group;
18728 this.updateHasChildren();
18729 if (this.eventService) {
18730 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_GROUP_CHANGED));
18731 }
18732 };
18733 /**
18734 * Sets the row height.
18735 * Call if you want to change the height initially assigned to the row.
18736 * After calling, you must call `api.onRowHeightChanged()` so the grid knows it needs to work out the placement of the rows. */
18737 RowNode.prototype.setRowHeight = function (rowHeight, estimated) {
18738 if (estimated === void 0) { estimated = false; }
18739 this.rowHeight = rowHeight;
18740 this.rowHeightEstimated = estimated;
18741 if (this.eventService) {
18742 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HEIGHT_CHANGED));
18743 }
18744 };
18745 RowNode.prototype.setRowAutoHeight = function (cellHeight, column) {
18746 if (!this.__autoHeights) {
18747 this.__autoHeights = {};
18748 }
18749 var autoHeights = this.__autoHeights;
18750 autoHeights[column.getId()] = cellHeight;
18751 if (cellHeight != null) {
18752 if (this.checkAutoHeightsDebounced == null) {
18753 this.checkAutoHeightsDebounced = Object(_utils_function__WEBPACK_IMPORTED_MODULE_5__["debounce"])(this.checkAutoHeights.bind(this), 1);
18754 }
18755 this.checkAutoHeightsDebounced();
18756 }
18757 };
18758 RowNode.prototype.checkAutoHeights = function () {
18759 var notAllPresent = false;
18760 var nonePresent = true;
18761 var newRowHeight = 0;
18762 var autoHeights = this.__autoHeights;
18763 if (autoHeights == null) {
18764 return;
18765 }
18766 var displayedAutoHeightCols = this.beans.columnModel.getAllDisplayedAutoHeightCols();
18767 displayedAutoHeightCols.forEach(function (col) {
18768 var cellHeight = autoHeights[col.getId()];
18769 if (cellHeight == null) {
18770 notAllPresent = true;
18771 return;
18772 }
18773 nonePresent = false;
18774 if (cellHeight > newRowHeight) {
18775 newRowHeight = cellHeight;
18776 }
18777 });
18778 if (notAllPresent) {
18779 return;
18780 }
18781 // we take min of 10, so we don't adjust for empty rows. if <10, we put to default.
18782 // this prevents the row starting very small when waiting for async components,
18783 // which would then mean the grid squashes in far to many rows (as small heights
18784 // means more rows fit in) which looks crap. so best ignore small values and assume
18785 // we are still waiting for values to render.
18786 if (nonePresent || newRowHeight < 10) {
18787 newRowHeight = this.beans.gridOptionsWrapper.getRowHeightForNode(this).height;
18788 }
18789 if (newRowHeight == this.rowHeight) {
18790 return;
18791 }
18792 this.setRowHeight(newRowHeight);
18793 this.onRowHeightChangedDebounced();
18794 };
18795 /** This method is debounced. It is used for row auto-height. If we don't debounce,
18796 * then the Row Models will end up recalculating each row position
18797 * for each row height change and result in the Row Renderer laying out rows.
18798 * This is particularly bad if using print layout, and showing eg 1,000 rows,
18799 * each row will change it's height, causing Row Model to update 1,000 times.
18800 */
18801 RowNode.prototype.onRowHeightChanged = function () {
18802 var rowModel = this.beans.rowModel;
18803 if (rowModel.onRowHeightChanged) {
18804 rowModel.onRowHeightChanged();
18805 }
18806 };
18807 RowNode.prototype.setRowIndex = function (rowIndex) {
18808 if (this.rowIndex === rowIndex) {
18809 return;
18810 }
18811 this.rowIndex = rowIndex;
18812 if (this.eventService) {
18813 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_ROW_INDEX_CHANGED));
18814 }
18815 };
18816 RowNode.prototype.setUiLevel = function (uiLevel) {
18817 if (this.uiLevel === uiLevel) {
18818 return;
18819 }
18820 this.uiLevel = uiLevel;
18821 if (this.eventService) {
18822 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_UI_LEVEL_CHANGED));
18823 }
18824 };
18825 RowNode.prototype.setExpanded = function (expanded, e) {
18826 if (this.expanded === expanded) {
18827 return;
18828 }
18829 this.expanded = expanded;
18830 if (this.eventService) {
18831 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_EXPANDED_CHANGED));
18832 }
18833 var event = Object.assign({}, this.createGlobalRowEvent(_events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_ROW_GROUP_OPENED), {
18834 expanded: expanded,
18835 event: e || null
18836 });
18837 this.beans.rowNodeEventThrottle.dispatchExpanded(event);
18838 // when using footers we need to refresh the group row, as the aggregation
18839 // values jump between group and footer
18840 if (this.beans.gridOptionsWrapper.isGroupIncludeFooter()) {
18841 this.beans.rowRenderer.refreshCells({ rowNodes: [this] });
18842 }
18843 };
18844 RowNode.prototype.createGlobalRowEvent = function (type) {
18845 return {
18846 type: type,
18847 node: this,
18848 data: this.data,
18849 rowIndex: this.rowIndex,
18850 rowPinned: this.rowPinned,
18851 context: this.beans.gridOptionsWrapper.getContext(),
18852 api: this.beans.gridOptionsWrapper.getApi(),
18853 columnApi: this.beans.gridOptionsWrapper.getColumnApi()
18854 };
18855 };
18856 RowNode.prototype.dispatchLocalEvent = function (event) {
18857 if (this.eventService) {
18858 this.eventService.dispatchEvent(event);
18859 }
18860 };
18861 /**
18862 * Replaces the value on the `rowNode` for the specified column. When complete,
18863 * the grid will refresh the rendered cell on the required row only.
18864 *
18865 * @param colKey The column where the value should be updated
18866 * @param newValue The new value
18867 * @param eventSource The source of the event
18868 * @returns `True` if the value was changed, otherwise `False`.
18869 */
18870 RowNode.prototype.setDataValue = function (colKey, newValue, eventSource) {
18871 // When it is done via the editors, no 'cell changed' event gets fired, as it's assumed that
18872 // the cell knows about the change given it's in charge of the editing.
18873 // this method is for the client to call, so the cell listens for the change
18874 // event, and also flashes the cell when the change occurs.
18875 var column = this.beans.columnModel.getPrimaryColumn(colKey);
18876 var oldValue = this.beans.valueService.getValue(column, this);
18877 var valueChanged = this.beans.valueService.setValue(this, column, newValue, eventSource);
18878 this.dispatchCellChangedEvent(column, newValue, oldValue);
18879 return valueChanged;
18880 };
18881 RowNode.prototype.setGroupValue = function (colKey, newValue) {
18882 var column = this.beans.columnModel.getGridColumn(colKey);
18883 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(this.groupData)) {
18884 this.groupData = {};
18885 }
18886 var columnId = column.getColId();
18887 var oldValue = this.groupData[columnId];
18888 if (oldValue === newValue) {
18889 return;
18890 }
18891 this.groupData[columnId] = newValue;
18892 this.dispatchCellChangedEvent(column, newValue, oldValue);
18893 };
18894 // sets the data for an aggregation
18895 RowNode.prototype.setAggData = function (newAggData) {
18896 var _this = this;
18897 // find out all keys that could potentially change
18898 var colIds = Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["getAllKeysInObjects"])([this.aggData, newAggData]);
18899 var oldAggData = this.aggData;
18900 this.aggData = newAggData;
18901 // if no event service, nobody has registered for events, so no need fire event
18902 if (this.eventService) {
18903 colIds.forEach(function (colId) {
18904 var column = _this.beans.columnModel.getGridColumn(colId);
18905 var value = _this.aggData ? _this.aggData[colId] : undefined;
18906 var oldValue = oldAggData ? oldAggData[colId] : undefined;
18907 _this.dispatchCellChangedEvent(column, value, oldValue);
18908 });
18909 }
18910 };
18911 RowNode.prototype.updateHasChildren = function () {
18912 // we need to return true when this.group=true, as this is used by server side row model
18913 // (as children are lazy loaded and stored in a cache anyway). otherwise we return true
18914 // if children exist.
18915 var newValue = (this.group && !this.footer) || (this.childrenAfterGroup && this.childrenAfterGroup.length > 0);
18916 if (newValue !== this.__hasChildren) {
18917 this.__hasChildren = !!newValue;
18918 if (this.eventService) {
18919 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HAS_CHILDREN_CHANGED));
18920 }
18921 }
18922 };
18923 RowNode.prototype.hasChildren = function () {
18924 if (this.__hasChildren == null) {
18925 this.updateHasChildren();
18926 }
18927 return this.__hasChildren;
18928 };
18929 RowNode.prototype.isEmptyRowGroupNode = function () {
18930 return this.group && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missingOrEmpty"])(this.childrenAfterGroup);
18931 };
18932 RowNode.prototype.dispatchCellChangedEvent = function (column, newValue, oldValue) {
18933 var cellChangedEvent = {
18934 type: RowNode.EVENT_CELL_CHANGED,
18935 node: this,
18936 column: column,
18937 newValue: newValue,
18938 oldValue: oldValue
18939 };
18940 this.dispatchLocalEvent(cellChangedEvent);
18941 };
18942 /**
18943 * The first time `quickFilter` runs, the grid creates a one-off string representation of the row.
18944 * This string is then used for the quick filter instead of hitting each column separately.
18945 * When you edit, using grid editing, this string gets cleared down.
18946 * However if you edit without using grid editing, you will need to clear this string down for the row to be updated with the new values.
18947 * Otherwise new values will not work with the `quickFilter`. */
18948 RowNode.prototype.resetQuickFilterAggregateText = function () {
18949 this.quickFilterAggregateText = null;
18950 };
18951 RowNode.prototype.isExpandable = function () {
18952 return (this.hasChildren() && !this.footer) || this.master ? true : false;
18953 };
18954 /** Returns:
18955 * - `true` if node is selected,
18956 * - `false` if the node isn't selected
18957 * - `undefined` if it's partially selected (group where not all children are selected). */
18958 RowNode.prototype.isSelected = function () {
18959 // for footers, we just return what our sibling selected state is, as cannot select a footer
18960 if (this.footer) {
18961 return this.sibling.isSelected();
18962 }
18963 return this.selected;
18964 };
18965 /** Perform a depth-first search of this node and its children. */
18966 RowNode.prototype.depthFirstSearch = function (callback) {
18967 if (this.childrenAfterGroup) {
18968 this.childrenAfterGroup.forEach(function (child) { return child.depthFirstSearch(callback); });
18969 }
18970 callback(this);
18971 };
18972 // + rowController.updateGroupsInSelection()
18973 // + selectionController.calculatedSelectedForAllGroupNodes()
18974 RowNode.prototype.calculateSelectedFromChildren = function () {
18975 var _a;
18976 var atLeastOneSelected = false;
18977 var atLeastOneDeSelected = false;
18978 var atLeastOneMixed = false;
18979 var newSelectedValue;
18980 if (!((_a = this.childrenAfterGroup) === null || _a === void 0 ? void 0 : _a.length)) {
18981 return;
18982 }
18983 for (var i = 0; i < this.childrenAfterGroup.length; i++) {
18984 var child = this.childrenAfterGroup[i];
18985 // skip non-selectable nodes to prevent inconsistent selection values
18986 if (!child.selectable) {
18987 continue;
18988 }
18989 var childState = child.isSelected();
18990 switch (childState) {
18991 case true:
18992 atLeastOneSelected = true;
18993 break;
18994 case false:
18995 atLeastOneDeSelected = true;
18996 break;
18997 default:
18998 atLeastOneMixed = true;
18999 break;
19000 }
19001 }
19002 if (atLeastOneMixed) {
19003 newSelectedValue = undefined;
19004 }
19005 else if (atLeastOneSelected && !atLeastOneDeSelected) {
19006 newSelectedValue = true;
19007 }
19008 else if (!atLeastOneSelected && atLeastOneDeSelected) {
19009 newSelectedValue = false;
19010 }
19011 else {
19012 newSelectedValue = undefined;
19013 }
19014 this.selectThisNode(newSelectedValue);
19015 };
19016 RowNode.prototype.setSelectedInitialValue = function (selected) {
19017 this.selected = selected;
19018 };
19019 /**
19020 * Select (or deselect) the node.
19021 * @param newValue -`true` for selection, `false` for deselection.
19022 * @param clearSelection - If selecting, then passing `true` will select the node exclusively (i.e. NOT do multi select). If doing deselection, `clearSelection` has no impact.
19023 * @param suppressFinishActions - Pass `true` to prevent the `selectionChanged` from being fired. Note that the `rowSelected` event will still be fired.
19024 */
19025 RowNode.prototype.setSelected = function (newValue, clearSelection, suppressFinishActions) {
19026 if (clearSelection === void 0) { clearSelection = false; }
19027 if (suppressFinishActions === void 0) { suppressFinishActions = false; }
19028 this.setSelectedParams({
19029 newValue: newValue,
19030 clearSelection: clearSelection,
19031 suppressFinishActions: suppressFinishActions,
19032 rangeSelect: false
19033 });
19034 };
19035 RowNode.prototype.isRowPinned = function () {
19036 return this.rowPinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP || this.rowPinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM;
19037 };
19038 // to make calling code more readable, this is the same method as setSelected except it takes names parameters
19039 RowNode.prototype.setSelectedParams = function (params) {
19040 var _a;
19041 var groupSelectsChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();
19042 var newValue = params.newValue === true;
19043 var clearSelection = params.clearSelection === true;
19044 var suppressFinishActions = params.suppressFinishActions === true;
19045 var rangeSelect = params.rangeSelect === true;
19046 // groupSelectsFiltered only makes sense when group selects children
19047 var groupSelectsFiltered = groupSelectsChildren && (params.groupSelectsFiltered === true);
19048 if (this.id === undefined) {
19049 console.warn('AG Grid: cannot select node until id for node is known');
19050 return 0;
19051 }
19052 if (this.rowPinned) {
19053 console.warn('AG Grid: cannot select pinned rows');
19054 return 0;
19055 }
19056 // if we are a footer, we don't do selection, just pass the info
19057 // to the sibling (the parent of the group)
19058 if (this.footer) {
19059 return this.sibling.setSelectedParams(params);
19060 }
19061 if (rangeSelect && this.beans.selectionService.getLastSelectedNode()) {
19062 var newRowClicked = this.beans.selectionService.getLastSelectedNode() !== this;
19063 var allowMultiSelect = this.beans.gridOptionsWrapper.isRowSelectionMulti();
19064 if (newRowClicked && allowMultiSelect) {
19065 var nodesChanged = this.doRowRangeSelection(params.newValue);
19066 this.beans.selectionService.setLastSelectedNode(this);
19067 return nodesChanged;
19068 }
19069 }
19070 var updatedCount = 0;
19071 // when groupSelectsFiltered, then this node may end up intermediate despite
19072 // trying to set it to true / false. this group will be calculated further on
19073 // down when we call calculatedSelectedForAllGroupNodes(). we need to skip it
19074 // here, otherwise the updatedCount would include it.
19075 var skipThisNode = groupSelectsFiltered && this.group;
19076 if (!skipThisNode) {
19077 var thisNodeWasSelected = this.selectThisNode(newValue);
19078 if (thisNodeWasSelected) {
19079 updatedCount++;
19080 }
19081 }
19082 if (groupSelectsChildren && ((_a = this.childrenAfterGroup) === null || _a === void 0 ? void 0 : _a.length)) {
19083 updatedCount += this.selectChildNodes(newValue, groupSelectsFiltered);
19084 }
19085 // clear other nodes if not doing multi select
19086 if (!suppressFinishActions) {
19087 var clearOtherNodes = newValue && (clearSelection || !this.beans.gridOptionsWrapper.isRowSelectionMulti());
19088 if (clearOtherNodes) {
19089 updatedCount += this.beans.selectionService.clearOtherNodes(this);
19090 }
19091 // only if we selected something, then update groups and fire events
19092 if (updatedCount > 0) {
19093 this.beans.selectionService.updateGroupsFromChildrenSelections();
19094 // this is the very end of the 'action node', so we are finished all the updates,
19095 // include any parent / child changes that this method caused
19096 var event_1 = {
19097 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_SELECTION_CHANGED,
19098 api: this.beans.gridApi,
19099 columnApi: this.beans.columnApi
19100 };
19101 this.beans.eventService.dispatchEvent(event_1);
19102 }
19103 // so if user next does shift-select, we know where to start the selection from
19104 if (newValue) {
19105 this.beans.selectionService.setLastSelectedNode(this);
19106 }
19107 }
19108 return updatedCount;
19109 };
19110 // selects all rows between this node and the last selected node (or the top if this is the first selection).
19111 // not to be mixed up with 'cell range selection' where you drag the mouse, this is row range selection, by
19112 // holding down 'shift'.
19113 RowNode.prototype.doRowRangeSelection = function (value) {
19114 var _this = this;
19115 if (value === void 0) { value = true; }
19116 var groupsSelectChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();
19117 var lastSelectedNode = this.beans.selectionService.getLastSelectedNode();
19118 var nodesToSelect = this.beans.rowModel.getNodesInRangeForSelection(this, lastSelectedNode);
19119 var updatedCount = 0;
19120 nodesToSelect.forEach(function (rowNode) {
19121 if (rowNode.group && groupsSelectChildren || (value === false && _this === rowNode)) {
19122 return;
19123 }
19124 var nodeWasSelected = rowNode.selectThisNode(value);
19125 if (nodeWasSelected) {
19126 updatedCount++;
19127 }
19128 });
19129 this.beans.selectionService.updateGroupsFromChildrenSelections();
19130 var event = {
19131 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_SELECTION_CHANGED,
19132 api: this.beans.gridApi,
19133 columnApi: this.beans.columnApi
19134 };
19135 this.beans.eventService.dispatchEvent(event);
19136 return updatedCount;
19137 };
19138 RowNode.prototype.isParentOfNode = function (potentialParent) {
19139 var parentNode = this.parent;
19140 while (parentNode) {
19141 if (parentNode === potentialParent) {
19142 return true;
19143 }
19144 parentNode = parentNode.parent;
19145 }
19146 return false;
19147 };
19148 RowNode.prototype.selectThisNode = function (newValue) {
19149 // we only check selectable when newValue=true (ie selecting) to allow unselecting values,
19150 // as selectable is dynamic, need a way to unselect rows when selectable becomes false.
19151 var selectionNotAllowed = !this.selectable && newValue;
19152 var selectionNotChanged = this.selected === newValue;
19153 if (selectionNotAllowed || selectionNotChanged) {
19154 return false;
19155 }
19156 this.selected = newValue;
19157 if (this.eventService) {
19158 this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_ROW_SELECTED));
19159 }
19160 var event = this.createGlobalRowEvent(_events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_ROW_SELECTED);
19161 this.beans.eventService.dispatchEvent(event);
19162 return true;
19163 };
19164 RowNode.prototype.selectChildNodes = function (newValue, groupSelectsFiltered) {
19165 var children = groupSelectsFiltered ? this.childrenAfterAggFilter : this.childrenAfterGroup;
19166 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(children)) {
19167 return 0;
19168 }
19169 var updatedCount = 0;
19170 for (var i = 0; i < children.length; i++) {
19171 updatedCount += children[i].setSelectedParams({
19172 newValue: newValue,
19173 clearSelection: false,
19174 suppressFinishActions: true,
19175 groupSelectsFiltered: groupSelectsFiltered
19176 });
19177 }
19178 return updatedCount;
19179 };
19180 /** Add an event listener. */
19181 RowNode.prototype.addEventListener = function (eventType, listener) {
19182 if (!this.eventService) {
19183 this.eventService = new _eventService__WEBPACK_IMPORTED_MODULE_0__["EventService"]();
19184 }
19185 this.eventService.addEventListener(eventType, listener);
19186 };
19187 /** Remove event listener. */
19188 RowNode.prototype.removeEventListener = function (eventType, listener) {
19189 if (!this.eventService) {
19190 return;
19191 }
19192 this.eventService.removeEventListener(eventType, listener);
19193 if (this.eventService.noRegisteredListenersExist()) {
19194 this.eventService = null;
19195 }
19196 };
19197 RowNode.prototype.onMouseEnter = function () {
19198 this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_MOUSE_ENTER));
19199 };
19200 RowNode.prototype.onMouseLeave = function () {
19201 this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_MOUSE_LEAVE));
19202 };
19203 RowNode.prototype.getFirstChildOfFirstChild = function (rowGroupColumn) {
19204 var currentRowNode = this;
19205 var isCandidate = true;
19206 var foundFirstChildPath = false;
19207 var nodeToSwapIn = null;
19208 // if we are hiding groups, then if we are the first child, of the first child,
19209 // all the way up to the column we are interested in, then we show the group cell.
19210 while (isCandidate && !foundFirstChildPath) {
19211 var parentRowNode = currentRowNode.parent;
19212 var firstChild = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(parentRowNode) && currentRowNode.firstChild;
19213 if (firstChild) {
19214 if (parentRowNode.rowGroupColumn === rowGroupColumn) {
19215 foundFirstChildPath = true;
19216 nodeToSwapIn = parentRowNode;
19217 }
19218 }
19219 else {
19220 isCandidate = false;
19221 }
19222 currentRowNode = parentRowNode;
19223 }
19224 return foundFirstChildPath ? nodeToSwapIn : null;
19225 };
19226 RowNode.prototype.isFullWidthCell = function () {
19227 var isFullWidthCellFunc = this.beans.gridOptionsWrapper.getIsFullWidthCellFunc();
19228 return isFullWidthCellFunc ? isFullWidthCellFunc({ rowNode: this }) : false;
19229 };
19230 /**
19231 * Returns the route of the row node. If the Row Node is a group, it returns the route to that Row Node.
19232 * If the Row Node is not a group, it returns `undefined`.
19233 */
19234 RowNode.prototype.getRoute = function () {
19235 if (this.key == null) {
19236 return;
19237 }
19238 var res = [];
19239 var pointer = this;
19240 while (pointer.key != null) {
19241 res.push(pointer.key);
19242 pointer = pointer.parent;
19243 }
19244 return res.reverse();
19245 };
19246 RowNode.ID_PREFIX_ROW_GROUP = 'row-group-';
19247 RowNode.ID_PREFIX_TOP_PINNED = 't-';
19248 RowNode.ID_PREFIX_BOTTOM_PINNED = 'b-';
19249 RowNode.OBJECT_ID_SEQUENCE = 0;
19250 RowNode.EVENT_ROW_SELECTED = 'rowSelected';
19251 RowNode.EVENT_DATA_CHANGED = 'dataChanged';
19252 RowNode.EVENT_CELL_CHANGED = 'cellChanged';
19253 RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED = 'allChildrenCountChanged';
19254 RowNode.EVENT_MASTER_CHANGED = 'masterChanged';
19255 RowNode.EVENT_GROUP_CHANGED = 'groupChanged';
19256 RowNode.EVENT_MOUSE_ENTER = 'mouseEnter';
19257 RowNode.EVENT_MOUSE_LEAVE = 'mouseLeave';
19258 RowNode.EVENT_HEIGHT_CHANGED = 'heightChanged';
19259 RowNode.EVENT_TOP_CHANGED = 'topChanged';
19260 RowNode.EVENT_DISPLAYED_CHANGED = 'displayedChanged';
19261 RowNode.EVENT_FIRST_CHILD_CHANGED = 'firstChildChanged';
19262 RowNode.EVENT_LAST_CHILD_CHANGED = 'lastChildChanged';
19263 RowNode.EVENT_CHILD_INDEX_CHANGED = 'childIndexChanged';
19264 RowNode.EVENT_ROW_INDEX_CHANGED = 'rowIndexChanged';
19265 RowNode.EVENT_EXPANDED_CHANGED = 'expandedChanged';
19266 RowNode.EVENT_HAS_CHILDREN_CHANGED = 'hasChildrenChanged';
19267 RowNode.EVENT_SELECTABLE_CHANGED = 'selectableChanged';
19268 RowNode.EVENT_UI_LEVEL_CHANGED = 'uiLevelChanged';
19269 RowNode.EVENT_HIGHLIGHT_CHANGED = 'rowHighlightChanged';
19270 RowNode.EVENT_DRAGGING_CHANGED = 'draggingChanged';
19271 return RowNode;
19272}());
19273
19274
19275
19276
19277
19278/***/ }),
19279/* 95 */
19280/***/ (function(module, __webpack_exports__, __webpack_require__) {
19281
19282"use strict";
19283__webpack_require__.r(__webpack_exports__);
19284/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckboxSelectionComponent", function() { return CheckboxSelectionComponent; });
19285/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
19286/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36);
19287/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
19288/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57);
19289/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94);
19290/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21);
19291/**
19292 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
19293 * @version v27.3.0
19294 * @link https://www.ag-grid.com/
19295 * @license MIT
19296 */
19297var __extends = (undefined && undefined.__extends) || (function () {
19298 var extendStatics = function (d, b) {
19299 extendStatics = Object.setPrototypeOf ||
19300 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19301 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
19302 return extendStatics(d, b);
19303 };
19304 return function (d, b) {
19305 extendStatics(d, b);
19306 function __() { this.constructor = d; }
19307 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19308 };
19309})();
19310var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
19311 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19312 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
19313 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
19314 return c > 3 && r && Object.defineProperty(target, key, r), r;
19315};
19316
19317
19318
19319
19320
19321
19322var CheckboxSelectionComponent = /** @class */ (function (_super) {
19323 __extends(CheckboxSelectionComponent, _super);
19324 function CheckboxSelectionComponent() {
19325 return _super.call(this, /* html*/ "\n <div class=\"ag-selection-checkbox\" role=\"presentation\">\n <ag-checkbox role=\"presentation\" ref=\"eCheckbox\"></ag-checkbox>\n </div>") || this;
19326 }
19327 CheckboxSelectionComponent.prototype.postConstruct = function () {
19328 this.eCheckbox.setPassive(true);
19329 };
19330 CheckboxSelectionComponent.prototype.getCheckboxId = function () {
19331 return this.eCheckbox.getInputElement().id;
19332 };
19333 CheckboxSelectionComponent.prototype.onDataChanged = function () {
19334 // when rows are loaded for the second time, this can impact the selection, as a row
19335 // could be loaded as already selected (if user scrolls down, and then up again).
19336 this.onSelectionChanged();
19337 };
19338 CheckboxSelectionComponent.prototype.onSelectableChanged = function () {
19339 this.showOrHideSelect();
19340 };
19341 CheckboxSelectionComponent.prototype.onSelectionChanged = function () {
19342 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
19343 var state = this.rowNode.isSelected();
19344 var stateName = state === undefined
19345 ? translate('ariaIndeterminate', 'indeterminate')
19346 : (state === true
19347 ? translate('ariaChecked', 'checked')
19348 : translate('ariaUnchecked', 'unchecked'));
19349 var ariaLabel = translate('ariaRowToggleSelection', 'Press Space to toggle row selection');
19350 this.eCheckbox.setValue(state, true);
19351 this.eCheckbox.setInputAriaLabel(ariaLabel + " (" + stateName + ")");
19352 };
19353 CheckboxSelectionComponent.prototype.onCheckedClicked = function (event) {
19354 var groupSelectsFiltered = this.gridOptionsWrapper.isGroupSelectsFiltered();
19355 var updatedCount = this.rowNode.setSelectedParams({ newValue: false, rangeSelect: event.shiftKey, groupSelectsFiltered: groupSelectsFiltered });
19356 return updatedCount;
19357 };
19358 CheckboxSelectionComponent.prototype.onUncheckedClicked = function (event) {
19359 var groupSelectsFiltered = this.gridOptionsWrapper.isGroupSelectsFiltered();
19360 var updatedCount = this.rowNode.setSelectedParams({ newValue: true, rangeSelect: event.shiftKey, groupSelectsFiltered: groupSelectsFiltered });
19361 return updatedCount;
19362 };
19363 CheckboxSelectionComponent.prototype.init = function (params) {
19364 var _this = this;
19365 this.rowNode = params.rowNode;
19366 this.column = params.column;
19367 this.onSelectionChanged();
19368 // we don't want the row clicked event to fire when selecting the checkbox, otherwise the row
19369 // would possibly get selected twice
19370 this.addGuiEventListener('click', function (event) { return Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["stopPropagationForAgGrid"])(event); });
19371 // likewise we don't want double click on this icon to open a group
19372 this.addGuiEventListener('dblclick', function (event) { return Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["stopPropagationForAgGrid"])(event); });
19373 this.addManagedListener(this.eCheckbox.getInputElement(), 'click', function (event) {
19374 var isSelected = _this.eCheckbox.getValue();
19375 var previousValue = _this.eCheckbox.getPreviousValue();
19376 if (previousValue === undefined || isSelected === undefined) {
19377 // Indeterminate state - try toggling children to determine action.
19378 var result = _this.onUncheckedClicked(event || {});
19379 if (result === 0) {
19380 _this.onCheckedClicked(event);
19381 }
19382 }
19383 else if (isSelected) {
19384 _this.onCheckedClicked(event);
19385 }
19386 else {
19387 _this.onUncheckedClicked(event || {});
19388 }
19389 });
19390 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_ROW_SELECTED, this.onSelectionChanged.bind(this));
19391 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_DATA_CHANGED, this.onDataChanged.bind(this));
19392 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_SELECTABLE_CHANGED, this.onSelectableChanged.bind(this));
19393 var isRowSelectableFunc = this.gridOptionsWrapper.getIsRowSelectableFunc();
19394 var checkboxVisibleIsDynamic = isRowSelectableFunc || this.checkboxCallbackExists();
19395 if (checkboxVisibleIsDynamic) {
19396 var showOrHideSelectListener = this.showOrHideSelect.bind(this);
19397 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, showOrHideSelectListener);
19398 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_DATA_CHANGED, showOrHideSelectListener);
19399 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_CELL_CHANGED, showOrHideSelectListener);
19400 this.showOrHideSelect();
19401 }
19402 this.eCheckbox.getInputElement().setAttribute('tabindex', '-1');
19403 };
19404 CheckboxSelectionComponent.prototype.showOrHideSelect = function () {
19405 // if the isRowSelectable() is not provided the row node is selectable by default
19406 var selectable = this.rowNode.selectable;
19407 // checkboxSelection callback is deemed a legacy solution however we will still consider it's result.
19408 // If selectable, then also check the colDef callback. if not selectable, this it short circuits - no need
19409 // to call the colDef callback.
19410 if (selectable && this.checkboxCallbackExists()) {
19411 selectable = this.column.isCellCheckboxSelection(this.rowNode);
19412 }
19413 // show checkbox if both conditions are true
19414 this.setVisible(selectable);
19415 };
19416 CheckboxSelectionComponent.prototype.checkboxCallbackExists = function () {
19417 // column will be missing if groupUseEntireRow=true
19418 var colDef = this.column ? this.column.getColDef() : null;
19419 return !!colDef && typeof colDef.checkboxSelection === 'function';
19420 };
19421 __decorate([
19422 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eCheckbox')
19423 ], CheckboxSelectionComponent.prototype, "eCheckbox", void 0);
19424 __decorate([
19425 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
19426 ], CheckboxSelectionComponent.prototype, "postConstruct", null);
19427 return CheckboxSelectionComponent;
19428}(_widgets_component__WEBPACK_IMPORTED_MODULE_1__["Component"]));
19429
19430
19431
19432
19433
19434/***/ }),
19435/* 96 */
19436/***/ (function(module, __webpack_exports__, __webpack_require__) {
19437
19438"use strict";
19439__webpack_require__.r(__webpack_exports__);
19440/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowDragComp", function() { return RowDragComp; });
19441/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
19442/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
19443/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94);
19444/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97);
19445/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24);
19446/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20);
19447/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48);
19448/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14);
19449/**
19450 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
19451 * @version v27.3.0
19452 * @link https://www.ag-grid.com/
19453 * @license MIT
19454 */
19455var __extends = (undefined && undefined.__extends) || (function () {
19456 var extendStatics = function (d, b) {
19457 extendStatics = Object.setPrototypeOf ||
19458 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19459 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
19460 return extendStatics(d, b);
19461 };
19462 return function (d, b) {
19463 extendStatics(d, b);
19464 function __() { this.constructor = d; }
19465 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19466 };
19467})();
19468var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
19469 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19470 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
19471 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
19472 return c > 3 && r && Object.defineProperty(target, key, r), r;
19473};
19474
19475
19476
19477
19478
19479
19480
19481
19482var RowDragComp = /** @class */ (function (_super) {
19483 __extends(RowDragComp, _super);
19484 function RowDragComp(cellValueFn, rowNode, column, customGui, dragStartPixels, suppressVisibilityChange) {
19485 var _this = _super.call(this) || this;
19486 _this.cellValueFn = cellValueFn;
19487 _this.rowNode = rowNode;
19488 _this.column = column;
19489 _this.customGui = customGui;
19490 _this.dragStartPixels = dragStartPixels;
19491 _this.suppressVisibilityChange = suppressVisibilityChange;
19492 _this.dragSource = null;
19493 return _this;
19494 }
19495 RowDragComp.prototype.isCustomGui = function () {
19496 return this.customGui != null;
19497 };
19498 RowDragComp.prototype.postConstruct = function () {
19499 if (!this.customGui) {
19500 this.setTemplate(/* html */ "<div class=\"ag-drag-handle ag-row-drag\" aria-hidden=\"true\"></div>");
19501 this.getGui().appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_6__["createIconNoSpan"])('rowDrag', this.beans.gridOptionsWrapper, null));
19502 this.addDragSource();
19503 }
19504 else {
19505 this.setDragElement(this.customGui, this.dragStartPixels);
19506 }
19507 this.checkCompatibility();
19508 if (!this.suppressVisibilityChange) {
19509 var strategy = this.beans.gridOptionsWrapper.isRowDragManaged() ?
19510 new ManagedVisibilityStrategy(this, this.beans, this.rowNode, this.column) :
19511 new NonManagedVisibilityStrategy(this, this.beans, this.rowNode, this.column);
19512 this.createManagedBean(strategy, this.beans.context);
19513 }
19514 };
19515 RowDragComp.prototype.setDragElement = function (dragElement, dragStartPixels) {
19516 this.setTemplateFromElement(dragElement);
19517 this.addDragSource(dragStartPixels);
19518 };
19519 RowDragComp.prototype.getSelectedCount = function () {
19520 var isRowDragMultiRow = this.beans.gridOptionsWrapper.isRowDragMultiRow();
19521 if (!isRowDragMultiRow) {
19522 return 1;
19523 }
19524 var selection = this.beans.selectionService.getSelectedNodes();
19525 return selection.indexOf(this.rowNode) !== -1 ? selection.length : 1;
19526 };
19527 // returns true if all compatibility items work out
19528 RowDragComp.prototype.checkCompatibility = function () {
19529 var managed = this.beans.gridOptionsWrapper.isRowDragManaged();
19530 var treeData = this.beans.gridOptionsWrapper.isTreeData();
19531 if (treeData && managed) {
19532 Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["doOnce"])(function () {
19533 return console.warn('AG Grid: If using row drag with tree data, you cannot have rowDragManaged=true');
19534 }, 'RowDragComp.managedAndTreeData');
19535 }
19536 };
19537 RowDragComp.prototype.addDragSource = function (dragStartPixels) {
19538 var _this = this;
19539 if (dragStartPixels === void 0) { dragStartPixels = 4; }
19540 // if this is changing the drag element, delete the previous dragSource
19541 if (this.dragSource) {
19542 this.removeDragSource();
19543 }
19544 var dragItem = {
19545 rowNode: this.rowNode,
19546 columns: this.column ? [this.column] : undefined,
19547 defaultTextValue: this.cellValueFn(),
19548 };
19549 var rowDragText = this.column && this.column.getColDef().rowDragText;
19550 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
19551 this.dragSource = {
19552 type: _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_3__["DragSourceType"].RowDrag,
19553 eElement: this.getGui(),
19554 dragItemName: function () {
19555 var dragItemCount = _this.getSelectedCount();
19556 if (rowDragText) {
19557 return rowDragText(dragItem, dragItemCount);
19558 }
19559 return dragItemCount === 1 ? _this.cellValueFn() : dragItemCount + " " + translate('rowDragRows', 'rows');
19560 },
19561 getDragItem: function () { return dragItem; },
19562 dragStartPixels: dragStartPixels,
19563 dragSourceDomDataKey: this.beans.gridOptionsWrapper.getDomDataKey()
19564 };
19565 this.beans.dragAndDropService.addDragSource(this.dragSource, true);
19566 };
19567 RowDragComp.prototype.removeDragSource = function () {
19568 if (this.dragSource) {
19569 this.beans.dragAndDropService.removeDragSource(this.dragSource);
19570 }
19571 this.dragSource = null;
19572 };
19573 __decorate([
19574 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('beans')
19575 ], RowDragComp.prototype, "beans", void 0);
19576 __decorate([
19577 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
19578 ], RowDragComp.prototype, "postConstruct", null);
19579 __decorate([
19580 _context_context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
19581 ], RowDragComp.prototype, "removeDragSource", null);
19582 return RowDragComp;
19583}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
19584
19585var VisibilityStrategy = /** @class */ (function (_super) {
19586 __extends(VisibilityStrategy, _super);
19587 function VisibilityStrategy(parent, rowNode, column) {
19588 var _this = _super.call(this) || this;
19589 _this.parent = parent;
19590 _this.rowNode = rowNode;
19591 _this.column = column;
19592 return _this;
19593 }
19594 VisibilityStrategy.prototype.setDisplayedOrVisible = function (neverDisplayed) {
19595 if (neverDisplayed) {
19596 this.parent.setDisplayed(false);
19597 }
19598 else {
19599 var shown = true;
19600 var isShownSometimes = false;
19601 if (this.column) {
19602 shown = this.column.isRowDrag(this.rowNode) || this.parent.isCustomGui();
19603 isShownSometimes = Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["isFunction"])(this.column.getColDef().rowDrag);
19604 }
19605 // if shown sometimes, them some rows can have drag handle while other don't,
19606 // so we use setVisible to keep the handles horizontally aligned (as setVisible
19607 // keeps the empty space, whereas setDisplayed looses the space)
19608 if (isShownSometimes) {
19609 this.parent.setDisplayed(true);
19610 this.parent.setVisible(shown);
19611 }
19612 else {
19613 this.parent.setDisplayed(shown);
19614 this.parent.setVisible(true);
19615 }
19616 }
19617 };
19618 return VisibilityStrategy;
19619}(_context_beanStub__WEBPACK_IMPORTED_MODULE_5__["BeanStub"]));
19620// when non managed, the visibility depends on suppressRowDrag property only
19621var NonManagedVisibilityStrategy = /** @class */ (function (_super) {
19622 __extends(NonManagedVisibilityStrategy, _super);
19623 function NonManagedVisibilityStrategy(parent, beans, rowNode, column) {
19624 var _this = _super.call(this, parent, rowNode, column) || this;
19625 _this.beans = beans;
19626 return _this;
19627 }
19628 NonManagedVisibilityStrategy.prototype.postConstruct = function () {
19629 this.addManagedListener(this.beans.gridOptionsWrapper, 'suppressRowDrag', this.onSuppressRowDrag.bind(this));
19630 // in case data changes, then we need to update visibility of drag item
19631 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_DATA_CHANGED, this.workOutVisibility.bind(this));
19632 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));
19633 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));
19634 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_NEW_COLUMNS_LOADED, this.workOutVisibility.bind(this));
19635 this.workOutVisibility();
19636 };
19637 NonManagedVisibilityStrategy.prototype.onSuppressRowDrag = function () {
19638 this.workOutVisibility();
19639 };
19640 NonManagedVisibilityStrategy.prototype.workOutVisibility = function () {
19641 // only show the drag if both sort and filter are not present
19642 var neverDisplayed = this.beans.gridOptionsWrapper.isSuppressRowDrag();
19643 this.setDisplayedOrVisible(neverDisplayed);
19644 };
19645 __decorate([
19646 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
19647 ], NonManagedVisibilityStrategy.prototype, "postConstruct", null);
19648 return NonManagedVisibilityStrategy;
19649}(VisibilityStrategy));
19650// when managed, the visibility depends on sort, filter and row group, as well as suppressRowDrag property
19651var ManagedVisibilityStrategy = /** @class */ (function (_super) {
19652 __extends(ManagedVisibilityStrategy, _super);
19653 function ManagedVisibilityStrategy(parent, beans, rowNode, column) {
19654 var _this = _super.call(this, parent, rowNode, column) || this;
19655 _this.beans = beans;
19656 return _this;
19657 }
19658 ManagedVisibilityStrategy.prototype.postConstruct = function () {
19659 // we do not show the component if sort, filter or grouping is active
19660 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_SORT_CHANGED, this.workOutVisibility.bind(this));
19661 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_FILTER_CHANGED, this.workOutVisibility.bind(this));
19662 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, this.workOutVisibility.bind(this));
19663 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_NEW_COLUMNS_LOADED, this.workOutVisibility.bind(this));
19664 // in case data changes, then we need to update visibility of drag item
19665 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_DATA_CHANGED, this.workOutVisibility.bind(this));
19666 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));
19667 this.addManagedListener(this.beans.gridOptionsWrapper, 'suppressRowDrag', this.onSuppressRowDrag.bind(this));
19668 this.workOutVisibility();
19669 };
19670 ManagedVisibilityStrategy.prototype.onSuppressRowDrag = function () {
19671 this.workOutVisibility();
19672 };
19673 ManagedVisibilityStrategy.prototype.workOutVisibility = function () {
19674 // only show the drag if both sort and filter are not present
19675 var gridBodyCon = this.beans.ctrlsService.getGridBodyCtrl();
19676 var rowDragFeature = gridBodyCon.getRowDragFeature();
19677 var shouldPreventRowMove = rowDragFeature && rowDragFeature.shouldPreventRowMove();
19678 var suppressRowDrag = this.beans.gridOptionsWrapper.isSuppressRowDrag();
19679 var hasExternalDropZones = this.beans.dragAndDropService.hasExternalDropZones();
19680 var neverDisplayed = (shouldPreventRowMove && !hasExternalDropZones) || suppressRowDrag;
19681 this.setDisplayedOrVisible(neverDisplayed);
19682 };
19683 __decorate([
19684 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
19685 ], ManagedVisibilityStrategy.prototype, "postConstruct", null);
19686 return ManagedVisibilityStrategy;
19687}(VisibilityStrategy));
19688
19689
19690
19691
19692/***/ }),
19693/* 97 */
19694/***/ (function(module, __webpack_exports__, __webpack_require__) {
19695
19696"use strict";
19697__webpack_require__.r(__webpack_exports__);
19698/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragSourceType", function() { return DragSourceType; });
19699/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VerticalDirection", function() { return VerticalDirection; });
19700/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HorizontalDirection", function() { return HorizontalDirection; });
19701/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragAndDropService", function() { return DragAndDropService; });
19702/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
19703/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
19704/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26);
19705/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48);
19706/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18);
19707/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43);
19708/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42);
19709/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14);
19710/**
19711 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
19712 * @version v27.3.0
19713 * @link https://www.ag-grid.com/
19714 * @license MIT
19715 */
19716var __extends = (undefined && undefined.__extends) || (function () {
19717 var extendStatics = function (d, b) {
19718 extendStatics = Object.setPrototypeOf ||
19719 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19720 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
19721 return extendStatics(d, b);
19722 };
19723 return function (d, b) {
19724 extendStatics(d, b);
19725 function __() { this.constructor = d; }
19726 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19727 };
19728})();
19729var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
19730 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19731 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
19732 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
19733 return c > 3 && r && Object.defineProperty(target, key, r), r;
19734};
19735var __values = (undefined && undefined.__values) || function(o) {
19736 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
19737 if (m) return m.call(o);
19738 if (o && typeof o.length === "number") return {
19739 next: function () {
19740 if (o && i >= o.length) o = void 0;
19741 return { value: o && o[i++], done: !o };
19742 }
19743 };
19744 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
19745};
19746
19747
19748
19749
19750
19751
19752
19753
19754var DragSourceType;
19755(function (DragSourceType) {
19756 DragSourceType[DragSourceType["ToolPanel"] = 0] = "ToolPanel";
19757 DragSourceType[DragSourceType["HeaderCell"] = 1] = "HeaderCell";
19758 DragSourceType[DragSourceType["RowDrag"] = 2] = "RowDrag";
19759 DragSourceType[DragSourceType["ChartPanel"] = 3] = "ChartPanel";
19760})(DragSourceType || (DragSourceType = {}));
19761var VerticalDirection;
19762(function (VerticalDirection) {
19763 VerticalDirection[VerticalDirection["Up"] = 0] = "Up";
19764 VerticalDirection[VerticalDirection["Down"] = 1] = "Down";
19765})(VerticalDirection || (VerticalDirection = {}));
19766var HorizontalDirection;
19767(function (HorizontalDirection) {
19768 HorizontalDirection[HorizontalDirection["Left"] = 0] = "Left";
19769 HorizontalDirection[HorizontalDirection["Right"] = 1] = "Right";
19770})(HorizontalDirection || (HorizontalDirection = {}));
19771var DragAndDropService = /** @class */ (function (_super) {
19772 __extends(DragAndDropService, _super);
19773 function DragAndDropService() {
19774 var _this = _super !== null && _super.apply(this, arguments) || this;
19775 _this.dragSourceAndParamsList = [];
19776 _this.dropTargets = [];
19777 return _this;
19778 }
19779 DragAndDropService_1 = DragAndDropService;
19780 DragAndDropService.prototype.init = function () {
19781 this.ePinnedIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMovePin', this.gridOptionsWrapper, null);
19782 this.eHideIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveHide', this.gridOptionsWrapper, null);
19783 this.eMoveIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveMove', this.gridOptionsWrapper, null);
19784 this.eLeftIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveLeft', this.gridOptionsWrapper, null);
19785 this.eRightIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveRight', this.gridOptionsWrapper, null);
19786 this.eGroupIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveGroup', this.gridOptionsWrapper, null);
19787 this.eAggregateIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveValue', this.gridOptionsWrapper, null);
19788 this.ePivotIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMovePivot', this.gridOptionsWrapper, null);
19789 this.eDropNotAllowedIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('dropNotAllowed', this.gridOptionsWrapper, null);
19790 };
19791 DragAndDropService.prototype.addDragSource = function (dragSource, allowTouch) {
19792 if (allowTouch === void 0) { allowTouch = false; }
19793 var params = {
19794 eElement: dragSource.eElement,
19795 dragStartPixels: dragSource.dragStartPixels,
19796 onDragStart: this.onDragStart.bind(this, dragSource),
19797 onDragStop: this.onDragStop.bind(this),
19798 onDragging: this.onDragging.bind(this)
19799 };
19800 this.dragSourceAndParamsList.push({ params: params, dragSource: dragSource });
19801 this.dragService.addDragSource(params, allowTouch);
19802 };
19803 DragAndDropService.prototype.removeDragSource = function (dragSource) {
19804 var sourceAndParams = this.dragSourceAndParamsList.find(function (item) { return item.dragSource === dragSource; });
19805 if (sourceAndParams) {
19806 this.dragService.removeDragSource(sourceAndParams.params);
19807 Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["removeFromArray"])(this.dragSourceAndParamsList, sourceAndParams);
19808 }
19809 };
19810 DragAndDropService.prototype.clearDragSourceParamsList = function () {
19811 var _this = this;
19812 this.dragSourceAndParamsList.forEach(function (sourceAndParams) { return _this.dragService.removeDragSource(sourceAndParams.params); });
19813 this.dragSourceAndParamsList.length = 0;
19814 };
19815 DragAndDropService.prototype.nudge = function () {
19816 if (this.dragging) {
19817 this.onDragging(this.eventLastTime, true);
19818 }
19819 };
19820 DragAndDropService.prototype.onDragStart = function (dragSource, mouseEvent) {
19821 this.dragging = true;
19822 this.dragSource = dragSource;
19823 this.eventLastTime = mouseEvent;
19824 this.dragItem = this.dragSource.getDragItem();
19825 this.lastDropTarget = this.dragSource.dragSourceDropTarget;
19826 if (this.dragSource.onDragStarted) {
19827 this.dragSource.onDragStarted();
19828 }
19829 this.createGhost();
19830 };
19831 DragAndDropService.prototype.onDragStop = function (mouseEvent) {
19832 this.eventLastTime = null;
19833 this.dragging = false;
19834 if (this.dragSource.onDragStopped) {
19835 this.dragSource.onDragStopped();
19836 }
19837 if (this.lastDropTarget && this.lastDropTarget.onDragStop) {
19838 var draggingEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, null, null, false);
19839 this.lastDropTarget.onDragStop(draggingEvent);
19840 }
19841 this.lastDropTarget = null;
19842 this.dragItem = null;
19843 this.removeGhost();
19844 };
19845 DragAndDropService.prototype.onDragging = function (mouseEvent, fromNudge) {
19846 var _this = this;
19847 var hDirection = this.getHorizontalDirection(mouseEvent);
19848 var vDirection = this.getVerticalDirection(mouseEvent);
19849 this.eventLastTime = mouseEvent;
19850 this.positionGhost(mouseEvent);
19851 // check if mouseEvent intersects with any of the drop targets
19852 var validDropTargets = this.dropTargets.filter(function (target) { return _this.isMouseOnDropTarget(mouseEvent, target); });
19853 var len = validDropTargets.length;
19854 var dropTarget = null;
19855 if (len > 0) {
19856 dropTarget = len === 1
19857 ? validDropTargets[0]
19858 // the current mouse position could intersect with more than 1 element
19859 // if they are nested. In that case we need to get the most specific
19860 // container, which is the one that does not contain any other targets.
19861 : validDropTargets.reduce(function (prevTarget, currTarget) {
19862 if (!prevTarget) {
19863 return currTarget;
19864 }
19865 var prevContainer = prevTarget.getContainer();
19866 var currContainer = currTarget.getContainer();
19867 if (prevContainer.contains(currContainer)) {
19868 return currTarget;
19869 }
19870 return prevTarget;
19871 });
19872 }
19873 if (dropTarget !== this.lastDropTarget) {
19874 this.leaveLastTargetIfExists(mouseEvent, hDirection, vDirection, fromNudge);
19875 this.enterDragTargetIfExists(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);
19876 this.lastDropTarget = dropTarget;
19877 }
19878 else if (dropTarget && dropTarget.onDragging) {
19879 var draggingEvent = this.createDropTargetEvent(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);
19880 dropTarget.onDragging(draggingEvent);
19881 }
19882 };
19883 DragAndDropService.prototype.enterDragTargetIfExists = function (dropTarget, mouseEvent, hDirection, vDirection, fromNudge) {
19884 if (!dropTarget) {
19885 return;
19886 }
19887 if (dropTarget.onDragEnter) {
19888 var dragEnterEvent = this.createDropTargetEvent(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);
19889 dropTarget.onDragEnter(dragEnterEvent);
19890 }
19891 this.setGhostIcon(dropTarget.getIconName ? dropTarget.getIconName() : null);
19892 };
19893 DragAndDropService.prototype.leaveLastTargetIfExists = function (mouseEvent, hDirection, vDirection, fromNudge) {
19894 if (!this.lastDropTarget) {
19895 return;
19896 }
19897 if (this.lastDropTarget.onDragLeave) {
19898 var dragLeaveEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, hDirection, vDirection, fromNudge);
19899 this.lastDropTarget.onDragLeave(dragLeaveEvent);
19900 }
19901 this.setGhostIcon(null);
19902 };
19903 DragAndDropService.prototype.getAllContainersFromDropTarget = function (dropTarget) {
19904 var secondaryContainers = dropTarget.getSecondaryContainers ? dropTarget.getSecondaryContainers() : null;
19905 var containers = [[dropTarget.getContainer()]];
19906 return secondaryContainers ? containers.concat(secondaryContainers) : containers;
19907 };
19908 DragAndDropService.prototype.allContainersIntersect = function (mouseEvent, containers) {
19909 var e_1, _a;
19910 try {
19911 for (var containers_1 = __values(containers), containers_1_1 = containers_1.next(); !containers_1_1.done; containers_1_1 = containers_1.next()) {
19912 var container = containers_1_1.value;
19913 var rect = container.getBoundingClientRect();
19914 // if element is not visible, then width and height are zero
19915 if (rect.width === 0 || rect.height === 0) {
19916 return false;
19917 }
19918 var horizontalFit = mouseEvent.clientX >= rect.left && mouseEvent.clientX < rect.right;
19919 var verticalFit = mouseEvent.clientY >= rect.top && mouseEvent.clientY < rect.bottom;
19920 if (!horizontalFit || !verticalFit) {
19921 return false;
19922 }
19923 }
19924 }
19925 catch (e_1_1) { e_1 = { error: e_1_1 }; }
19926 finally {
19927 try {
19928 if (containers_1_1 && !containers_1_1.done && (_a = containers_1.return)) _a.call(containers_1);
19929 }
19930 finally { if (e_1) throw e_1.error; }
19931 }
19932 return true;
19933 };
19934 // checks if the mouse is on the drop target. it checks eContainer and eSecondaryContainers
19935 DragAndDropService.prototype.isMouseOnDropTarget = function (mouseEvent, dropTarget) {
19936 var e_2, _a;
19937 var allContainersFromDropTarget = this.getAllContainersFromDropTarget(dropTarget);
19938 var mouseOverTarget = false;
19939 try {
19940 for (var allContainersFromDropTarget_1 = __values(allContainersFromDropTarget), allContainersFromDropTarget_1_1 = allContainersFromDropTarget_1.next(); !allContainersFromDropTarget_1_1.done; allContainersFromDropTarget_1_1 = allContainersFromDropTarget_1.next()) {
19941 var currentContainers = allContainersFromDropTarget_1_1.value;
19942 if (this.allContainersIntersect(mouseEvent, currentContainers)) {
19943 mouseOverTarget = true;
19944 break;
19945 }
19946 }
19947 }
19948 catch (e_2_1) { e_2 = { error: e_2_1 }; }
19949 finally {
19950 try {
19951 if (allContainersFromDropTarget_1_1 && !allContainersFromDropTarget_1_1.done && (_a = allContainersFromDropTarget_1.return)) _a.call(allContainersFromDropTarget_1);
19952 }
19953 finally { if (e_2) throw e_2.error; }
19954 }
19955 if (dropTarget.targetContainsSource && !dropTarget.getContainer().contains(this.dragSource.eElement)) {
19956 return false;
19957 }
19958 return mouseOverTarget && dropTarget.isInterestedIn(this.dragSource.type, this.dragSource.eElement);
19959 };
19960 DragAndDropService.prototype.addDropTarget = function (dropTarget) {
19961 this.dropTargets.push(dropTarget);
19962 };
19963 DragAndDropService.prototype.removeDropTarget = function (dropTarget) {
19964 this.dropTargets = this.dropTargets.filter(function (target) { return target.getContainer() !== dropTarget.getContainer(); });
19965 };
19966 DragAndDropService.prototype.hasExternalDropZones = function () {
19967 return this.dropTargets.some(function (zones) { return zones.external; });
19968 };
19969 DragAndDropService.prototype.findExternalZone = function (params) {
19970 var externalTargets = this.dropTargets.filter(function (target) { return target.external; });
19971 return externalTargets.find(function (zone) { return zone.getContainer() === params.getContainer(); }) || null;
19972 };
19973 DragAndDropService.prototype.getHorizontalDirection = function (event) {
19974 var clientX = this.eventLastTime && this.eventLastTime.clientX;
19975 var eClientX = event.clientX;
19976 if (clientX === eClientX) {
19977 return null;
19978 }
19979 return clientX > eClientX ? HorizontalDirection.Left : HorizontalDirection.Right;
19980 };
19981 DragAndDropService.prototype.getVerticalDirection = function (event) {
19982 var clientY = this.eventLastTime && this.eventLastTime.clientY;
19983 var eClientY = event.clientY;
19984 if (clientY === eClientY) {
19985 return null;
19986 }
19987 return clientY > eClientY ? VerticalDirection.Up : VerticalDirection.Down;
19988 };
19989 DragAndDropService.prototype.createDropTargetEvent = function (dropTarget, event, hDirection, vDirection, fromNudge) {
19990 // localise x and y to the target
19991 var dropZoneTarget = dropTarget.getContainer();
19992 var rect = dropZoneTarget.getBoundingClientRect();
19993 var _a = this, api = _a.gridApi, columnApi = _a.columnApi, dragItem = _a.dragItem, dragSource = _a.dragSource;
19994 var x = event.clientX - rect.left;
19995 var y = event.clientY - rect.top;
19996 return { event: event, x: x, y: y, vDirection: vDirection, hDirection: hDirection, dragSource: dragSource, fromNudge: fromNudge, dragItem: dragItem, api: api, columnApi: columnApi, dropZoneTarget: dropZoneTarget };
19997 };
19998 DragAndDropService.prototype.positionGhost = function (event) {
19999 var ghost = this.eGhost;
20000 if (!ghost) {
20001 return;
20002 }
20003 var ghostRect = ghost.getBoundingClientRect();
20004 var ghostHeight = ghostRect.height;
20005 // for some reason, without the '-2', it still overlapped by 1 or 2 pixels, which
20006 // then brought in scrollbars to the browser. no idea why, but putting in -2 here
20007 // works around it which is good enough for me.
20008 var browserWidth = Object(_utils_browser__WEBPACK_IMPORTED_MODULE_5__["getBodyWidth"])() - 2;
20009 var browserHeight = Object(_utils_browser__WEBPACK_IMPORTED_MODULE_5__["getBodyHeight"])() - 2;
20010 var top = event.pageY - (ghostHeight / 2);
20011 var left = event.pageX - 10;
20012 var eDocument = this.gridOptionsWrapper.getDocument();
20013 var win = (eDocument.defaultView || window);
20014 var windowScrollY = win.pageYOffset || eDocument.documentElement.scrollTop;
20015 var windowScrollX = win.pageXOffset || eDocument.documentElement.scrollLeft;
20016 // check ghost is not positioned outside of the browser
20017 if (browserWidth > 0 && ((left + ghost.clientWidth) > (browserWidth + windowScrollX))) {
20018 left = browserWidth + windowScrollX - ghost.clientWidth;
20019 }
20020 if (left < 0) {
20021 left = 0;
20022 }
20023 if (browserHeight > 0 && ((top + ghost.clientHeight) > (browserHeight + windowScrollY))) {
20024 top = browserHeight + windowScrollY - ghost.clientHeight;
20025 }
20026 if (top < 0) {
20027 top = 0;
20028 }
20029 ghost.style.left = left + "px";
20030 ghost.style.top = top + "px";
20031 };
20032 DragAndDropService.prototype.removeGhost = function () {
20033 if (this.eGhost && this.eGhostParent) {
20034 this.eGhostParent.removeChild(this.eGhost);
20035 }
20036 this.eGhost = null;
20037 };
20038 DragAndDropService.prototype.createGhost = function () {
20039 this.eGhost = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["loadTemplate"])(DragAndDropService_1.GHOST_TEMPLATE);
20040 var theme = this.environment.getTheme().theme;
20041 if (theme) {
20042 this.eGhost.classList.add(theme);
20043 }
20044 this.eGhostIcon = this.eGhost.querySelector('.ag-dnd-ghost-icon');
20045 this.setGhostIcon(null);
20046 var eText = this.eGhost.querySelector('.ag-dnd-ghost-label');
20047 var dragItemName = this.dragSource.dragItemName;
20048 if (Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["isFunction"])(dragItemName)) {
20049 dragItemName = dragItemName();
20050 }
20051 eText.innerHTML = Object(_utils_string__WEBPACK_IMPORTED_MODULE_2__["escapeString"])(dragItemName) || '';
20052 this.eGhost.style.height = '25px';
20053 this.eGhost.style.top = '20px';
20054 this.eGhost.style.left = '20px';
20055 var eDocument = this.gridOptionsWrapper.getDocument();
20056 var targetEl = null;
20057 try {
20058 targetEl = eDocument.fullscreenElement;
20059 }
20060 catch (e) {
20061 // some environments like SalesForce will throw errors
20062 // simply by trying to read the fullscreenElement property
20063 }
20064 finally {
20065 if (!targetEl) {
20066 targetEl = eDocument.querySelector('body');
20067 }
20068 }
20069 this.eGhostParent = targetEl;
20070 if (!this.eGhostParent) {
20071 console.warn('AG Grid: could not find document body, it is needed for dragging columns');
20072 }
20073 else {
20074 this.eGhostParent.appendChild(this.eGhost);
20075 }
20076 };
20077 DragAndDropService.prototype.setGhostIcon = function (iconName, shake) {
20078 if (shake === void 0) { shake = false; }
20079 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["clearElement"])(this.eGhostIcon);
20080 var eIcon = null;
20081 if (!iconName) {
20082 iconName = this.dragSource.defaultIconName || DragAndDropService_1.ICON_NOT_ALLOWED;
20083 }
20084 switch (iconName) {
20085 case DragAndDropService_1.ICON_PINNED:
20086 eIcon = this.ePinnedIcon;
20087 break;
20088 case DragAndDropService_1.ICON_MOVE:
20089 eIcon = this.eMoveIcon;
20090 break;
20091 case DragAndDropService_1.ICON_LEFT:
20092 eIcon = this.eLeftIcon;
20093 break;
20094 case DragAndDropService_1.ICON_RIGHT:
20095 eIcon = this.eRightIcon;
20096 break;
20097 case DragAndDropService_1.ICON_GROUP:
20098 eIcon = this.eGroupIcon;
20099 break;
20100 case DragAndDropService_1.ICON_AGGREGATE:
20101 eIcon = this.eAggregateIcon;
20102 break;
20103 case DragAndDropService_1.ICON_PIVOT:
20104 eIcon = this.ePivotIcon;
20105 break;
20106 case DragAndDropService_1.ICON_NOT_ALLOWED:
20107 eIcon = this.eDropNotAllowedIcon;
20108 break;
20109 case DragAndDropService_1.ICON_HIDE:
20110 eIcon = this.eHideIcon;
20111 break;
20112 }
20113 this.eGhostIcon.classList.toggle('ag-shake-left-to-right', shake);
20114 if (eIcon === this.eHideIcon && this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns()) {
20115 return;
20116 }
20117 if (eIcon) {
20118 this.eGhostIcon.appendChild(eIcon);
20119 }
20120 };
20121 var DragAndDropService_1;
20122 DragAndDropService.ICON_PINNED = 'pinned';
20123 DragAndDropService.ICON_MOVE = 'move';
20124 DragAndDropService.ICON_LEFT = 'left';
20125 DragAndDropService.ICON_RIGHT = 'right';
20126 DragAndDropService.ICON_GROUP = 'group';
20127 DragAndDropService.ICON_AGGREGATE = 'aggregate';
20128 DragAndDropService.ICON_PIVOT = 'pivot';
20129 DragAndDropService.ICON_NOT_ALLOWED = 'notAllowed';
20130 DragAndDropService.ICON_HIDE = 'hide';
20131 DragAndDropService.GHOST_TEMPLATE = "<div class=\"ag-dnd-ghost ag-unselectable\">\n <span class=\"ag-dnd-ghost-icon ag-shake-left-to-right\"></span>\n <div class=\"ag-dnd-ghost-label\"></div>\n </div>";
20132 __decorate([
20133 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragService')
20134 ], DragAndDropService.prototype, "dragService", void 0);
20135 __decorate([
20136 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('environment')
20137 ], DragAndDropService.prototype, "environment", void 0);
20138 __decorate([
20139 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnApi')
20140 ], DragAndDropService.prototype, "columnApi", void 0);
20141 __decorate([
20142 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridApi')
20143 ], DragAndDropService.prototype, "gridApi", void 0);
20144 __decorate([
20145 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
20146 ], DragAndDropService.prototype, "init", null);
20147 __decorate([
20148 _context_context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
20149 ], DragAndDropService.prototype, "clearDragSourceParamsList", null);
20150 DragAndDropService = DragAndDropService_1 = __decorate([
20151 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('dragAndDropService')
20152 ], DragAndDropService);
20153 return DragAndDropService;
20154}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
20155
20156
20157
20158
20159
20160/***/ }),
20161/* 98 */
20162/***/ (function(module, __webpack_exports__, __webpack_require__) {
20163
20164"use strict";
20165__webpack_require__.r(__webpack_exports__);
20166/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadingCellRenderer", function() { return LoadingCellRenderer; });
20167/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
20168/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
20169/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
20170/**
20171 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
20172 * @version v27.3.0
20173 * @link https://www.ag-grid.com/
20174 * @license MIT
20175 */
20176var __extends = (undefined && undefined.__extends) || (function () {
20177 var extendStatics = function (d, b) {
20178 extendStatics = Object.setPrototypeOf ||
20179 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20180 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20181 return extendStatics(d, b);
20182 };
20183 return function (d, b) {
20184 extendStatics(d, b);
20185 function __() { this.constructor = d; }
20186 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20187 };
20188})();
20189var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
20190 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20191 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20192 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
20193 return c > 3 && r && Object.defineProperty(target, key, r), r;
20194};
20195
20196
20197
20198var LoadingCellRenderer = /** @class */ (function (_super) {
20199 __extends(LoadingCellRenderer, _super);
20200 function LoadingCellRenderer() {
20201 return _super.call(this, LoadingCellRenderer.TEMPLATE) || this;
20202 }
20203 LoadingCellRenderer.prototype.init = function (params) {
20204 params.node.failedLoad ? this.setupFailed() : this.setupLoading();
20205 };
20206 LoadingCellRenderer.prototype.setupFailed = function () {
20207 this.eLoadingText.innerText = 'ERR';
20208 };
20209 LoadingCellRenderer.prototype.setupLoading = function () {
20210 var eLoadingIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_2__["createIconNoSpan"])('groupLoading', this.gridOptionsWrapper, null);
20211 if (eLoadingIcon) {
20212 this.eLoadingIcon.appendChild(eLoadingIcon);
20213 }
20214 var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
20215 this.eLoadingText.innerText = localeTextFunc('loadingOoo', 'Loading');
20216 };
20217 LoadingCellRenderer.prototype.refresh = function (params) {
20218 return false;
20219 };
20220 // this is a user component, and IComponent has "public destroy()" as part of the interface.
20221 // so we need to override destroy() just to make the method public.
20222 LoadingCellRenderer.prototype.destroy = function () {
20223 _super.prototype.destroy.call(this);
20224 };
20225 LoadingCellRenderer.TEMPLATE = "<div class=\"ag-loading\">\n <span class=\"ag-loading-icon\" ref=\"eLoadingIcon\"></span>\n <span class=\"ag-loading-text\" ref=\"eLoadingText\"></span>\n </div>";
20226 __decorate([
20227 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eLoadingIcon')
20228 ], LoadingCellRenderer.prototype, "eLoadingIcon", void 0);
20229 __decorate([
20230 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eLoadingText')
20231 ], LoadingCellRenderer.prototype, "eLoadingText", void 0);
20232 return LoadingCellRenderer;
20233}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
20234
20235
20236
20237
20238
20239/***/ }),
20240/* 99 */
20241/***/ (function(module, __webpack_exports__, __webpack_require__) {
20242
20243"use strict";
20244__webpack_require__.r(__webpack_exports__);
20245/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadingOverlayComponent", function() { return LoadingOverlayComponent; });
20246/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
20247/**
20248 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
20249 * @version v27.3.0
20250 * @link https://www.ag-grid.com/
20251 * @license MIT
20252 */
20253var __extends = (undefined && undefined.__extends) || (function () {
20254 var extendStatics = function (d, b) {
20255 extendStatics = Object.setPrototypeOf ||
20256 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20257 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20258 return extendStatics(d, b);
20259 };
20260 return function (d, b) {
20261 extendStatics(d, b);
20262 function __() { this.constructor = d; }
20263 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20264 };
20265})();
20266
20267var LoadingOverlayComponent = /** @class */ (function (_super) {
20268 __extends(LoadingOverlayComponent, _super);
20269 function LoadingOverlayComponent() {
20270 return _super.call(this) || this;
20271 }
20272 // this is a user component, and IComponent has "public destroy()" as part of the interface.
20273 // so we need to override destroy() just to make the method public.
20274 LoadingOverlayComponent.prototype.destroy = function () {
20275 _super.prototype.destroy.call(this);
20276 };
20277 LoadingOverlayComponent.prototype.init = function (params) {
20278 var template = this.gridOptionsWrapper.getOverlayLoadingTemplate() ?
20279 this.gridOptionsWrapper.getOverlayLoadingTemplate() : LoadingOverlayComponent.DEFAULT_LOADING_OVERLAY_TEMPLATE;
20280 var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
20281 var localisedTemplate = template.replace('[LOADING...]', localeTextFunc('loadingOoo', 'Loading...'));
20282 this.setTemplate(localisedTemplate);
20283 };
20284 LoadingOverlayComponent.DEFAULT_LOADING_OVERLAY_TEMPLATE = '<span class="ag-overlay-loading-center">[LOADING...]</span>';
20285 return LoadingOverlayComponent;
20286}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
20287
20288
20289
20290
20291
20292/***/ }),
20293/* 100 */
20294/***/ (function(module, __webpack_exports__, __webpack_require__) {
20295
20296"use strict";
20297__webpack_require__.r(__webpack_exports__);
20298/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoRowsOverlayComponent", function() { return NoRowsOverlayComponent; });
20299/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
20300/**
20301 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
20302 * @version v27.3.0
20303 * @link https://www.ag-grid.com/
20304 * @license MIT
20305 */
20306var __extends = (undefined && undefined.__extends) || (function () {
20307 var extendStatics = function (d, b) {
20308 extendStatics = Object.setPrototypeOf ||
20309 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20310 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20311 return extendStatics(d, b);
20312 };
20313 return function (d, b) {
20314 extendStatics(d, b);
20315 function __() { this.constructor = d; }
20316 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20317 };
20318})();
20319
20320var NoRowsOverlayComponent = /** @class */ (function (_super) {
20321 __extends(NoRowsOverlayComponent, _super);
20322 function NoRowsOverlayComponent() {
20323 return _super.call(this) || this;
20324 }
20325 // this is a user component, and IComponent has "public destroy()" as part of the interface.
20326 // so we need to override destroy() just to make the method public.
20327 NoRowsOverlayComponent.prototype.destroy = function () {
20328 _super.prototype.destroy.call(this);
20329 };
20330 NoRowsOverlayComponent.prototype.init = function (params) {
20331 var template = this.gridOptionsWrapper.getOverlayNoRowsTemplate() ?
20332 this.gridOptionsWrapper.getOverlayNoRowsTemplate() : NoRowsOverlayComponent.DEFAULT_NO_ROWS_TEMPLATE;
20333 var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
20334 var localisedTemplate = template.replace('[NO_ROWS_TO_SHOW]', localeTextFunc('noRowsToShow', 'No Rows To Show'));
20335 this.setTemplate(localisedTemplate);
20336 };
20337 NoRowsOverlayComponent.DEFAULT_NO_ROWS_TEMPLATE = '<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>';
20338 return NoRowsOverlayComponent;
20339}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
20340
20341
20342
20343
20344
20345/***/ }),
20346/* 101 */
20347/***/ (function(module, __webpack_exports__, __webpack_require__) {
20348
20349"use strict";
20350__webpack_require__.r(__webpack_exports__);
20351/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipComponent", function() { return TooltipComponent; });
20352/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85);
20353/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26);
20354/**
20355 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
20356 * @version v27.3.0
20357 * @link https://www.ag-grid.com/
20358 * @license MIT
20359 */
20360var __extends = (undefined && undefined.__extends) || (function () {
20361 var extendStatics = function (d, b) {
20362 extendStatics = Object.setPrototypeOf ||
20363 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20364 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20365 return extendStatics(d, b);
20366 };
20367 return function (d, b) {
20368 extendStatics(d, b);
20369 function __() { this.constructor = d; }
20370 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20371 };
20372})();
20373
20374
20375var TooltipComponent = /** @class */ (function (_super) {
20376 __extends(TooltipComponent, _super);
20377 function TooltipComponent() {
20378 return _super.call(this, /* html */ "<div class=\"ag-tooltip\"></div>") || this;
20379 }
20380 // will need to type params
20381 TooltipComponent.prototype.init = function (params) {
20382 var value = params.value;
20383 this.getGui().innerHTML = Object(_utils_string__WEBPACK_IMPORTED_MODULE_1__["escapeString"])(value);
20384 };
20385 return TooltipComponent;
20386}(_widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__["PopupComponent"]));
20387
20388
20389
20390
20391
20392/***/ }),
20393/* 102 */
20394/***/ (function(module, __webpack_exports__, __webpack_require__) {
20395
20396"use strict";
20397__webpack_require__.r(__webpack_exports__);
20398/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserComponentFactory", function() { return UserComponentFactory; });
20399/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
20400/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
20401/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(37);
20402/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
20403/* harmony import */ var _componentTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(103);
20404/* harmony import */ var _filter_floating_floatingFilterMapper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(104);
20405/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(16);
20406/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(17);
20407/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14);
20408/**
20409 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
20410 * @version v27.3.0
20411 * @link https://www.ag-grid.com/
20412 * @license MIT
20413 */
20414var __extends = (undefined && undefined.__extends) || (function () {
20415 var extendStatics = function (d, b) {
20416 extendStatics = Object.setPrototypeOf ||
20417 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20418 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20419 return extendStatics(d, b);
20420 };
20421 return function (d, b) {
20422 extendStatics(d, b);
20423 function __() { this.constructor = d; }
20424 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20425 };
20426})();
20427var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
20428 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20429 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20430 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
20431 return c > 3 && r && Object.defineProperty(target, key, r), r;
20432};
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442var ANNOTATIONS = '__annotations__';
20443var UserComponentFactory = /** @class */ (function (_super) {
20444 __extends(UserComponentFactory, _super);
20445 function UserComponentFactory() {
20446 return _super !== null && _super.apply(this, arguments) || this;
20447 }
20448 UserComponentFactory.prototype.getHeaderCompDetails = function (colDef, params) {
20449 return this.getCompDetails(colDef, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["HeaderComponent"], 'agColumnHeader', params);
20450 };
20451 UserComponentFactory.prototype.getHeaderGroupCompDetails = function (params) {
20452 var colGroupDef = params.columnGroup.getColGroupDef();
20453 return this.getCompDetails(colGroupDef, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["HeaderGroupComponent"], 'agColumnGroupHeader', params);
20454 };
20455 // this one is unusual, as it can be LoadingCellRenderer, DetailCellRenderer, FullWidthCellRenderer or GroupRowRenderer.
20456 // so we have to pass the type in.
20457 UserComponentFactory.prototype.getFullWidthCellRendererDetails = function (params) {
20458 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FullWidth"], null, params, true);
20459 };
20460 UserComponentFactory.prototype.getFullWidthLoadingCellRendererDetails = function (params) {
20461 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FullWidthLoading"], 'agLoadingCellRenderer', params, true);
20462 };
20463 UserComponentFactory.prototype.getFullWidthGroupCellRendererDetails = function (params) {
20464 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FullWidthGroup"], 'agGroupRowRenderer', params, true);
20465 };
20466 UserComponentFactory.prototype.getFullWidthDetailCellRendererDetails = function (params) {
20467 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FullWidthDetail"], 'agDetailCellRenderer', params, true);
20468 };
20469 // CELL RENDERER
20470 UserComponentFactory.prototype.getInnerRendererDetails = function (def, params) {
20471 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["InnerRendererComponent"], null, params);
20472 };
20473 UserComponentFactory.prototype.getFullWidthGroupRowInnerCellRenderer = function (def, params) {
20474 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["InnerRendererComponent"], null, params);
20475 };
20476 UserComponentFactory.prototype.getCellRendererDetails = function (def, params) {
20477 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["CellRendererComponent"], null, params);
20478 };
20479 // CELL EDITOR
20480 UserComponentFactory.prototype.getCellEditorDetails = function (def, params) {
20481 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["CellEditorComponent"], 'agCellEditor', params, true);
20482 };
20483 // FILTER
20484 UserComponentFactory.prototype.getFilterDetails = function (def, params, defaultFilter) {
20485 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FilterComponent"], defaultFilter, params, true);
20486 };
20487 UserComponentFactory.prototype.getDateCompDetails = function (params) {
20488 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["DateComponent"], 'agDateInput', params, true);
20489 };
20490 UserComponentFactory.prototype.getLoadingOverlayCompDetails = function (params) {
20491 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["LoadingOverlayComponent"], 'agLoadingOverlay', params, true);
20492 };
20493 UserComponentFactory.prototype.getNoRowsOverlayCompDetails = function (params) {
20494 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["NoRowsOverlayComponent"], 'agNoRowsOverlay', params, true);
20495 };
20496 UserComponentFactory.prototype.getTooltipCompDetails = function (params) {
20497 return this.getCompDetails(params.colDef, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["TooltipComponent"], 'agTooltipComponent', params, true);
20498 };
20499 UserComponentFactory.prototype.getSetFilterCellRendererDetails = function (def, params) {
20500 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["CellRendererComponent"], null, params);
20501 };
20502 UserComponentFactory.prototype.getFloatingFilterCompDetails = function (def, params, defaultFloatingFilter) {
20503 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FloatingFilterComponent"], defaultFloatingFilter, params);
20504 };
20505 UserComponentFactory.prototype.getToolPanelCompDetails = function (toolPanelDef, params) {
20506 return this.getCompDetails(toolPanelDef, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["ToolPanelComponent"], null, params, true);
20507 };
20508 UserComponentFactory.prototype.getStatusPanelCompDetails = function (def, params) {
20509 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["StatusPanelComponent"], null, params, true);
20510 };
20511 UserComponentFactory.prototype.getCompDetails = function (defObject, type, defaultName, params, mandatory) {
20512 var _this = this;
20513 if (mandatory === void 0) { mandatory = false; }
20514 var propertyName = type.propertyName, cellRenderer = type.cellRenderer;
20515 var _a = this.getCompKeys(defObject, type, params), compName = _a.compName, jsComp = _a.jsComp, fwComp = _a.fwComp, paramsFromSelector = _a.paramsFromSelector, popupFromSelector = _a.popupFromSelector, popupPositionFromSelector = _a.popupPositionFromSelector;
20516 var lookupFromRegistry = function (key) {
20517 var item = _this.userComponentRegistry.retrieve(key);
20518 if (item) {
20519 jsComp = !item.componentFromFramework ? item.component : undefined;
20520 fwComp = item.componentFromFramework ? item.component : undefined;
20521 }
20522 };
20523 // if compOption is a string, means we need to look the item up
20524 if (compName != null) {
20525 lookupFromRegistry(compName);
20526 }
20527 // if lookup brought nothing back, and we have a default, lookup the default
20528 if (jsComp == null && fwComp == null && defaultName != null) {
20529 lookupFromRegistry(defaultName);
20530 }
20531 // if we have a comp option, and it's a function, replace it with an object equivalent adaptor
20532 if (jsComp && cellRenderer && !this.agComponentUtils.doesImplementIComponent(jsComp)) {
20533 jsComp = this.agComponentUtils.adaptFunction(propertyName, jsComp);
20534 }
20535 if (!jsComp && !fwComp) {
20536 if (mandatory) {
20537 console.error("Could not find component " + compName + ", did you forget to configure this component?");
20538 }
20539 return;
20540 }
20541 var paramsMerged = this.mergeParamsWithApplicationProvidedParams(defObject, type, params, paramsFromSelector);
20542 var componentFromFramework = jsComp == null;
20543 var componentClass = jsComp ? jsComp : fwComp;
20544 return {
20545 componentFromFramework: componentFromFramework,
20546 componentClass: componentClass,
20547 params: paramsMerged,
20548 type: type,
20549 popupFromSelector: popupFromSelector,
20550 popupPositionFromSelector: popupPositionFromSelector,
20551 newAgStackInstance: function () { return _this.newAgStackInstance(componentClass, componentFromFramework, paramsMerged, type); }
20552 };
20553 };
20554 UserComponentFactory.prototype.getCompKeys = function (defObject, type, params) {
20555 var _this = this;
20556 var propertyName = type.propertyName;
20557 var compName;
20558 var jsComp;
20559 var fwComp;
20560 var paramsFromSelector;
20561 var popupFromSelector;
20562 var popupPositionFromSelector;
20563 // there are two types of js comps, class based and func based. we can only check for
20564 // class based, by checking if getGui() exists. no way to differentiate js func based vs eg react func based
20565 // const isJsClassComp = (comp: any) => this.agComponentUtils.doesImplementIComponent(comp);
20566 // const fwActive = this.frameworkComponentWrapper != null;
20567 // pull from defObject if available
20568 if (defObject) {
20569 var defObjectAny = defObject;
20570 // if selector, use this
20571 var selectorFunc = defObjectAny[propertyName + 'Selector'];
20572 var selectorRes = selectorFunc ? selectorFunc(params) : null;
20573 var assignComp = function (providedJsComp, providedFwComp) {
20574 var xxxFrameworkDeprecatedWarn = function () {
20575 var warningMessage = "AG Grid: As of v27, the property " + propertyName + "Framework is deprecated. The property " + propertyName + " can now be used for JavaScript AND Framework Components.";
20576 Object(_utils_function__WEBPACK_IMPORTED_MODULE_8__["doOnce"])(function () { return console.warn(warningMessage); }, "UserComponentFactory." + propertyName + "FrameworkDeprecated");
20577 };
20578 if (typeof providedJsComp === 'string') {
20579 compName = providedJsComp;
20580 }
20581 else if (typeof providedFwComp === 'string') {
20582 xxxFrameworkDeprecatedWarn();
20583 compName = providedFwComp;
20584 // comp===true for filters, which means use the default comp
20585 }
20586 else if (providedJsComp != null && providedJsComp !== true) {
20587 var isFwkComp = _this.getFrameworkOverrides().isFrameworkComponent(providedJsComp);
20588 if (isFwkComp) {
20589 fwComp = providedJsComp;
20590 }
20591 else {
20592 jsComp = providedJsComp;
20593 }
20594 }
20595 else if (providedFwComp != null) {
20596 xxxFrameworkDeprecatedWarn();
20597 fwComp = providedFwComp;
20598 }
20599 };
20600 if (selectorRes) {
20601 if (selectorRes.frameworkComponent != null) {
20602 var warningMessage_1 = "AG Grid: As of v27, the return for " + propertyName + "Selector has attributes [component, params] only. The attribute frameworkComponent is deprecated. You should now return back Framework Components using the 'component' attribute and the grid works out if it's a framework component or not.";
20603 Object(_utils_function__WEBPACK_IMPORTED_MODULE_8__["doOnce"])(function () { return console.warn(warningMessage_1); }, "UserComponentFactory." + propertyName + "FrameworkSelectorDeprecated");
20604 assignComp(selectorRes.frameworkComponent, undefined);
20605 }
20606 else {
20607 assignComp(selectorRes.component, undefined);
20608 }
20609 paramsFromSelector = selectorRes.params;
20610 popupFromSelector = selectorRes.popup;
20611 popupPositionFromSelector = selectorRes.popupPosition;
20612 }
20613 else {
20614 // if no selector, or result of selector is empty, take from defObject
20615 assignComp(defObjectAny[propertyName], defObjectAny[propertyName + 'Framework']);
20616 }
20617 }
20618 return { compName: compName, jsComp: jsComp, fwComp: fwComp, paramsFromSelector: paramsFromSelector, popupFromSelector: popupFromSelector, popupPositionFromSelector: popupPositionFromSelector };
20619 };
20620 UserComponentFactory.prototype.newAgStackInstance = function (ComponentClass, componentFromFramework, params, type) {
20621 var propertyName = type.propertyName;
20622 var jsComponent = !componentFromFramework;
20623 // using javascript component
20624 var instance;
20625 if (jsComponent) {
20626 instance = new ComponentClass();
20627 }
20628 else {
20629 // Using framework component
20630 var thisComponentConfig = this.componentMetadataProvider.retrieve(propertyName);
20631 instance = this.frameworkComponentWrapper.wrap(ComponentClass, thisComponentConfig.mandatoryMethodList, thisComponentConfig.optionalMethodList, type);
20632 }
20633 var deferredInit = this.initComponent(instance, params);
20634 if (deferredInit == null) {
20635 return _utils__WEBPACK_IMPORTED_MODULE_2__["AgPromise"].resolve(instance);
20636 }
20637 return deferredInit.then(function () { return instance; });
20638 };
20639 // used by Floating Filter
20640 UserComponentFactory.prototype.mergeParamsWithApplicationProvidedParams = function (defObject, type, paramsFromGrid, paramsFromSelector) {
20641 if (paramsFromSelector === void 0) { paramsFromSelector = null; }
20642 var params = {
20643 context: this.gridOptionsWrapper.getContext(),
20644 columnApi: this.gridOptionsWrapper.getColumnApi(),
20645 api: this.gridOptionsWrapper.getApi()
20646 };
20647 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["mergeDeep"])(params, paramsFromGrid);
20648 // pull user params from either the old prop name and new prop name
20649 // eg either cellRendererParams and cellCompParams
20650 var defObjectAny = defObject;
20651 var userParams = defObjectAny && defObjectAny[type.propertyName + 'Params'];
20652 if (typeof userParams === 'function') {
20653 var userParamsFromFunc = userParams(paramsFromGrid);
20654 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["mergeDeep"])(params, userParamsFromFunc);
20655 }
20656 else if (typeof userParams === 'object') {
20657 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["mergeDeep"])(params, userParams);
20658 }
20659 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["mergeDeep"])(params, paramsFromSelector);
20660 return params;
20661 };
20662 UserComponentFactory.prototype.initComponent = function (component, params) {
20663 this.context.createBean(component);
20664 if (component.init == null) {
20665 return;
20666 }
20667 return component.init(params);
20668 };
20669 UserComponentFactory.prototype.getDefaultFloatingFilterType = function (def) {
20670 if (def == null) {
20671 return null;
20672 }
20673 var defaultFloatingFilterType = null;
20674 var _a = this.getCompKeys(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FilterComponent"]), compName = _a.compName, jsComp = _a.jsComp, fwComp = _a.fwComp;
20675 if (compName) {
20676 // will be undefined if not in the map
20677 defaultFloatingFilterType = _filter_floating_floatingFilterMapper__WEBPACK_IMPORTED_MODULE_5__["FloatingFilterMapper"].getFloatingFilterType(compName);
20678 }
20679 else {
20680 var usingDefaultFilter = (jsComp == null && fwComp == null) && (def.filter === true);
20681 if (usingDefaultFilter) {
20682 var setFilterModuleLoaded = _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].SetFilterModule);
20683 defaultFloatingFilterType = setFilterModuleLoaded ? 'agSetColumnFloatingFilter' : 'agTextColumnFloatingFilter';
20684 }
20685 }
20686 return defaultFloatingFilterType;
20687 };
20688 __decorate([
20689 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptions')
20690 ], UserComponentFactory.prototype, "gridOptions", void 0);
20691 __decorate([
20692 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('agComponentUtils')
20693 ], UserComponentFactory.prototype, "agComponentUtils", void 0);
20694 __decorate([
20695 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('componentMetadataProvider')
20696 ], UserComponentFactory.prototype, "componentMetadataProvider", void 0);
20697 __decorate([
20698 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('userComponentRegistry')
20699 ], UserComponentFactory.prototype, "userComponentRegistry", void 0);
20700 __decorate([
20701 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('frameworkComponentWrapper')
20702 ], UserComponentFactory.prototype, "frameworkComponentWrapper", void 0);
20703 UserComponentFactory = __decorate([
20704 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('userComponentFactory')
20705 ], UserComponentFactory);
20706 return UserComponentFactory;
20707}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
20708
20709
20710
20711
20712
20713/***/ }),
20714/* 103 */
20715/***/ (function(module, __webpack_exports__, __webpack_require__) {
20716
20717"use strict";
20718__webpack_require__.r(__webpack_exports__);
20719/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateComponent", function() { return DateComponent; });
20720/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderComponent", function() { return HeaderComponent; });
20721/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupComponent", function() { return HeaderGroupComponent; });
20722/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellRendererComponent", function() { return CellRendererComponent; });
20723/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellEditorComponent", function() { return CellEditorComponent; });
20724/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerRendererComponent", function() { return InnerRendererComponent; });
20725/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadingOverlayComponent", function() { return LoadingOverlayComponent; });
20726/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoRowsOverlayComponent", function() { return NoRowsOverlayComponent; });
20727/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipComponent", function() { return TooltipComponent; });
20728/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterComponent", function() { return FilterComponent; });
20729/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FloatingFilterComponent", function() { return FloatingFilterComponent; });
20730/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToolPanelComponent", function() { return ToolPanelComponent; });
20731/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StatusPanelComponent", function() { return StatusPanelComponent; });
20732/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FullWidth", function() { return FullWidth; });
20733/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FullWidthLoading", function() { return FullWidthLoading; });
20734/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FullWidthGroup", function() { return FullWidthGroup; });
20735/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FullWidthDetail", function() { return FullWidthDetail; });
20736/**
20737 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
20738 * @version v27.3.0
20739 * @link https://www.ag-grid.com/
20740 * @license MIT
20741 */
20742var DateComponent = {
20743 propertyName: 'dateComponent',
20744 cellRenderer: false
20745};
20746var HeaderComponent = {
20747 propertyName: 'headerComponent',
20748 cellRenderer: false
20749};
20750var HeaderGroupComponent = {
20751 propertyName: 'headerGroupComponent',
20752 cellRenderer: false
20753};
20754var CellRendererComponent = {
20755 propertyName: 'cellRenderer',
20756 cellRenderer: true
20757};
20758var CellEditorComponent = {
20759 propertyName: 'cellEditor',
20760 cellRenderer: false
20761};
20762var InnerRendererComponent = {
20763 propertyName: 'innerRenderer',
20764 cellRenderer: true
20765};
20766var LoadingOverlayComponent = {
20767 propertyName: 'loadingOverlayComponent',
20768 cellRenderer: false
20769};
20770var NoRowsOverlayComponent = {
20771 propertyName: 'noRowsOverlayComponent',
20772 cellRenderer: false
20773};
20774var TooltipComponent = {
20775 propertyName: 'tooltipComponent',
20776 cellRenderer: false
20777};
20778var FilterComponent = {
20779 propertyName: 'filter',
20780 cellRenderer: false
20781};
20782var FloatingFilterComponent = {
20783 propertyName: 'floatingFilterComponent',
20784 cellRenderer: false
20785};
20786var ToolPanelComponent = {
20787 propertyName: 'toolPanel',
20788 cellRenderer: false
20789};
20790var StatusPanelComponent = {
20791 propertyName: 'statusPanel',
20792 cellRenderer: false
20793};
20794var FullWidth = {
20795 propertyName: 'fullWidthCellRenderer',
20796 cellRenderer: true
20797};
20798var FullWidthLoading = {
20799 propertyName: 'loadingCellRenderer',
20800 cellRenderer: true
20801};
20802var FullWidthGroup = {
20803 propertyName: 'groupRowRenderer',
20804 cellRenderer: true
20805};
20806var FullWidthDetail = {
20807 propertyName: 'detailCellRenderer',
20808 cellRenderer: true
20809};
20810
20811
20812
20813
20814/***/ }),
20815/* 104 */
20816/***/ (function(module, __webpack_exports__, __webpack_require__) {
20817
20818"use strict";
20819__webpack_require__.r(__webpack_exports__);
20820/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FloatingFilterMapper", function() { return FloatingFilterMapper; });
20821/**
20822 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
20823 * @version v27.3.0
20824 * @link https://www.ag-grid.com/
20825 * @license MIT
20826 */
20827var FloatingFilterMapper = /** @class */ (function () {
20828 function FloatingFilterMapper() {
20829 }
20830 FloatingFilterMapper.getFloatingFilterType = function (filterType) {
20831 return this.filterToFloatingFilterMapping[filterType];
20832 };
20833 FloatingFilterMapper.filterToFloatingFilterMapping = {
20834 set: 'agSetColumnFloatingFilter',
20835 agSetColumnFilter: 'agSetColumnFloatingFilter',
20836 multi: 'agMultiColumnFloatingFilter',
20837 agMultiColumnFilter: 'agMultiColumnFloatingFilter',
20838 number: 'agNumberColumnFloatingFilter',
20839 agNumberColumnFilter: 'agNumberColumnFloatingFilter',
20840 date: 'agDateColumnFloatingFilter',
20841 agDateColumnFilter: 'agDateColumnFloatingFilter',
20842 text: 'agTextColumnFloatingFilter',
20843 agTextColumnFilter: 'agTextColumnFloatingFilter'
20844 };
20845 return FloatingFilterMapper;
20846}());
20847
20848
20849
20850
20851
20852/***/ }),
20853/* 105 */
20854/***/ (function(module, __webpack_exports__, __webpack_require__) {
20855
20856"use strict";
20857__webpack_require__.r(__webpack_exports__);
20858/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExcelFactoryMode", function() { return ExcelFactoryMode; });
20859/**
20860 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
20861 * @version v27.3.0
20862 * @link https://www.ag-grid.com/
20863 * @license MIT
20864 */
20865// Excel Export
20866var ExcelFactoryMode;
20867(function (ExcelFactoryMode) {
20868 ExcelFactoryMode[ExcelFactoryMode["SINGLE_SHEET"] = 0] = "SINGLE_SHEET";
20869 ExcelFactoryMode[ExcelFactoryMode["MULTI_SHEET"] = 1] = "MULTI_SHEET";
20870})(ExcelFactoryMode || (ExcelFactoryMode = {}));
20871
20872
20873
20874
20875/***/ }),
20876/* 106 */
20877/***/ (function(module, __webpack_exports__, __webpack_require__) {
20878
20879"use strict";
20880__webpack_require__.r(__webpack_exports__);
20881/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragService", function() { return DragService; });
20882/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
20883/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
20884/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
20885/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
20886/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18);
20887/* harmony import */ var _utils_mouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50);
20888/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43);
20889/**
20890 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
20891 * @version v27.3.0
20892 * @link https://www.ag-grid.com/
20893 * @license MIT
20894 */
20895var __extends = (undefined && undefined.__extends) || (function () {
20896 var extendStatics = function (d, b) {
20897 extendStatics = Object.setPrototypeOf ||
20898 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20899 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20900 return extendStatics(d, b);
20901 };
20902 return function (d, b) {
20903 extendStatics(d, b);
20904 function __() { this.constructor = d; }
20905 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20906 };
20907})();
20908var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
20909 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20910 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20911 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
20912 return c > 3 && r && Object.defineProperty(target, key, r), r;
20913};
20914
20915
20916
20917
20918
20919
20920
20921/** Adds drag listening onto an element. In AG Grid this is used twice, first is resizing columns,
20922 * second is moving the columns and column groups around (ie the 'drag' part of Drag and Drop. */
20923var DragService = /** @class */ (function (_super) {
20924 __extends(DragService, _super);
20925 function DragService() {
20926 var _this = _super !== null && _super.apply(this, arguments) || this;
20927 _this.dragEndFunctions = [];
20928 _this.dragSources = [];
20929 return _this;
20930 }
20931 DragService.prototype.init = function () {
20932 this.logger = this.loggerFactory.create('DragService');
20933 };
20934 DragService.prototype.removeAllListeners = function () {
20935 this.dragSources.forEach(this.removeListener.bind(this));
20936 this.dragSources.length = 0;
20937 };
20938 DragService.prototype.removeListener = function (dragSourceAndListener) {
20939 var element = dragSourceAndListener.dragSource.eElement;
20940 var mouseDownListener = dragSourceAndListener.mouseDownListener;
20941 element.removeEventListener('mousedown', mouseDownListener);
20942 // remove touch listener only if it exists
20943 if (dragSourceAndListener.touchEnabled) {
20944 var touchStartListener = dragSourceAndListener.touchStartListener;
20945 element.removeEventListener('touchstart', touchStartListener, { passive: true });
20946 }
20947 };
20948 DragService.prototype.removeDragSource = function (params) {
20949 var dragSourceAndListener = this.dragSources.find(function (item) { return item.dragSource === params; });
20950 if (!dragSourceAndListener) {
20951 return;
20952 }
20953 this.removeListener(dragSourceAndListener);
20954 Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["removeFromArray"])(this.dragSources, dragSourceAndListener);
20955 };
20956 DragService.prototype.isDragging = function () {
20957 return this.dragging;
20958 };
20959 DragService.prototype.addDragSource = function (params, includeTouch) {
20960 var _this = this;
20961 if (includeTouch === void 0) { includeTouch = false; }
20962 var mouseListener = this.onMouseDown.bind(this, params);
20963 params.eElement.addEventListener('mousedown', mouseListener);
20964 var touchListener = null;
20965 var suppressTouch = this.gridOptionsWrapper.isSuppressTouch();
20966 if (includeTouch && !suppressTouch) {
20967 touchListener = function (touchEvent) {
20968 if (touchEvent.cancelable) {
20969 touchEvent.preventDefault();
20970 }
20971 _this.onTouchStart(params, touchEvent);
20972 };
20973 params.eElement.addEventListener('touchstart', touchListener, { passive: true });
20974 }
20975 this.dragSources.push({
20976 dragSource: params,
20977 mouseDownListener: mouseListener,
20978 touchStartListener: touchListener,
20979 touchEnabled: includeTouch
20980 });
20981 };
20982 // gets called whenever mouse down on any drag source
20983 DragService.prototype.onTouchStart = function (params, touchEvent) {
20984 var _this = this;
20985 this.currentDragParams = params;
20986 this.dragging = false;
20987 var touch = touchEvent.touches[0];
20988 this.touchLastTime = touch;
20989 this.touchStart = touch;
20990 var touchMoveEvent = function (e) { return _this.onTouchMove(e, params.eElement); };
20991 var touchEndEvent = function (e) { return _this.onTouchUp(e, params.eElement); };
20992 var documentTouchMove = function (e) { if (e.cancelable) {
20993 e.preventDefault();
20994 } };
20995 var target = params.eElement;
20996 var events = [
20997 // Prevents the page document from moving while we are dragging items around.
20998 // preventDefault needs to be called in the touchmove listener and never inside the
20999 // touchstart, because using touchstart causes the click event to be cancelled on touch devices.
21000 { target: document, type: 'touchmove', listener: documentTouchMove, options: { passive: false } },
21001 { target: target, type: 'touchmove', listener: touchMoveEvent, options: { passive: true } },
21002 { target: target, type: 'touchend', listener: touchEndEvent, options: { passive: true } },
21003 { target: target, type: 'touchcancel', listener: touchEndEvent, options: { passive: true } }
21004 ];
21005 // temporally add these listeners, for the duration of the drag
21006 this.addTemporaryEvents(events);
21007 // see if we want to start dragging straight away
21008 if (params.dragStartPixels === 0) {
21009 this.onCommonMove(touch, this.touchStart, params.eElement);
21010 }
21011 };
21012 // gets called whenever mouse down on any drag source
21013 DragService.prototype.onMouseDown = function (params, mouseEvent) {
21014 var _this = this;
21015 var e = mouseEvent;
21016 if (params.skipMouseEvent && params.skipMouseEvent(mouseEvent)) {
21017 return;
21018 }
21019 // if there are two elements with parent / child relationship, and both are draggable,
21020 // when we drag the child, we should NOT drag the parent. an example of this is row moving
21021 // and range selection - row moving should get preference when use drags the rowDrag component.
21022 if (e._alreadyProcessedByDragService) {
21023 return;
21024 }
21025 e._alreadyProcessedByDragService = true;
21026 // only interested in left button clicks
21027 if (mouseEvent.button !== 0) {
21028 return;
21029 }
21030 this.currentDragParams = params;
21031 this.dragging = false;
21032 this.mouseStartEvent = mouseEvent;
21033 var eDocument = this.gridOptionsWrapper.getDocument();
21034 var mouseMoveEvent = function (event) { return _this.onMouseMove(event, params.eElement); };
21035 var mouseUpEvent = function (event) { return _this.onMouseUp(event, params.eElement); };
21036 var contextEvent = function (event) { return event.preventDefault(); };
21037 var target = eDocument;
21038 var events = [
21039 { target: target, type: 'mousemove', listener: mouseMoveEvent },
21040 { target: target, type: 'mouseup', listener: mouseUpEvent },
21041 { target: target, type: 'contextmenu', listener: contextEvent }
21042 ];
21043 // temporally add these listeners, for the duration of the drag
21044 this.addTemporaryEvents(events);
21045 //see if we want to start dragging straight away
21046 if (params.dragStartPixels === 0) {
21047 this.onMouseMove(mouseEvent, params.eElement);
21048 }
21049 };
21050 DragService.prototype.addTemporaryEvents = function (events) {
21051 events.forEach(function (currentEvent) {
21052 var target = currentEvent.target, type = currentEvent.type, listener = currentEvent.listener, options = currentEvent.options;
21053 target.addEventListener(type, listener, options);
21054 });
21055 this.dragEndFunctions.push(function () {
21056 events.forEach(function (currentEvent) {
21057 var target = currentEvent.target, type = currentEvent.type, listener = currentEvent.listener, options = currentEvent.options;
21058 target.removeEventListener(type, listener, options);
21059 });
21060 });
21061 };
21062 // returns true if the event is close to the original event by X pixels either vertically or horizontally.
21063 // we only start dragging after X pixels so this allows us to know if we should start dragging yet.
21064 DragService.prototype.isEventNearStartEvent = function (currentEvent, startEvent) {
21065 // by default, we wait 4 pixels before starting the drag
21066 var dragStartPixels = this.currentDragParams.dragStartPixels;
21067 var requiredPixelDiff = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(dragStartPixels) ? dragStartPixels : 4;
21068 return Object(_utils_mouse__WEBPACK_IMPORTED_MODULE_5__["areEventsNear"])(currentEvent, startEvent, requiredPixelDiff);
21069 };
21070 DragService.prototype.getFirstActiveTouch = function (touchList) {
21071 for (var i = 0; i < touchList.length; i++) {
21072 if (touchList[i].identifier === this.touchStart.identifier) {
21073 return touchList[i];
21074 }
21075 }
21076 return null;
21077 };
21078 DragService.prototype.onCommonMove = function (currentEvent, startEvent, el) {
21079 if (!this.dragging) {
21080 // if mouse hasn't travelled from the start position enough, do nothing
21081 if (!this.dragging && this.isEventNearStartEvent(currentEvent, startEvent)) {
21082 return;
21083 }
21084 this.dragging = true;
21085 var event_1 = {
21086 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DRAG_STARTED,
21087 api: this.gridApi,
21088 columnApi: this.columnApi,
21089 target: el
21090 };
21091 this.eventService.dispatchEvent(event_1);
21092 this.currentDragParams.onDragStart(startEvent);
21093 // we need ONE drag action at the startEvent, so that we are guaranteed the drop target
21094 // at the start gets notified. this is because the drag can start outside of the element
21095 // that started it, as the mouse is allowed drag away from the mouse down before it's
21096 // considered a drag (the isEventNearStartEvent() above). if we didn't do this, then
21097 // it would be possible to click a column by the edge, then drag outside of the drop zone
21098 // in less than 4 pixels and the drag officially starts outside of the header but the header
21099 // wouldn't be notified of the dragging.
21100 this.currentDragParams.onDragging(startEvent);
21101 }
21102 this.currentDragParams.onDragging(currentEvent);
21103 };
21104 DragService.prototype.onTouchMove = function (touchEvent, el) {
21105 var touch = this.getFirstActiveTouch(touchEvent.touches);
21106 if (!touch) {
21107 return;
21108 }
21109 // this.___statusPanel.setInfoText(Math.random() + ' onTouchMove preventDefault stopPropagation');
21110 this.onCommonMove(touch, this.touchStart, el);
21111 };
21112 // only gets called after a mouse down - as this is only added after mouseDown
21113 // and is removed when mouseUp happens
21114 DragService.prototype.onMouseMove = function (mouseEvent, el) {
21115 // The event type can be `mousedown` when `dragStartPixels=0`
21116 // we should only preventDefault on `mousemove`.
21117 if (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_6__["isBrowserSafari"])() &&
21118 mouseEvent.type === 'mousemove' &&
21119 mouseEvent.cancelable &&
21120 this.mouseEventService.isEventFromThisGrid(mouseEvent) &&
21121 !this.isOverFormFieldElement(mouseEvent)) {
21122 mouseEvent.preventDefault();
21123 }
21124 this.onCommonMove(mouseEvent, this.mouseStartEvent, el);
21125 };
21126 DragService.prototype.isOverFormFieldElement = function (mouseEvent) {
21127 var _a, _b;
21128 var el = mouseEvent.target;
21129 var tagName = (_a = el) === null || _a === void 0 ? void 0 : _a.tagName.toLocaleLowerCase();
21130 return !!((_b = tagName) === null || _b === void 0 ? void 0 : _b.match('^a$|textarea|input|select|button'));
21131 };
21132 DragService.prototype.onTouchUp = function (touchEvent, el) {
21133 var touch = this.getFirstActiveTouch(touchEvent.changedTouches);
21134 // i haven't worked this out yet, but there is no matching touch
21135 // when we get the touch up event. to get around this, we swap in
21136 // the last touch. this is a hack to 'get it working' while we
21137 // figure out what's going on, why we are not getting a touch in
21138 // current event.
21139 if (!touch) {
21140 touch = this.touchLastTime;
21141 }
21142 // if mouse was left up before we started to move, then this is a tap.
21143 // we check this before onUpCommon as onUpCommon resets the dragging
21144 // let tap = !this.dragging;
21145 // let tapTarget = this.currentDragParams.eElement;
21146 this.onUpCommon(touch, el);
21147 // if tap, tell user
21148 // console.log(`${Math.random()} tap = ${tap}`);
21149 // if (tap) {
21150 // tapTarget.click();
21151 // }
21152 };
21153 DragService.prototype.onMouseUp = function (mouseEvent, el) {
21154 this.onUpCommon(mouseEvent, el);
21155 };
21156 DragService.prototype.onUpCommon = function (eventOrTouch, el) {
21157 if (this.dragging) {
21158 this.dragging = false;
21159 this.currentDragParams.onDragStop(eventOrTouch);
21160 var event_2 = {
21161 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DRAG_STOPPED,
21162 api: this.gridApi,
21163 columnApi: this.columnApi,
21164 target: el
21165 };
21166 this.eventService.dispatchEvent(event_2);
21167 }
21168 this.mouseStartEvent = null;
21169 this.touchStart = null;
21170 this.touchLastTime = null;
21171 this.currentDragParams = null;
21172 this.dragEndFunctions.forEach(function (func) { return func(); });
21173 this.dragEndFunctions.length = 0;
21174 };
21175 __decorate([
21176 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('loggerFactory')
21177 ], DragService.prototype, "loggerFactory", void 0);
21178 __decorate([
21179 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
21180 ], DragService.prototype, "columnApi", void 0);
21181 __decorate([
21182 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
21183 ], DragService.prototype, "gridApi", void 0);
21184 __decorate([
21185 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('mouseEventService')
21186 ], DragService.prototype, "mouseEventService", void 0);
21187 __decorate([
21188 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
21189 ], DragService.prototype, "init", null);
21190 __decorate([
21191 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
21192 ], DragService.prototype, "removeAllListeners", null);
21193 DragService = __decorate([
21194 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('dragService')
21195 ], DragService);
21196 return DragService;
21197}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
21198
21199
21200
21201
21202
21203/***/ }),
21204/* 107 */
21205/***/ (function(module, __webpack_exports__, __webpack_require__) {
21206
21207"use strict";
21208__webpack_require__.r(__webpack_exports__);
21209/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterManager", function() { return FilterManager; });
21210/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37);
21211/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
21212/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
21213/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
21214/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17);
21215/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20);
21216/* harmony import */ var _utils_set__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(52);
21217/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
21218/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(13);
21219/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(42);
21220/**
21221 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
21222 * @version v27.3.0
21223 * @link https://www.ag-grid.com/
21224 * @license MIT
21225 */
21226var __extends = (undefined && undefined.__extends) || (function () {
21227 var extendStatics = function (d, b) {
21228 extendStatics = Object.setPrototypeOf ||
21229 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21230 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21231 return extendStatics(d, b);
21232 };
21233 return function (d, b) {
21234 extendStatics(d, b);
21235 function __() { this.constructor = d; }
21236 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21237 };
21238})();
21239var __assign = (undefined && undefined.__assign) || function () {
21240 __assign = Object.assign || function(t) {
21241 for (var s, i = 1, n = arguments.length; i < n; i++) {
21242 s = arguments[i];
21243 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21244 t[p] = s[p];
21245 }
21246 return t;
21247 };
21248 return __assign.apply(this, arguments);
21249};
21250var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
21251 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
21252 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21253 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21254 return c > 3 && r && Object.defineProperty(target, key, r), r;
21255};
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266var FilterManager = /** @class */ (function (_super) {
21267 __extends(FilterManager, _super);
21268 function FilterManager() {
21269 var _this = _super !== null && _super.apply(this, arguments) || this;
21270 _this.allColumnFilters = new Map();
21271 _this.activeAggregateFilters = [];
21272 _this.activeColumnFilters = [];
21273 _this.quickFilter = null;
21274 _this.quickFilterParts = null;
21275 // this is true when the grid is processing the filter change. this is used by the cell comps, so that they
21276 // don't flash when data changes due to filter changes. there is no need to flash when filter changes as the
21277 // user is in control, so doesn't make sense to show flashing changes. for example, go to main demo where
21278 // this feature is turned off (hack code to always return false for isSuppressFlashingCellsBecauseFiltering(), put in)
21279 // 100,000 rows and group by country. then do some filtering. all the cells flash, which is silly.
21280 _this.processingFilterChange = false;
21281 return _this;
21282 }
21283 FilterManager_1 = FilterManager;
21284 FilterManager.prototype.init = function () {
21285 var _this = this;
21286 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_GRID_COLUMNS_CHANGED, function () { return _this.onColumnsChanged(); });
21287 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, function () { return _this.refreshFiltersForAggregations(); });
21288 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_CHANGED, function () { return _this.refreshFiltersForAggregations(); });
21289 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED, function () { return _this.refreshFiltersForAggregations(); });
21290 this.quickFilter = this.parseQuickFilter(this.gridOptionsWrapper.getQuickFilterText());
21291 this.setQuickFilterParts();
21292 this.allowShowChangeAfterFilter = this.gridOptionsWrapper.isAllowShowChangeAfterFilter();
21293 };
21294 FilterManager.prototype.setQuickFilterParts = function () {
21295 this.quickFilterParts = this.quickFilter ? this.quickFilter.split(' ') : null;
21296 };
21297 FilterManager.prototype.setFilterModel = function (model) {
21298 var _this = this;
21299 var allPromises = [];
21300 var previousModel = this.getFilterModel();
21301 if (model) {
21302 // mark the filters as we set them, so any active filters left over we stop
21303 var modelKeys_1 = Object(_utils_set__WEBPACK_IMPORTED_MODULE_6__["convertToSet"])(Object.keys(model));
21304 this.allColumnFilters.forEach(function (filterWrapper, colId) {
21305 var newModel = model[colId];
21306 allPromises.push(_this.setModelOnFilterWrapper(filterWrapper.filterPromise, newModel));
21307 modelKeys_1.delete(colId);
21308 });
21309 // at this point, processedFields contains data for which we don't have a filter working yet
21310 modelKeys_1.forEach(function (colId) {
21311 var column = _this.columnModel.getPrimaryColumn(colId) || _this.columnModel.getGridColumn(colId);
21312 if (!column) {
21313 console.warn('AG Grid: setFilterModel() - no column found for colId: ' + colId);
21314 return;
21315 }
21316 if (!column.isFilterAllowed()) {
21317 console.warn('AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: ' + colId);
21318 return;
21319 }
21320 var filterWrapper = _this.getOrCreateFilterWrapper(column, 'NO_UI');
21321 if (!filterWrapper) {
21322 console.warn('AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: ' + colId);
21323 return;
21324 }
21325 allPromises.push(_this.setModelOnFilterWrapper(filterWrapper.filterPromise, model[colId]));
21326 });
21327 }
21328 else {
21329 this.allColumnFilters.forEach(function (filterWrapper) {
21330 allPromises.push(_this.setModelOnFilterWrapper(filterWrapper.filterPromise, null));
21331 });
21332 }
21333 _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"].all(allPromises).then(function () {
21334 var currentModel = _this.getFilterModel();
21335 var columns = [];
21336 _this.allColumnFilters.forEach(function (filterWrapper, colId) {
21337 var before = previousModel ? previousModel[colId] : null;
21338 var after = currentModel ? currentModel[colId] : null;
21339 if (!_utils__WEBPACK_IMPORTED_MODULE_0__["_"].jsonEquals(before, after)) {
21340 columns.push(filterWrapper.column);
21341 }
21342 });
21343 if (columns.length > 0) {
21344 _this.onFilterChanged({ columns: columns });
21345 }
21346 });
21347 };
21348 FilterManager.prototype.setModelOnFilterWrapper = function (filterPromise, newModel) {
21349 return new _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"](function (resolve) {
21350 filterPromise.then(function (filter) {
21351 if (typeof filter.setModel !== 'function') {
21352 console.warn('AG Grid: filter missing setModel method, which is needed for setFilterModel');
21353 resolve();
21354 }
21355 (filter.setModel(newModel) || _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"].resolve()).then(function () { return resolve(); });
21356 });
21357 });
21358 };
21359 FilterManager.prototype.getFilterModel = function () {
21360 var result = {};
21361 this.allColumnFilters.forEach(function (filterWrapper, key) {
21362 // because user can provide filters, we provide useful error checking and messages
21363 var filterPromise = filterWrapper.filterPromise;
21364 var filter = filterPromise.resolveNow(null, function (promiseFilter) { return promiseFilter; });
21365 if (filter == null) {
21366 return null;
21367 }
21368 if (typeof filter.getModel !== 'function') {
21369 console.warn('AG Grid: filter API missing getModel method, which is needed for getFilterModel');
21370 return;
21371 }
21372 var model = filter.getModel();
21373 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(model)) {
21374 result[key] = model;
21375 }
21376 });
21377 return result;
21378 };
21379 FilterManager.prototype.isColumnFilterPresent = function () {
21380 return this.activeColumnFilters.length > 0;
21381 };
21382 FilterManager.prototype.isAggregateFilterPresent = function () {
21383 return !!this.activeAggregateFilters.length;
21384 };
21385 FilterManager.prototype.doAggregateFiltersPass = function (node, filterToSkip) {
21386 return this.doColumnFiltersPass(node, filterToSkip, true);
21387 };
21388 // called by:
21389 // 1) onFilterChanged()
21390 // 2) onNewRowsLoaded()
21391 FilterManager.prototype.updateActiveFilters = function () {
21392 var _this = this;
21393 this.activeColumnFilters.length = 0;
21394 this.activeAggregateFilters.length = 0;
21395 var isFilterActive = function (filter) {
21396 if (!filter) {
21397 return false;
21398 } // this never happens, including to avoid compile error
21399 if (!filter.isFilterActive) {
21400 console.warn('AG Grid: Filter is missing isFilterActive() method');
21401 return false;
21402 }
21403 return filter.isFilterActive();
21404 };
21405 var groupFilterEnabled = !!this.gridOptionsWrapper.getGroupAggFiltering();
21406 var isAggFilter = function (column) {
21407 var isSecondary = !column.isPrimary();
21408 // the only filters that can appear on secondary columns are groupAgg filters
21409 if (isSecondary) {
21410 return true;
21411 }
21412 var isShowingPrimaryColumns = !_this.columnModel.isPivotActive();
21413 var isValueActive = column.isValueActive();
21414 // primary columns are only ever groupAgg filters if a) value is active and b) showing primary columns
21415 if (!isValueActive || !isShowingPrimaryColumns) {
21416 return false;
21417 }
21418 // from here on we know: isPrimary=true, isValueActive=true, isShowingPrimaryColumns=true
21419 if (_this.columnModel.isPivotMode()) {
21420 // primary column is pretending to be a pivot column, ie pivotMode=true, but we are
21421 // still showing primary columns
21422 return true;
21423 }
21424 else {
21425 // we are not pivoting, so we groupFilter when it's an agg column
21426 return groupFilterEnabled;
21427 }
21428 };
21429 this.allColumnFilters.forEach(function (filterWrapper) {
21430 if (filterWrapper.filterPromise.resolveNow(false, isFilterActive)) {
21431 var filterComp = filterWrapper.filterPromise.resolveNow(null, function (filter) { return filter; });
21432 if (isAggFilter(filterWrapper.column)) {
21433 _this.activeAggregateFilters.push(filterComp);
21434 }
21435 else {
21436 _this.activeColumnFilters.push(filterComp);
21437 }
21438 }
21439 });
21440 };
21441 FilterManager.prototype.updateFilterFlagInColumns = function (source, additionalEventAttributes) {
21442 this.allColumnFilters.forEach(function (filterWrapper) {
21443 var isFilterActive = filterWrapper.filterPromise.resolveNow(false, function (filter) { return filter.isFilterActive(); });
21444 filterWrapper.column.setFilterActive(isFilterActive, source, additionalEventAttributes);
21445 });
21446 };
21447 FilterManager.prototype.isAnyFilterPresent = function () {
21448 return this.isQuickFilterPresent() || this.isColumnFilterPresent() || this.isAggregateFilterPresent() || this.gridOptionsWrapper.isExternalFilterPresent();
21449 };
21450 FilterManager.prototype.doColumnFiltersPass = function (node, filterToSkip, targetAggregates) {
21451 var data = node.data, aggData = node.aggData;
21452 var targetedFilters = targetAggregates ? this.activeAggregateFilters : this.activeColumnFilters;
21453 var targetedData = targetAggregates ? aggData : data;
21454 for (var i = 0; i < targetedFilters.length; i++) {
21455 var filter = targetedFilters[i];
21456 if (filter == null || filter === filterToSkip) {
21457 continue;
21458 }
21459 if (typeof filter.doesFilterPass !== 'function') {
21460 // because users can do custom filters, give nice error message
21461 throw new Error('Filter is missing method doesFilterPass');
21462 }
21463 if (!filter.doesFilterPass({ node: node, data: targetedData })) {
21464 return false;
21465 }
21466 }
21467 return true;
21468 };
21469 FilterManager.prototype.parseQuickFilter = function (newFilter) {
21470 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(newFilter)) {
21471 return null;
21472 }
21473 if (!this.gridOptionsWrapper.isRowModelDefault()) {
21474 console.warn('AG Grid - Quick filtering only works with the Client-Side Row Model');
21475 return null;
21476 }
21477 return newFilter.toUpperCase();
21478 };
21479 FilterManager.prototype.setQuickFilter = function (newFilter) {
21480 if (newFilter != null && typeof newFilter !== 'string') {
21481 console.warn("AG Grid - setQuickFilter() only supports string inputs, received: " + typeof newFilter);
21482 return;
21483 }
21484 var parsedFilter = this.parseQuickFilter(newFilter);
21485 if (this.quickFilter !== parsedFilter) {
21486 this.quickFilter = parsedFilter;
21487 this.setQuickFilterParts();
21488 this.onFilterChanged();
21489 }
21490 };
21491 FilterManager.prototype.refreshFiltersForAggregations = function () {
21492 var isAggFiltering = this.gridOptionsWrapper.getGroupAggFiltering();
21493 if (isAggFiltering) {
21494 this.onFilterChanged();
21495 }
21496 };
21497 // sometimes (especially in React) the filter can call onFilterChanged when we are in the middle
21498 // of a render cycle. this would be bad, so we wait for render cycle to complete when this happens.
21499 // this happens in react when we change React State in the grid (eg setting RowCtrl's in RowContainer)
21500 // which results in React State getting applied in the main application, triggering a useEffect() to
21501 // be kicked off adn then the application calling the grid's API. in AG-6554, the custom filter was
21502 // getting it's useEffect() triggered in this way.
21503 FilterManager.prototype.callOnFilterChangedOutsideRenderCycle = function (params) {
21504 var _this = this;
21505 if (params === void 0) { params = {}; }
21506 var action = function () { return _this.onFilterChanged(params); };
21507 if (this.rowRenderer.isRefreshInProgress()) {
21508 setTimeout(action, 0);
21509 }
21510 else {
21511 action();
21512 }
21513 };
21514 FilterManager.prototype.onFilterChanged = function (params) {
21515 if (params === void 0) { params = {}; }
21516 var filterInstance = params.filterInstance, additionalEventAttributes = params.additionalEventAttributes, columns = params.columns;
21517 this.updateActiveFilters();
21518 this.updateFilterFlagInColumns('filterChanged', additionalEventAttributes);
21519 this.allColumnFilters.forEach(function (filterWrapper) {
21520 if (!filterWrapper.filterPromise) {
21521 return;
21522 }
21523 filterWrapper.filterPromise.then(function (filter) {
21524 if (filter && filter !== filterInstance && filter.onAnyFilterChanged) {
21525 filter.onAnyFilterChanged();
21526 }
21527 });
21528 });
21529 var filterChangedEvent = {
21530 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_FILTER_CHANGED,
21531 api: this.gridApi,
21532 columnApi: this.columnApi,
21533 columns: columns || [],
21534 };
21535 if (additionalEventAttributes) {
21536 Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["mergeDeep"])(filterChangedEvent, additionalEventAttributes);
21537 }
21538 // because internal events are not async in ag-grid, when the dispatchEvent
21539 // method comes back, we know all listeners have finished executing.
21540 this.processingFilterChange = true;
21541 this.eventService.dispatchEvent(filterChangedEvent);
21542 this.processingFilterChange = false;
21543 };
21544 FilterManager.prototype.isSuppressFlashingCellsBecauseFiltering = function () {
21545 // if user has elected to always flash cell changes, then always return false, otherwise we suppress flashing
21546 // changes when filtering
21547 return !this.allowShowChangeAfterFilter && this.processingFilterChange;
21548 };
21549 FilterManager.prototype.isQuickFilterPresent = function () {
21550 return this.quickFilter !== null;
21551 };
21552 FilterManager.prototype.doesRowPassOtherFilters = function (filterToSkip, node) {
21553 return this.doesRowPassFilter({ rowNode: node, filterInstanceToSkip: filterToSkip });
21554 };
21555 FilterManager.prototype.doesRowPassQuickFilterNoCache = function (node, filterPart) {
21556 var _this = this;
21557 var columns = this.columnModel.getAllColumnsForQuickFilter();
21558 return columns.some(function (column) {
21559 var part = _this.getQuickFilterTextForColumn(column, node);
21560 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(part) && part.indexOf(filterPart) >= 0;
21561 });
21562 };
21563 FilterManager.prototype.doesRowPassQuickFilterCache = function (node, filterPart) {
21564 if (!node.quickFilterAggregateText) {
21565 this.aggregateRowForQuickFilter(node);
21566 }
21567 return node.quickFilterAggregateText.indexOf(filterPart) >= 0;
21568 };
21569 FilterManager.prototype.doesRowPassQuickFilter = function (node) {
21570 var _this = this;
21571 var usingCache = this.gridOptionsWrapper.isCacheQuickFilter();
21572 // each part must pass, if any fails, then the whole filter fails
21573 return this.quickFilterParts.every(function (part) {
21574 return usingCache ? _this.doesRowPassQuickFilterCache(node, part) : _this.doesRowPassQuickFilterNoCache(node, part);
21575 });
21576 };
21577 FilterManager.prototype.doesRowPassAggregateFilters = function (params) {
21578 if (this.isAggregateFilterPresent() && !this.doAggregateFiltersPass(params.rowNode, params.filterInstanceToSkip)) {
21579 return false;
21580 }
21581 // got this far, all filters pass
21582 return true;
21583 };
21584 FilterManager.prototype.doesRowPassFilter = function (params) {
21585 // the row must pass ALL of the filters, so if any of them fail,
21586 // we return true. that means if a row passes the quick filter,
21587 // but fails the column filter, it fails overall
21588 // first up, check quick filter
21589 if (this.isQuickFilterPresent() && !this.doesRowPassQuickFilter(params.rowNode)) {
21590 return false;
21591 }
21592 // secondly, give the client a chance to reject this row
21593 if (this.gridOptionsWrapper.isExternalFilterPresent() && !this.gridOptionsWrapper.doesExternalFilterPass(params.rowNode)) {
21594 return false;
21595 }
21596 // lastly, check column filter
21597 if (this.isColumnFilterPresent() && !this.doColumnFiltersPass(params.rowNode, params.filterInstanceToSkip)) {
21598 return false;
21599 }
21600 // got this far, all filters pass
21601 return true;
21602 };
21603 FilterManager.prototype.getQuickFilterTextForColumn = function (column, node) {
21604 var value = this.valueService.getValue(column, node, true);
21605 var colDef = column.getColDef();
21606 if (colDef.getQuickFilterText) {
21607 var params = {
21608 value: value,
21609 node: node,
21610 data: node.data,
21611 column: column,
21612 colDef: colDef,
21613 api: this.gridOptionsWrapper.getApi(),
21614 columnApi: this.gridOptionsWrapper.getColumnApi(),
21615 context: this.gridOptionsWrapper.getContext()
21616 };
21617 value = colDef.getQuickFilterText(params);
21618 }
21619 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(value) ? value.toString().toUpperCase() : null;
21620 };
21621 FilterManager.prototype.aggregateRowForQuickFilter = function (node) {
21622 var _this = this;
21623 var stringParts = [];
21624 var columns = this.columnModel.getAllColumnsForQuickFilter();
21625 columns.forEach(function (column) {
21626 var part = _this.getQuickFilterTextForColumn(column, node);
21627 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(part)) {
21628 stringParts.push(part);
21629 }
21630 });
21631 node.quickFilterAggregateText = stringParts.join(FilterManager_1.QUICK_FILTER_SEPARATOR);
21632 };
21633 FilterManager.prototype.onNewRowsLoaded = function (source) {
21634 this.allColumnFilters.forEach(function (filterWrapper) {
21635 filterWrapper.filterPromise.then(function (filter) {
21636 if (filter.onNewRowsLoaded) {
21637 filter.onNewRowsLoaded();
21638 }
21639 });
21640 });
21641 this.updateFilterFlagInColumns(source);
21642 this.updateActiveFilters();
21643 };
21644 FilterManager.prototype.createValueGetter = function (column) {
21645 var _this = this;
21646 return function (_a) {
21647 var node = _a.node;
21648 return _this.valueService.getValue(column, node, true);
21649 };
21650 };
21651 FilterManager.prototype.getFilterComponent = function (column, source, createIfDoesNotExist) {
21652 if (createIfDoesNotExist === void 0) { createIfDoesNotExist = true; }
21653 var _a;
21654 if (createIfDoesNotExist) {
21655 return ((_a = this.getOrCreateFilterWrapper(column, source)) === null || _a === void 0 ? void 0 : _a.filterPromise) || null;
21656 }
21657 var filterWrapper = this.cachedFilter(column);
21658 return filterWrapper ? filterWrapper.filterPromise : null;
21659 };
21660 FilterManager.prototype.isFilterActive = function (column) {
21661 var filterWrapper = this.cachedFilter(column);
21662 return !!filterWrapper && filterWrapper.filterPromise.resolveNow(false, function (filter) { return filter.isFilterActive(); });
21663 };
21664 FilterManager.prototype.getOrCreateFilterWrapper = function (column, source) {
21665 if (!column.isFilterAllowed()) {
21666 return null;
21667 }
21668 var filterWrapper = this.cachedFilter(column);
21669 if (!filterWrapper) {
21670 filterWrapper = this.createFilterWrapper(column, source);
21671 this.allColumnFilters.set(column.getColId(), filterWrapper);
21672 }
21673 else if (source !== 'NO_UI') {
21674 this.putIntoGui(filterWrapper, source);
21675 }
21676 return filterWrapper;
21677 };
21678 FilterManager.prototype.cachedFilter = function (column) {
21679 return this.allColumnFilters.get(column.getColId());
21680 };
21681 FilterManager.prototype.createFilterInstance = function (column) {
21682 var _this = this;
21683 var defaultFilter = _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].SetFilterModule) ? 'agSetColumnFilter' : 'agTextColumnFilter';
21684 var colDef = column.getColDef();
21685 var filterInstance;
21686 var params = __assign(__assign({}, this.createFilterParams(column, colDef)), { filterModifiedCallback: function () {
21687 var event = {
21688 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_FILTER_MODIFIED,
21689 api: _this.gridApi,
21690 columnApi: _this.columnApi,
21691 column: column,
21692 filterInstance: filterInstance
21693 };
21694 _this.eventService.dispatchEvent(event);
21695 }, filterChangedCallback: function (additionalEventAttributes) {
21696 var params = { filterInstance: filterInstance, additionalEventAttributes: additionalEventAttributes, columns: [column] };
21697 _this.callOnFilterChangedOutsideRenderCycle(params);
21698 }, doesRowPassOtherFilter: function (node) { return _this.doesRowPassOtherFilters(filterInstance, node); } });
21699 var compDetails = this.userComponentFactory.getFilterDetails(colDef, params, defaultFilter);
21700 if (!compDetails) {
21701 return null;
21702 }
21703 var componentPromise = compDetails.newAgStackInstance();
21704 if (componentPromise) {
21705 componentPromise.then(function (r) { return filterInstance = r; });
21706 }
21707 return componentPromise;
21708 };
21709 FilterManager.prototype.createFilterParams = function (column, colDef) {
21710 var params = {
21711 api: this.gridOptionsWrapper.getApi(),
21712 columnApi: this.gridOptionsWrapper.getColumnApi(),
21713 column: column,
21714 colDef: Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["cloneObject"])(colDef),
21715 rowModel: this.rowModel,
21716 filterChangedCallback: function () { },
21717 filterModifiedCallback: function () { },
21718 valueGetter: this.createValueGetter(column),
21719 context: this.gridOptionsWrapper.getContext(),
21720 doesRowPassOtherFilter: function () { return true; },
21721 };
21722 return params;
21723 };
21724 FilterManager.prototype.createFilterWrapper = function (column, source) {
21725 var filterWrapper = {
21726 column: column,
21727 filterPromise: null,
21728 compiledElement: null,
21729 guiPromise: _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"].resolve(null)
21730 };
21731 filterWrapper.filterPromise = this.createFilterInstance(column);
21732 if (filterWrapper.filterPromise) {
21733 this.putIntoGui(filterWrapper, source);
21734 }
21735 return filterWrapper;
21736 };
21737 FilterManager.prototype.putIntoGui = function (filterWrapper, source) {
21738 var _this = this;
21739 var eFilterGui = document.createElement('div');
21740 eFilterGui.className = 'ag-filter';
21741 filterWrapper.guiPromise = new _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"](function (resolve) {
21742 filterWrapper.filterPromise.then(function (filter) {
21743 var guiFromFilter = filter.getGui();
21744 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(guiFromFilter)) {
21745 console.warn("AG Grid: getGui method from filter returned " + guiFromFilter + ", it should be a DOM element or an HTML template string.");
21746 }
21747 // for backwards compatibility with Angular 1 - we
21748 // used to allow providing back HTML from getGui().
21749 // once we move away from supporting Angular 1
21750 // directly, we can change this.
21751 if (typeof guiFromFilter === 'string') {
21752 guiFromFilter = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_9__["loadTemplate"])(guiFromFilter);
21753 }
21754 eFilterGui.appendChild(guiFromFilter);
21755 resolve(eFilterGui);
21756 _this.eventService.dispatchEvent({
21757 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_FILTER_OPENED,
21758 column: filterWrapper.column,
21759 source: source,
21760 eGui: eFilterGui,
21761 api: _this.gridApi,
21762 columnApi: _this.columnApi
21763 });
21764 });
21765 });
21766 };
21767 FilterManager.prototype.onColumnsChanged = function () {
21768 var _this = this;
21769 var columns = [];
21770 this.allColumnFilters.forEach(function (wrapper, colId) {
21771 var currentColumn;
21772 if (wrapper.column.isPrimary()) {
21773 currentColumn = _this.columnModel.getPrimaryColumn(colId);
21774 }
21775 else {
21776 currentColumn = _this.columnModel.getGridColumn(colId);
21777 }
21778 if (currentColumn) {
21779 return;
21780 }
21781 columns.push(wrapper.column);
21782 _this.disposeFilterWrapper(wrapper, 'filterDestroyed');
21783 });
21784 if (columns.length > 0) {
21785 this.onFilterChanged({ columns: columns });
21786 }
21787 };
21788 // destroys the filter, so it not longer takes part
21789 FilterManager.prototype.destroyFilter = function (column, source) {
21790 if (source === void 0) { source = 'api'; }
21791 var filterWrapper = this.allColumnFilters.get(column.getColId());
21792 if (filterWrapper) {
21793 this.disposeFilterWrapper(filterWrapper, source);
21794 this.onFilterChanged({ columns: [column] });
21795 }
21796 };
21797 FilterManager.prototype.disposeFilterWrapper = function (filterWrapper, source) {
21798 var _this = this;
21799 filterWrapper.filterPromise.then(function (filter) {
21800 (filter.setModel(null) || _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"].resolve()).then(function () {
21801 _this.getContext().destroyBean(filter);
21802 filterWrapper.column.setFilterActive(false, source);
21803 _this.allColumnFilters.delete(filterWrapper.column.getColId());
21804 });
21805 });
21806 };
21807 FilterManager.prototype.destroy = function () {
21808 var _this = this;
21809 _super.prototype.destroy.call(this);
21810 this.allColumnFilters.forEach(function (filterWrapper) { return _this.disposeFilterWrapper(filterWrapper, 'filterDestroyed'); });
21811 };
21812 var FilterManager_1;
21813 FilterManager.QUICK_FILTER_SEPARATOR = '\n';
21814 __decorate([
21815 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('valueService')
21816 ], FilterManager.prototype, "valueService", void 0);
21817 __decorate([
21818 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
21819 ], FilterManager.prototype, "columnModel", void 0);
21820 __decorate([
21821 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowModel')
21822 ], FilterManager.prototype, "rowModel", void 0);
21823 __decorate([
21824 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnApi')
21825 ], FilterManager.prototype, "columnApi", void 0);
21826 __decorate([
21827 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridApi')
21828 ], FilterManager.prototype, "gridApi", void 0);
21829 __decorate([
21830 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('userComponentFactory')
21831 ], FilterManager.prototype, "userComponentFactory", void 0);
21832 __decorate([
21833 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowRenderer')
21834 ], FilterManager.prototype, "rowRenderer", void 0);
21835 __decorate([
21836 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
21837 ], FilterManager.prototype, "init", null);
21838 __decorate([
21839 _context_context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
21840 ], FilterManager.prototype, "destroy", null);
21841 FilterManager = FilterManager_1 = __decorate([
21842 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('filterManager')
21843 ], FilterManager);
21844 return FilterManager;
21845}(_context_beanStub__WEBPACK_IMPORTED_MODULE_5__["BeanStub"]));
21846
21847
21848
21849
21850
21851/***/ }),
21852/* 108 */
21853/***/ (function(module, __webpack_exports__, __webpack_require__) {
21854
21855"use strict";
21856__webpack_require__.r(__webpack_exports__);
21857/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellComp", function() { return HeaderFilterCellComp; });
21858/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
21859/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
21860/* harmony import */ var _abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(109);
21861/**
21862 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
21863 * @version v27.3.0
21864 * @link https://www.ag-grid.com/
21865 * @license MIT
21866 */
21867var __extends = (undefined && undefined.__extends) || (function () {
21868 var extendStatics = function (d, b) {
21869 extendStatics = Object.setPrototypeOf ||
21870 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21871 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21872 return extendStatics(d, b);
21873 };
21874 return function (d, b) {
21875 extendStatics(d, b);
21876 function __() { this.constructor = d; }
21877 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21878 };
21879})();
21880var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
21881 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
21882 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21883 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21884 return c > 3 && r && Object.defineProperty(target, key, r), r;
21885};
21886
21887
21888
21889var HeaderFilterCellComp = /** @class */ (function (_super) {
21890 __extends(HeaderFilterCellComp, _super);
21891 function HeaderFilterCellComp(ctrl) {
21892 return _super.call(this, HeaderFilterCellComp.TEMPLATE, ctrl) || this;
21893 }
21894 HeaderFilterCellComp.prototype.postConstruct = function () {
21895 var _this = this;
21896 var eGui = this.getGui();
21897 var compProxy = {
21898 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
21899 addOrRemoveBodyCssClass: function (cssClassName, on) { return _this.eFloatingFilterBody.classList.toggle(cssClassName, on); },
21900 addOrRemoveButtonWrapperCssClass: function (cssClassName, on) { return _this.eButtonWrapper.classList.toggle(cssClassName, on); },
21901 setCompDetails: function (compDetails) { return _this.setCompDetails(compDetails); },
21902 getFloatingFilterComp: function () { return _this.compPromise; },
21903 setWidth: function (width) { return eGui.style.width = width; },
21904 setMenuIcon: function (eIcon) { return _this.eButtonShowMainFilter.appendChild(eIcon); }
21905 };
21906 this.ctrl.setComp(compProxy, eGui, this.eButtonShowMainFilter, this.eFloatingFilterBody);
21907 };
21908 HeaderFilterCellComp.prototype.setCompDetails = function (compDetails) {
21909 var _this = this;
21910 // because we are providing defaultFloatingFilterType, we know it will never be undefined;
21911 this.compPromise = compDetails.newAgStackInstance();
21912 this.compPromise.then(function (comp) { return _this.afterCompCreated(comp); });
21913 };
21914 HeaderFilterCellComp.prototype.afterCompCreated = function (comp) {
21915 var _this = this;
21916 if (!comp) {
21917 return;
21918 }
21919 this.addDestroyFunc(function () { return _this.context.destroyBean(comp); });
21920 if (!this.isAlive()) {
21921 return;
21922 }
21923 this.eFloatingFilterBody.appendChild(comp.getGui());
21924 if (comp.afterGuiAttached) {
21925 comp.afterGuiAttached();
21926 }
21927 };
21928 HeaderFilterCellComp.TEMPLATE = "<div class=\"ag-header-cell ag-floating-filter\" role=\"gridcell\" tabindex=\"-1\">\n <div ref=\"eFloatingFilterBody\" role=\"presentation\"></div>\n <div class=\"ag-floating-filter-button ag-hidden\" ref=\"eButtonWrapper\" role=\"presentation\">\n <button type=\"button\" aria-label=\"Open Filter Menu\" class=\"ag-floating-filter-button-button\" ref=\"eButtonShowMainFilter\" tabindex=\"-1\"></button>\n </div>\n </div>";
21929 __decorate([
21930 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eFloatingFilterBody')
21931 ], HeaderFilterCellComp.prototype, "eFloatingFilterBody", void 0);
21932 __decorate([
21933 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eButtonWrapper')
21934 ], HeaderFilterCellComp.prototype, "eButtonWrapper", void 0);
21935 __decorate([
21936 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eButtonShowMainFilter')
21937 ], HeaderFilterCellComp.prototype, "eButtonShowMainFilter", void 0);
21938 __decorate([
21939 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
21940 ], HeaderFilterCellComp.prototype, "postConstruct", null);
21941 return HeaderFilterCellComp;
21942}(_abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_2__["AbstractHeaderCellComp"]));
21943
21944
21945
21946
21947
21948/***/ }),
21949/* 109 */
21950/***/ (function(module, __webpack_exports__, __webpack_require__) {
21951
21952"use strict";
21953__webpack_require__.r(__webpack_exports__);
21954/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractHeaderCellComp", function() { return AbstractHeaderCellComp; });
21955/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
21956/**
21957 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
21958 * @version v27.3.0
21959 * @link https://www.ag-grid.com/
21960 * @license MIT
21961 */
21962var __extends = (undefined && undefined.__extends) || (function () {
21963 var extendStatics = function (d, b) {
21964 extendStatics = Object.setPrototypeOf ||
21965 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21966 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21967 return extendStatics(d, b);
21968 };
21969 return function (d, b) {
21970 extendStatics(d, b);
21971 function __() { this.constructor = d; }
21972 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21973 };
21974})();
21975
21976var AbstractHeaderCellComp = /** @class */ (function (_super) {
21977 __extends(AbstractHeaderCellComp, _super);
21978 function AbstractHeaderCellComp(template, ctrl) {
21979 var _this = _super.call(this, template) || this;
21980 _this.ctrl = ctrl;
21981 return _this;
21982 }
21983 AbstractHeaderCellComp.prototype.getCtrl = function () {
21984 return this.ctrl;
21985 };
21986 return AbstractHeaderCellComp;
21987}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
21988
21989
21990
21991
21992
21993/***/ }),
21994/* 110 */
21995/***/ (function(module, __webpack_exports__, __webpack_require__) {
21996
21997"use strict";
21998__webpack_require__.r(__webpack_exports__);
21999/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridBodyComp", function() { return GridBodyComp; });
22000/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
22001/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(111);
22002/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44);
22003/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36);
22004/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57);
22005/* harmony import */ var _gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(114);
22006/* harmony import */ var _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(118);
22007/**
22008 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
22009 * @version v27.3.0
22010 * @link https://www.ag-grid.com/
22011 * @license MIT
22012 */
22013var __extends = (undefined && undefined.__extends) || (function () {
22014 var extendStatics = function (d, b) {
22015 extendStatics = Object.setPrototypeOf ||
22016 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22017 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22018 return extendStatics(d, b);
22019 };
22020 return function (d, b) {
22021 extendStatics(d, b);
22022 function __() { this.constructor = d; }
22023 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22024 };
22025})();
22026var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
22027 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22028 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
22029 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22030 return c > 3 && r && Object.defineProperty(target, key, r), r;
22031};
22032
22033
22034
22035
22036
22037
22038
22039var GRID_BODY_TEMPLATE = /* html */ "<div class=\"ag-root ag-unselectable\" role=\"grid\">\n <ag-header-root ref=\"gridHeader\"></ag-header-root>\n <div class=\"ag-floating-top\" ref=\"eTop\" role=\"presentation\">\n <ag-row-container ref=\"topLeftContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].TOP_LEFT + "\"></ag-row-container>\n <ag-row-container ref=\"topCenterContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].TOP_CENTER + "\"></ag-row-container>\n <ag-row-container ref=\"topRightContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].TOP_RIGHT + "\"></ag-row-container>\n <ag-row-container ref=\"topFullWidthContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].TOP_FULL_WIDTH + "\"></ag-row-container>\n </div>\n <div class=\"ag-body-viewport\" ref=\"eBodyViewport\" role=\"presentation\">\n <ag-row-container ref=\"leftContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].LEFT + "\"></ag-row-container>\n <ag-row-container ref=\"centerContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].CENTER + "\"></ag-row-container>\n <ag-row-container ref=\"rightContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].RIGHT + "\"></ag-row-container>\n <ag-row-container ref=\"fullWidthContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].FULL_WIDTH + "\"></ag-row-container>\n </div>\n <div class=\"ag-floating-bottom\" ref=\"eBottom\" role=\"presentation\">\n <ag-row-container ref=\"bottomLeftContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].BOTTOM_LEFT + "\"></ag-row-container>\n <ag-row-container ref=\"bottomCenterContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].BOTTOM_CENTER + "\"></ag-row-container>\n <ag-row-container ref=\"bottomRightContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].BOTTOM_RIGHT + "\"></ag-row-container>\n <ag-row-container ref=\"bottomFullWidthContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].BOTTOM_FULL_WIDTH + "\"></ag-row-container>\n </div>\n <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>\n <ag-overlay-wrapper></ag-overlay-wrapper>\n </div>";
22040var GridBodyComp = /** @class */ (function (_super) {
22041 __extends(GridBodyComp, _super);
22042 function GridBodyComp() {
22043 return _super.call(this, GRID_BODY_TEMPLATE) || this;
22044 }
22045 GridBodyComp.prototype.init = function () {
22046 var _this = this;
22047 var setHeight = function (height, element) {
22048 var heightString = height + "px";
22049 element.style.minHeight = heightString;
22050 element.style.height = heightString;
22051 };
22052 var compProxy = {
22053 setRowAnimationCssOnBodyViewport: function (cssClass, animate) { return _this.setRowAnimationCssOnBodyViewport(cssClass, animate); },
22054 setColumnCount: function (count) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaColCount"])(_this.getGui(), count); },
22055 setRowCount: function (count) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaRowCount"])(_this.getGui(), count); },
22056 setTopHeight: function (height) { return setHeight(height, _this.eTop); },
22057 setBottomHeight: function (height) { return setHeight(height, _this.eBottom); },
22058 setTopDisplay: function (display) { return _this.eTop.style.display = display; },
22059 setBottomDisplay: function (display) { return _this.eBottom.style.display = display; },
22060 setColumnMovingCss: function (cssClass, flag) { return _this.addOrRemoveCssClass(_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__["CSS_CLASS_COLUMN_MOVING"], flag); },
22061 updateLayoutClasses: function (cssClass, params) {
22062 var bodyViewportClassList = _this.eBodyViewport.classList;
22063 bodyViewportClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].AUTO_HEIGHT, params.autoHeight);
22064 bodyViewportClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].NORMAL, params.normal);
22065 bodyViewportClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].PRINT, params.print);
22066 _this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].AUTO_HEIGHT, params.autoHeight);
22067 _this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].NORMAL, params.normal);
22068 _this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].PRINT, params.print);
22069 },
22070 setAlwaysVerticalScrollClass: function (cssClass, on) {
22071 return _this.eBodyViewport.classList.toggle(_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__["CSS_CLASS_FORCE_VERTICAL_SCROLL"], on);
22072 },
22073 registerBodyViewportResizeListener: function (listener) {
22074 var unsubscribeFromResize = _this.resizeObserverService.observeResize(_this.eBodyViewport, listener);
22075 _this.addDestroyFunc(function () { return unsubscribeFromResize(); });
22076 },
22077 setPinnedTopBottomOverflowY: function (overflow) { return _this.eTop.style.overflowY = _this.eBottom.style.overflowY = overflow; },
22078 setCellSelectableCss: function (cssClass, selectable) {
22079 [_this.eTop, _this.eBodyViewport, _this.eBottom]
22080 .forEach(function (ct) { return ct.classList.toggle(_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__["CSS_CLASS_CELL_SELECTABLE"], selectable); });
22081 },
22082 };
22083 this.ctrl = this.createManagedBean(new _gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__["GridBodyCtrl"]());
22084 this.ctrl.setComp(compProxy, this.getGui(), this.eBodyViewport, this.eTop, this.eBottom);
22085 if (this.rangeService || this.gridOptionsWrapper.isRowSelectionMulti()) {
22086 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaMultiSelectable"])(this.getGui(), true);
22087 }
22088 };
22089 GridBodyComp.prototype.setRowAnimationCssOnBodyViewport = function (cssClass, animateRows) {
22090 var bodyViewportClassList = this.eBodyViewport.classList;
22091 bodyViewportClassList.toggle(_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__["RowAnimationCssClasses"].ANIMATION_ON, animateRows);
22092 bodyViewportClassList.toggle(_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__["RowAnimationCssClasses"].ANIMATION_OFF, !animateRows);
22093 };
22094 GridBodyComp.prototype.getFloatingTopBottom = function () {
22095 return [this.eTop, this.eBottom];
22096 };
22097 __decorate([
22098 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('resizeObserverService')
22099 ], GridBodyComp.prototype, "resizeObserverService", void 0);
22100 __decorate([
22101 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('rangeService')
22102 ], GridBodyComp.prototype, "rangeService", void 0);
22103 __decorate([
22104 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eBodyViewport')
22105 ], GridBodyComp.prototype, "eBodyViewport", void 0);
22106 __decorate([
22107 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eTop')
22108 ], GridBodyComp.prototype, "eTop", void 0);
22109 __decorate([
22110 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eBottom')
22111 ], GridBodyComp.prototype, "eBottom", void 0);
22112 __decorate([
22113 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('gridHeader')
22114 ], GridBodyComp.prototype, "headerRootComp", void 0);
22115 __decorate([
22116 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
22117 ], GridBodyComp.prototype, "init", null);
22118 return GridBodyComp;
22119}(_widgets_component__WEBPACK_IMPORTED_MODULE_3__["Component"]));
22120
22121
22122
22123
22124
22125/***/ }),
22126/* 111 */
22127/***/ (function(module, __webpack_exports__, __webpack_require__) {
22128
22129"use strict";
22130__webpack_require__.r(__webpack_exports__);
22131/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LayoutCssClasses", function() { return LayoutCssClasses; });
22132/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LayoutFeature", function() { return LayoutFeature; });
22133/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
22134/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
22135/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(112);
22136/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
22137/**
22138 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
22139 * @version v27.3.0
22140 * @link https://www.ag-grid.com/
22141 * @license MIT
22142 */
22143var __extends = (undefined && undefined.__extends) || (function () {
22144 var extendStatics = function (d, b) {
22145 extendStatics = Object.setPrototypeOf ||
22146 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22147 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22148 return extendStatics(d, b);
22149 };
22150 return function (d, b) {
22151 extendStatics(d, b);
22152 function __() { this.constructor = d; }
22153 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22154 };
22155})();
22156var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
22157 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22158 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
22159 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22160 return c > 3 && r && Object.defineProperty(target, key, r), r;
22161};
22162
22163
22164
22165
22166var LayoutCssClasses;
22167(function (LayoutCssClasses) {
22168 LayoutCssClasses["AUTO_HEIGHT"] = "ag-layout-auto-height";
22169 LayoutCssClasses["NORMAL"] = "ag-layout-normal";
22170 LayoutCssClasses["PRINT"] = "ag-layout-print";
22171})(LayoutCssClasses || (LayoutCssClasses = {}));
22172var LayoutFeature = /** @class */ (function (_super) {
22173 __extends(LayoutFeature, _super);
22174 function LayoutFeature(view) {
22175 var _this = _super.call(this) || this;
22176 _this.view = view;
22177 return _this;
22178 }
22179 LayoutFeature.prototype.postConstruct = function () {
22180 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_2__["GridOptionsWrapper"].PROP_DOM_LAYOUT, this.updateLayoutClasses.bind(this));
22181 this.updateLayoutClasses();
22182 };
22183 LayoutFeature.prototype.updateLayoutClasses = function () {
22184 var domLayout = this.gridOptionsWrapper.getDomLayout();
22185 var params = {
22186 autoHeight: domLayout === _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].DOM_LAYOUT_AUTO_HEIGHT,
22187 normal: domLayout === _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].DOM_LAYOUT_NORMAL,
22188 print: domLayout === _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].DOM_LAYOUT_PRINT
22189 };
22190 var cssClass = params.autoHeight ? LayoutCssClasses.AUTO_HEIGHT :
22191 params.print ? LayoutCssClasses.PRINT : LayoutCssClasses.NORMAL;
22192 this.view.updateLayoutClasses(cssClass, params);
22193 };
22194 __decorate([
22195 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptionsWrapper')
22196 ], LayoutFeature.prototype, "gridOptionsWrapper", void 0);
22197 __decorate([
22198 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
22199 ], LayoutFeature.prototype, "postConstruct", null);
22200 return LayoutFeature;
22201}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
22202
22203
22204
22205
22206
22207/***/ }),
22208/* 112 */
22209/***/ (function(module, __webpack_exports__, __webpack_require__) {
22210
22211"use strict";
22212__webpack_require__.r(__webpack_exports__);
22213/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridOptionsWrapper", function() { return GridOptionsWrapper; });
22214/* harmony import */ var _components_colDefUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33);
22215/* harmony import */ var _components_componentUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30);
22216/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
22217/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
22218/* harmony import */ var _entities_sideBar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(113);
22219/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24);
22220/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11);
22221/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(16);
22222/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17);
22223/* harmony import */ var _propertyKeys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31);
22224/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(43);
22225/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(14);
22226/* harmony import */ var _utils_fuzzyMatch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(47);
22227/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(7);
22228/* harmony import */ var _utils_number__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(46);
22229/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(13);
22230/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(26);
22231/**
22232 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
22233 * @version v27.3.0
22234 * @link https://www.ag-grid.com/
22235 * @license MIT
22236 */
22237var __assign = (undefined && undefined.__assign) || function () {
22238 __assign = Object.assign || function(t) {
22239 for (var s, i = 1, n = arguments.length; i < n; i++) {
22240 s = arguments[i];
22241 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22242 t[p] = s[p];
22243 }
22244 return t;
22245 };
22246 return __assign.apply(this, arguments);
22247};
22248var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
22249 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22250 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
22251 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22252 return c > 3 && r && Object.defineProperty(target, key, r), r;
22253};
22254var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
22255 return function (target, key) { decorator(target, key, paramIndex); }
22256};
22257var __read = (undefined && undefined.__read) || function (o, n) {
22258 var m = typeof Symbol === "function" && o[Symbol.iterator];
22259 if (!m) return o;
22260 var i = m.call(o), r, ar = [], e;
22261 try {
22262 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
22263 }
22264 catch (error) { e = { error: error }; }
22265 finally {
22266 try {
22267 if (r && !r.done && (m = i["return"])) m.call(i);
22268 }
22269 finally { if (e) throw e.error; }
22270 }
22271 return ar;
22272};
22273var __spread = (undefined && undefined.__spread) || function () {
22274 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
22275 return ar;
22276};
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294var DEFAULT_ROW_HEIGHT = 25;
22295var DEFAULT_DETAIL_ROW_HEIGHT = 300;
22296var DEFAULT_VIEWPORT_ROW_MODEL_PAGE_SIZE = 5;
22297var DEFAULT_VIEWPORT_ROW_MODEL_BUFFER_SIZE = 5;
22298var DEFAULT_KEEP_DETAIL_ROW_COUNT = 10;
22299function isTrue(value) {
22300 return value === true || value === 'true';
22301}
22302function toNumber(value) {
22303 if (typeof value == 'number') {
22304 return value;
22305 }
22306 if (typeof value == 'string') {
22307 return parseInt(value, 10);
22308 }
22309}
22310function zeroOrGreater(value, defaultValue) {
22311 if (value >= 0) {
22312 return value;
22313 }
22314 // zero gets returned if number is missing or the wrong type
22315 return defaultValue;
22316}
22317function oneOrGreater(value, defaultValue) {
22318 var valueNumber = parseInt(value, 10);
22319 if (Object(_utils_number__WEBPACK_IMPORTED_MODULE_14__["isNumeric"])(valueNumber) && valueNumber > 0) {
22320 return valueNumber;
22321 }
22322 return defaultValue;
22323}
22324var GridOptionsWrapper = /** @class */ (function () {
22325 function GridOptionsWrapper() {
22326 this.propertyEventService = new _eventService__WEBPACK_IMPORTED_MODULE_6__["EventService"]();
22327 this.domDataKey = '__AG_' + Math.random().toString();
22328 this.destroyed = false;
22329 }
22330 GridOptionsWrapper_1 = GridOptionsWrapper;
22331 GridOptionsWrapper.prototype.agWire = function (gridApi, columnApi) {
22332 this.gridOptions.api = gridApi;
22333 this.gridOptions.columnApi = columnApi;
22334 this.checkForDeprecated();
22335 this.checkForViolations();
22336 };
22337 GridOptionsWrapper.prototype.destroy = function () {
22338 // need to remove these, as we don't own the lifecycle of the gridOptions, we need to
22339 // remove the references in case the user keeps the grid options, we want the rest
22340 // of the grid to be picked up by the garbage collector
22341 this.gridOptions.api = null;
22342 this.gridOptions.columnApi = null;
22343 this.destroyed = true;
22344 };
22345 GridOptionsWrapper.prototype.init = function () {
22346 var _this = this;
22347 if (this.gridOptions.suppressPropertyNamesCheck !== true) {
22348 this.checkGridOptionsProperties();
22349 this.checkColumnDefProperties();
22350 }
22351 // parse side bar options into correct format
22352 if (this.gridOptions.sideBar != null) {
22353 this.gridOptions.sideBar = _entities_sideBar__WEBPACK_IMPORTED_MODULE_4__["SideBarDefParser"].parse(this.gridOptions.sideBar);
22354 }
22355 var async = this.useAsyncEvents();
22356 this.eventService.addGlobalListener(this.globalEventHandler.bind(this), async);
22357 if (this.isGroupSelectsChildren() && this.isSuppressParentsInRowNodes()) {
22358 console.warn("AG Grid: 'groupSelectsChildren' does not work with 'suppressParentsInRowNodes', this selection method needs the part in rowNode to work");
22359 }
22360 if (this.isGroupSelectsChildren()) {
22361 if (!this.isRowSelectionMulti()) {
22362 console.warn("AG Grid: rowSelection must be 'multiple' for groupSelectsChildren to make sense");
22363 }
22364 if (this.isRowModelServerSide()) {
22365 console.warn('AG Grid: group selects children is NOT support for Server Side Row Model. ' +
22366 'This is because the rows are lazy loaded, so selecting a group is not possible as' +
22367 'the grid has no way of knowing what the children are.');
22368 }
22369 }
22370 if (this.isGroupRemoveSingleChildren() && this.isGroupHideOpenParents()) {
22371 console.warn("AG Grid: groupRemoveSingleChildren and groupHideOpenParents do not work with each other, you need to pick one. And don't ask us how to us these together on our support forum either you will get the same answer!");
22372 }
22373 if (this.isRowModelServerSide()) {
22374 var msg = function (prop) { return "AG Grid: '" + prop + "' is not supported on the Server-Side Row Model"; };
22375 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["exists"])(this.gridOptions.groupDefaultExpanded)) {
22376 console.warn(msg('groupDefaultExpanded'));
22377 }
22378 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["exists"])(this.gridOptions.groupDefaultExpanded)) {
22379 console.warn(msg('groupIncludeFooter'));
22380 }
22381 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["exists"])(this.gridOptions.groupDefaultExpanded)) {
22382 console.warn(msg('groupIncludeTotalFooter'));
22383 }
22384 }
22385 if (this.isEnableRangeSelection()) {
22386 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_8__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_7__["ModuleNames"].RangeSelectionModule, 'enableRangeSelection');
22387 }
22388 if (!this.isEnableRangeSelection() && (this.isEnableRangeHandle() || this.isEnableFillHandle())) {
22389 console.warn("AG Grid: 'enableRangeHandle' and 'enableFillHandle' will not work unless 'enableRangeSelection' is set to true");
22390 }
22391 var warnOfDeprecaredIcon = function (name) {
22392 if (_this.gridOptions.icons && _this.gridOptions.icons[name]) {
22393 console.warn("gridOptions.icons." + name + " is no longer supported. For information on how to style checkboxes and radio buttons, see https://www.ag-grid.com/javascript-grid-icons/");
22394 }
22395 };
22396 warnOfDeprecaredIcon('radioButtonOff');
22397 warnOfDeprecaredIcon('radioButtonOn');
22398 warnOfDeprecaredIcon('checkboxChecked');
22399 warnOfDeprecaredIcon('checkboxUnchecked');
22400 warnOfDeprecaredIcon('checkboxIndeterminate');
22401 // sets an initial calculation for the scrollbar width
22402 this.getScrollbarWidth();
22403 };
22404 GridOptionsWrapper.prototype.checkColumnDefProperties = function () {
22405 var _this = this;
22406 if (this.gridOptions.columnDefs == null) {
22407 return;
22408 }
22409 this.gridOptions.columnDefs.forEach(function (colDef) {
22410 var userProperties = Object.getOwnPropertyNames(colDef);
22411 var validProperties = __spread(_components_colDefUtil__WEBPACK_IMPORTED_MODULE_0__["ColDefUtil"].ALL_PROPERTIES, _components_colDefUtil__WEBPACK_IMPORTED_MODULE_0__["ColDefUtil"].FRAMEWORK_PROPERTIES);
22412 _this.checkProperties(userProperties, validProperties, validProperties, 'colDef', 'https://www.ag-grid.com/javascript-grid-column-properties/');
22413 });
22414 };
22415 GridOptionsWrapper.prototype.checkGridOptionsProperties = function () {
22416 var userProperties = Object.getOwnPropertyNames(this.gridOptions);
22417 var validProperties = __spread(_propertyKeys__WEBPACK_IMPORTED_MODULE_9__["PropertyKeys"].ALL_PROPERTIES, _propertyKeys__WEBPACK_IMPORTED_MODULE_9__["PropertyKeys"].FRAMEWORK_PROPERTIES, Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["values"])(_eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"]).map(function (event) { return _components_componentUtil__WEBPACK_IMPORTED_MODULE_1__["ComponentUtil"].getCallbackForEvent(event); }));
22418 var validPropertiesAndExceptions = __spread(validProperties, ['api', 'columnApi']);
22419 this.checkProperties(userProperties, validPropertiesAndExceptions, validProperties, 'gridOptions', 'https://www.ag-grid.com/javascript-data-grid/grid-options/');
22420 };
22421 GridOptionsWrapper.prototype.checkProperties = function (userProperties, validPropertiesAndExceptions, validProperties, containerName, docsUrl) {
22422 var invalidProperties = Object(_utils_fuzzyMatch__WEBPACK_IMPORTED_MODULE_12__["fuzzyCheckStrings"])(userProperties, validPropertiesAndExceptions, validProperties);
22423 Object(_utils_object__WEBPACK_IMPORTED_MODULE_15__["iterateObject"])(invalidProperties, function (key, value) {
22424 console.warn("ag-grid: invalid " + containerName + " property '" + key + "' did you mean any of these: " + value.slice(0, 8).join(", "));
22425 });
22426 if (Object.keys(invalidProperties).length > 0) {
22427 console.warn("ag-grid: to see all the valid " + containerName + " properties please check: " + docsUrl);
22428 }
22429 };
22430 /**
22431 * Wrap the user callback and attach the api, columnApi and context to the params object on the way through.
22432 * @param callback User provided callback
22433 * @returns Wrapped callback where the params object not require api, columnApi and context
22434 */
22435 GridOptionsWrapper.prototype.mergeGridCommonParams = function (callback) {
22436 var _this = this;
22437 if (callback) {
22438 var wrapped = function (callbackParams) {
22439 var mergedParams = __assign(__assign({}, callbackParams), { api: _this.getApi(), columnApi: _this.getColumnApi(), context: _this.getContext() });
22440 return callback(mergedParams);
22441 };
22442 return wrapped;
22443 }
22444 return callback;
22445 };
22446 GridOptionsWrapper.prototype.getDomDataKey = function () {
22447 return this.domDataKey;
22448 };
22449 // returns the dom data, or undefined if not found
22450 GridOptionsWrapper.prototype.getDomData = function (element, key) {
22451 var domData = element[this.getDomDataKey()];
22452 return domData ? domData[key] : undefined;
22453 };
22454 GridOptionsWrapper.prototype.setDomData = function (element, key, value) {
22455 var domDataKey = this.getDomDataKey();
22456 var domData = element[domDataKey];
22457 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["missing"])(domData)) {
22458 domData = {};
22459 element[domDataKey] = domData;
22460 }
22461 domData[key] = value;
22462 };
22463 GridOptionsWrapper.prototype.isRowSelection = function () {
22464 return this.gridOptions.rowSelection === 'single' || this.gridOptions.rowSelection === 'multiple';
22465 };
22466 GridOptionsWrapper.prototype.isSuppressRowDeselection = function () {
22467 return isTrue(this.gridOptions.suppressRowDeselection);
22468 };
22469 GridOptionsWrapper.prototype.isRowSelectionMulti = function () {
22470 return this.gridOptions.rowSelection === 'multiple';
22471 };
22472 GridOptionsWrapper.prototype.isRowMultiSelectWithClick = function () {
22473 return isTrue(this.gridOptions.rowMultiSelectWithClick);
22474 };
22475 GridOptionsWrapper.prototype.getContext = function () {
22476 return this.gridOptions.context;
22477 };
22478 GridOptionsWrapper.prototype.isPivotMode = function () {
22479 return isTrue(this.gridOptions.pivotMode);
22480 };
22481 GridOptionsWrapper.prototype.isSuppressExpandablePivotGroups = function () {
22482 return isTrue(this.gridOptions.suppressExpandablePivotGroups);
22483 };
22484 GridOptionsWrapper.prototype.getPivotColumnGroupTotals = function () {
22485 return this.gridOptions.pivotColumnGroupTotals;
22486 };
22487 GridOptionsWrapper.prototype.getPivotRowTotals = function () {
22488 return this.gridOptions.pivotRowTotals;
22489 };
22490 GridOptionsWrapper.prototype.isRowModelInfinite = function () {
22491 return this.gridOptions.rowModelType === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].ROW_MODEL_TYPE_INFINITE;
22492 };
22493 GridOptionsWrapper.prototype.isRowModelViewport = function () {
22494 return this.gridOptions.rowModelType === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].ROW_MODEL_TYPE_VIEWPORT;
22495 };
22496 GridOptionsWrapper.prototype.isRowModelServerSide = function () {
22497 return this.gridOptions.rowModelType === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].ROW_MODEL_TYPE_SERVER_SIDE;
22498 };
22499 GridOptionsWrapper.prototype.isRowModelDefault = function () {
22500 return (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["missing"])(this.gridOptions.rowModelType) ||
22501 this.gridOptions.rowModelType === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE);
22502 };
22503 GridOptionsWrapper.prototype.isFullRowEdit = function () {
22504 return this.gridOptions.editType === 'fullRow';
22505 };
22506 GridOptionsWrapper.prototype.isSuppressFocusAfterRefresh = function () {
22507 return isTrue(this.gridOptions.suppressFocusAfterRefresh);
22508 };
22509 GridOptionsWrapper.prototype.isSuppressBrowserResizeObserver = function () {
22510 return isTrue(this.gridOptions.suppressBrowserResizeObserver);
22511 };
22512 GridOptionsWrapper.prototype.isSuppressMaintainUnsortedOrder = function () {
22513 return isTrue(this.gridOptions.suppressMaintainUnsortedOrder);
22514 };
22515 GridOptionsWrapper.prototype.isSuppressClearOnFillReduction = function () {
22516 return isTrue(this.gridOptions.suppressClearOnFillReduction);
22517 };
22518 GridOptionsWrapper.prototype.isShowToolPanel = function () {
22519 return isTrue(this.gridOptions.sideBar && Array.isArray(this.getSideBar().toolPanels));
22520 };
22521 GridOptionsWrapper.prototype.getSideBar = function () {
22522 return this.gridOptions.sideBar;
22523 };
22524 GridOptionsWrapper.prototype.isSuppressTouch = function () {
22525 return isTrue(this.gridOptions.suppressTouch);
22526 };
22527 GridOptionsWrapper.prototype.isMaintainColumnOrder = function () {
22528 return isTrue(this.gridOptions.maintainColumnOrder);
22529 };
22530 GridOptionsWrapper.prototype.isSuppressRowTransform = function () {
22531 return isTrue(this.gridOptions.suppressRowTransform);
22532 };
22533 GridOptionsWrapper.prototype.isSuppressColumnStateEvents = function () {
22534 return isTrue(this.gridOptions.suppressColumnStateEvents);
22535 };
22536 GridOptionsWrapper.prototype.isAllowDragFromColumnsToolPanel = function () {
22537 return isTrue(this.gridOptions.allowDragFromColumnsToolPanel);
22538 };
22539 GridOptionsWrapper.prototype.useAsyncEvents = function () {
22540 return !isTrue(this.gridOptions.suppressAsyncEvents);
22541 };
22542 GridOptionsWrapper.prototype.isEnableCellChangeFlash = function () {
22543 return isTrue(this.gridOptions.enableCellChangeFlash);
22544 };
22545 GridOptionsWrapper.prototype.getCellFlashDelay = function () {
22546 return this.gridOptions.cellFlashDelay || 500;
22547 };
22548 GridOptionsWrapper.prototype.getCellFadeDelay = function () {
22549 return this.gridOptions.cellFadeDelay || 1000;
22550 };
22551 GridOptionsWrapper.prototype.isGroupSelectsChildren = function () {
22552 return isTrue(this.gridOptions.groupSelectsChildren);
22553 };
22554 GridOptionsWrapper.prototype.isSuppressRowHoverHighlight = function () {
22555 return isTrue(this.gridOptions.suppressRowHoverHighlight);
22556 };
22557 GridOptionsWrapper.prototype.isColumnHoverHighlight = function () {
22558 return isTrue(this.gridOptions.columnHoverHighlight);
22559 };
22560 GridOptionsWrapper.prototype.isGroupSelectsFiltered = function () {
22561 return isTrue(this.gridOptions.groupSelectsFiltered);
22562 };
22563 GridOptionsWrapper.prototype.isGroupHideOpenParents = function () {
22564 return isTrue(this.gridOptions.groupHideOpenParents);
22565 };
22566 GridOptionsWrapper.prototype.isGroupMaintainOrder = function () {
22567 return isTrue(this.gridOptions.groupMaintainOrder);
22568 };
22569 GridOptionsWrapper.prototype.getAutoGroupColumnDef = function () {
22570 return this.gridOptions.autoGroupColumnDef;
22571 };
22572 GridOptionsWrapper.prototype.isGroupMultiAutoColumn = function () {
22573 if (this.gridOptions.groupDisplayType) {
22574 return this.matchesGroupDisplayType('multipleColumns', this.gridOptions.groupDisplayType);
22575 }
22576 // if we are doing hideOpenParents we also show multiple columns, otherwise hideOpenParents would not work
22577 return isTrue(this.gridOptions.groupHideOpenParents);
22578 };
22579 GridOptionsWrapper.prototype.isGroupUseEntireRow = function (pivotMode) {
22580 // we never allow groupUseEntireRow if in pivot mode, otherwise we won't see the pivot values.
22581 if (pivotMode) {
22582 return false;
22583 }
22584 return this.gridOptions.groupDisplayType ?
22585 this.matchesGroupDisplayType('groupRows', this.gridOptions.groupDisplayType) : false;
22586 };
22587 GridOptionsWrapper.prototype.isGroupSuppressAutoColumn = function () {
22588 var isCustomRowGroups = this.gridOptions.groupDisplayType ?
22589 this.matchesGroupDisplayType('custom', this.gridOptions.groupDisplayType) : false;
22590 if (isCustomRowGroups) {
22591 return true;
22592 }
22593 return this.gridOptions.treeDataDisplayType ?
22594 this.matchesTreeDataDisplayType('custom', this.gridOptions.treeDataDisplayType) : false;
22595 };
22596 GridOptionsWrapper.prototype.isGroupRemoveSingleChildren = function () {
22597 return isTrue(this.gridOptions.groupRemoveSingleChildren);
22598 };
22599 GridOptionsWrapper.prototype.isGroupRemoveLowestSingleChildren = function () {
22600 return isTrue(this.gridOptions.groupRemoveLowestSingleChildren);
22601 };
22602 GridOptionsWrapper.prototype.isGroupIncludeFooter = function () {
22603 return isTrue(this.gridOptions.groupIncludeFooter);
22604 };
22605 GridOptionsWrapper.prototype.isGroupIncludeTotalFooter = function () {
22606 return isTrue(this.gridOptions.groupIncludeTotalFooter);
22607 };
22608 GridOptionsWrapper.prototype.isGroupSuppressBlankHeader = function () {
22609 return isTrue(this.gridOptions.groupSuppressBlankHeader);
22610 };
22611 GridOptionsWrapper.prototype.isSuppressRowClickSelection = function () {
22612 return isTrue(this.gridOptions.suppressRowClickSelection);
22613 };
22614 GridOptionsWrapper.prototype.isSuppressCellFocus = function () {
22615 return isTrue(this.gridOptions.suppressCellFocus);
22616 };
22617 GridOptionsWrapper.prototype.isSuppressMultiSort = function () {
22618 return isTrue(this.gridOptions.suppressMultiSort);
22619 };
22620 GridOptionsWrapper.prototype.isAlwaysMultiSort = function () {
22621 return isTrue(this.gridOptions.alwaysMultiSort);
22622 };
22623 GridOptionsWrapper.prototype.isMultiSortKeyCtrl = function () {
22624 return this.gridOptions.multiSortKey === 'ctrl';
22625 };
22626 GridOptionsWrapper.prototype.isPivotSuppressAutoColumn = function () {
22627 return isTrue(this.gridOptions.pivotSuppressAutoColumn);
22628 };
22629 GridOptionsWrapper.prototype.isSuppressDragLeaveHidesColumns = function () {
22630 return isTrue(this.gridOptions.suppressDragLeaveHidesColumns);
22631 };
22632 GridOptionsWrapper.prototype.isSuppressScrollOnNewData = function () {
22633 return isTrue(this.gridOptions.suppressScrollOnNewData);
22634 };
22635 GridOptionsWrapper.prototype.isSuppressScrollWhenPopupsAreOpen = function () {
22636 return isTrue(this.gridOptions.suppressScrollWhenPopupsAreOpen);
22637 };
22638 GridOptionsWrapper.prototype.isRowDragEntireRow = function () {
22639 return isTrue(this.gridOptions.rowDragEntireRow);
22640 };
22641 GridOptionsWrapper.prototype.isSuppressRowDrag = function () {
22642 return isTrue(this.gridOptions.suppressRowDrag);
22643 };
22644 GridOptionsWrapper.prototype.isRowDragManaged = function () {
22645 return isTrue(this.gridOptions.rowDragManaged);
22646 };
22647 GridOptionsWrapper.prototype.isSuppressMoveWhenRowDragging = function () {
22648 return isTrue(this.gridOptions.suppressMoveWhenRowDragging);
22649 };
22650 GridOptionsWrapper.prototype.isRowDragMultiRow = function () {
22651 return isTrue(this.gridOptions.rowDragMultiRow);
22652 };
22653 // returns either 'print', 'autoHeight' or 'normal' (normal is the default)
22654 GridOptionsWrapper.prototype.getDomLayout = function () {
22655 var domLayout = this.gridOptions.domLayout || _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].DOM_LAYOUT_NORMAL;
22656 var validLayouts = [
22657 _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].DOM_LAYOUT_PRINT,
22658 _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].DOM_LAYOUT_AUTO_HEIGHT,
22659 _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].DOM_LAYOUT_NORMAL
22660 ];
22661 if (validLayouts.indexOf(domLayout) === -1) {
22662 Object(_utils_function__WEBPACK_IMPORTED_MODULE_11__["doOnce"])(function () {
22663 return console.warn("AG Grid: " + domLayout + " is not valid for DOM Layout, valid values are " + _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].DOM_LAYOUT_NORMAL + ", " + _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].DOM_LAYOUT_AUTO_HEIGHT + " and " + _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].DOM_LAYOUT_PRINT);
22664 }, 'warn about dom layout values');
22665 return _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].DOM_LAYOUT_NORMAL;
22666 }
22667 return domLayout;
22668 };
22669 GridOptionsWrapper.prototype.isSuppressHorizontalScroll = function () {
22670 return isTrue(this.gridOptions.suppressHorizontalScroll);
22671 };
22672 GridOptionsWrapper.prototype.isSuppressMaxRenderedRowRestriction = function () {
22673 return isTrue(this.gridOptions.suppressMaxRenderedRowRestriction);
22674 };
22675 GridOptionsWrapper.prototype.isExcludeChildrenWhenTreeDataFiltering = function () {
22676 return isTrue(this.gridOptions.excludeChildrenWhenTreeDataFiltering);
22677 };
22678 GridOptionsWrapper.prototype.isAlwaysShowHorizontalScroll = function () {
22679 return isTrue(this.gridOptions.alwaysShowHorizontalScroll);
22680 };
22681 GridOptionsWrapper.prototype.isAlwaysShowVerticalScroll = function () {
22682 return isTrue(this.gridOptions.alwaysShowVerticalScroll);
22683 };
22684 GridOptionsWrapper.prototype.isDebounceVerticalScrollbar = function () {
22685 return isTrue(this.gridOptions.debounceVerticalScrollbar);
22686 };
22687 GridOptionsWrapper.prototype.isSuppressLoadingOverlay = function () {
22688 return isTrue(this.gridOptions.suppressLoadingOverlay);
22689 };
22690 GridOptionsWrapper.prototype.isSuppressNoRowsOverlay = function () {
22691 return isTrue(this.gridOptions.suppressNoRowsOverlay);
22692 };
22693 GridOptionsWrapper.prototype.isSuppressFieldDotNotation = function () {
22694 return isTrue(this.gridOptions.suppressFieldDotNotation);
22695 };
22696 GridOptionsWrapper.prototype.getPinnedTopRowData = function () {
22697 return this.gridOptions.pinnedTopRowData;
22698 };
22699 GridOptionsWrapper.prototype.getPinnedBottomRowData = function () {
22700 return this.gridOptions.pinnedBottomRowData;
22701 };
22702 GridOptionsWrapper.prototype.isFunctionsPassive = function () {
22703 return isTrue(this.gridOptions.functionsPassive);
22704 };
22705 GridOptionsWrapper.prototype.isSuppressChangeDetection = function () {
22706 return isTrue(this.gridOptions.suppressChangeDetection);
22707 };
22708 GridOptionsWrapper.prototype.isSuppressAnimationFrame = function () {
22709 return isTrue(this.gridOptions.suppressAnimationFrame);
22710 };
22711 GridOptionsWrapper.prototype.getQuickFilterText = function () {
22712 return this.gridOptions.quickFilterText;
22713 };
22714 GridOptionsWrapper.prototype.isCacheQuickFilter = function () {
22715 return isTrue(this.gridOptions.cacheQuickFilter);
22716 };
22717 GridOptionsWrapper.prototype.isUnSortIcon = function () {
22718 return isTrue(this.gridOptions.unSortIcon);
22719 };
22720 GridOptionsWrapper.prototype.isSuppressMenuHide = function () {
22721 return isTrue(this.gridOptions.suppressMenuHide);
22722 };
22723 GridOptionsWrapper.prototype.isEnterMovesDownAfterEdit = function () {
22724 return isTrue(this.gridOptions.enterMovesDownAfterEdit);
22725 };
22726 GridOptionsWrapper.prototype.isEnterMovesDown = function () {
22727 return isTrue(this.gridOptions.enterMovesDown);
22728 };
22729 GridOptionsWrapper.prototype.isUndoRedoCellEditing = function () {
22730 return isTrue(this.gridOptions.undoRedoCellEditing);
22731 };
22732 GridOptionsWrapper.prototype.getUndoRedoCellEditingLimit = function () {
22733 return toNumber(this.gridOptions.undoRedoCellEditingLimit);
22734 };
22735 GridOptionsWrapper.prototype.getRowStyle = function () {
22736 return this.gridOptions.rowStyle;
22737 };
22738 GridOptionsWrapper.prototype.getRowClass = function () {
22739 return this.gridOptions.rowClass;
22740 };
22741 GridOptionsWrapper.prototype.getRowStyleFunc = function () {
22742 return this.mergeGridCommonParams(this.gridOptions.getRowStyle);
22743 };
22744 GridOptionsWrapper.prototype.getRowClassFunc = function () {
22745 return this.mergeGridCommonParams(this.gridOptions.getRowClass);
22746 };
22747 GridOptionsWrapper.prototype.rowClassRules = function () {
22748 return this.gridOptions.rowClassRules;
22749 };
22750 GridOptionsWrapper.prototype.getServerSideStoreType = function () {
22751 return this.gridOptions.serverSideStoreType;
22752 };
22753 GridOptionsWrapper.prototype.getServerSideStoreParamsFunc = function () {
22754 return this.mergeGridCommonParams(this.gridOptions.getServerSideStoreParams);
22755 };
22756 GridOptionsWrapper.prototype.getCreateChartContainerFunc = function () {
22757 return this.mergeGridCommonParams(this.gridOptions.createChartContainer);
22758 };
22759 GridOptionsWrapper.prototype.getPopupParent = function () {
22760 return this.gridOptions.popupParent;
22761 };
22762 GridOptionsWrapper.prototype.getBlockLoadDebounceMillis = function () {
22763 return this.gridOptions.blockLoadDebounceMillis;
22764 };
22765 GridOptionsWrapper.prototype.getPostProcessPopupFunc = function () {
22766 return this.mergeGridCommonParams(this.gridOptions.postProcessPopup);
22767 };
22768 GridOptionsWrapper.prototype.getPaginationNumberFormatterFunc = function () {
22769 return this.mergeGridCommonParams(this.gridOptions.paginationNumberFormatter);
22770 };
22771 GridOptionsWrapper.prototype.getChildCountFunc = function () {
22772 return this.gridOptions.getChildCount;
22773 };
22774 GridOptionsWrapper.prototype.getIsApplyServerSideTransactionFunc = function () {
22775 return this.mergeGridCommonParams(this.gridOptions.isApplyServerSideTransaction);
22776 };
22777 GridOptionsWrapper.prototype.getInitialGroupOrderComparator = function () {
22778 var _a = this.gridOptions, initialGroupOrderComparator = _a.initialGroupOrderComparator, defaultGroupOrderComparator = _a.defaultGroupOrderComparator;
22779 if (initialGroupOrderComparator) {
22780 return this.mergeGridCommonParams(initialGroupOrderComparator);
22781 }
22782 // this is the deprecated way, so provide a proxy to make it compatible
22783 if (defaultGroupOrderComparator) {
22784 return function (params) { return defaultGroupOrderComparator(params.nodeA, params.nodeB); };
22785 }
22786 };
22787 GridOptionsWrapper.prototype.getIsFullWidthCellFunc = function () {
22788 var _a = this.gridOptions, isFullWidthRow = _a.isFullWidthRow, isFullWidthCell = _a.isFullWidthCell;
22789 if (isFullWidthRow) {
22790 return this.mergeGridCommonParams(isFullWidthRow);
22791 }
22792 // this is the deprecated way, so provide a proxy to make it compatible
22793 if (isFullWidthCell) {
22794 return function (params) { return isFullWidthCell(params.rowNode); };
22795 }
22796 };
22797 GridOptionsWrapper.prototype.getFullWidthCellRendererParams = function () {
22798 return this.gridOptions.fullWidthCellRendererParams;
22799 };
22800 GridOptionsWrapper.prototype.isEmbedFullWidthRows = function () {
22801 return isTrue(this.gridOptions.embedFullWidthRows) || isTrue(this.gridOptions.deprecatedEmbedFullWidthRows);
22802 };
22803 GridOptionsWrapper.prototype.isDetailRowAutoHeight = function () {
22804 return isTrue(this.gridOptions.detailRowAutoHeight);
22805 };
22806 GridOptionsWrapper.prototype.getSuppressKeyboardEventFunc = function () {
22807 return this.gridOptions.suppressKeyboardEvent;
22808 };
22809 GridOptionsWrapper.prototype.getBusinessKeyForNodeFunc = function () {
22810 return this.gridOptions.getBusinessKeyForNode;
22811 };
22812 GridOptionsWrapper.prototype.getApi = function () {
22813 return this.gridOptions.api;
22814 };
22815 GridOptionsWrapper.prototype.getColumnApi = function () {
22816 return this.gridOptions.columnApi;
22817 };
22818 GridOptionsWrapper.prototype.isReadOnlyEdit = function () {
22819 return isTrue(this.gridOptions.readOnlyEdit);
22820 ;
22821 };
22822 GridOptionsWrapper.prototype.isImmutableData = function () {
22823 // we used to have a property immutableData for this. however this was deprecated
22824 // in favour of having Immutable Data on by default when getRowId is provided
22825 var getRowIdProvided = this.gridOptions.getRowId != null;
22826 var immutableData = isTrue(this.gridOptions.immutableData);
22827 // this property is a backwards compatibility property, for those who want
22828 // the old behaviour of Row ID's but NOT Immutable Data.
22829 var resetRowDataOnUpdate = isTrue(this.gridOptions.resetRowDataOnUpdate);
22830 if (resetRowDataOnUpdate) {
22831 return false;
22832 }
22833 return getRowIdProvided || immutableData;
22834 };
22835 GridOptionsWrapper.prototype.isEnsureDomOrder = function () {
22836 return isTrue(this.gridOptions.ensureDomOrder);
22837 };
22838 GridOptionsWrapper.prototype.isEnableCharts = function () {
22839 if (isTrue(this.gridOptions.enableCharts)) {
22840 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_8__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_7__["ModuleNames"].GridChartsModule, 'enableCharts');
22841 }
22842 return false;
22843 };
22844 GridOptionsWrapper.prototype.getColResizeDefault = function () {
22845 return this.gridOptions.colResizeDefault;
22846 };
22847 GridOptionsWrapper.prototype.isSingleClickEdit = function () {
22848 return isTrue(this.gridOptions.singleClickEdit);
22849 };
22850 GridOptionsWrapper.prototype.isSuppressClickEdit = function () {
22851 return isTrue(this.gridOptions.suppressClickEdit);
22852 };
22853 GridOptionsWrapper.prototype.isStopEditingWhenCellsLoseFocus = function () {
22854 return isTrue(this.gridOptions.stopEditingWhenCellsLoseFocus);
22855 };
22856 GridOptionsWrapper.prototype.getGroupDefaultExpanded = function () {
22857 return this.gridOptions.groupDefaultExpanded;
22858 };
22859 GridOptionsWrapper.prototype.getMaxConcurrentDatasourceRequests = function () {
22860 var res = toNumber(this.gridOptions.maxConcurrentDatasourceRequests);
22861 if (res == null) {
22862 return 2;
22863 } // 2 is the default
22864 if (res <= 0) {
22865 return;
22866 } // negative number, eg -1, means no max restriction
22867 return res;
22868 };
22869 GridOptionsWrapper.prototype.getMaxBlocksInCache = function () {
22870 return this.gridOptions.maxBlocksInCache;
22871 };
22872 GridOptionsWrapper.prototype.getCacheOverflowSize = function () {
22873 return this.gridOptions.cacheOverflowSize;
22874 };
22875 GridOptionsWrapper.prototype.getPaginationPageSize = function () {
22876 return toNumber(this.gridOptions.paginationPageSize);
22877 };
22878 GridOptionsWrapper.prototype.isPaginateChildRows = function () {
22879 var shouldPaginate = this.isGroupRemoveSingleChildren() || this.isGroupRemoveLowestSingleChildren();
22880 if (shouldPaginate) {
22881 return true;
22882 }
22883 return isTrue(this.gridOptions.paginateChildRows);
22884 };
22885 GridOptionsWrapper.prototype.getCacheBlockSize = function () {
22886 return oneOrGreater(this.gridOptions.cacheBlockSize);
22887 };
22888 GridOptionsWrapper.prototype.getInfiniteInitialRowCount = function () {
22889 return this.gridOptions.infiniteInitialRowCount;
22890 };
22891 GridOptionsWrapper.prototype.isPurgeClosedRowNodes = function () {
22892 return isTrue(this.gridOptions.purgeClosedRowNodes);
22893 };
22894 GridOptionsWrapper.prototype.isSuppressPaginationPanel = function () {
22895 return isTrue(this.gridOptions.suppressPaginationPanel);
22896 };
22897 GridOptionsWrapper.prototype.getRowData = function () {
22898 return this.gridOptions.rowData;
22899 };
22900 GridOptionsWrapper.prototype.isEnableRtl = function () {
22901 return isTrue(this.gridOptions.enableRtl);
22902 };
22903 GridOptionsWrapper.prototype.getRowGroupPanelShow = function () {
22904 return this.gridOptions.rowGroupPanelShow;
22905 };
22906 GridOptionsWrapper.prototype.getPivotPanelShow = function () {
22907 return this.gridOptions.pivotPanelShow;
22908 };
22909 GridOptionsWrapper.prototype.isAngularCompileRows = function () {
22910 return isTrue(this.gridOptions.angularCompileRows);
22911 };
22912 GridOptionsWrapper.prototype.isAngularCompileFilters = function () {
22913 return isTrue(this.gridOptions.angularCompileFilters);
22914 };
22915 GridOptionsWrapper.prototype.isDebug = function () {
22916 return isTrue(this.gridOptions.debug);
22917 };
22918 GridOptionsWrapper.prototype.getColumnDefs = function () {
22919 return this.gridOptions.columnDefs;
22920 };
22921 GridOptionsWrapper.prototype.getColumnTypes = function () {
22922 return this.gridOptions.columnTypes;
22923 };
22924 GridOptionsWrapper.prototype.getDatasource = function () {
22925 return this.gridOptions.datasource;
22926 };
22927 GridOptionsWrapper.prototype.getViewportDatasource = function () {
22928 return this.gridOptions.viewportDatasource;
22929 };
22930 GridOptionsWrapper.prototype.getServerSideDatasource = function () {
22931 return this.gridOptions.serverSideDatasource;
22932 };
22933 GridOptionsWrapper.prototype.isAccentedSort = function () {
22934 return isTrue(this.gridOptions.accentedSort);
22935 };
22936 GridOptionsWrapper.prototype.isEnableBrowserTooltips = function () {
22937 return isTrue(this.gridOptions.enableBrowserTooltips);
22938 };
22939 GridOptionsWrapper.prototype.isEnableCellExpressions = function () {
22940 return isTrue(this.gridOptions.enableCellExpressions);
22941 };
22942 GridOptionsWrapper.prototype.isEnableGroupEdit = function () {
22943 return isTrue(this.gridOptions.enableGroupEdit);
22944 };
22945 GridOptionsWrapper.prototype.isSuppressMiddleClickScrolls = function () {
22946 return isTrue(this.gridOptions.suppressMiddleClickScrolls);
22947 };
22948 GridOptionsWrapper.prototype.isPreventDefaultOnContextMenu = function () {
22949 return isTrue(this.gridOptions.preventDefaultOnContextMenu);
22950 };
22951 GridOptionsWrapper.prototype.isSuppressPreventDefaultOnMouseWheel = function () {
22952 return isTrue(this.gridOptions.suppressPreventDefaultOnMouseWheel);
22953 };
22954 GridOptionsWrapper.prototype.isSuppressColumnVirtualisation = function () {
22955 return isTrue(this.gridOptions.suppressColumnVirtualisation);
22956 };
22957 GridOptionsWrapper.prototype.isSuppressRowVirtualisation = function () {
22958 return isTrue(this.gridOptions.suppressRowVirtualisation);
22959 };
22960 GridOptionsWrapper.prototype.isSuppressContextMenu = function () {
22961 return isTrue(this.gridOptions.suppressContextMenu);
22962 };
22963 GridOptionsWrapper.prototype.isAllowContextMenuWithControlKey = function () {
22964 return isTrue(this.gridOptions.allowContextMenuWithControlKey);
22965 };
22966 GridOptionsWrapper.prototype.isSuppressCopyRowsToClipboard = function () {
22967 return isTrue(this.gridOptions.suppressCopyRowsToClipboard);
22968 };
22969 GridOptionsWrapper.prototype.isSuppressCopySingleCellRanges = function () {
22970 return isTrue(this.gridOptions.suppressCopySingleCellRanges);
22971 };
22972 GridOptionsWrapper.prototype.isCopyHeadersToClipboard = function () {
22973 return isTrue(this.gridOptions.copyHeadersToClipboard);
22974 };
22975 GridOptionsWrapper.prototype.isCopyGroupHeadersToClipboard = function () {
22976 return isTrue(this.gridOptions.copyGroupHeadersToClipboard);
22977 };
22978 GridOptionsWrapper.prototype.isSuppressClipboardPaste = function () {
22979 return isTrue(this.gridOptions.suppressClipboardPaste);
22980 };
22981 GridOptionsWrapper.prototype.isSuppressLastEmptyLineOnPaste = function () {
22982 return isTrue(this.gridOptions.suppressLastEmptyLineOnPaste);
22983 };
22984 GridOptionsWrapper.prototype.isPagination = function () {
22985 return isTrue(this.gridOptions.pagination);
22986 };
22987 GridOptionsWrapper.prototype.isSuppressEnterpriseResetOnNewColumns = function () {
22988 return isTrue(this.gridOptions.suppressEnterpriseResetOnNewColumns);
22989 };
22990 GridOptionsWrapper.prototype.getProcessDataFromClipboardFunc = function () {
22991 return this.mergeGridCommonParams(this.gridOptions.processDataFromClipboard);
22992 };
22993 GridOptionsWrapper.prototype.getAsyncTransactionWaitMillis = function () {
22994 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["exists"])(this.gridOptions.asyncTransactionWaitMillis) ? this.gridOptions.asyncTransactionWaitMillis : _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].BATCH_WAIT_MILLIS;
22995 };
22996 GridOptionsWrapper.prototype.isSuppressMovableColumns = function () {
22997 return isTrue(this.gridOptions.suppressMovableColumns);
22998 };
22999 GridOptionsWrapper.prototype.isAnimateRows = function () {
23000 // never allow animating if enforcing the row order
23001 if (this.isEnsureDomOrder()) {
23002 return false;
23003 }
23004 return isTrue(this.gridOptions.animateRows);
23005 };
23006 GridOptionsWrapper.prototype.isSuppressColumnMoveAnimation = function () {
23007 return isTrue(this.gridOptions.suppressColumnMoveAnimation);
23008 };
23009 GridOptionsWrapper.prototype.isSuppressAggFuncInHeader = function () {
23010 return isTrue(this.gridOptions.suppressAggFuncInHeader);
23011 };
23012 GridOptionsWrapper.prototype.isSuppressAggAtRootLevel = function () {
23013 return isTrue(this.gridOptions.suppressAggAtRootLevel);
23014 };
23015 GridOptionsWrapper.prototype.isSuppressAggFilteredOnly = function () {
23016 var isGroupAggFiltering = this.getGroupAggFiltering() !== undefined;
23017 return isGroupAggFiltering || isTrue(this.gridOptions.suppressAggFilteredOnly);
23018 };
23019 GridOptionsWrapper.prototype.isRemovePivotHeaderRowWhenSingleValueColumn = function () {
23020 return isTrue(this.gridOptions.removePivotHeaderRowWhenSingleValueColumn);
23021 };
23022 GridOptionsWrapper.prototype.isShowOpenedGroup = function () {
23023 return isTrue(this.gridOptions.showOpenedGroup);
23024 };
23025 GridOptionsWrapper.prototype.isReactUi = function () {
23026 return isTrue(this.gridOptions.reactUi);
23027 };
23028 GridOptionsWrapper.prototype.isSuppressReactUi = function () {
23029 return isTrue(this.gridOptions.suppressReactUi);
23030 };
23031 GridOptionsWrapper.prototype.isEnableRangeSelection = function () {
23032 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_8__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_7__["ModuleNames"].RangeSelectionModule) && isTrue(this.gridOptions.enableRangeSelection);
23033 };
23034 GridOptionsWrapper.prototype.isEnableRangeHandle = function () {
23035 return isTrue(this.gridOptions.enableRangeHandle);
23036 };
23037 GridOptionsWrapper.prototype.isEnableFillHandle = function () {
23038 return isTrue(this.gridOptions.enableFillHandle);
23039 };
23040 GridOptionsWrapper.prototype.getFillHandleDirection = function () {
23041 var direction = this.gridOptions.fillHandleDirection;
23042 if (!direction) {
23043 return 'xy';
23044 }
23045 if (direction !== 'x' && direction !== 'y' && direction !== 'xy') {
23046 Object(_utils_function__WEBPACK_IMPORTED_MODULE_11__["doOnce"])(function () { return console.warn("AG Grid: valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'."); }, 'warn invalid fill direction');
23047 return 'xy';
23048 }
23049 return direction;
23050 };
23051 GridOptionsWrapper.prototype.getFillOperation = function () {
23052 return this.mergeGridCommonParams(this.gridOptions.fillOperation);
23053 };
23054 GridOptionsWrapper.prototype.isSuppressMultiRangeSelection = function () {
23055 return isTrue(this.gridOptions.suppressMultiRangeSelection);
23056 };
23057 GridOptionsWrapper.prototype.isPaginationAutoPageSize = function () {
23058 return isTrue(this.gridOptions.paginationAutoPageSize);
23059 };
23060 GridOptionsWrapper.prototype.isRememberGroupStateWhenNewData = function () {
23061 return isTrue(this.gridOptions.rememberGroupStateWhenNewData);
23062 };
23063 GridOptionsWrapper.prototype.getIcons = function () {
23064 return this.gridOptions.icons;
23065 };
23066 GridOptionsWrapper.prototype.getGroupAggFiltering = function () {
23067 var userValue = this.gridOptions.groupAggFiltering;
23068 if (typeof userValue === 'function') {
23069 return this.mergeGridCommonParams(userValue);
23070 }
23071 if (isTrue(userValue)) {
23072 return function () { return true; };
23073 }
23074 return undefined;
23075 };
23076 GridOptionsWrapper.prototype.getAggFuncs = function () {
23077 return this.gridOptions.aggFuncs;
23078 };
23079 GridOptionsWrapper.prototype.getSortingOrder = function () {
23080 return this.gridOptions.sortingOrder;
23081 };
23082 GridOptionsWrapper.prototype.getAlignedGrids = function () {
23083 return this.gridOptions.alignedGrids;
23084 };
23085 GridOptionsWrapper.prototype.isMasterDetail = function () {
23086 var masterDetail = isTrue(this.gridOptions.masterDetail);
23087 if (masterDetail) {
23088 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_8__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_7__["ModuleNames"].MasterDetailModule, 'masterDetail');
23089 }
23090 else {
23091 return false;
23092 }
23093 };
23094 GridOptionsWrapper.prototype.isKeepDetailRows = function () {
23095 return isTrue(this.gridOptions.keepDetailRows);
23096 };
23097 GridOptionsWrapper.prototype.getKeepDetailRowsCount = function () {
23098 var keepDetailRowsCount = this.gridOptions.keepDetailRowsCount;
23099 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["exists"])(keepDetailRowsCount) && keepDetailRowsCount > 0) {
23100 return this.gridOptions.keepDetailRowsCount;
23101 }
23102 return DEFAULT_KEEP_DETAIL_ROW_COUNT;
23103 };
23104 GridOptionsWrapper.prototype.getIsRowMasterFunc = function () {
23105 return this.gridOptions.isRowMaster;
23106 };
23107 GridOptionsWrapper.prototype.getIsRowSelectableFunc = function () {
23108 return this.gridOptions.isRowSelectable;
23109 };
23110 GridOptionsWrapper.prototype.getGroupRowRendererParams = function () {
23111 return this.gridOptions.groupRowRendererParams;
23112 };
23113 GridOptionsWrapper.prototype.getOverlayLoadingTemplate = function () {
23114 return this.gridOptions.overlayLoadingTemplate;
23115 };
23116 GridOptionsWrapper.prototype.getOverlayNoRowsTemplate = function () {
23117 return this.gridOptions.overlayNoRowsTemplate;
23118 };
23119 GridOptionsWrapper.prototype.isSuppressAutoSize = function () {
23120 return isTrue(this.gridOptions.suppressAutoSize);
23121 };
23122 GridOptionsWrapper.prototype.isEnableCellTextSelection = function () {
23123 return isTrue(this.gridOptions.enableCellTextSelection);
23124 };
23125 GridOptionsWrapper.prototype.isSuppressParentsInRowNodes = function () {
23126 return isTrue(this.gridOptions.suppressParentsInRowNodes);
23127 };
23128 GridOptionsWrapper.prototype.isSuppressClipboardApi = function () {
23129 return isTrue(this.gridOptions.suppressClipboardApi);
23130 };
23131 GridOptionsWrapper.prototype.isFunctionsReadOnly = function () {
23132 return isTrue(this.gridOptions.functionsReadOnly);
23133 };
23134 GridOptionsWrapper.prototype.isEnableCellTextSelect = function () {
23135 return isTrue(this.gridOptions.enableCellTextSelection);
23136 };
23137 GridOptionsWrapper.prototype.getDefaultColDef = function () {
23138 return this.gridOptions.defaultColDef;
23139 };
23140 GridOptionsWrapper.prototype.getDefaultColGroupDef = function () {
23141 return this.gridOptions.defaultColGroupDef;
23142 };
23143 GridOptionsWrapper.prototype.getDefaultExportParams = function (type) {
23144 if (this.gridOptions.defaultExportParams) {
23145 console.warn("AG Grid: Since v25.2 `defaultExportParams` has been replaced by `default" + Object(_utils_string__WEBPACK_IMPORTED_MODULE_16__["capitalise"])(type) + "ExportParams`'");
23146 if (type === 'csv') {
23147 return this.gridOptions.defaultExportParams;
23148 }
23149 return this.gridOptions.defaultExportParams;
23150 }
23151 if (type === 'csv' && this.gridOptions.defaultCsvExportParams) {
23152 return this.gridOptions.defaultCsvExportParams;
23153 }
23154 if (type === 'excel' && this.gridOptions.defaultExcelExportParams) {
23155 return this.gridOptions.defaultExcelExportParams;
23156 }
23157 };
23158 GridOptionsWrapper.prototype.isSuppressCsvExport = function () {
23159 return isTrue(this.gridOptions.suppressCsvExport);
23160 };
23161 GridOptionsWrapper.prototype.isAllowShowChangeAfterFilter = function () {
23162 return isTrue(this.gridOptions.allowShowChangeAfterFilter);
23163 };
23164 GridOptionsWrapper.prototype.isSuppressExcelExport = function () {
23165 return isTrue(this.gridOptions.suppressExcelExport);
23166 };
23167 GridOptionsWrapper.prototype.isSuppressMakeColumnVisibleAfterUnGroup = function () {
23168 return isTrue(this.gridOptions.suppressMakeColumnVisibleAfterUnGroup);
23169 };
23170 GridOptionsWrapper.prototype.getDataPathFunc = function () {
23171 return this.gridOptions.getDataPath;
23172 };
23173 GridOptionsWrapper.prototype.getIsServerSideGroupFunc = function () {
23174 return this.gridOptions.isServerSideGroup;
23175 };
23176 GridOptionsWrapper.prototype.getIsServerSideGroupOpenByDefaultFunc = function () {
23177 return this.mergeGridCommonParams(this.gridOptions.isServerSideGroupOpenByDefault);
23178 };
23179 GridOptionsWrapper.prototype.getIsGroupOpenByDefaultFunc = function () {
23180 return this.mergeGridCommonParams(this.gridOptions.isGroupOpenByDefault);
23181 };
23182 GridOptionsWrapper.prototype.getServerSideGroupKeyFunc = function () {
23183 return this.gridOptions.getServerSideGroupKey;
23184 };
23185 GridOptionsWrapper.prototype.getGroupRowAggFunc = function () {
23186 var _a = this.gridOptions, getGroupRowAgg = _a.getGroupRowAgg, groupRowAggNodes = _a.groupRowAggNodes;
23187 if (getGroupRowAgg) {
23188 return this.mergeGridCommonParams(getGroupRowAgg);
23189 }
23190 // this is the deprecated way, so provide a proxy to make it compatible
23191 if (groupRowAggNodes) {
23192 return function (params) { return groupRowAggNodes(params.nodes); };
23193 }
23194 };
23195 GridOptionsWrapper.prototype.getContextMenuItemsFunc = function () {
23196 return this.mergeGridCommonParams(this.gridOptions.getContextMenuItems);
23197 };
23198 GridOptionsWrapper.prototype.getMainMenuItemsFunc = function () {
23199 return this.mergeGridCommonParams(this.gridOptions.getMainMenuItems);
23200 };
23201 GridOptionsWrapper.prototype.getRowIdFunc = function () {
23202 var _a = this.gridOptions, getRowId = _a.getRowId, getRowNodeId = _a.getRowNodeId;
23203 if (getRowId) {
23204 return this.mergeGridCommonParams(getRowId);
23205 }
23206 // this is the deprecated way, so provide a proxy to make it compatible
23207 if (getRowNodeId) {
23208 return function (params) { return getRowNodeId(params.data); };
23209 }
23210 };
23211 GridOptionsWrapper.prototype.getNavigateToNextHeaderFunc = function () {
23212 return this.mergeGridCommonParams(this.gridOptions.navigateToNextHeader);
23213 };
23214 GridOptionsWrapper.prototype.getTabToNextHeaderFunc = function () {
23215 return this.mergeGridCommonParams(this.gridOptions.tabToNextHeader);
23216 };
23217 GridOptionsWrapper.prototype.getNavigateToNextCellFunc = function () {
23218 return this.mergeGridCommonParams(this.gridOptions.navigateToNextCell);
23219 };
23220 GridOptionsWrapper.prototype.getTabToNextCellFunc = function () {
23221 return this.mergeGridCommonParams(this.gridOptions.tabToNextCell);
23222 };
23223 GridOptionsWrapper.prototype.getGridTabIndex = function () {
23224 return (this.gridOptions.tabIndex || 0).toString();
23225 };
23226 GridOptionsWrapper.prototype.isTreeData = function () {
23227 var usingTreeData = isTrue(this.gridOptions.treeData);
23228 if (usingTreeData) {
23229 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_8__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_7__["ModuleNames"].RowGroupingModule, 'Tree Data');
23230 }
23231 return false;
23232 };
23233 GridOptionsWrapper.prototype.isValueCache = function () {
23234 return isTrue(this.gridOptions.valueCache);
23235 };
23236 GridOptionsWrapper.prototype.isValueCacheNeverExpires = function () {
23237 return isTrue(this.gridOptions.valueCacheNeverExpires);
23238 };
23239 GridOptionsWrapper.prototype.isDeltaSort = function () {
23240 return isTrue(this.gridOptions.deltaSort);
23241 };
23242 GridOptionsWrapper.prototype.isAggregateOnlyChangedColumns = function () {
23243 return isTrue(this.gridOptions.aggregateOnlyChangedColumns);
23244 };
23245 GridOptionsWrapper.prototype.getProcessSecondaryColDefFunc = function () {
23246 return this.gridOptions.processSecondaryColDef;
23247 };
23248 GridOptionsWrapper.prototype.getProcessSecondaryColGroupDefFunc = function () {
23249 return this.gridOptions.processSecondaryColGroupDef;
23250 };
23251 GridOptionsWrapper.prototype.getSendToClipboardFunc = function () {
23252 return this.mergeGridCommonParams(this.gridOptions.sendToClipboard);
23253 };
23254 GridOptionsWrapper.prototype.getProcessRowPostCreateFunc = function () {
23255 return this.mergeGridCommonParams(this.gridOptions.processRowPostCreate);
23256 };
23257 GridOptionsWrapper.prototype.getProcessCellForClipboardFunc = function () {
23258 return this.mergeGridCommonParams(this.gridOptions.processCellForClipboard);
23259 };
23260 GridOptionsWrapper.prototype.getProcessHeaderForClipboardFunc = function () {
23261 return this.mergeGridCommonParams(this.gridOptions.processHeaderForClipboard);
23262 };
23263 GridOptionsWrapper.prototype.getProcessGroupHeaderForClipboardFunc = function () {
23264 return this.mergeGridCommonParams(this.gridOptions.processGroupHeaderForClipboard);
23265 };
23266 GridOptionsWrapper.prototype.getProcessCellFromClipboardFunc = function () {
23267 return this.mergeGridCommonParams(this.gridOptions.processCellFromClipboard);
23268 };
23269 GridOptionsWrapper.prototype.getViewportRowModelPageSize = function () {
23270 return oneOrGreater(this.gridOptions.viewportRowModelPageSize, DEFAULT_VIEWPORT_ROW_MODEL_PAGE_SIZE);
23271 };
23272 GridOptionsWrapper.prototype.getViewportRowModelBufferSize = function () {
23273 return zeroOrGreater(this.gridOptions.viewportRowModelBufferSize, DEFAULT_VIEWPORT_ROW_MODEL_BUFFER_SIZE);
23274 };
23275 GridOptionsWrapper.prototype.isServerSideSortingAlwaysResets = function () {
23276 return isTrue(this.gridOptions.serverSideSortingAlwaysResets);
23277 };
23278 GridOptionsWrapper.prototype.isServerSideFilteringAlwaysResets = function () {
23279 return isTrue(this.gridOptions.serverSideFilteringAlwaysResets);
23280 };
23281 GridOptionsWrapper.prototype.getPostSortFunc = function () {
23282 var _a = this.gridOptions, postSortRows = _a.postSortRows, postSort = _a.postSort;
23283 if (postSortRows) {
23284 return this.mergeGridCommonParams(postSortRows);
23285 }
23286 // this is the deprecated way, so provide a proxy to make it compatible
23287 if (postSort) {
23288 return function (params) { return postSort(params.nodes); };
23289 }
23290 };
23291 GridOptionsWrapper.prototype.getChartToolbarItemsFunc = function () {
23292 return this.mergeGridCommonParams(this.gridOptions.getChartToolbarItems);
23293 };
23294 GridOptionsWrapper.prototype.getChartThemeOverrides = function () {
23295 return this.gridOptions.chartThemeOverrides;
23296 };
23297 GridOptionsWrapper.prototype.getCustomChartThemes = function () {
23298 return this.gridOptions.customChartThemes;
23299 };
23300 GridOptionsWrapper.prototype.getChartThemes = function () {
23301 // return default themes if user hasn't supplied any
23302 return this.gridOptions.chartThemes || ['ag-default', 'ag-material', 'ag-pastel', 'ag-vivid', 'ag-solar'];
23303 };
23304 GridOptionsWrapper.prototype.getClipboardDelimiter = function () {
23305 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["exists"])(this.gridOptions.clipboardDelimiter) ? this.gridOptions.clipboardDelimiter : '\t';
23306 };
23307 GridOptionsWrapper.prototype.setProperty = function (key, value, force) {
23308 if (force === void 0) { force = false; }
23309 var gridOptionsNoType = this.gridOptions;
23310 var previousValue = gridOptionsNoType[key];
23311 if (force || previousValue !== value) {
23312 gridOptionsNoType[key] = value;
23313 var event_1 = {
23314 type: key,
23315 currentValue: value,
23316 previousValue: previousValue
23317 };
23318 this.propertyEventService.dispatchEvent(event_1);
23319 }
23320 };
23321 GridOptionsWrapper.prototype.addEventListener = function (key, listener) {
23322 this.propertyEventService.addEventListener(key, listener);
23323 };
23324 GridOptionsWrapper.prototype.removeEventListener = function (key, listener) {
23325 this.propertyEventService.removeEventListener(key, listener);
23326 };
23327 GridOptionsWrapper.prototype.isSkipHeaderOnAutoSize = function () {
23328 return !!this.gridOptions.skipHeaderOnAutoSize;
23329 };
23330 GridOptionsWrapper.prototype.getAutoSizePadding = function () {
23331 var value = this.gridOptions.autoSizePadding;
23332 return value != null && value >= 0 ? value : 20;
23333 };
23334 // properties
23335 GridOptionsWrapper.prototype.getHeaderHeight = function () {
23336 if (typeof this.gridOptions.headerHeight === 'number') {
23337 return this.gridOptions.headerHeight;
23338 }
23339 return this.getFromTheme(25, 'headerHeight');
23340 };
23341 GridOptionsWrapper.prototype.getFloatingFiltersHeight = function () {
23342 if (typeof this.gridOptions.floatingFiltersHeight === 'number') {
23343 return this.gridOptions.floatingFiltersHeight;
23344 }
23345 return this.getFromTheme(25, 'headerHeight');
23346 };
23347 GridOptionsWrapper.prototype.getGroupHeaderHeight = function () {
23348 if (typeof this.gridOptions.groupHeaderHeight === 'number') {
23349 return this.gridOptions.groupHeaderHeight;
23350 }
23351 return this.getHeaderHeight();
23352 };
23353 GridOptionsWrapper.prototype.getPivotHeaderHeight = function () {
23354 if (typeof this.gridOptions.pivotHeaderHeight === 'number') {
23355 return this.gridOptions.pivotHeaderHeight;
23356 }
23357 return this.getHeaderHeight();
23358 };
23359 GridOptionsWrapper.prototype.getPivotGroupHeaderHeight = function () {
23360 if (typeof this.gridOptions.pivotGroupHeaderHeight === 'number') {
23361 return this.gridOptions.pivotGroupHeaderHeight;
23362 }
23363 return this.getGroupHeaderHeight();
23364 };
23365 GridOptionsWrapper.prototype.isExternalFilterPresent = function () {
23366 if (typeof this.gridOptions.isExternalFilterPresent === 'function') {
23367 return this.gridOptions.isExternalFilterPresent({ api: this.getApi(), columnApi: this.getColumnApi(), context: this.getContext() });
23368 }
23369 return false;
23370 };
23371 GridOptionsWrapper.prototype.doesExternalFilterPass = function (node) {
23372 if (typeof this.gridOptions.doesExternalFilterPass === 'function') {
23373 return this.gridOptions.doesExternalFilterPass(node);
23374 }
23375 return false;
23376 };
23377 GridOptionsWrapper.prototype.getTooltipDelay = function (type) {
23378 var _a = this.gridOptions, tooltipShowDelay = _a.tooltipShowDelay, tooltipHideDelay = _a.tooltipHideDelay;
23379 var delay = type === 'show' ? tooltipShowDelay : tooltipHideDelay;
23380 var capitalisedType = Object(_utils_string__WEBPACK_IMPORTED_MODULE_16__["capitalise"])(type);
23381 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["exists"])(delay)) {
23382 if (delay < 0) {
23383 Object(_utils_function__WEBPACK_IMPORTED_MODULE_11__["doOnce"])(function () { return console.warn("ag-grid: tooltip" + capitalisedType + "Delay should not be lower than 0"); }, "tooltip" + capitalisedType + "DelayWarn");
23384 }
23385 return Math.max(200, delay);
23386 }
23387 return null;
23388 };
23389 GridOptionsWrapper.prototype.isTooltipMouseTrack = function () {
23390 return isTrue(this.gridOptions.tooltipMouseTrack);
23391 };
23392 GridOptionsWrapper.prototype.isSuppressModelUpdateAfterUpdateTransaction = function () {
23393 return isTrue(this.gridOptions.suppressModelUpdateAfterUpdateTransaction);
23394 };
23395 GridOptionsWrapper.prototype.getDocument = function () {
23396 // if user is providing document, we use the users one,
23397 // otherwise we use the document on the global namespace.
23398 var result = null;
23399 if (this.gridOptions.getDocument && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["exists"])(this.gridOptions.getDocument)) {
23400 result = this.gridOptions.getDocument();
23401 }
23402 else if (this.eGridDiv) {
23403 result = this.eGridDiv.ownerDocument;
23404 }
23405 if (result && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["exists"])(result)) {
23406 return result;
23407 }
23408 return document;
23409 };
23410 GridOptionsWrapper.prototype.getMinColWidth = function () {
23411 var minColWidth = this.gridOptions.minColWidth;
23412 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["exists"])(minColWidth) && minColWidth > GridOptionsWrapper_1.MIN_COL_WIDTH) {
23413 return this.gridOptions.minColWidth;
23414 }
23415 var measuredMin = this.getFromTheme(null, 'headerCellMinWidth');
23416 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["exists"])(measuredMin) ? Math.max(measuredMin, GridOptionsWrapper_1.MIN_COL_WIDTH) : GridOptionsWrapper_1.MIN_COL_WIDTH;
23417 };
23418 GridOptionsWrapper.prototype.getMaxColWidth = function () {
23419 if (this.gridOptions.maxColWidth && this.gridOptions.maxColWidth > GridOptionsWrapper_1.MIN_COL_WIDTH) {
23420 return this.gridOptions.maxColWidth;
23421 }
23422 return null;
23423 };
23424 GridOptionsWrapper.prototype.getColWidth = function () {
23425 if (typeof this.gridOptions.colWidth !== 'number' || this.gridOptions.colWidth < GridOptionsWrapper_1.MIN_COL_WIDTH) {
23426 return 200;
23427 }
23428 return this.gridOptions.colWidth;
23429 };
23430 GridOptionsWrapper.prototype.getRowBuffer = function () {
23431 var rowBuffer = this.gridOptions.rowBuffer;
23432 if (typeof rowBuffer === 'number') {
23433 if (rowBuffer < 0) {
23434 Object(_utils_function__WEBPACK_IMPORTED_MODULE_11__["doOnce"])(function () { return console.warn("AG Grid: rowBuffer should not be negative"); }, 'warn rowBuffer negative');
23435 this.gridOptions.rowBuffer = rowBuffer = 0;
23436 }
23437 }
23438 else {
23439 rowBuffer = _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].ROW_BUFFER_SIZE;
23440 }
23441 return rowBuffer;
23442 };
23443 GridOptionsWrapper.prototype.getRowBufferInPixels = function () {
23444 var rowsToBuffer = this.getRowBuffer();
23445 var defaultRowHeight = this.getRowHeightAsNumber();
23446 return rowsToBuffer * defaultRowHeight;
23447 };
23448 // the user might be using some non-standard scrollbar, eg a scrollbar that has zero
23449 // width and overlays (like the Safari scrollbar, but presented in Chrome). so we
23450 // allow the user to provide the scroll width before we work it out.
23451 GridOptionsWrapper.prototype.getScrollbarWidth = function () {
23452 if (this.scrollbarWidth == null) {
23453 var useGridOptions = typeof this.gridOptions.scrollbarWidth === 'number' && this.gridOptions.scrollbarWidth >= 0;
23454 var scrollbarWidth = useGridOptions ? this.gridOptions.scrollbarWidth : Object(_utils_browser__WEBPACK_IMPORTED_MODULE_10__["getScrollbarWidth"])();
23455 if (scrollbarWidth != null) {
23456 this.scrollbarWidth = scrollbarWidth;
23457 this.eventService.dispatchEvent({
23458 type: _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_SCROLLBAR_WIDTH_CHANGED
23459 });
23460 }
23461 }
23462 return this.scrollbarWidth;
23463 };
23464 GridOptionsWrapper.prototype.checkForDeprecated = function () {
23465 // casting to generic object, so typescript compiles even though
23466 // we are looking for attributes that don't exist
23467 var options = this.gridOptions;
23468 if (options.deprecatedEmbedFullWidthRows) {
23469 console.warn("AG Grid: since v21.2, deprecatedEmbedFullWidthRows has been replaced with embedFullWidthRows.");
23470 }
23471 if (options.rowDeselection) {
23472 console.warn('AG Grid: since v24.x, rowDeselection is deprecated and the behaviour is true by default. Please use `suppressRowDeselection` to prevent rows from being deselected.');
23473 }
23474 if (options.enableMultiRowDragging) {
23475 options.rowDragMultiRow = true;
23476 delete options.enableMultiRowDragging;
23477 console.warn('AG Grid: since v26.1, `enableMultiRowDragging` is deprecated. Please use `rowDragMultiRow`.');
23478 }
23479 var checkRenamedProperty = function (oldProp, newProp, version) {
23480 if (options[oldProp] != null) {
23481 console.warn("AG Grid: since version " + version + ", '" + oldProp + "' is deprecated / renamed, please use the new property name '" + newProp + "' instead.");
23482 if (options[newProp] == null) {
23483 options[newProp] = options[oldProp];
23484 }
23485 }
23486 };
23487 checkRenamedProperty('batchUpdateWaitMillis', 'asyncTransactionWaitMillis', '23.1.x');
23488 checkRenamedProperty('deltaRowDataMode', 'immutableData', '23.1.x');
23489 if (options.immutableColumns || options.deltaColumnMode) {
23490 console.warn('AG Grid: since v24.0, immutableColumns and deltaColumnMode properties are gone. The grid now works like this as default. To keep column order maintained, set grid property applyColumnDefOrder=true');
23491 }
23492 checkRenamedProperty('suppressSetColumnStateEvents', 'suppressColumnStateEvents', '24.0.x');
23493 if (options.groupRowInnerRenderer || options.groupRowInnerRendererParams || options.groupRowInnerRendererFramework) {
23494 console.warn('AG Grid: since v24.0, grid properties groupRowInnerRenderer, groupRowInnerRendererFramework and groupRowInnerRendererParams are no longer used.');
23495 console.warn(' Instead use the grid properties groupRowRendererParams.innerRenderer, groupRowRendererParams.innerRendererFramework and groupRowRendererParams.innerRendererParams.');
23496 console.warn(' For example instead of this:');
23497 console.warn(' groupRowInnerRenderer: "myRenderer"');
23498 console.warn(' groupRowInnerRendererParams: {x: a}');
23499 console.warn(' Replace with this:');
23500 console.warn(' groupRowRendererParams: {');
23501 console.warn(' innerRenderer: "myRenderer",');
23502 console.warn(' innerRendererParams: {x: a}');
23503 console.warn(' }');
23504 console.warn(' We have copied the properties over for you. However to stop this error message, please change your application code.');
23505 if (!options.groupRowRendererParams) {
23506 options.groupRowRendererParams = {};
23507 }
23508 var params = options.groupRowRendererParams;
23509 if (options.groupRowInnerRenderer) {
23510 params.innerRenderer = options.groupRowInnerRenderer;
23511 }
23512 if (options.groupRowInnerRendererParams) {
23513 params.innerRendererParams = options.groupRowInnerRendererParams;
23514 }
23515 if (options.groupRowInnerRendererFramework) {
23516 params.innerRendererFramework = options.groupRowInnerRendererFramework;
23517 }
23518 }
23519 if (options.rememberGroupStateWhenNewData) {
23520 console.warn('AG Grid: since v24.0, grid property rememberGroupStateWhenNewData is deprecated. This feature was provided before Transaction Updates worked (which keep group state). Now that transaction updates are possible and they keep group state, this feature is no longer needed.');
23521 }
23522 if (options.detailCellRendererParams && options.detailCellRendererParams.autoHeight) {
23523 console.warn('AG Grid: since v24.1, grid property detailCellRendererParams.autoHeight is replaced with grid property detailRowAutoHeight. This allows this feature to work when you provide a custom DetailCellRenderer');
23524 options.detailRowAutoHeight = true;
23525 }
23526 if (options.suppressKeyboardEvent) {
23527 console.warn("AG Grid: since v24.1 suppressKeyboardEvent in the gridOptions has been deprecated and will be removed in\n future versions of AG Grid. If you need this to be set for every column use the defaultColDef property.");
23528 }
23529 if (options.suppressEnterpriseResetOnNewColumns) {
23530 console.warn('AG Grid: since v25, grid property suppressEnterpriseResetOnNewColumns is deprecated. This was a temporary property to allow changing columns in Server Side Row Model without triggering a reload. Now that it is possible to dynamically change columns in the grid, this is no longer needed.');
23531 }
23532 if (options.suppressColumnStateEvents) {
23533 console.warn('AG Grid: since v25, grid property suppressColumnStateEvents no longer works due to a refactor that we did. It should be possible to achieve similar using event.source, which would be "api" if the event was due to setting column state via the API');
23534 }
23535 if (options.defaultExportParams) {
23536 console.warn('AG Grid: since v25.2, the grid property `defaultExportParams` has been replaced by `defaultCsvExportParams` and `defaultExcelExportParams`.');
23537 }
23538 if (options.stopEditingWhenGridLosesFocus) {
23539 console.warn('AG Grid: since v25.2.2, the grid property `stopEditingWhenGridLosesFocus` has been replaced by `stopEditingWhenCellsLoseFocus`.');
23540 options.stopEditingWhenCellsLoseFocus = true;
23541 }
23542 if (options.applyColumnDefOrder) {
23543 console.warn('AG Grid: since v26.0, the grid property `applyColumnDefOrder` is no longer needed, as this is the default behaviour. To turn this behaviour off, set maintainColumnOrder=true');
23544 }
23545 if (options.groupMultiAutoColumn) {
23546 console.warn("AG Grid: since v26.0, the grid property `groupMultiAutoColumn` has been replaced by `groupDisplayType = 'multipleColumns'`");
23547 options.groupDisplayType = 'multipleColumns';
23548 }
23549 if (options.groupUseEntireRow) {
23550 console.warn("AG Grid: since v26.0, the grid property `groupUseEntireRow` has been replaced by `groupDisplayType = 'groupRows'`");
23551 options.groupDisplayType = 'groupRows';
23552 }
23553 if (options.groupSuppressAutoColumn) {
23554 var propName = options.treeData ? 'treeDataDisplayType' : 'groupDisplayType';
23555 console.warn("AG Grid: since v26.0, the grid property `groupSuppressAutoColumn` has been replaced by `" + propName + " = 'custom'`");
23556 options.groupDisplayType = 'custom';
23557 }
23558 if (options.defaultGroupOrderComparator) {
23559 console.warn("AG Grid: since v27.2, the grid property `defaultGroupOrderComparator` is deprecated and has been replaced by `initialGroupOrderComparator` and now receives a single params object.");
23560 }
23561 if (options.defaultGroupSortComparator) {
23562 console.warn("AG Grid: since v26.0, the grid property `defaultGroupSortComparator` has been replaced by `initialGroupOrderComparator`");
23563 options.defaultGroupOrderComparator = options.defaultGroupSortComparator;
23564 }
23565 if (options.groupRowAggNodes) {
23566 console.warn("AG Grid: since v27.2, the grid property `groupRowAggNodes` is deprecated and has been replaced by `getGroupRowAgg` and now receives a single params object.");
23567 }
23568 if (options.postSort) {
23569 console.warn("AG Grid: since v27.2, the grid property `postSort` is deprecated and has been replaced by `postSortRows` and now receives a single params object.");
23570 }
23571 if (options.isFullWidthCell) {
23572 console.warn("AG Grid: since v27.2, the grid property `isFullWidthCell` is deprecated and has been replaced by `isFullWidthRow` and now receives a single params object.");
23573 }
23574 if (options.localeTextFunc) {
23575 console.warn("AG Grid: since v27.2, the grid property `localeTextFunc` is deprecated and has been replaced by `getLocaleText` and now receives a single params object.");
23576 }
23577 if (options.colWidth) {
23578 console.warn('AG Grid: since v26.1, the grid property `colWidth` is deprecated and should be set via `defaultColDef.width`.');
23579 }
23580 if (options.minColWidth) {
23581 console.warn('AG Grid: since v26.1, the grid property `minColWidth` is deprecated and should be set via `defaultColDef.minWidth`.');
23582 }
23583 if (options.maxColWidth) {
23584 console.warn('AG Grid: since v26.1, the grid property `maxColWidth` is deprecated and should be set via `defaultColDef.maxWidth`.');
23585 }
23586 if (options.reactUi) {
23587 console.warn('AG Grid: since v27.0, React UI is on by default, so no need for reactUi=true. To turn it off, set suppressReactUi=true.');
23588 }
23589 if (options.suppressReactUi) {
23590 console.warn('AG Grid: The legacy React rendering engine is deprecated and will be removed in the next major version of the grid.');
23591 }
23592 if (options.suppressCellSelection) {
23593 console.warn('AG Grid: since v27.0, `suppressCellSelection` has been replaced by `suppressCellFocus`.');
23594 options.suppressCellFocus = options.suppressCellSelection;
23595 }
23596 if (options.getRowNodeId) {
23597 console.warn('AG Grid: since v27.1, `getRowNodeId` is deprecated and has been replaced by `getRowId`. The difference: if getRowId() is implemented then immutable data is enabled by default.');
23598 }
23599 if (options.immutableData) {
23600 if (options.getRowId) {
23601 console.warn('AG Grid: since v27.1, `immutableData` is deprecated. With the `getRowId` callback implemented, immutable data is enabled by default so you can remove `immutableData=true`.');
23602 }
23603 else {
23604 console.warn('AG Grid: since v27.1, `immutableData` is deprecated. To enable immutable data you must implement the `getRowId()` callback.');
23605 }
23606 }
23607 if (options.clipboardDeliminator) {
23608 console.warn('AG Grid: since v27.1, `clipboardDeliminator` has been replaced by `clipboardDelimiter`.');
23609 options.clipboardDelimiter = options.clipboardDeliminator;
23610 }
23611 };
23612 GridOptionsWrapper.prototype.checkForViolations = function () {
23613 if (this.isTreeData()) {
23614 this.treeDataViolations();
23615 }
23616 };
23617 GridOptionsWrapper.prototype.treeDataViolations = function () {
23618 if (this.isRowModelDefault()) {
23619 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["missing"])(this.getDataPathFunc())) {
23620 console.warn('AG Grid: property usingTreeData=true with rowModel=clientSide, but you did not ' +
23621 'provide getDataPath function, please provide getDataPath function if using tree data.');
23622 }
23623 }
23624 if (this.isRowModelServerSide()) {
23625 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["missing"])(this.getIsServerSideGroupFunc())) {
23626 console.warn('AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not ' +
23627 'provide isServerSideGroup function, please provide isServerSideGroup function if using tree data.');
23628 }
23629 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["missing"])(this.getServerSideGroupKeyFunc())) {
23630 console.warn('AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not ' +
23631 'provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data.');
23632 }
23633 }
23634 };
23635 GridOptionsWrapper.prototype.getLocaleTextFunc = function () {
23636 var _this = this;
23637 var _a = this.gridOptions, localeText = _a.localeText, getLocaleText = _a.getLocaleText, localeTextFunc = _a.localeTextFunc;
23638 if (getLocaleText) {
23639 //key: string, defaultValue: string, variableValues?: string[]
23640 return function (key, defaultValue, variableValues) {
23641 var params = {
23642 key: key,
23643 defaultValue: defaultValue,
23644 variableValues: variableValues,
23645 api: _this.getApi(),
23646 columnApi: _this.getColumnApi(),
23647 context: _this.getContext()
23648 };
23649 return getLocaleText(params);
23650 };
23651 }
23652 if (localeTextFunc) {
23653 return localeTextFunc;
23654 }
23655 return function (key, defaultValue, variableValues) {
23656 var localisedText = localeText && localeText[key];
23657 if (localisedText && variableValues && variableValues.length) {
23658 var found = 0;
23659 while (true) {
23660 if (found >= variableValues.length) {
23661 break;
23662 }
23663 var idx = localisedText.indexOf('${variable}');
23664 if (idx === -1) {
23665 break;
23666 }
23667 localisedText = localisedText.replace('${variable}', variableValues[found++]);
23668 }
23669 }
23670 return (localisedText !== null && localisedText !== void 0 ? localisedText : defaultValue);
23671 };
23672 };
23673 // responsible for calling the onXXX functions on gridOptions
23674 GridOptionsWrapper.prototype.globalEventHandler = function (eventName, event) {
23675 // prevent events from being fired _after_ the grid has been destroyed
23676 if (this.destroyed) {
23677 return;
23678 }
23679 var callbackMethodName = _components_componentUtil__WEBPACK_IMPORTED_MODULE_1__["ComponentUtil"].getCallbackForEvent(eventName);
23680 if (typeof this.gridOptions[callbackMethodName] === 'function') {
23681 this.gridOptions[callbackMethodName](event);
23682 }
23683 };
23684 GridOptionsWrapper.prototype.setRowHeightVariable = function (height) {
23685 var oldRowHeight = this.eGridDiv.style.getPropertyValue('--ag-line-height').trim();
23686 var newRowHeight = height + "px";
23687 if (oldRowHeight != newRowHeight) {
23688 this.eGridDiv.style.setProperty('--ag-line-height', newRowHeight);
23689 }
23690 };
23691 // we don't allow dynamic row height for virtual paging
23692 GridOptionsWrapper.prototype.getRowHeightAsNumber = function () {
23693 if (!this.gridOptions.rowHeight || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_13__["missing"])(this.gridOptions.rowHeight)) {
23694 return this.getDefaultRowHeight();
23695 }
23696 var rowHeight = this.gridOptions.rowHeight;
23697 if (rowHeight && this.isNumeric(rowHeight)) {
23698 this.setRowHeightVariable(rowHeight);
23699 return rowHeight;
23700 }
23701 console.warn('AG Grid row height must be a number if not using standard row model');
23702 return this.getDefaultRowHeight();
23703 };
23704 GridOptionsWrapper.prototype.isGetRowHeightFunction = function () {
23705 return typeof this.gridOptions.getRowHeight === 'function';
23706 };
23707 GridOptionsWrapper.prototype.getRowHeightForNode = function (rowNode, allowEstimate, defaultRowHeight) {
23708 if (allowEstimate === void 0) { allowEstimate = false; }
23709 if (defaultRowHeight == null) {
23710 defaultRowHeight = this.getDefaultRowHeight();
23711 }
23712 // check the function first, in case use set both function and
23713 // number, when using virtual pagination then function can be
23714 // used for pinned rows and the number for the body rows.
23715 if (this.isGetRowHeightFunction()) {
23716 if (allowEstimate) {
23717 return { height: defaultRowHeight, estimated: true };
23718 }
23719 var params = {
23720 node: rowNode,
23721 data: rowNode.data
23722 };
23723 var height = this.mergeGridCommonParams(this.gridOptions.getRowHeight)(params);
23724 if (this.isNumeric(height)) {
23725 if (height === 0) {
23726 Object(_utils_function__WEBPACK_IMPORTED_MODULE_11__["doOnce"])(function () { return console.warn('AG Grid: The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.'); }, 'invalidRowHeight');
23727 }
23728 return { height: Math.max(1, height), estimated: false };
23729 }
23730 }
23731 if (rowNode.detail && this.isMasterDetail()) {
23732 // if autoHeight, we want the height to grow to the new height starting at 1, as otherwise a flicker would happen,
23733 // as the detail goes to the default (eg 200px) and then immediately shrink up/down to the new measured height
23734 // (due to auto height) which looks bad, especially if doing row animation.
23735 if (this.isDetailRowAutoHeight()) {
23736 return { height: 1, estimated: false };
23737 }
23738 if (this.isNumeric(this.gridOptions.detailRowHeight)) {
23739 return { height: this.gridOptions.detailRowHeight, estimated: false };
23740 }
23741 return { height: DEFAULT_DETAIL_ROW_HEIGHT, estimated: false };
23742 }
23743 var rowHeight = this.gridOptions.rowHeight && this.isNumeric(this.gridOptions.rowHeight) ? this.gridOptions.rowHeight : defaultRowHeight;
23744 return { height: rowHeight, estimated: false };
23745 };
23746 GridOptionsWrapper.prototype.isDynamicRowHeight = function () {
23747 return typeof this.gridOptions.getRowHeight === 'function';
23748 };
23749 GridOptionsWrapper.prototype.getListItemHeight = function () {
23750 return this.getFromTheme(20, 'listItemHeight');
23751 };
23752 GridOptionsWrapper.prototype.chartMenuPanelWidth = function () {
23753 return this.environment.chartMenuPanelWidth();
23754 };
23755 GridOptionsWrapper.prototype.isNumeric = function (value) {
23756 return !isNaN(value) && typeof value === 'number' && isFinite(value);
23757 };
23758 GridOptionsWrapper.prototype.getFromTheme = function (defaultValue, sassVariableName) {
23759 var theme = this.environment.getTheme().theme;
23760 if (theme && theme.indexOf('ag-theme') === 0) {
23761 return this.environment.getSassVariable(theme, sassVariableName);
23762 }
23763 return defaultValue;
23764 };
23765 GridOptionsWrapper.prototype.getDefaultRowHeight = function () {
23766 return this.getFromTheme(DEFAULT_ROW_HEIGHT, 'rowHeight');
23767 };
23768 GridOptionsWrapper.prototype.matchesGroupDisplayType = function (toMatch, supplied) {
23769 var groupDisplayTypeValues = ['groupRows', 'multipleColumns', 'custom', 'singleColumn'];
23770 if (groupDisplayTypeValues.indexOf(supplied) < 0) {
23771 console.warn("AG Grid: '" + supplied + "' is not a valid groupDisplayType value - possible values are: '" + groupDisplayTypeValues.join("', '") + "'");
23772 return false;
23773 }
23774 return supplied === toMatch;
23775 };
23776 GridOptionsWrapper.prototype.matchesTreeDataDisplayType = function (toMatch, supplied) {
23777 var treeDataDisplayTypeValues = ['auto', 'custom'];
23778 if (treeDataDisplayTypeValues.indexOf(supplied) < 0) {
23779 console.warn("AG Grid: '" + supplied + "' is not a valid treeDataDisplayType value - possible values are: '" + treeDataDisplayTypeValues.join("', '") + "'");
23780 return false;
23781 }
23782 return supplied === toMatch;
23783 };
23784 var GridOptionsWrapper_1;
23785 GridOptionsWrapper.MIN_COL_WIDTH = 10;
23786 GridOptionsWrapper.PROP_HEADER_HEIGHT = 'headerHeight';
23787 GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN = 'groupRemoveSingleChildren';
23788 GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN = 'groupRemoveLowestSingleChildren';
23789 GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT = 'pivotHeaderHeight';
23790 GridOptionsWrapper.PROP_SUPPRESS_CLIPBOARD_PASTE = 'suppressClipboardPaste';
23791 GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT = 'groupHeaderHeight';
23792 GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT = 'pivotGroupHeaderHeight';
23793 GridOptionsWrapper.PROP_NAVIGATE_TO_NEXT_CELL = 'navigateToNextCell';
23794 GridOptionsWrapper.PROP_TAB_TO_NEXT_CELL = 'tabToNextCell';
23795 GridOptionsWrapper.PROP_NAVIGATE_TO_NEXT_HEADER = 'navigateToNextHeader';
23796 GridOptionsWrapper.PROP_TAB_TO_NEXT_HEADER = 'tabToNextHeader';
23797 GridOptionsWrapper.PROP_IS_EXTERNAL_FILTER_PRESENT = 'isExternalFilterPresent';
23798 GridOptionsWrapper.PROP_DOES_EXTERNAL_FILTER_PASS = 'doesExternalFilterPass';
23799 GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT = 'floatingFiltersHeight';
23800 GridOptionsWrapper.PROP_SUPPRESS_ROW_CLICK_SELECTION = 'suppressRowClickSelection';
23801 GridOptionsWrapper.PROP_SUPPRESS_ROW_DRAG = 'suppressRowDrag';
23802 GridOptionsWrapper.PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG = 'suppressMoveWhenRowDragging';
23803 GridOptionsWrapper.PROP_GET_ROW_CLASS = 'getRowClass';
23804 GridOptionsWrapper.PROP_GET_ROW_STYLE = 'getRowStyle';
23805 GridOptionsWrapper.PROP_GET_ROW_HEIGHT = 'getRowHeight';
23806 GridOptionsWrapper.PROP_POPUP_PARENT = 'popupParent';
23807 GridOptionsWrapper.PROP_DOM_LAYOUT = 'domLayout';
23808 GridOptionsWrapper.PROP_ROW_CLASS = 'rowClass';
23809 GridOptionsWrapper.PROP_FILL_HANDLE_DIRECTION = 'fillHandleDirection';
23810 GridOptionsWrapper.PROP_GROUP_ROW_AGG_NODES = 'groupRowAggNodes';
23811 GridOptionsWrapper.PROP_GET_GROUP_ROW_AGG = 'getGroupRowAgg';
23812 GridOptionsWrapper.PROP_GET_BUSINESS_KEY_FOR_NODE = 'getBusinessKeyForNode';
23813 GridOptionsWrapper.PROP_GET_CHILD_COUNT = 'getChildCount';
23814 GridOptionsWrapper.PROP_PROCESS_ROW_POST_CREATE = 'processRowPostCreate';
23815 GridOptionsWrapper.PROP_GET_ROW_NODE_ID = 'getRowNodeId';
23816 GridOptionsWrapper.PROP_GET_ROW_ID = 'getRowId';
23817 GridOptionsWrapper.PROP_IS_FULL_WIDTH_CELL = 'isFullWidthCell';
23818 GridOptionsWrapper.PROP_IS_FULL_WIDTH_ROW = 'isFullWidthRow';
23819 GridOptionsWrapper.PROP_IS_ROW_SELECTABLE = 'isRowSelectable';
23820 GridOptionsWrapper.PROP_IS_ROW_MASTER = 'isRowMaster';
23821 GridOptionsWrapper.PROP_POST_SORT = 'postSort';
23822 GridOptionsWrapper.PROP_POST_SORT_ROWS = 'postSortRows';
23823 GridOptionsWrapper.PROP_GET_DOCUMENT = 'getDocument';
23824 GridOptionsWrapper.PROP_POST_PROCESS_POPUP = 'postProcessPopup';
23825 GridOptionsWrapper.PROP_DEFAULT_GROUP_ORDER_COMPARATOR = 'defaultGroupOrderComparator';
23826 GridOptionsWrapper.PROP_INITIAL_GROUP_ORDER_COMPARATOR = 'initialGroupOrderComparator';
23827 GridOptionsWrapper.PROP_PAGINATION_NUMBER_FORMATTER = 'paginationNumberFormatter';
23828 GridOptionsWrapper.PROP_GET_CONTEXT_MENU_ITEMS = 'getContextMenuItems';
23829 GridOptionsWrapper.PROP_GET_MAIN_MENU_ITEMS = 'getMainMenuItems';
23830 GridOptionsWrapper.PROP_PROCESS_CELL_FOR_CLIPBOARD = 'processCellForClipboard';
23831 GridOptionsWrapper.PROP_PROCESS_CELL_FROM_CLIPBOARD = 'processCellFromClipboard';
23832 GridOptionsWrapper.PROP_SEND_TO_CLIPBOARD = 'sendToClipboard';
23833 GridOptionsWrapper.PROP_PROCESS_TO_SECONDARY_COLDEF = 'processSecondaryColDef';
23834 GridOptionsWrapper.PROP_PROCESS_SECONDARY_COL_GROUP_DEF = 'processSecondaryColGroupDef';
23835 GridOptionsWrapper.PROP_GET_CHART_TOOLBAR_ITEMS = 'getChartToolbarItems';
23836 GridOptionsWrapper.PROP_GET_SERVER_SIDE_STORE_PARAMS = 'getServerSideStoreParams';
23837 GridOptionsWrapper.PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT = 'isServerSideGroupOpenByDefault';
23838 GridOptionsWrapper.PROP_IS_APPLY_SERVER_SIDE_TRANSACTION = 'isApplyServerSideTransaction';
23839 GridOptionsWrapper.PROP_IS_SERVER_SIDE_GROUP = 'isServerSideGroup';
23840 GridOptionsWrapper.PROP_GET_SERVER_SIDE_GROUP_KEY = 'getServerSideGroupKey';
23841 __decorate([
23842 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('gridOptions')
23843 ], GridOptionsWrapper.prototype, "gridOptions", void 0);
23844 __decorate([
23845 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('eventService')
23846 ], GridOptionsWrapper.prototype, "eventService", void 0);
23847 __decorate([
23848 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('environment')
23849 ], GridOptionsWrapper.prototype, "environment", void 0);
23850 __decorate([
23851 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('eGridDiv')
23852 ], GridOptionsWrapper.prototype, "eGridDiv", void 0);
23853 __decorate([
23854 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Qualifier"])('gridApi')), __param(1, Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Qualifier"])('columnApi'))
23855 ], GridOptionsWrapper.prototype, "agWire", null);
23856 __decorate([
23857 _context_context__WEBPACK_IMPORTED_MODULE_3__["PreDestroy"]
23858 ], GridOptionsWrapper.prototype, "destroy", null);
23859 __decorate([
23860 _context_context__WEBPACK_IMPORTED_MODULE_3__["PostConstruct"]
23861 ], GridOptionsWrapper.prototype, "init", null);
23862 GridOptionsWrapper = GridOptionsWrapper_1 = __decorate([
23863 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Bean"])('gridOptionsWrapper')
23864 ], GridOptionsWrapper);
23865 return GridOptionsWrapper;
23866}());
23867
23868
23869
23870
23871
23872/***/ }),
23873/* 113 */
23874/***/ (function(module, __webpack_exports__, __webpack_require__) {
23875
23876"use strict";
23877__webpack_require__.r(__webpack_exports__);
23878/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SideBarDefParser", function() { return SideBarDefParser; });
23879/**
23880 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
23881 * @version v27.3.0
23882 * @link https://www.ag-grid.com/
23883 * @license MIT
23884 */
23885var SideBarDefParser = /** @class */ (function () {
23886 function SideBarDefParser() {
23887 }
23888 SideBarDefParser.parse = function (toParse) {
23889 if (!toParse) {
23890 return null;
23891 }
23892 if (toParse === true) {
23893 return {
23894 toolPanels: [
23895 SideBarDefParser.DEFAULT_COLUMN_COMP,
23896 SideBarDefParser.DEFAULT_FILTER_COMP,
23897 ],
23898 defaultToolPanel: 'columns'
23899 };
23900 }
23901 if (typeof toParse === 'string') {
23902 return SideBarDefParser.parse([toParse]);
23903 }
23904 if (Array.isArray(toParse)) {
23905 var comps_1 = [];
23906 toParse.forEach(function (key) {
23907 var lookupResult = SideBarDefParser.DEFAULT_BY_KEY[key];
23908 if (!lookupResult) {
23909 console.warn("AG Grid: the key " + key + " is not a valid key for specifying a tool panel, valid keys are: " + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));
23910 return;
23911 }
23912 comps_1.push(lookupResult);
23913 });
23914 if (comps_1.length === 0) {
23915 return null;
23916 }
23917 return {
23918 toolPanels: comps_1,
23919 defaultToolPanel: comps_1[0].id
23920 };
23921 }
23922 var result = {
23923 toolPanels: SideBarDefParser.parseComponents(toParse.toolPanels),
23924 defaultToolPanel: toParse.defaultToolPanel,
23925 hiddenByDefault: toParse.hiddenByDefault,
23926 position: toParse.position
23927 };
23928 return result;
23929 };
23930 SideBarDefParser.parseComponents = function (from) {
23931 var result = [];
23932 if (!from) {
23933 return result;
23934 }
23935 from.forEach(function (it) {
23936 var toAdd = null;
23937 if (typeof it === 'string') {
23938 var lookupResult = SideBarDefParser.DEFAULT_BY_KEY[it];
23939 if (!lookupResult) {
23940 console.warn("AG Grid: the key " + it + " is not a valid key for specifying a tool panel, valid keys are: " + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));
23941 return;
23942 }
23943 toAdd = lookupResult;
23944 }
23945 else {
23946 toAdd = it;
23947 }
23948 result.push(toAdd);
23949 });
23950 return result;
23951 };
23952 SideBarDefParser.DEFAULT_COLUMN_COMP = {
23953 id: 'columns',
23954 labelDefault: 'Columns',
23955 labelKey: 'columns',
23956 iconKey: 'columns',
23957 toolPanel: 'agColumnsToolPanel',
23958 };
23959 SideBarDefParser.DEFAULT_FILTER_COMP = {
23960 id: 'filters',
23961 labelDefault: 'Filters',
23962 labelKey: 'filters',
23963 iconKey: 'filter',
23964 toolPanel: 'agFiltersToolPanel',
23965 };
23966 SideBarDefParser.DEFAULT_BY_KEY = {
23967 columns: SideBarDefParser.DEFAULT_COLUMN_COMP,
23968 filters: SideBarDefParser.DEFAULT_FILTER_COMP
23969 };
23970 return SideBarDefParser;
23971}());
23972
23973
23974
23975
23976
23977/***/ }),
23978/* 114 */
23979/***/ (function(module, __webpack_exports__, __webpack_require__) {
23980
23981"use strict";
23982__webpack_require__.r(__webpack_exports__);
23983/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowAnimationCssClasses", function() { return RowAnimationCssClasses; });
23984/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSS_CLASS_CELL_SELECTABLE", function() { return CSS_CLASS_CELL_SELECTABLE; });
23985/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSS_CLASS_FORCE_VERTICAL_SCROLL", function() { return CSS_CLASS_FORCE_VERTICAL_SCROLL; });
23986/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSS_CLASS_COLUMN_MOVING", function() { return CSS_CLASS_COLUMN_MOVING; });
23987/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridBodyCtrl", function() { return GridBodyCtrl; });
23988/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
23989/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
23990/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(111);
23991/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
23992/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24);
23993/* harmony import */ var _gridBodyScrollFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(115);
23994/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42);
23995/* harmony import */ var _rowDragFeature__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(116);
23996/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43);
23997/**
23998 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
23999 * @version v27.3.0
24000 * @link https://www.ag-grid.com/
24001 * @license MIT
24002 */
24003var __extends = (undefined && undefined.__extends) || (function () {
24004 var extendStatics = function (d, b) {
24005 extendStatics = Object.setPrototypeOf ||
24006 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24007 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24008 return extendStatics(d, b);
24009 };
24010 return function (d, b) {
24011 extendStatics(d, b);
24012 function __() { this.constructor = d; }
24013 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24014 };
24015})();
24016var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
24017 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
24018 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
24019 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
24020 return c > 3 && r && Object.defineProperty(target, key, r), r;
24021};
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031var RowAnimationCssClasses;
24032(function (RowAnimationCssClasses) {
24033 RowAnimationCssClasses["ANIMATION_ON"] = "ag-row-animation";
24034 RowAnimationCssClasses["ANIMATION_OFF"] = "ag-row-no-animation";
24035})(RowAnimationCssClasses || (RowAnimationCssClasses = {}));
24036var CSS_CLASS_CELL_SELECTABLE = 'ag-selectable';
24037var CSS_CLASS_FORCE_VERTICAL_SCROLL = 'ag-force-vertical-scroll';
24038var CSS_CLASS_COLUMN_MOVING = 'ag-column-moving';
24039var GridBodyCtrl = /** @class */ (function (_super) {
24040 __extends(GridBodyCtrl, _super);
24041 function GridBodyCtrl() {
24042 return _super !== null && _super.apply(this, arguments) || this;
24043 }
24044 GridBodyCtrl.prototype.getScrollFeature = function () {
24045 return this.bodyScrollFeature;
24046 };
24047 GridBodyCtrl.prototype.getBodyViewportElement = function () {
24048 return this.eBodyViewport;
24049 };
24050 GridBodyCtrl.prototype.setComp = function (comp, eGridBody, eBodyViewport, eTop, eBottom) {
24051 this.comp = comp;
24052 this.eGridBody = eGridBody;
24053 this.eBodyViewport = eBodyViewport;
24054 this.eTop = eTop;
24055 this.eBottom = eBottom;
24056 this.setCellTextSelection(this.gridOptionsWrapper.isEnableCellTextSelect());
24057 this.createManagedBean(new _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_2__["LayoutFeature"](this.comp));
24058 this.bodyScrollFeature = this.createManagedBean(new _gridBodyScrollFeature__WEBPACK_IMPORTED_MODULE_5__["GridBodyScrollFeature"](this.eBodyViewport));
24059 this.addRowDragListener();
24060 this.setupRowAnimationCssClass();
24061 this.addEventListeners();
24062 this.addFocusListeners([eTop, eBodyViewport, eBottom]);
24063 this.onGridColumnsChanged();
24064 this.addBodyViewportListener();
24065 this.setFloatingHeights();
24066 this.disableBrowserDragging();
24067 this.addStopEditingWhenGridLosesFocus();
24068 this.ctrlsService.registerGridBodyCtrl(this);
24069 };
24070 GridBodyCtrl.prototype.getComp = function () {
24071 return this.comp;
24072 };
24073 GridBodyCtrl.prototype.addEventListeners = function () {
24074 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_GRID_COLUMNS_CHANGED, this.onGridColumnsChanged.bind(this));
24075 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED, this.onScrollVisibilityChanged.bind(this));
24076 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_PINNED_ROW_DATA_CHANGED, this.setFloatingHeights.bind(this));
24077 };
24078 GridBodyCtrl.prototype.addFocusListeners = function (elements) {
24079 var _this = this;
24080 elements.forEach(function (element) {
24081 _this.addManagedListener(element, 'focusin', function () {
24082 element.classList.add('ag-has-focus');
24083 });
24084 _this.addManagedListener(element, 'focusout', function (e) {
24085 if (!element.contains(e.relatedTarget)) {
24086 element.classList.remove('ag-has-focus');
24087 }
24088 });
24089 });
24090 };
24091 // used by ColumnAnimationService
24092 GridBodyCtrl.prototype.setColumnMovingCss = function (moving) {
24093 this.comp.setColumnMovingCss(moving ? CSS_CLASS_COLUMN_MOVING : null, moving);
24094 };
24095 GridBodyCtrl.prototype.setCellTextSelection = function (selectable) {
24096 if (selectable === void 0) { selectable = false; }
24097 var cssClass = selectable ? CSS_CLASS_CELL_SELECTABLE : null;
24098 this.comp.setCellSelectableCss(cssClass, selectable);
24099 };
24100 GridBodyCtrl.prototype.onScrollVisibilityChanged = function () {
24101 var visible = this.scrollVisibleService.isVerticalScrollShowing();
24102 this.setVerticalScrollPaddingVisible(visible);
24103 };
24104 GridBodyCtrl.prototype.onGridColumnsChanged = function () {
24105 var columns = this.columnModel.getAllGridColumns();
24106 this.comp.setColumnCount(columns ? columns.length : 0);
24107 };
24108 // if we do not do this, then the user can select a pic in the grid (eg an image in a custom cell renderer)
24109 // and then that will start the browser native drag n' drop, which messes up with our own drag and drop.
24110 GridBodyCtrl.prototype.disableBrowserDragging = function () {
24111 this.addManagedListener(this.eGridBody, 'dragstart', function (event) {
24112 if (event.target instanceof HTMLImageElement) {
24113 event.preventDefault();
24114 return false;
24115 }
24116 });
24117 };
24118 GridBodyCtrl.prototype.addStopEditingWhenGridLosesFocus = function () {
24119 var _this = this;
24120 if (!this.gridOptionsWrapper.isStopEditingWhenCellsLoseFocus()) {
24121 return;
24122 }
24123 var focusOutListener = function (event) {
24124 // this is the element the focus is moving to
24125 var elementWithFocus = event.relatedTarget;
24126 if (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_8__["getTabIndex"])(elementWithFocus) === null) {
24127 _this.rowRenderer.stopEditing();
24128 return;
24129 }
24130 var clickInsideGrid =
24131 // see if click came from inside the viewports
24132 viewports.some(function (viewport) { return viewport.contains(elementWithFocus); })
24133 // and also that it's not from a detail grid
24134 && _this.mouseEventService.isElementInThisGrid(elementWithFocus);
24135 if (!clickInsideGrid) {
24136 var popupService = _this.popupService;
24137 clickInsideGrid =
24138 popupService.getActivePopups().some(function (popup) { return popup.contains(elementWithFocus); }) ||
24139 popupService.isElementWithinCustomPopup(elementWithFocus);
24140 }
24141 if (!clickInsideGrid) {
24142 _this.rowRenderer.stopEditing();
24143 }
24144 };
24145 var viewports = [this.eBodyViewport, this.eBottom, this.eTop];
24146 viewports.forEach(function (viewport) { return _this.addManagedListener(viewport, 'focusout', focusOutListener); });
24147 };
24148 GridBodyCtrl.prototype.updateRowCount = function () {
24149 var headerCount = this.headerNavigationService.getHeaderRowCount();
24150 var modelType = this.paginationProxy.getType();
24151 var rowCount = -1;
24152 if (modelType === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE) {
24153 rowCount = 0;
24154 this.paginationProxy.forEachNode(function (node) {
24155 if (!node.group) {
24156 rowCount++;
24157 }
24158 });
24159 }
24160 var total = rowCount === -1 ? -1 : (headerCount + rowCount);
24161 this.comp.setRowCount(total);
24162 };
24163 GridBodyCtrl.prototype.registerBodyViewportResizeListener = function (listener) {
24164 this.comp.registerBodyViewportResizeListener(listener);
24165 };
24166 GridBodyCtrl.prototype.setVerticalScrollPaddingVisible = function (visible) {
24167 var overflowY = visible ? 'scroll' : 'hidden';
24168 this.comp.setPinnedTopBottomOverflowY(overflowY);
24169 };
24170 GridBodyCtrl.prototype.isVerticalScrollShowing = function () {
24171 var show = this.gridOptionsWrapper.isAlwaysShowVerticalScroll();
24172 var cssClass = show ? CSS_CLASS_FORCE_VERTICAL_SCROLL : null;
24173 this.comp.setAlwaysVerticalScrollClass(cssClass, show);
24174 return show || Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["isVerticalScrollShowing"])(this.eBodyViewport);
24175 };
24176 GridBodyCtrl.prototype.setupRowAnimationCssClass = function () {
24177 var _this = this;
24178 var listener = function () {
24179 // we don't want to use row animation if scaling, as rows jump strangely as you scroll,
24180 // when scaling and doing row animation.
24181 var animateRows = _this.gridOptionsWrapper.isAnimateRows() && !_this.rowContainerHeightService.isStretching();
24182 var animateRowsCssClass = animateRows ? RowAnimationCssClasses.ANIMATION_ON : RowAnimationCssClasses.ANIMATION_OFF;
24183 _this.comp.setRowAnimationCssOnBodyViewport(animateRowsCssClass, animateRows);
24184 };
24185 listener();
24186 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_HEIGHT_SCALE_CHANGED, listener);
24187 };
24188 GridBodyCtrl.prototype.getGridBodyElement = function () {
24189 return this.eGridBody;
24190 };
24191 GridBodyCtrl.prototype.addBodyViewportListener = function () {
24192 var _this = this;
24193 // we want to listen for clicks directly on the eBodyViewport, so the user has a way of showing
24194 // the context menu if no rows or columns are displayed, or user simply clicks outside of a cell
24195 var listener = function (mouseEvent) {
24196 if (_this.gridOptionsWrapper.isPreventDefaultOnContextMenu()) {
24197 mouseEvent.preventDefault();
24198 }
24199 var target = mouseEvent.target;
24200 if (target === _this.eBodyViewport || target === _this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()) {
24201 // show it
24202 if (_this.contextMenuFactory) {
24203 _this.contextMenuFactory.onContextMenu(mouseEvent, null, null, null, null, _this.eGridBody);
24204 }
24205 }
24206 };
24207 this.addManagedListener(this.eBodyViewport, 'contextmenu', listener);
24208 this.addManagedListener(this.eBodyViewport, 'wheel', this.onWheel.bind(this));
24209 };
24210 GridBodyCtrl.prototype.onWheel = function (e) {
24211 if (!this.gridOptionsWrapper.isSuppressScrollWhenPopupsAreOpen()) {
24212 return;
24213 }
24214 if (this.popupService.hasAnchoredPopup()) {
24215 e.preventDefault();
24216 }
24217 };
24218 GridBodyCtrl.prototype.getGui = function () {
24219 return this.eGridBody;
24220 };
24221 // called by rowDragFeature
24222 GridBodyCtrl.prototype.scrollVertically = function (pixels) {
24223 var oldScrollPosition = this.eBodyViewport.scrollTop;
24224 this.bodyScrollFeature.setVerticalScrollPosition(oldScrollPosition + pixels);
24225 return this.eBodyViewport.scrollTop - oldScrollPosition;
24226 };
24227 GridBodyCtrl.prototype.addRowDragListener = function () {
24228 this.rowDragFeature = this.createManagedBean(new _rowDragFeature__WEBPACK_IMPORTED_MODULE_7__["RowDragFeature"](this.eBodyViewport));
24229 this.dragAndDropService.addDropTarget(this.rowDragFeature);
24230 };
24231 GridBodyCtrl.prototype.getRowDragFeature = function () {
24232 return this.rowDragFeature;
24233 };
24234 GridBodyCtrl.prototype.setFloatingHeights = function () {
24235 var pinnedRowModel = this.pinnedRowModel;
24236 var floatingTopHeight = pinnedRowModel.getPinnedTopTotalHeight();
24237 if (floatingTopHeight) {
24238 // adding 1px for cell bottom border
24239 floatingTopHeight += 1;
24240 }
24241 var floatingBottomHeight = pinnedRowModel.getPinnedBottomTotalHeight();
24242 if (floatingBottomHeight) {
24243 // adding 1px for cell bottom border
24244 floatingBottomHeight += 1;
24245 }
24246 this.comp.setTopHeight(floatingTopHeight);
24247 this.comp.setBottomHeight(floatingBottomHeight);
24248 this.comp.setTopDisplay(floatingTopHeight ? 'inherit' : 'none');
24249 this.comp.setBottomDisplay(floatingBottomHeight ? 'inherit' : 'none');
24250 };
24251 // method will call itself if no available width. this covers if the grid
24252 // isn't visible, but is just about to be visible.
24253 GridBodyCtrl.prototype.sizeColumnsToFit = function (nextTimeout) {
24254 var _this = this;
24255 var removeScrollWidth = this.isVerticalScrollShowing();
24256 var scrollWidthToRemove = removeScrollWidth ? this.gridOptionsWrapper.getScrollbarWidth() : 0;
24257 var bodyViewportWidth = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["getInnerWidth"])(this.eBodyViewport);
24258 var availableWidth = bodyViewportWidth - scrollWidthToRemove;
24259 if (availableWidth > 0) {
24260 this.columnModel.sizeColumnsToFit(availableWidth, "sizeColumnsToFit");
24261 return;
24262 }
24263 if (nextTimeout === undefined) {
24264 window.setTimeout(function () {
24265 _this.sizeColumnsToFit(100);
24266 }, 0);
24267 }
24268 else if (nextTimeout === 100) {
24269 window.setTimeout(function () {
24270 _this.sizeColumnsToFit(500);
24271 }, 100);
24272 }
24273 else if (nextTimeout === 500) {
24274 window.setTimeout(function () {
24275 _this.sizeColumnsToFit(-1);
24276 }, 500);
24277 }
24278 else {
24279 console.warn('AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with ' +
24280 'zero width, maybe the grid is not visible yet on the screen?');
24281 }
24282 };
24283 // + rangeService
24284 GridBodyCtrl.prototype.addScrollEventListener = function (listener) {
24285 this.eBodyViewport.addEventListener('scroll', listener);
24286 };
24287 // + focusService
24288 GridBodyCtrl.prototype.removeScrollEventListener = function (listener) {
24289 this.eBodyViewport.removeEventListener('scroll', listener);
24290 };
24291 __decorate([
24292 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowContainerHeightService')
24293 ], GridBodyCtrl.prototype, "rowContainerHeightService", void 0);
24294 __decorate([
24295 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
24296 ], GridBodyCtrl.prototype, "ctrlsService", void 0);
24297 __decorate([
24298 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
24299 ], GridBodyCtrl.prototype, "columnModel", void 0);
24300 __decorate([
24301 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('scrollVisibleService')
24302 ], GridBodyCtrl.prototype, "scrollVisibleService", void 0);
24303 __decorate([
24304 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('contextMenuFactory')
24305 ], GridBodyCtrl.prototype, "contextMenuFactory", void 0);
24306 __decorate([
24307 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('headerNavigationService')
24308 ], GridBodyCtrl.prototype, "headerNavigationService", void 0);
24309 __decorate([
24310 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('paginationProxy')
24311 ], GridBodyCtrl.prototype, "paginationProxy", void 0);
24312 __decorate([
24313 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragAndDropService')
24314 ], GridBodyCtrl.prototype, "dragAndDropService", void 0);
24315 __decorate([
24316 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('pinnedRowModel')
24317 ], GridBodyCtrl.prototype, "pinnedRowModel", void 0);
24318 __decorate([
24319 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowRenderer')
24320 ], GridBodyCtrl.prototype, "rowRenderer", void 0);
24321 __decorate([
24322 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('popupService')
24323 ], GridBodyCtrl.prototype, "popupService", void 0);
24324 __decorate([
24325 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('mouseEventService')
24326 ], GridBodyCtrl.prototype, "mouseEventService", void 0);
24327 return GridBodyCtrl;
24328}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
24329
24330
24331
24332
24333
24334/***/ }),
24335/* 115 */
24336/***/ (function(module, __webpack_exports__, __webpack_require__) {
24337
24338"use strict";
24339__webpack_require__.r(__webpack_exports__);
24340/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridBodyScrollFeature", function() { return GridBodyScrollFeature; });
24341/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
24342/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
24343/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
24344/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24);
24345/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
24346/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43);
24347/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15);
24348/**
24349 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
24350 * @version v27.3.0
24351 * @link https://www.ag-grid.com/
24352 * @license MIT
24353 */
24354var __extends = (undefined && undefined.__extends) || (function () {
24355 var extendStatics = function (d, b) {
24356 extendStatics = Object.setPrototypeOf ||
24357 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24358 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24359 return extendStatics(d, b);
24360 };
24361 return function (d, b) {
24362 extendStatics(d, b);
24363 function __() { this.constructor = d; }
24364 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24365 };
24366})();
24367var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
24368 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
24369 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
24370 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
24371 return c > 3 && r && Object.defineProperty(target, key, r), r;
24372};
24373
24374
24375
24376
24377
24378
24379
24380var GridBodyScrollFeature = /** @class */ (function (_super) {
24381 __extends(GridBodyScrollFeature, _super);
24382 function GridBodyScrollFeature(eBodyViewport) {
24383 var _this = _super.call(this) || this;
24384 _this.scrollLeft = -1;
24385 _this.nextScrollTop = -1;
24386 _this.scrollTop = -1;
24387 _this.eBodyViewport = eBodyViewport;
24388 _this.resetLastHorizontalScrollElementDebounced = Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["debounce"])(_this.resetLastHorizontalScrollElement.bind(_this), 500);
24389 return _this;
24390 }
24391 GridBodyScrollFeature.prototype.postConstruct = function () {
24392 var _this = this;
24393 this.enableRtl = this.gridOptionsWrapper.isEnableRtl();
24394 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onDisplayedColumnsWidthChanged.bind(this));
24395 this.ctrlsService.whenReady(function (p) {
24396 _this.centerRowContainerCtrl = p.centerRowContainerCtrl;
24397 _this.onDisplayedColumnsWidthChanged();
24398 _this.addScrollListener();
24399 });
24400 };
24401 GridBodyScrollFeature.prototype.addScrollListener = function () {
24402 var fakeHScroll = this.ctrlsService.getFakeHScrollCtrl();
24403 this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(), 'scroll', this.onCenterViewportScroll.bind(this));
24404 this.addManagedListener(fakeHScroll.getViewport(), 'scroll', this.onFakeHorizontalScroll.bind(this));
24405 var onVerticalScroll = this.gridOptionsWrapper.isDebounceVerticalScrollbar() ?
24406 Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["debounce"])(this.onVerticalScroll.bind(this), 100)
24407 : this.onVerticalScroll.bind(this);
24408 this.addManagedListener(this.eBodyViewport, 'scroll', onVerticalScroll);
24409 };
24410 GridBodyScrollFeature.prototype.onDisplayedColumnsWidthChanged = function () {
24411 if (this.enableRtl) {
24412 // because RTL is all backwards, a change in the width of the row
24413 // can cause a change in the scroll position, without a scroll event,
24414 // because the scroll position in RTL is a function that depends on
24415 // the width. to be convinced of this, take out this line, enable RTL,
24416 // scroll all the way to the left and then resize a column
24417 this.horizontallyScrollHeaderCenterAndFloatingCenter();
24418 }
24419 };
24420 GridBodyScrollFeature.prototype.horizontallyScrollHeaderCenterAndFloatingCenter = function (scrollLeft) {
24421 // when doing RTL, this method gets called once prematurely
24422 var notYetInitialised = this.centerRowContainerCtrl == null;
24423 if (notYetInitialised) {
24424 return;
24425 }
24426 if (scrollLeft === undefined) {
24427 scrollLeft = this.centerRowContainerCtrl.getCenterViewportScrollLeft();
24428 }
24429 var offset = this.enableRtl ? scrollLeft : -scrollLeft;
24430 var topCenterContainer = this.ctrlsService.getTopCenterRowContainerCtrl();
24431 var bottomCenterContainer = this.ctrlsService.getBottomCenterRowContainerCtrl();
24432 var fakeHScroll = this.ctrlsService.getFakeHScrollCtrl();
24433 var centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();
24434 centerHeaderContainer.setHorizontalScroll(offset);
24435 bottomCenterContainer.setContainerTranslateX(offset);
24436 topCenterContainer.setContainerTranslateX(offset);
24437 var partner = this.lastHorizontalScrollElement === this.centerRowContainerCtrl.getViewportElement() ?
24438 fakeHScroll.getViewport() : this.centerRowContainerCtrl.getViewportElement();
24439 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setScrollLeft"])(partner, Math.abs(scrollLeft), this.enableRtl);
24440 };
24441 GridBodyScrollFeature.prototype.isControllingScroll = function (eDiv) {
24442 if (!this.lastHorizontalScrollElement) {
24443 this.lastHorizontalScrollElement = eDiv;
24444 return true;
24445 }
24446 return eDiv === this.lastHorizontalScrollElement;
24447 };
24448 GridBodyScrollFeature.prototype.onFakeHorizontalScroll = function () {
24449 var fakeHScrollViewport = this.ctrlsService.getFakeHScrollCtrl().getViewport();
24450 if (!this.isControllingScroll(fakeHScrollViewport)) {
24451 return;
24452 }
24453 this.onBodyHorizontalScroll(fakeHScrollViewport);
24454 };
24455 GridBodyScrollFeature.prototype.onCenterViewportScroll = function () {
24456 var centerContainerViewport = this.centerRowContainerCtrl.getViewportElement();
24457 if (!this.isControllingScroll(centerContainerViewport)) {
24458 return;
24459 }
24460 this.onBodyHorizontalScroll(centerContainerViewport);
24461 };
24462 GridBodyScrollFeature.prototype.onBodyHorizontalScroll = function (eSource) {
24463 var centerContainerViewport = this.centerRowContainerCtrl.getViewportElement();
24464 var scrollLeft = centerContainerViewport.scrollLeft;
24465 if (this.shouldBlockScrollUpdate('horizontal', scrollLeft, true)) {
24466 return;
24467 }
24468 // we do Math.round() rather than Math.floor(), to mirror how scroll values are applied.
24469 // eg if a scale is applied (ie user has zoomed the browser), then applying scroll=200
24470 // could result in 199.88, which then floor(199.88) = 199, however round(199.88) = 200.
24471 // initially Math.floor() was used, however this caused (almost) infinite loop with aligned grids,
24472 // as the scroll would move 1px at at time bouncing from one grid to the next (eg one grid would cause
24473 // scroll to 200px, the next to 199px, then the first back to 198px and so on).
24474 this.doHorizontalScroll(Math.round(Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["getScrollLeft"])(eSource, this.enableRtl)));
24475 this.resetLastHorizontalScrollElementDebounced();
24476 };
24477 GridBodyScrollFeature.prototype.onVerticalScroll = function () {
24478 var scrollTop = this.eBodyViewport.scrollTop;
24479 if (this.shouldBlockScrollUpdate('vertical', scrollTop, true)) {
24480 return;
24481 }
24482 this.animationFrameService.setScrollTop(scrollTop);
24483 this.nextScrollTop = scrollTop;
24484 if (this.gridOptionsWrapper.isSuppressAnimationFrame()) {
24485 this.scrollTop = this.nextScrollTop;
24486 this.redrawRowsAfterScroll();
24487 }
24488 else {
24489 this.animationFrameService.schedule();
24490 }
24491 };
24492 GridBodyScrollFeature.prototype.resetLastHorizontalScrollElement = function () {
24493 this.lastHorizontalScrollElement = null;
24494 };
24495 GridBodyScrollFeature.prototype.doHorizontalScroll = function (scrollLeft) {
24496 var fakeHScrollViewport = this.ctrlsService.getFakeHScrollCtrl().getViewport();
24497 var fakeScrollLeft = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["getScrollLeft"])(fakeHScrollViewport, this.enableRtl);
24498 if (this.scrollLeft === scrollLeft && scrollLeft === fakeScrollLeft) {
24499 return;
24500 }
24501 this.scrollLeft = scrollLeft;
24502 this.fireScrollEvent('horizontal');
24503 this.horizontallyScrollHeaderCenterAndFloatingCenter(scrollLeft);
24504 this.onHorizontalViewportChanged();
24505 };
24506 GridBodyScrollFeature.prototype.fireScrollEvent = function (direction) {
24507 var _this = this;
24508 var bodyScrollEvent = {
24509 type: _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_BODY_SCROLL,
24510 api: this.gridApi,
24511 columnApi: this.columnApi,
24512 direction: direction,
24513 left: this.scrollLeft,
24514 top: this.scrollTop
24515 };
24516 this.eventService.dispatchEvent(bodyScrollEvent);
24517 window.clearTimeout(this.scrollTimer);
24518 this.scrollTimer = undefined;
24519 this.scrollTimer = window.setTimeout(function () {
24520 var bodyScrollEndEvent = Object.assign({}, bodyScrollEvent, {
24521 type: _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_BODY_SCROLL_END
24522 });
24523 _this.eventService.dispatchEvent(bodyScrollEndEvent);
24524 }, 100);
24525 };
24526 GridBodyScrollFeature.prototype.shouldBlockScrollUpdate = function (direction, scrollTo, touchOnly) {
24527 // touch devices allow elastic scroll - which temporally scrolls the panel outside of the viewport
24528 // (eg user uses touch to go to the left of the grid, but drags past the left, the rows will actually
24529 // scroll past the left until the user releases the mouse). when this happens, we want ignore the scroll,
24530 // as otherwise it was causing the rows and header to flicker.
24531 if (touchOnly === void 0) { touchOnly = false; }
24532 // sometimes when scrolling, we got values that extended the maximum scroll allowed. we used to
24533 // ignore these scrolls. problem is the max scroll position could be skipped (eg the previous scroll event
24534 // could be 10px before the max position, and then current scroll event could be 20px after the max position).
24535 // if we just ignored the last event, we would be setting the scroll to 10px before the max position, when in
24536 // actual fact the user has exceeded the max scroll and thus scroll should be set to the max.
24537 if (touchOnly && !Object(_utils_browser__WEBPACK_IMPORTED_MODULE_5__["isIOSUserAgent"])()) {
24538 return false;
24539 }
24540 if (direction === 'vertical') {
24541 var clientHeight = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["getInnerHeight"])(this.eBodyViewport);
24542 var scrollHeight = this.eBodyViewport.scrollHeight;
24543 if (scrollTo < 0 || (scrollTo + clientHeight > scrollHeight)) {
24544 return true;
24545 }
24546 }
24547 if (direction === 'horizontal') {
24548 var clientWidth = this.centerRowContainerCtrl.getCenterWidth();
24549 var scrollWidth = this.centerRowContainerCtrl.getViewportElement().scrollWidth;
24550 if (this.enableRtl && Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isRtlNegativeScroll"])()) {
24551 if (scrollTo > 0) {
24552 return true;
24553 }
24554 }
24555 else if (scrollTo < 0) {
24556 return true;
24557 }
24558 if (Math.abs(scrollTo) + clientWidth > scrollWidth) {
24559 return true;
24560 }
24561 }
24562 return false;
24563 };
24564 GridBodyScrollFeature.prototype.redrawRowsAfterScroll = function () {
24565 this.fireScrollEvent('vertical');
24566 };
24567 GridBodyScrollFeature.prototype.onHorizontalViewportChanged = function () {
24568 this.centerRowContainerCtrl.onHorizontalViewportChanged();
24569 };
24570 // this is to cater for AG-3274, where grid is removed from the dom and then inserted back in again.
24571 // (which happens with some implementations of tabbing). this can result in horizontal scroll getting
24572 // reset back to the left, however no scroll event is fired. so we need to get header to also scroll
24573 // back to the left to be kept in sync.
24574 // adding and removing the grid from the DOM both resets the scroll position and
24575 // triggers a resize event, so notify listeners if the scroll position has changed
24576 GridBodyScrollFeature.prototype.checkScrollLeft = function () {
24577 if (this.scrollLeft !== this.centerRowContainerCtrl.getCenterViewportScrollLeft()) {
24578 this.onBodyHorizontalScroll(this.centerRowContainerCtrl.getViewportElement());
24579 }
24580 };
24581 GridBodyScrollFeature.prototype.executeAnimationFrameScroll = function () {
24582 var frameNeeded = this.scrollTop != this.nextScrollTop;
24583 if (frameNeeded) {
24584 this.scrollTop = this.nextScrollTop;
24585 this.redrawRowsAfterScroll();
24586 }
24587 return frameNeeded;
24588 };
24589 // called by scrollHorizontally method and alignedGridsService
24590 GridBodyScrollFeature.prototype.setHorizontalScrollPosition = function (hScrollPosition) {
24591 var minScrollLeft = 0;
24592 var maxScrollLeft = this.centerRowContainerCtrl.getViewportElement().scrollWidth - this.centerRowContainerCtrl.getCenterWidth();
24593 if (this.shouldBlockScrollUpdate('horizontal', hScrollPosition)) {
24594 if (this.enableRtl && Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isRtlNegativeScroll"])()) {
24595 hScrollPosition = hScrollPosition > 0 ? 0 : maxScrollLeft;
24596 }
24597 else {
24598 hScrollPosition = Math.min(Math.max(hScrollPosition, minScrollLeft), maxScrollLeft);
24599 }
24600 }
24601 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setScrollLeft"])(this.centerRowContainerCtrl.getViewportElement(), Math.abs(hScrollPosition), this.enableRtl);
24602 // we need to manually do the event handling (rather than wait for the event)
24603 // for the alignedGridsService, as if we don't, the aligned grid service gets
24604 // notified async, and then it's 'consuming' flag doesn't get used right, and
24605 // we can end up with an infinite loop
24606 this.doHorizontalScroll(hScrollPosition);
24607 };
24608 GridBodyScrollFeature.prototype.setVerticalScrollPosition = function (vScrollPosition) {
24609 this.eBodyViewport.scrollTop = vScrollPosition;
24610 };
24611 GridBodyScrollFeature.prototype.getVScrollPosition = function () {
24612 var result = {
24613 top: this.eBodyViewport.scrollTop,
24614 bottom: this.eBodyViewport.scrollTop + this.eBodyViewport.offsetHeight
24615 };
24616 return result;
24617 };
24618 GridBodyScrollFeature.prototype.getHScrollPosition = function () {
24619 return this.centerRowContainerCtrl.getHScrollPosition();
24620 };
24621 GridBodyScrollFeature.prototype.isHorizontalScrollShowing = function () {
24622 return this.centerRowContainerCtrl.isHorizontalScrollShowing();
24623 };
24624 // called by the headerRootComp and moveColumnController
24625 GridBodyScrollFeature.prototype.scrollHorizontally = function (pixels) {
24626 var oldScrollPosition = this.centerRowContainerCtrl.getViewportElement().scrollLeft;
24627 this.setHorizontalScrollPosition(oldScrollPosition + pixels);
24628 return this.centerRowContainerCtrl.getViewportElement().scrollLeft - oldScrollPosition;
24629 };
24630 // gets called by rowRenderer when new data loaded, as it will want to scroll to the top
24631 GridBodyScrollFeature.prototype.scrollToTop = function () {
24632 this.eBodyViewport.scrollTop = 0;
24633 };
24634 // Valid values for position are bottom, middle and top
24635 GridBodyScrollFeature.prototype.ensureNodeVisible = function (comparator, position) {
24636 if (position === void 0) { position = null; }
24637 // look for the node index we want to display
24638 var rowCount = this.rowModel.getRowCount();
24639 var comparatorIsAFunction = typeof comparator === 'function';
24640 var indexToSelect = -1;
24641 // go through all the nodes, find the one we want to show
24642 for (var i = 0; i < rowCount; i++) {
24643 var node = this.rowModel.getRow(i);
24644 if (comparatorIsAFunction) {
24645 if (comparator(node)) {
24646 indexToSelect = i;
24647 break;
24648 }
24649 }
24650 else {
24651 // check object equality against node and data
24652 if (comparator === node || comparator === node.data) {
24653 indexToSelect = i;
24654 break;
24655 }
24656 }
24657 }
24658 if (indexToSelect >= 0) {
24659 this.ensureIndexVisible(indexToSelect, position);
24660 }
24661 };
24662 // Valid values for position are bottom, middle and top
24663 // position should be {'top','middle','bottom', or undefined/null}.
24664 // if undefined/null, then the grid will to the minimal amount of scrolling,
24665 // eg if grid needs to scroll up, it scrolls until row is on top,
24666 // if grid needs to scroll down, it scrolls until row is on bottom,
24667 // if row is already in view, grid does not scroll
24668 GridBodyScrollFeature.prototype.ensureIndexVisible = function (index, position) {
24669 // if for print or auto height, everything is always visible
24670 if (this.gridOptionsWrapper.getDomLayout() === _constants_constants__WEBPACK_IMPORTED_MODULE_6__["Constants"].DOM_LAYOUT_PRINT) {
24671 return;
24672 }
24673 var rowCount = this.paginationProxy.getRowCount();
24674 if (typeof index !== 'number' || index < 0 || index >= rowCount) {
24675 console.warn('invalid row index for ensureIndexVisible: ' + index);
24676 return;
24677 }
24678 var isPaging = this.gridOptionsWrapper.isPagination();
24679 var paginationPanelEnabled = isPaging && !this.gridOptionsWrapper.isSuppressPaginationPanel();
24680 if (!paginationPanelEnabled) {
24681 this.paginationProxy.goToPageWithIndex(index);
24682 }
24683 var rowNode = this.paginationProxy.getRow(index);
24684 var rowGotShiftedDuringOperation;
24685 do {
24686 var startingRowTop = rowNode.rowTop;
24687 var startingRowHeight = rowNode.rowHeight;
24688 var paginationOffset = this.paginationProxy.getPixelOffset();
24689 var rowTopPixel = rowNode.rowTop - paginationOffset;
24690 var rowBottomPixel = rowTopPixel + rowNode.rowHeight;
24691 var scrollPosition = this.getVScrollPosition();
24692 var heightOffset = this.heightScaler.getDivStretchOffset();
24693 var vScrollTop = scrollPosition.top + heightOffset;
24694 var vScrollBottom = scrollPosition.bottom + heightOffset;
24695 var viewportHeight = vScrollBottom - vScrollTop;
24696 // work out the pixels for top, middle and bottom up front,
24697 // make the if/else below easier to read
24698 var pxTop = this.heightScaler.getScrollPositionForPixel(rowTopPixel);
24699 var pxBottom = this.heightScaler.getScrollPositionForPixel(rowBottomPixel - viewportHeight);
24700 // make sure if middle, the row is not outside the top of the grid
24701 var pxMiddle = Math.min((pxTop + pxBottom) / 2, rowTopPixel);
24702 var rowBelowViewport = vScrollTop > rowTopPixel;
24703 var rowAboveViewport = vScrollBottom < rowBottomPixel;
24704 var newScrollPosition = null;
24705 if (position === 'top') {
24706 newScrollPosition = pxTop;
24707 }
24708 else if (position === 'bottom') {
24709 newScrollPosition = pxBottom;
24710 }
24711 else if (position === 'middle') {
24712 newScrollPosition = pxMiddle;
24713 }
24714 else if (rowBelowViewport) {
24715 // if row is before, scroll up with row at top
24716 newScrollPosition = pxTop;
24717 }
24718 else if (rowAboveViewport) {
24719 // if row is below, scroll down with row at bottom
24720 newScrollPosition = pxBottom;
24721 }
24722 if (newScrollPosition !== null) {
24723 this.eBodyViewport.scrollTop = newScrollPosition;
24724 this.rowRenderer.redrawAfterScroll();
24725 }
24726 // the row can get shifted if during the rendering (during rowRenderer.redrawAfterScroll()),
24727 // the height of a row changes due to lazy calculation of row heights when using
24728 // colDef.autoHeight or gridOptions.getRowHeight.
24729 // if row was shifted, then the position we scrolled to is incorrect.
24730 rowGotShiftedDuringOperation = (startingRowTop !== rowNode.rowTop)
24731 || (startingRowHeight !== rowNode.rowHeight);
24732 } while (rowGotShiftedDuringOperation);
24733 // so when we return back to user, the cells have rendered
24734 this.animationFrameService.flushAllFrames();
24735 };
24736 GridBodyScrollFeature.prototype.ensureColumnVisible = function (key, position) {
24737 if (position === void 0) { position = 'auto'; }
24738 var column = this.columnModel.getGridColumn(key);
24739 if (!column) {
24740 return;
24741 }
24742 // calling ensureColumnVisible on a pinned column doesn't make sense
24743 if (column.isPinned()) {
24744 return;
24745 }
24746 // defensive
24747 if (!this.columnModel.isColumnDisplayed(column)) {
24748 return;
24749 }
24750 var newHorizontalScroll = this.getPositionedHorizontalScroll(column, position);
24751 if (newHorizontalScroll !== null) {
24752 this.centerRowContainerCtrl.setCenterViewportScrollLeft(newHorizontalScroll);
24753 }
24754 // this will happen anyway, as the move will cause a 'scroll' event on the body, however
24755 // it is possible that the ensureColumnVisible method is called from within AG Grid and
24756 // the caller will need to have the columns rendered to continue, which will be before
24757 // the event has been worked on (which is the case for cell navigation).
24758 this.centerRowContainerCtrl.onHorizontalViewportChanged();
24759 // so when we return back to user, the cells have rendered
24760 this.animationFrameService.flushAllFrames();
24761 };
24762 GridBodyScrollFeature.prototype.getPositionedHorizontalScroll = function (column, position) {
24763 var _a = this.isColumnOutsideViewport(column), columnBeforeStart = _a.columnBeforeStart, columnAfterEnd = _a.columnAfterEnd;
24764 var viewportTooSmallForColumn = this.centerRowContainerCtrl.getCenterWidth() < column.getActualWidth();
24765 var viewportWidth = this.centerRowContainerCtrl.getCenterWidth();
24766 var isRtl = this.enableRtl;
24767 var alignColToStart = (isRtl ? columnBeforeStart : columnAfterEnd) || viewportTooSmallForColumn;
24768 var alignColToEnd = isRtl ? columnAfterEnd : columnBeforeStart;
24769 if (position !== 'auto') {
24770 alignColToStart = position === 'start';
24771 alignColToEnd = position === 'end';
24772 }
24773 var isMiddle = position === 'middle';
24774 if (alignColToStart || alignColToEnd || isMiddle) {
24775 var _b = this.getColumnBounds(column), colLeft = _b.colLeft, colMiddle = _b.colMiddle, colRight = _b.colRight;
24776 if (isMiddle) {
24777 return colMiddle - viewportWidth / 2;
24778 }
24779 if (alignColToStart) {
24780 return isRtl ? colRight : colLeft;
24781 }
24782 return isRtl ? (colLeft - viewportWidth) : (colRight - viewportWidth);
24783 }
24784 return null;
24785 };
24786 GridBodyScrollFeature.prototype.isColumnOutsideViewport = function (column) {
24787 var _a = this.getViewportBounds(), viewportStart = _a.start, viewportEnd = _a.end;
24788 var _b = this.getColumnBounds(column), colLeft = _b.colLeft, colRight = _b.colRight;
24789 var isRtl = this.enableRtl;
24790 var columnBeforeStart = isRtl ? (viewportStart > colRight) : (viewportEnd < colRight);
24791 var columnAfterEnd = isRtl ? (viewportEnd < colLeft) : (viewportStart > colLeft);
24792 return { columnBeforeStart: columnBeforeStart, columnAfterEnd: columnAfterEnd };
24793 };
24794 GridBodyScrollFeature.prototype.getColumnBounds = function (column) {
24795 var isRtl = this.enableRtl;
24796 var bodyWidth = this.columnModel.getBodyContainerWidth();
24797 var colWidth = column.getActualWidth();
24798 var colLeft = column.getLeft();
24799 var multiplier = isRtl ? -1 : 1;
24800 var colLeftPixel = isRtl ? (bodyWidth - colLeft) : colLeft;
24801 var colRightPixel = colLeftPixel + colWidth * multiplier;
24802 var colMidPixel = colLeftPixel + colWidth / 2 * multiplier;
24803 return { colLeft: colLeftPixel, colMiddle: colMidPixel, colRight: colRightPixel };
24804 };
24805 GridBodyScrollFeature.prototype.getViewportBounds = function () {
24806 var viewportWidth = this.centerRowContainerCtrl.getCenterWidth();
24807 var scrollPosition = this.centerRowContainerCtrl.getCenterViewportScrollLeft();
24808 var viewportStartPixel = scrollPosition;
24809 var viewportEndPixel = viewportWidth + scrollPosition;
24810 return { start: viewportStartPixel, end: viewportEndPixel, width: viewportWidth };
24811 };
24812 __decorate([
24813 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
24814 ], GridBodyScrollFeature.prototype, "ctrlsService", void 0);
24815 __decorate([
24816 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('animationFrameService')
24817 ], GridBodyScrollFeature.prototype, "animationFrameService", void 0);
24818 __decorate([
24819 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
24820 ], GridBodyScrollFeature.prototype, "columnApi", void 0);
24821 __decorate([
24822 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
24823 ], GridBodyScrollFeature.prototype, "gridApi", void 0);
24824 __decorate([
24825 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
24826 ], GridBodyScrollFeature.prototype, "paginationProxy", void 0);
24827 __decorate([
24828 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
24829 ], GridBodyScrollFeature.prototype, "rowModel", void 0);
24830 __decorate([
24831 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowContainerHeightService')
24832 ], GridBodyScrollFeature.prototype, "heightScaler", void 0);
24833 __decorate([
24834 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
24835 ], GridBodyScrollFeature.prototype, "rowRenderer", void 0);
24836 __decorate([
24837 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
24838 ], GridBodyScrollFeature.prototype, "columnModel", void 0);
24839 __decorate([
24840 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
24841 ], GridBodyScrollFeature.prototype, "postConstruct", null);
24842 return GridBodyScrollFeature;
24843}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
24844
24845
24846
24847
24848
24849/***/ }),
24850/* 116 */
24851/***/ (function(module, __webpack_exports__, __webpack_require__) {
24852
24853"use strict";
24854__webpack_require__.r(__webpack_exports__);
24855/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowDragFeature", function() { return RowDragFeature; });
24856/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97);
24857/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
24858/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24);
24859/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94);
24860/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18);
24861/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20);
24862/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7);
24863/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14);
24864/* harmony import */ var _autoScrollService__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(117);
24865/**
24866 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
24867 * @version v27.3.0
24868 * @link https://www.ag-grid.com/
24869 * @license MIT
24870 */
24871var __extends = (undefined && undefined.__extends) || (function () {
24872 var extendStatics = function (d, b) {
24873 extendStatics = Object.setPrototypeOf ||
24874 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24875 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24876 return extendStatics(d, b);
24877 };
24878 return function (d, b) {
24879 extendStatics(d, b);
24880 function __() { this.constructor = d; }
24881 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24882 };
24883})();
24884var __assign = (undefined && undefined.__assign) || function () {
24885 __assign = Object.assign || function(t) {
24886 for (var s, i = 1, n = arguments.length; i < n; i++) {
24887 s = arguments[i];
24888 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
24889 t[p] = s[p];
24890 }
24891 return t;
24892 };
24893 return __assign.apply(this, arguments);
24894};
24895var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
24896 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
24897 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
24898 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
24899 return c > 3 && r && Object.defineProperty(target, key, r), r;
24900};
24901var __read = (undefined && undefined.__read) || function (o, n) {
24902 var m = typeof Symbol === "function" && o[Symbol.iterator];
24903 if (!m) return o;
24904 var i = m.call(o), r, ar = [], e;
24905 try {
24906 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
24907 }
24908 catch (error) { e = { error: error }; }
24909 finally {
24910 try {
24911 if (r && !r.done && (m = i["return"])) m.call(i);
24912 }
24913 finally { if (e) throw e.error; }
24914 }
24915 return ar;
24916};
24917var __spread = (undefined && undefined.__spread) || function () {
24918 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
24919 return ar;
24920};
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930var RowDragFeature = /** @class */ (function (_super) {
24931 __extends(RowDragFeature, _super);
24932 function RowDragFeature(eContainer) {
24933 var _this = _super.call(this) || this;
24934 _this.isMultiRowDrag = false;
24935 _this.isGridSorted = false;
24936 _this.isGridFiltered = false;
24937 _this.isRowGroupActive = false;
24938 _this.eContainer = eContainer;
24939 return _this;
24940 }
24941 RowDragFeature.prototype.postConstruct = function () {
24942 var _this = this;
24943 if (this.gridOptionsWrapper.isRowModelDefault()) {
24944 this.clientSideRowModel = this.rowModel;
24945 }
24946 var refreshStatus = function () {
24947 _this.onSortChanged();
24948 _this.onFilterChanged();
24949 _this.onRowGroupChanged();
24950 };
24951 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SORT_CHANGED, this.onSortChanged.bind(this));
24952 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));
24953 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, this.onRowGroupChanged.bind(this));
24954 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_MODEL_UPDATED, function () {
24955 refreshStatus();
24956 });
24957 refreshStatus();
24958 this.ctrlsService.whenReady(function () {
24959 var gridBodyCon = _this.ctrlsService.getGridBodyCtrl();
24960 _this.autoScrollService = new _autoScrollService__WEBPACK_IMPORTED_MODULE_8__["AutoScrollService"]({
24961 scrollContainer: gridBodyCon.getBodyViewportElement(),
24962 scrollAxis: 'y',
24963 getVerticalPosition: function () { return gridBodyCon.getScrollFeature().getVScrollPosition().top; },
24964 setVerticalPosition: function (position) { return gridBodyCon.getScrollFeature().setVerticalScrollPosition(position); },
24965 onScrollCallback: function () { _this.onDragging(_this.lastDraggingEvent); }
24966 });
24967 });
24968 };
24969 RowDragFeature.prototype.onSortChanged = function () {
24970 this.isGridSorted = this.sortController.isSortActive();
24971 };
24972 RowDragFeature.prototype.onFilterChanged = function () {
24973 this.isGridFiltered = this.filterManager.isAnyFilterPresent();
24974 };
24975 RowDragFeature.prototype.onRowGroupChanged = function () {
24976 var rowGroups = this.columnModel.getRowGroupColumns();
24977 this.isRowGroupActive = !Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missingOrEmpty"])(rowGroups);
24978 };
24979 RowDragFeature.prototype.getContainer = function () {
24980 return this.eContainer;
24981 };
24982 RowDragFeature.prototype.isInterestedIn = function (type) {
24983 return type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragSourceType"].RowDrag;
24984 };
24985 RowDragFeature.prototype.getIconName = function () {
24986 var managedDrag = this.gridOptionsWrapper.isRowDragManaged();
24987 if (managedDrag && this.shouldPreventRowMove()) {
24988 return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragAndDropService"].ICON_NOT_ALLOWED;
24989 }
24990 return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragAndDropService"].ICON_MOVE;
24991 };
24992 RowDragFeature.prototype.shouldPreventRowMove = function () {
24993 return this.isGridSorted || this.isGridFiltered || this.isRowGroupActive;
24994 };
24995 RowDragFeature.prototype.getRowNodes = function (draggingEvent) {
24996 var _this = this;
24997 if (!this.isFromThisGrid(draggingEvent)) {
24998 return draggingEvent.dragItem.rowNodes || [];
24999 }
25000 var isRowDragMultiRow = this.gridOptionsWrapper.isRowDragMultiRow();
25001 var selectedNodes = __spread(this.selectionService.getSelectedNodes()).sort(function (a, b) { return _this.getRowIndexNumber(a) - _this.getRowIndexNumber(b); });
25002 var currentNode = draggingEvent.dragItem.rowNode;
25003 if (isRowDragMultiRow && selectedNodes.indexOf(currentNode) !== -1) {
25004 this.isMultiRowDrag = true;
25005 return selectedNodes;
25006 }
25007 this.isMultiRowDrag = false;
25008 return [currentNode];
25009 };
25010 RowDragFeature.prototype.onDragEnter = function (draggingEvent) {
25011 // builds a lits of all rows being dragged before firing events
25012 draggingEvent.dragItem.rowNodes = this.getRowNodes(draggingEvent);
25013 // when entering, we fire the enter event, then in onEnterOrDragging,
25014 // we also fire the move event. so we get both events when entering.
25015 this.dispatchGridEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_ENTER, draggingEvent);
25016 this.getRowNodes(draggingEvent).forEach(function (rowNode) {
25017 rowNode.setDragging(true);
25018 });
25019 this.onEnterOrDragging(draggingEvent);
25020 };
25021 RowDragFeature.prototype.onDragging = function (draggingEvent) {
25022 this.onEnterOrDragging(draggingEvent);
25023 };
25024 RowDragFeature.prototype.isFromThisGrid = function (draggingEvent) {
25025 var dragSourceDomDataKey = draggingEvent.dragSource.dragSourceDomDataKey;
25026 return dragSourceDomDataKey === this.gridOptionsWrapper.getDomDataKey();
25027 };
25028 RowDragFeature.prototype.isDropZoneWithinThisGrid = function (draggingEvent) {
25029 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
25030 var gridGui = gridBodyCon.getGui();
25031 var dropZoneTarget = draggingEvent.dropZoneTarget;
25032 return !gridGui.contains(dropZoneTarget);
25033 };
25034 RowDragFeature.prototype.onEnterOrDragging = function (draggingEvent) {
25035 // this event is fired for enter and move
25036 this.dispatchGridEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_MOVE, draggingEvent);
25037 this.lastDraggingEvent = draggingEvent;
25038 var pixel = this.mouseEventService.getNormalisedPosition(draggingEvent).y;
25039 var managedDrag = this.gridOptionsWrapper.isRowDragManaged();
25040 if (managedDrag) {
25041 this.doManagedDrag(draggingEvent, pixel);
25042 }
25043 this.autoScrollService.check(draggingEvent.event);
25044 };
25045 RowDragFeature.prototype.doManagedDrag = function (draggingEvent, pixel) {
25046 var isFromThisGrid = this.isFromThisGrid(draggingEvent);
25047 var managedDrag = this.gridOptionsWrapper.isRowDragManaged();
25048 var rowNodes = draggingEvent.dragItem.rowNodes;
25049 if (managedDrag && this.shouldPreventRowMove()) {
25050 return;
25051 }
25052 if (this.gridOptionsWrapper.isSuppressMoveWhenRowDragging() || !isFromThisGrid) {
25053 if (!this.isDropZoneWithinThisGrid(draggingEvent)) {
25054 this.clientSideRowModel.highlightRowAtPixel(rowNodes[0], pixel);
25055 }
25056 }
25057 else {
25058 this.moveRows(rowNodes, pixel);
25059 }
25060 };
25061 RowDragFeature.prototype.getRowIndexNumber = function (rowNode) {
25062 return parseInt(Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(rowNode.getRowIndexString().split('-')), 10);
25063 };
25064 RowDragFeature.prototype.moveRowAndClearHighlight = function (draggingEvent) {
25065 var _this = this;
25066 var lastHighlightedRowNode = this.clientSideRowModel.getLastHighlightedRowNode();
25067 var isBelow = lastHighlightedRowNode && lastHighlightedRowNode.highlighted === _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__["RowHighlightPosition"].Below;
25068 var pixel = this.mouseEventService.getNormalisedPosition(draggingEvent).y;
25069 var rowNodes = draggingEvent.dragItem.rowNodes;
25070 var increment = isBelow ? 1 : 0;
25071 if (this.isFromThisGrid(draggingEvent)) {
25072 rowNodes.forEach(function (rowNode) {
25073 if (rowNode.rowTop < pixel) {
25074 increment -= 1;
25075 }
25076 });
25077 this.moveRows(rowNodes, pixel, increment);
25078 }
25079 else {
25080 var getRowIdFunc_1 = this.gridOptionsWrapper.getRowIdFunc();
25081 var addIndex = this.clientSideRowModel.getRowIndexAtPixel(pixel) + 1;
25082 if (this.clientSideRowModel.getHighlightPosition(pixel) === _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__["RowHighlightPosition"].Above) {
25083 addIndex--;
25084 }
25085 this.clientSideRowModel.updateRowData({
25086 add: rowNodes
25087 .map(function (node) { return node.data; })
25088 .filter(function (data) { return !_this.clientSideRowModel.getRowNode(getRowIdFunc_1 ? getRowIdFunc_1({ data: data, level: 0 }) : data.id); }),
25089 addIndex: addIndex
25090 });
25091 }
25092 this.clearRowHighlight();
25093 };
25094 RowDragFeature.prototype.clearRowHighlight = function () {
25095 this.clientSideRowModel.highlightRowAtPixel(null);
25096 };
25097 RowDragFeature.prototype.moveRows = function (rowNodes, pixel, increment) {
25098 if (increment === void 0) { increment = 0; }
25099 var rowWasMoved = this.clientSideRowModel.ensureRowsAtPixel(rowNodes, pixel, increment);
25100 if (rowWasMoved) {
25101 this.focusService.clearFocusedCell();
25102 if (this.rangeService) {
25103 this.rangeService.removeAllCellRanges();
25104 }
25105 }
25106 };
25107 RowDragFeature.prototype.addRowDropZone = function (params) {
25108 var _this = this;
25109 if (!params.getContainer()) {
25110 Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["doOnce"])(function () { return console.warn('AG Grid: addRowDropZone - A container target needs to be provided'); }, 'add-drop-zone-empty-target');
25111 return;
25112 }
25113 if (this.dragAndDropService.findExternalZone(params)) {
25114 console.warn('AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.');
25115 return;
25116 }
25117 var processedParams = {
25118 getContainer: params.getContainer
25119 };
25120 if (params.fromGrid) {
25121 params.fromGrid = undefined;
25122 processedParams = params;
25123 }
25124 else {
25125 if (params.onDragEnter) {
25126 processedParams.onDragEnter = function (e) {
25127 params.onDragEnter(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_ENTER, e));
25128 };
25129 }
25130 if (params.onDragLeave) {
25131 processedParams.onDragLeave = function (e) {
25132 params.onDragLeave(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_LEAVE, e));
25133 };
25134 }
25135 if (params.onDragging) {
25136 processedParams.onDragging = function (e) {
25137 params.onDragging(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_MOVE, e));
25138 };
25139 }
25140 if (params.onDragStop) {
25141 processedParams.onDragStop = function (e) {
25142 params.onDragStop(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_END, e));
25143 };
25144 }
25145 }
25146 this.dragAndDropService.addDropTarget(__assign({ isInterestedIn: function (type) { return type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragSourceType"].RowDrag; }, getIconName: function () { return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragAndDropService"].ICON_MOVE; }, external: true }, processedParams));
25147 };
25148 RowDragFeature.prototype.getRowDropZone = function (events) {
25149 var _this = this;
25150 var getContainer = this.getContainer.bind(this);
25151 var onDragEnter = this.onDragEnter.bind(this);
25152 var onDragLeave = this.onDragLeave.bind(this);
25153 var onDragging = this.onDragging.bind(this);
25154 var onDragStop = this.onDragStop.bind(this);
25155 if (!events) {
25156 return { getContainer: getContainer, onDragEnter: onDragEnter, onDragLeave: onDragLeave, onDragging: onDragging, onDragStop: onDragStop, /* @private */ fromGrid: true };
25157 }
25158 return {
25159 getContainer: getContainer,
25160 onDragEnter: events.onDragEnter
25161 ? (function (e) {
25162 onDragEnter(e);
25163 events.onDragEnter(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_ENTER, e));
25164 })
25165 : onDragEnter,
25166 onDragLeave: events.onDragLeave
25167 ? (function (e) {
25168 onDragLeave(e);
25169 events.onDragLeave(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_LEAVE, e));
25170 })
25171 : onDragLeave,
25172 onDragging: events.onDragging
25173 ? (function (e) {
25174 onDragging(e);
25175 events.onDragging(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_MOVE, e));
25176 })
25177 : onDragging,
25178 onDragStop: events.onDragStop
25179 ? (function (e) {
25180 onDragStop(e);
25181 events.onDragStop(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_END, e));
25182 })
25183 : onDragStop,
25184 fromGrid: true /* @private */
25185 };
25186 };
25187 RowDragFeature.prototype.draggingToRowDragEvent = function (type, draggingEvent) {
25188 var yNormalised = this.mouseEventService.getNormalisedPosition(draggingEvent).y;
25189 var mouseIsPastLastRow = yNormalised > this.paginationProxy.getCurrentPageHeight();
25190 var overIndex = -1;
25191 var overNode;
25192 if (!mouseIsPastLastRow) {
25193 overIndex = this.rowModel.getRowIndexAtPixel(yNormalised);
25194 overNode = this.rowModel.getRow(overIndex);
25195 }
25196 var vDirectionString;
25197 switch (draggingEvent.vDirection) {
25198 case _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["VerticalDirection"].Down:
25199 vDirectionString = 'down';
25200 break;
25201 case _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["VerticalDirection"].Up:
25202 vDirectionString = 'up';
25203 break;
25204 default:
25205 vDirectionString = null;
25206 break;
25207 }
25208 var event = {
25209 type: type,
25210 api: this.gridOptionsWrapper.getApi(),
25211 columnApi: this.gridOptionsWrapper.getColumnApi(),
25212 event: draggingEvent.event,
25213 node: draggingEvent.dragItem.rowNode,
25214 nodes: draggingEvent.dragItem.rowNodes,
25215 overIndex: overIndex,
25216 overNode: overNode,
25217 y: yNormalised,
25218 vDirection: vDirectionString
25219 };
25220 return event;
25221 };
25222 RowDragFeature.prototype.dispatchGridEvent = function (type, draggingEvent) {
25223 var event = this.draggingToRowDragEvent(type, draggingEvent);
25224 this.eventService.dispatchEvent(event);
25225 };
25226 RowDragFeature.prototype.onDragLeave = function (draggingEvent) {
25227 this.dispatchGridEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_LEAVE, draggingEvent);
25228 this.stopDragging(draggingEvent);
25229 if (this.gridOptionsWrapper.isRowDragManaged()) {
25230 this.clearRowHighlight();
25231 }
25232 if (this.isFromThisGrid(draggingEvent)) {
25233 this.isMultiRowDrag = false;
25234 }
25235 };
25236 RowDragFeature.prototype.onDragStop = function (draggingEvent) {
25237 this.dispatchGridEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_END, draggingEvent);
25238 this.stopDragging(draggingEvent);
25239 if (this.gridOptionsWrapper.isRowDragManaged() &&
25240 (this.gridOptionsWrapper.isSuppressMoveWhenRowDragging() || !this.isFromThisGrid(draggingEvent)) &&
25241 !this.isDropZoneWithinThisGrid(draggingEvent)) {
25242 this.moveRowAndClearHighlight(draggingEvent);
25243 }
25244 };
25245 RowDragFeature.prototype.stopDragging = function (draggingEvent) {
25246 this.autoScrollService.ensureCleared();
25247 this.getRowNodes(draggingEvent).forEach(function (rowNode) {
25248 rowNode.setDragging(false);
25249 });
25250 };
25251 __decorate([
25252 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragAndDropService')
25253 ], RowDragFeature.prototype, "dragAndDropService", void 0);
25254 __decorate([
25255 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowModel')
25256 ], RowDragFeature.prototype, "rowModel", void 0);
25257 __decorate([
25258 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('paginationProxy')
25259 ], RowDragFeature.prototype, "paginationProxy", void 0);
25260 __decorate([
25261 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
25262 ], RowDragFeature.prototype, "columnModel", void 0);
25263 __decorate([
25264 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('focusService')
25265 ], RowDragFeature.prototype, "focusService", void 0);
25266 __decorate([
25267 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('sortController')
25268 ], RowDragFeature.prototype, "sortController", void 0);
25269 __decorate([
25270 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('filterManager')
25271 ], RowDragFeature.prototype, "filterManager", void 0);
25272 __decorate([
25273 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('selectionService')
25274 ], RowDragFeature.prototype, "selectionService", void 0);
25275 __decorate([
25276 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('mouseEventService')
25277 ], RowDragFeature.prototype, "mouseEventService", void 0);
25278 __decorate([
25279 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
25280 ], RowDragFeature.prototype, "ctrlsService", void 0);
25281 __decorate([
25282 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('rangeService')
25283 ], RowDragFeature.prototype, "rangeService", void 0);
25284 __decorate([
25285 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnApi')
25286 ], RowDragFeature.prototype, "columnApi", void 0);
25287 __decorate([
25288 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridApi')
25289 ], RowDragFeature.prototype, "gridApi", void 0);
25290 __decorate([
25291 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
25292 ], RowDragFeature.prototype, "postConstruct", null);
25293 return RowDragFeature;
25294}(_context_beanStub__WEBPACK_IMPORTED_MODULE_5__["BeanStub"]));
25295
25296
25297
25298
25299
25300/***/ }),
25301/* 117 */
25302/***/ (function(module, __webpack_exports__, __webpack_require__) {
25303
25304"use strict";
25305__webpack_require__.r(__webpack_exports__);
25306/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutoScrollService", function() { return AutoScrollService; });
25307/**
25308 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
25309 * @version v27.3.0
25310 * @link https://www.ag-grid.com/
25311 * @license MIT
25312 */
25313var AutoScrollService = /** @class */ (function () {
25314 function AutoScrollService(params) {
25315 this.tickingInterval = null;
25316 this.onScrollCallback = null;
25317 this.scrollContainer = params.scrollContainer;
25318 this.scrollHorizontally = params.scrollAxis.indexOf('x') !== -1;
25319 this.scrollVertically = params.scrollAxis.indexOf('y') !== -1;
25320 this.scrollByTick = params.scrollByTick != null ? params.scrollByTick : 20;
25321 if (params.onScrollCallback) {
25322 this.onScrollCallback = params.onScrollCallback;
25323 }
25324 if (this.scrollVertically) {
25325 this.getVerticalPosition = params.getVerticalPosition;
25326 this.setVerticalPosition = params.setVerticalPosition;
25327 }
25328 if (this.scrollHorizontally) {
25329 this.getHorizontalPosition = params.getHorizontalPosition;
25330 this.setHorizontalPosition = params.setHorizontalPosition;
25331 }
25332 this.shouldSkipVerticalScroll = params.shouldSkipVerticalScroll || (function () { return false; });
25333 this.shouldSkipHorizontalScroll = params.shouldSkipHorizontalScroll || (function () { return false; });
25334 }
25335 AutoScrollService.prototype.check = function (mouseEvent, forceSkipVerticalScroll) {
25336 if (forceSkipVerticalScroll === void 0) { forceSkipVerticalScroll = false; }
25337 var skipVerticalScroll = forceSkipVerticalScroll || this.shouldSkipVerticalScroll();
25338 if (skipVerticalScroll && this.shouldSkipHorizontalScroll()) {
25339 return;
25340 }
25341 var rect = this.scrollContainer.getBoundingClientRect();
25342 var scrollTick = this.scrollByTick;
25343 this.tickLeft = mouseEvent.clientX < (rect.left + scrollTick);
25344 this.tickRight = mouseEvent.clientX > (rect.right - scrollTick);
25345 this.tickUp = mouseEvent.clientY < (rect.top + scrollTick) && !skipVerticalScroll;
25346 this.tickDown = mouseEvent.clientY > (rect.bottom - scrollTick) && !skipVerticalScroll;
25347 if (this.tickLeft || this.tickRight || this.tickUp || this.tickDown) {
25348 this.ensureTickingStarted();
25349 }
25350 else {
25351 this.ensureCleared();
25352 }
25353 };
25354 AutoScrollService.prototype.ensureTickingStarted = function () {
25355 if (this.tickingInterval === null) {
25356 this.tickingInterval = window.setInterval(this.doTick.bind(this), 100);
25357 this.tickCount = 0;
25358 }
25359 };
25360 AutoScrollService.prototype.doTick = function () {
25361 this.tickCount++;
25362 var tickAmount;
25363 tickAmount = this.tickCount > 20 ? 200 : (this.tickCount > 10 ? 80 : 40);
25364 if (this.scrollVertically) {
25365 var vScrollPosition = this.getVerticalPosition();
25366 if (this.tickUp) {
25367 this.setVerticalPosition(vScrollPosition - tickAmount);
25368 }
25369 if (this.tickDown) {
25370 this.setVerticalPosition(vScrollPosition + tickAmount);
25371 }
25372 }
25373 if (this.scrollHorizontally) {
25374 var hScrollPosition = this.getHorizontalPosition();
25375 if (this.tickLeft) {
25376 this.setHorizontalPosition(hScrollPosition - tickAmount);
25377 }
25378 if (this.tickRight) {
25379 this.setHorizontalPosition(hScrollPosition + tickAmount);
25380 }
25381 }
25382 if (this.onScrollCallback) {
25383 this.onScrollCallback();
25384 }
25385 };
25386 AutoScrollService.prototype.ensureCleared = function () {
25387 if (this.tickingInterval) {
25388 window.clearInterval(this.tickingInterval);
25389 this.tickingInterval = null;
25390 }
25391 };
25392 return AutoScrollService;
25393}());
25394
25395
25396
25397
25398
25399/***/ }),
25400/* 118 */
25401/***/ (function(module, __webpack_exports__, __webpack_require__) {
25402
25403"use strict";
25404__webpack_require__.r(__webpack_exports__);
25405/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerName", function() { return RowContainerName; });
25406/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerType", function() { return RowContainerType; });
25407/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRowContainerTypeForName", function() { return getRowContainerTypeForName; });
25408/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerCtrl", function() { return RowContainerCtrl; });
25409/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
25410/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
25411/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24);
25412/* harmony import */ var _rowContainerEventsFeature__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(119);
25413/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
25414/* harmony import */ var _viewportSizeFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(131);
25415/* harmony import */ var _utils_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(27);
25416/* harmony import */ var _setPinnedLeftWidthFeature__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(132);
25417/* harmony import */ var _setPinnedRightWidthFeature__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(133);
25418/* harmony import */ var _setHeightFeature__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(134);
25419/* harmony import */ var _dragListenerFeature__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(135);
25420/* harmony import */ var _centerWidthFeature__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(136);
25421/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(15);
25422/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(112);
25423/**
25424 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
25425 * @version v27.3.0
25426 * @link https://www.ag-grid.com/
25427 * @license MIT
25428 */
25429var __extends = (undefined && undefined.__extends) || (function () {
25430 var extendStatics = function (d, b) {
25431 extendStatics = Object.setPrototypeOf ||
25432 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25433 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
25434 return extendStatics(d, b);
25435 };
25436 return function (d, b) {
25437 extendStatics(d, b);
25438 function __() { this.constructor = d; }
25439 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
25440 };
25441})();
25442var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
25443 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
25444 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
25445 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
25446 return c > 3 && r && Object.defineProperty(target, key, r), r;
25447};
25448var __read = (undefined && undefined.__read) || function (o, n) {
25449 var m = typeof Symbol === "function" && o[Symbol.iterator];
25450 if (!m) return o;
25451 var i = m.call(o), r, ar = [], e;
25452 try {
25453 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
25454 }
25455 catch (error) { e = { error: error }; }
25456 finally {
25457 try {
25458 if (r && !r.done && (m = i["return"])) m.call(i);
25459 }
25460 finally { if (e) throw e.error; }
25461 }
25462 return ar;
25463};
25464var __spread = (undefined && undefined.__spread) || function () {
25465 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
25466 return ar;
25467};
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482var RowContainerName;
25483(function (RowContainerName) {
25484 RowContainerName["LEFT"] = "left";
25485 RowContainerName["RIGHT"] = "right";
25486 RowContainerName["CENTER"] = "center";
25487 RowContainerName["FULL_WIDTH"] = "fullWidth";
25488 RowContainerName["TOP_LEFT"] = "topLeft";
25489 RowContainerName["TOP_RIGHT"] = "topRight";
25490 RowContainerName["TOP_CENTER"] = "topCenter";
25491 RowContainerName["TOP_FULL_WIDTH"] = "topFullWidth";
25492 RowContainerName["BOTTOM_LEFT"] = "bottomLeft";
25493 RowContainerName["BOTTOM_RIGHT"] = "bottomRight";
25494 RowContainerName["BOTTOM_CENTER"] = "bottomCenter";
25495 RowContainerName["BOTTOM_FULL_WIDTH"] = "bottomFullWidth";
25496})(RowContainerName || (RowContainerName = {}));
25497var RowContainerType;
25498(function (RowContainerType) {
25499 RowContainerType["LEFT"] = "left";
25500 RowContainerType["RIGHT"] = "right";
25501 RowContainerType["CENTER"] = "center";
25502 RowContainerType["FULL_WIDTH"] = "fullWidth";
25503})(RowContainerType || (RowContainerType = {}));
25504function getRowContainerTypeForName(name) {
25505 switch (name) {
25506 case RowContainerName.CENTER:
25507 case RowContainerName.TOP_CENTER:
25508 case RowContainerName.BOTTOM_CENTER:
25509 return RowContainerType.CENTER;
25510 case RowContainerName.LEFT:
25511 case RowContainerName.TOP_LEFT:
25512 case RowContainerName.BOTTOM_LEFT:
25513 return RowContainerType.LEFT;
25514 case RowContainerName.RIGHT:
25515 case RowContainerName.TOP_RIGHT:
25516 case RowContainerName.BOTTOM_RIGHT:
25517 return RowContainerType.RIGHT;
25518 case RowContainerName.FULL_WIDTH:
25519 case RowContainerName.TOP_FULL_WIDTH:
25520 case RowContainerName.BOTTOM_FULL_WIDTH:
25521 return RowContainerType.FULL_WIDTH;
25522 default:
25523 throw Error('Invalid Row Container Type');
25524 }
25525}
25526var ContainerCssClasses = Object(_utils_map__WEBPACK_IMPORTED_MODULE_6__["convertToMap"])([
25527 [RowContainerName.CENTER, 'ag-center-cols-container'],
25528 [RowContainerName.LEFT, 'ag-pinned-left-cols-container'],
25529 [RowContainerName.RIGHT, 'ag-pinned-right-cols-container'],
25530 [RowContainerName.FULL_WIDTH, 'ag-full-width-container'],
25531 [RowContainerName.TOP_CENTER, 'ag-floating-top-container'],
25532 [RowContainerName.TOP_LEFT, 'ag-pinned-left-floating-top'],
25533 [RowContainerName.TOP_RIGHT, 'ag-pinned-right-floating-top'],
25534 [RowContainerName.TOP_FULL_WIDTH, 'ag-floating-top-full-width-container'],
25535 [RowContainerName.BOTTOM_CENTER, 'ag-floating-bottom-container'],
25536 [RowContainerName.BOTTOM_LEFT, 'ag-pinned-left-floating-bottom'],
25537 [RowContainerName.BOTTOM_RIGHT, 'ag-pinned-right-floating-bottom'],
25538 [RowContainerName.BOTTOM_FULL_WIDTH, 'ag-floating-bottom-full-width-container'],
25539]);
25540var ViewportCssClasses = Object(_utils_map__WEBPACK_IMPORTED_MODULE_6__["convertToMap"])([
25541 [RowContainerName.CENTER, 'ag-center-cols-viewport'],
25542 [RowContainerName.TOP_CENTER, 'ag-floating-top-viewport'],
25543 [RowContainerName.BOTTOM_CENTER, 'ag-floating-bottom-viewport'],
25544]);
25545var WrapperCssClasses = Object(_utils_map__WEBPACK_IMPORTED_MODULE_6__["convertToMap"])([
25546 [RowContainerName.CENTER, 'ag-center-cols-clipper'],
25547]);
25548var RowContainerCtrl = /** @class */ (function (_super) {
25549 __extends(RowContainerCtrl, _super);
25550 function RowContainerCtrl(name) {
25551 var _this = _super.call(this) || this;
25552 _this.name = name;
25553 return _this;
25554 }
25555 RowContainerCtrl.getRowContainerCssClasses = function (name) {
25556 var containerClass = ContainerCssClasses.get(name);
25557 var viewportClass = ViewportCssClasses.get(name);
25558 var wrapperClass = WrapperCssClasses.get(name);
25559 return { container: containerClass, viewport: viewportClass, wrapper: wrapperClass };
25560 };
25561 RowContainerCtrl.getPinned = function (name) {
25562 switch (name) {
25563 case RowContainerName.BOTTOM_LEFT:
25564 case RowContainerName.TOP_LEFT:
25565 case RowContainerName.LEFT:
25566 return _constants_constants__WEBPACK_IMPORTED_MODULE_12__["Constants"].PINNED_LEFT;
25567 case RowContainerName.BOTTOM_RIGHT:
25568 case RowContainerName.TOP_RIGHT:
25569 case RowContainerName.RIGHT:
25570 return _constants_constants__WEBPACK_IMPORTED_MODULE_12__["Constants"].PINNED_RIGHT;
25571 default:
25572 return null;
25573 }
25574 };
25575 RowContainerCtrl.prototype.postConstruct = function () {
25576 var _this = this;
25577 this.enableRtl = this.gridOptionsWrapper.isEnableRtl();
25578 this.embedFullWidthRows = this.gridOptionsWrapper.isEmbedFullWidthRows();
25579 this.forContainers([RowContainerName.CENTER], function () { return _this.viewportSizeFeature = _this.createManagedBean(new _viewportSizeFeature__WEBPACK_IMPORTED_MODULE_5__["ViewportSizeFeature"](_this)); });
25580 };
25581 RowContainerCtrl.prototype.registerWithCtrlsService = function () {
25582 switch (this.name) {
25583 case RowContainerName.CENTER:
25584 this.ctrlsService.registerCenterRowContainerCtrl(this);
25585 break;
25586 case RowContainerName.LEFT:
25587 this.ctrlsService.registerLeftRowContainerCtrl(this);
25588 break;
25589 case RowContainerName.RIGHT:
25590 this.ctrlsService.registerRightRowContainerCtrl(this);
25591 break;
25592 case RowContainerName.TOP_CENTER:
25593 this.ctrlsService.registerTopCenterRowContainerCtrl(this);
25594 break;
25595 case RowContainerName.TOP_LEFT:
25596 this.ctrlsService.registerTopLeftRowContainerCon(this);
25597 break;
25598 case RowContainerName.TOP_RIGHT:
25599 this.ctrlsService.registerTopRightRowContainerCtrl(this);
25600 break;
25601 case RowContainerName.BOTTOM_CENTER:
25602 this.ctrlsService.registerBottomCenterRowContainerCtrl(this);
25603 break;
25604 case RowContainerName.BOTTOM_LEFT:
25605 this.ctrlsService.registerBottomLeftRowContainerCtrl(this);
25606 break;
25607 case RowContainerName.BOTTOM_RIGHT:
25608 this.ctrlsService.registerBottomRightRowContainerCtrl(this);
25609 break;
25610 }
25611 };
25612 RowContainerCtrl.prototype.forContainers = function (names, callback) {
25613 if (names.indexOf(this.name) >= 0) {
25614 callback();
25615 }
25616 };
25617 RowContainerCtrl.prototype.getContainerElement = function () {
25618 return this.eContainer;
25619 };
25620 RowContainerCtrl.prototype.getViewportSizeFeature = function () {
25621 return this.viewportSizeFeature;
25622 };
25623 RowContainerCtrl.prototype.setComp = function (view, eContainer, eViewport, eWrapper) {
25624 var _this = this;
25625 this.comp = view;
25626 this.eContainer = eContainer;
25627 this.eViewport = eViewport;
25628 this.eWrapper = eWrapper;
25629 this.createManagedBean(new _rowContainerEventsFeature__WEBPACK_IMPORTED_MODULE_3__["RowContainerEventsFeature"](this.eContainer));
25630 this.addPreventScrollWhileDragging();
25631 this.listenOnDomOrder();
25632 this.stopHScrollOnPinnedRows();
25633 var allTopNoFW = [RowContainerName.TOP_CENTER, RowContainerName.TOP_LEFT, RowContainerName.TOP_RIGHT];
25634 var allBottomNoFW = [RowContainerName.BOTTOM_CENTER, RowContainerName.BOTTOM_LEFT, RowContainerName.BOTTOM_RIGHT];
25635 var allMiddleNoFW = [RowContainerName.CENTER, RowContainerName.LEFT, RowContainerName.RIGHT];
25636 var allNoFW = __spread(allTopNoFW, allBottomNoFW, allMiddleNoFW);
25637 var allMiddle = [RowContainerName.CENTER, RowContainerName.LEFT, RowContainerName.RIGHT, RowContainerName.FULL_WIDTH];
25638 var allCenter = [RowContainerName.CENTER, RowContainerName.TOP_CENTER, RowContainerName.BOTTOM_CENTER];
25639 var allLeft = [RowContainerName.LEFT, RowContainerName.BOTTOM_LEFT, RowContainerName.TOP_LEFT];
25640 var allRight = [RowContainerName.RIGHT, RowContainerName.BOTTOM_RIGHT, RowContainerName.TOP_RIGHT];
25641 this.forContainers(allLeft, function () { return _this.createManagedBean(new _setPinnedLeftWidthFeature__WEBPACK_IMPORTED_MODULE_7__["SetPinnedLeftWidthFeature"](_this.eContainer)); });
25642 this.forContainers(allRight, function () { return _this.createManagedBean(new _setPinnedRightWidthFeature__WEBPACK_IMPORTED_MODULE_8__["SetPinnedRightWidthFeature"](_this.eContainer)); });
25643 this.forContainers(allMiddle, function () { return _this.createManagedBean(new _setHeightFeature__WEBPACK_IMPORTED_MODULE_9__["SetHeightFeature"](_this.eContainer, _this.eWrapper)); });
25644 this.forContainers(allNoFW, function () { return _this.createManagedBean(new _dragListenerFeature__WEBPACK_IMPORTED_MODULE_10__["DragListenerFeature"](_this.eContainer)); });
25645 this.forContainers(allCenter, function () { return _this.createManagedBean(new _centerWidthFeature__WEBPACK_IMPORTED_MODULE_11__["CenterWidthFeature"](function (width) { return _this.comp.setContainerWidth(width + "px"); })); });
25646 this.addListeners();
25647 this.registerWithCtrlsService();
25648 };
25649 RowContainerCtrl.prototype.addListeners = function () {
25650 var _this = this;
25651 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED, function () { return _this.onScrollVisibilityChanged(); });
25652 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, function () { return _this.onDisplayedColumnsChanged(); });
25653 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, function () { return _this.onDisplayedColumnsWidthChanged(); });
25654 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_ROWS_CHANGED, function () { return _this.onDisplayedRowsChanged(); });
25655 this.onScrollVisibilityChanged();
25656 this.onDisplayedColumnsChanged();
25657 this.onDisplayedColumnsWidthChanged();
25658 this.onDisplayedRowsChanged();
25659 };
25660 RowContainerCtrl.prototype.listenOnDomOrder = function () {
25661 var _this = this;
25662 var listener = function () { return _this.comp.setDomOrder(_this.gridOptionsWrapper.isEnsureDomOrder()); };
25663 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_13__["GridOptionsWrapper"].PROP_DOM_LAYOUT, listener);
25664 listener();
25665 };
25666 // when editing a pinned row, if the cell is half outside the scrollable area, the browser can
25667 // scroll the column into view. we do not want this, the pinned sections should never scroll.
25668 // so we listen to scrolls on these containers and reset the scroll if we find one.
25669 RowContainerCtrl.prototype.stopHScrollOnPinnedRows = function () {
25670 var _this = this;
25671 this.forContainers([RowContainerName.TOP_CENTER, RowContainerName.BOTTOM_CENTER], function () {
25672 var resetScrollLeft = function () { return _this.eViewport.scrollLeft = 0; };
25673 _this.addManagedListener(_this.eViewport, 'scroll', resetScrollLeft);
25674 });
25675 };
25676 RowContainerCtrl.prototype.onDisplayedColumnsChanged = function () {
25677 var _this = this;
25678 this.forContainers([RowContainerName.CENTER], function () { return _this.onHorizontalViewportChanged(); });
25679 };
25680 RowContainerCtrl.prototype.onDisplayedColumnsWidthChanged = function () {
25681 var _this = this;
25682 this.forContainers([RowContainerName.CENTER], function () { return _this.onHorizontalViewportChanged(); });
25683 };
25684 RowContainerCtrl.prototype.onScrollVisibilityChanged = function () {
25685 if (this.name !== RowContainerName.CENTER) {
25686 return;
25687 }
25688 var visible = this.scrollVisibleService.isHorizontalScrollShowing();
25689 var scrollbarWidth = visible ? (this.gridOptionsWrapper.getScrollbarWidth() || 0) : 0;
25690 var height = scrollbarWidth == 0 ? '100%' : "calc(100% + " + scrollbarWidth + "px)";
25691 this.comp.setViewportHeight(height);
25692 };
25693 // this methods prevents the grid views from being scrolled while the dragService is being used
25694 // eg. the view should not scroll up and down while dragging rows using the rowDragComp.
25695 RowContainerCtrl.prototype.addPreventScrollWhileDragging = function () {
25696 var _this = this;
25697 var preventScroll = function (e) {
25698 if (_this.dragService.isDragging()) {
25699 if (e.cancelable) {
25700 e.preventDefault();
25701 }
25702 }
25703 };
25704 this.eContainer.addEventListener('touchmove', preventScroll, { passive: false });
25705 this.addDestroyFunc(function () { return _this.eContainer.removeEventListener('touchmove', preventScroll); });
25706 };
25707 // this gets called whenever a change in the viewport, so we can inform column controller it has to work
25708 // out the virtual columns again. gets called from following locations:
25709 // + ensureColVisible, scroll, init, layoutChanged, displayedColumnsChanged, API (doLayout)
25710 RowContainerCtrl.prototype.onHorizontalViewportChanged = function () {
25711 var scrollWidth = this.getCenterWidth();
25712 var scrollPosition = this.getCenterViewportScrollLeft();
25713 this.columnModel.setViewportPosition(scrollWidth, scrollPosition);
25714 };
25715 RowContainerCtrl.prototype.getCenterWidth = function () {
25716 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["getInnerWidth"])(this.eViewport);
25717 };
25718 RowContainerCtrl.prototype.getCenterViewportScrollLeft = function () {
25719 // we defer to a util, as how you calculated scrollLeft when doing RTL depends on the browser
25720 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["getScrollLeft"])(this.eViewport, this.enableRtl);
25721 };
25722 RowContainerCtrl.prototype.registerViewportResizeListener = function (listener) {
25723 var unsubscribeFromResize = this.resizeObserverService.observeResize(this.eViewport, listener);
25724 this.addDestroyFunc(function () { return unsubscribeFromResize(); });
25725 };
25726 RowContainerCtrl.prototype.isViewportVisible = function () {
25727 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["isVisible"])(this.eViewport);
25728 };
25729 RowContainerCtrl.prototype.isViewportHScrollShowing = function () {
25730 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["isHorizontalScrollShowing"])(this.eViewport);
25731 };
25732 RowContainerCtrl.prototype.getViewportScrollLeft = function () {
25733 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["getScrollLeft"])(this.eViewport, this.enableRtl);
25734 };
25735 RowContainerCtrl.prototype.isHorizontalScrollShowing = function () {
25736 var isAlwaysShowHorizontalScroll = this.gridOptionsWrapper.isAlwaysShowHorizontalScroll();
25737 return isAlwaysShowHorizontalScroll || Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["isHorizontalScrollShowing"])(this.eViewport);
25738 };
25739 RowContainerCtrl.prototype.getViewportElement = function () {
25740 return this.eViewport;
25741 };
25742 RowContainerCtrl.prototype.setContainerTranslateX = function (amount) {
25743 this.eContainer.style.transform = "translateX(" + amount + "px)";
25744 };
25745 RowContainerCtrl.prototype.getHScrollPosition = function () {
25746 var res = {
25747 left: this.eViewport.scrollLeft,
25748 right: this.eViewport.scrollLeft + this.eViewport.offsetWidth
25749 };
25750 return res;
25751 };
25752 RowContainerCtrl.prototype.setCenterViewportScrollLeft = function (value) {
25753 // we defer to a util, as how you calculated scrollLeft when doing RTL depends on the browser
25754 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setScrollLeft"])(this.eViewport, value, this.enableRtl);
25755 };
25756 RowContainerCtrl.prototype.onDisplayedRowsChanged = function () {
25757 var _this = this;
25758 var fullWithContainer = this.name === RowContainerName.TOP_FULL_WIDTH
25759 || this.name === RowContainerName.BOTTOM_FULL_WIDTH
25760 || this.name === RowContainerName.FULL_WIDTH;
25761 var doesRowMatch = function (rowCtrl) {
25762 var fullWidthRow = rowCtrl.isFullWidth();
25763 var printLayout = _this.gridOptionsWrapper.getDomLayout() === _constants_constants__WEBPACK_IMPORTED_MODULE_12__["Constants"].DOM_LAYOUT_PRINT;
25764 var embedFW = _this.embedFullWidthRows || printLayout;
25765 var match = fullWithContainer ?
25766 !embedFW && fullWidthRow
25767 : embedFW || !fullWidthRow;
25768 return match;
25769 };
25770 // this list contains either all pinned top, center or pinned bottom rows
25771 var allRowsRegardlessOfFullWidth = this.getRowCtrls();
25772 // this filters out rows not for this container, eg if it's a full with row, but we are not full with container
25773 var rowsThisContainer = allRowsRegardlessOfFullWidth.filter(doesRowMatch);
25774 this.comp.setRowCtrls(rowsThisContainer);
25775 };
25776 RowContainerCtrl.prototype.getRowCtrls = function () {
25777 switch (this.name) {
25778 case RowContainerName.TOP_CENTER:
25779 case RowContainerName.TOP_LEFT:
25780 case RowContainerName.TOP_RIGHT:
25781 case RowContainerName.TOP_FULL_WIDTH:
25782 return this.rowRenderer.getTopRowCtrls();
25783 case RowContainerName.BOTTOM_CENTER:
25784 case RowContainerName.BOTTOM_LEFT:
25785 case RowContainerName.BOTTOM_RIGHT:
25786 case RowContainerName.BOTTOM_FULL_WIDTH:
25787 return this.rowRenderer.getBottomRowCtrls();
25788 default:
25789 return this.rowRenderer.getRowCtrls();
25790 }
25791 };
25792 __decorate([
25793 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('scrollVisibleService')
25794 ], RowContainerCtrl.prototype, "scrollVisibleService", void 0);
25795 __decorate([
25796 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragService')
25797 ], RowContainerCtrl.prototype, "dragService", void 0);
25798 __decorate([
25799 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
25800 ], RowContainerCtrl.prototype, "ctrlsService", void 0);
25801 __decorate([
25802 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
25803 ], RowContainerCtrl.prototype, "columnModel", void 0);
25804 __decorate([
25805 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('resizeObserverService')
25806 ], RowContainerCtrl.prototype, "resizeObserverService", void 0);
25807 __decorate([
25808 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowRenderer')
25809 ], RowContainerCtrl.prototype, "rowRenderer", void 0);
25810 __decorate([
25811 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
25812 ], RowContainerCtrl.prototype, "postConstruct", null);
25813 return RowContainerCtrl;
25814}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
25815
25816
25817
25818
25819
25820/***/ }),
25821/* 119 */
25822/***/ (function(module, __webpack_exports__, __webpack_require__) {
25823
25824"use strict";
25825__webpack_require__.r(__webpack_exports__);
25826/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerEventsFeature", function() { return RowContainerEventsFeature; });
25827/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
25828/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
25829/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
25830/* harmony import */ var _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(120);
25831/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43);
25832/* harmony import */ var _widgets_touchListener__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(82);
25833/* harmony import */ var _utils_keyboard__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49);
25834/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(23);
25835/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65);
25836/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(15);
25837/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7);
25838/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(18);
25839/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(17);
25840/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(16);
25841/* harmony import */ var _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(121);
25842/**
25843 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
25844 * @version v27.3.0
25845 * @link https://www.ag-grid.com/
25846 * @license MIT
25847 */
25848var __extends = (undefined && undefined.__extends) || (function () {
25849 var extendStatics = function (d, b) {
25850 extendStatics = Object.setPrototypeOf ||
25851 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25852 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
25853 return extendStatics(d, b);
25854 };
25855 return function (d, b) {
25856 extendStatics(d, b);
25857 function __() { this.constructor = d; }
25858 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
25859 };
25860})();
25861var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
25862 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
25863 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
25864 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
25865 return c > 3 && r && Object.defineProperty(target, key, r), r;
25866};
25867var __read = (undefined && undefined.__read) || function (o, n) {
25868 var m = typeof Symbol === "function" && o[Symbol.iterator];
25869 if (!m) return o;
25870 var i = m.call(o), r, ar = [], e;
25871 try {
25872 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
25873 }
25874 catch (error) { e = { error: error }; }
25875 finally {
25876 try {
25877 if (r && !r.done && (m = i["return"])) m.call(i);
25878 }
25879 finally { if (e) throw e.error; }
25880 }
25881 return ar;
25882};
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898var RowContainerEventsFeature = /** @class */ (function (_super) {
25899 __extends(RowContainerEventsFeature, _super);
25900 function RowContainerEventsFeature(element) {
25901 var _this = _super.call(this) || this;
25902 _this.element = element;
25903 return _this;
25904 }
25905 RowContainerEventsFeature.prototype.postConstruct = function () {
25906 this.addMouseListeners();
25907 this.mockContextMenuForIPad();
25908 this.addKeyboardEvents();
25909 };
25910 RowContainerEventsFeature.prototype.addKeyboardEvents = function () {
25911 var _this = this;
25912 var eventNames = ['keydown', 'keypress'];
25913 eventNames.forEach(function (eventName) {
25914 var listener = _this.processKeyboardEvent.bind(_this, eventName);
25915 _this.addManagedListener(_this.element, eventName, listener);
25916 });
25917 };
25918 RowContainerEventsFeature.prototype.addMouseListeners = function () {
25919 var _this = this;
25920 var mouseDownEvent = Object(_utils_event__WEBPACK_IMPORTED_MODULE_1__["isEventSupported"])('touchstart') ? 'touchstart' : 'mousedown';
25921 var eventNames = ['dblclick', 'contextmenu', 'mouseover', 'mouseout', 'click', mouseDownEvent];
25922 eventNames.forEach(function (eventName) {
25923 var listener = _this.processMouseEvent.bind(_this, eventName);
25924 _this.addManagedListener(_this.element, eventName, listener);
25925 });
25926 };
25927 RowContainerEventsFeature.prototype.processMouseEvent = function (eventName, mouseEvent) {
25928 if (!this.mouseEventService.isEventFromThisGrid(mouseEvent) ||
25929 Object(_utils_event__WEBPACK_IMPORTED_MODULE_1__["isStopPropagationForAgGrid"])(mouseEvent)) {
25930 return;
25931 }
25932 var rowComp = this.getRowForEvent(mouseEvent);
25933 var cellCtrl = this.mouseEventService.getRenderedCellForEvent(mouseEvent);
25934 if (eventName === "contextmenu") {
25935 this.handleContextMenuMouseEvent(mouseEvent, null, rowComp, cellCtrl);
25936 }
25937 else {
25938 if (cellCtrl) {
25939 cellCtrl.onMouseEvent(eventName, mouseEvent);
25940 }
25941 if (rowComp) {
25942 rowComp.onMouseEvent(eventName, mouseEvent);
25943 }
25944 }
25945 };
25946 RowContainerEventsFeature.prototype.mockContextMenuForIPad = function () {
25947 var _this = this;
25948 // we do NOT want this when not in iPad, otherwise we will be doing
25949 if (!Object(_utils_browser__WEBPACK_IMPORTED_MODULE_4__["isIOSUserAgent"])()) {
25950 return;
25951 }
25952 var touchListener = new _widgets_touchListener__WEBPACK_IMPORTED_MODULE_5__["TouchListener"](this.element);
25953 var longTapListener = function (event) {
25954 var rowComp = _this.getRowForEvent(event.touchEvent);
25955 var cellComp = _this.mouseEventService.getRenderedCellForEvent(event.touchEvent);
25956 _this.handleContextMenuMouseEvent(null, event.touchEvent, rowComp, cellComp);
25957 };
25958 this.addManagedListener(touchListener, _widgets_touchListener__WEBPACK_IMPORTED_MODULE_5__["TouchListener"].EVENT_LONG_TAP, longTapListener);
25959 this.addDestroyFunc(function () { return touchListener.destroy(); });
25960 };
25961 RowContainerEventsFeature.prototype.getRowForEvent = function (event) {
25962 var sourceElement = event.target;
25963 while (sourceElement) {
25964 var rowCon = this.gridOptionsWrapper.getDomData(sourceElement, _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_3__["RowCtrl"].DOM_DATA_KEY_ROW_CTRL);
25965 if (rowCon) {
25966 return rowCon;
25967 }
25968 sourceElement = sourceElement.parentElement;
25969 }
25970 return null;
25971 };
25972 RowContainerEventsFeature.prototype.handleContextMenuMouseEvent = function (mouseEvent, touchEvent, rowComp, cellCtrl) {
25973 var rowNode = rowComp ? rowComp.getRowNode() : null;
25974 var column = cellCtrl ? cellCtrl.getColumn() : null;
25975 var value = null;
25976 if (column) {
25977 var event_1 = mouseEvent ? mouseEvent : touchEvent;
25978 cellCtrl.dispatchCellContextMenuEvent(event_1);
25979 value = this.valueService.getValue(column, rowNode);
25980 }
25981 // if user clicked on a cell, anchor to that cell, otherwise anchor to the grid panel
25982 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
25983 var anchorToElement = cellCtrl ? cellCtrl.getGui() : gridBodyCon.getGridBodyElement();
25984 if (this.contextMenuFactory) {
25985 this.contextMenuFactory.onContextMenu(mouseEvent, touchEvent, rowNode, column, value, anchorToElement);
25986 }
25987 };
25988 RowContainerEventsFeature.prototype.processKeyboardEvent = function (eventName, keyboardEvent) {
25989 var cellComp = Object(_utils_event__WEBPACK_IMPORTED_MODULE_1__["getCtrlForEvent"])(this.gridOptionsWrapper, keyboardEvent, _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_14__["CellCtrl"].DOM_DATA_KEY_CELL_CTRL);
25990 var rowComp = Object(_utils_event__WEBPACK_IMPORTED_MODULE_1__["getCtrlForEvent"])(this.gridOptionsWrapper, keyboardEvent, _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_3__["RowCtrl"].DOM_DATA_KEY_ROW_CTRL);
25991 if (keyboardEvent.defaultPrevented) {
25992 return;
25993 }
25994 if (cellComp) {
25995 this.processCellKeyboardEvent(cellComp, eventName, keyboardEvent);
25996 }
25997 else if (rowComp && rowComp.isFullWidth()) {
25998 this.processFullWidthRowKeyboardEvent(rowComp, eventName, keyboardEvent);
25999 }
26000 };
26001 RowContainerEventsFeature.prototype.processCellKeyboardEvent = function (cellCtrl, eventName, keyboardEvent) {
26002 var rowNode = cellCtrl.getRowNode();
26003 var column = cellCtrl.getColumn();
26004 var editing = cellCtrl.isEditing();
26005 var gridProcessingAllowed = !Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_6__["isUserSuppressingKeyboardEvent"])(this.gridOptionsWrapper, keyboardEvent, rowNode, column, editing);
26006 if (gridProcessingAllowed) {
26007 switch (eventName) {
26008 case 'keydown':
26009 // first see if it's a scroll key, page up / down, home / end etc
26010 var wasScrollKey = !editing && this.navigationService.handlePageScrollingKey(keyboardEvent);
26011 // if not a scroll key, then we pass onto cell
26012 if (!wasScrollKey) {
26013 cellCtrl.onKeyDown(keyboardEvent);
26014 }
26015 // perform clipboard and undo / redo operations
26016 this.doGridOperations(keyboardEvent, cellCtrl.isEditing());
26017 break;
26018 case 'keypress':
26019 cellCtrl.onKeyPress(keyboardEvent);
26020 break;
26021 }
26022 }
26023 if (eventName === 'keydown') {
26024 var cellKeyDownEvent = cellCtrl.createEvent(keyboardEvent, _events__WEBPACK_IMPORTED_MODULE_7__["Events"].EVENT_CELL_KEY_DOWN);
26025 this.eventService.dispatchEvent(cellKeyDownEvent);
26026 }
26027 if (eventName === 'keypress') {
26028 var cellKeyPressEvent = cellCtrl.createEvent(keyboardEvent, _events__WEBPACK_IMPORTED_MODULE_7__["Events"].EVENT_CELL_KEY_PRESS);
26029 this.eventService.dispatchEvent(cellKeyPressEvent);
26030 }
26031 };
26032 RowContainerEventsFeature.prototype.processFullWidthRowKeyboardEvent = function (rowComp, eventName, keyboardEvent) {
26033 var rowNode = rowComp.getRowNode();
26034 var focusedCell = this.focusService.getFocusedCell();
26035 var column = (focusedCell && focusedCell.column);
26036 var gridProcessingAllowed = !Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_6__["isUserSuppressingKeyboardEvent"])(this.gridOptionsWrapper, keyboardEvent, rowNode, column, false);
26037 if (gridProcessingAllowed) {
26038 var key = keyboardEvent.key;
26039 if (eventName === 'keydown') {
26040 switch (key) {
26041 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].UP:
26042 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].DOWN:
26043 rowComp.onKeyboardNavigate(keyboardEvent);
26044 break;
26045 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].TAB:
26046 rowComp.onTabKeyDown(keyboardEvent);
26047 default:
26048 }
26049 }
26050 }
26051 if (eventName === 'keydown') {
26052 var cellKeyDownEvent = rowComp.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_7__["Events"].EVENT_CELL_KEY_DOWN, keyboardEvent);
26053 this.eventService.dispatchEvent(cellKeyDownEvent);
26054 }
26055 if (eventName === 'keypress') {
26056 var cellKeyPressEvent = rowComp.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_7__["Events"].EVENT_CELL_KEY_PRESS, keyboardEvent);
26057 this.eventService.dispatchEvent(cellKeyPressEvent);
26058 }
26059 };
26060 RowContainerEventsFeature.prototype.doGridOperations = function (keyboardEvent, editing) {
26061 // check if ctrl or meta key pressed
26062 if (!keyboardEvent.ctrlKey && !keyboardEvent.metaKey) {
26063 return;
26064 }
26065 // if the cell the event came from is editing, then we do not
26066 // want to do the default shortcut keys, otherwise the editor
26067 // (eg a text field) would not be able to do the normal cut/copy/paste
26068 if (editing) {
26069 return;
26070 }
26071 // for copy / paste, we don't want to execute when the event
26072 // was from a child grid (happens in master detail)
26073 if (!this.mouseEventService.isEventFromThisGrid(keyboardEvent)) {
26074 return;
26075 }
26076 switch (keyboardEvent.code) {
26077 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].A:
26078 return this.onCtrlAndA(keyboardEvent);
26079 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].C:
26080 return this.onCtrlAndC(keyboardEvent);
26081 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].V:
26082 return this.onCtrlAndV();
26083 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].D:
26084 return this.onCtrlAndD(keyboardEvent);
26085 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].Z:
26086 return keyboardEvent.shiftKey ? this.undoRedoService.redo() : this.undoRedoService.undo();
26087 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].Y:
26088 return this.undoRedoService.redo();
26089 }
26090 };
26091 RowContainerEventsFeature.prototype.onCtrlAndA = function (event) {
26092 var _a = this, pinnedRowModel = _a.pinnedRowModel, paginationProxy = _a.paginationProxy, rangeService = _a.rangeService;
26093 var PINNED_BOTTOM = _constants_constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].PINNED_BOTTOM, PINNED_TOP = _constants_constants__WEBPACK_IMPORTED_MODULE_9__["Constants"].PINNED_TOP;
26094 if (rangeService && paginationProxy.isRowsToRender()) {
26095 var _b = __read([
26096 pinnedRowModel.isEmpty(PINNED_TOP),
26097 pinnedRowModel.isEmpty(PINNED_BOTTOM)
26098 ], 2), isEmptyPinnedTop = _b[0], isEmptyPinnedBottom = _b[1];
26099 var floatingStart = isEmptyPinnedTop ? null : PINNED_TOP;
26100 var floatingEnd = void 0;
26101 var rowEnd = void 0;
26102 if (isEmptyPinnedBottom) {
26103 floatingEnd = null;
26104 rowEnd = this.paginationProxy.getRowCount() - 1;
26105 }
26106 else {
26107 floatingEnd = PINNED_BOTTOM;
26108 rowEnd = pinnedRowModel.getPinnedBottomRowData().length - 1;
26109 }
26110 var allDisplayedColumns = this.columnModel.getAllDisplayedColumns();
26111 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_10__["missingOrEmpty"])(allDisplayedColumns)) {
26112 return;
26113 }
26114 rangeService.setCellRange({
26115 rowStartIndex: 0,
26116 rowStartPinned: floatingStart,
26117 rowEndIndex: rowEnd,
26118 rowEndPinned: floatingEnd,
26119 columnStart: allDisplayedColumns[0],
26120 columnEnd: Object(_utils_array__WEBPACK_IMPORTED_MODULE_11__["last"])(allDisplayedColumns)
26121 });
26122 }
26123 event.preventDefault();
26124 };
26125 RowContainerEventsFeature.prototype.onCtrlAndC = function (event) {
26126 if (!this.clipboardService || this.gridOptionsWrapper.isEnableCellTextSelection()) {
26127 return;
26128 }
26129 this.clipboardService.copyToClipboard();
26130 event.preventDefault();
26131 };
26132 RowContainerEventsFeature.prototype.onCtrlAndV = function () {
26133 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_12__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].ClipboardModule) && !this.gridOptionsWrapper.isSuppressClipboardPaste()) {
26134 this.clipboardService.pasteFromClipboard();
26135 }
26136 };
26137 RowContainerEventsFeature.prototype.onCtrlAndD = function (event) {
26138 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_12__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].ClipboardModule) && !this.gridOptionsWrapper.isSuppressClipboardPaste()) {
26139 this.clipboardService.copyRangeDown();
26140 }
26141 event.preventDefault();
26142 };
26143 __decorate([
26144 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('mouseEventService')
26145 ], RowContainerEventsFeature.prototype, "mouseEventService", void 0);
26146 __decorate([
26147 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('valueService')
26148 ], RowContainerEventsFeature.prototype, "valueService", void 0);
26149 __decorate([
26150 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Optional"])('contextMenuFactory')
26151 ], RowContainerEventsFeature.prototype, "contextMenuFactory", void 0);
26152 __decorate([
26153 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('ctrlsService')
26154 ], RowContainerEventsFeature.prototype, "ctrlsService", void 0);
26155 __decorate([
26156 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('navigationService')
26157 ], RowContainerEventsFeature.prototype, "navigationService", void 0);
26158 __decorate([
26159 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('focusService')
26160 ], RowContainerEventsFeature.prototype, "focusService", void 0);
26161 __decorate([
26162 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('undoRedoService')
26163 ], RowContainerEventsFeature.prototype, "undoRedoService", void 0);
26164 __decorate([
26165 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
26166 ], RowContainerEventsFeature.prototype, "columnModel", void 0);
26167 __decorate([
26168 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('paginationProxy')
26169 ], RowContainerEventsFeature.prototype, "paginationProxy", void 0);
26170 __decorate([
26171 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('pinnedRowModel')
26172 ], RowContainerEventsFeature.prototype, "pinnedRowModel", void 0);
26173 __decorate([
26174 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Optional"])('rangeService')
26175 ], RowContainerEventsFeature.prototype, "rangeService", void 0);
26176 __decorate([
26177 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Optional"])('clipboardService')
26178 ], RowContainerEventsFeature.prototype, "clipboardService", void 0);
26179 __decorate([
26180 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
26181 ], RowContainerEventsFeature.prototype, "postConstruct", null);
26182 return RowContainerEventsFeature;
26183}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
26184
26185
26186
26187
26188
26189/***/ }),
26190/* 120 */
26191/***/ (function(module, __webpack_exports__, __webpack_require__) {
26192
26193"use strict";
26194__webpack_require__.r(__webpack_exports__);
26195/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowType", function() { return RowType; });
26196/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowCtrl", function() { return RowCtrl; });
26197/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
26198/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
26199/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94);
26200/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
26201/* harmony import */ var _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(118);
26202/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(16);
26203/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(17);
26204/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(44);
26205/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(42);
26206/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(21);
26207/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14);
26208/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7);
26209/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(26);
26210/* harmony import */ var _cell_cellCtrl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(121);
26211/* harmony import */ var _rowDragComp__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(96);
26212/**
26213 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
26214 * @version v27.3.0
26215 * @link https://www.ag-grid.com/
26216 * @license MIT
26217 */
26218var __extends = (undefined && undefined.__extends) || (function () {
26219 var extendStatics = function (d, b) {
26220 extendStatics = Object.setPrototypeOf ||
26221 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26222 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
26223 return extendStatics(d, b);
26224 };
26225 return function (d, b) {
26226 extendStatics(d, b);
26227 function __() { this.constructor = d; }
26228 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26229 };
26230})();
26231var __read = (undefined && undefined.__read) || function (o, n) {
26232 var m = typeof Symbol === "function" && o[Symbol.iterator];
26233 if (!m) return o;
26234 var i = m.call(o), r, ar = [], e;
26235 try {
26236 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
26237 }
26238 catch (error) { e = { error: error }; }
26239 finally {
26240 try {
26241 if (r && !r.done && (m = i["return"])) m.call(i);
26242 }
26243 finally { if (e) throw e.error; }
26244 }
26245 return ar;
26246};
26247var __spread = (undefined && undefined.__spread) || function () {
26248 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
26249 return ar;
26250};
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266var RowType;
26267(function (RowType) {
26268 RowType["Normal"] = "Normal";
26269 RowType["FullWidth"] = "FullWidth";
26270 RowType["FullWidthLoading"] = "FullWidthLoading";
26271 RowType["FullWidthGroup"] = "FullWidthGroup";
26272 RowType["FullWidthDetail"] = "FullWidthDetail";
26273})(RowType || (RowType = {}));
26274var instanceIdSequence = 0;
26275var RowCtrl = /** @class */ (function (_super) {
26276 __extends(RowCtrl, _super);
26277 function RowCtrl(rowNode, beans, animateIn, useAnimationFrameForCreate, printLayout) {
26278 var _this = _super.call(this) || this;
26279 _this.allRowGuis = [];
26280 _this.active = true;
26281 _this.centerCellCtrls = { list: [], map: {} };
26282 _this.leftCellCtrls = { list: [], map: {} };
26283 _this.rightCellCtrls = { list: [], map: {} };
26284 _this.lastMouseDownOnDragger = false;
26285 _this.updateColumnListsPending = false;
26286 _this.beans = beans;
26287 _this.rowNode = rowNode;
26288 _this.paginationPage = _this.beans.paginationProxy.getCurrentPage();
26289 _this.useAnimationFrameForCreate = useAnimationFrameForCreate;
26290 _this.printLayout = printLayout;
26291 _this.instanceId = rowNode.id + '-' + instanceIdSequence++;
26292 _this.setAnimateFlags(animateIn);
26293 _this.rowFocused = _this.beans.focusService.isRowFocused(_this.rowNode.rowIndex, _this.rowNode.rowPinned);
26294 _this.rowLevel = _this.beans.rowCssClassCalculator.calculateRowLevel(_this.rowNode);
26295 _this.setRowType();
26296 _this.addListeners();
26297 _this.setInitialRowTop();
26298 return _this;
26299 }
26300 RowCtrl.prototype.getBeans = function () {
26301 return this.beans;
26302 };
26303 RowCtrl.prototype.getInstanceId = function () {
26304 return this.instanceId;
26305 };
26306 RowCtrl.prototype.setComp = function (rowComp, element, containerType) {
26307 var gui = { rowComp: rowComp, element: element, containerType: containerType };
26308 this.allRowGuis.push(gui);
26309 if (containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].LEFT) {
26310 this.leftGui = gui;
26311 }
26312 else if (containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].RIGHT) {
26313 this.rightGui = gui;
26314 }
26315 else if (containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].FULL_WIDTH) {
26316 this.fullWidthGui = gui;
26317 }
26318 else {
26319 this.centerGui = gui;
26320 }
26321 var allNormalPresent = this.leftGui != null && this.rightGui != null && this.centerGui != null;
26322 var fullWidthPresent = this.fullWidthGui != null;
26323 if (allNormalPresent || fullWidthPresent) {
26324 this.initialiseRowComps();
26325 }
26326 };
26327 RowCtrl.prototype.isCacheable = function () {
26328 return this.rowType === RowType.FullWidthDetail
26329 && this.beans.gridOptionsWrapper.isKeepDetailRows();
26330 };
26331 RowCtrl.prototype.setCached = function (cached) {
26332 var displayValue = cached ? 'none' : '';
26333 this.allRowGuis.forEach(function (rg) { return rg.element.style.display = displayValue; });
26334 };
26335 RowCtrl.prototype.initialiseRowComps = function () {
26336 var _this = this;
26337 var gow = this.beans.gridOptionsWrapper;
26338 this.onRowHeightChanged();
26339 this.updateRowIndexes();
26340 this.setFocusedClasses();
26341 this.setStylesFromGridOptions();
26342 if (gow.isRowSelection() && this.rowNode.selectable) {
26343 this.onRowSelected();
26344 }
26345 this.updateColumnLists(!this.useAnimationFrameForCreate);
26346 if (this.slideRowIn) {
26347 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["executeNextVMTurn"])(this.onTopChanged.bind(this));
26348 }
26349 if (this.fadeRowIn) {
26350 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["executeNextVMTurn"])(function () {
26351 _this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', false); });
26352 });
26353 }
26354 var businessKey = this.getRowBusinessKey();
26355 var rowIdSanitised = Object(_utils_string__WEBPACK_IMPORTED_MODULE_12__["escapeString"])(this.rowNode.id);
26356 var businessKeySanitised = Object(_utils_string__WEBPACK_IMPORTED_MODULE_12__["escapeString"])(businessKey);
26357 this.allRowGuis.forEach(function (gui) {
26358 var comp = gui.rowComp;
26359 comp.setRole('row');
26360 var initialRowClasses = _this.getInitialRowClasses(gui.containerType);
26361 initialRowClasses.forEach(function (name) { return comp.addOrRemoveCssClass(name, true); });
26362 if (_this.rowNode.group) {
26363 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaExpanded"])(gui.element, _this.rowNode.expanded == true);
26364 }
26365 if (rowIdSanitised != null) {
26366 comp.setRowId(rowIdSanitised);
26367 }
26368 if (businessKeySanitised != null) {
26369 comp.setRowBusinessKey(businessKeySanitised);
26370 }
26371 if (_this.isFullWidth() && !_this.beans.gridOptionsWrapper.isSuppressCellFocus()) {
26372 comp.setTabIndex(-1);
26373 }
26374 // DOM DATA
26375 gow.setDomData(gui.element, RowCtrl.DOM_DATA_KEY_ROW_CTRL, _this);
26376 _this.addDestroyFunc(function () { return gow.setDomData(gui.element, RowCtrl.DOM_DATA_KEY_ROW_CTRL, null); });
26377 // adding hover functionality adds listener to this row, so we
26378 // do it lazily in an animation frame
26379 if (_this.useAnimationFrameForCreate) {
26380 _this.beans.animationFrameService.createTask(_this.addHoverFunctionality.bind(_this, gui.element), _this.rowNode.rowIndex, 'createTasksP2');
26381 }
26382 else {
26383 _this.addHoverFunctionality(gui.element);
26384 }
26385 if (_this.isFullWidth()) {
26386 _this.setupFullWidth(gui);
26387 }
26388 if (gow.isRowDragEntireRow()) {
26389 _this.addRowDraggerToRow(gui);
26390 }
26391 if (_this.useAnimationFrameForCreate) {
26392 // the height animation we only want active after the row is alive for 1 second.
26393 // this stops the row animation working when rows are initially crated. otherwise
26394 // auto-height rows get inserted into the dom and resized immediately, which gives
26395 // very bad UX (eg 10 rows get inserted, then all 10 expand, look particularly bad
26396 // when scrolling). so this makes sure when rows are shown for the first time, they
26397 // are resized immediately without animation.
26398 _this.beans.animationFrameService.addDestroyTask(function () {
26399 if (!_this.isAlive()) {
26400 return;
26401 }
26402 gui.rowComp.addOrRemoveCssClass('ag-after-created', true);
26403 });
26404 }
26405 });
26406 this.executeProcessRowPostCreateFunc();
26407 };
26408 RowCtrl.prototype.addRowDraggerToRow = function (gui) {
26409 var gow = this.beans.gridOptionsWrapper;
26410 if (gow.isEnableRangeSelection()) {
26411 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["doOnce"])(function () {
26412 console.warn('AG Grid: Setting `rowDragEntireRow: true` in the gridOptions doesn\'t work with `enableRangeSelection: true`');
26413 }, 'rowDragAndRangeSelectionEnabled');
26414 return;
26415 }
26416 var rowDragComp = new _rowDragComp__WEBPACK_IMPORTED_MODULE_14__["RowDragComp"](function () { return '1 row'; }, this.rowNode, undefined, gui.element, undefined, true);
26417 this.createManagedBean(rowDragComp, this.beans.context);
26418 };
26419 RowCtrl.prototype.setupFullWidth = function (gui) {
26420 var pinned = this.getPinnedForContainer(gui.containerType);
26421 var params = this.createFullWidthParams(gui.element, pinned);
26422 var masterDetailModuleLoaded = _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_6__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_5__["ModuleNames"].MasterDetailModule);
26423 if (this.rowType == RowType.FullWidthDetail && !masterDetailModuleLoaded) {
26424 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_6__["ModuleRegistry"].isPackageBased()) {
26425 console.warn("AG Grid: cell renderer 'agDetailCellRenderer' (for master detail) not found. Can only be used with ag-grid-enterprise package.");
26426 }
26427 else {
26428 console.warn("AG Grid: cell renderer 'agDetailCellRenderer' (for master detail) not found. Can only be used with AG Grid Enterprise Module " + _modules_moduleNames__WEBPACK_IMPORTED_MODULE_5__["ModuleNames"].MasterDetailModule);
26429 }
26430 return;
26431 }
26432 var compDetails;
26433 switch (this.rowType) {
26434 case RowType.FullWidthDetail:
26435 compDetails = this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(params);
26436 break;
26437 case RowType.FullWidthGroup:
26438 compDetails = this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(params);
26439 break;
26440 case RowType.FullWidthLoading:
26441 compDetails = this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(params);
26442 break;
26443 default:
26444 compDetails = this.beans.userComponentFactory.getFullWidthCellRendererDetails(params);
26445 break;
26446 }
26447 gui.rowComp.showFullWidth(compDetails);
26448 };
26449 RowCtrl.prototype.isPrintLayout = function () {
26450 return this.printLayout;
26451 };
26452 // use by autoWidthCalculator, as it clones the elements
26453 RowCtrl.prototype.getCellElement = function (column) {
26454 var cellCtrl = this.getCellCtrl(column);
26455 return cellCtrl ? cellCtrl.getGui() : null;
26456 };
26457 RowCtrl.prototype.executeProcessRowPostCreateFunc = function () {
26458 var func = this.beans.gridOptionsWrapper.getProcessRowPostCreateFunc();
26459 if (!func) {
26460 return;
26461 }
26462 var params = {
26463 eRow: this.centerGui ? this.centerGui.element : undefined,
26464 ePinnedLeftRow: this.leftGui ? this.leftGui.element : undefined,
26465 ePinnedRightRow: this.rightGui ? this.rightGui.element : undefined,
26466 node: this.rowNode,
26467 rowIndex: this.rowNode.rowIndex,
26468 addRenderedRowListener: this.addEventListener.bind(this),
26469 };
26470 func(params);
26471 };
26472 RowCtrl.prototype.setRowType = function () {
26473 var isStub = this.rowNode.stub;
26474 var isFullWidthCell = this.rowNode.isFullWidthCell();
26475 var isDetailCell = this.beans.doingMasterDetail && this.rowNode.detail;
26476 var pivotMode = this.beans.columnModel.isPivotMode();
26477 // we only use full width for groups, not footers. it wouldn't make sense to include footers if not looking
26478 // for totals. if users complain about this, then we should introduce a new property 'footerUseEntireRow'
26479 // so each can be set independently (as a customer complained about footers getting full width, hence
26480 // introducing this logic)
26481 var isGroupRow = !!this.rowNode.group && !this.rowNode.footer;
26482 var isFullWidthGroup = isGroupRow && this.beans.gridOptionsWrapper.isGroupUseEntireRow(pivotMode);
26483 if (isStub) {
26484 this.rowType = RowType.FullWidthLoading;
26485 }
26486 else if (isDetailCell) {
26487 this.rowType = RowType.FullWidthDetail;
26488 }
26489 else if (isFullWidthCell) {
26490 this.rowType = RowType.FullWidth;
26491 }
26492 else if (isFullWidthGroup) {
26493 this.rowType = RowType.FullWidthGroup;
26494 }
26495 else {
26496 this.rowType = RowType.Normal;
26497 }
26498 };
26499 RowCtrl.prototype.updateColumnLists = function (suppressAnimationFrame) {
26500 var _this = this;
26501 if (suppressAnimationFrame === void 0) { suppressAnimationFrame = false; }
26502 if (this.isFullWidth()) {
26503 return;
26504 }
26505 var noAnimation = suppressAnimationFrame
26506 || this.beans.gridOptionsWrapper.isSuppressAnimationFrame()
26507 || this.printLayout;
26508 if (noAnimation) {
26509 this.updateColumnListsImpl();
26510 return;
26511 }
26512 if (this.updateColumnListsPending) {
26513 return;
26514 }
26515 this.beans.animationFrameService.createTask(function () {
26516 if (!_this.active) {
26517 return;
26518 }
26519 _this.updateColumnListsImpl();
26520 }, this.rowNode.rowIndex, 'createTasksP1');
26521 this.updateColumnListsPending = true;
26522 };
26523 RowCtrl.prototype.createCellCtrls = function (prev, cols, pinned) {
26524 var _this = this;
26525 if (pinned === void 0) { pinned = null; }
26526 var res = {
26527 list: [],
26528 map: {}
26529 };
26530 var addCell = function (colInstanceId, cellCtrl) {
26531 res.list.push(cellCtrl);
26532 res.map[colInstanceId] = cellCtrl;
26533 };
26534 cols.forEach(function (col) {
26535 // we use instanceId's rather than colId as it's possible there is a Column with same Id,
26536 // but it's referring to a different column instance. Happens a lot with pivot, as pivot col id's are
26537 // reused eg pivot_0, pivot_1 etc
26538 var colInstanceId = col.getInstanceId();
26539 var cellCtrl = prev.map[colInstanceId];
26540 if (!cellCtrl) {
26541 cellCtrl = new _cell_cellCtrl__WEBPACK_IMPORTED_MODULE_13__["CellCtrl"](col, _this.rowNode, _this.beans, _this);
26542 }
26543 addCell(colInstanceId, cellCtrl);
26544 });
26545 prev.list.forEach(function (prevCellCtrl) {
26546 var cellInResult = res.map[prevCellCtrl.getColumn().getInstanceId()] != null;
26547 if (cellInResult) {
26548 return;
26549 }
26550 var keepCell = !_this.isCellEligibleToBeRemoved(prevCellCtrl, pinned);
26551 if (keepCell) {
26552 addCell(prevCellCtrl.getColumn().getInstanceId(), prevCellCtrl);
26553 return;
26554 }
26555 prevCellCtrl.destroy();
26556 });
26557 return res;
26558 };
26559 RowCtrl.prototype.updateColumnListsImpl = function () {
26560 var _this = this;
26561 this.updateColumnListsPending = false;
26562 var columnModel = this.beans.columnModel;
26563 if (this.printLayout) {
26564 this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, columnModel.getAllDisplayedColumns());
26565 this.leftCellCtrls = { list: [], map: {} };
26566 this.rightCellCtrls = { list: [], map: {} };
26567 }
26568 else {
26569 var centerCols = columnModel.getViewportCenterColumnsForRow(this.rowNode);
26570 this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, centerCols);
26571 var leftCols = columnModel.getDisplayedLeftColumnsForRow(this.rowNode);
26572 this.leftCellCtrls = this.createCellCtrls(this.leftCellCtrls, leftCols, _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_LEFT);
26573 var rightCols = columnModel.getDisplayedRightColumnsForRow(this.rowNode);
26574 this.rightCellCtrls = this.createCellCtrls(this.rightCellCtrls, rightCols, _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_RIGHT);
26575 }
26576 this.allRowGuis.forEach(function (item) {
26577 var cellControls = item.containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].LEFT ? _this.leftCellCtrls :
26578 item.containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].RIGHT ? _this.rightCellCtrls : _this.centerCellCtrls;
26579 item.rowComp.setCellCtrls(cellControls.list);
26580 });
26581 };
26582 RowCtrl.prototype.isCellEligibleToBeRemoved = function (cellCtrl, nextContainerPinned) {
26583 var REMOVE_CELL = true;
26584 var KEEP_CELL = false;
26585 // always remove the cell if it's not rendered or if it's in the wrong pinned location
26586 var column = cellCtrl.getColumn();
26587 if (column.getPinned() != nextContainerPinned) {
26588 return REMOVE_CELL;
26589 }
26590 // we want to try and keep editing and focused cells
26591 var editing = cellCtrl.isEditing();
26592 var focused = this.beans.focusService.isCellFocused(cellCtrl.getCellPosition());
26593 var mightWantToKeepCell = editing || focused;
26594 if (mightWantToKeepCell) {
26595 var column_1 = cellCtrl.getColumn();
26596 var displayedColumns = this.beans.columnModel.getAllDisplayedColumns();
26597 var cellStillDisplayed = displayedColumns.indexOf(column_1) >= 0;
26598 return cellStillDisplayed ? KEEP_CELL : REMOVE_CELL;
26599 }
26600 return REMOVE_CELL;
26601 };
26602 RowCtrl.prototype.setAnimateFlags = function (animateIn) {
26603 if (animateIn) {
26604 var oldRowTopExists = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_11__["exists"])(this.rowNode.oldRowTop);
26605 // if the row had a previous position, we slide it in (animate row top)
26606 this.slideRowIn = oldRowTopExists;
26607 // if the row had no previous position, we fade it in (animate
26608 this.fadeRowIn = !oldRowTopExists;
26609 }
26610 else {
26611 this.slideRowIn = false;
26612 this.fadeRowIn = false;
26613 }
26614 };
26615 RowCtrl.prototype.isEditing = function () {
26616 return this.editingRow;
26617 };
26618 RowCtrl.prototype.stopRowEditing = function (cancel) {
26619 this.stopEditing(cancel);
26620 };
26621 RowCtrl.prototype.isFullWidth = function () {
26622 return this.rowType !== RowType.Normal;
26623 };
26624 RowCtrl.prototype.getRowType = function () {
26625 return this.rowType;
26626 };
26627 RowCtrl.prototype.refreshFullWidth = function () {
26628 var _this = this;
26629 // returns 'true' if refresh succeeded
26630 var tryRefresh = function (gui, pinned) {
26631 if (!gui) {
26632 return true;
26633 } // no refresh needed
26634 var cellRenderer = gui.rowComp.getFullWidthCellRenderer();
26635 // no cell renderer, either means comp not yet ready, or comp ready but now reference
26636 // to it (happens in react when comp is stateless). if comp not ready, we don't need to
26637 // refresh, however we don't know which one, so we refresh to cover the case where it's
26638 // react comp without reference so need to force a refresh
26639 if (!cellRenderer) {
26640 return false;
26641 }
26642 // no refresh method present, so can't refresh, hard refresh needed
26643 if (!cellRenderer.refresh) {
26644 return false;
26645 }
26646 var params = _this.createFullWidthParams(gui.element, pinned);
26647 var refreshSucceeded = cellRenderer.refresh(params);
26648 return refreshSucceeded;
26649 };
26650 var fullWidthSuccess = tryRefresh(this.fullWidthGui, null);
26651 var centerSuccess = tryRefresh(this.centerGui, null);
26652 var leftSuccess = tryRefresh(this.leftGui, _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_LEFT);
26653 var rightSuccess = tryRefresh(this.rightGui, _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_RIGHT);
26654 var allFullWidthRowsRefreshed = fullWidthSuccess && centerSuccess && leftSuccess && rightSuccess;
26655 return allFullWidthRowsRefreshed;
26656 };
26657 RowCtrl.prototype.addListeners = function () {
26658 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_HEIGHT_CHANGED, this.onRowHeightChanged.bind(this));
26659 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_ROW_SELECTED, this.onRowSelected.bind(this));
26660 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_ROW_INDEX_CHANGED, this.onRowIndexChanged.bind(this));
26661 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_TOP_CHANGED, this.onTopChanged.bind(this));
26662 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_EXPANDED_CHANGED, this.updateExpandedCss.bind(this));
26663 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_HAS_CHILDREN_CHANGED, this.updateExpandedCss.bind(this));
26664 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_DATA_CHANGED, this.onRowNodeDataChanged.bind(this));
26665 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_CELL_CHANGED, this.onRowNodeCellChanged.bind(this));
26666 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_HIGHLIGHT_CHANGED, this.onRowNodeHighlightChanged.bind(this));
26667 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_DRAGGING_CHANGED, this.onRowNodeDraggingChanged.bind(this));
26668 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_UI_LEVEL_CHANGED, this.onUiLevelChanged.bind(this));
26669 var eventService = this.beans.eventService;
26670 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_PAGINATION_PIXEL_OFFSET_CHANGED, this.onPaginationPixelOffsetChanged.bind(this));
26671 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_HEIGHT_SCALE_CHANGED, this.onTopChanged.bind(this));
26672 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));
26673 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_VIRTUAL_COLUMNS_CHANGED, this.onVirtualColumnsChanged.bind(this));
26674 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_CELL_FOCUSED, this.onCellFocusChanged.bind(this));
26675 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_PAGINATION_CHANGED, this.onPaginationChanged.bind(this));
26676 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_MODEL_UPDATED, this.onModelUpdated.bind(this));
26677 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_COLUMN_MOVED, this.onColumnMoved.bind(this));
26678 this.addListenersForCellComps();
26679 };
26680 RowCtrl.prototype.onColumnMoved = function () {
26681 this.updateColumnLists();
26682 };
26683 RowCtrl.prototype.addListenersForCellComps = function () {
26684 var _this = this;
26685 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_ROW_INDEX_CHANGED, function () {
26686 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onRowIndexChanged(); });
26687 });
26688 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_CELL_CHANGED, function (event) {
26689 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onCellChanged(event); });
26690 });
26691 };
26692 RowCtrl.prototype.onRowNodeDataChanged = function (event) {
26693 // if this is an update, we want to refresh, as this will allow the user to put in a transition
26694 // into the cellRenderer refresh method. otherwise this might be completely new data, in which case
26695 // we will want to completely replace the cells
26696 this.getAllCellCtrls().forEach(function (cellCtrl) {
26697 return cellCtrl.refreshCell({
26698 suppressFlash: !event.update,
26699 newData: !event.update
26700 });
26701 });
26702 // check for selected also, as this could be after lazy loading of the row data, in which case
26703 // the id might of just gotten set inside the row and the row selected state may of changed
26704 // as a result. this is what happens when selected rows are loaded in virtual pagination.
26705 // - niall note - since moving to the stub component, this may no longer be true, as replacing
26706 // the stub component now replaces the entire row
26707 this.onRowSelected();
26708 // as data has changed, then the style and class needs to be recomputed
26709 this.postProcessCss();
26710 };
26711 RowCtrl.prototype.onRowNodeCellChanged = function () {
26712 // as data has changed, then the style and class needs to be recomputed
26713 this.postProcessCss();
26714 };
26715 RowCtrl.prototype.postProcessCss = function () {
26716 this.setStylesFromGridOptions();
26717 this.postProcessClassesFromGridOptions();
26718 this.postProcessRowClassRules();
26719 this.postProcessRowDragging();
26720 };
26721 RowCtrl.prototype.onRowNodeHighlightChanged = function () {
26722 var highlighted = this.rowNode.highlighted;
26723 this.allRowGuis.forEach(function (gui) {
26724 var aboveOn = highlighted === _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowHighlightPosition"].Above;
26725 var belowOn = highlighted === _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowHighlightPosition"].Below;
26726 gui.rowComp.addOrRemoveCssClass('ag-row-highlight-above', aboveOn);
26727 gui.rowComp.addOrRemoveCssClass('ag-row-highlight-below', belowOn);
26728 });
26729 };
26730 RowCtrl.prototype.onRowNodeDraggingChanged = function () {
26731 this.postProcessRowDragging();
26732 };
26733 RowCtrl.prototype.postProcessRowDragging = function () {
26734 var dragging = this.rowNode.dragging;
26735 this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-dragging', dragging); });
26736 };
26737 RowCtrl.prototype.updateExpandedCss = function () {
26738 var expandable = this.rowNode.isExpandable();
26739 var expanded = this.rowNode.expanded == true;
26740 this.allRowGuis.forEach(function (gui) {
26741 gui.rowComp.addOrRemoveCssClass('ag-row-group', expandable);
26742 gui.rowComp.addOrRemoveCssClass('ag-row-group-expanded', expandable && expanded);
26743 gui.rowComp.addOrRemoveCssClass('ag-row-group-contracted', expandable && !expanded);
26744 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaExpanded"])(gui.element, expandable && expanded);
26745 });
26746 };
26747 RowCtrl.prototype.onDisplayedColumnsChanged = function () {
26748 // we skip animations for onDisplayedColumnChanged, as otherwise the client could remove columns and
26749 // then set data, and any old valueGetter's (ie from cols that were removed) would still get called.
26750 this.updateColumnLists(true);
26751 if (this.beans.columnModel.wasAutoRowHeightEverActive()) {
26752 this.rowNode.checkAutoHeights();
26753 }
26754 };
26755 RowCtrl.prototype.onVirtualColumnsChanged = function () {
26756 this.updateColumnLists();
26757 };
26758 RowCtrl.prototype.getRowPosition = function () {
26759 return {
26760 rowPinned: Object(_utils_generic__WEBPACK_IMPORTED_MODULE_11__["makeNull"])(this.rowNode.rowPinned),
26761 rowIndex: this.rowNode.rowIndex
26762 };
26763 };
26764 RowCtrl.prototype.onKeyboardNavigate = function (keyboardEvent) {
26765 var currentFullWidthComp = this.allRowGuis.find(function (c) { return c.element.contains(keyboardEvent.target); });
26766 var currentFullWidthContainer = currentFullWidthComp ? currentFullWidthComp.element : null;
26767 var isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;
26768 if (!isFullWidthContainerFocused) {
26769 return;
26770 }
26771 var node = this.rowNode;
26772 var lastFocusedCell = this.beans.focusService.getFocusedCell();
26773 var cellPosition = {
26774 rowIndex: node.rowIndex,
26775 rowPinned: node.rowPinned,
26776 column: (lastFocusedCell && lastFocusedCell.column)
26777 };
26778 this.beans.navigationService.navigateToNextCell(keyboardEvent, keyboardEvent.key, cellPosition, true);
26779 keyboardEvent.preventDefault();
26780 };
26781 RowCtrl.prototype.onTabKeyDown = function (keyboardEvent) {
26782 if (keyboardEvent.defaultPrevented || Object(_utils_event__WEBPACK_IMPORTED_MODULE_9__["isStopPropagationForAgGrid"])(keyboardEvent)) {
26783 return;
26784 }
26785 var currentFullWidthComp = this.allRowGuis.find(function (c) { return c.element.contains(keyboardEvent.target); });
26786 var currentFullWidthContainer = currentFullWidthComp ? currentFullWidthComp.element : null;
26787 var isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;
26788 var nextEl = null;
26789 if (!isFullWidthContainerFocused) {
26790 nextEl = this.beans.focusService.findNextFocusableElement(currentFullWidthContainer, false, keyboardEvent.shiftKey);
26791 }
26792 if ((this.isFullWidth() && isFullWidthContainerFocused) || !nextEl) {
26793 this.beans.navigationService.onTabKeyDown(this, keyboardEvent);
26794 }
26795 };
26796 RowCtrl.prototype.onFullWidthRowFocused = function (event) {
26797 var _a;
26798 var node = this.rowNode;
26799 var isFocused = this.isFullWidth() && event.rowIndex === node.rowIndex && event.rowPinned == node.rowPinned;
26800 var element = this.fullWidthGui ? this.fullWidthGui.element : (_a = this.centerGui) === null || _a === void 0 ? void 0 : _a.element;
26801 if (!element) {
26802 return;
26803 } // can happen with react ui, comp not yet ready
26804 element.classList.toggle('ag-full-width-focus', isFocused);
26805 if (isFocused) {
26806 // we don't scroll normal rows into view when we focus them, so we don't want
26807 // to scroll Full Width rows either.
26808 element.focus({ preventScroll: true });
26809 }
26810 };
26811 RowCtrl.prototype.refreshCell = function (cellCtrl) {
26812 this.centerCellCtrls = this.removeCellCtrl(this.centerCellCtrls, cellCtrl);
26813 this.leftCellCtrls = this.removeCellCtrl(this.leftCellCtrls, cellCtrl);
26814 this.rightCellCtrls = this.removeCellCtrl(this.rightCellCtrls, cellCtrl);
26815 this.updateColumnLists();
26816 };
26817 RowCtrl.prototype.removeCellCtrl = function (prev, cellCtrlToRemove) {
26818 var res = {
26819 list: [],
26820 map: {}
26821 };
26822 prev.list.forEach(function (cellCtrl) {
26823 if (cellCtrl === cellCtrlToRemove) {
26824 return;
26825 }
26826 res.list.push(cellCtrl);
26827 res.map[cellCtrl.getInstanceId()] = cellCtrl;
26828 });
26829 return res;
26830 };
26831 RowCtrl.prototype.onMouseEvent = function (eventName, mouseEvent) {
26832 switch (eventName) {
26833 case 'dblclick':
26834 this.onRowDblClick(mouseEvent);
26835 break;
26836 case 'click':
26837 this.onRowClick(mouseEvent);
26838 break;
26839 case 'touchstart':
26840 case 'mousedown':
26841 this.onRowMouseDown(mouseEvent);
26842 break;
26843 }
26844 };
26845 RowCtrl.prototype.createRowEvent = function (type, domEvent) {
26846 return {
26847 type: type,
26848 node: this.rowNode,
26849 data: this.rowNode.data,
26850 rowIndex: this.rowNode.rowIndex,
26851 rowPinned: this.rowNode.rowPinned,
26852 context: this.beans.gridOptionsWrapper.getContext(),
26853 api: this.beans.gridOptionsWrapper.getApi(),
26854 columnApi: this.beans.gridOptionsWrapper.getColumnApi(),
26855 event: domEvent
26856 };
26857 };
26858 RowCtrl.prototype.createRowEventWithSource = function (type, domEvent) {
26859 var event = this.createRowEvent(type, domEvent);
26860 // when first developing this, we included the rowComp in the event.
26861 // this seems very weird. so when introducing the event types, i left the 'source'
26862 // out of the type, and just include the source in the two places where this event
26863 // was fired (rowClicked and rowDoubleClicked). it doesn't make sense for any
26864 // users to be using this, as the rowComp isn't an object we expose, so would be
26865 // very surprising if a user was using it.
26866 event.source = this;
26867 return event;
26868 };
26869 RowCtrl.prototype.onRowDblClick = function (mouseEvent) {
26870 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_9__["isStopPropagationForAgGrid"])(mouseEvent)) {
26871 return;
26872 }
26873 var agEvent = this.createRowEventWithSource(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_ROW_DOUBLE_CLICKED, mouseEvent);
26874 this.beans.eventService.dispatchEvent(agEvent);
26875 };
26876 RowCtrl.prototype.onRowMouseDown = function (mouseEvent) {
26877 this.lastMouseDownOnDragger = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_8__["isElementChildOfClass"])(mouseEvent.target, 'ag-row-drag', 3);
26878 if (!this.isFullWidth()) {
26879 return;
26880 }
26881 var node = this.rowNode;
26882 var columnModel = this.beans.columnModel;
26883 this.beans.focusService.setFocusedCell(node.rowIndex, columnModel.getAllDisplayedColumns()[0], node.rowPinned, true);
26884 };
26885 RowCtrl.prototype.onRowClick = function (mouseEvent) {
26886 var stop = Object(_utils_event__WEBPACK_IMPORTED_MODULE_9__["isStopPropagationForAgGrid"])(mouseEvent) || this.lastMouseDownOnDragger;
26887 if (stop) {
26888 return;
26889 }
26890 var agEvent = this.createRowEventWithSource(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_ROW_CLICKED, mouseEvent);
26891 this.beans.eventService.dispatchEvent(agEvent);
26892 // ctrlKey for windows, metaKey for Apple
26893 var multiSelectKeyPressed = mouseEvent.ctrlKey || mouseEvent.metaKey;
26894 var shiftKeyPressed = mouseEvent.shiftKey;
26895 // we do not allow selecting the group by clicking, when groupSelectChildren, as the logic to
26896 // handle this is broken. to observe, change the logic below and allow groups to be selected.
26897 // you will see the group gets selected, then all children get selected, then the grid unselects
26898 // the children (as the default behaviour when clicking is to unselect other rows) which results
26899 // in the group getting unselected (as all children are unselected). the correct thing would be
26900 // to change this, so that children of the selected group are not then subsequenly un-selected.
26901 var groupSelectsChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();
26902 if (
26903 // we do not allow selecting groups by clicking (as the click here expands the group), or if it's a detail row,
26904 // so return if it's a group row
26905 (groupSelectsChildren && this.rowNode.group) ||
26906 // this is needed so we don't unselect other rows when we click this row, eg if this row is not selectable,
26907 // and we click it, the selection should not change (ie any currently selected row should stay selected)
26908 !this.rowNode.selectable ||
26909 // we also don't allow selection of pinned rows
26910 this.rowNode.rowPinned ||
26911 // if no selection method enabled, do nothing
26912 !this.beans.gridOptionsWrapper.isRowSelection() ||
26913 // if click selection suppressed, do nothing
26914 this.beans.gridOptionsWrapper.isSuppressRowClickSelection()) {
26915 return;
26916 }
26917 var multiSelectOnClick = this.beans.gridOptionsWrapper.isRowMultiSelectWithClick();
26918 var rowDeselectionWithCtrl = !this.beans.gridOptionsWrapper.isSuppressRowDeselection();
26919 if (this.rowNode.isSelected()) {
26920 if (multiSelectOnClick) {
26921 this.rowNode.setSelectedParams({ newValue: false });
26922 }
26923 else if (multiSelectKeyPressed) {
26924 if (rowDeselectionWithCtrl) {
26925 this.rowNode.setSelectedParams({ newValue: false });
26926 }
26927 }
26928 else {
26929 // selected with no multi key, must make sure anything else is unselected
26930 this.rowNode.setSelectedParams({ newValue: true, clearSelection: !shiftKeyPressed, rangeSelect: shiftKeyPressed });
26931 }
26932 }
26933 else {
26934 var clearSelection = multiSelectOnClick ? false : !multiSelectKeyPressed;
26935 this.rowNode.setSelectedParams({ newValue: true, clearSelection: clearSelection, rangeSelect: shiftKeyPressed });
26936 }
26937 };
26938 RowCtrl.prototype.setupDetailRowAutoHeight = function (eDetailGui) {
26939 var _this = this;
26940 if (this.rowType !== RowType.FullWidthDetail) {
26941 return;
26942 }
26943 if (!this.beans.gridOptionsWrapper.isDetailRowAutoHeight()) {
26944 return;
26945 }
26946 var checkRowSizeFunc = function () {
26947 var clientHeight = eDetailGui.clientHeight;
26948 // if the UI is not ready, the height can be 0, which we ignore, as otherwise a flicker will occur
26949 // as UI goes from the default height, to 0, then to the real height as UI becomes ready. this means
26950 // it's not possible for have 0 as auto-height, however this is an improbable use case, as even an
26951 // empty detail grid would still have some styling around it giving at least a few pixels.
26952 if (clientHeight != null && clientHeight > 0) {
26953 // we do the update in a timeout, to make sure we are not calling from inside the grid
26954 // doing another update
26955 var updateRowHeightFunc = function () {
26956 _this.rowNode.setRowHeight(clientHeight);
26957 if (_this.beans.clientSideRowModel) {
26958 _this.beans.clientSideRowModel.onRowHeightChanged();
26959 }
26960 else if (_this.beans.serverSideRowModel) {
26961 _this.beans.serverSideRowModel.onRowHeightChanged();
26962 }
26963 };
26964 _this.beans.frameworkOverrides.setTimeout(updateRowHeightFunc, 0);
26965 }
26966 };
26967 var resizeObserverDestroyFunc = this.beans.resizeObserverService.observeResize(eDetailGui, checkRowSizeFunc);
26968 this.addDestroyFunc(resizeObserverDestroyFunc);
26969 checkRowSizeFunc();
26970 };
26971 RowCtrl.prototype.createFullWidthParams = function (eRow, pinned) {
26972 var _this = this;
26973 var params = {
26974 fullWidth: true,
26975 data: this.rowNode.data,
26976 node: this.rowNode,
26977 value: this.rowNode.key,
26978 valueFormatted: this.rowNode.key,
26979 rowIndex: this.rowNode.rowIndex,
26980 api: this.beans.gridOptionsWrapper.getApi(),
26981 columnApi: this.beans.gridOptionsWrapper.getColumnApi(),
26982 context: this.beans.gridOptionsWrapper.getContext(),
26983 // these need to be taken out, as part of 'afterAttached' now
26984 eGridCell: eRow,
26985 eParentOfValue: eRow,
26986 pinned: pinned,
26987 addRenderedRowListener: this.addEventListener.bind(this),
26988 registerRowDragger: function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) { return _this.addFullWidthRowDragging(rowDraggerElement, dragStartPixels, value, suppressVisibilityChange); }
26989 };
26990 return params;
26991 };
26992 RowCtrl.prototype.addFullWidthRowDragging = function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) {
26993 if (value === void 0) { value = ''; }
26994 if (!this.isFullWidth()) {
26995 return;
26996 }
26997 var rowDragComp = new _rowDragComp__WEBPACK_IMPORTED_MODULE_14__["RowDragComp"](function () { return value; }, this.rowNode, undefined, rowDraggerElement, dragStartPixels, suppressVisibilityChange);
26998 this.createManagedBean(rowDragComp, this.beans.context);
26999 };
27000 RowCtrl.prototype.onUiLevelChanged = function () {
27001 var newLevel = this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);
27002 if (this.rowLevel != newLevel) {
27003 var classToAdd_1 = 'ag-row-level-' + newLevel;
27004 var classToRemove_1 = 'ag-row-level-' + this.rowLevel;
27005 this.allRowGuis.forEach(function (gui) {
27006 gui.rowComp.addOrRemoveCssClass(classToAdd_1, true);
27007 gui.rowComp.addOrRemoveCssClass(classToRemove_1, false);
27008 });
27009 }
27010 this.rowLevel = newLevel;
27011 };
27012 RowCtrl.prototype.isFirstRowOnPage = function () {
27013 return this.rowNode.rowIndex === this.beans.paginationProxy.getPageFirstRow();
27014 };
27015 RowCtrl.prototype.isLastRowOnPage = function () {
27016 return this.rowNode.rowIndex === this.beans.paginationProxy.getPageLastRow();
27017 };
27018 RowCtrl.prototype.onModelUpdated = function () {
27019 this.refreshFirstAndLastRowStyles();
27020 };
27021 RowCtrl.prototype.refreshFirstAndLastRowStyles = function () {
27022 var newFirst = this.isFirstRowOnPage();
27023 var newLast = this.isLastRowOnPage();
27024 if (this.firstRowOnPage !== newFirst) {
27025 this.firstRowOnPage = newFirst;
27026 this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-first', newFirst); });
27027 }
27028 if (this.lastRowOnPage !== newLast) {
27029 this.lastRowOnPage = newLast;
27030 this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-last', newLast); });
27031 }
27032 };
27033 RowCtrl.prototype.stopEditing = function (cancel) {
27034 if (cancel === void 0) { cancel = false; }
27035 var cellEdits = this.getAllCellCtrls().map(function (cellCtrl) { return cellCtrl.stopEditing(cancel); });
27036 if (!this.editingRow) {
27037 return;
27038 }
27039 if (!cancel && cellEdits.some(function (edit) { return edit; })) {
27040 var event_1 = this.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_ROW_VALUE_CHANGED);
27041 this.beans.eventService.dispatchEvent(event_1);
27042 }
27043 this.setEditingRow(false);
27044 };
27045 RowCtrl.prototype.setInlineEditingCss = function (editing) {
27046 this.allRowGuis.forEach(function (gui) {
27047 gui.rowComp.addOrRemoveCssClass("ag-row-inline-editing", editing);
27048 gui.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing", !editing);
27049 });
27050 };
27051 RowCtrl.prototype.setEditingRow = function (value) {
27052 this.editingRow = value;
27053 this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-editing', value); });
27054 var event = value ?
27055 this.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_ROW_EDITING_STARTED)
27056 : this.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_ROW_EDITING_STOPPED);
27057 this.beans.eventService.dispatchEvent(event);
27058 };
27059 RowCtrl.prototype.startRowEditing = function (key, charPress, sourceRenderedCell, event) {
27060 if (key === void 0) { key = null; }
27061 if (charPress === void 0) { charPress = null; }
27062 if (sourceRenderedCell === void 0) { sourceRenderedCell = null; }
27063 if (event === void 0) { event = null; }
27064 // don't do it if already editing
27065 if (this.editingRow) {
27066 return;
27067 }
27068 this.getAllCellCtrls().forEach(function (cellCtrl) {
27069 var cellStartedEdit = cellCtrl === sourceRenderedCell;
27070 if (cellStartedEdit) {
27071 cellCtrl.startEditing(key, charPress, cellStartedEdit, event);
27072 }
27073 else {
27074 cellCtrl.startEditing(null, null, cellStartedEdit, event);
27075 }
27076 });
27077 this.setEditingRow(true);
27078 };
27079 RowCtrl.prototype.getAllCellCtrls = function () {
27080 var res = __spread(this.centerCellCtrls.list, this.leftCellCtrls.list, this.rightCellCtrls.list);
27081 return res;
27082 };
27083 RowCtrl.prototype.postProcessClassesFromGridOptions = function () {
27084 var _this = this;
27085 var cssClasses = this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);
27086 if (!cssClasses || !cssClasses.length) {
27087 return;
27088 }
27089 cssClasses.forEach(function (classStr) {
27090 _this.allRowGuis.forEach(function (c) { return c.rowComp.addOrRemoveCssClass(classStr, true); });
27091 });
27092 };
27093 RowCtrl.prototype.postProcessRowClassRules = function () {
27094 var _this = this;
27095 this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode, function (className) {
27096 _this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass(className, true); });
27097 }, function (className) {
27098 _this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass(className, false); });
27099 });
27100 };
27101 RowCtrl.prototype.setStylesFromGridOptions = function () {
27102 var rowStyles = this.processStylesFromGridOptions();
27103 this.allRowGuis.forEach(function (gui) { return gui.rowComp.setUserStyles(rowStyles); });
27104 };
27105 RowCtrl.prototype.getRowBusinessKey = function () {
27106 var businessKeyForNodeFunc = this.beans.gridOptionsWrapper.getBusinessKeyForNodeFunc();
27107 if (typeof businessKeyForNodeFunc !== 'function') {
27108 return;
27109 }
27110 return businessKeyForNodeFunc(this.rowNode);
27111 };
27112 RowCtrl.prototype.getPinnedForContainer = function (rowContainerType) {
27113 var pinned = rowContainerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].LEFT ? _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_LEFT :
27114 rowContainerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].RIGHT ? _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_RIGHT : null;
27115 return pinned;
27116 };
27117 RowCtrl.prototype.getInitialRowClasses = function (rowContainerType) {
27118 var pinned = this.getPinnedForContainer(rowContainerType);
27119 var params = {
27120 rowNode: this.rowNode,
27121 rowFocused: this.rowFocused,
27122 fadeRowIn: this.fadeRowIn,
27123 rowIsEven: this.rowNode.rowIndex % 2 === 0,
27124 rowLevel: this.rowLevel,
27125 fullWidthRow: this.isFullWidth(),
27126 firstRowOnPage: this.isFirstRowOnPage(),
27127 lastRowOnPage: this.isLastRowOnPage(),
27128 printLayout: this.printLayout,
27129 expandable: this.rowNode.isExpandable(),
27130 pinned: pinned
27131 };
27132 return this.beans.rowCssClassCalculator.getInitialRowClasses(params);
27133 };
27134 RowCtrl.prototype.processStylesFromGridOptions = function () {
27135 // part 1 - rowStyle
27136 var rowStyle = this.beans.gridOptionsWrapper.getRowStyle();
27137 if (rowStyle && typeof rowStyle === 'function') {
27138 console.warn('AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead');
27139 return;
27140 }
27141 // part 1 - rowStyleFunc
27142 var rowStyleFunc = this.beans.gridOptionsWrapper.getRowStyleFunc();
27143 var rowStyleFuncResult;
27144 if (rowStyleFunc) {
27145 var params = {
27146 data: this.rowNode.data,
27147 node: this.rowNode,
27148 rowIndex: this.rowNode.rowIndex
27149 };
27150 rowStyleFuncResult = rowStyleFunc(params);
27151 }
27152 return Object.assign({}, rowStyle, rowStyleFuncResult);
27153 };
27154 RowCtrl.prototype.onRowSelected = function () {
27155 var _this = this;
27156 // Treat undefined as false, if we pass undefined down it gets treated as toggle class, rather than explicitly
27157 // setting the required value
27158 var selected = !!this.rowNode.isSelected();
27159 this.allRowGuis.forEach(function (gui) {
27160 gui.rowComp.addOrRemoveCssClass('ag-row-selected', selected);
27161 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaSelected"])(gui.element, selected ? true : undefined);
27162 var ariaLabel = _this.createAriaLabel();
27163 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaLabel"])(gui.element, ariaLabel == null ? '' : ariaLabel);
27164 });
27165 };
27166 RowCtrl.prototype.createAriaLabel = function () {
27167 var selected = this.rowNode.isSelected();
27168 if (selected && this.beans.gridOptionsWrapper.isSuppressRowDeselection()) {
27169 return undefined;
27170 }
27171 var translate = this.beans.gridOptionsWrapper.getLocaleTextFunc();
27172 var label = translate(selected ? 'ariaRowDeselect' : 'ariaRowSelect', "Press SPACE to " + (selected ? 'deselect' : 'select') + " this row.");
27173 return label;
27174 };
27175 RowCtrl.prototype.isUseAnimationFrameForCreate = function () {
27176 return this.useAnimationFrameForCreate;
27177 };
27178 RowCtrl.prototype.addHoverFunctionality = function (eRow) {
27179 var _this = this;
27180 // because we use animation frames to do this, it's possible the row no longer exists
27181 // by the time we get to add it
27182 if (!this.active) {
27183 return;
27184 }
27185 // because mouseenter and mouseleave do not propagate, we cannot listen on the gridPanel
27186 // like we do for all the other mouse events.
27187 // because of the pinning, we cannot simply add / remove the class based on the eRow. we
27188 // have to check all eRow's (body & pinned). so the trick is if any of the rows gets a
27189 // mouse hover, it sets such in the rowNode, and then all three reflect the change as
27190 // all are listening for event on the row node.
27191 // step 1 - add listener, to set flag on row node
27192 this.addManagedListener(eRow, 'mouseenter', function () { return _this.rowNode.onMouseEnter(); });
27193 this.addManagedListener(eRow, 'mouseleave', function () { return _this.rowNode.onMouseLeave(); });
27194 // step 2 - listen for changes on row node (which any eRow can trigger)
27195 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_MOUSE_ENTER, function () {
27196 // if hover turned off, we don't add the class. we do this here so that if the application
27197 // toggles this property mid way, we remove the hover form the last row, but we stop
27198 // adding hovers from that point onwards.
27199 if (!_this.beans.gridOptionsWrapper.isSuppressRowHoverHighlight()) {
27200 eRow.classList.add('ag-row-hover');
27201 }
27202 });
27203 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_MOUSE_LEAVE, function () {
27204 eRow.classList.remove('ag-row-hover');
27205 });
27206 };
27207 // for animation, we don't want to animate entry or exit to a very far away pixel,
27208 // otherwise the row would move so fast, it would appear to disappear. so this method
27209 // moves the row closer to the viewport if it is far away, so the row slide in / out
27210 // at a speed the user can see.
27211 RowCtrl.prototype.roundRowTopToBounds = function (rowTop) {
27212 var gridBodyCon = this.beans.ctrlsService.getGridBodyCtrl();
27213 var range = gridBodyCon.getScrollFeature().getVScrollPosition();
27214 var minPixel = this.applyPaginationOffset(range.top, true) - 100;
27215 var maxPixel = this.applyPaginationOffset(range.bottom, true) + 100;
27216 return Math.min(Math.max(minPixel, rowTop), maxPixel);
27217 };
27218 RowCtrl.prototype.getFrameworkOverrides = function () {
27219 return this.beans.frameworkOverrides;
27220 };
27221 RowCtrl.prototype.onRowHeightChanged = function () {
27222 // check for exists first - if the user is resetting the row height, then
27223 // it will be null (or undefined) momentarily until the next time the flatten
27224 // stage is called where the row will then update again with a new height
27225 if (this.rowNode.rowHeight == null) {
27226 return;
27227 }
27228 var rowHeight = this.rowNode.rowHeight;
27229 var defaultRowHeight = this.beans.gridOptionsWrapper.getDefaultRowHeight();
27230 var isHeightFromFunc = this.beans.gridOptionsWrapper.isGetRowHeightFunction();
27231 var heightFromFunc = isHeightFromFunc ? this.beans.gridOptionsWrapper.getRowHeightForNode(this.rowNode).height : undefined;
27232 var lineHeight = heightFromFunc ? Math.min(defaultRowHeight, heightFromFunc) - 2 + "px" : undefined;
27233 this.allRowGuis.forEach(function (gui) {
27234 gui.element.style.height = rowHeight + "px";
27235 // If the row height is coming from a function, this means some rows can
27236 // be smaller than the theme had intended. so we set --ag-line-height on
27237 // the row, which is picked up by the theme CSS and is used in a calc
27238 // for the CSS line-height property, which makes sure the line-height is
27239 // not bigger than the row height, otherwise the row text would not fit.
27240 // We do not use rowNode.rowHeight here, as this could be the result of autoHeight,
27241 // and we found using the autoHeight result causes a loop, where changing the
27242 // line-height them impacts the cell height, resulting in a new autoHeight,
27243 // resulting in a new line-height and so on loop.
27244 // const heightFromFunc = this.beans.gridOptionsWrapper.getRowHeightForNode(this.rowNode).height;
27245 if (lineHeight) {
27246 gui.element.style.setProperty('--ag-line-height', lineHeight);
27247 }
27248 });
27249 };
27250 RowCtrl.prototype.addEventListener = function (eventType, listener) {
27251 if (eventType === 'renderedRowRemoved' || eventType === 'rowRemoved') {
27252 eventType = _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_VIRTUAL_ROW_REMOVED;
27253 console.warn('AG Grid: Since version 11, event renderedRowRemoved is now called ' + _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_VIRTUAL_ROW_REMOVED);
27254 }
27255 _super.prototype.addEventListener.call(this, eventType, listener);
27256 };
27257 RowCtrl.prototype.removeEventListener = function (eventType, listener) {
27258 if (eventType === 'renderedRowRemoved' || eventType === 'rowRemoved') {
27259 eventType = _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_VIRTUAL_ROW_REMOVED;
27260 console.warn('AG Grid: Since version 11, event renderedRowRemoved and rowRemoved is now called ' + _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_VIRTUAL_ROW_REMOVED);
27261 }
27262 _super.prototype.removeEventListener.call(this, eventType, listener);
27263 };
27264 // note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.
27265 RowCtrl.prototype.destroyFirstPass = function () {
27266 this.active = false;
27267 // why do we have this method? shouldn't everything below be added as a destroy func beside
27268 // the corresponding create logic?
27269 this.setupRemoveAnimation();
27270 var event = this.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_VIRTUAL_ROW_REMOVED);
27271 this.dispatchEvent(event);
27272 this.beans.eventService.dispatchEvent(event);
27273 _super.prototype.destroy.call(this);
27274 };
27275 RowCtrl.prototype.setupRemoveAnimation = function () {
27276 var rowStillVisibleJustNotInViewport = this.rowNode.rowTop != null;
27277 if (rowStillVisibleJustNotInViewport) {
27278 // if the row is not rendered, but in viewport, it means it has moved,
27279 // so we animate the row out. if the new location is very far away,
27280 // the animation will be so fast the row will look like it's just disappeared,
27281 // so instead we animate to a position just outside the viewport.
27282 var rowTop = this.roundRowTopToBounds(this.rowNode.rowTop);
27283 this.setRowTop(rowTop);
27284 }
27285 else {
27286 this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', true); });
27287 }
27288 };
27289 RowCtrl.prototype.destroySecondPass = function () {
27290 this.allRowGuis.length = 0;
27291 var destroyCellCtrls = function (ctrls) {
27292 ctrls.list.forEach(function (c) { return c.destroy(); });
27293 return { list: [], map: {} };
27294 };
27295 this.centerCellCtrls = destroyCellCtrls(this.centerCellCtrls);
27296 this.leftCellCtrls = destroyCellCtrls(this.leftCellCtrls);
27297 this.rightCellCtrls = destroyCellCtrls(this.rightCellCtrls);
27298 };
27299 RowCtrl.prototype.setFocusedClasses = function () {
27300 var _this = this;
27301 this.allRowGuis.forEach(function (gui) {
27302 gui.rowComp.addOrRemoveCssClass('ag-row-focus', _this.rowFocused);
27303 gui.rowComp.addOrRemoveCssClass('ag-row-no-focus', !_this.rowFocused);
27304 });
27305 };
27306 RowCtrl.prototype.onCellFocusChanged = function () {
27307 var rowFocused = this.beans.focusService.isRowFocused(this.rowNode.rowIndex, this.rowNode.rowPinned);
27308 if (rowFocused !== this.rowFocused) {
27309 this.rowFocused = rowFocused;
27310 this.setFocusedClasses();
27311 }
27312 // if we are editing, then moving the focus out of a row will stop editing
27313 if (!rowFocused && this.editingRow) {
27314 this.stopEditing(false);
27315 }
27316 };
27317 RowCtrl.prototype.onPaginationChanged = function () {
27318 var currentPage = this.beans.paginationProxy.getCurrentPage();
27319 // it is possible this row is in the new page, but the page number has changed, which means
27320 // it needs to reposition itself relative to the new page
27321 if (this.paginationPage !== currentPage) {
27322 this.paginationPage = currentPage;
27323 this.onTopChanged();
27324 }
27325 this.refreshFirstAndLastRowStyles();
27326 };
27327 RowCtrl.prototype.onTopChanged = function () {
27328 this.setRowTop(this.rowNode.rowTop);
27329 };
27330 RowCtrl.prototype.onPaginationPixelOffsetChanged = function () {
27331 // the pixel offset is used when calculating rowTop to set on the row DIV
27332 this.onTopChanged();
27333 };
27334 // applies pagination offset, eg if on second page, and page height is 500px, then removes
27335 // 500px from the top position, so a row with rowTop 600px is displayed at location 100px.
27336 // reverse will take the offset away rather than add.
27337 RowCtrl.prototype.applyPaginationOffset = function (topPx, reverse) {
27338 if (reverse === void 0) { reverse = false; }
27339 if (this.rowNode.isRowPinned()) {
27340 return topPx;
27341 }
27342 var pixelOffset = this.beans.paginationProxy.getPixelOffset();
27343 var multiplier = reverse ? 1 : -1;
27344 return topPx + (pixelOffset * multiplier);
27345 };
27346 RowCtrl.prototype.setRowTop = function (pixels) {
27347 // print layout uses normal flow layout for row positioning
27348 if (this.printLayout) {
27349 return;
27350 }
27351 // need to make sure rowTop is not null, as this can happen if the node was once
27352 // visible (ie parent group was expanded) but is now not visible
27353 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_11__["exists"])(pixels)) {
27354 var afterPaginationPixels = this.applyPaginationOffset(pixels);
27355 var afterScalingPixels = this.rowNode.isRowPinned() ? afterPaginationPixels : this.beans.rowContainerHeightService.getRealPixelPosition(afterPaginationPixels);
27356 var topPx = afterScalingPixels + "px";
27357 this.setRowTopStyle(topPx);
27358 }
27359 };
27360 RowCtrl.prototype.getInitialRowTop = function () {
27361 return this.initialTop;
27362 };
27363 RowCtrl.prototype.getInitialTransform = function () {
27364 return this.initialTransform;
27365 };
27366 RowCtrl.prototype.setInitialRowTop = function () {
27367 // print layout uses normal flow layout for row positioning
27368 if (this.printLayout) {
27369 return '';
27370 }
27371 // if sliding in, we take the old row top. otherwise we just set the current row top.
27372 var pixels = this.slideRowIn ? this.roundRowTopToBounds(this.rowNode.oldRowTop) : this.rowNode.rowTop;
27373 var afterPaginationPixels = this.applyPaginationOffset(pixels);
27374 // we don't apply scaling if row is pinned
27375 var afterScalingPixels = this.rowNode.isRowPinned() ? afterPaginationPixels : this.beans.rowContainerHeightService.getRealPixelPosition(afterPaginationPixels);
27376 var res = afterScalingPixels + 'px';
27377 var suppressRowTransform = this.beans.gridOptionsWrapper.isSuppressRowTransform();
27378 if (suppressRowTransform) {
27379 this.initialTop = res;
27380 }
27381 else {
27382 this.initialTransform = "translateY(" + res + ")";
27383 }
27384 };
27385 RowCtrl.prototype.setRowTopStyle = function (topPx) {
27386 var suppressRowTransform = this.beans.gridOptionsWrapper.isSuppressRowTransform();
27387 this.allRowGuis.forEach(function (gui) { return suppressRowTransform ?
27388 gui.rowComp.setTop(topPx) :
27389 gui.rowComp.setTransform("translateY(" + topPx + ")"); });
27390 };
27391 RowCtrl.prototype.getRowNode = function () {
27392 return this.rowNode;
27393 };
27394 RowCtrl.prototype.getCellCtrl = function (column) {
27395 // first up, check for cell directly linked to this column
27396 var res = null;
27397 this.getAllCellCtrls().forEach(function (cellCtrl) {
27398 if (cellCtrl.getColumn() == column) {
27399 res = cellCtrl;
27400 }
27401 });
27402 if (res != null) {
27403 return res;
27404 }
27405 // second up, if not found, then check for spanned cols.
27406 // we do this second (and not at the same time) as this is
27407 // more expensive, as spanning cols is a
27408 // infrequently used feature so we don't need to do this most
27409 // of the time
27410 this.getAllCellCtrls().forEach(function (cellCtrl) {
27411 if (cellCtrl.getColSpanningList().indexOf(column) >= 0) {
27412 res = cellCtrl;
27413 }
27414 });
27415 return res;
27416 };
27417 RowCtrl.prototype.onRowIndexChanged = function () {
27418 // we only bother updating if the rowIndex is present. if it is not present, it means this row
27419 // is child of a group node, and the group node was closed, it's the only way to have no row index.
27420 // when this happens, row is about to be de-rendered, so we don't care, rowComp is about to die!
27421 if (this.rowNode.rowIndex != null) {
27422 this.onCellFocusChanged();
27423 this.updateRowIndexes();
27424 this.postProcessCss();
27425 }
27426 };
27427 RowCtrl.prototype.updateRowIndexes = function () {
27428 var rowIndexStr = this.rowNode.getRowIndexString();
27429 var headerRowCount = this.beans.headerNavigationService.getHeaderRowCount();
27430 var rowIsEven = this.rowNode.rowIndex % 2 === 0;
27431 var ariaRowIndex = headerRowCount + this.rowNode.rowIndex + 1;
27432 this.allRowGuis.forEach(function (c) {
27433 c.rowComp.setRowIndex(rowIndexStr);
27434 c.rowComp.addOrRemoveCssClass('ag-row-even', rowIsEven);
27435 c.rowComp.addOrRemoveCssClass('ag-row-odd', !rowIsEven);
27436 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaRowIndex"])(c.element, ariaRowIndex);
27437 });
27438 };
27439 // returns the pinned left container, either the normal one, or the embedded full with one if exists
27440 RowCtrl.prototype.getPinnedLeftRowElement = function () {
27441 return this.leftGui ? this.leftGui.element : undefined;
27442 };
27443 // returns the pinned right container, either the normal one, or the embedded full with one if exists
27444 RowCtrl.prototype.getPinnedRightRowElement = function () {
27445 return this.rightGui ? this.rightGui.element : undefined;
27446 };
27447 // returns the body container, either the normal one, or the embedded full with one if exists
27448 RowCtrl.prototype.getBodyRowElement = function () {
27449 return this.centerGui ? this.centerGui.element : undefined;
27450 };
27451 // returns the full width container
27452 RowCtrl.prototype.getFullWidthRowElement = function () {
27453 return this.fullWidthGui ? this.fullWidthGui.element : undefined;
27454 };
27455 RowCtrl.DOM_DATA_KEY_ROW_CTRL = 'renderedRow';
27456 return RowCtrl;
27457}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
27458
27459
27460
27461
27462
27463/***/ }),
27464/* 121 */
27465/***/ (function(module, __webpack_exports__, __webpack_require__) {
27466
27467"use strict";
27468__webpack_require__.r(__webpack_exports__);
27469/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellCtrl", function() { return CellCtrl; });
27470/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
27471/* harmony import */ var _cellRangeFeature__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(122);
27472/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
27473/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
27474/* harmony import */ var _cellPositionFeature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(124);
27475/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26);
27476/* harmony import */ var _cellCustomStyleFeature__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(125);
27477/* harmony import */ var _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(126);
27478/* harmony import */ var _cellMouseListenerFeature__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(127);
27479/* harmony import */ var _cellKeyboardListenerFeature__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(129);
27480/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(65);
27481/* harmony import */ var _checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(95);
27482/* harmony import */ var _dndSourceComp__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(130);
27483/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14);
27484/* harmony import */ var _row_rowDragComp__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(96);
27485/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(13);
27486/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(42);
27487/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(44);
27488/**
27489 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
27490 * @version v27.3.0
27491 * @link https://www.ag-grid.com/
27492 * @license MIT
27493 */
27494var __extends = (undefined && undefined.__extends) || (function () {
27495 var extendStatics = function (d, b) {
27496 extendStatics = Object.setPrototypeOf ||
27497 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
27498 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27499 return extendStatics(d, b);
27500 };
27501 return function (d, b) {
27502 extendStatics(d, b);
27503 function __() { this.constructor = d; }
27504 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
27505 };
27506})();
27507var __assign = (undefined && undefined.__assign) || function () {
27508 __assign = Object.assign || function(t) {
27509 for (var s, i = 1, n = arguments.length; i < n; i++) {
27510 s = arguments[i];
27511 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
27512 t[p] = s[p];
27513 }
27514 return t;
27515 };
27516 return __assign.apply(this, arguments);
27517};
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536var CSS_CELL = 'ag-cell';
27537var CSS_AUTO_HEIGHT = 'ag-cell-auto-height';
27538var CSS_NORMAL_HEIGHT = 'ag-cell-normal-height';
27539var CSS_CELL_FOCUS = 'ag-cell-focus';
27540var CSS_CELL_FIRST_RIGHT_PINNED = 'ag-cell-first-right-pinned';
27541var CSS_CELL_LAST_LEFT_PINNED = 'ag-cell-last-left-pinned';
27542var CSS_CELL_NOT_INLINE_EDITING = 'ag-cell-not-inline-editing';
27543var CSS_CELL_INLINE_EDITING = 'ag-cell-inline-editing';
27544var CSS_CELL_POPUP_EDITING = 'ag-cell-popup-editing';
27545var CSS_COLUMN_HOVER = 'ag-column-hover';
27546var CSS_CELL_WRAP_TEXT = 'ag-cell-wrap-text';
27547var instanceIdSequence = 0;
27548var CellCtrl = /** @class */ (function (_super) {
27549 __extends(CellCtrl, _super);
27550 function CellCtrl(column, rowNode, beans, rowCtrl) {
27551 var _this = _super.call(this) || this;
27552 _this.suppressRefreshCell = false;
27553 _this.column = column;
27554 _this.rowNode = rowNode;
27555 _this.beans = beans;
27556 _this.rowCtrl = rowCtrl;
27557 // unique id to this instance, including the column ID to help with debugging in React as it's used in 'key'
27558 _this.instanceId = column.getId() + '-' + instanceIdSequence++;
27559 _this.createCellPosition();
27560 _this.addFeatures();
27561 return _this;
27562 }
27563 CellCtrl.prototype.addFeatures = function () {
27564 var _this = this;
27565 this.cellPositionFeature = new _cellPositionFeature__WEBPACK_IMPORTED_MODULE_4__["CellPositionFeature"](this, this.beans);
27566 this.addDestroyFunc(function () { return _this.cellPositionFeature.destroy(); });
27567 this.cellCustomStyleFeature = new _cellCustomStyleFeature__WEBPACK_IMPORTED_MODULE_6__["CellCustomStyleFeature"](this, this.beans);
27568 this.addDestroyFunc(function () { return _this.cellCustomStyleFeature.destroy(); });
27569 this.cellMouseListenerFeature = new _cellMouseListenerFeature__WEBPACK_IMPORTED_MODULE_8__["CellMouseListenerFeature"](this, this.beans, this.column);
27570 this.addDestroyFunc(function () { return _this.cellMouseListenerFeature.destroy(); });
27571 this.cellKeyboardListenerFeature = new _cellKeyboardListenerFeature__WEBPACK_IMPORTED_MODULE_9__["CellKeyboardListenerFeature"](this, this.beans, this.column, this.rowNode, this.rowCtrl);
27572 this.addDestroyFunc(function () { return _this.cellKeyboardListenerFeature.destroy(); });
27573 var rangeSelectionEnabled = this.beans.rangeService && this.beans.gridOptionsWrapper.isEnableRangeSelection();
27574 if (rangeSelectionEnabled) {
27575 this.cellRangeFeature = new _cellRangeFeature__WEBPACK_IMPORTED_MODULE_1__["CellRangeFeature"](this.beans, this);
27576 this.addDestroyFunc(function () { return _this.cellRangeFeature.destroy(); });
27577 }
27578 this.addTooltipFeature();
27579 };
27580 CellCtrl.prototype.addTooltipFeature = function () {
27581 var _this = this;
27582 var getTooltipValue = function () {
27583 var colDef = _this.column.getColDef();
27584 var data = _this.rowNode.data;
27585 if (colDef.tooltipField && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(data)) {
27586 return Object(_utils_object__WEBPACK_IMPORTED_MODULE_15__["getValueUsingField"])(data, colDef.tooltipField, _this.column.isTooltipFieldContainsDots());
27587 }
27588 var valueGetter = colDef.tooltipValueGetter;
27589 if (valueGetter) {
27590 return valueGetter({
27591 location: 'cell',
27592 api: _this.beans.gridOptionsWrapper.getApi(),
27593 columnApi: _this.beans.gridOptionsWrapper.getColumnApi(),
27594 context: _this.beans.gridOptionsWrapper.getContext(),
27595 colDef: _this.column.getColDef(),
27596 column: _this.column,
27597 rowIndex: _this.cellPosition.rowIndex,
27598 node: _this.rowNode,
27599 data: _this.rowNode.data,
27600 value: _this.value,
27601 valueFormatted: _this.valueFormatted,
27602 });
27603 }
27604 return null;
27605 };
27606 var tooltipCtrl = {
27607 getColumn: function () { return _this.column; },
27608 getColDef: function () { return _this.column.getColDef(); },
27609 getRowIndex: function () { return _this.cellPosition.rowIndex; },
27610 getRowNode: function () { return _this.rowNode; },
27611 getGui: function () { return _this.getGui(); },
27612 getLocation: function () { return 'cell'; },
27613 getTooltipValue: getTooltipValue,
27614 // this makes no sense, why is the cell formatted value passed to the tooltip???
27615 getValueFormatted: function () { return _this.valueFormatted; }
27616 };
27617 this.tooltipFeature = new _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_7__["TooltipFeature"](tooltipCtrl, this.beans);
27618 this.addDestroyFunc(function () { return _this.tooltipFeature.destroy(); });
27619 };
27620 CellCtrl.prototype.setComp = function (comp, eGui, eCellWrapper, printLayout, startEditing) {
27621 this.cellComp = comp;
27622 this.gow = this.beans.gridOptionsWrapper;
27623 this.eGui = eGui;
27624 this.eCellWrapper = eCellWrapper;
27625 this.printLayout = printLayout;
27626 // we force to make sure formatter gets called at least once,
27627 // even if value has not changed (is is undefined)
27628 this.updateAndFormatValue(true);
27629 this.addDomData();
27630 this.onCellFocused();
27631 this.applyStaticCssClasses();
27632 this.setWrapText();
27633 this.onFirstRightPinnedChanged();
27634 this.onLastLeftPinnedChanged();
27635 this.onColumnHover();
27636 this.setupControlComps();
27637 this.setupAutoHeight();
27638 this.setAriaColIndex();
27639 if (!this.gow.isSuppressCellFocus()) {
27640 this.cellComp.setTabIndex(-1);
27641 }
27642 var colIdSanitised = Object(_utils_string__WEBPACK_IMPORTED_MODULE_5__["escapeString"])(this.column.getId());
27643 this.cellComp.setColId(colIdSanitised);
27644 this.cellComp.setRole('gridcell');
27645 this.cellPositionFeature.setComp(eGui);
27646 this.cellCustomStyleFeature.setComp(comp);
27647 this.tooltipFeature.setComp(comp);
27648 this.cellKeyboardListenerFeature.setComp(this.eGui);
27649 if (this.cellRangeFeature) {
27650 this.cellRangeFeature.setComp(comp, eGui);
27651 }
27652 if (startEditing && this.isCellEditable()) {
27653 this.startEditing();
27654 }
27655 else {
27656 this.showValue();
27657 }
27658 };
27659 CellCtrl.prototype.setupAutoHeight = function () {
27660 var _this = this;
27661 if (!this.column.isAutoHeight()) {
27662 return;
27663 }
27664 var eAutoHeightContainer = this.eCellWrapper;
27665 var eParentCell = eAutoHeightContainer.parentElement;
27666 // taking minRowHeight from getRowHeightForNode means the getRowHeight() callback is used,
27667 // thus allowing different min heights for different rows.
27668 var minRowHeight = this.beans.gridOptionsWrapper.getRowHeightForNode(this.rowNode).height;
27669 var measureHeight = function (timesCalled) {
27670 if (_this.editing) {
27671 return;
27672 }
27673 // because of the retry's below, it's possible the retry's go beyond
27674 // the rows life.
27675 if (!_this.isAlive()) {
27676 return;
27677 }
27678 var _a = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_16__["getElementSize"])(eParentCell), paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom;
27679 var wrapperHeight = eAutoHeightContainer.offsetHeight;
27680 var autoHeight = wrapperHeight + paddingTop + paddingBottom;
27681 if (timesCalled < 5) {
27682 // if not in doc yet, means framework not yet inserted, so wait for next VM turn,
27683 // maybe it will be ready next VM turn
27684 var doc = _this.beans.gridOptionsWrapper.getDocument();
27685 var notYetInDom = !doc || !doc.contains(eAutoHeightContainer);
27686 // this happens in React, where React hasn't put any content in. we say 'possibly'
27687 // as a) may not be React and b) the cell could be empty anyway
27688 var possiblyNoContentYet = autoHeight == 0;
27689 if (notYetInDom || possiblyNoContentYet) {
27690 _this.beans.frameworkOverrides.setTimeout(function () { return measureHeight(timesCalled + 1); }, 0);
27691 return;
27692 }
27693 }
27694 var newHeight = Math.max(autoHeight, minRowHeight);
27695 _this.rowNode.setRowAutoHeight(newHeight, _this.column);
27696 };
27697 var listener = function () { return measureHeight(0); };
27698 // do once to set size in case size doesn't change, common when cell is blank
27699 listener();
27700 var destroyResizeObserver = this.beans.resizeObserverService.observeResize(eAutoHeightContainer, listener);
27701 this.addDestroyFunc(function () {
27702 destroyResizeObserver();
27703 _this.rowNode.setRowAutoHeight(undefined, _this.column);
27704 });
27705 };
27706 CellCtrl.prototype.getInstanceId = function () {
27707 return this.instanceId;
27708 };
27709 CellCtrl.prototype.showValue = function (forceNewCellRendererInstance) {
27710 if (forceNewCellRendererInstance === void 0) { forceNewCellRendererInstance = false; }
27711 var valueToDisplay = this.valueFormatted != null ? this.valueFormatted : this.value;
27712 var params = this.createCellRendererParams();
27713 var compDetails = this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(), params);
27714 this.cellComp.setRenderDetails(compDetails, valueToDisplay, forceNewCellRendererInstance);
27715 this.refreshHandle();
27716 };
27717 CellCtrl.prototype.setupControlComps = function () {
27718 var colDef = this.column.getColDef();
27719 this.includeSelection = this.isIncludeControl(colDef.checkboxSelection);
27720 this.includeRowDrag = this.isIncludeControl(colDef.rowDrag);
27721 this.includeDndSource = this.isIncludeControl(colDef.dndSource);
27722 this.cellComp.setIncludeSelection(this.includeSelection);
27723 this.cellComp.setIncludeDndSource(this.includeDndSource);
27724 this.cellComp.setIncludeRowDrag(this.includeRowDrag);
27725 };
27726 CellCtrl.prototype.isForceWrapper = function () {
27727 // text selection requires the value to be wrapped in another element
27728 var forceWrapper = this.beans.gridOptionsWrapper.isEnableCellTextSelection() || this.column.isAutoHeight();
27729 return forceWrapper;
27730 };
27731 CellCtrl.prototype.isIncludeControl = function (value) {
27732 var rowNodePinned = this.rowNode.rowPinned != null;
27733 var isFunc = typeof value === 'function';
27734 var res = rowNodePinned ? false : isFunc || value === true;
27735 return res;
27736 };
27737 CellCtrl.prototype.refreshShouldDestroy = function () {
27738 var colDef = this.column.getColDef();
27739 var selectionChanged = this.includeSelection != this.isIncludeControl(colDef.checkboxSelection);
27740 var rowDragChanged = this.includeRowDrag != this.isIncludeControl(colDef.rowDrag);
27741 var dndSourceChanged = this.includeDndSource != this.isIncludeControl(colDef.dndSource);
27742 return selectionChanged || rowDragChanged || dndSourceChanged;
27743 };
27744 // either called internally if single cell editing, or called by rowRenderer if row editing
27745 CellCtrl.prototype.startEditing = function (key, charPress, cellStartedEdit, event) {
27746 if (key === void 0) { key = null; }
27747 if (charPress === void 0) { charPress = null; }
27748 if (cellStartedEdit === void 0) { cellStartedEdit = false; }
27749 if (event === void 0) { event = null; }
27750 var _a, _b;
27751 if (!this.isCellEditable() || this.editing) {
27752 return;
27753 }
27754 var editorParams = this.createCellEditorParams(key, charPress, cellStartedEdit);
27755 var colDef = this.column.getColDef();
27756 var compDetails = this.beans.userComponentFactory.getCellEditorDetails(colDef, editorParams);
27757 // if cellEditorSelector was used, we give preference to popup and popupPosition from the selector
27758 var popup = ((_a = compDetails) === null || _a === void 0 ? void 0 : _a.popupFromSelector) != null ? compDetails.popupFromSelector : !!colDef.cellEditorPopup;
27759 var position = ((_b = compDetails) === null || _b === void 0 ? void 0 : _b.popupPositionFromSelector) != null ? compDetails.popupPositionFromSelector : colDef.cellEditorPopupPosition;
27760 this.setEditing(true, popup);
27761 this.cellComp.setEditDetails(compDetails, popup, position);
27762 var e = this.createEvent(event, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_EDITING_STARTED);
27763 this.beans.eventService.dispatchEvent(e);
27764 };
27765 CellCtrl.prototype.setEditing = function (editing, inPopup) {
27766 if (inPopup === void 0) { inPopup = false; }
27767 if (this.editing === editing) {
27768 return;
27769 }
27770 this.editing = editing;
27771 this.editingInPopup = inPopup;
27772 this.setInlineEditingClass();
27773 };
27774 // pass in 'true' to cancel the editing.
27775 CellCtrl.prototype.stopRowOrCellEdit = function (cancel) {
27776 if (cancel === void 0) { cancel = false; }
27777 if (this.beans.gridOptionsWrapper.isFullRowEdit()) {
27778 this.rowCtrl.stopRowEditing(cancel);
27779 }
27780 else {
27781 this.stopEditing(cancel);
27782 }
27783 };
27784 CellCtrl.prototype.onPopupEditorClosed = function () {
27785 if (!this.isEditing()) {
27786 return;
27787 }
27788 // note: this happens because of a click outside of the grid or if the popupEditor
27789 // is closed with `Escape` key. if another cell was clicked, then the editing will
27790 // have already stopped and returned on the conditional above.
27791 this.stopEditingAndFocus();
27792 };
27793 CellCtrl.prototype.takeValueFromCellEditor = function (cancel) {
27794 var noValueResult = { newValueExists: false };
27795 if (cancel) {
27796 return noValueResult;
27797 }
27798 var cellEditor = this.cellComp.getCellEditor();
27799 if (!cellEditor) {
27800 return noValueResult;
27801 }
27802 var userWantsToCancel = cellEditor.isCancelAfterEnd && cellEditor.isCancelAfterEnd();
27803 if (userWantsToCancel) {
27804 return noValueResult;
27805 }
27806 var newValue = cellEditor.getValue();
27807 return {
27808 newValue: newValue,
27809 newValueExists: true
27810 };
27811 };
27812 /**
27813 * @returns `True` if the value changes, otherwise `False`.
27814 */
27815 CellCtrl.prototype.saveNewValue = function (oldValue, newValue) {
27816 if (newValue === oldValue) {
27817 return false;
27818 }
27819 if (this.beans.gridOptionsWrapper.isReadOnlyEdit()) {
27820 this.dispatchEventForSaveValueReadOnly(oldValue, newValue);
27821 return false;
27822 }
27823 // we suppressRefreshCell because the call to rowNode.setDataValue() results in change detection
27824 // getting triggered, which results in all cells getting refreshed. we do not want this refresh
27825 // to happen on this call as we want to call it explicitly below. otherwise refresh gets called twice.
27826 // if we only did this refresh (and not the one below) then the cell would flash and not be forced.
27827 this.suppressRefreshCell = true;
27828 var valueChanged = this.rowNode.setDataValue(this.column, newValue);
27829 this.suppressRefreshCell = false;
27830 return valueChanged;
27831 };
27832 CellCtrl.prototype.dispatchEventForSaveValueReadOnly = function (oldValue, newValue) {
27833 var rowNode = this.rowNode;
27834 var event = {
27835 type: _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_EDIT_REQUEST,
27836 event: null,
27837 rowIndex: rowNode.rowIndex,
27838 rowPinned: rowNode.rowPinned,
27839 column: this.column,
27840 api: this.beans.gridApi,
27841 columnApi: this.beans.columnApi,
27842 colDef: this.column.getColDef(),
27843 context: this.beans.gridOptionsWrapper.getContext(),
27844 data: rowNode.data,
27845 node: rowNode,
27846 oldValue: oldValue,
27847 newValue: newValue,
27848 value: newValue,
27849 source: undefined
27850 };
27851 this.beans.eventService.dispatchEvent(event);
27852 };
27853 /**
27854 * Ends the Cell Editing
27855 * @param cancel `True` if the edit process is being canceled.
27856 * @returns `True` if the value of the `GridCell` has been updated, otherwise `False`.
27857 */
27858 CellCtrl.prototype.stopEditing = function (cancel) {
27859 if (cancel === void 0) { cancel = false; }
27860 if (!this.editing) {
27861 return false;
27862 }
27863 var _a = this.takeValueFromCellEditor(cancel), newValue = _a.newValue, newValueExists = _a.newValueExists;
27864 var oldValue = this.getValueFromValueService();
27865 var valueChanged = false;
27866 if (newValueExists) {
27867 valueChanged = this.saveNewValue(oldValue, newValue);
27868 }
27869 this.setEditing(false);
27870 this.cellComp.setEditDetails(); // passing nothing stops editing
27871 this.updateAndFormatValue();
27872 this.refreshCell({ forceRefresh: true, suppressFlash: true });
27873 this.dispatchEditingStoppedEvent(oldValue, newValue);
27874 return valueChanged;
27875 };
27876 CellCtrl.prototype.dispatchEditingStoppedEvent = function (oldValue, newValue) {
27877 var editingStoppedEvent = __assign(__assign({}, this.createEvent(null, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_EDITING_STOPPED)), { oldValue: oldValue,
27878 newValue: newValue });
27879 this.beans.eventService.dispatchEvent(editingStoppedEvent);
27880 };
27881 // if we are editing inline, then we don't have the padding in the cell (set in the themes)
27882 // to allow the text editor full access to the entire cell
27883 CellCtrl.prototype.setInlineEditingClass = function () {
27884 if (!this.isAlive()) {
27885 return;
27886 }
27887 // ag-cell-inline-editing - appears when user is inline editing
27888 // ag-cell-not-inline-editing - appears when user is no inline editing
27889 // ag-cell-popup-editing - appears when user is editing cell in popup (appears on the cell, not on the popup)
27890 // note: one of {ag-cell-inline-editing, ag-cell-not-inline-editing} is always present, they toggle.
27891 // however {ag-cell-popup-editing} shows when popup, so you have both {ag-cell-popup-editing}
27892 // and {ag-cell-not-inline-editing} showing at the same time.
27893 var editingInline = this.editing && !this.editingInPopup;
27894 var popupEditorShowing = this.editing && this.editingInPopup;
27895 this.cellComp.addOrRemoveCssClass(CSS_CELL_INLINE_EDITING, editingInline);
27896 this.cellComp.addOrRemoveCssClass(CSS_CELL_NOT_INLINE_EDITING, !editingInline);
27897 this.cellComp.addOrRemoveCssClass(CSS_CELL_POPUP_EDITING, popupEditorShowing);
27898 this.rowCtrl.setInlineEditingCss(this.editing);
27899 };
27900 // this is needed as the JS CellComp still allows isPopup() on the CellEditor class, so
27901 // it's possible the editor is in a popup even though it's not configured via the colDef as so
27902 CellCtrl.prototype.hackSayEditingInPopup = function () {
27903 if (this.editingInPopup) {
27904 return;
27905 }
27906 this.editingInPopup = true;
27907 this.setInlineEditingClass();
27908 };
27909 CellCtrl.prototype.createCellEditorParams = function (key, charPress, cellStartedEdit) {
27910 var res = {
27911 value: this.getValueFromValueService(),
27912 key: key,
27913 eventKey: key,
27914 charPress: charPress,
27915 column: this.column,
27916 colDef: this.column.getColDef(),
27917 rowIndex: this.getCellPosition().rowIndex,
27918 node: this.rowNode,
27919 data: this.rowNode.data,
27920 api: this.beans.gridOptionsWrapper.getApi(),
27921 cellStartedEdit: cellStartedEdit,
27922 columnApi: this.beans.gridOptionsWrapper.getColumnApi(),
27923 context: this.beans.gridOptionsWrapper.getContext(),
27924 onKeyDown: this.onKeyDown.bind(this),
27925 stopEditing: this.stopEditingAndFocus.bind(this),
27926 eGridCell: this.getGui(),
27927 parseValue: this.parseValue.bind(this),
27928 formatValue: this.formatValue.bind(this)
27929 };
27930 return res;
27931 };
27932 CellCtrl.prototype.createCellRendererParams = function () {
27933 var _this = this;
27934 var addRowCompListener = function (eventType, listener) {
27935 console.warn('AG Grid: since AG Grid v26, params.addRowCompListener() is deprecated. If you need this functionality, please contact AG Grid support and advise why so that we can revert with an appropriate workaround, as we dont have any valid use cases for it. This method was originally provided as a work around to know when cells were destroyed in AG Grid before custom Cell Renderers could be provided.');
27936 _this.rowCtrl.addEventListener(eventType, listener);
27937 };
27938 var res = {
27939 value: this.value,
27940 valueFormatted: this.valueFormatted,
27941 getValue: this.getValueFromValueService.bind(this),
27942 setValue: function (value) { return _this.beans.valueService.setValue(_this.rowNode, _this.column, value); },
27943 formatValue: this.formatValue.bind(this),
27944 data: this.rowNode.data,
27945 node: this.rowNode,
27946 colDef: this.column.getColDef(),
27947 column: this.column,
27948 rowIndex: this.getCellPosition().rowIndex,
27949 api: this.beans.gridOptionsWrapper.getApi(),
27950 columnApi: this.beans.gridOptionsWrapper.getColumnApi(),
27951 context: this.beans.gridOptionsWrapper.getContext(),
27952 refreshCell: this.refreshCell.bind(this),
27953 eGridCell: this.getGui(),
27954 eParentOfValue: this.cellComp.getParentOfValue(),
27955 registerRowDragger: function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) { return _this.registerRowDragger(rowDraggerElement, dragStartPixels, suppressVisibilityChange); },
27956 // this function is not documented anywhere, so we could drop it
27957 // it was in the olden days to allow user to register for when rendered
27958 // row was removed (the row comp was removed), however now that the user
27959 // can provide components for cells, the destroy method gets call when this
27960 // happens so no longer need to fire event.
27961 addRowCompListener: addRowCompListener
27962 };
27963 return res;
27964 };
27965 CellCtrl.prototype.parseValue = function (newValue) {
27966 var colDef = this.column.getColDef();
27967 var params = {
27968 node: this.rowNode,
27969 data: this.rowNode.data,
27970 oldValue: this.getValue(),
27971 newValue: newValue,
27972 colDef: colDef,
27973 column: this.column,
27974 api: this.beans.gridOptionsWrapper.getApi(),
27975 columnApi: this.beans.gridOptionsWrapper.getColumnApi(),
27976 context: this.beans.gridOptionsWrapper.getContext()
27977 };
27978 var valueParser = colDef.valueParser;
27979 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(valueParser) ? this.beans.expressionService.evaluate(valueParser, params) : newValue;
27980 };
27981 CellCtrl.prototype.setFocusOutOnEditor = function () {
27982 if (!this.editing) {
27983 return;
27984 }
27985 var cellEditor = this.cellComp.getCellEditor();
27986 if (cellEditor && cellEditor.focusOut) {
27987 cellEditor.focusOut();
27988 }
27989 };
27990 CellCtrl.prototype.setFocusInOnEditor = function () {
27991 if (!this.editing) {
27992 return;
27993 }
27994 var cellEditor = this.cellComp.getCellEditor();
27995 if (cellEditor && cellEditor.focusIn) {
27996 // if the editor is present, then we just focus it
27997 cellEditor.focusIn();
27998 }
27999 else {
28000 // if the editor is not present, it means async cell editor (eg React fibre)
28001 // and we are trying to set focus before the cell editor is present, so we
28002 // focus the cell instead
28003 this.focusCell(true);
28004 }
28005 };
28006 CellCtrl.prototype.onCellChanged = function (event) {
28007 // because of async in React, the cellComp may not be set yet, if no cellComp then we are
28008 // yet to initialise the cell, so no need to refresh.
28009 if (!this.cellComp) {
28010 return;
28011 }
28012 var eventImpactsThisCell = event.column === this.column;
28013 if (eventImpactsThisCell) {
28014 this.refreshCell({});
28015 }
28016 };
28017 // + stop editing {forceRefresh: true, suppressFlash: true}
28018 // + event cellChanged {}
28019 // + cellRenderer.params.refresh() {} -> method passes 'as is' to the cellRenderer, so params could be anything
28020 // + rowCtrl: event dataChanged {suppressFlash: !update, newData: !update}
28021 // + rowCtrl: api refreshCells() {animate: true/false}
28022 // + rowRenderer: api softRefreshView() {}
28023 CellCtrl.prototype.refreshCell = function (params) {
28024 // if we are in the middle of 'stopEditing', then we don't refresh here, as refresh gets called explicitly
28025 if (this.suppressRefreshCell || this.editing) {
28026 return;
28027 }
28028 // In React, due to async, it's possible a refresh was asked for before the CellComp
28029 // has been set. If this happens, we skip the refresh, as the cell is going to be
28030 // initialised anyway once the CellComp is set.
28031 if (!this.cellComp) {
28032 return;
28033 }
28034 var colDef = this.column.getColDef();
28035 var newData = params != null && !!params.newData;
28036 var suppressFlash = (params != null && !!params.suppressFlash) || !!colDef.suppressCellFlash;
28037 // we always refresh if cell has no value - this can happen when user provides Cell Renderer and the
28038 // cell renderer doesn't rely on a value, instead it could be looking directly at the data, or maybe
28039 // printing the current time (which would be silly)???. Generally speaking
28040 // non of {field, valueGetter, showRowGroup} is bad in the users application, however for this edge case, it's
28041 // best always refresh and take the performance hit rather than never refresh and users complaining in support
28042 // that cells are not updating.
28043 var noValueProvided = colDef.field == null && colDef.valueGetter == null && colDef.showRowGroup == null;
28044 var forceRefresh = (params && params.forceRefresh) || noValueProvided || newData;
28045 var valuesDifferent = this.updateAndFormatValue();
28046 var dataNeedsUpdating = forceRefresh || valuesDifferent;
28047 if (dataNeedsUpdating) {
28048 // if it's 'new data', then we don't refresh the cellRenderer, even if refresh method is available.
28049 // this is because if the whole data is new (ie we are showing stock price 'BBA' now and not 'SSD')
28050 // then we are not showing a movement in the stock price, rather we are showing different stock.
28051 this.showValue(newData);
28052 // we don't want to flash the cells when processing a filter change, as otherwise the UI would
28053 // be to busy. see comment in FilterManager with regards processingFilterChange
28054 var processingFilterChange = this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();
28055 var flashCell = !suppressFlash && !processingFilterChange &&
28056 (this.beans.gridOptionsWrapper.isEnableCellChangeFlash() || colDef.enableCellChangeFlash);
28057 if (flashCell) {
28058 this.flashCell();
28059 }
28060 this.cellCustomStyleFeature.applyUserStyles();
28061 this.cellCustomStyleFeature.applyClassesFromColDef();
28062 }
28063 this.refreshToolTip();
28064 // we do cellClassRules even if the value has not changed, so that users who have rules that
28065 // look at other parts of the row (where the other part of the row might of changed) will work.
28066 this.cellCustomStyleFeature.applyCellClassRules();
28067 };
28068 // cell editors call this, when they want to stop for reasons other
28069 // than what we pick up on. eg selecting from a dropdown ends editing.
28070 CellCtrl.prototype.stopEditingAndFocus = function (suppressNavigateAfterEdit) {
28071 if (suppressNavigateAfterEdit === void 0) { suppressNavigateAfterEdit = false; }
28072 this.stopRowOrCellEdit();
28073 this.focusCell(true);
28074 if (!suppressNavigateAfterEdit) {
28075 this.navigateAfterEdit();
28076 }
28077 };
28078 CellCtrl.prototype.navigateAfterEdit = function () {
28079 var fullRowEdit = this.beans.gridOptionsWrapper.isFullRowEdit();
28080 if (fullRowEdit) {
28081 return;
28082 }
28083 var enterMovesDownAfterEdit = this.beans.gridOptionsWrapper.isEnterMovesDownAfterEdit();
28084 if (enterMovesDownAfterEdit) {
28085 this.beans.navigationService.navigateToNextCell(null, _constants_keyCode__WEBPACK_IMPORTED_MODULE_10__["KeyCode"].DOWN, this.getCellPosition(), false);
28086 }
28087 };
28088 // user can also call this via API
28089 CellCtrl.prototype.flashCell = function (delays) {
28090 var flashDelay = delays && delays.flashDelay;
28091 var fadeDelay = delays && delays.fadeDelay;
28092 this.animateCell('data-changed', flashDelay, fadeDelay);
28093 };
28094 CellCtrl.prototype.animateCell = function (cssName, flashDelay, fadeDelay) {
28095 var _this = this;
28096 var fullName = "ag-cell-" + cssName;
28097 var animationFullName = "ag-cell-" + cssName + "-animation";
28098 var gridOptionsWrapper = this.beans.gridOptionsWrapper;
28099 if (!flashDelay) {
28100 flashDelay = gridOptionsWrapper.getCellFlashDelay();
28101 }
28102 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(fadeDelay)) {
28103 fadeDelay = gridOptionsWrapper.getCellFadeDelay();
28104 }
28105 // we want to highlight the cells, without any animation
28106 this.cellComp.addOrRemoveCssClass(fullName, true);
28107 this.cellComp.addOrRemoveCssClass(animationFullName, false);
28108 // then once that is applied, we remove the highlight with animation
28109 window.setTimeout(function () {
28110 _this.cellComp.addOrRemoveCssClass(fullName, false);
28111 _this.cellComp.addOrRemoveCssClass(animationFullName, true);
28112 _this.eGui.style.transition = "background-color " + fadeDelay + "ms";
28113 window.setTimeout(function () {
28114 // and then to leave things as we got them, we remove the animation
28115 _this.cellComp.addOrRemoveCssClass(animationFullName, false);
28116 _this.eGui.style.transition = '';
28117 }, fadeDelay);
28118 }, flashDelay);
28119 };
28120 CellCtrl.prototype.onFlashCells = function (event) {
28121 if (!this.cellComp) {
28122 return;
28123 }
28124 var cellId = this.beans.cellPositionUtils.createId(this.getCellPosition());
28125 var shouldFlash = event.cells[cellId];
28126 if (shouldFlash) {
28127 this.animateCell('highlight');
28128 }
28129 };
28130 CellCtrl.prototype.isCellEditable = function () {
28131 return this.column.isCellEditable(this.rowNode);
28132 };
28133 CellCtrl.prototype.isSuppressFillHandle = function () {
28134 return this.column.isSuppressFillHandle();
28135 };
28136 CellCtrl.prototype.formatValue = function (value) {
28137 var res = this.callValueFormatter(value);
28138 return res != null ? res : value;
28139 };
28140 CellCtrl.prototype.callValueFormatter = function (value) {
28141 return this.beans.valueFormatterService.formatValue(this.column, this.rowNode, value);
28142 };
28143 CellCtrl.prototype.updateAndFormatValue = function (force) {
28144 if (force === void 0) { force = false; }
28145 var oldValue = this.value;
28146 var oldValueFormatted = this.valueFormatted;
28147 this.value = this.getValueFromValueService();
28148 this.valueFormatted = this.callValueFormatter(this.value);
28149 var valuesDifferent = force ? true :
28150 !this.valuesAreEqual(oldValue, this.value) || this.valueFormatted != oldValueFormatted;
28151 return valuesDifferent;
28152 };
28153 CellCtrl.prototype.valuesAreEqual = function (val1, val2) {
28154 // if the user provided an equals method, use that, otherwise do simple comparison
28155 var colDef = this.column.getColDef();
28156 return colDef.equals ? colDef.equals(val1, val2) : val1 === val2;
28157 };
28158 CellCtrl.prototype.getComp = function () {
28159 return this.cellComp;
28160 };
28161 CellCtrl.prototype.getValueFromValueService = function () {
28162 // if we don't check this, then the grid will render leaf groups as open even if we are not
28163 // allowing the user to open leaf groups. confused? remember for pivot mode we don't allow
28164 // opening leaf groups, so we have to force leafGroups to be closed in case the user expanded
28165 // them via the API, or user user expanded them in the UI before turning on pivot mode
28166 var lockedClosedGroup = this.rowNode.leafGroup && this.beans.columnModel.isPivotMode();
28167 var isOpenGroup = this.rowNode.group && this.rowNode.expanded && !this.rowNode.footer && !lockedClosedGroup;
28168 // are we showing group footers
28169 var groupFootersEnabled = this.beans.gridOptionsWrapper.isGroupIncludeFooter();
28170 // if doing footers, we normally don't show agg data at group level when group is open
28171 var groupAlwaysShowAggData = this.beans.gridOptionsWrapper.isGroupSuppressBlankHeader();
28172 // if doing grouping and footers, we don't want to include the agg value
28173 // in the header when the group is open
28174 var ignoreAggData = (isOpenGroup && groupFootersEnabled) && !groupAlwaysShowAggData;
28175 var value = this.beans.valueService.getValue(this.column, this.rowNode, false, ignoreAggData);
28176 return value;
28177 };
28178 CellCtrl.prototype.getValue = function () {
28179 return this.value;
28180 };
28181 CellCtrl.prototype.getValueFormatted = function () {
28182 return this.valueFormatted;
28183 };
28184 CellCtrl.prototype.addDomData = function () {
28185 var _this = this;
28186 var element = this.getGui();
28187 this.beans.gridOptionsWrapper.setDomData(element, CellCtrl.DOM_DATA_KEY_CELL_CTRL, this);
28188 this.addDestroyFunc(function () { return _this.beans.gridOptionsWrapper.setDomData(element, CellCtrl.DOM_DATA_KEY_CELL_CTRL, null); });
28189 };
28190 CellCtrl.prototype.createEvent = function (domEvent, eventType) {
28191 var event = {
28192 type: eventType,
28193 node: this.rowNode,
28194 data: this.rowNode.data,
28195 value: this.value,
28196 column: this.column,
28197 colDef: this.column.getColDef(),
28198 context: this.beans.gridOptionsWrapper.getContext(),
28199 api: this.beans.gridApi,
28200 columnApi: this.beans.columnApi,
28201 rowPinned: this.rowNode.rowPinned,
28202 event: domEvent,
28203 rowIndex: this.rowNode.rowIndex
28204 };
28205 return event;
28206 };
28207 CellCtrl.prototype.onKeyPress = function (event) {
28208 this.cellKeyboardListenerFeature.onKeyPress(event);
28209 };
28210 CellCtrl.prototype.onKeyDown = function (event) {
28211 this.cellKeyboardListenerFeature.onKeyDown(event);
28212 };
28213 CellCtrl.prototype.onMouseEvent = function (eventName, mouseEvent) {
28214 this.cellMouseListenerFeature.onMouseEvent(eventName, mouseEvent);
28215 };
28216 CellCtrl.prototype.getGui = function () {
28217 return this.eGui;
28218 };
28219 CellCtrl.prototype.refreshToolTip = function () {
28220 this.tooltipFeature.refreshToolTip();
28221 };
28222 CellCtrl.prototype.getColSpanningList = function () {
28223 return this.cellPositionFeature.getColSpanningList();
28224 };
28225 CellCtrl.prototype.onLeftChanged = function () {
28226 if (!this.cellComp) {
28227 return;
28228 }
28229 this.cellPositionFeature.onLeftChanged();
28230 };
28231 CellCtrl.prototype.onDisplayedColumnsChanged = function () {
28232 if (!this.eGui) {
28233 return;
28234 }
28235 this.setAriaColIndex();
28236 };
28237 CellCtrl.prototype.setAriaColIndex = function () {
28238 var colIdx = this.beans.columnModel.getAriaColumnIndex(this.column);
28239 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_17__["setAriaColIndex"])(this.getGui(), colIdx); // for react, we don't use JSX, as it slowed down column moving
28240 };
28241 CellCtrl.prototype.isSuppressNavigable = function () {
28242 return this.column.isSuppressNavigable(this.rowNode);
28243 };
28244 CellCtrl.prototype.onWidthChanged = function () {
28245 return this.cellPositionFeature.onWidthChanged();
28246 };
28247 CellCtrl.prototype.getColumn = function () {
28248 return this.column;
28249 };
28250 CellCtrl.prototype.getRowNode = function () {
28251 return this.rowNode;
28252 };
28253 CellCtrl.prototype.getBeans = function () {
28254 return this.beans;
28255 };
28256 CellCtrl.prototype.isPrintLayout = function () {
28257 return this.printLayout;
28258 };
28259 CellCtrl.prototype.appendChild = function (htmlElement) {
28260 this.eGui.appendChild(htmlElement);
28261 };
28262 CellCtrl.prototype.refreshHandle = function () {
28263 if (this.editing) {
28264 return;
28265 }
28266 if (this.cellRangeFeature) {
28267 this.cellRangeFeature.refreshHandle();
28268 }
28269 };
28270 CellCtrl.prototype.getCellPosition = function () {
28271 return this.cellPosition;
28272 };
28273 CellCtrl.prototype.isEditing = function () {
28274 return this.editing;
28275 };
28276 // called by rowRenderer when user navigates via tab key
28277 CellCtrl.prototype.startRowOrCellEdit = function (key, charPress, event) {
28278 if (event === void 0) { event = null; }
28279 if (this.beans.gridOptionsWrapper.isFullRowEdit()) {
28280 this.rowCtrl.startRowEditing(key, charPress, this);
28281 }
28282 else {
28283 this.startEditing(key, charPress, true, event);
28284 }
28285 };
28286 CellCtrl.prototype.getRowCtrl = function () {
28287 return this.rowCtrl;
28288 };
28289 CellCtrl.prototype.getRowPosition = function () {
28290 return {
28291 rowIndex: this.cellPosition.rowIndex,
28292 rowPinned: this.cellPosition.rowPinned
28293 };
28294 };
28295 CellCtrl.prototype.updateRangeBordersIfRangeCount = function () {
28296 if (!this.cellComp) {
28297 return;
28298 }
28299 if (this.cellRangeFeature) {
28300 this.cellRangeFeature.updateRangeBordersIfRangeCount();
28301 }
28302 };
28303 CellCtrl.prototype.onRangeSelectionChanged = function () {
28304 if (!this.cellComp) {
28305 return;
28306 }
28307 if (this.cellRangeFeature) {
28308 this.cellRangeFeature.onRangeSelectionChanged();
28309 }
28310 };
28311 CellCtrl.prototype.isRangeSelectionEnabled = function () {
28312 return this.cellRangeFeature != null;
28313 };
28314 CellCtrl.prototype.focusCell = function (forceBrowserFocus) {
28315 if (forceBrowserFocus === void 0) { forceBrowserFocus = false; }
28316 this.beans.focusService.setFocusedCell(this.getCellPosition().rowIndex, this.column, this.rowNode.rowPinned, forceBrowserFocus);
28317 };
28318 CellCtrl.prototype.onRowIndexChanged = function () {
28319 // when index changes, this influences items that need the index, so we update the
28320 // grid cell so they are working off the new index.
28321 this.createCellPosition();
28322 // when the index of the row changes, ie means the cell may have lost or gained focus
28323 this.onCellFocused();
28324 // check range selection
28325 if (this.cellRangeFeature) {
28326 this.cellRangeFeature.onRangeSelectionChanged();
28327 }
28328 };
28329 CellCtrl.prototype.onFirstRightPinnedChanged = function () {
28330 if (!this.cellComp) {
28331 return;
28332 }
28333 var firstRightPinned = this.column.isFirstRightPinned();
28334 this.cellComp.addOrRemoveCssClass(CSS_CELL_FIRST_RIGHT_PINNED, firstRightPinned);
28335 };
28336 CellCtrl.prototype.onLastLeftPinnedChanged = function () {
28337 if (!this.cellComp) {
28338 return;
28339 }
28340 var lastLeftPinned = this.column.isLastLeftPinned();
28341 this.cellComp.addOrRemoveCssClass(CSS_CELL_LAST_LEFT_PINNED, lastLeftPinned);
28342 };
28343 CellCtrl.prototype.onCellFocused = function (event) {
28344 if (!this.cellComp || this.gow.isSuppressCellFocus()) {
28345 return;
28346 }
28347 var cellFocused = this.beans.focusService.isCellFocused(this.cellPosition);
28348 this.cellComp.addOrRemoveCssClass(CSS_CELL_FOCUS, cellFocused);
28349 // see if we need to force browser focus - this can happen if focus is programmatically set
28350 if (cellFocused && event && event.forceBrowserFocus) {
28351 var focusEl = this.cellComp.getFocusableElement();
28352 focusEl.focus();
28353 }
28354 // if another cell was focused, and we are editing, then stop editing
28355 var fullRowEdit = this.beans.gridOptionsWrapper.isFullRowEdit();
28356 if (!cellFocused && !fullRowEdit && this.editing) {
28357 this.stopRowOrCellEdit();
28358 }
28359 };
28360 CellCtrl.prototype.createCellPosition = function () {
28361 this.cellPosition = {
28362 rowIndex: this.rowNode.rowIndex,
28363 rowPinned: Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["makeNull"])(this.rowNode.rowPinned),
28364 column: this.column
28365 };
28366 };
28367 // CSS Classes that only get applied once, they never change
28368 CellCtrl.prototype.applyStaticCssClasses = function () {
28369 this.cellComp.addOrRemoveCssClass(CSS_CELL, true);
28370 this.cellComp.addOrRemoveCssClass(CSS_CELL_NOT_INLINE_EDITING, true);
28371 // normal cells fill the height of the row. autoHeight cells have no height to let them
28372 // fit the height of content.
28373 var autoHeight = this.column.isAutoHeight() == true;
28374 this.cellComp.addOrRemoveCssClass(CSS_AUTO_HEIGHT, autoHeight);
28375 this.cellComp.addOrRemoveCssClass(CSS_NORMAL_HEIGHT, !autoHeight);
28376 };
28377 CellCtrl.prototype.onColumnHover = function () {
28378 if (!this.cellComp) {
28379 return;
28380 }
28381 if (!this.beans.gridOptionsWrapper.isColumnHoverHighlight()) {
28382 return;
28383 }
28384 var isHovered = this.beans.columnHoverService.isHovered(this.column);
28385 this.cellComp.addOrRemoveCssClass(CSS_COLUMN_HOVER, isHovered);
28386 };
28387 CellCtrl.prototype.onNewColumnsLoaded = function () {
28388 if (!this.cellComp) {
28389 return;
28390 }
28391 this.setWrapText();
28392 if (!this.editing) {
28393 this.refreshCell({ forceRefresh: true, suppressFlash: true });
28394 }
28395 };
28396 CellCtrl.prototype.setWrapText = function () {
28397 var value = this.column.getColDef().wrapText == true;
28398 this.cellComp.addOrRemoveCssClass(CSS_CELL_WRAP_TEXT, value);
28399 };
28400 CellCtrl.prototype.dispatchCellContextMenuEvent = function (event) {
28401 var colDef = this.column.getColDef();
28402 var cellContextMenuEvent = this.createEvent(event, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_CONTEXT_MENU);
28403 this.beans.eventService.dispatchEvent(cellContextMenuEvent);
28404 if (colDef.onCellContextMenu) {
28405 // to make the callback async, do in a timeout
28406 window.setTimeout(function () { return colDef.onCellContextMenu(cellContextMenuEvent); }, 0);
28407 }
28408 };
28409 CellCtrl.prototype.getCellRenderer = function () {
28410 return this.cellComp ? this.cellComp.getCellRenderer() : null;
28411 };
28412 CellCtrl.prototype.getCellEditor = function () {
28413 return this.cellComp ? this.cellComp.getCellEditor() : null;
28414 };
28415 CellCtrl.prototype.destroy = function () {
28416 _super.prototype.destroy.call(this);
28417 };
28418 CellCtrl.prototype.createSelectionCheckbox = function () {
28419 var cbSelectionComponent = new _checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_11__["CheckboxSelectionComponent"]();
28420 this.beans.context.createBean(cbSelectionComponent);
28421 cbSelectionComponent.init({ rowNode: this.rowNode, column: this.column });
28422 // put the checkbox in before the value
28423 return cbSelectionComponent;
28424 };
28425 CellCtrl.prototype.createDndSource = function () {
28426 var dndSourceComp = new _dndSourceComp__WEBPACK_IMPORTED_MODULE_12__["DndSourceComp"](this.rowNode, this.column, this.beans, this.eGui);
28427 this.beans.context.createBean(dndSourceComp);
28428 return dndSourceComp;
28429 };
28430 CellCtrl.prototype.registerRowDragger = function (customElement, dragStartPixels, suppressVisibilityChange) {
28431 var _this = this;
28432 // if previously existed, then we are only updating
28433 if (this.customRowDragComp) {
28434 this.customRowDragComp.setDragElement(customElement, dragStartPixels);
28435 return;
28436 }
28437 var newComp = this.createRowDragComp(customElement, dragStartPixels, suppressVisibilityChange);
28438 if (newComp) {
28439 this.customRowDragComp = newComp;
28440 this.addDestroyFunc(function () { return _this.beans.context.destroyBean(newComp); });
28441 }
28442 };
28443 CellCtrl.prototype.createRowDragComp = function (customElement, dragStartPixels, suppressVisibilityChange) {
28444 var _this = this;
28445 var pagination = this.beans.gridOptionsWrapper.isPagination();
28446 var rowDragManaged = this.beans.gridOptionsWrapper.isRowDragManaged();
28447 var clientSideRowModelActive = this.beans.gridOptionsWrapper.isRowModelDefault();
28448 if (rowDragManaged) {
28449 // row dragging only available in default row model
28450 if (!clientSideRowModelActive) {
28451 Object(_utils_function__WEBPACK_IMPORTED_MODULE_13__["doOnce"])(function () { return console.warn('AG Grid: managed row dragging is only allowed in the Client Side Row Model'); }, 'CellComp.addRowDragging');
28452 return;
28453 }
28454 if (pagination) {
28455 Object(_utils_function__WEBPACK_IMPORTED_MODULE_13__["doOnce"])(function () { return console.warn('AG Grid: managed row dragging is not possible when doing pagination'); }, 'CellComp.addRowDragging');
28456 return;
28457 }
28458 }
28459 // otherwise (normal case) we are creating a RowDraggingComp for the first time
28460 var rowDragComp = new _row_rowDragComp__WEBPACK_IMPORTED_MODULE_14__["RowDragComp"](function () { return _this.value; }, this.rowNode, this.column, customElement, dragStartPixels, suppressVisibilityChange);
28461 this.beans.context.createBean(rowDragComp);
28462 return rowDragComp;
28463 };
28464 CellCtrl.DOM_DATA_KEY_CELL_CTRL = 'cellCtrl';
28465 return CellCtrl;
28466}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
28467
28468
28469
28470
28471
28472/***/ }),
28473/* 122 */
28474/***/ (function(module, __webpack_exports__, __webpack_require__) {
28475
28476"use strict";
28477__webpack_require__.r(__webpack_exports__);
28478/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellRangeFeature", function() { return CellRangeFeature; });
28479/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
28480/* harmony import */ var _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(123);
28481/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
28482/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44);
28483/**
28484 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
28485 * @version v27.3.0
28486 * @link https://www.ag-grid.com/
28487 * @license MIT
28488 */
28489
28490
28491
28492
28493var CSS_CELL_RANGE_SELECTED = 'ag-cell-range-selected';
28494var CSS_CELL_RANGE_CHART = 'ag-cell-range-chart';
28495var CSS_CELL_RANGE_SINGLE_CELL = 'ag-cell-range-single-cell';
28496var CSS_CELL_RANGE_CHART_CATEGORY = 'ag-cell-range-chart-category';
28497var CSS_CELL_RANGE_HANDLE = 'ag-cell-range-handle';
28498var CSS_CELL_RANGE_TOP = 'ag-cell-range-top';
28499var CSS_CELL_RANGE_RIGHT = 'ag-cell-range-right';
28500var CSS_CELL_RANGE_BOTTOM = 'ag-cell-range-bottom';
28501var CSS_CELL_RANGE_LEFT = 'ag-cell-range-left';
28502var CellRangeFeature = /** @class */ (function () {
28503 function CellRangeFeature(beans, ctrl) {
28504 this.beans = beans;
28505 this.cellCtrl = ctrl;
28506 }
28507 CellRangeFeature.prototype.setComp = function (cellComp, eGui) {
28508 this.cellComp = cellComp;
28509 this.eGui = eGui;
28510 this.onRangeSelectionChanged();
28511 };
28512 CellRangeFeature.prototype.onRangeSelectionChanged = function () {
28513 // when using reactUi, given UI is async, it's possible this method is called before the comp is registered
28514 if (!this.cellComp) {
28515 return;
28516 }
28517 this.rangeCount = this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition());
28518 this.hasChartRange = this.getHasChartRange();
28519 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED, this.rangeCount !== 0);
28520 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + "-1", this.rangeCount === 1);
28521 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + "-2", this.rangeCount === 2);
28522 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + "-3", this.rangeCount === 3);
28523 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + "-4", this.rangeCount >= 4);
28524 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_CHART, this.hasChartRange);
28525 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaSelected"])(this.eGui, this.rangeCount > 0 ? true : undefined);
28526 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SINGLE_CELL, this.isSingleCell());
28527 this.updateRangeBorders();
28528 this.refreshHandle();
28529 };
28530 CellRangeFeature.prototype.updateRangeBorders = function () {
28531 var rangeBorders = this.getRangeBorders();
28532 var isSingleCell = this.isSingleCell();
28533 var isTop = !isSingleCell && rangeBorders.top;
28534 var isRight = !isSingleCell && rangeBorders.right;
28535 var isBottom = !isSingleCell && rangeBorders.bottom;
28536 var isLeft = !isSingleCell && rangeBorders.left;
28537 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_TOP, isTop);
28538 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_RIGHT, isRight);
28539 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_BOTTOM, isBottom);
28540 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_LEFT, isLeft);
28541 };
28542 CellRangeFeature.prototype.isSingleCell = function () {
28543 var rangeService = this.beans.rangeService;
28544 return this.rangeCount === 1 && rangeService && !rangeService.isMoreThanOneCell();
28545 };
28546 CellRangeFeature.prototype.getHasChartRange = function () {
28547 var rangeService = this.beans.rangeService;
28548 if (!this.rangeCount || !rangeService) {
28549 return false;
28550 }
28551 var cellRanges = rangeService.getCellRanges();
28552 return cellRanges.length > 0 && cellRanges.every(function (range) { return Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["includes"])([_interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__["CellRangeType"].DIMENSION, _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__["CellRangeType"].VALUE], range.type); });
28553 };
28554 CellRangeFeature.prototype.updateRangeBordersIfRangeCount = function () {
28555 // we only need to update range borders if we are in a range
28556 if (this.rangeCount > 0) {
28557 this.updateRangeBorders();
28558 this.refreshHandle();
28559 }
28560 };
28561 CellRangeFeature.prototype.getRangeBorders = function () {
28562 var _this = this;
28563 var isRtl = this.beans.gridOptionsWrapper.isEnableRtl();
28564 var top = false;
28565 var right = false;
28566 var bottom = false;
28567 var left = false;
28568 var thisCol = this.cellCtrl.getCellPosition().column;
28569 var _a = this.beans, rangeService = _a.rangeService, columnModel = _a.columnModel;
28570 var leftCol;
28571 var rightCol;
28572 if (isRtl) {
28573 leftCol = columnModel.getDisplayedColAfter(thisCol);
28574 rightCol = columnModel.getDisplayedColBefore(thisCol);
28575 }
28576 else {
28577 leftCol = columnModel.getDisplayedColBefore(thisCol);
28578 rightCol = columnModel.getDisplayedColAfter(thisCol);
28579 }
28580 var ranges = rangeService.getCellRanges().filter(function (range) { return rangeService.isCellInSpecificRange(_this.cellCtrl.getCellPosition(), range); });
28581 // this means we are the first column in the grid
28582 if (!leftCol) {
28583 left = true;
28584 }
28585 // this means we are the last column in the grid
28586 if (!rightCol) {
28587 right = true;
28588 }
28589 for (var i = 0; i < ranges.length; i++) {
28590 if (top && right && bottom && left) {
28591 break;
28592 }
28593 var range = ranges[i];
28594 var startRow = rangeService.getRangeStartRow(range);
28595 var endRow = rangeService.getRangeEndRow(range);
28596 if (!top && this.beans.rowPositionUtils.sameRow(startRow, this.cellCtrl.getCellPosition())) {
28597 top = true;
28598 }
28599 if (!bottom && this.beans.rowPositionUtils.sameRow(endRow, this.cellCtrl.getCellPosition())) {
28600 bottom = true;
28601 }
28602 if (!left && leftCol && range.columns.indexOf(leftCol) < 0) {
28603 left = true;
28604 }
28605 if (!right && rightCol && range.columns.indexOf(rightCol) < 0) {
28606 right = true;
28607 }
28608 }
28609 return { top: top, right: right, bottom: bottom, left: left };
28610 };
28611 CellRangeFeature.prototype.refreshHandle = function () {
28612 if (!this.beans.rangeService) {
28613 return;
28614 }
28615 var shouldHaveSelectionHandle = this.shouldHaveSelectionHandle();
28616 if (this.selectionHandle && !shouldHaveSelectionHandle) {
28617 this.selectionHandle = this.beans.context.destroyBean(this.selectionHandle);
28618 }
28619 if (shouldHaveSelectionHandle) {
28620 this.addSelectionHandle();
28621 }
28622 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_HANDLE, !!this.selectionHandle);
28623 };
28624 CellRangeFeature.prototype.shouldHaveSelectionHandle = function () {
28625 var _a = this.beans, gridOptionsWrapper = _a.gridOptionsWrapper, rangeService = _a.rangeService;
28626 var cellRanges = rangeService.getCellRanges();
28627 var rangesLen = cellRanges.length;
28628 if (this.rangeCount < 1 || rangesLen < 1) {
28629 return false;
28630 }
28631 var cellRange = Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["last"])(cellRanges);
28632 var cellPosition = this.cellCtrl.getCellPosition();
28633 var isFillHandleAvailable = gridOptionsWrapper.isEnableFillHandle() && !this.cellCtrl.isSuppressFillHandle();
28634 var isRangeHandleAvailable = gridOptionsWrapper.isEnableRangeHandle();
28635 var handleIsAvailable = rangesLen === 1 && !this.cellCtrl.isEditing() && (isFillHandleAvailable || isRangeHandleAvailable);
28636 if (this.hasChartRange) {
28637 var hasCategoryRange = cellRanges[0].type === _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__["CellRangeType"].DIMENSION;
28638 var isCategoryCell = hasCategoryRange && rangeService.isCellInSpecificRange(cellPosition, cellRanges[0]);
28639 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_CHART_CATEGORY, isCategoryCell);
28640 handleIsAvailable = cellRange.type === _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__["CellRangeType"].VALUE;
28641 }
28642 return handleIsAvailable &&
28643 cellRange.endRow != null &&
28644 rangeService.isContiguousRange(cellRange) &&
28645 rangeService.isBottomRightCell(cellRange, cellPosition);
28646 };
28647 CellRangeFeature.prototype.addSelectionHandle = function () {
28648 var _a = this.beans, gridOptionsWrapper = _a.gridOptionsWrapper, rangeService = _a.rangeService;
28649 var cellRangeType = Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["last"])(rangeService.getCellRanges()).type;
28650 var selectionHandleFill = gridOptionsWrapper.isEnableFillHandle() && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["missing"])(cellRangeType);
28651 var type = selectionHandleFill ? _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__["SelectionHandleType"].FILL : _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__["SelectionHandleType"].RANGE;
28652 if (this.selectionHandle && this.selectionHandle.getType() !== type) {
28653 this.selectionHandle = this.beans.context.destroyBean(this.selectionHandle);
28654 }
28655 if (!this.selectionHandle) {
28656 this.selectionHandle = this.beans.selectionHandleFactory.createSelectionHandle(type);
28657 }
28658 this.selectionHandle.refresh(this.cellCtrl);
28659 };
28660 CellRangeFeature.prototype.destroy = function () {
28661 this.beans.context.destroyBean(this.selectionHandle);
28662 };
28663 return CellRangeFeature;
28664}());
28665
28666
28667
28668
28669
28670/***/ }),
28671/* 123 */
28672/***/ (function(module, __webpack_exports__, __webpack_require__) {
28673
28674"use strict";
28675__webpack_require__.r(__webpack_exports__);
28676/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionHandleType", function() { return SelectionHandleType; });
28677/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellRangeType", function() { return CellRangeType; });
28678/**
28679 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
28680 * @version v27.3.0
28681 * @link https://www.ag-grid.com/
28682 * @license MIT
28683 */
28684var SelectionHandleType;
28685(function (SelectionHandleType) {
28686 SelectionHandleType[SelectionHandleType["FILL"] = 0] = "FILL";
28687 SelectionHandleType[SelectionHandleType["RANGE"] = 1] = "RANGE";
28688})(SelectionHandleType || (SelectionHandleType = {}));
28689var CellRangeType;
28690(function (CellRangeType) {
28691 CellRangeType[CellRangeType["VALUE"] = 0] = "VALUE";
28692 CellRangeType[CellRangeType["DIMENSION"] = 1] = "DIMENSION";
28693})(CellRangeType || (CellRangeType = {}));
28694
28695
28696
28697
28698/***/ }),
28699/* 124 */
28700/***/ (function(module, __webpack_exports__, __webpack_require__) {
28701
28702"use strict";
28703__webpack_require__.r(__webpack_exports__);
28704/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellPositionFeature", function() { return CellPositionFeature; });
28705/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
28706/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24);
28707/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
28708/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
28709/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20);
28710/**
28711 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
28712 * @version v27.3.0
28713 * @link https://www.ag-grid.com/
28714 * @license MIT
28715 */
28716var __extends = (undefined && undefined.__extends) || (function () {
28717 var extendStatics = function (d, b) {
28718 extendStatics = Object.setPrototypeOf ||
28719 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
28720 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
28721 return extendStatics(d, b);
28722 };
28723 return function (d, b) {
28724 extendStatics(d, b);
28725 function __() { this.constructor = d; }
28726 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28727 };
28728})();
28729
28730
28731
28732
28733
28734/**
28735 * Takes care of:
28736 * #) Cell Width (including when doing cell spanning, which makes width cover many columns)
28737 * #) Cell Height (when doing row span, otherwise we don't touch the height as it's just row height)
28738 * #) Cell Left (the horizontal positioning of the cell, the vertical positioning is on the row)
28739 */
28740var CellPositionFeature = /** @class */ (function (_super) {
28741 __extends(CellPositionFeature, _super);
28742 function CellPositionFeature(ctrl, beans) {
28743 var _this = _super.call(this) || this;
28744 _this.cellCtrl = ctrl;
28745 _this.beans = beans;
28746 _this.column = ctrl.getColumn();
28747 _this.rowNode = ctrl.getRowNode();
28748 _this.setupColSpan();
28749 _this.setupRowSpan();
28750 return _this;
28751 }
28752 CellPositionFeature.prototype.setupRowSpan = function () {
28753 this.rowSpan = this.column.getRowSpan(this.rowNode);
28754 };
28755 CellPositionFeature.prototype.setComp = function (eGui) {
28756 this.eGui = eGui;
28757 this.onLeftChanged();
28758 this.onWidthChanged();
28759 this.applyRowSpan();
28760 };
28761 CellPositionFeature.prototype.onDisplayColumnsChanged = function () {
28762 var colsSpanning = this.getColSpanningList();
28763 if (!Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["areEqual"])(this.colsSpanning, colsSpanning)) {
28764 this.colsSpanning = colsSpanning;
28765 this.onWidthChanged();
28766 this.onLeftChanged(); // left changes when doing RTL
28767 }
28768 };
28769 CellPositionFeature.prototype.setupColSpan = function () {
28770 // if no col span is active, then we don't set it up, as it would be wasteful of CPU
28771 if (this.column.getColDef().colSpan == null) {
28772 return;
28773 }
28774 this.colsSpanning = this.getColSpanningList();
28775 // because we are col spanning, a reorder of the cols can change what cols we are spanning over
28776 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayColumnsChanged.bind(this));
28777 // because we are spanning over multiple cols, we check for width any time any cols width changes.
28778 // this is expensive - really we should be explicitly checking only the cols we are spanning over
28779 // instead of every col, however it would be tricky code to track the cols we are spanning over, so
28780 // because hardly anyone will be using colSpan, am favouring this easier way for more maintainable code.
28781 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onWidthChanged.bind(this));
28782 };
28783 CellPositionFeature.prototype.onWidthChanged = function () {
28784 if (!this.eGui) {
28785 return;
28786 }
28787 var width = this.getCellWidth();
28788 this.eGui.style.width = width + "px";
28789 };
28790 CellPositionFeature.prototype.getCellWidth = function () {
28791 if (!this.colsSpanning) {
28792 return this.column.getActualWidth();
28793 }
28794 return this.colsSpanning.reduce(function (width, col) { return width + col.getActualWidth(); }, 0);
28795 };
28796 CellPositionFeature.prototype.getColSpanningList = function () {
28797 var colSpan = this.column.getColSpan(this.rowNode);
28798 var colsSpanning = [];
28799 // if just one col, the col span is just the column we are in
28800 if (colSpan === 1) {
28801 colsSpanning.push(this.column);
28802 }
28803 else {
28804 var pointer = this.column;
28805 var pinned = this.column.getPinned();
28806 for (var i = 0; pointer && i < colSpan; i++) {
28807 colsSpanning.push(pointer);
28808 pointer = this.beans.columnModel.getDisplayedColAfter(pointer);
28809 if (!pointer || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["missing"])(pointer)) {
28810 break;
28811 }
28812 // we do not allow col spanning to span outside of pinned areas
28813 if (pinned !== pointer.getPinned()) {
28814 break;
28815 }
28816 }
28817 }
28818 return colsSpanning;
28819 };
28820 CellPositionFeature.prototype.onLeftChanged = function () {
28821 if (!this.eGui) {
28822 return;
28823 }
28824 var left = this.modifyLeftForPrintLayout(this.getCellLeft());
28825 this.eGui.style.left = left + 'px';
28826 };
28827 CellPositionFeature.prototype.getCellLeft = function () {
28828 var mostLeftCol;
28829 if (this.beans.gridOptionsWrapper.isEnableRtl() && this.colsSpanning) {
28830 mostLeftCol = Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["last"])(this.colsSpanning);
28831 }
28832 else {
28833 mostLeftCol = this.column;
28834 }
28835 return mostLeftCol.getLeft();
28836 };
28837 CellPositionFeature.prototype.modifyLeftForPrintLayout = function (leftPosition) {
28838 if (!this.cellCtrl.isPrintLayout() || this.column.getPinned() === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].PINNED_LEFT) {
28839 return leftPosition;
28840 }
28841 var leftWidth = this.beans.columnModel.getDisplayedColumnsLeftWidth();
28842 if (this.column.getPinned() === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].PINNED_RIGHT) {
28843 var bodyWidth = this.beans.columnModel.getBodyContainerWidth();
28844 return leftWidth + bodyWidth + (leftPosition || 0);
28845 }
28846 // is in body
28847 return leftWidth + (leftPosition || 0);
28848 };
28849 CellPositionFeature.prototype.applyRowSpan = function () {
28850 if (this.rowSpan === 1) {
28851 return;
28852 }
28853 var singleRowHeight = this.beans.gridOptionsWrapper.getRowHeightAsNumber();
28854 var totalRowHeight = singleRowHeight * this.rowSpan;
28855 this.eGui.style.height = totalRowHeight + "px";
28856 this.eGui.style.zIndex = '1';
28857 };
28858 // overriding to make public, as we don't dispose this bean via context
28859 CellPositionFeature.prototype.destroy = function () {
28860 _super.prototype.destroy.call(this);
28861 };
28862 return CellPositionFeature;
28863}(_context_beanStub__WEBPACK_IMPORTED_MODULE_4__["BeanStub"]));
28864
28865
28866
28867
28868
28869/***/ }),
28870/* 125 */
28871/***/ (function(module, __webpack_exports__, __webpack_require__) {
28872
28873"use strict";
28874__webpack_require__.r(__webpack_exports__);
28875/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellCustomStyleFeature", function() { return CellCustomStyleFeature; });
28876/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
28877/**
28878 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
28879 * @version v27.3.0
28880 * @link https://www.ag-grid.com/
28881 * @license MIT
28882 */
28883var __extends = (undefined && undefined.__extends) || (function () {
28884 var extendStatics = function (d, b) {
28885 extendStatics = Object.setPrototypeOf ||
28886 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
28887 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
28888 return extendStatics(d, b);
28889 };
28890 return function (d, b) {
28891 extendStatics(d, b);
28892 function __() { this.constructor = d; }
28893 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28894 };
28895})();
28896
28897var CellCustomStyleFeature = /** @class */ (function (_super) {
28898 __extends(CellCustomStyleFeature, _super);
28899 function CellCustomStyleFeature(ctrl, beans) {
28900 var _this = _super.call(this) || this;
28901 _this.staticClasses = [];
28902 _this.cellCtrl = ctrl;
28903 _this.beans = beans;
28904 _this.column = ctrl.getColumn();
28905 _this.rowNode = ctrl.getRowNode();
28906 return _this;
28907 }
28908 CellCustomStyleFeature.prototype.setComp = function (comp) {
28909 this.cellComp = comp;
28910 this.applyUserStyles();
28911 this.applyCellClassRules();
28912 this.applyClassesFromColDef();
28913 };
28914 CellCustomStyleFeature.prototype.applyCellClassRules = function () {
28915 var _this = this;
28916 var colDef = this.column.getColDef();
28917 var cellClassParams = {
28918 value: this.cellCtrl.getValue(),
28919 data: this.rowNode.data,
28920 node: this.rowNode,
28921 colDef: colDef,
28922 rowIndex: this.rowNode.rowIndex,
28923 api: this.beans.gridOptionsWrapper.getApi(),
28924 columnApi: this.beans.gridOptionsWrapper.getColumnApi(),
28925 context: this.beans.gridOptionsWrapper.getContext()
28926 };
28927 this.beans.stylingService.processClassRules(colDef.cellClassRules, cellClassParams, function (className) { return _this.cellComp.addOrRemoveCssClass(className, true); }, function (className) { return _this.cellComp.addOrRemoveCssClass(className, false); });
28928 };
28929 CellCustomStyleFeature.prototype.applyUserStyles = function () {
28930 var colDef = this.column.getColDef();
28931 if (!colDef.cellStyle) {
28932 return;
28933 }
28934 var styles;
28935 if (typeof colDef.cellStyle === 'function') {
28936 var cellStyleParams = {
28937 column: this.column,
28938 value: this.cellCtrl.getValue(),
28939 colDef: colDef,
28940 data: this.rowNode.data,
28941 node: this.rowNode,
28942 rowIndex: this.rowNode.rowIndex,
28943 api: this.beans.gridOptionsWrapper.getApi(),
28944 columnApi: this.beans.gridOptionsWrapper.getColumnApi(),
28945 context: this.beans.gridOptionsWrapper.getContext(),
28946 };
28947 var cellStyleFunc = colDef.cellStyle;
28948 styles = cellStyleFunc(cellStyleParams);
28949 }
28950 else {
28951 styles = colDef.cellStyle;
28952 }
28953 this.cellComp.setUserStyles(styles);
28954 };
28955 CellCustomStyleFeature.prototype.applyClassesFromColDef = function () {
28956 var _this = this;
28957 var colDef = this.column.getColDef();
28958 var cellClassParams = {
28959 value: this.cellCtrl.getValue(),
28960 data: this.rowNode.data,
28961 node: this.rowNode,
28962 colDef: colDef,
28963 rowIndex: this.rowNode.rowIndex,
28964 api: this.beans.gridOptionsWrapper.getApi(),
28965 columnApi: this.beans.gridOptionsWrapper.getColumnApi(),
28966 context: this.beans.gridOptionsWrapper.getContext()
28967 };
28968 if (this.staticClasses.length) {
28969 this.staticClasses.forEach(function (className) { return _this.cellComp.addOrRemoveCssClass(className, false); });
28970 }
28971 this.staticClasses = this.beans.stylingService.getStaticCellClasses(colDef, cellClassParams);
28972 if (this.staticClasses.length) {
28973 this.staticClasses.forEach(function (className) { return _this.cellComp.addOrRemoveCssClass(className, true); });
28974 }
28975 };
28976 // overriding to make public, as we don't dispose this bean via context
28977 CellCustomStyleFeature.prototype.destroy = function () {
28978 _super.prototype.destroy.call(this);
28979 };
28980 return CellCustomStyleFeature;
28981}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
28982
28983
28984
28985
28986
28987/***/ }),
28988/* 126 */
28989/***/ (function(module, __webpack_exports__, __webpack_require__) {
28990
28991"use strict";
28992__webpack_require__.r(__webpack_exports__);
28993/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipFeature", function() { return TooltipFeature; });
28994/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
28995/* harmony import */ var _customTooltipFeature__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56);
28996/**
28997 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
28998 * @version v27.3.0
28999 * @link https://www.ag-grid.com/
29000 * @license MIT
29001 */
29002var __extends = (undefined && undefined.__extends) || (function () {
29003 var extendStatics = function (d, b) {
29004 extendStatics = Object.setPrototypeOf ||
29005 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
29006 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
29007 return extendStatics(d, b);
29008 };
29009 return function (d, b) {
29010 extendStatics(d, b);
29011 function __() { this.constructor = d; }
29012 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29013 };
29014})();
29015
29016
29017var TooltipFeature = /** @class */ (function (_super) {
29018 __extends(TooltipFeature, _super);
29019 function TooltipFeature(ctrl, beans) {
29020 var _this = _super.call(this) || this;
29021 _this.ctrl = ctrl;
29022 _this.beans = beans;
29023 return _this;
29024 }
29025 TooltipFeature.prototype.setComp = function (comp) {
29026 this.comp = comp;
29027 this.setupTooltip();
29028 };
29029 TooltipFeature.prototype.setupTooltip = function () {
29030 this.browserTooltips = this.beans.gridOptionsWrapper.isEnableBrowserTooltips();
29031 this.updateTooltipText();
29032 if (this.browserTooltips) {
29033 this.comp.setTitle(this.tooltip != null ? this.tooltip : undefined);
29034 }
29035 else {
29036 this.createTooltipFeatureIfNeeded();
29037 }
29038 };
29039 TooltipFeature.prototype.updateTooltipText = function () {
29040 this.tooltip = this.ctrl.getTooltipValue();
29041 };
29042 TooltipFeature.prototype.createTooltipFeatureIfNeeded = function () {
29043 var _this = this;
29044 if (this.genericTooltipFeature != null) {
29045 return;
29046 }
29047 var parent = {
29048 getTooltipParams: function () { return _this.getTooltipParams(); },
29049 getGui: function () { return _this.ctrl.getGui(); }
29050 };
29051 this.genericTooltipFeature = this.createManagedBean(new _customTooltipFeature__WEBPACK_IMPORTED_MODULE_1__["CustomTooltipFeature"](parent), this.beans.context);
29052 };
29053 TooltipFeature.prototype.refreshToolTip = function () {
29054 this.updateTooltipText();
29055 if (this.browserTooltips) {
29056 this.comp.setTitle(this.tooltip != null ? this.tooltip : undefined);
29057 }
29058 };
29059 TooltipFeature.prototype.getTooltipParams = function () {
29060 var ctrl = this.ctrl;
29061 var column = ctrl.getColumn ? ctrl.getColumn() : undefined;
29062 var colDef = ctrl.getColDef ? ctrl.getColDef() : undefined;
29063 var rowNode = ctrl.getRowNode ? ctrl.getRowNode() : undefined;
29064 return {
29065 location: ctrl.getLocation(),
29066 colDef: colDef,
29067 column: column,
29068 rowIndex: ctrl.getRowIndex ? ctrl.getRowIndex() : undefined,
29069 node: rowNode,
29070 data: rowNode ? rowNode.data : undefined,
29071 value: this.getTooltipText(),
29072 valueFormatted: ctrl.getValueFormatted ? ctrl.getValueFormatted() : undefined,
29073 };
29074 };
29075 TooltipFeature.prototype.getTooltipText = function () {
29076 return this.tooltip;
29077 };
29078 // overriding to make public, as we don't dispose this bean via context
29079 TooltipFeature.prototype.destroy = function () {
29080 _super.prototype.destroy.call(this);
29081 };
29082 return TooltipFeature;
29083}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
29084
29085
29086
29087
29088
29089/***/ }),
29090/* 127 */
29091/***/ (function(module, __webpack_exports__, __webpack_require__) {
29092
29093"use strict";
29094__webpack_require__.r(__webpack_exports__);
29095/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellMouseListenerFeature", function() { return CellMouseListenerFeature; });
29096/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
29097/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43);
29098/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
29099/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21);
29100/* harmony import */ var _beans__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(128);
29101/**
29102 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
29103 * @version v27.3.0
29104 * @link https://www.ag-grid.com/
29105 * @license MIT
29106 */
29107var __extends = (undefined && undefined.__extends) || (function () {
29108 var extendStatics = function (d, b) {
29109 extendStatics = Object.setPrototypeOf ||
29110 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
29111 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
29112 return extendStatics(d, b);
29113 };
29114 return function (d, b) {
29115 extendStatics(d, b);
29116 function __() { this.constructor = d; }
29117 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29118 };
29119})();
29120
29121
29122
29123
29124
29125var CellMouseListenerFeature = /** @class */ (function (_super) {
29126 __extends(CellMouseListenerFeature, _super);
29127 function CellMouseListenerFeature(ctrl, beans, column) {
29128 var _this = _super.call(this) || this;
29129 _this.cellCtrl = ctrl;
29130 _this.beans = beans;
29131 _this.column = column;
29132 return _this;
29133 }
29134 CellMouseListenerFeature.prototype.onMouseEvent = function (eventName, mouseEvent) {
29135 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_3__["isStopPropagationForAgGrid"])(mouseEvent)) {
29136 return;
29137 }
29138 switch (eventName) {
29139 case 'click':
29140 this.onCellClicked(mouseEvent);
29141 break;
29142 case 'mousedown':
29143 case 'touchstart':
29144 this.onMouseDown(mouseEvent);
29145 break;
29146 case 'dblclick':
29147 this.onCellDoubleClicked(mouseEvent);
29148 break;
29149 case 'mouseout':
29150 this.onMouseOut(mouseEvent);
29151 break;
29152 case 'mouseover':
29153 this.onMouseOver(mouseEvent);
29154 break;
29155 }
29156 };
29157 CellMouseListenerFeature.prototype.onCellClicked = function (mouseEvent) {
29158 // iPad doesn't have double click - so we need to mimic it to enable editing for iPad.
29159 if (this.isDoubleClickOnIPad()) {
29160 this.onCellDoubleClicked(mouseEvent);
29161 mouseEvent.preventDefault(); // if we don't do this, then iPad zooms in
29162 return;
29163 }
29164 var _a = this.beans, eventService = _a.eventService, gridOptionsWrapper = _a.gridOptionsWrapper;
29165 var cellClickedEvent = this.cellCtrl.createEvent(mouseEvent, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_CLICKED);
29166 eventService.dispatchEvent(cellClickedEvent);
29167 var colDef = this.column.getColDef();
29168 if (colDef.onCellClicked) {
29169 // to make callback async, do in a timeout
29170 window.setTimeout(function () { return colDef.onCellClicked(cellClickedEvent); }, 0);
29171 }
29172 var editOnSingleClick = (gridOptionsWrapper.isSingleClickEdit() || colDef.singleClickEdit)
29173 && !gridOptionsWrapper.isSuppressClickEdit();
29174 if (editOnSingleClick) {
29175 this.cellCtrl.startRowOrCellEdit();
29176 }
29177 };
29178 // returns true if on iPad and this is second 'click' event in 200ms
29179 CellMouseListenerFeature.prototype.isDoubleClickOnIPad = function () {
29180 if (!Object(_utils_browser__WEBPACK_IMPORTED_MODULE_1__["isIOSUserAgent"])() || Object(_utils_event__WEBPACK_IMPORTED_MODULE_3__["isEventSupported"])('dblclick')) {
29181 return false;
29182 }
29183 var nowMillis = new Date().getTime();
29184 var res = nowMillis - this.lastIPadMouseClickEvent < 200;
29185 this.lastIPadMouseClickEvent = nowMillis;
29186 return res;
29187 };
29188 CellMouseListenerFeature.prototype.onCellDoubleClicked = function (mouseEvent) {
29189 var colDef = this.column.getColDef();
29190 // always dispatch event to eventService
29191 var cellDoubleClickedEvent = this.cellCtrl.createEvent(mouseEvent, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_DOUBLE_CLICKED);
29192 this.beans.eventService.dispatchEvent(cellDoubleClickedEvent);
29193 // check if colDef also wants to handle event
29194 if (typeof colDef.onCellDoubleClicked === 'function') {
29195 // to make the callback async, do in a timeout
29196 window.setTimeout(function () { return colDef.onCellDoubleClicked(cellDoubleClickedEvent); }, 0);
29197 }
29198 var editOnDoubleClick = !this.beans.gridOptionsWrapper.isSingleClickEdit()
29199 && !this.beans.gridOptionsWrapper.isSuppressClickEdit();
29200 if (editOnDoubleClick) {
29201 this.cellCtrl.startRowOrCellEdit(null, null, mouseEvent);
29202 }
29203 };
29204 CellMouseListenerFeature.prototype.onMouseDown = function (mouseEvent) {
29205 var ctrlKey = mouseEvent.ctrlKey, metaKey = mouseEvent.metaKey, shiftKey = mouseEvent.shiftKey;
29206 var target = mouseEvent.target;
29207 var _a = this.beans, eventService = _a.eventService, rangeService = _a.rangeService;
29208 // do not change the range for right-clicks inside an existing range
29209 if (this.isRightClickInExistingRange(mouseEvent)) {
29210 return;
29211 }
29212 var ranges = rangeService && rangeService.getCellRanges().length != 0;
29213 if (!shiftKey || !ranges) {
29214 // We only need to pass true to focusCell when the browser is IE/Edge and we are trying
29215 // to focus the cell itself. This should never be true if the mousedown was triggered
29216 // due to a click on a cell editor for example.
29217 var forceBrowserFocus = (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_1__["isBrowserEdge"])()) && !this.cellCtrl.isEditing() && !Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isFocusableFormField"])(target);
29218 this.cellCtrl.focusCell(forceBrowserFocus);
29219 }
29220 // if shift clicking, and a range exists, we keep the focus on the cell that started the
29221 // range as the user then changes the range selection.
29222 if (shiftKey && ranges) {
29223 // this stops the cell from getting focused
29224 mouseEvent.preventDefault();
29225 }
29226 // if we are clicking on a checkbox, we need to make sure the cell wrapping that checkbox
29227 // is focused but we don't want to change the range selection, so return here.
29228 if (this.containsWidget(target)) {
29229 return;
29230 }
29231 if (rangeService) {
29232 var thisCell = this.cellCtrl.getCellPosition();
29233 if (shiftKey) {
29234 rangeService.extendLatestRangeToCell(thisCell);
29235 }
29236 else {
29237 var ctrlKeyPressed = ctrlKey || metaKey;
29238 rangeService.setRangeToCell(thisCell, ctrlKeyPressed);
29239 }
29240 }
29241 eventService.dispatchEvent(this.cellCtrl.createEvent(mouseEvent, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_MOUSE_DOWN));
29242 };
29243 CellMouseListenerFeature.prototype.isRightClickInExistingRange = function (mouseEvent) {
29244 var rangeService = this.beans.rangeService;
29245 if (rangeService) {
29246 var cellInRange = rangeService.isCellInAnyRange(this.cellCtrl.getCellPosition());
29247 if (cellInRange && mouseEvent.button === 2) {
29248 return true;
29249 }
29250 }
29251 return false;
29252 };
29253 CellMouseListenerFeature.prototype.containsWidget = function (target) {
29254 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isElementChildOfClass"])(target, 'ag-selection-checkbox', 3);
29255 };
29256 CellMouseListenerFeature.prototype.onMouseOut = function (mouseEvent) {
29257 if (this.mouseStayingInsideCell(mouseEvent)) {
29258 return;
29259 }
29260 var cellMouseOutEvent = this.cellCtrl.createEvent(mouseEvent, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_MOUSE_OUT);
29261 this.beans.eventService.dispatchEvent(cellMouseOutEvent);
29262 this.beans.columnHoverService.clearMouseOver();
29263 };
29264 CellMouseListenerFeature.prototype.onMouseOver = function (mouseEvent) {
29265 if (this.mouseStayingInsideCell(mouseEvent)) {
29266 return;
29267 }
29268 var cellMouseOverEvent = this.cellCtrl.createEvent(mouseEvent, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_MOUSE_OVER);
29269 this.beans.eventService.dispatchEvent(cellMouseOverEvent);
29270 this.beans.columnHoverService.setMouseOver([this.column]);
29271 };
29272 CellMouseListenerFeature.prototype.mouseStayingInsideCell = function (e) {
29273 if (!e.target || !e.relatedTarget) {
29274 return false;
29275 }
29276 var eGui = this.cellCtrl.getGui();
29277 var cellContainsTarget = eGui.contains(e.target);
29278 var cellContainsRelatedTarget = eGui.contains(e.relatedTarget);
29279 return cellContainsTarget && cellContainsRelatedTarget;
29280 };
29281 CellMouseListenerFeature.prototype.destroy = function () {
29282 };
29283 return CellMouseListenerFeature;
29284}(_beans__WEBPACK_IMPORTED_MODULE_4__["Beans"]));
29285
29286
29287
29288
29289
29290/***/ }),
29291/* 128 */
29292/***/ (function(module, __webpack_exports__, __webpack_require__) {
29293
29294"use strict";
29295__webpack_require__.r(__webpack_exports__);
29296/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Beans", function() { return Beans; });
29297/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
29298/**
29299 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
29300 * @version v27.3.0
29301 * @link https://www.ag-grid.com/
29302 * @license MIT
29303 */
29304var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
29305 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
29306 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29307 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
29308 return c > 3 && r && Object.defineProperty(target, key, r), r;
29309};
29310
29311/** Using the IoC has a slight performance consideration, which is no problem most of the
29312 * time, unless we are trashing objects - which is the case when scrolling and rowComp
29313 * and cellComp. So for performance reasons, RowComp and CellComp do not get autowired
29314 * with the IoC. Instead they get passed this object which is all the beans the RowComp
29315 * and CellComp need. Not autowiring all the cells gives performance improvement. */
29316var Beans = /** @class */ (function () {
29317 function Beans() {
29318 }
29319 Beans.prototype.postConstruct = function () {
29320 this.doingMasterDetail = this.gridOptionsWrapper.isMasterDetail();
29321 if (this.gridOptionsWrapper.isRowModelDefault()) {
29322 this.clientSideRowModel = this.rowModel;
29323 }
29324 if (this.gridOptionsWrapper.isRowModelServerSide()) {
29325 this.serverSideRowModel = this.rowModel;
29326 }
29327 };
29328 __decorate([
29329 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('resizeObserverService')
29330 ], Beans.prototype, "resizeObserverService", void 0);
29331 __decorate([
29332 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
29333 ], Beans.prototype, "paginationProxy", void 0);
29334 __decorate([
29335 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('context')
29336 ], Beans.prototype, "context", void 0);
29337 __decorate([
29338 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
29339 ], Beans.prototype, "columnApi", void 0);
29340 __decorate([
29341 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
29342 ], Beans.prototype, "gridApi", void 0);
29343 __decorate([
29344 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridOptionsWrapper')
29345 ], Beans.prototype, "gridOptionsWrapper", void 0);
29346 __decorate([
29347 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('expressionService')
29348 ], Beans.prototype, "expressionService", void 0);
29349 __decorate([
29350 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
29351 ], Beans.prototype, "rowRenderer", void 0);
29352 __decorate([
29353 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('templateService')
29354 ], Beans.prototype, "templateService", void 0);
29355 __decorate([
29356 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueService')
29357 ], Beans.prototype, "valueService", void 0);
29358 __decorate([
29359 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('eventService')
29360 ], Beans.prototype, "eventService", void 0);
29361 __decorate([
29362 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
29363 ], Beans.prototype, "columnModel", void 0);
29364 __decorate([
29365 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('headerNavigationService')
29366 ], Beans.prototype, "headerNavigationService", void 0);
29367 __decorate([
29368 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('navigationService')
29369 ], Beans.prototype, "navigationService", void 0);
29370 __decorate([
29371 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnAnimationService')
29372 ], Beans.prototype, "columnAnimationService", void 0);
29373 __decorate([
29374 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('rangeService')
29375 ], Beans.prototype, "rangeService", void 0);
29376 __decorate([
29377 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
29378 ], Beans.prototype, "focusService", void 0);
29379 __decorate([
29380 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('contextMenuFactory')
29381 ], Beans.prototype, "contextMenuFactory", void 0);
29382 __decorate([
29383 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('popupService')
29384 ], Beans.prototype, "popupService", void 0);
29385 __decorate([
29386 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueFormatterService')
29387 ], Beans.prototype, "valueFormatterService", void 0);
29388 __decorate([
29389 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('stylingService')
29390 ], Beans.prototype, "stylingService", void 0);
29391 __decorate([
29392 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnHoverService')
29393 ], Beans.prototype, "columnHoverService", void 0);
29394 __decorate([
29395 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('userComponentFactory')
29396 ], Beans.prototype, "userComponentFactory", void 0);
29397 __decorate([
29398 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('userComponentRegistry')
29399 ], Beans.prototype, "userComponentRegistry", void 0);
29400 __decorate([
29401 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('animationFrameService')
29402 ], Beans.prototype, "animationFrameService", void 0);
29403 __decorate([
29404 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('dragAndDropService')
29405 ], Beans.prototype, "dragAndDropService", void 0);
29406 __decorate([
29407 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortController')
29408 ], Beans.prototype, "sortController", void 0);
29409 __decorate([
29410 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
29411 ], Beans.prototype, "filterManager", void 0);
29412 __decorate([
29413 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowContainerHeightService')
29414 ], Beans.prototype, "rowContainerHeightService", void 0);
29415 __decorate([
29416 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('frameworkOverrides')
29417 ], Beans.prototype, "frameworkOverrides", void 0);
29418 __decorate([
29419 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('cellPositionUtils')
29420 ], Beans.prototype, "cellPositionUtils", void 0);
29421 __decorate([
29422 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowPositionUtils')
29423 ], Beans.prototype, "rowPositionUtils", void 0);
29424 __decorate([
29425 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('selectionService')
29426 ], Beans.prototype, "selectionService", void 0);
29427 __decorate([
29428 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('selectionHandleFactory')
29429 ], Beans.prototype, "selectionHandleFactory", void 0);
29430 __decorate([
29431 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowCssClassCalculator')
29432 ], Beans.prototype, "rowCssClassCalculator", void 0);
29433 __decorate([
29434 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
29435 ], Beans.prototype, "rowModel", void 0);
29436 __decorate([
29437 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
29438 ], Beans.prototype, "ctrlsService", void 0);
29439 __decorate([
29440 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsFactory')
29441 ], Beans.prototype, "ctrlsFactory", void 0);
29442 __decorate([
29443 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('agStackComponentsRegistry')
29444 ], Beans.prototype, "agStackComponentsRegistry", void 0);
29445 __decorate([
29446 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueCache')
29447 ], Beans.prototype, "valueCache", void 0);
29448 __decorate([
29449 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowNodeEventThrottle')
29450 ], Beans.prototype, "rowNodeEventThrottle", void 0);
29451 __decorate([
29452 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
29453 ], Beans.prototype, "postConstruct", null);
29454 Beans = __decorate([
29455 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('beans')
29456 ], Beans);
29457 return Beans;
29458}());
29459
29460
29461
29462
29463
29464/***/ }),
29465/* 129 */
29466/***/ (function(module, __webpack_exports__, __webpack_require__) {
29467
29468"use strict";
29469__webpack_require__.r(__webpack_exports__);
29470/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellKeyboardListenerFeature", function() { return CellKeyboardListenerFeature; });
29471/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
29472/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65);
29473/* harmony import */ var _utils_keyboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49);
29474/**
29475 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
29476 * @version v27.3.0
29477 * @link https://www.ag-grid.com/
29478 * @license MIT
29479 */
29480var __extends = (undefined && undefined.__extends) || (function () {
29481 var extendStatics = function (d, b) {
29482 extendStatics = Object.setPrototypeOf ||
29483 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
29484 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
29485 return extendStatics(d, b);
29486 };
29487 return function (d, b) {
29488 extendStatics(d, b);
29489 function __() { this.constructor = d; }
29490 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29491 };
29492})();
29493
29494
29495
29496var CellKeyboardListenerFeature = /** @class */ (function (_super) {
29497 __extends(CellKeyboardListenerFeature, _super);
29498 function CellKeyboardListenerFeature(ctrl, beans, column, rowNode, rowCtrl) {
29499 var _this = _super.call(this) || this;
29500 _this.cellCtrl = ctrl;
29501 _this.beans = beans;
29502 _this.rowNode = rowNode;
29503 _this.rowCtrl = rowCtrl;
29504 return _this;
29505 }
29506 CellKeyboardListenerFeature.prototype.setComp = function (eGui) {
29507 this.eGui = eGui;
29508 };
29509 CellKeyboardListenerFeature.prototype.onKeyDown = function (event) {
29510 var key = event.key;
29511 switch (key) {
29512 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ENTER:
29513 this.onEnterKeyDown(event);
29514 break;
29515 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].F2:
29516 this.onF2KeyDown(event);
29517 break;
29518 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ESCAPE:
29519 this.onEscapeKeyDown(event);
29520 break;
29521 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].TAB:
29522 this.onTabKeyDown(event);
29523 break;
29524 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].BACKSPACE:
29525 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].DELETE:
29526 this.onBackspaceOrDeleteKeyPressed(key, event);
29527 break;
29528 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].DOWN:
29529 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].UP:
29530 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].RIGHT:
29531 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].LEFT:
29532 this.onNavigationKeyPressed(event, key);
29533 break;
29534 }
29535 };
29536 CellKeyboardListenerFeature.prototype.onNavigationKeyPressed = function (event, key) {
29537 if (this.cellCtrl.isEditing()) {
29538 return;
29539 }
29540 if (event.shiftKey && this.cellCtrl.isRangeSelectionEnabled()) {
29541 this.onShiftRangeSelect(event);
29542 }
29543 else {
29544 this.beans.navigationService.navigateToNextCell(event, key, this.cellCtrl.getCellPosition(), true);
29545 }
29546 // if we don't prevent default, the grid will scroll with the navigation keys
29547 event.preventDefault();
29548 };
29549 CellKeyboardListenerFeature.prototype.onShiftRangeSelect = function (event) {
29550 if (!this.beans.rangeService) {
29551 return;
29552 }
29553 var endCell = this.beans.rangeService.extendLatestRangeInDirection(event);
29554 if (endCell) {
29555 this.beans.navigationService.ensureCellVisible(endCell);
29556 }
29557 };
29558 CellKeyboardListenerFeature.prototype.onTabKeyDown = function (event) {
29559 this.beans.navigationService.onTabKeyDown(this.cellCtrl, event);
29560 };
29561 CellKeyboardListenerFeature.prototype.onBackspaceOrDeleteKeyPressed = function (key, event) {
29562 if (!this.cellCtrl.isEditing()) {
29563 this.cellCtrl.startRowOrCellEdit(key, undefined, event);
29564 }
29565 };
29566 CellKeyboardListenerFeature.prototype.onEnterKeyDown = function (e) {
29567 if (this.cellCtrl.isEditing() || this.rowCtrl.isEditing()) {
29568 this.cellCtrl.stopEditingAndFocus();
29569 }
29570 else {
29571 if (this.beans.gridOptionsWrapper.isEnterMovesDown()) {
29572 this.beans.navigationService.navigateToNextCell(null, _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].DOWN, this.cellCtrl.getCellPosition(), false);
29573 }
29574 else {
29575 this.cellCtrl.startRowOrCellEdit(_constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ENTER, undefined, e);
29576 if (this.cellCtrl.isEditing()) {
29577 // if we started editing, then we need to prevent default, otherwise the Enter action can get
29578 // applied to the cell editor. this happened, for example, with largeTextCellEditor where not
29579 // preventing default results in a 'new line' character getting inserted in the text area
29580 // when the editing was started
29581 e.preventDefault();
29582 }
29583 }
29584 }
29585 };
29586 CellKeyboardListenerFeature.prototype.onF2KeyDown = function (event) {
29587 if (!this.cellCtrl.isEditing()) {
29588 this.cellCtrl.startRowOrCellEdit(_constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].F2, undefined, event);
29589 }
29590 };
29591 CellKeyboardListenerFeature.prototype.onEscapeKeyDown = function (event) {
29592 if (this.cellCtrl.isEditing()) {
29593 this.cellCtrl.stopRowOrCellEdit(true);
29594 this.cellCtrl.focusCell(true);
29595 }
29596 };
29597 CellKeyboardListenerFeature.prototype.onKeyPress = function (event) {
29598 // check this, in case focus is on a (for example) a text field inside the cell,
29599 // in which cse we should not be listening for these key pressed
29600 var eventTarget = event.target;
29601 var eventOnChildComponent = eventTarget !== this.eGui;
29602 if (eventOnChildComponent || this.cellCtrl.isEditing()) {
29603 return;
29604 }
29605 var pressedChar = String.fromCharCode(event.charCode);
29606 if (pressedChar === ' ') {
29607 this.onSpaceKeyPressed(event);
29608 }
29609 else if (Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_2__["isEventFromPrintableCharacter"])(event)) {
29610 this.cellCtrl.startRowOrCellEdit(null, pressedChar, event);
29611 // if we don't prevent default, then the keypress also gets applied to the text field
29612 // (at least when doing the default editor), but we need to allow the editor to decide
29613 // what it wants to do. we only do this IF editing was started - otherwise it messes
29614 // up when the use is not doing editing, but using rendering with text fields in cellRenderer
29615 // (as it would block the the user from typing into text fields).
29616 event.preventDefault();
29617 }
29618 };
29619 CellKeyboardListenerFeature.prototype.onSpaceKeyPressed = function (event) {
29620 var gridOptionsWrapper = this.beans.gridOptionsWrapper;
29621 if (!this.cellCtrl.isEditing() && gridOptionsWrapper.isRowSelection()) {
29622 var currentSelection = this.rowNode.isSelected();
29623 var newSelection = !currentSelection;
29624 if (newSelection || !gridOptionsWrapper.isSuppressRowDeselection()) {
29625 var groupSelectsFiltered = this.beans.gridOptionsWrapper.isGroupSelectsFiltered();
29626 var updatedCount = this.rowNode.setSelectedParams({
29627 newValue: newSelection,
29628 rangeSelect: event.shiftKey,
29629 groupSelectsFiltered: groupSelectsFiltered
29630 });
29631 if (currentSelection === undefined && updatedCount === 0) {
29632 this.rowNode.setSelectedParams({
29633 newValue: false,
29634 rangeSelect: event.shiftKey,
29635 groupSelectsFiltered: groupSelectsFiltered
29636 });
29637 }
29638 }
29639 }
29640 // prevent default as space key, by default, moves browser scroll down
29641 event.preventDefault();
29642 };
29643 CellKeyboardListenerFeature.prototype.destroy = function () {
29644 };
29645 return CellKeyboardListenerFeature;
29646}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
29647
29648
29649
29650
29651
29652/***/ }),
29653/* 130 */
29654/***/ (function(module, __webpack_exports__, __webpack_require__) {
29655
29656"use strict";
29657__webpack_require__.r(__webpack_exports__);
29658/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DndSourceComp", function() { return DndSourceComp; });
29659/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
29660/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
29661/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
29662/**
29663 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
29664 * @version v27.3.0
29665 * @link https://www.ag-grid.com/
29666 * @license MIT
29667 */
29668var __extends = (undefined && undefined.__extends) || (function () {
29669 var extendStatics = function (d, b) {
29670 extendStatics = Object.setPrototypeOf ||
29671 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
29672 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
29673 return extendStatics(d, b);
29674 };
29675 return function (d, b) {
29676 extendStatics(d, b);
29677 function __() { this.constructor = d; }
29678 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29679 };
29680})();
29681var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
29682 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
29683 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29684 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
29685 return c > 3 && r && Object.defineProperty(target, key, r), r;
29686};
29687
29688
29689
29690var DndSourceComp = /** @class */ (function (_super) {
29691 __extends(DndSourceComp, _super);
29692 function DndSourceComp(rowNode, column, beans, eCell) {
29693 var _this = _super.call(this, "<div class=\"ag-drag-handle ag-row-drag\" draggable=\"true\"></div>") || this;
29694 _this.rowNode = rowNode;
29695 _this.column = column;
29696 _this.beans = beans;
29697 _this.eCell = eCell;
29698 return _this;
29699 }
29700 DndSourceComp.prototype.postConstruct = function () {
29701 var eGui = this.getGui();
29702 eGui.appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_2__["createIconNoSpan"])('rowDrag', this.beans.gridOptionsWrapper, null));
29703 // we need to stop the event propagation here to avoid starting a range selection while dragging
29704 this.addGuiEventListener('mousedown', function (e) {
29705 e.stopPropagation();
29706 });
29707 this.addDragSource();
29708 this.checkVisibility();
29709 };
29710 DndSourceComp.prototype.addDragSource = function () {
29711 this.addGuiEventListener('dragstart', this.onDragStart.bind(this));
29712 };
29713 DndSourceComp.prototype.onDragStart = function (dragEvent) {
29714 var _this = this;
29715 var providedOnRowDrag = this.column.getColDef().dndSourceOnRowDrag;
29716 dragEvent.dataTransfer.setDragImage(this.eCell, 0, 0);
29717 // default behaviour is to convert data to json and set into drag component
29718 var defaultOnRowDrag = function () {
29719 try {
29720 var jsonData = JSON.stringify(_this.rowNode.data);
29721 dragEvent.dataTransfer.setData('application/json', jsonData);
29722 dragEvent.dataTransfer.setData('text/plain', jsonData);
29723 }
29724 catch (e) {
29725 // if we cannot convert the data to json, then we do not set the type
29726 }
29727 };
29728 if (providedOnRowDrag) {
29729 var params = {
29730 rowNode: this.rowNode, dragEvent: dragEvent,
29731 api: this.gridOptionsWrapper.getApi(),
29732 columnApi: this.gridOptionsWrapper.getColumnApi(),
29733 context: this.gridOptionsWrapper.getContext()
29734 };
29735 providedOnRowDrag(params);
29736 }
29737 else {
29738 defaultOnRowDrag();
29739 }
29740 };
29741 DndSourceComp.prototype.checkVisibility = function () {
29742 var visible = this.column.isDndSource(this.rowNode);
29743 this.setDisplayed(visible);
29744 };
29745 __decorate([
29746 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
29747 ], DndSourceComp.prototype, "postConstruct", null);
29748 return DndSourceComp;
29749}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
29750
29751
29752
29753
29754
29755/***/ }),
29756/* 131 */
29757/***/ (function(module, __webpack_exports__, __webpack_require__) {
29758
29759"use strict";
29760__webpack_require__.r(__webpack_exports__);
29761/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewportSizeFeature", function() { return ViewportSizeFeature; });
29762/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
29763/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
29764/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
29765/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
29766/**
29767 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
29768 * @version v27.3.0
29769 * @link https://www.ag-grid.com/
29770 * @license MIT
29771 */
29772var __extends = (undefined && undefined.__extends) || (function () {
29773 var extendStatics = function (d, b) {
29774 extendStatics = Object.setPrototypeOf ||
29775 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
29776 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
29777 return extendStatics(d, b);
29778 };
29779 return function (d, b) {
29780 extendStatics(d, b);
29781 function __() { this.constructor = d; }
29782 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29783 };
29784})();
29785var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
29786 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
29787 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29788 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
29789 return c > 3 && r && Object.defineProperty(target, key, r), r;
29790};
29791
29792
29793
29794
29795// listens to changes in the center viewport size, for column and row virtualisation,
29796// and adjusts grid as necessary. there are two viewports, one for horizontal and one for
29797// vertical scrolling.
29798var ViewportSizeFeature = /** @class */ (function (_super) {
29799 __extends(ViewportSizeFeature, _super);
29800 function ViewportSizeFeature(centerContainerCtrl) {
29801 var _this = _super.call(this) || this;
29802 _this.centerContainerCtrl = centerContainerCtrl;
29803 return _this;
29804 }
29805 ViewportSizeFeature.prototype.postConstruct = function () {
29806 var _this = this;
29807 this.ctrlsService.whenReady(function () {
29808 _this.gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();
29809 _this.listenForResize();
29810 });
29811 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SCROLLBAR_WIDTH_CHANGED, this.onScrollbarWidthChanged.bind(this));
29812 };
29813 ViewportSizeFeature.prototype.listenForResize = function () {
29814 var _this = this;
29815 var listener = function () { return _this.onCenterViewportResized(); };
29816 // centerContainer gets horizontal resizes
29817 this.centerContainerCtrl.registerViewportResizeListener(listener);
29818 // eBodyViewport gets vertical resizes
29819 this.gridBodyCtrl.registerBodyViewportResizeListener(listener);
29820 };
29821 ViewportSizeFeature.prototype.onScrollbarWidthChanged = function () {
29822 this.checkViewportAndScrolls();
29823 };
29824 ViewportSizeFeature.prototype.onCenterViewportResized = function () {
29825 if (this.centerContainerCtrl.isViewportVisible()) {
29826 this.checkViewportAndScrolls();
29827 var newWidth = this.centerContainerCtrl.getCenterWidth();
29828 if (newWidth !== this.centerWidth) {
29829 this.centerWidth = newWidth;
29830 this.columnModel.refreshFlexedColumns({ viewportWidth: this.centerWidth, updateBodyWidths: true, fireResizedEvent: true });
29831 }
29832 }
29833 else {
29834 this.bodyHeight = 0;
29835 }
29836 };
29837 // gets called every time the viewport size changes. we use this to check visibility of scrollbars
29838 // in the grid panel, and also to check size and position of viewport for row and column virtualisation.
29839 ViewportSizeFeature.prototype.checkViewportAndScrolls = function () {
29840 // results in updating anything that depends on scroll showing
29841 this.updateScrollVisibleService();
29842 // fires event if height changes, used by PaginationService, HeightScalerService, RowRenderer
29843 this.checkBodyHeight();
29844 // check for virtual columns for ColumnController
29845 this.onHorizontalViewportChanged();
29846 this.gridBodyCtrl.getScrollFeature().checkScrollLeft();
29847 };
29848 ViewportSizeFeature.prototype.getBodyHeight = function () {
29849 return this.bodyHeight;
29850 };
29851 ViewportSizeFeature.prototype.checkBodyHeight = function () {
29852 var eBodyViewport = this.gridBodyCtrl.getBodyViewportElement();
29853 var bodyHeight = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["getInnerHeight"])(eBodyViewport);
29854 if (this.bodyHeight !== bodyHeight) {
29855 this.bodyHeight = bodyHeight;
29856 var event_1 = {
29857 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_BODY_HEIGHT_CHANGED,
29858 api: this.gridApi,
29859 columnApi: this.columnApi
29860 };
29861 this.eventService.dispatchEvent(event_1);
29862 }
29863 };
29864 ViewportSizeFeature.prototype.updateScrollVisibleService = function () {
29865 // because of column animation (which takes 200ms), we have to do this twice.
29866 // eg if user removes cols anywhere except at the RHS, then the cols on the RHS
29867 // will animate to the left to fill the gap. this animation means just after
29868 // the cols are removed, the remaining cols are still in the original location
29869 // at the start of the animation, so pre animation the H scrollbar is still needed,
29870 // but post animation it is not.
29871 this.updateScrollVisibleServiceImpl();
29872 setTimeout(this.updateScrollVisibleServiceImpl.bind(this), 500);
29873 };
29874 ViewportSizeFeature.prototype.updateScrollVisibleServiceImpl = function () {
29875 var params = {
29876 horizontalScrollShowing: this.isHorizontalScrollShowing(),
29877 verticalScrollShowing: this.gridBodyCtrl.isVerticalScrollShowing()
29878 };
29879 this.scrollVisibleService.setScrollsVisible(params);
29880 // fix - gridComp should just listen to event from above
29881 this.gridBodyCtrl.setVerticalScrollPaddingVisible(params.verticalScrollShowing);
29882 };
29883 ViewportSizeFeature.prototype.isHorizontalScrollShowing = function () {
29884 var isAlwaysShowHorizontalScroll = this.gridOptionsWrapper.isAlwaysShowHorizontalScroll();
29885 return isAlwaysShowHorizontalScroll || this.centerContainerCtrl.isViewportHScrollShowing();
29886 };
29887 // this gets called whenever a change in the viewport, so we can inform column controller it has to work
29888 // out the virtual columns again. gets called from following locations:
29889 // + ensureColVisible, scroll, init, layoutChanged, displayedColumnsChanged, API (doLayout)
29890 ViewportSizeFeature.prototype.onHorizontalViewportChanged = function () {
29891 var scrollWidth = this.centerContainerCtrl.getCenterWidth();
29892 var scrollPosition = this.centerContainerCtrl.getViewportScrollLeft();
29893 this.columnModel.setViewportPosition(scrollWidth, scrollPosition);
29894 };
29895 __decorate([
29896 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
29897 ], ViewportSizeFeature.prototype, "ctrlsService", void 0);
29898 __decorate([
29899 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
29900 ], ViewportSizeFeature.prototype, "columnModel", void 0);
29901 __decorate([
29902 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('scrollVisibleService')
29903 ], ViewportSizeFeature.prototype, "scrollVisibleService", void 0);
29904 __decorate([
29905 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnApi')
29906 ], ViewportSizeFeature.prototype, "columnApi", void 0);
29907 __decorate([
29908 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridApi')
29909 ], ViewportSizeFeature.prototype, "gridApi", void 0);
29910 __decorate([
29911 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
29912 ], ViewportSizeFeature.prototype, "postConstruct", null);
29913 return ViewportSizeFeature;
29914}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
29915
29916
29917
29918
29919
29920/***/ }),
29921/* 132 */
29922/***/ (function(module, __webpack_exports__, __webpack_require__) {
29923
29924"use strict";
29925__webpack_require__.r(__webpack_exports__);
29926/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetPinnedLeftWidthFeature", function() { return SetPinnedLeftWidthFeature; });
29927/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
29928/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
29929/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24);
29930/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
29931/**
29932 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
29933 * @version v27.3.0
29934 * @link https://www.ag-grid.com/
29935 * @license MIT
29936 */
29937var __extends = (undefined && undefined.__extends) || (function () {
29938 var extendStatics = function (d, b) {
29939 extendStatics = Object.setPrototypeOf ||
29940 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
29941 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
29942 return extendStatics(d, b);
29943 };
29944 return function (d, b) {
29945 extendStatics(d, b);
29946 function __() { this.constructor = d; }
29947 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29948 };
29949})();
29950var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
29951 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
29952 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29953 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
29954 return c > 3 && r && Object.defineProperty(target, key, r), r;
29955};
29956
29957
29958
29959
29960var SetPinnedLeftWidthFeature = /** @class */ (function (_super) {
29961 __extends(SetPinnedLeftWidthFeature, _super);
29962 function SetPinnedLeftWidthFeature(element) {
29963 var _this = _super.call(this) || this;
29964 _this.element = element;
29965 return _this;
29966 }
29967 SetPinnedLeftWidthFeature.prototype.postConstruct = function () {
29968 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_LEFT_PINNED_WIDTH_CHANGED, this.onPinnedLeftWidthChanged.bind(this));
29969 };
29970 SetPinnedLeftWidthFeature.prototype.onPinnedLeftWidthChanged = function () {
29971 var leftWidth = this.pinnedWidthService.getPinnedLeftWidth();
29972 var displayed = leftWidth > 0;
29973 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setDisplayed"])(this.element, displayed);
29974 if (displayed) {
29975 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setFixedWidth"])(this.element, leftWidth);
29976 }
29977 };
29978 __decorate([
29979 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('pinnedWidthService')
29980 ], SetPinnedLeftWidthFeature.prototype, "pinnedWidthService", void 0);
29981 __decorate([
29982 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
29983 ], SetPinnedLeftWidthFeature.prototype, "postConstruct", null);
29984 return SetPinnedLeftWidthFeature;
29985}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
29986
29987
29988
29989
29990
29991/***/ }),
29992/* 133 */
29993/***/ (function(module, __webpack_exports__, __webpack_require__) {
29994
29995"use strict";
29996__webpack_require__.r(__webpack_exports__);
29997/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetPinnedRightWidthFeature", function() { return SetPinnedRightWidthFeature; });
29998/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
29999/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24);
30000/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
30001/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
30002/**
30003 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30004 * @version v27.3.0
30005 * @link https://www.ag-grid.com/
30006 * @license MIT
30007 */
30008var __extends = (undefined && undefined.__extends) || (function () {
30009 var extendStatics = function (d, b) {
30010 extendStatics = Object.setPrototypeOf ||
30011 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30012 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
30013 return extendStatics(d, b);
30014 };
30015 return function (d, b) {
30016 extendStatics(d, b);
30017 function __() { this.constructor = d; }
30018 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30019 };
30020})();
30021var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
30022 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
30023 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
30024 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30025 return c > 3 && r && Object.defineProperty(target, key, r), r;
30026};
30027
30028
30029
30030
30031var SetPinnedRightWidthFeature = /** @class */ (function (_super) {
30032 __extends(SetPinnedRightWidthFeature, _super);
30033 function SetPinnedRightWidthFeature(element) {
30034 var _this = _super.call(this) || this;
30035 _this.element = element;
30036 return _this;
30037 }
30038 SetPinnedRightWidthFeature.prototype.postConstruct = function () {
30039 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_RIGHT_PINNED_WIDTH_CHANGED, this.onPinnedRightWidthChanged.bind(this));
30040 };
30041 SetPinnedRightWidthFeature.prototype.onPinnedRightWidthChanged = function () {
30042 var rightWidth = this.pinnedWidthService.getPinnedRightWidth();
30043 var displayed = rightWidth > 0;
30044 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.element, displayed);
30045 if (displayed) {
30046 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedWidth"])(this.element, rightWidth);
30047 }
30048 };
30049 __decorate([
30050 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedWidthService')
30051 ], SetPinnedRightWidthFeature.prototype, "pinnedWidthService", void 0);
30052 __decorate([
30053 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
30054 ], SetPinnedRightWidthFeature.prototype, "postConstruct", null);
30055 return SetPinnedRightWidthFeature;
30056}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
30057
30058
30059
30060
30061
30062/***/ }),
30063/* 134 */
30064/***/ (function(module, __webpack_exports__, __webpack_require__) {
30065
30066"use strict";
30067__webpack_require__.r(__webpack_exports__);
30068/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetHeightFeature", function() { return SetHeightFeature; });
30069/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
30070/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
30071/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24);
30072/**
30073 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30074 * @version v27.3.0
30075 * @link https://www.ag-grid.com/
30076 * @license MIT
30077 */
30078var __extends = (undefined && undefined.__extends) || (function () {
30079 var extendStatics = function (d, b) {
30080 extendStatics = Object.setPrototypeOf ||
30081 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30082 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
30083 return extendStatics(d, b);
30084 };
30085 return function (d, b) {
30086 extendStatics(d, b);
30087 function __() { this.constructor = d; }
30088 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30089 };
30090})();
30091var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
30092 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
30093 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
30094 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30095 return c > 3 && r && Object.defineProperty(target, key, r), r;
30096};
30097
30098
30099
30100var SetHeightFeature = /** @class */ (function (_super) {
30101 __extends(SetHeightFeature, _super);
30102 function SetHeightFeature(eContainer, eWrapper) {
30103 var _this = _super.call(this) || this;
30104 _this.eContainer = eContainer;
30105 _this.eWrapper = eWrapper;
30106 return _this;
30107 }
30108 SetHeightFeature.prototype.postConstruct = function () {
30109 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_CONTAINER_HEIGHT_CHANGED, this.onHeightChanged.bind(this));
30110 };
30111 SetHeightFeature.prototype.onHeightChanged = function () {
30112 var height = this.maxDivHeightScaler.getUiContainerHeight();
30113 var heightString = height != null ? height + "px" : "";
30114 this.eContainer.style.height = heightString;
30115 if (this.eWrapper) {
30116 this.eWrapper.style.height = heightString;
30117 }
30118 };
30119 __decorate([
30120 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])("rowContainerHeightService")
30121 ], SetHeightFeature.prototype, "maxDivHeightScaler", void 0);
30122 __decorate([
30123 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
30124 ], SetHeightFeature.prototype, "postConstruct", null);
30125 return SetHeightFeature;
30126}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
30127
30128
30129
30130
30131
30132/***/ }),
30133/* 135 */
30134/***/ (function(module, __webpack_exports__, __webpack_require__) {
30135
30136"use strict";
30137__webpack_require__.r(__webpack_exports__);
30138/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragListenerFeature", function() { return DragListenerFeature; });
30139/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
30140/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
30141/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
30142/**
30143 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30144 * @version v27.3.0
30145 * @link https://www.ag-grid.com/
30146 * @license MIT
30147 */
30148var __extends = (undefined && undefined.__extends) || (function () {
30149 var extendStatics = function (d, b) {
30150 extendStatics = Object.setPrototypeOf ||
30151 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30152 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
30153 return extendStatics(d, b);
30154 };
30155 return function (d, b) {
30156 extendStatics(d, b);
30157 function __() { this.constructor = d; }
30158 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30159 };
30160})();
30161var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
30162 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
30163 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
30164 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30165 return c > 3 && r && Object.defineProperty(target, key, r), r;
30166};
30167
30168
30169
30170var DragListenerFeature = /** @class */ (function (_super) {
30171 __extends(DragListenerFeature, _super);
30172 function DragListenerFeature(eContainer) {
30173 var _this = _super.call(this) || this;
30174 _this.eContainer = eContainer;
30175 return _this;
30176 }
30177 DragListenerFeature.prototype.postConstruct = function () {
30178 var _this = this;
30179 if (!this.gridOptionsWrapper.isEnableRangeSelection() || // no range selection if no property
30180 Object(_utils_generic__WEBPACK_IMPORTED_MODULE_1__["missing"])(this.rangeService) // no range selection if not enterprise version
30181 ) {
30182 return;
30183 }
30184 var params = {
30185 dragStartPixels: 0,
30186 eElement: this.eContainer,
30187 onDragStart: this.rangeService.onDragStart.bind(this.rangeService),
30188 onDragStop: this.rangeService.onDragStop.bind(this.rangeService),
30189 onDragging: this.rangeService.onDragging.bind(this.rangeService)
30190 };
30191 this.dragService.addDragSource(params);
30192 this.addDestroyFunc(function () { return _this.dragService.removeDragSource(params); });
30193 };
30194 __decorate([
30195 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Optional"])('rangeService')
30196 ], DragListenerFeature.prototype, "rangeService", void 0);
30197 __decorate([
30198 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('dragService')
30199 ], DragListenerFeature.prototype, "dragService", void 0);
30200 __decorate([
30201 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
30202 ], DragListenerFeature.prototype, "postConstruct", null);
30203 return DragListenerFeature;
30204}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
30205
30206
30207
30208
30209
30210/***/ }),
30211/* 136 */
30212/***/ (function(module, __webpack_exports__, __webpack_require__) {
30213
30214"use strict";
30215__webpack_require__.r(__webpack_exports__);
30216/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CenterWidthFeature", function() { return CenterWidthFeature; });
30217/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
30218/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
30219/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(112);
30220/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
30221/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24);
30222/**
30223 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30224 * @version v27.3.0
30225 * @link https://www.ag-grid.com/
30226 * @license MIT
30227 */
30228var __extends = (undefined && undefined.__extends) || (function () {
30229 var extendStatics = function (d, b) {
30230 extendStatics = Object.setPrototypeOf ||
30231 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30232 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
30233 return extendStatics(d, b);
30234 };
30235 return function (d, b) {
30236 extendStatics(d, b);
30237 function __() { this.constructor = d; }
30238 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30239 };
30240})();
30241var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
30242 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
30243 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
30244 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30245 return c > 3 && r && Object.defineProperty(target, key, r), r;
30246};
30247
30248
30249
30250
30251
30252var CenterWidthFeature = /** @class */ (function (_super) {
30253 __extends(CenterWidthFeature, _super);
30254 function CenterWidthFeature(callback) {
30255 var _this = _super.call(this) || this;
30256 _this.callback = callback;
30257 return _this;
30258 }
30259 CenterWidthFeature.prototype.postConstruct = function () {
30260 var listener = this.setWidth.bind(this);
30261 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_2__["GridOptionsWrapper"].PROP_DOM_LAYOUT, listener);
30262 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, listener);
30263 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, listener);
30264 this.setWidth();
30265 };
30266 CenterWidthFeature.prototype.setWidth = function () {
30267 var columnModel = this.columnModel;
30268 var printLayout = this.gridOptionsWrapper.getDomLayout() === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].DOM_LAYOUT_PRINT;
30269 var centerWidth = columnModel.getBodyContainerWidth();
30270 var leftWidth = columnModel.getDisplayedColumnsLeftWidth();
30271 var rightWidth = columnModel.getDisplayedColumnsRightWidth();
30272 var totalWidth = printLayout ? centerWidth + leftWidth + rightWidth : centerWidth;
30273 this.callback(totalWidth);
30274 };
30275 __decorate([
30276 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
30277 ], CenterWidthFeature.prototype, "columnModel", void 0);
30278 __decorate([
30279 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
30280 ], CenterWidthFeature.prototype, "postConstruct", null);
30281 return CenterWidthFeature;
30282}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
30283
30284
30285
30286
30287
30288/***/ }),
30289/* 137 */
30290/***/ (function(module, __webpack_exports__, __webpack_require__) {
30291
30292"use strict";
30293__webpack_require__.r(__webpack_exports__);
30294/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollVisibleService", function() { return ScrollVisibleService; });
30295/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
30296/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
30297/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
30298/**
30299 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30300 * @version v27.3.0
30301 * @link https://www.ag-grid.com/
30302 * @license MIT
30303 */
30304var __extends = (undefined && undefined.__extends) || (function () {
30305 var extendStatics = function (d, b) {
30306 extendStatics = Object.setPrototypeOf ||
30307 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30308 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
30309 return extendStatics(d, b);
30310 };
30311 return function (d, b) {
30312 extendStatics(d, b);
30313 function __() { this.constructor = d; }
30314 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30315 };
30316})();
30317var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
30318 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
30319 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
30320 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30321 return c > 3 && r && Object.defineProperty(target, key, r), r;
30322};
30323
30324
30325
30326var ScrollVisibleService = /** @class */ (function (_super) {
30327 __extends(ScrollVisibleService, _super);
30328 function ScrollVisibleService() {
30329 return _super !== null && _super.apply(this, arguments) || this;
30330 }
30331 ScrollVisibleService.prototype.postConstruct = function () {
30332 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));
30333 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onDisplayedColumnsWidthChanged.bind(this));
30334 };
30335 ScrollVisibleService.prototype.onDisplayedColumnsChanged = function () {
30336 this.update();
30337 };
30338 ScrollVisibleService.prototype.onDisplayedColumnsWidthChanged = function () {
30339 this.update();
30340 };
30341 ScrollVisibleService.prototype.update = function () {
30342 // because of column animation (which takes 200ms), we have to do this twice.
30343 // eg if user removes cols anywhere except at the RHS, then the cols on the RHS
30344 // will animate to the left to fill the gap. this animation means just after
30345 // the cols are removed, the remaining cols are still in the original location
30346 // at the start of the animation, so pre animation the H scrollbar is still needed,
30347 // but post animation it is not.
30348 this.updateImpl();
30349 setTimeout(this.updateImpl.bind(this), 500);
30350 };
30351 ScrollVisibleService.prototype.updateImpl = function () {
30352 var centerRowCtrl = this.ctrlsService.getCenterRowContainerCtrl();
30353 if (!centerRowCtrl) {
30354 return;
30355 }
30356 var params = {
30357 horizontalScrollShowing: centerRowCtrl.isHorizontalScrollShowing(),
30358 verticalScrollShowing: this.isVerticalScrollShowing()
30359 };
30360 this.setScrollsVisible(params);
30361 };
30362 ScrollVisibleService.prototype.setScrollsVisible = function (params) {
30363 var atLeastOneDifferent = this.horizontalScrollShowing !== params.horizontalScrollShowing ||
30364 this.verticalScrollShowing !== params.verticalScrollShowing;
30365 if (atLeastOneDifferent) {
30366 this.horizontalScrollShowing = params.horizontalScrollShowing;
30367 this.verticalScrollShowing = params.verticalScrollShowing;
30368 var event_1 = {
30369 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED,
30370 api: this.gridApi,
30371 columnApi: this.columnApi
30372 };
30373 this.eventService.dispatchEvent(event_1);
30374 }
30375 };
30376 // used by pagination service - to know page height
30377 ScrollVisibleService.prototype.isHorizontalScrollShowing = function () {
30378 return this.horizontalScrollShowing;
30379 };
30380 // used by header container
30381 ScrollVisibleService.prototype.isVerticalScrollShowing = function () {
30382 return this.verticalScrollShowing;
30383 };
30384 __decorate([
30385 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
30386 ], ScrollVisibleService.prototype, "columnApi", void 0);
30387 __decorate([
30388 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
30389 ], ScrollVisibleService.prototype, "gridApi", void 0);
30390 __decorate([
30391 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
30392 ], ScrollVisibleService.prototype, "ctrlsService", void 0);
30393 __decorate([
30394 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
30395 ], ScrollVisibleService.prototype, "postConstruct", null);
30396 ScrollVisibleService = __decorate([
30397 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('scrollVisibleService')
30398 ], ScrollVisibleService);
30399 return ScrollVisibleService;
30400}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
30401
30402
30403
30404
30405
30406/***/ }),
30407/* 138 */
30408/***/ (function(module, __webpack_exports__, __webpack_require__) {
30409
30410"use strict";
30411__webpack_require__.r(__webpack_exports__);
30412/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MouseEventService", function() { return MouseEventService; });
30413/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
30414/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37);
30415/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
30416/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
30417/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21);
30418/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
30419/* harmony import */ var _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(121);
30420/**
30421 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30422 * @version v27.3.0
30423 * @link https://www.ag-grid.com/
30424 * @license MIT
30425 */
30426var __extends = (undefined && undefined.__extends) || (function () {
30427 var extendStatics = function (d, b) {
30428 extendStatics = Object.setPrototypeOf ||
30429 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30430 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
30431 return extendStatics(d, b);
30432 };
30433 return function (d, b) {
30434 extendStatics(d, b);
30435 function __() { this.constructor = d; }
30436 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30437 };
30438})();
30439var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
30440 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
30441 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
30442 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30443 return c > 3 && r && Object.defineProperty(target, key, r), r;
30444};
30445
30446
30447
30448
30449
30450
30451
30452
30453var MouseEventService = /** @class */ (function (_super) {
30454 __extends(MouseEventService, _super);
30455 function MouseEventService() {
30456 var _this = _super !== null && _super.apply(this, arguments) || this;
30457 _this.gridInstanceId = MouseEventService_1.gridInstanceSequence.next();
30458 return _this;
30459 }
30460 MouseEventService_1 = MouseEventService;
30461 // we put the instance id onto the main DOM element. this is used for events, when grids are inside grids,
30462 // so the grid can work out if the even came from this grid or a grid inside this one. see the ctrl+v logic
30463 // for where this is used.
30464 MouseEventService.prototype.stampTopLevelGridCompWithGridInstance = function (eGridDiv) {
30465 eGridDiv[MouseEventService_1.GRID_DOM_KEY] = this.gridInstanceId;
30466 };
30467 MouseEventService.prototype.getRenderedCellForEvent = function (event) {
30468 return Object(_utils_event__WEBPACK_IMPORTED_MODULE_4__["getCtrlForEvent"])(this.gridOptionsWrapper, event, _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_6__["CellCtrl"].DOM_DATA_KEY_CELL_CTRL);
30469 };
30470 // walks the path of the event, and returns true if this grid is the first one that it finds. if doing
30471 // master / detail grids, and a child grid is found, then it returns false. this stops things like copy/paste
30472 // getting executed on many grids at the same time.
30473 MouseEventService.prototype.isEventFromThisGrid = function (event) {
30474 var res = this.isElementInThisGrid(event.target);
30475 return res;
30476 };
30477 MouseEventService.prototype.isElementInThisGrid = function (element) {
30478 var pointer = element;
30479 while (pointer) {
30480 var instanceId = pointer[MouseEventService_1.GRID_DOM_KEY];
30481 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(instanceId)) {
30482 var eventFromThisGrid = instanceId === this.gridInstanceId;
30483 return eventFromThisGrid;
30484 }
30485 pointer = pointer.parentElement;
30486 }
30487 return false;
30488 };
30489 MouseEventService.prototype.getCellPositionForEvent = function (event) {
30490 var cellComp = this.getRenderedCellForEvent(event);
30491 return cellComp ? cellComp.getCellPosition() : null;
30492 };
30493 MouseEventService.prototype.getNormalisedPosition = function (event) {
30494 var gridPanelHasScrolls = this.gridOptionsWrapper.getDomLayout() === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].DOM_LAYOUT_NORMAL;
30495 var e = event;
30496 var x;
30497 var y;
30498 if (e.clientX != null || e.clientY != null) {
30499 x = e.clientX;
30500 y = e.clientY;
30501 }
30502 else {
30503 x = e.x;
30504 y = e.y;
30505 }
30506 if (gridPanelHasScrolls) {
30507 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
30508 var vRange = gridBodyCon.getScrollFeature().getVScrollPosition();
30509 var hRange = gridBodyCon.getScrollFeature().getHScrollPosition();
30510 x += hRange.left;
30511 y += vRange.top;
30512 }
30513 return { x: x, y: y };
30514 };
30515 var MouseEventService_1;
30516 MouseEventService.gridInstanceSequence = new _utils__WEBPACK_IMPORTED_MODULE_1__["NumberSequence"]();
30517 MouseEventService.GRID_DOM_KEY = '__ag_grid_instance';
30518 __decorate([
30519 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
30520 ], MouseEventService.prototype, "ctrlsService", void 0);
30521 MouseEventService = MouseEventService_1 = __decorate([
30522 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('mouseEventService')
30523 ], MouseEventService);
30524 return MouseEventService;
30525}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
30526
30527
30528
30529
30530
30531/***/ }),
30532/* 139 */
30533/***/ (function(module, __webpack_exports__, __webpack_require__) {
30534
30535"use strict";
30536__webpack_require__.r(__webpack_exports__);
30537/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationService", function() { return NavigationService; });
30538/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
30539/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
30540/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
30541/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
30542/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65);
30543/* harmony import */ var _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(121);
30544/* harmony import */ var _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(120);
30545/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14);
30546/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(15);
30547/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(24);
30548/**
30549 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30550 * @version v27.3.0
30551 * @link https://www.ag-grid.com/
30552 * @license MIT
30553 */
30554var __extends = (undefined && undefined.__extends) || (function () {
30555 var extendStatics = function (d, b) {
30556 extendStatics = Object.setPrototypeOf ||
30557 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30558 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
30559 return extendStatics(d, b);
30560 };
30561 return function (d, b) {
30562 extendStatics(d, b);
30563 function __() { this.constructor = d; }
30564 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30565 };
30566})();
30567var __assign = (undefined && undefined.__assign) || function () {
30568 __assign = Object.assign || function(t) {
30569 for (var s, i = 1, n = arguments.length; i < n; i++) {
30570 s = arguments[i];
30571 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
30572 t[p] = s[p];
30573 }
30574 return t;
30575 };
30576 return __assign.apply(this, arguments);
30577};
30578var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
30579 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
30580 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
30581 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30582 return c > 3 && r && Object.defineProperty(target, key, r), r;
30583};
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594var NavigationService = /** @class */ (function (_super) {
30595 __extends(NavigationService, _super);
30596 function NavigationService() {
30597 var _this = _super.call(this) || this;
30598 _this.onPageDown = Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["throttle"])(_this.onPageDown, 100);
30599 _this.onPageUp = Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["throttle"])(_this.onPageUp, 100);
30600 return _this;
30601 }
30602 NavigationService.prototype.postConstruct = function () {
30603 var _this = this;
30604 this.ctrlsService.whenReady(function (p) {
30605 _this.gridBodyCon = p.gridBodyCtrl;
30606 });
30607 };
30608 NavigationService.prototype.handlePageScrollingKey = function (event) {
30609 var key = event.key;
30610 var alt = event.altKey;
30611 var ctrl = event.ctrlKey || event.metaKey;
30612 var rangeServiceShouldHandleShift = !!this.rangeService && event.shiftKey;
30613 var currentCell = this.mouseEventService.getCellPositionForEvent(event);
30614 if (!currentCell) {
30615 return false;
30616 }
30617 var processed = false;
30618 switch (key) {
30619 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_HOME:
30620 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_END:
30621 // handle home and end when ctrl & alt are NOT pressed
30622 if (!ctrl && !alt) {
30623 this.onHomeOrEndKey(key);
30624 processed = true;
30625 }
30626 break;
30627 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].LEFT:
30628 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].RIGHT:
30629 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].UP:
30630 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].DOWN:
30631 // handle when ctrl is pressed only, if shift is pressed
30632 // it will be handled by the rangeService
30633 if (ctrl && !alt && !rangeServiceShouldHandleShift) {
30634 this.onCtrlUpDownLeftRight(key, currentCell);
30635 processed = true;
30636 }
30637 break;
30638 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_DOWN:
30639 // handle page up and page down when ctrl & alt are NOT pressed
30640 if (!ctrl && !alt) {
30641 this.onPageDown(currentCell);
30642 processed = true;
30643 }
30644 break;
30645 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_UP:
30646 // handle page up and page down when ctrl & alt are NOT pressed
30647 if (!ctrl && !alt) {
30648 this.onPageUp(currentCell);
30649 processed = true;
30650 }
30651 break;
30652 }
30653 if (processed) {
30654 event.preventDefault();
30655 }
30656 return processed;
30657 };
30658 NavigationService.prototype.navigateTo = function (navigateParams) {
30659 var scrollIndex = navigateParams.scrollIndex, scrollType = navigateParams.scrollType, scrollColumn = navigateParams.scrollColumn, focusIndex = navigateParams.focusIndex, focusColumn = navigateParams.focusColumn;
30660 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(scrollColumn) && !scrollColumn.isPinned()) {
30661 this.gridBodyCon.getScrollFeature().ensureColumnVisible(scrollColumn);
30662 }
30663 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(scrollIndex)) {
30664 this.gridBodyCon.getScrollFeature().ensureIndexVisible(scrollIndex, scrollType);
30665 }
30666 // make sure the cell is rendered, needed if we are to focus
30667 this.animationFrameService.flushAllFrames();
30668 // if we don't do this, the range will be left on the last cell, which will leave the last focused cell
30669 // highlighted.
30670 this.focusService.setFocusedCell(focusIndex, focusColumn, null, true);
30671 if (this.rangeService) {
30672 var cellPosition = { rowIndex: focusIndex, rowPinned: null, column: focusColumn };
30673 this.rangeService.setRangeToCell(cellPosition);
30674 }
30675 };
30676 NavigationService.prototype.onPageDown = function (gridCell) {
30677 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
30678 var scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();
30679 var pixelsInOnePage = this.getViewportHeight();
30680 var pagingPixelOffset = this.paginationProxy.getPixelOffset();
30681 var currentPageBottomPixel = scrollPosition.top + pixelsInOnePage;
30682 var currentPageBottomRow = this.paginationProxy.getRowIndexAtPixel(currentPageBottomPixel + pagingPixelOffset);
30683 if (this.columnModel.isAutoRowHeightActive()) {
30684 this.navigateToNextPageWithAutoHeight(gridCell, currentPageBottomRow);
30685 }
30686 else {
30687 this.navigateToNextPage(gridCell, currentPageBottomRow);
30688 }
30689 };
30690 NavigationService.prototype.onPageUp = function (gridCell) {
30691 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
30692 var scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();
30693 var pagingPixelOffset = this.paginationProxy.getPixelOffset();
30694 var currentPageTopPixel = scrollPosition.top;
30695 var currentPageTopRow = this.paginationProxy.getRowIndexAtPixel(currentPageTopPixel + pagingPixelOffset);
30696 if (this.columnModel.isAutoRowHeightActive()) {
30697 this.navigateToNextPageWithAutoHeight(gridCell, currentPageTopRow, true);
30698 }
30699 else {
30700 this.navigateToNextPage(gridCell, currentPageTopRow, true);
30701 }
30702 };
30703 NavigationService.prototype.navigateToNextPage = function (gridCell, scrollIndex, up) {
30704 if (up === void 0) { up = false; }
30705 var _a, _b;
30706 var pixelsInOnePage = this.getViewportHeight();
30707 var firstRow = this.paginationProxy.getPageFirstRow();
30708 var lastRow = this.paginationProxy.getPageLastRow();
30709 var pagingPixelOffset = this.paginationProxy.getPixelOffset();
30710 var currentRowNode = this.paginationProxy.getRow(gridCell.rowIndex);
30711 var rowPixelDiff = up
30712 ? (((_a = currentRowNode) === null || _a === void 0 ? void 0 : _a.rowHeight) - pixelsInOnePage - pagingPixelOffset)
30713 : (pixelsInOnePage - pagingPixelOffset);
30714 var nextCellPixel = ((_b = currentRowNode) === null || _b === void 0 ? void 0 : _b.rowTop) + rowPixelDiff;
30715 var focusIndex = this.paginationProxy.getRowIndexAtPixel(nextCellPixel + pagingPixelOffset);
30716 if (focusIndex === gridCell.rowIndex) {
30717 var diff = up ? -1 : 1;
30718 scrollIndex = focusIndex = gridCell.rowIndex + diff;
30719 }
30720 var scrollType;
30721 if (up) {
30722 scrollType = 'bottom';
30723 if (focusIndex < firstRow) {
30724 focusIndex = firstRow;
30725 }
30726 if (scrollIndex < firstRow) {
30727 scrollIndex = firstRow;
30728 }
30729 }
30730 else {
30731 scrollType = 'top';
30732 if (focusIndex > lastRow) {
30733 focusIndex = lastRow;
30734 }
30735 if (scrollIndex > lastRow) {
30736 scrollIndex = lastRow;
30737 }
30738 }
30739 if (this.isRowTallerThanView(focusIndex)) {
30740 scrollIndex = focusIndex;
30741 scrollType = 'top';
30742 }
30743 this.navigateTo({
30744 scrollIndex: scrollIndex,
30745 scrollType: scrollType,
30746 scrollColumn: null,
30747 focusIndex: focusIndex,
30748 focusColumn: gridCell.column
30749 });
30750 };
30751 NavigationService.prototype.navigateToNextPageWithAutoHeight = function (gridCell, scrollIndex, up) {
30752 var _this = this;
30753 if (up === void 0) { up = false; }
30754 // because autoHeight will calculate the height of rows after scroll
30755 // first we scroll towards the required point, then we add a small
30756 // delay to allow the height to be recalculated, check which index
30757 // should be focused and then finally navigate to that index.
30758 // TODO: we should probably have an event fired once to scrollbar has
30759 // settled and all rowHeights have been calculated instead of relying
30760 // on a setTimeout of 50ms.
30761 this.navigateTo({
30762 scrollIndex: scrollIndex,
30763 scrollType: up ? 'bottom' : 'top',
30764 scrollColumn: null,
30765 focusIndex: scrollIndex,
30766 focusColumn: gridCell.column
30767 });
30768 setTimeout(function () {
30769 var focusIndex = _this.getNextFocusIndexForAutoHeight(gridCell, up);
30770 _this.navigateTo({
30771 scrollIndex: scrollIndex,
30772 scrollType: up ? 'bottom' : 'top',
30773 scrollColumn: null,
30774 focusIndex: focusIndex,
30775 focusColumn: gridCell.column
30776 });
30777 }, 50);
30778 };
30779 NavigationService.prototype.getNextFocusIndexForAutoHeight = function (gridCell, up) {
30780 if (up === void 0) { up = false; }
30781 var _a;
30782 var step = up ? -1 : 1;
30783 var pixelsInOnePage = this.getViewportHeight();
30784 var lastRowIndex = this.paginationProxy.getPageLastRow();
30785 var pixelSum = 0;
30786 var currentIndex = gridCell.rowIndex;
30787 while (currentIndex >= 0 && currentIndex <= lastRowIndex) {
30788 var currentCell = this.paginationProxy.getRow(currentIndex);
30789 if (currentCell) {
30790 var currentCellHeight = (_a = currentCell.rowHeight, (_a !== null && _a !== void 0 ? _a : 0));
30791 if (pixelSum + currentCellHeight > pixelsInOnePage) {
30792 break;
30793 }
30794 pixelSum += currentCellHeight;
30795 }
30796 currentIndex += step;
30797 }
30798 return Math.max(0, Math.min(currentIndex, lastRowIndex));
30799 };
30800 NavigationService.prototype.getViewportHeight = function () {
30801 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
30802 var scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();
30803 var scrollbarWidth = this.gridOptionsWrapper.getScrollbarWidth();
30804 var pixelsInOnePage = scrollPosition.bottom - scrollPosition.top;
30805 if (this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()) {
30806 pixelsInOnePage -= scrollbarWidth;
30807 }
30808 return pixelsInOnePage;
30809 };
30810 NavigationService.prototype.isRowTallerThanView = function (rowIndex) {
30811 var rowNode = this.paginationProxy.getRow(rowIndex);
30812 if (!rowNode) {
30813 return false;
30814 }
30815 var rowHeight = rowNode.rowHeight;
30816 if (typeof rowHeight !== 'number') {
30817 return false;
30818 }
30819 return rowHeight > this.getViewportHeight();
30820 };
30821 NavigationService.prototype.onCtrlUpDownLeftRight = function (key, gridCell) {
30822 var cellToFocus = this.cellNavigationService.getNextCellToFocus(key, gridCell, true);
30823 var rowIndex = cellToFocus.rowIndex, column = cellToFocus.column;
30824 this.navigateTo({
30825 scrollIndex: rowIndex,
30826 scrollType: null,
30827 scrollColumn: column,
30828 focusIndex: rowIndex,
30829 focusColumn: column
30830 });
30831 };
30832 // home brings focus to top left cell, end brings focus to bottom right, grid scrolled to bring
30833 // same cell into view (which means either scroll all the way up, or all the way down).
30834 NavigationService.prototype.onHomeOrEndKey = function (key) {
30835 var homeKey = key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_HOME;
30836 var allColumns = this.columnModel.getAllDisplayedColumns();
30837 var columnToSelect = homeKey ? allColumns[0] : Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(allColumns);
30838 var scrollIndex = homeKey ? this.paginationProxy.getPageFirstRow() : this.paginationProxy.getPageLastRow();
30839 this.navigateTo({
30840 scrollIndex: scrollIndex,
30841 scrollType: null,
30842 scrollColumn: columnToSelect,
30843 focusIndex: scrollIndex,
30844 focusColumn: columnToSelect
30845 });
30846 };
30847 // result of keyboard event
30848 NavigationService.prototype.onTabKeyDown = function (previous, keyboardEvent) {
30849 var backwards = keyboardEvent.shiftKey;
30850 var movedToNextCell = this.tabToNextCellCommon(previous, backwards, keyboardEvent);
30851 if (movedToNextCell) {
30852 // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default
30853 // to the normal tabbing so user can exit the grid.
30854 keyboardEvent.preventDefault();
30855 return;
30856 }
30857 // if we didn't move to next cell, then need to tab out of the cells, ie to the header (if going
30858 // backwards)
30859 if (backwards) {
30860 var _a = previous.getRowPosition(), rowIndex = _a.rowIndex, rowPinned = _a.rowPinned;
30861 var firstRow = rowPinned ? rowIndex === 0 : rowIndex === this.paginationProxy.getPageFirstRow();
30862 if (firstRow) {
30863 keyboardEvent.preventDefault();
30864 this.focusService.focusLastHeader(keyboardEvent);
30865 }
30866 }
30867 else {
30868 // if the case it's a popup editor, the focus is on the editor and not the previous cell.
30869 // in order for the tab navigation to work, we need to focus the browser back onto the
30870 // previous cell.
30871 if (previous instanceof _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_5__["CellCtrl"]) {
30872 previous.focusCell(true);
30873 }
30874 if (this.focusService.focusNextGridCoreContainer(backwards)) {
30875 keyboardEvent.preventDefault();
30876 }
30877 }
30878 };
30879 // comes from API
30880 NavigationService.prototype.tabToNextCell = function (backwards, event) {
30881 var focusedCell = this.focusService.getFocusedCell();
30882 // if no focus, then cannot navigate
30883 if (!focusedCell) {
30884 return false;
30885 }
30886 var cellOrRow = this.getCellByPosition(focusedCell);
30887 // if cell is not rendered, means user has scrolled away from the cell
30888 // or that the focusedCell is a Full Width Row
30889 if (!cellOrRow) {
30890 cellOrRow = this.rowRenderer.getRowByPosition(focusedCell);
30891 if (!cellOrRow || !cellOrRow.isFullWidth()) {
30892 return false;
30893 }
30894 }
30895 return this.tabToNextCellCommon(cellOrRow, backwards, event);
30896 };
30897 NavigationService.prototype.tabToNextCellCommon = function (previous, backwards, event) {
30898 var editing = previous.isEditing();
30899 // if cell is not editing, there is still chance row is editing if it's Full Row Editing
30900 if (!editing && previous instanceof _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_5__["CellCtrl"]) {
30901 var cell = previous;
30902 var row = cell.getRowCtrl();
30903 if (row) {
30904 editing = row.isEditing();
30905 }
30906 }
30907 var res;
30908 if (editing) {
30909 // if we are editing, we know it's not a Full Width Row (RowComp)
30910 if (this.gridOptionsWrapper.isFullRowEdit()) {
30911 res = this.moveToNextEditingRow(previous, backwards, event);
30912 }
30913 else {
30914 res = this.moveToNextEditingCell(previous, backwards, event);
30915 }
30916 }
30917 else {
30918 res = this.moveToNextCellNotEditing(previous, backwards);
30919 }
30920 // if a cell wasn't found, it's possible that focus was moved to the header
30921 return res || !!this.focusService.getFocusedHeader();
30922 };
30923 NavigationService.prototype.moveToNextEditingCell = function (previousCell, backwards, event) {
30924 if (event === void 0) { event = null; }
30925 var previousPos = previousCell.getCellPosition();
30926 // need to do this before getting next cell to edit, in case the next cell
30927 // has editable function (eg colDef.editable=func() ) and it depends on the
30928 // result of this cell, so need to save updates from the first edit, in case
30929 // the value is referenced in the function.
30930 previousCell.stopEditing();
30931 // find the next cell to start editing
30932 var nextCell = this.findNextCellToFocusOn(previousPos, backwards, true);
30933 if (nextCell == null) {
30934 return false;
30935 }
30936 // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default
30937 // to the normal tabbing so user can exit the grid.
30938 nextCell.startEditing(null, null, true, event);
30939 nextCell.focusCell(false);
30940 return true;
30941 };
30942 NavigationService.prototype.moveToNextEditingRow = function (previousCell, backwards, event) {
30943 if (event === void 0) { event = null; }
30944 var previousPos = previousCell.getCellPosition();
30945 // find the next cell to start editing
30946 var nextCell = this.findNextCellToFocusOn(previousPos, backwards, true);
30947 if (nextCell == null) {
30948 return false;
30949 }
30950 var nextPos = nextCell.getCellPosition();
30951 var previousEditable = this.isCellEditable(previousPos);
30952 var nextEditable = this.isCellEditable(nextPos);
30953 var rowsMatch = nextPos && previousPos.rowIndex === nextPos.rowIndex && previousPos.rowPinned === nextPos.rowPinned;
30954 if (previousEditable) {
30955 previousCell.setFocusOutOnEditor();
30956 }
30957 if (!rowsMatch) {
30958 var pRow = previousCell.getRowCtrl();
30959 pRow.stopEditing();
30960 var nRow = nextCell.getRowCtrl();
30961 nRow.startRowEditing(undefined, undefined, undefined, event);
30962 }
30963 if (nextEditable) {
30964 nextCell.setFocusInOnEditor();
30965 nextCell.focusCell();
30966 }
30967 else {
30968 nextCell.focusCell(true);
30969 }
30970 return true;
30971 };
30972 NavigationService.prototype.moveToNextCellNotEditing = function (previousCell, backwards) {
30973 var displayedColumns = this.columnModel.getAllDisplayedColumns();
30974 var cellPos;
30975 if (previousCell instanceof _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_6__["RowCtrl"]) {
30976 cellPos = __assign(__assign({}, previousCell.getRowPosition()), { column: backwards ? displayedColumns[0] : Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(displayedColumns) });
30977 }
30978 else {
30979 cellPos = previousCell.getCellPosition();
30980 }
30981 // find the next cell to start editing
30982 var nextCell = this.findNextCellToFocusOn(cellPos, backwards, false);
30983 // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default
30984 // to the normal tabbing so user can exit the grid.
30985 if (nextCell instanceof _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_5__["CellCtrl"]) {
30986 nextCell.focusCell(true);
30987 }
30988 else if (nextCell) {
30989 return this.tryToFocusFullWidthRow(nextCell.getRowPosition(), backwards);
30990 }
30991 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(nextCell);
30992 };
30993 // called by the cell, when tab is pressed while editing.
30994 // @return: RenderedCell when navigation successful, otherwise null
30995 NavigationService.prototype.findNextCellToFocusOn = function (previousPosition, backwards, startEditing) {
30996 var nextPosition = previousPosition;
30997 while (true) {
30998 if (previousPosition !== nextPosition) {
30999 previousPosition = nextPosition;
31000 }
31001 if (!backwards) {
31002 nextPosition = this.getLastCellOfColSpan(nextPosition);
31003 }
31004 nextPosition = this.cellNavigationService.getNextTabbedCell(nextPosition, backwards);
31005 // allow user to override what cell to go to next
31006 var userFunc = this.gridOptionsWrapper.getTabToNextCellFunc();
31007 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(userFunc)) {
31008 var params = {
31009 backwards: backwards,
31010 editing: startEditing,
31011 previousCellPosition: previousPosition,
31012 nextCellPosition: nextPosition ? nextPosition : null
31013 };
31014 var userCell = userFunc(params);
31015 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(userCell)) {
31016 if (userCell.floating) {
31017 Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["doOnce"])(function () { console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"); }, 'no floating in userCell');
31018 userCell.rowPinned = userCell.floating;
31019 }
31020 nextPosition = {
31021 rowIndex: userCell.rowIndex,
31022 column: userCell.column,
31023 rowPinned: userCell.rowPinned
31024 };
31025 }
31026 else {
31027 nextPosition = null;
31028 }
31029 }
31030 // if no 'next cell', means we have got to last cell of grid, so nothing to move to,
31031 // so bottom right cell going forwards, or top left going backwards
31032 if (!nextPosition) {
31033 return null;
31034 }
31035 if (nextPosition.rowIndex < 0) {
31036 var headerLen = this.headerNavigationService.getHeaderRowCount();
31037 this.focusService.focusHeaderPosition({
31038 headerPosition: {
31039 headerRowIndex: headerLen + (nextPosition.rowIndex),
31040 column: nextPosition.column
31041 }
31042 });
31043 return null;
31044 }
31045 // if editing, but cell not editable, skip cell. we do this before we do all of
31046 // the 'ensure index visible' and 'flush all frames', otherwise if we are skipping
31047 // a bunch of cells (eg 10 rows) then all the work on ensuring cell visible is useless
31048 // (except for the last one) which causes grid to stall for a while.
31049 // note - for full row edit, we do focus non-editable cells, as the row stays in edit mode.
31050 var fullRowEdit = this.gridOptionsWrapper.isFullRowEdit();
31051 if (startEditing && !fullRowEdit) {
31052 var cellIsEditable = this.isCellEditable(nextPosition);
31053 if (!cellIsEditable) {
31054 continue;
31055 }
31056 }
31057 this.ensureCellVisible(nextPosition);
31058 // we have to call this after ensureColumnVisible - otherwise it could be a virtual column
31059 // or row that is not currently in view, hence the renderedCell would not exist
31060 var nextCell = this.getCellByPosition(nextPosition);
31061 // if next cell is fullWidth row, then no rendered cell,
31062 // as fullWidth rows have no cells, so we skip it
31063 if (!nextCell) {
31064 var row = this.rowRenderer.getRowByPosition(nextPosition);
31065 if (!row || !row.isFullWidth()) {
31066 continue;
31067 }
31068 else {
31069 return row;
31070 }
31071 }
31072 if (nextCell.isSuppressNavigable()) {
31073 continue;
31074 }
31075 // by default, when we click a cell, it gets selected into a range, so to keep keyboard navigation
31076 // consistent, we set into range here also.
31077 if (this.rangeService) {
31078 this.rangeService.setRangeToCell(nextPosition);
31079 }
31080 // we successfully tabbed onto a grid cell, so return true
31081 return nextCell;
31082 }
31083 };
31084 NavigationService.prototype.isCellEditable = function (cell) {
31085 var rowNode = this.lookupRowNodeForCell(cell);
31086 if (rowNode) {
31087 return cell.column.isCellEditable(rowNode);
31088 }
31089 return false;
31090 };
31091 NavigationService.prototype.getCellByPosition = function (cellPosition) {
31092 var rowCtrl = this.rowRenderer.getRowByPosition(cellPosition);
31093 if (!rowCtrl) {
31094 return null;
31095 }
31096 return rowCtrl.getCellCtrl(cellPosition.column);
31097 };
31098 NavigationService.prototype.lookupRowNodeForCell = function (cell) {
31099 if (cell.rowPinned === _constants_constants__WEBPACK_IMPORTED_MODULE_8__["Constants"].PINNED_TOP) {
31100 return this.pinnedRowModel.getPinnedTopRow(cell.rowIndex);
31101 }
31102 if (cell.rowPinned === _constants_constants__WEBPACK_IMPORTED_MODULE_8__["Constants"].PINNED_BOTTOM) {
31103 return this.pinnedRowModel.getPinnedBottomRow(cell.rowIndex);
31104 }
31105 return this.paginationProxy.getRow(cell.rowIndex);
31106 };
31107 // we use index for rows, but column object for columns, as the next column (by index) might not
31108 // be visible (header grouping) so it's not reliable, so using the column object instead.
31109 NavigationService.prototype.navigateToNextCell = function (event, key, currentCell, allowUserOverride) {
31110 // we keep searching for a next cell until we find one. this is how the group rows get skipped
31111 var nextCell = currentCell;
31112 var hitEdgeOfGrid = false;
31113 while (nextCell && (nextCell === currentCell || !this.isValidNavigateCell(nextCell))) {
31114 // if the current cell is spanning across multiple columns, we need to move
31115 // our current position to be the last cell on the right before finding the
31116 // the next target.
31117 if (this.gridOptionsWrapper.isEnableRtl()) {
31118 if (key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].LEFT) {
31119 nextCell = this.getLastCellOfColSpan(nextCell);
31120 }
31121 }
31122 else if (key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].RIGHT) {
31123 nextCell = this.getLastCellOfColSpan(nextCell);
31124 }
31125 nextCell = this.cellNavigationService.getNextCellToFocus(key, nextCell);
31126 // eg if going down, and nextCell=undefined, means we are gone past the last row
31127 hitEdgeOfGrid = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["missing"])(nextCell);
31128 }
31129 if (hitEdgeOfGrid && event && event.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].UP) {
31130 nextCell = {
31131 rowIndex: -1,
31132 rowPinned: null,
31133 column: currentCell.column
31134 };
31135 }
31136 // allow user to override what cell to go to next. when doing normal cell navigation (with keys)
31137 // we allow this, however if processing 'enter after edit' we don't allow override
31138 if (allowUserOverride) {
31139 var userFunc = this.gridOptionsWrapper.getNavigateToNextCellFunc();
31140 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(userFunc)) {
31141 var params = {
31142 key: key,
31143 previousCellPosition: currentCell,
31144 nextCellPosition: nextCell ? nextCell : null,
31145 event: event
31146 };
31147 var userCell = userFunc(params);
31148 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(userCell)) {
31149 if (userCell.floating) {
31150 Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["doOnce"])(function () { console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"); }, 'no floating in userCell');
31151 userCell.rowPinned = userCell.floating;
31152 }
31153 nextCell = {
31154 rowPinned: userCell.rowPinned,
31155 rowIndex: userCell.rowIndex,
31156 column: userCell.column
31157 };
31158 }
31159 else {
31160 nextCell = null;
31161 }
31162 }
31163 }
31164 // no next cell means we have reached a grid boundary, eg left, right, top or bottom of grid
31165 if (!nextCell) {
31166 return;
31167 }
31168 if (nextCell.rowIndex < 0) {
31169 var headerLen = this.headerNavigationService.getHeaderRowCount();
31170 this.focusService.focusHeaderPosition({
31171 headerPosition: { headerRowIndex: headerLen + (nextCell.rowIndex), column: currentCell.column },
31172 event: event || undefined
31173 });
31174 return;
31175 }
31176 // in case we have col spanning we get the cellComp and use it to get the
31177 // position. This was we always focus the first cell inside the spanning.
31178 var normalisedPosition = this.getNormalisedPosition(nextCell);
31179 if (normalisedPosition) {
31180 this.focusPosition(normalisedPosition);
31181 }
31182 else {
31183 this.tryToFocusFullWidthRow(nextCell);
31184 }
31185 };
31186 NavigationService.prototype.getNormalisedPosition = function (cellPosition) {
31187 // ensureCellVisible first, to make sure cell at position is rendered.
31188 this.ensureCellVisible(cellPosition);
31189 var cellComp = this.getCellByPosition(cellPosition);
31190 // not guaranteed to have a cellComp when using the SSRM as blocks are loading.
31191 if (!cellComp) {
31192 return null;
31193 }
31194 cellPosition = cellComp.getCellPosition();
31195 // we call this again, as nextCell can be different to it's previous value due to Column Spanning
31196 // (ie if cursor moving from right to left, and cell is spanning columns, then nextCell was the
31197 // last column in the group, however now it's the first column in the group). if we didn't do
31198 // ensureCellVisible again, then we could only be showing the last portion (last column) of the
31199 // merged cells.
31200 this.ensureCellVisible(cellPosition);
31201 return cellPosition;
31202 };
31203 NavigationService.prototype.tryToFocusFullWidthRow = function (position, backwards) {
31204 if (backwards === void 0) { backwards = false; }
31205 var displayedColumns = this.columnModel.getAllDisplayedColumns();
31206 var rowComp = this.rowRenderer.getRowByPosition(position);
31207 if (!rowComp || !rowComp.isFullWidth()) {
31208 return false;
31209 }
31210 var currentCellFocused = this.focusService.getFocusedCell();
31211 var cellPosition = {
31212 rowIndex: position.rowIndex,
31213 rowPinned: position.rowPinned,
31214 column: position.column || (backwards ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(displayedColumns) : displayedColumns[0])
31215 };
31216 this.focusPosition(cellPosition);
31217 var fromBelow = currentCellFocused != null ? this.rowPositionUtils.before(cellPosition, currentCellFocused) : false;
31218 var focusEvent = {
31219 type: _eventKeys__WEBPACK_IMPORTED_MODULE_9__["Events"].EVENT_FULL_WIDTH_ROW_FOCUSED,
31220 api: this.gridApi,
31221 columnApi: this.columnApi,
31222 rowIndex: cellPosition.rowIndex,
31223 rowPinned: cellPosition.rowPinned,
31224 column: cellPosition.column,
31225 isFullWidthCell: true,
31226 floating: cellPosition.rowPinned,
31227 fromBelow: fromBelow
31228 };
31229 this.eventService.dispatchEvent(focusEvent);
31230 return true;
31231 };
31232 NavigationService.prototype.focusPosition = function (cellPosition) {
31233 this.focusService.setFocusedCell(cellPosition.rowIndex, cellPosition.column, cellPosition.rowPinned, true);
31234 if (this.rangeService) {
31235 this.rangeService.setRangeToCell(cellPosition);
31236 }
31237 };
31238 NavigationService.prototype.isValidNavigateCell = function (cell) {
31239 var rowNode = this.rowPositionUtils.getRowNode(cell);
31240 // we do not allow focusing on detail rows and full width rows
31241 return !!rowNode;
31242 };
31243 NavigationService.prototype.getLastCellOfColSpan = function (cell) {
31244 var cellCtrl = this.getCellByPosition(cell);
31245 if (!cellCtrl) {
31246 return cell;
31247 }
31248 var colSpanningList = cellCtrl.getColSpanningList();
31249 if (colSpanningList.length === 1) {
31250 return cell;
31251 }
31252 return {
31253 rowIndex: cell.rowIndex,
31254 column: Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(colSpanningList),
31255 rowPinned: cell.rowPinned
31256 };
31257 };
31258 NavigationService.prototype.ensureCellVisible = function (gridCell) {
31259 // this scrolls the row into view
31260 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["missing"])(gridCell.rowPinned)) {
31261 this.gridBodyCon.getScrollFeature().ensureIndexVisible(gridCell.rowIndex);
31262 }
31263 if (!gridCell.column.isPinned()) {
31264 this.gridBodyCon.getScrollFeature().ensureColumnVisible(gridCell.column);
31265 }
31266 // need to nudge the scrolls for the floating items. otherwise when we set focus on a non-visible
31267 // floating cell, the scrolls get out of sync
31268 this.gridBodyCon.getScrollFeature().horizontallyScrollHeaderCenterAndFloatingCenter();
31269 // need to flush frames, to make sure the correct cells are rendered
31270 this.animationFrameService.flushAllFrames();
31271 };
31272 __decorate([
31273 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
31274 ], NavigationService.prototype, "columnApi", void 0);
31275 __decorate([
31276 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
31277 ], NavigationService.prototype, "gridApi", void 0);
31278 __decorate([
31279 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('mouseEventService')
31280 ], NavigationService.prototype, "mouseEventService", void 0);
31281 __decorate([
31282 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
31283 ], NavigationService.prototype, "paginationProxy", void 0);
31284 __decorate([
31285 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
31286 ], NavigationService.prototype, "focusService", void 0);
31287 __decorate([
31288 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('animationFrameService')
31289 ], NavigationService.prototype, "animationFrameService", void 0);
31290 __decorate([
31291 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('rangeService')
31292 ], NavigationService.prototype, "rangeService", void 0);
31293 __decorate([
31294 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
31295 ], NavigationService.prototype, "columnModel", void 0);
31296 __decorate([
31297 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
31298 ], NavigationService.prototype, "ctrlsService", void 0);
31299 __decorate([
31300 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
31301 ], NavigationService.prototype, "rowRenderer", void 0);
31302 __decorate([
31303 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('headerNavigationService')
31304 ], NavigationService.prototype, "headerNavigationService", void 0);
31305 __decorate([
31306 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("rowPositionUtils")
31307 ], NavigationService.prototype, "rowPositionUtils", void 0);
31308 __decorate([
31309 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("cellNavigationService")
31310 ], NavigationService.prototype, "cellNavigationService", void 0);
31311 __decorate([
31312 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("pinnedRowModel")
31313 ], NavigationService.prototype, "pinnedRowModel", void 0);
31314 __decorate([
31315 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
31316 ], NavigationService.prototype, "postConstruct", null);
31317 NavigationService = __decorate([
31318 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('navigationService')
31319 ], NavigationService);
31320 return NavigationService;
31321}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
31322
31323
31324
31325
31326
31327/***/ }),
31328/* 140 */
31329/***/ (function(module, __webpack_exports__, __webpack_require__) {
31330
31331"use strict";
31332__webpack_require__.r(__webpack_exports__);
31333/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerComp", function() { return RowContainerComp; });
31334/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
31335/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
31336/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
31337/* harmony import */ var _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(118);
31338/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
31339/* harmony import */ var _rendering_row_rowComp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(141);
31340/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13);
31341/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(44);
31342/**
31343 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
31344 * @version v27.3.0
31345 * @link https://www.ag-grid.com/
31346 * @license MIT
31347 */
31348var __extends = (undefined && undefined.__extends) || (function () {
31349 var extendStatics = function (d, b) {
31350 extendStatics = Object.setPrototypeOf ||
31351 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31352 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
31353 return extendStatics(d, b);
31354 };
31355 return function (d, b) {
31356 extendStatics(d, b);
31357 function __() { this.constructor = d; }
31358 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31359 };
31360})();
31361var __assign = (undefined && undefined.__assign) || function () {
31362 __assign = Object.assign || function(t) {
31363 for (var s, i = 1, n = arguments.length; i < n; i++) {
31364 s = arguments[i];
31365 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
31366 t[p] = s[p];
31367 }
31368 return t;
31369 };
31370 return __assign.apply(this, arguments);
31371};
31372var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
31373 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
31374 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
31375 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
31376 return c > 3 && r && Object.defineProperty(target, key, r), r;
31377};
31378
31379
31380
31381
31382
31383
31384
31385
31386function templateFactory() {
31387 var name = _widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"].elementGettingCreated.getAttribute('name');
31388 var cssClasses = _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerCtrl"].getRowContainerCssClasses(name);
31389 var res;
31390 var template1 = name === _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerName"].CENTER;
31391 var template2 = name === _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerName"].TOP_CENTER || name === _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerName"].BOTTOM_CENTER;
31392 if (template1) {
31393 res = /* html */
31394 "<div class=\"" + cssClasses.wrapper + "\" ref=\"eWrapper\" role=\"presentation\">\n <div class=\"" + cssClasses.viewport + "\" ref=\"eViewport\" role=\"presentation\">\n <div class=\"" + cssClasses.container + "\" ref=\"eContainer\"></div>\n </div>\n </div>";
31395 }
31396 else if (template2) {
31397 res = /* html */
31398 "<div class=\"" + cssClasses.viewport + "\" ref=\"eViewport\" role=\"presentation\">\n <div class=\"" + cssClasses.container + "\" ref=\"eContainer\"></div>\n </div>";
31399 }
31400 else {
31401 res = /* html */
31402 "<div class=\"" + cssClasses.container + "\" ref=\"eContainer\"></div>";
31403 }
31404 return res;
31405}
31406var RowContainerComp = /** @class */ (function (_super) {
31407 __extends(RowContainerComp, _super);
31408 function RowContainerComp() {
31409 var _this = _super.call(this, templateFactory()) || this;
31410 _this.rowComps = {};
31411 _this.name = _widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"].elementGettingCreated.getAttribute('name');
31412 _this.type = Object(_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["getRowContainerTypeForName"])(_this.name);
31413 return _this;
31414 }
31415 RowContainerComp.prototype.postConstruct = function () {
31416 var _this = this;
31417 var compProxy = {
31418 setViewportHeight: function (height) { return _this.eViewport.style.height = height; },
31419 setRowCtrls: function (rowCtrls) { return _this.setRowCtrls(rowCtrls); },
31420 setDomOrder: function (domOrder) {
31421 _this.domOrder = domOrder;
31422 },
31423 setContainerWidth: function (width) { return _this.eContainer.style.width = width; }
31424 };
31425 var ctrl = this.createManagedBean(new _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerCtrl"](this.name));
31426 ctrl.setComp(compProxy, this.eContainer, this.eViewport, this.eWrapper);
31427 };
31428 RowContainerComp.prototype.preDestroy = function () {
31429 // destroys all row comps
31430 this.setRowCtrls([]);
31431 };
31432 RowContainerComp.prototype.setRowCtrls = function (rowCtrls) {
31433 var _this = this;
31434 var oldRows = __assign({}, this.rowComps);
31435 this.rowComps = {};
31436 this.lastPlacedElement = null;
31437 var processRow = function (rowCon) {
31438 var instanceId = rowCon.getInstanceId();
31439 var existingRowComp = oldRows[instanceId];
31440 if (existingRowComp) {
31441 _this.rowComps[instanceId] = existingRowComp;
31442 delete oldRows[instanceId];
31443 _this.ensureDomOrder(existingRowComp.getGui());
31444 }
31445 else {
31446 var rowComp = _this.newRowComp(rowCon);
31447 _this.rowComps[instanceId] = rowComp;
31448 _this.appendRow(rowComp.getGui());
31449 }
31450 };
31451 rowCtrls.forEach(processRow);
31452 Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["getAllValuesInObject"])(oldRows).forEach(function (oldRowComp) {
31453 _this.eContainer.removeChild(oldRowComp.getGui());
31454 oldRowComp.destroy();
31455 });
31456 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaRole"])(this.eContainer, rowCtrls.length ? "rowgroup" : "presentation");
31457 };
31458 RowContainerComp.prototype.appendRow = function (element) {
31459 if (this.domOrder) {
31460 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["insertWithDomOrder"])(this.eContainer, element, this.lastPlacedElement);
31461 }
31462 else {
31463 this.eContainer.appendChild(element);
31464 }
31465 this.lastPlacedElement = element;
31466 };
31467 RowContainerComp.prototype.ensureDomOrder = function (eRow) {
31468 if (this.domOrder) {
31469 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["ensureDomOrder"])(this.eContainer, eRow, this.lastPlacedElement);
31470 this.lastPlacedElement = eRow;
31471 }
31472 };
31473 RowContainerComp.prototype.newRowComp = function (rowCtrl) {
31474 var pinned = _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerCtrl"].getPinned(this.name);
31475 var res = new _rendering_row_rowComp__WEBPACK_IMPORTED_MODULE_5__["RowComp"](rowCtrl, this.beans, this.type);
31476 return res;
31477 };
31478 __decorate([
31479 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('beans')
31480 ], RowContainerComp.prototype, "beans", void 0);
31481 __decorate([
31482 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eViewport')
31483 ], RowContainerComp.prototype, "eViewport", void 0);
31484 __decorate([
31485 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eContainer')
31486 ], RowContainerComp.prototype, "eContainer", void 0);
31487 __decorate([
31488 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eWrapper')
31489 ], RowContainerComp.prototype, "eWrapper", void 0);
31490 __decorate([
31491 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
31492 ], RowContainerComp.prototype, "postConstruct", null);
31493 __decorate([
31494 _context_context__WEBPACK_IMPORTED_MODULE_2__["PreDestroy"]
31495 ], RowContainerComp.prototype, "preDestroy", null);
31496 return RowContainerComp;
31497}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
31498
31499
31500
31501
31502
31503/***/ }),
31504/* 141 */
31505/***/ (function(module, __webpack_exports__, __webpack_require__) {
31506
31507"use strict";
31508__webpack_require__.r(__webpack_exports__);
31509/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowComp", function() { return RowComp; });
31510/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
31511/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42);
31512/* harmony import */ var _cell_cellComp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(142);
31513/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
31514/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(44);
31515/**
31516 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
31517 * @version v27.3.0
31518 * @link https://www.ag-grid.com/
31519 * @license MIT
31520 */
31521var __extends = (undefined && undefined.__extends) || (function () {
31522 var extendStatics = function (d, b) {
31523 extendStatics = Object.setPrototypeOf ||
31524 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31525 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
31526 return extendStatics(d, b);
31527 };
31528 return function (d, b) {
31529 extendStatics(d, b);
31530 function __() { this.constructor = d; }
31531 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31532 };
31533})();
31534
31535
31536
31537
31538
31539var RowComp = /** @class */ (function (_super) {
31540 __extends(RowComp, _super);
31541 function RowComp(ctrl, beans, containerType) {
31542 var _this = _super.call(this) || this;
31543 _this.cellComps = {};
31544 _this.beans = beans;
31545 _this.rowCtrl = ctrl;
31546 _this.setTemplate(/* html */ "<div comp-id=\"" + _this.getCompId() + "\" style=\"" + _this.getInitialStyle() + "\"/>");
31547 var eGui = _this.getGui();
31548 var style = eGui.style;
31549 var compProxy = {
31550 setDomOrder: function (domOrder) { return _this.domOrder = domOrder; },
31551 setCellCtrls: function (cellCtrls) { return _this.setCellCtrls(cellCtrls); },
31552 showFullWidth: function (compDetails) { return _this.showFullWidth(compDetails); },
31553 getFullWidthCellRenderer: function () { return _this.getFullWidthCellRenderer(); },
31554 addOrRemoveCssClass: function (name, on) { return _this.addOrRemoveCssClass(name, on); },
31555 setUserStyles: function (styles) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["addStylesToElement"])(eGui, styles); },
31556 setTop: function (top) { return style.top = top; },
31557 setTransform: function (transform) { return style.transform = transform; },
31558 setRowIndex: function (rowIndex) { return eGui.setAttribute('row-index', rowIndex); },
31559 setRole: function (role) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_4__["setAriaRole"])(eGui, role); },
31560 setRowId: function (rowId) { return eGui.setAttribute('row-id', rowId); },
31561 setRowBusinessKey: function (businessKey) { return eGui.setAttribute('row-business-key', businessKey); },
31562 setTabIndex: function (tabIndex) { return eGui.setAttribute('tabindex', tabIndex.toString()); }
31563 };
31564 ctrl.setComp(compProxy, _this.getGui(), containerType);
31565 return _this;
31566 }
31567 RowComp.prototype.getInitialStyle = function () {
31568 var transform = this.rowCtrl.getInitialTransform();
31569 var top = this.rowCtrl.getInitialRowTop();
31570 return transform ? "transform: " + transform : "top: " + top;
31571 };
31572 RowComp.prototype.showFullWidth = function (compDetails) {
31573 var _this = this;
31574 var callback = function (cellRenderer) {
31575 if (_this.isAlive()) {
31576 var eGui = cellRenderer.getGui();
31577 _this.getGui().appendChild(eGui);
31578 _this.rowCtrl.setupDetailRowAutoHeight(eGui);
31579 _this.setFullWidthRowComp(cellRenderer);
31580 }
31581 else {
31582 _this.beans.context.destroyBean(cellRenderer);
31583 }
31584 };
31585 // if not in cache, create new one
31586 var res = compDetails.newAgStackInstance();
31587 if (!res) {
31588 return;
31589 }
31590 res.then(callback);
31591 };
31592 RowComp.prototype.setCellCtrls = function (cellCtrls) {
31593 var _this = this;
31594 var cellsToRemove = Object.assign({}, this.cellComps);
31595 cellCtrls.forEach(function (cellCtrl) {
31596 var key = cellCtrl.getInstanceId();
31597 var existingCellComp = _this.cellComps[key];
31598 if (existingCellComp == null) {
31599 _this.newCellComp(cellCtrl);
31600 }
31601 else {
31602 cellsToRemove[key] = null;
31603 }
31604 });
31605 var cellCompsToRemove = Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["getAllValuesInObject"])(cellsToRemove)
31606 .filter(function (cellComp) { return cellComp != null; });
31607 this.destroyCells(cellCompsToRemove);
31608 this.ensureDomOrder(cellCtrls);
31609 };
31610 RowComp.prototype.ensureDomOrder = function (cellCtrls) {
31611 var _this = this;
31612 if (!this.domOrder) {
31613 return;
31614 }
31615 var elementsInOrder = [];
31616 cellCtrls.forEach(function (cellCtrl) {
31617 var cellComp = _this.cellComps[cellCtrl.getInstanceId()];
31618 if (cellComp) {
31619 elementsInOrder.push(cellComp.getGui());
31620 }
31621 });
31622 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDomChildOrder"])(this.getGui(), elementsInOrder);
31623 };
31624 RowComp.prototype.newCellComp = function (cellCtrl) {
31625 var cellComp = new _cell_cellComp__WEBPACK_IMPORTED_MODULE_2__["CellComp"](this.beans, cellCtrl, this.rowCtrl.isPrintLayout(), this.getGui(), this.rowCtrl.isEditing());
31626 this.cellComps[cellCtrl.getInstanceId()] = cellComp;
31627 this.getGui().appendChild(cellComp.getGui());
31628 };
31629 RowComp.prototype.destroy = function () {
31630 _super.prototype.destroy.call(this);
31631 this.destroyAllCells();
31632 };
31633 RowComp.prototype.destroyAllCells = function () {
31634 var cellsToDestroy = Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["getAllValuesInObject"])(this.cellComps).filter(function (cp) { return cp != null; });
31635 this.destroyCells(cellsToDestroy);
31636 };
31637 RowComp.prototype.setFullWidthRowComp = function (fullWidthRowComponent) {
31638 var _this = this;
31639 if (this.fullWidthCellRenderer) {
31640 console.error('AG Grid - should not be setting fullWidthRowComponent twice');
31641 }
31642 this.fullWidthCellRenderer = fullWidthRowComponent;
31643 this.addDestroyFunc(function () {
31644 _this.fullWidthCellRenderer = _this.beans.context.destroyBean(_this.fullWidthCellRenderer);
31645 });
31646 };
31647 RowComp.prototype.getFullWidthCellRenderer = function () {
31648 return this.fullWidthCellRenderer;
31649 };
31650 RowComp.prototype.destroyCells = function (cellComps) {
31651 var _this = this;
31652 cellComps.forEach(function (cellComp) {
31653 // could be old reference, ie removed cell
31654 if (!cellComp) {
31655 return;
31656 }
31657 // check cellComp belongs in this container
31658 var instanceId = cellComp.getCtrl().getInstanceId();
31659 if (_this.cellComps[instanceId] !== cellComp) {
31660 return;
31661 }
31662 cellComp.detach();
31663 cellComp.destroy();
31664 _this.cellComps[instanceId] = null;
31665 });
31666 };
31667 return RowComp;
31668}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
31669
31670
31671
31672
31673
31674/***/ }),
31675/* 142 */
31676/***/ (function(module, __webpack_exports__, __webpack_require__) {
31677
31678"use strict";
31679__webpack_require__.r(__webpack_exports__);
31680/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellComp", function() { return CellComp; });
31681/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
31682/* harmony import */ var _cellEditors_popupEditorWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(143);
31683/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44);
31684/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
31685/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
31686/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42);
31687/**
31688 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
31689 * @version v27.3.0
31690 * @link https://www.ag-grid.com/
31691 * @license MIT
31692 */
31693var __extends = (undefined && undefined.__extends) || (function () {
31694 var extendStatics = function (d, b) {
31695 extendStatics = Object.setPrototypeOf ||
31696 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31697 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
31698 return extendStatics(d, b);
31699 };
31700 return function (d, b) {
31701 extendStatics(d, b);
31702 function __() { this.constructor = d; }
31703 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31704 };
31705})();
31706
31707
31708
31709
31710
31711
31712var CellComp = /** @class */ (function (_super) {
31713 __extends(CellComp, _super);
31714 function CellComp(beans, cellCtrl, printLayout, eRow, editingRow) {
31715 var _this = _super.call(this) || this;
31716 // every time we go into edit mode, or back again, this gets incremented.
31717 // it's the components way of dealing with the async nature of framework components,
31718 // so if a framework component takes a while to be created, we know if the object
31719 // is still relevant when creating is finished. eg we could click edit / un-edit 20
31720 // times before the first React edit component comes back - we should discard
31721 // the first 19.
31722 _this.rendererVersion = 0;
31723 _this.editorVersion = 0;
31724 _this.beans = beans;
31725 _this.column = cellCtrl.getColumn();
31726 _this.rowNode = cellCtrl.getRowNode();
31727 _this.rowCtrl = cellCtrl.getRowCtrl();
31728 _this.eRow = eRow;
31729 _this.setTemplate(/* html */ "<div comp-id=\"" + _this.getCompId() + "\"/>");
31730 var eGui = _this.getGui();
31731 _this.forceWrapper = cellCtrl.isForceWrapper();
31732 _this.refreshWrapper(false);
31733 var setAttribute = function (name, value, element) {
31734 var actualElement = element ? element : eGui;
31735 if (value != null && value != '') {
31736 actualElement.setAttribute(name, value);
31737 }
31738 else {
31739 actualElement.removeAttribute(name);
31740 }
31741 };
31742 var compProxy = {
31743 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
31744 setUserStyles: function (styles) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["addStylesToElement"])(eGui, styles); },
31745 getFocusableElement: function () { return _this.getFocusableElement(); },
31746 setTabIndex: function (tabIndex) { return setAttribute('tabindex', tabIndex.toString()); },
31747 setRole: function (role) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaRole"])(eGui, role); },
31748 setColId: function (colId) { return setAttribute('col-id', colId); },
31749 setTitle: function (title) { return setAttribute('title', title); },
31750 setIncludeSelection: function (include) { return _this.includeSelection = include; },
31751 setIncludeRowDrag: function (include) { return _this.includeRowDrag = include; },
31752 setIncludeDndSource: function (include) { return _this.includeDndSource = include; },
31753 setRenderDetails: function (compDetails, valueToDisplay, force) {
31754 return _this.setRenderDetails(compDetails, valueToDisplay, force);
31755 },
31756 setEditDetails: function (compDetails, popup, position) {
31757 return _this.setEditDetails(compDetails, popup, position);
31758 },
31759 getCellEditor: function () { return _this.cellEditor || null; },
31760 getCellRenderer: function () { return _this.cellRenderer || null; },
31761 getParentOfValue: function () { return _this.getParentOfValue(); }
31762 };
31763 _this.cellCtrl = cellCtrl;
31764 cellCtrl.setComp(compProxy, _this.getGui(), _this.eCellWrapper, printLayout, editingRow);
31765 return _this;
31766 }
31767 CellComp.prototype.getParentOfValue = function () {
31768 if (this.eCellValue) {
31769 // if not editing, and using wrapper, then value goes in eCellValue
31770 return this.eCellValue;
31771 }
31772 if (this.eCellWrapper) {
31773 // if editing, and using wrapper, value (cell editor) goes in eCellWrapper
31774 return this.eCellWrapper;
31775 }
31776 // if editing or rendering, and not using wrapper, value (or comp) is directly inside cell
31777 return this.getGui();
31778 };
31779 CellComp.prototype.setRenderDetails = function (compDetails, valueToDisplay, forceNewCellRendererInstance) {
31780 // this can happen if the users asks for the cell to refresh, but we are not showing the vale as we are editing
31781 var isInlineEditing = this.cellEditor && !this.cellEditorPopupWrapper;
31782 if (isInlineEditing) {
31783 return;
31784 }
31785 // this means firstRender will be true for one pass only, as it's initialised to undefined
31786 this.firstRender = this.firstRender == null;
31787 // if display template has changed, means any previous Cell Renderer is in the wrong location
31788 var controlWrapperChanged = this.refreshWrapper(false);
31789 // all of these have dependencies on the eGui, so only do them after eGui is set
31790 if (compDetails) {
31791 var neverRefresh = forceNewCellRendererInstance || controlWrapperChanged;
31792 var cellRendererRefreshSuccessful = neverRefresh ? false : this.refreshCellRenderer(compDetails);
31793 if (!cellRendererRefreshSuccessful) {
31794 this.destroyRenderer();
31795 this.createCellRendererInstance(compDetails);
31796 }
31797 }
31798 else {
31799 this.destroyRenderer();
31800 this.insertValueWithoutCellRenderer(valueToDisplay);
31801 }
31802 };
31803 CellComp.prototype.setEditDetails = function (compDetails, popup, position) {
31804 if (compDetails) {
31805 this.createCellEditorInstance(compDetails, popup, position);
31806 }
31807 else {
31808 this.destroyEditor();
31809 }
31810 };
31811 CellComp.prototype.removeControls = function () {
31812 this.checkboxSelectionComp = this.beans.context.destroyBean(this.checkboxSelectionComp);
31813 this.dndSourceComp = this.beans.context.destroyBean(this.dndSourceComp);
31814 this.rowDraggingComp = this.beans.context.destroyBean(this.rowDraggingComp);
31815 };
31816 // returns true if wrapper was changed
31817 CellComp.prototype.refreshWrapper = function (editing) {
31818 var providingControls = this.includeRowDrag || this.includeDndSource || this.includeSelection;
31819 var usingWrapper = providingControls || this.forceWrapper;
31820 var putWrapperIn = usingWrapper && this.eCellWrapper == null;
31821 if (putWrapperIn) {
31822 this.eCellWrapper = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["loadTemplate"])("<div class=\"ag-cell-wrapper\" role=\"presentation\"></div>");
31823 this.getGui().appendChild(this.eCellWrapper);
31824 }
31825 var takeWrapperOut = !usingWrapper && this.eCellWrapper != null;
31826 if (takeWrapperOut) {
31827 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.eCellWrapper);
31828 this.eCellWrapper = undefined;
31829 }
31830 this.addOrRemoveCssClass('ag-cell-value', !usingWrapper);
31831 var usingCellValue = !editing && usingWrapper;
31832 var putCellValueIn = usingCellValue && this.eCellValue == null;
31833 if (putCellValueIn) {
31834 this.eCellValue = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["loadTemplate"])("<span class=\"ag-cell-value\" role=\"presentation\"></span>");
31835 this.eCellWrapper.appendChild(this.eCellValue);
31836 }
31837 var takeCellValueOut = !usingCellValue && this.eCellValue != null;
31838 if (takeCellValueOut) {
31839 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.eCellValue);
31840 this.eCellValue = undefined;
31841 }
31842 var templateChanged = putWrapperIn || takeWrapperOut || putCellValueIn || takeCellValueOut;
31843 if (templateChanged) {
31844 this.removeControls();
31845 }
31846 if (!editing && providingControls) {
31847 this.addControls();
31848 }
31849 return templateChanged;
31850 };
31851 CellComp.prototype.addControls = function () {
31852 var id = this.eCellValue.id = "cell-" + this.getCompId();
31853 var describedByIds = [];
31854 if (this.includeRowDrag) {
31855 if (this.rowDraggingComp == null) {
31856 this.rowDraggingComp = this.cellCtrl.createRowDragComp();
31857 if (this.rowDraggingComp) {
31858 // put the checkbox in before the value
31859 this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(), this.eCellValue);
31860 }
31861 }
31862 }
31863 if (this.includeDndSource) {
31864 if (this.dndSourceComp == null) {
31865 this.dndSourceComp = this.cellCtrl.createDndSource();
31866 // put the checkbox in before the value
31867 this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(), this.eCellValue);
31868 }
31869 }
31870 if (this.includeSelection) {
31871 if (this.checkboxSelectionComp == null) {
31872 this.checkboxSelectionComp = this.cellCtrl.createSelectionCheckbox();
31873 this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(), this.eCellValue);
31874 }
31875 describedByIds.push(this.checkboxSelectionComp.getCheckboxId());
31876 }
31877 describedByIds.push(id);
31878 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaDescribedBy"])(this.getGui(), describedByIds.join(' '));
31879 };
31880 CellComp.prototype.createCellEditorInstance = function (compDetails, popup, position) {
31881 var _this = this;
31882 var versionCopy = this.editorVersion;
31883 var cellEditorPromise = compDetails.newAgStackInstance();
31884 if (!cellEditorPromise) {
31885 return;
31886 } // if empty, userComponentFactory already did a console message
31887 var params = compDetails.params;
31888 cellEditorPromise.then(function (c) { return _this.afterCellEditorCreated(versionCopy, c, params, popup, position); });
31889 // if we don't do this, and editor component is async, then there will be a period
31890 // when the component isn't present and keyboard navigation won't work - so example
31891 // of user hitting tab quickly (more quickly than renderers getting created) won't work
31892 var cellEditorAsync = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(this.cellEditor);
31893 if (cellEditorAsync && params.cellStartedEdit) {
31894 this.cellCtrl.focusCell(true);
31895 }
31896 };
31897 CellComp.prototype.insertValueWithoutCellRenderer = function (valueToDisplay) {
31898 var eParent = this.getParentOfValue();
31899 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["clearElement"])(eParent);
31900 var escapedValue = valueToDisplay != null ? Object(_utils_string__WEBPACK_IMPORTED_MODULE_3__["escapeString"])(valueToDisplay) : null;
31901 if (escapedValue != null) {
31902 eParent.innerHTML = escapedValue;
31903 }
31904 };
31905 CellComp.prototype.destroyEditorAndRenderer = function () {
31906 this.destroyRenderer();
31907 this.destroyEditor();
31908 };
31909 CellComp.prototype.destroyRenderer = function () {
31910 var context = this.beans.context;
31911 this.cellRenderer = context.destroyBean(this.cellRenderer);
31912 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.cellRendererGui);
31913 this.cellRendererGui = null;
31914 this.rendererVersion++;
31915 };
31916 CellComp.prototype.destroyEditor = function () {
31917 var context = this.beans.context;
31918 if (this.hideEditorPopup) {
31919 this.hideEditorPopup();
31920 }
31921 this.hideEditorPopup = undefined;
31922 this.cellEditor = context.destroyBean(this.cellEditor);
31923 this.cellEditorPopupWrapper = context.destroyBean(this.cellEditorPopupWrapper);
31924 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.cellEditorGui);
31925 this.cellEditorGui = null;
31926 this.editorVersion++;
31927 };
31928 CellComp.prototype.refreshCellRenderer = function (compClassAndParams) {
31929 if (this.cellRenderer == null || this.cellRenderer.refresh == null) {
31930 return false;
31931 }
31932 // if different Cell Renderer configured this time (eg user is using selector, and
31933 // returns different component) then don't refresh, force recreate of Cell Renderer
31934 if (this.cellRendererClass !== compClassAndParams.componentClass) {
31935 return false;
31936 }
31937 // take any custom params off of the user
31938 var result = this.cellRenderer.refresh(compClassAndParams.params);
31939 // NOTE on undefined: previous version of the cellRenderer.refresh() interface
31940 // returned nothing, if the method existed, we assumed it refreshed. so for
31941 // backwards compatibility, we assume if method exists and returns nothing,
31942 // that it was successful.
31943 return result === true || result === undefined;
31944 };
31945 CellComp.prototype.createCellRendererInstance = function (compDetails) {
31946 var _this = this;
31947 // never use task service if angularCompileRows=true, as that assume the cell renderers
31948 // are finished when the row is created. also we never use it if animation frame service
31949 // is turned off.
31950 // and lastly we never use it if doing auto-height, as the auto-height service checks the
31951 // row height directly after the cell is created, it doesn't wait around for the tasks to complete
31952 var angularCompileRows = this.beans.gridOptionsWrapper.isAngularCompileRows();
31953 var suppressAnimationFrame = this.beans.gridOptionsWrapper.isSuppressAnimationFrame();
31954 var useTaskService = !angularCompileRows && !suppressAnimationFrame;
31955 var displayComponentVersionCopy = this.rendererVersion;
31956 var componentClass = compDetails.componentClass;
31957 var createCellRendererFunc = function () {
31958 var staleTask = _this.rendererVersion !== displayComponentVersionCopy || !_this.isAlive();
31959 if (staleTask) {
31960 return;
31961 }
31962 // this can return null in the event that the user has switched from a renderer component to nothing, for example
31963 // when using a cellRendererSelect to return a component or null depending on row data etc
31964 var componentPromise = compDetails.newAgStackInstance();
31965 var callback = _this.afterCellRendererCreated.bind(_this, displayComponentVersionCopy, componentClass);
31966 if (componentPromise) {
31967 componentPromise.then(callback);
31968 }
31969 };
31970 // we only use task service when rendering for first time, which means it is not used when doing edits.
31971 // if we changed this (always use task service) would make sense, however it would break tests, possibly
31972 // test of users.
31973 if (useTaskService && this.firstRender) {
31974 this.beans.animationFrameService.createTask(createCellRendererFunc, this.rowNode.rowIndex, 'createTasksP2');
31975 }
31976 else {
31977 createCellRendererFunc();
31978 }
31979 };
31980 CellComp.prototype.getCtrl = function () {
31981 return this.cellCtrl;
31982 };
31983 CellComp.prototype.getRowCtrl = function () {
31984 return this.rowCtrl;
31985 };
31986 CellComp.prototype.getCellRenderer = function () {
31987 return this.cellRenderer;
31988 };
31989 CellComp.prototype.getCellEditor = function () {
31990 return this.cellEditor;
31991 };
31992 CellComp.prototype.afterCellRendererCreated = function (cellRendererVersion, cellRendererClass, cellRenderer) {
31993 var staleTask = !this.isAlive() || cellRendererVersion !== this.rendererVersion;
31994 if (staleTask) {
31995 this.beans.context.destroyBean(cellRenderer);
31996 return;
31997 }
31998 this.cellRenderer = cellRenderer;
31999 this.cellRendererClass = cellRendererClass;
32000 this.cellRendererGui = this.cellRenderer.getGui();
32001 if (this.cellRendererGui != null) {
32002 var eParent = this.getParentOfValue();
32003 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["clearElement"])(eParent);
32004 eParent.appendChild(this.cellRendererGui);
32005 }
32006 };
32007 CellComp.prototype.afterCellEditorCreated = function (requestVersion, cellEditor, params, popup, position) {
32008 // if editingCell=false, means user cancelled the editor before component was ready.
32009 // if versionMismatch, then user cancelled the edit, then started the edit again, and this
32010 // is the first editor which is now stale.
32011 var staleComp = requestVersion !== this.editorVersion;
32012 if (staleComp) {
32013 this.beans.context.destroyBean(cellEditor);
32014 return;
32015 }
32016 var editingCancelledByUserComp = cellEditor.isCancelBeforeStart && cellEditor.isCancelBeforeStart();
32017 if (editingCancelledByUserComp) {
32018 this.beans.context.destroyBean(cellEditor);
32019 this.cellCtrl.stopEditing();
32020 return;
32021 }
32022 if (!cellEditor.getGui) {
32023 console.warn("AG Grid: cellEditor for column " + this.column.getId() + " is missing getGui() method");
32024 this.beans.context.destroyBean(cellEditor);
32025 return;
32026 }
32027 this.cellEditor = cellEditor;
32028 this.cellEditorGui = cellEditor.getGui();
32029 var cellEditorInPopup = popup || (cellEditor.isPopup !== undefined && cellEditor.isPopup());
32030 if (cellEditorInPopup) {
32031 if (!popup) {
32032 this.cellCtrl.hackSayEditingInPopup();
32033 }
32034 this.addPopupCellEditor(params, position);
32035 }
32036 else {
32037 this.addInCellEditor();
32038 }
32039 if (cellEditor.afterGuiAttached) {
32040 cellEditor.afterGuiAttached();
32041 }
32042 };
32043 CellComp.prototype.addInCellEditor = function () {
32044 var eGui = this.getGui();
32045 // if focus is inside the cell, we move focus to the cell itself
32046 // before removing it's contents, otherwise errors could be thrown.
32047 var eDocument = this.beans.gridOptionsWrapper.getDocument();
32048 if (eGui.contains(eDocument.activeElement)) {
32049 eGui.focus();
32050 }
32051 this.destroyRenderer();
32052 this.refreshWrapper(true);
32053 this.clearParentOfValue();
32054 if (this.cellEditorGui) {
32055 var eParent = this.getParentOfValue();
32056 eParent.appendChild(this.cellEditorGui);
32057 }
32058 };
32059 CellComp.prototype.addPopupCellEditor = function (params, position) {
32060 var _this = this;
32061 if (this.beans.gridOptionsWrapper.isFullRowEdit()) {
32062 console.warn('AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both ' +
32063 '- either turn off fullRowEdit, or stop using popup editors.');
32064 }
32065 var cellEditor = this.cellEditor;
32066 // if a popup, then we wrap in a popup editor and return the popup
32067 this.cellEditorPopupWrapper = this.beans.context.createBean(new _cellEditors_popupEditorWrapper__WEBPACK_IMPORTED_MODULE_1__["PopupEditorWrapper"](params));
32068 var ePopupGui = this.cellEditorPopupWrapper.getGui();
32069 if (this.cellEditorGui) {
32070 ePopupGui.appendChild(this.cellEditorGui);
32071 }
32072 var popupService = this.beans.popupService;
32073 var useModelPopup = this.beans.gridOptionsWrapper.isStopEditingWhenCellsLoseFocus();
32074 // see if position provided by colDef, if not then check old way of method on cellComp
32075 var positionToUse = position != null ? position : cellEditor.getPopupPosition ? cellEditor.getPopupPosition() : 'over';
32076 var positionParams = {
32077 column: this.column,
32078 rowNode: this.rowNode,
32079 type: 'popupCellEditor',
32080 eventSource: this.getGui(),
32081 ePopup: ePopupGui,
32082 keepWithinBounds: true
32083 };
32084 var positionCallback = positionToUse === 'under' ?
32085 popupService.positionPopupUnderComponent.bind(popupService, positionParams)
32086 : popupService.positionPopupOverComponent.bind(popupService, positionParams);
32087 var translate = this.beans.gridOptionsWrapper.getLocaleTextFunc();
32088 var addPopupRes = popupService.addPopup({
32089 modal: useModelPopup,
32090 eChild: ePopupGui,
32091 closeOnEsc: true,
32092 closedCallback: function () { _this.cellCtrl.onPopupEditorClosed(); },
32093 anchorToElement: this.getGui(),
32094 positionCallback: positionCallback,
32095 ariaLabel: translate('ariaLabelCellEditor', 'Cell Editor')
32096 });
32097 if (addPopupRes) {
32098 this.hideEditorPopup = addPopupRes.hideFunc;
32099 }
32100 };
32101 CellComp.prototype.detach = function () {
32102 this.eRow.removeChild(this.getGui());
32103 };
32104 // if the row is also getting destroyed, then we don't need to remove from dom,
32105 // as the row will also get removed, so no need to take out the cells from the row
32106 // if the row is going (removing is an expensive operation, so only need to remove
32107 // the top part)
32108 //
32109 // note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.
32110 CellComp.prototype.destroy = function () {
32111 this.cellCtrl.stopEditing();
32112 this.destroyEditorAndRenderer();
32113 this.removeControls();
32114 _super.prototype.destroy.call(this);
32115 };
32116 CellComp.prototype.clearParentOfValue = function () {
32117 var eGui = this.getGui();
32118 // if focus is inside the cell, we move focus to the cell itself
32119 // before removing it's contents, otherwise errors could be thrown.
32120 var eDocument = this.beans.gridOptionsWrapper.getDocument();
32121 if (eGui.contains(eDocument.activeElement)) {
32122 eGui.focus({
32123 preventScroll: true
32124 });
32125 }
32126 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["clearElement"])(this.getParentOfValue());
32127 };
32128 return CellComp;
32129}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
32130
32131
32132
32133
32134
32135/***/ }),
32136/* 143 */
32137/***/ (function(module, __webpack_exports__, __webpack_require__) {
32138
32139"use strict";
32140__webpack_require__.r(__webpack_exports__);
32141/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupEditorWrapper", function() { return PopupEditorWrapper; });
32142/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85);
32143/* harmony import */ var _utils_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
32144/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
32145/**
32146 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32147 * @version v27.3.0
32148 * @link https://www.ag-grid.com/
32149 * @license MIT
32150 */
32151var __extends = (undefined && undefined.__extends) || (function () {
32152 var extendStatics = function (d, b) {
32153 extendStatics = Object.setPrototypeOf ||
32154 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32155 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
32156 return extendStatics(d, b);
32157 };
32158 return function (d, b) {
32159 extendStatics(d, b);
32160 function __() { this.constructor = d; }
32161 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32162 };
32163})();
32164var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32165 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32166 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32167 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
32168 return c > 3 && r && Object.defineProperty(target, key, r), r;
32169};
32170
32171
32172
32173var PopupEditorWrapper = /** @class */ (function (_super) {
32174 __extends(PopupEditorWrapper, _super);
32175 function PopupEditorWrapper(params) {
32176 var _this = _super.call(this, /* html */ "<div class=\"ag-popup-editor\" tabindex=\"-1\"/>") || this;
32177 _this.params = params;
32178 return _this;
32179 }
32180 PopupEditorWrapper.prototype.postConstruct = function () {
32181 this.gridOptionsWrapper.setDomData(this.getGui(), PopupEditorWrapper.DOM_KEY_POPUP_EDITOR_WRAPPER, true);
32182 this.addKeyDownListener();
32183 };
32184 PopupEditorWrapper.prototype.addKeyDownListener = function () {
32185 var _this = this;
32186 var eGui = this.getGui();
32187 var params = this.params;
32188 var listener = function (event) {
32189 if (!Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_1__["isUserSuppressingKeyboardEvent"])(_this.gridOptionsWrapper, event, params.node, params.column, true)) {
32190 params.onKeyDown(event);
32191 }
32192 };
32193 this.addManagedListener(eGui, 'keydown', listener);
32194 };
32195 PopupEditorWrapper.DOM_KEY_POPUP_EDITOR_WRAPPER = 'popupEditorWrapper';
32196 __decorate([
32197 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
32198 ], PopupEditorWrapper.prototype, "postConstruct", null);
32199 return PopupEditorWrapper;
32200}(_widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__["PopupComponent"]));
32201
32202
32203
32204
32205
32206/***/ }),
32207/* 144 */
32208/***/ (function(module, __webpack_exports__, __webpack_require__) {
32209
32210"use strict";
32211__webpack_require__.r(__webpack_exports__);
32212/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BodyDropPivotTarget", function() { return BodyDropPivotTarget; });
32213/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97);
32214/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
32215/**
32216 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32217 * @version v27.3.0
32218 * @link https://www.ag-grid.com/
32219 * @license MIT
32220 */
32221var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32222 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32223 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32224 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
32225 return c > 3 && r && Object.defineProperty(target, key, r), r;
32226};
32227
32228
32229var BodyDropPivotTarget = /** @class */ (function () {
32230 function BodyDropPivotTarget(pinned) {
32231 this.columnsToAggregate = [];
32232 this.columnsToGroup = [];
32233 this.columnsToPivot = [];
32234 this.pinned = pinned;
32235 }
32236 /** Callback for when drag enters */
32237 BodyDropPivotTarget.prototype.onDragEnter = function (draggingEvent) {
32238 var _this = this;
32239 this.clearColumnsList();
32240 // in pivot mode, we don't accept any drops if functions are read only
32241 if (this.gridOptionsWrapper.isFunctionsReadOnly()) {
32242 return;
32243 }
32244 var dragColumns = draggingEvent.dragItem.columns;
32245 if (!dragColumns) {
32246 return;
32247 }
32248 dragColumns.forEach(function (column) {
32249 // we don't allow adding secondary columns
32250 if (!column.isPrimary()) {
32251 return;
32252 }
32253 if (column.isAnyFunctionActive()) {
32254 return;
32255 }
32256 if (column.isAllowValue()) {
32257 _this.columnsToAggregate.push(column);
32258 }
32259 else if (column.isAllowRowGroup()) {
32260 _this.columnsToGroup.push(column);
32261 }
32262 else if (column.isAllowPivot()) {
32263 _this.columnsToPivot.push(column);
32264 }
32265 });
32266 };
32267 BodyDropPivotTarget.prototype.getIconName = function () {
32268 var totalColumns = this.columnsToAggregate.length + this.columnsToGroup.length + this.columnsToPivot.length;
32269 if (totalColumns > 0) {
32270 return this.pinned ? _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragAndDropService"].ICON_PINNED : _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragAndDropService"].ICON_MOVE;
32271 }
32272 return null;
32273 };
32274 /** Callback for when drag leaves */
32275 BodyDropPivotTarget.prototype.onDragLeave = function (draggingEvent) {
32276 // if we are taking columns out of the center, then we remove them from the report
32277 this.clearColumnsList();
32278 };
32279 BodyDropPivotTarget.prototype.clearColumnsList = function () {
32280 this.columnsToAggregate.length = 0;
32281 this.columnsToGroup.length = 0;
32282 this.columnsToPivot.length = 0;
32283 };
32284 /** Callback for when dragging */
32285 BodyDropPivotTarget.prototype.onDragging = function (draggingEvent) {
32286 };
32287 /** Callback for when drag stops */
32288 BodyDropPivotTarget.prototype.onDragStop = function (draggingEvent) {
32289 if (this.columnsToAggregate.length > 0) {
32290 this.columnModel.addValueColumns(this.columnsToAggregate, "toolPanelDragAndDrop");
32291 }
32292 if (this.columnsToGroup.length > 0) {
32293 this.columnModel.addRowGroupColumns(this.columnsToGroup, "toolPanelDragAndDrop");
32294 }
32295 if (this.columnsToPivot.length > 0) {
32296 this.columnModel.addPivotColumns(this.columnsToPivot, "toolPanelDragAndDrop");
32297 }
32298 };
32299 __decorate([
32300 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
32301 ], BodyDropPivotTarget.prototype, "columnModel", void 0);
32302 __decorate([
32303 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptionsWrapper')
32304 ], BodyDropPivotTarget.prototype, "gridOptionsWrapper", void 0);
32305 return BodyDropPivotTarget;
32306}());
32307
32308
32309
32310
32311
32312/***/ }),
32313/* 145 */
32314/***/ (function(module, __webpack_exports__, __webpack_require__) {
32315
32316"use strict";
32317__webpack_require__.r(__webpack_exports__);
32318/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BodyDropTarget", function() { return BodyDropTarget; });
32319/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97);
32320/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
32321/* harmony import */ var _moveColumnFeature__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(146);
32322/* harmony import */ var _bodyDropPivotTarget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(144);
32323/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15);
32324/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20);
32325/**
32326 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32327 * @version v27.3.0
32328 * @link https://www.ag-grid.com/
32329 * @license MIT
32330 */
32331var __extends = (undefined && undefined.__extends) || (function () {
32332 var extendStatics = function (d, b) {
32333 extendStatics = Object.setPrototypeOf ||
32334 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32335 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
32336 return extendStatics(d, b);
32337 };
32338 return function (d, b) {
32339 extendStatics(d, b);
32340 function __() { this.constructor = d; }
32341 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32342 };
32343})();
32344var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32345 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32346 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32347 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
32348 return c > 3 && r && Object.defineProperty(target, key, r), r;
32349};
32350
32351
32352
32353
32354
32355
32356var BodyDropTarget = /** @class */ (function (_super) {
32357 __extends(BodyDropTarget, _super);
32358 function BodyDropTarget(pinned, eContainer) {
32359 var _this = _super.call(this) || this;
32360 _this.pinned = pinned;
32361 _this.eContainer = eContainer;
32362 return _this;
32363 }
32364 BodyDropTarget.prototype.postConstruct = function () {
32365 var _this = this;
32366 this.ctrlsService.whenReady(function (p) {
32367 switch (_this.pinned) {
32368 case _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].PINNED_LEFT:
32369 _this.eSecondaryContainers = [
32370 [p.gridBodyCtrl.getBodyViewportElement(), p.leftRowContainerCtrl.getContainerElement()],
32371 [p.bottomLeftRowContainerCtrl.getContainerElement()],
32372 [p.topLeftRowContainerCtrl.getContainerElement()]
32373 ];
32374 break;
32375 case _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].PINNED_RIGHT:
32376 _this.eSecondaryContainers = [
32377 [p.gridBodyCtrl.getBodyViewportElement(), p.rightRowContainerCtrl.getContainerElement()],
32378 [p.bottomRightRowContainerCtrl.getContainerElement()],
32379 [p.topRightRowContainerCtrl.getContainerElement()]
32380 ];
32381 break;
32382 default:
32383 _this.eSecondaryContainers = [
32384 [p.gridBodyCtrl.getBodyViewportElement(), p.centerRowContainerCtrl.getViewportElement()],
32385 [p.bottomCenterRowContainerCtrl.getViewportElement()],
32386 [p.topCenterRowContainerCtrl.getViewportElement()]
32387 ];
32388 break;
32389 }
32390 });
32391 };
32392 BodyDropTarget.prototype.isInterestedIn = function (type) {
32393 return type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragSourceType"].HeaderCell ||
32394 (type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragSourceType"].ToolPanel && this.gridOptionsWrapper.isAllowDragFromColumnsToolPanel());
32395 };
32396 BodyDropTarget.prototype.getSecondaryContainers = function () {
32397 return this.eSecondaryContainers;
32398 };
32399 BodyDropTarget.prototype.getContainer = function () {
32400 return this.eContainer;
32401 };
32402 BodyDropTarget.prototype.init = function () {
32403 this.moveColumnFeature = this.createManagedBean(new _moveColumnFeature__WEBPACK_IMPORTED_MODULE_2__["MoveColumnFeature"](this.pinned, this.eContainer));
32404 this.bodyDropPivotTarget = this.createManagedBean(new _bodyDropPivotTarget__WEBPACK_IMPORTED_MODULE_3__["BodyDropPivotTarget"](this.pinned));
32405 this.dragAndDropService.addDropTarget(this);
32406 };
32407 BodyDropTarget.prototype.getIconName = function () {
32408 return this.currentDropListener.getIconName();
32409 };
32410 // we want to use the bodyPivotTarget if the user is dragging columns in from the toolPanel
32411 // and we are in pivot mode, as it has to logic to set pivot/value/group on the columns when
32412 // dropped into the grid's body.
32413 BodyDropTarget.prototype.isDropColumnInPivotMode = function (draggingEvent) {
32414 // in pivot mode, then if moving a column (ie didn't come from toolpanel) then it's
32415 // a standard column move, however if it came from the toolpanel, then we are introducing
32416 // dimensions or values to the grid
32417 return this.columnModel.isPivotMode() && draggingEvent.dragSource.type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragSourceType"].ToolPanel;
32418 };
32419 BodyDropTarget.prototype.onDragEnter = function (draggingEvent) {
32420 // we pick the drop listener depending on whether we are in pivot mode are not. if we are
32421 // in pivot mode, then dropping cols changes the row group, pivot, value stats. otherwise
32422 // we change visibility state and position.
32423 this.currentDropListener = this.isDropColumnInPivotMode(draggingEvent) ? this.bodyDropPivotTarget : this.moveColumnFeature;
32424 this.currentDropListener.onDragEnter(draggingEvent);
32425 };
32426 BodyDropTarget.prototype.onDragLeave = function (params) {
32427 this.currentDropListener.onDragLeave(params);
32428 };
32429 BodyDropTarget.prototype.onDragging = function (params) {
32430 this.currentDropListener.onDragging(params);
32431 };
32432 BodyDropTarget.prototype.onDragStop = function (params) {
32433 this.currentDropListener.onDragStop(params);
32434 };
32435 __decorate([
32436 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragAndDropService')
32437 ], BodyDropTarget.prototype, "dragAndDropService", void 0);
32438 __decorate([
32439 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
32440 ], BodyDropTarget.prototype, "columnModel", void 0);
32441 __decorate([
32442 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
32443 ], BodyDropTarget.prototype, "ctrlsService", void 0);
32444 __decorate([
32445 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
32446 ], BodyDropTarget.prototype, "postConstruct", null);
32447 __decorate([
32448 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
32449 ], BodyDropTarget.prototype, "init", null);
32450 return BodyDropTarget;
32451}(_context_beanStub__WEBPACK_IMPORTED_MODULE_5__["BeanStub"]));
32452
32453
32454
32455
32456
32457/***/ }),
32458/* 146 */
32459/***/ (function(module, __webpack_exports__, __webpack_require__) {
32460
32461"use strict";
32462__webpack_require__.r(__webpack_exports__);
32463/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MoveColumnFeature", function() { return MoveColumnFeature; });
32464/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
32465/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
32466/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97);
32467/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
32468/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18);
32469/**
32470 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32471 * @version v27.3.0
32472 * @link https://www.ag-grid.com/
32473 * @license MIT
32474 */
32475var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32476 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32477 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32478 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
32479 return c > 3 && r && Object.defineProperty(target, key, r), r;
32480};
32481
32482
32483
32484
32485
32486var MoveColumnFeature = /** @class */ (function () {
32487 function MoveColumnFeature(pinned, eContainer) {
32488 this.needToMoveLeft = false;
32489 this.needToMoveRight = false;
32490 this.pinned = pinned;
32491 this.eContainer = eContainer;
32492 this.centerContainer = !Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(pinned);
32493 }
32494 MoveColumnFeature.prototype.init = function () {
32495 var _this = this;
32496 this.ctrlsService.whenReady(function () {
32497 _this.gridBodyCon = _this.ctrlsService.getGridBodyCtrl();
32498 });
32499 };
32500 MoveColumnFeature.prototype.getIconName = function () {
32501 return this.pinned ? _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_PINNED : _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_MOVE;
32502 };
32503 MoveColumnFeature.prototype.onDragEnter = function (draggingEvent) {
32504 // we do dummy drag, so make sure column appears in the right location when first placed
32505 var columns = draggingEvent.dragItem.columns;
32506 var dragCameFromToolPanel = draggingEvent.dragSource.type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragSourceType"].ToolPanel;
32507 if (dragCameFromToolPanel) {
32508 // the if statement doesn't work if drag leaves grid, then enters again
32509 this.setColumnsVisible(columns, true, "uiColumnDragged");
32510 }
32511 else {
32512 // restore previous state of visible columns upon re-entering. this means if the user drags
32513 // a group out, and then drags the group back in, only columns that were originally visible
32514 // will be visible again. otherwise a group with three columns (but only two visible) could
32515 // be dragged out, then when it's dragged in again, all three are visible. this stops that.
32516 var visibleState_1 = draggingEvent.dragItem.visibleState;
32517 var visibleColumns = (columns || []).filter(function (column) { return visibleState_1[column.getId()]; });
32518 this.setColumnsVisible(visibleColumns, true, "uiColumnDragged");
32519 }
32520 this.setColumnsPinned(columns, this.pinned, "uiColumnDragged");
32521 this.onDragging(draggingEvent, true);
32522 };
32523 MoveColumnFeature.prototype.onDragLeave = function (draggingEvent) {
32524 var hideColumnOnExit = !this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns() && !draggingEvent.fromNudge;
32525 if (hideColumnOnExit) {
32526 var dragItem = draggingEvent.dragSource.getDragItem();
32527 var columns = dragItem.columns;
32528 this.setColumnsVisible(columns, false, "uiColumnDragged");
32529 }
32530 this.ensureIntervalCleared();
32531 };
32532 MoveColumnFeature.prototype.setColumnsVisible = function (columns, visible, source) {
32533 if (source === void 0) { source = "api"; }
32534 if (columns) {
32535 var allowedCols = columns.filter(function (c) { return !c.getColDef().lockVisible; });
32536 this.columnModel.setColumnsVisible(allowedCols, visible, source);
32537 }
32538 };
32539 MoveColumnFeature.prototype.setColumnsPinned = function (columns, pinned, source) {
32540 if (source === void 0) { source = "api"; }
32541 if (columns) {
32542 var allowedCols = columns.filter(function (c) { return !c.getColDef().lockPinned; });
32543 this.columnModel.setColumnsPinned(allowedCols, pinned, source);
32544 }
32545 };
32546 MoveColumnFeature.prototype.onDragStop = function () {
32547 this.ensureIntervalCleared();
32548 };
32549 MoveColumnFeature.prototype.normaliseX = function (x) {
32550 // flip the coordinate if doing RTL
32551 if (this.gridOptionsWrapper.isEnableRtl()) {
32552 var clientWidth = this.eContainer.clientWidth;
32553 x = clientWidth - x;
32554 }
32555 // adjust for scroll only if centre container (the pinned containers don't scroll)
32556 if (this.centerContainer) {
32557 x += this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft();
32558 }
32559 return x;
32560 };
32561 MoveColumnFeature.prototype.checkCenterForScrolling = function (xAdjustedForScroll) {
32562 if (this.centerContainer) {
32563 // scroll if the mouse has gone outside the grid (or just outside the scrollable part if pinning)
32564 // putting in 50 buffer, so even if user gets to edge of grid, a scroll will happen
32565 var firstVisiblePixel = this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft();
32566 var lastVisiblePixel = firstVisiblePixel + this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();
32567 if (this.gridOptionsWrapper.isEnableRtl()) {
32568 this.needToMoveRight = xAdjustedForScroll < (firstVisiblePixel + 50);
32569 this.needToMoveLeft = xAdjustedForScroll > (lastVisiblePixel - 50);
32570 }
32571 else {
32572 this.needToMoveLeft = xAdjustedForScroll < (firstVisiblePixel + 50);
32573 this.needToMoveRight = xAdjustedForScroll > (lastVisiblePixel - 50);
32574 }
32575 if (this.needToMoveLeft || this.needToMoveRight) {
32576 this.ensureIntervalStarted();
32577 }
32578 else {
32579 this.ensureIntervalCleared();
32580 }
32581 }
32582 };
32583 MoveColumnFeature.prototype.onDragging = function (draggingEvent, fromEnter) {
32584 var _this = this;
32585 if (fromEnter === void 0) { fromEnter = false; }
32586 this.lastDraggingEvent = draggingEvent;
32587 // if moving up or down (ie not left or right) then do nothing
32588 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(draggingEvent.hDirection)) {
32589 return;
32590 }
32591 var mouseXNormalised = this.normaliseX(draggingEvent.x);
32592 // if the user is dragging into the panel, ie coming from the side panel into the main grid,
32593 // we don't want to scroll the grid this time, it would appear like the table is jumping
32594 // each time a column is dragged in.
32595 if (!fromEnter) {
32596 this.checkCenterForScrolling(mouseXNormalised);
32597 }
32598 var hDirectionNormalised = this.normaliseDirection(draggingEvent.hDirection);
32599 var dragSourceType = draggingEvent.dragSource.type;
32600 var columnsToMove = draggingEvent.dragSource.getDragItem().columns;
32601 columnsToMove = columnsToMove.filter(function (col) {
32602 if (col.getColDef().lockPinned) {
32603 // if locked return true only if both col and container are same pin type.
32604 // double equals (==) here on purpose so that null==undefined is true (for not pinned options)
32605 return col.getPinned() == _this.pinned;
32606 }
32607 // if not pin locked, then always allowed to be in this container
32608 return true;
32609 });
32610 this.attemptMoveColumns(dragSourceType, columnsToMove, hDirectionNormalised, mouseXNormalised, fromEnter);
32611 };
32612 MoveColumnFeature.prototype.normaliseDirection = function (hDirection) {
32613 if (this.gridOptionsWrapper.isEnableRtl()) {
32614 switch (hDirection) {
32615 case _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["HorizontalDirection"].Left: return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["HorizontalDirection"].Right;
32616 case _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["HorizontalDirection"].Right: return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["HorizontalDirection"].Left;
32617 default: console.error("AG Grid: Unknown direction " + hDirection);
32618 }
32619 }
32620 else {
32621 return hDirection;
32622 }
32623 };
32624 // returns the index of the first column in the list ONLY if the cols are all beside
32625 // each other. if the cols are not beside each other, then returns null
32626 MoveColumnFeature.prototype.calculateOldIndex = function (movingCols) {
32627 var gridCols = this.columnModel.getAllGridColumns();
32628 var indexes = Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["sortNumerically"])(movingCols.map(function (col) { return gridCols.indexOf(col); }));
32629 var firstIndex = indexes[0];
32630 var lastIndex = Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(indexes);
32631 var spread = lastIndex - firstIndex;
32632 var gapsExist = spread !== indexes.length - 1;
32633 return gapsExist ? null : firstIndex;
32634 };
32635 MoveColumnFeature.prototype.attemptMoveColumns = function (dragSourceType, allMovingColumns, hDirection, mouseX, fromEnter) {
32636 var draggingLeft = hDirection === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["HorizontalDirection"].Left;
32637 var draggingRight = hDirection === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["HorizontalDirection"].Right;
32638 // it is important to sort the moving columns as they are in grid columns, as the list of moving columns
32639 // could themselves be part of 'married children' groups, which means we need to maintain the order within
32640 // the moving list.
32641 var allMovingColumnsOrdered = allMovingColumns.slice();
32642 this.columnModel.sortColumnsLikeGridColumns(allMovingColumnsOrdered);
32643 var validMoves = this.calculateValidMoves(allMovingColumnsOrdered, draggingRight, mouseX);
32644 // if cols are not adjacent, then this returns null. when moving, we constrain the direction of the move
32645 // (ie left or right) to the mouse direction. however
32646 var oldIndex = this.calculateOldIndex(allMovingColumnsOrdered);
32647 if (validMoves.length === 0) {
32648 return;
32649 }
32650 var firstValidMove = validMoves[0];
32651 // the two check below stop an error when the user grabs a group my a middle column, then
32652 // it is possible the mouse pointer is to the right of a column while been dragged left.
32653 // so we need to make sure that the mouse pointer is actually left of the left most column
32654 // if moving left, and right of the right most column if moving right
32655 // we check 'fromEnter' below so we move the column to the new spot if the mouse is coming from
32656 // outside the grid, eg if the column is moving from side panel, mouse is moving left, then we should
32657 // place the column to the RHS even if the mouse is moving left and the column is already on
32658 // the LHS. otherwise we stick to the rule described above.
32659 var constrainDirection = oldIndex !== null && !fromEnter;
32660 // don't consider 'fromEnter' when dragging header cells, otherwise group can jump to opposite direction of drag
32661 if (dragSourceType == _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragSourceType"].HeaderCell) {
32662 constrainDirection = oldIndex !== null;
32663 }
32664 if (constrainDirection) {
32665 // only allow left drag if this column is moving left
32666 if (draggingLeft && firstValidMove >= oldIndex) {
32667 return;
32668 }
32669 // only allow right drag if this column is moving right
32670 if (draggingRight && firstValidMove <= oldIndex) {
32671 return;
32672 }
32673 }
32674 for (var i = 0; i < validMoves.length; i++) {
32675 var move = validMoves[i];
32676 if (!this.columnModel.doesMovePassRules(allMovingColumnsOrdered, move)) {
32677 continue;
32678 }
32679 this.columnModel.moveColumns(allMovingColumnsOrdered, move, "uiColumnDragged");
32680 // important to return here, so once we do the first valid move, we don't try do any more
32681 return;
32682 }
32683 };
32684 MoveColumnFeature.prototype.calculateValidMoves = function (movingCols, draggingRight, mouseX) {
32685 var isMoveBlocked = this.gridOptionsWrapper.isSuppressMovableColumns() || movingCols.some(function (col) { return col.getColDef().suppressMovable; });
32686 if (isMoveBlocked) {
32687 return [];
32688 }
32689 // this is the list of cols on the screen, so it's these we use when comparing the x mouse position
32690 var allDisplayedCols = this.columnModel.getDisplayedColumns(this.pinned);
32691 // but this list is the list of all cols, when we move a col it's the index within this list that gets used,
32692 // so the result we return has to be and index location for this list
32693 var allGridCols = this.columnModel.getAllGridColumns();
32694 var movingDisplayedCols = allDisplayedCols.filter(function (col) { return Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["includes"])(movingCols, col); });
32695 var otherDisplayedCols = allDisplayedCols.filter(function (col) { return !Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["includes"])(movingCols, col); });
32696 var otherGridCols = allGridCols.filter(function (col) { return !Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["includes"])(movingCols, col); });
32697 // work out how many DISPLAYED columns fit before the 'x' position. this gives us the displayIndex.
32698 // for example, if cols are a,b,c,d and we find a,b fit before 'x', then we want to place the moving
32699 // col between b and c (so that it is under the mouse position).
32700 var displayIndex = 0;
32701 var availableWidth = mouseX;
32702 // if we are dragging right, then the columns will be to the left of the mouse, so we also want to
32703 // include the width of the moving columns
32704 if (draggingRight) {
32705 var widthOfMovingDisplayedCols_1 = 0;
32706 movingDisplayedCols.forEach(function (col) { return widthOfMovingDisplayedCols_1 += col.getActualWidth(); });
32707 availableWidth -= widthOfMovingDisplayedCols_1;
32708 }
32709 if (availableWidth > 0) {
32710 // now count how many of the displayed columns will fit to the left
32711 for (var i = 0; i < otherDisplayedCols.length; i++) {
32712 var col = otherDisplayedCols[i];
32713 availableWidth -= col.getActualWidth();
32714 if (availableWidth < 0) {
32715 break;
32716 }
32717 displayIndex++;
32718 }
32719 // trial and error, if going right, we adjust by one, i didn't manage to quantify why, but it works
32720 if (draggingRight) {
32721 displayIndex++;
32722 }
32723 }
32724 // the display index is with respect to all the showing columns, however when we move, it's with
32725 // respect to all grid columns, so we need to translate from display index to grid index
32726 var firstValidMove;
32727 if (displayIndex > 0) {
32728 var leftColumn = otherDisplayedCols[displayIndex - 1];
32729 firstValidMove = otherGridCols.indexOf(leftColumn) + 1;
32730 }
32731 else {
32732 firstValidMove = otherGridCols.indexOf(otherDisplayedCols[0]);
32733 if (firstValidMove === -1) {
32734 firstValidMove = 0;
32735 }
32736 }
32737 var validMoves = [firstValidMove];
32738 var numberComparator = function (a, b) { return a - b; };
32739 // add in other valid moves due to hidden columns and married children. for example, a particular
32740 // move might break a group that has married children (so move isn't valid), however there could
32741 // be hidden columns (not displayed) that we could jump over to make the move valid. because
32742 // they are hidden, user doesn't see any different, however it allows moves that would otherwise
32743 // not work. for example imagine a group with 9 columns and all columns are hidden except the
32744 // middle one (so 4 hidden to left, 4 hidden to right), then when moving 'firstValidMove' will
32745 // be relative to the not-shown column, however we need to consider the move jumping over all the
32746 // hidden children. if we didn't do this, then if the group just described was at the end (RHS) of the
32747 // grid, there would be no way to put a column after it (as the grid would only consider beside the
32748 // visible column, which would fail valid move rules).
32749 if (draggingRight) {
32750 // if dragging right, then we add all the additional moves to the right. so in other words
32751 // if the next move is not valid, find the next move to the right that is valid.
32752 var pointer = firstValidMove + 1;
32753 var lastIndex = allGridCols.length - 1;
32754 while (pointer <= lastIndex) {
32755 validMoves.push(pointer);
32756 pointer++;
32757 }
32758 // adding columns here means the order is now messed up
32759 validMoves.sort(numberComparator);
32760 }
32761 else {
32762 // if dragging left we do the reverse of dragging right, we add in all the valid moves to the
32763 // left. however we also have to consider moves to the right for all hidden columns first.
32764 // (this logic is hard to reason with, it was worked out with trial and error,
32765 // more observation rather than science).
32766 // add moves to the right
32767 var pointer = firstValidMove;
32768 var lastIndex = allGridCols.length - 1;
32769 var displacedCol = allGridCols[pointer];
32770 while (pointer <= lastIndex && this.isColumnHidden(allDisplayedCols, displacedCol)) {
32771 pointer++;
32772 validMoves.push(pointer);
32773 displacedCol = allGridCols[pointer];
32774 }
32775 // add moves to the left
32776 pointer = firstValidMove - 1;
32777 var firstDisplayIndex = 0;
32778 while (pointer >= firstDisplayIndex) {
32779 validMoves.push(pointer);
32780 pointer--;
32781 }
32782 // adding columns here means the order is now messed up
32783 validMoves.sort(numberComparator).reverse();
32784 }
32785 return validMoves;
32786 };
32787 // isHidden takes into account visible=false and group=closed, ie it is not displayed
32788 MoveColumnFeature.prototype.isColumnHidden = function (displayedColumns, col) {
32789 return displayedColumns.indexOf(col) < 0;
32790 };
32791 MoveColumnFeature.prototype.ensureIntervalStarted = function () {
32792 if (!this.movingIntervalId) {
32793 this.intervalCount = 0;
32794 this.failedMoveAttempts = 0;
32795 this.movingIntervalId = window.setInterval(this.moveInterval.bind(this), 100);
32796 if (this.needToMoveLeft) {
32797 this.dragAndDropService.setGhostIcon(_dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_LEFT, true);
32798 }
32799 else {
32800 this.dragAndDropService.setGhostIcon(_dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_RIGHT, true);
32801 }
32802 }
32803 };
32804 MoveColumnFeature.prototype.ensureIntervalCleared = function () {
32805 if (this.movingIntervalId) {
32806 window.clearInterval(this.movingIntervalId);
32807 this.movingIntervalId = null;
32808 this.dragAndDropService.setGhostIcon(_dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_MOVE);
32809 }
32810 };
32811 MoveColumnFeature.prototype.moveInterval = function () {
32812 // the amounts we move get bigger at each interval, so the speed accelerates, starting a bit slow
32813 // and getting faster. this is to give smoother user experience. we max at 100px to limit the speed.
32814 var pixelsToMove;
32815 this.intervalCount++;
32816 pixelsToMove = 10 + (this.intervalCount * 5);
32817 if (pixelsToMove > 100) {
32818 pixelsToMove = 100;
32819 }
32820 var pixelsMoved = null;
32821 var scrollFeature = this.gridBodyCon.getScrollFeature();
32822 if (this.needToMoveLeft) {
32823 pixelsMoved = scrollFeature.scrollHorizontally(-pixelsToMove);
32824 }
32825 else if (this.needToMoveRight) {
32826 pixelsMoved = scrollFeature.scrollHorizontally(pixelsToMove);
32827 }
32828 if (pixelsMoved !== 0) {
32829 this.onDragging(this.lastDraggingEvent);
32830 this.failedMoveAttempts = 0;
32831 }
32832 else {
32833 // we count the failed move attempts. if we fail to move 7 times, then we pin the column.
32834 // this is how we achieve pining by dragging the column to the edge of the grid.
32835 this.failedMoveAttempts++;
32836 var columns = this.lastDraggingEvent.dragItem.columns;
32837 var columnsThatCanPin = columns.filter(function (c) { return !c.getColDef().lockPinned; });
32838 if (columnsThatCanPin.length > 0) {
32839 this.dragAndDropService.setGhostIcon(_dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_PINNED);
32840 if (this.failedMoveAttempts > 7) {
32841 var pinType = this.needToMoveLeft ? _constants_constants__WEBPACK_IMPORTED_MODULE_1__["Constants"].PINNED_LEFT : _constants_constants__WEBPACK_IMPORTED_MODULE_1__["Constants"].PINNED_RIGHT;
32842 this.setColumnsPinned(columnsThatCanPin, pinType, "uiColumnDragged");
32843 this.dragAndDropService.nudge();
32844 }
32845 }
32846 }
32847 };
32848 __decorate([
32849 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
32850 ], MoveColumnFeature.prototype, "columnModel", void 0);
32851 __decorate([
32852 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('dragAndDropService')
32853 ], MoveColumnFeature.prototype, "dragAndDropService", void 0);
32854 __decorate([
32855 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridOptionsWrapper')
32856 ], MoveColumnFeature.prototype, "gridOptionsWrapper", void 0);
32857 __decorate([
32858 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
32859 ], MoveColumnFeature.prototype, "ctrlsService", void 0);
32860 __decorate([
32861 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
32862 ], MoveColumnFeature.prototype, "init", null);
32863 return MoveColumnFeature;
32864}());
32865
32866
32867
32868
32869
32870/***/ }),
32871/* 147 */
32872/***/ (function(module, __webpack_exports__, __webpack_require__) {
32873
32874"use strict";
32875__webpack_require__.r(__webpack_exports__);
32876/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CssClassApplier", function() { return CssClassApplier; });
32877/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
32878/**
32879 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32880 * @version v27.3.0
32881 * @link https://www.ag-grid.com/
32882 * @license MIT
32883 */
32884var __read = (undefined && undefined.__read) || function (o, n) {
32885 var m = typeof Symbol === "function" && o[Symbol.iterator];
32886 if (!m) return o;
32887 var i = m.call(o), r, ar = [], e;
32888 try {
32889 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
32890 }
32891 catch (error) { e = { error: error }; }
32892 finally {
32893 try {
32894 if (r && !r.done && (m = i["return"])) m.call(i);
32895 }
32896 finally { if (e) throw e.error; }
32897 }
32898 return ar;
32899};
32900var __spread = (undefined && undefined.__spread) || function () {
32901 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
32902 return ar;
32903};
32904
32905var CssClassApplier = /** @class */ (function () {
32906 function CssClassApplier() {
32907 }
32908 CssClassApplier.getHeaderClassesFromColDef = function (abstractColDef, gridOptionsWrapper, column, columnGroup) {
32909 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["missing"])(abstractColDef)) {
32910 return [];
32911 }
32912 return this.getColumnClassesFromCollDef(abstractColDef.headerClass, abstractColDef, gridOptionsWrapper, column, columnGroup);
32913 };
32914 CssClassApplier.getToolPanelClassesFromColDef = function (abstractColDef, gridOptionsWrapper, column, columnGroup) {
32915 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["missing"])(abstractColDef)) {
32916 return [];
32917 }
32918 return this.getColumnClassesFromCollDef(abstractColDef.toolPanelClass, abstractColDef, gridOptionsWrapper, column, columnGroup);
32919 };
32920 CssClassApplier.getClassParams = function (abstractColDef, gridOptionsWrapper, column, columnGroup) {
32921 return {
32922 // bad naming, as colDef here can be a group or a column,
32923 // however most people won't appreciate the difference,
32924 // so keeping it as colDef to avoid confusion.
32925 colDef: abstractColDef,
32926 column: column,
32927 columnGroup: columnGroup,
32928 api: gridOptionsWrapper.getApi(),
32929 columnApi: gridOptionsWrapper.getColumnApi(),
32930 context: gridOptionsWrapper.getContext()
32931 };
32932 };
32933 CssClassApplier.getColumnClassesFromCollDef = function (classesOrFunc, abstractColDef, gridOptionsWrapper, column, columnGroup) {
32934 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["missing"])(classesOrFunc)) {
32935 return [];
32936 }
32937 var classToUse;
32938 if (typeof classesOrFunc === 'function') {
32939 var params = this.getClassParams(abstractColDef, gridOptionsWrapper, column, columnGroup);
32940 classToUse = classesOrFunc(params);
32941 }
32942 else {
32943 classToUse = classesOrFunc;
32944 }
32945 if (typeof classToUse === 'string') {
32946 return [classToUse];
32947 }
32948 if (Array.isArray(classToUse)) {
32949 return __spread(classToUse);
32950 }
32951 return [];
32952 };
32953 return CssClassApplier;
32954}());
32955
32956
32957
32958
32959
32960/***/ }),
32961/* 148 */
32962/***/ (function(module, __webpack_exports__, __webpack_require__) {
32963
32964"use strict";
32965__webpack_require__.r(__webpack_exports__);
32966/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerComp", function() { return HeaderRowContainerComp; });
32967/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
32968/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
32969/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
32970/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
32971/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36);
32972/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(57);
32973/* harmony import */ var _row_headerRowComp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(149);
32974/* harmony import */ var _headerRowContainerCtrl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(152);
32975/**
32976 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32977 * @version v27.3.0
32978 * @link https://www.ag-grid.com/
32979 * @license MIT
32980 */
32981var __extends = (undefined && undefined.__extends) || (function () {
32982 var extendStatics = function (d, b) {
32983 extendStatics = Object.setPrototypeOf ||
32984 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32985 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
32986 return extendStatics(d, b);
32987 };
32988 return function (d, b) {
32989 extendStatics(d, b);
32990 function __() { this.constructor = d; }
32991 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32992 };
32993})();
32994var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32995 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32996 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32997 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
32998 return c > 3 && r && Object.defineProperty(target, key, r), r;
32999};
33000
33001
33002
33003
33004
33005
33006
33007
33008var HeaderRowContainerComp = /** @class */ (function (_super) {
33009 __extends(HeaderRowContainerComp, _super);
33010 function HeaderRowContainerComp(pinned) {
33011 var _this = _super.call(this) || this;
33012 _this.headerRowComps = {};
33013 _this.rowCompsList = [];
33014 _this.pinned = pinned;
33015 return _this;
33016 }
33017 HeaderRowContainerComp.prototype.init = function () {
33018 var _this = this;
33019 this.selectAndSetTemplate();
33020 var compProxy = {
33021 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
33022 setCtrls: function (ctrls) { return _this.setCtrls(ctrls); },
33023 // only gets called for center section
33024 setCenterWidth: function (width) { return _this.eCenterContainer.style.width = width; },
33025 setContainerTransform: function (transform) { return _this.eCenterContainer.style.transform = transform; },
33026 // only gets called for pinned sections
33027 setPinnedContainerWidth: function (width) {
33028 var eGui = _this.getGui();
33029 eGui.style.width = width;
33030 eGui.style.maxWidth = width;
33031 eGui.style.minWidth = width;
33032 }
33033 };
33034 var ctrl = this.createManagedBean(new _headerRowContainerCtrl__WEBPACK_IMPORTED_MODULE_7__["HeaderRowContainerCtrl"](this.pinned));
33035 ctrl.setComp(compProxy, this.getGui());
33036 };
33037 HeaderRowContainerComp.prototype.selectAndSetTemplate = function () {
33038 var pinnedLeft = this.pinned == _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_LEFT;
33039 var pinnedRight = this.pinned == _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_RIGHT;
33040 var template = pinnedLeft ? HeaderRowContainerComp.PINNED_LEFT_TEMPLATE :
33041 pinnedRight ? HeaderRowContainerComp.PINNED_RIGHT_TEMPLATE : HeaderRowContainerComp.CENTER_TEMPLATE;
33042 this.setTemplate(template);
33043 // for left and right, we add rows directly to the root element,
33044 // but for center container we add elements to the child container.
33045 this.eRowContainer = this.eCenterContainer ? this.eCenterContainer : this.getGui();
33046 };
33047 HeaderRowContainerComp.prototype.destroyRowComps = function () {
33048 this.setCtrls([]);
33049 };
33050 HeaderRowContainerComp.prototype.destroyRowComp = function (rowComp) {
33051 this.destroyBean(rowComp);
33052 this.eRowContainer.removeChild(rowComp.getGui());
33053 };
33054 HeaderRowContainerComp.prototype.setCtrls = function (ctrls) {
33055 var _this = this;
33056 var oldRowComps = this.headerRowComps;
33057 this.headerRowComps = {};
33058 this.rowCompsList = [];
33059 var prevGui;
33060 var appendEnsuringDomOrder = function (rowComp) {
33061 var eGui = rowComp.getGui();
33062 var notAlreadyIn = eGui.parentElement != _this.eRowContainer;
33063 if (notAlreadyIn) {
33064 _this.eRowContainer.appendChild(eGui);
33065 }
33066 if (prevGui) {
33067 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["ensureDomOrder"])(_this.eRowContainer, eGui, prevGui);
33068 }
33069 prevGui = eGui;
33070 };
33071 ctrls.forEach(function (ctrl) {
33072 var ctrlId = ctrl.getInstanceId();
33073 var existingComp = oldRowComps[ctrlId];
33074 delete oldRowComps[ctrlId];
33075 var rowComp = existingComp ? existingComp : _this.createBean(new _row_headerRowComp__WEBPACK_IMPORTED_MODULE_6__["HeaderRowComp"](ctrl));
33076 _this.headerRowComps[ctrlId] = rowComp;
33077 _this.rowCompsList.push(rowComp);
33078 appendEnsuringDomOrder(rowComp);
33079 });
33080 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["getAllValuesInObject"])(oldRowComps).forEach(function (c) { return _this.destroyRowComp(c); });
33081 };
33082 HeaderRowContainerComp.PINNED_LEFT_TEMPLATE = "<div class=\"ag-pinned-left-header\" role=\"presentation\"/>";
33083 HeaderRowContainerComp.PINNED_RIGHT_TEMPLATE = "<div class=\"ag-pinned-right-header\" role=\"presentation\"/>";
33084 HeaderRowContainerComp.CENTER_TEMPLATE = "<div class=\"ag-header-viewport\" role=\"presentation\">\n <div class=\"ag-header-container\" ref=\"eCenterContainer\" role=\"rowgroup\"></div>\n </div>";
33085 __decorate([
33086 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_5__["RefSelector"])('eCenterContainer')
33087 ], HeaderRowContainerComp.prototype, "eCenterContainer", void 0);
33088 __decorate([
33089 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
33090 ], HeaderRowContainerComp.prototype, "init", null);
33091 __decorate([
33092 _context_context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
33093 ], HeaderRowContainerComp.prototype, "destroyRowComps", null);
33094 return HeaderRowContainerComp;
33095}(_widgets_component__WEBPACK_IMPORTED_MODULE_4__["Component"]));
33096
33097
33098
33099
33100
33101/***/ }),
33102/* 149 */
33103/***/ (function(module, __webpack_exports__, __webpack_require__) {
33104
33105"use strict";
33106__webpack_require__.r(__webpack_exports__);
33107/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRowType", function() { return HeaderRowType; });
33108/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRowComp", function() { return HeaderRowComp; });
33109/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
33110/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
33111/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
33112/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
33113/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36);
33114/* harmony import */ var _cells_column_headerCellComp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(150);
33115/* harmony import */ var _cells_columnGroup_headerGroupCellComp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(151);
33116/* harmony import */ var _cells_floatingFilter_headerFilterCellComp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(108);
33117/**
33118 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
33119 * @version v27.3.0
33120 * @link https://www.ag-grid.com/
33121 * @license MIT
33122 */
33123var __extends = (undefined && undefined.__extends) || (function () {
33124 var extendStatics = function (d, b) {
33125 extendStatics = Object.setPrototypeOf ||
33126 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33127 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33128 return extendStatics(d, b);
33129 };
33130 return function (d, b) {
33131 extendStatics(d, b);
33132 function __() { this.constructor = d; }
33133 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33134 };
33135})();
33136var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33137 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33138 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33139 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33140 return c > 3 && r && Object.defineProperty(target, key, r), r;
33141};
33142
33143
33144
33145
33146
33147
33148
33149
33150var HeaderRowType;
33151(function (HeaderRowType) {
33152 HeaderRowType["COLUMN_GROUP"] = "group";
33153 HeaderRowType["COLUMN"] = "column";
33154 HeaderRowType["FLOATING_FILTER"] = "filter";
33155})(HeaderRowType || (HeaderRowType = {}));
33156var HeaderRowComp = /** @class */ (function (_super) {
33157 __extends(HeaderRowComp, _super);
33158 function HeaderRowComp(ctrl) {
33159 var _this = _super.call(this) || this;
33160 _this.headerComps = {};
33161 var extraClass = ctrl.getType() == HeaderRowType.COLUMN_GROUP ? "ag-header-row-column-group" :
33162 ctrl.getType() == HeaderRowType.FLOATING_FILTER ? "ag-header-row-column-filter" : "ag-header-row-column";
33163 _this.setTemplate(/* html */ "<div class=\"ag-header-row " + extraClass + "\" role=\"row\"></div>");
33164 _this.ctrl = ctrl;
33165 return _this;
33166 }
33167 //noinspection JSUnusedLocalSymbols
33168 HeaderRowComp.prototype.init = function () {
33169 var _this = this;
33170 var compProxy = {
33171 setTransform: function (transform) { return _this.getGui().style.transform = transform; },
33172 setHeight: function (height) { return _this.getGui().style.height = height; },
33173 setTop: function (top) { return _this.getGui().style.top = top; },
33174 setHeaderCtrls: function (ctrls) { return _this.setHeaderCtrls(ctrls); },
33175 setWidth: function (width) { return _this.getGui().style.width = width; },
33176 setAriaRowIndex: function (rowIndex) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_1__["setAriaRowIndex"])(_this.getGui(), rowIndex); }
33177 };
33178 this.ctrl.setComp(compProxy);
33179 };
33180 HeaderRowComp.prototype.destroyHeaderCtrls = function () {
33181 this.setHeaderCtrls([]);
33182 };
33183 HeaderRowComp.prototype.setHeaderCtrls = function (ctrls) {
33184 var _this = this;
33185 if (!this.isAlive()) {
33186 return;
33187 }
33188 var oldComps = this.headerComps;
33189 this.headerComps = {};
33190 ctrls.forEach(function (ctrl) {
33191 var id = ctrl.getInstanceId();
33192 var comp = oldComps[id];
33193 delete oldComps[id];
33194 if (comp == null) {
33195 comp = _this.createHeaderComp(ctrl);
33196 _this.getGui().appendChild(comp.getGui());
33197 }
33198 _this.headerComps[id] = comp;
33199 });
33200 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["iterateObject"])(oldComps, function (id, comp) {
33201 _this.getGui().removeChild(comp.getGui());
33202 _this.destroyBean(comp);
33203 });
33204 var ensureDomOrder = this.gridOptionsWrapper.isEnsureDomOrder();
33205 if (ensureDomOrder) {
33206 var comps = Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["getAllValuesInObject"])(this.headerComps);
33207 // ordering the columns by left position orders them in the order they appear on the screen
33208 comps.sort(function (a, b) {
33209 var leftA = a.getCtrl().getColumnGroupChild().getLeft();
33210 var leftB = b.getCtrl().getColumnGroupChild().getLeft();
33211 return leftA - leftB;
33212 });
33213 var elementsInOrder = comps.map(function (c) { return c.getGui(); });
33214 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDomChildOrder"])(this.getGui(), elementsInOrder);
33215 }
33216 };
33217 HeaderRowComp.prototype.createHeaderComp = function (headerCtrl) {
33218 var result;
33219 switch (this.ctrl.getType()) {
33220 case HeaderRowType.COLUMN_GROUP:
33221 result = new _cells_columnGroup_headerGroupCellComp__WEBPACK_IMPORTED_MODULE_6__["HeaderGroupCellComp"](headerCtrl);
33222 break;
33223 case HeaderRowType.FLOATING_FILTER:
33224 result = new _cells_floatingFilter_headerFilterCellComp__WEBPACK_IMPORTED_MODULE_7__["HeaderFilterCellComp"](headerCtrl);
33225 break;
33226 default:
33227 result = new _cells_column_headerCellComp__WEBPACK_IMPORTED_MODULE_5__["HeaderCellComp"](headerCtrl);
33228 break;
33229 }
33230 this.createBean(result);
33231 result.setParentComponent(this);
33232 return result;
33233 };
33234 __decorate([
33235 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
33236 ], HeaderRowComp.prototype, "init", null);
33237 __decorate([
33238 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
33239 ], HeaderRowComp.prototype, "destroyHeaderCtrls", null);
33240 return HeaderRowComp;
33241}(_widgets_component__WEBPACK_IMPORTED_MODULE_4__["Component"]));
33242
33243
33244
33245
33246
33247/***/ }),
33248/* 150 */
33249/***/ (function(module, __webpack_exports__, __webpack_require__) {
33250
33251"use strict";
33252__webpack_require__.r(__webpack_exports__);
33253/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderCellComp", function() { return HeaderCellComp; });
33254/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
33255/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
33256/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
33257/* harmony import */ var _abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(109);
33258/**
33259 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
33260 * @version v27.3.0
33261 * @link https://www.ag-grid.com/
33262 * @license MIT
33263 */
33264var __extends = (undefined && undefined.__extends) || (function () {
33265 var extendStatics = function (d, b) {
33266 extendStatics = Object.setPrototypeOf ||
33267 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33268 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33269 return extendStatics(d, b);
33270 };
33271 return function (d, b) {
33272 extendStatics(d, b);
33273 function __() { this.constructor = d; }
33274 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33275 };
33276})();
33277var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33278 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33279 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33280 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33281 return c > 3 && r && Object.defineProperty(target, key, r), r;
33282};
33283
33284
33285
33286
33287var HeaderCellComp = /** @class */ (function (_super) {
33288 __extends(HeaderCellComp, _super);
33289 function HeaderCellComp(ctrl) {
33290 var _this = _super.call(this, HeaderCellComp.TEMPLATE, ctrl) || this;
33291 _this.headerCompVersion = 0;
33292 _this.column = ctrl.getColumnGroupChild();
33293 _this.pinned = ctrl.getPinned();
33294 return _this;
33295 }
33296 HeaderCellComp.prototype.postConstruct = function () {
33297 var _this = this;
33298 var eGui = this.getGui();
33299 var setAttribute = function (name, value, element) {
33300 var actualElement = element ? element : eGui;
33301 if (value != null && value != '') {
33302 actualElement.setAttribute(name, value);
33303 }
33304 else {
33305 actualElement.removeAttribute(name);
33306 }
33307 };
33308 var compProxy = {
33309 setWidth: function (width) { return eGui.style.width = width; },
33310 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
33311 setColId: function (id) { return setAttribute('col-id', id); },
33312 setTitle: function (title) { return setAttribute('title', title); },
33313 setAriaDescription: function (label) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_1__["setAriaDescription"])(eGui, label); },
33314 setAriaSort: function (sort) { return sort ? Object(_utils_aria__WEBPACK_IMPORTED_MODULE_1__["setAriaSort"])(eGui, sort) : Object(_utils_aria__WEBPACK_IMPORTED_MODULE_1__["removeAriaSort"])(eGui); },
33315 setUserCompDetails: function (compDetails) { return _this.setUserCompDetails(compDetails); },
33316 getUserCompInstance: function () { return _this.headerComp; }
33317 };
33318 this.ctrl.setComp(compProxy, this.getGui(), this.eResize);
33319 var selectAllGui = this.ctrl.getSelectAllGui();
33320 this.eResize.insertAdjacentElement('afterend', selectAllGui);
33321 };
33322 HeaderCellComp.prototype.destroyHeaderComp = function () {
33323 if (this.headerComp) {
33324 this.getGui().removeChild(this.headerCompGui);
33325 this.headerComp = this.destroyBean(this.headerComp);
33326 this.headerCompGui = undefined;
33327 }
33328 };
33329 HeaderCellComp.prototype.setUserCompDetails = function (compDetails) {
33330 var _this = this;
33331 this.headerCompVersion++;
33332 var versionCopy = this.headerCompVersion;
33333 compDetails.newAgStackInstance().then(function (comp) { return _this.afterCompCreated(versionCopy, comp); });
33334 };
33335 HeaderCellComp.prototype.afterCompCreated = function (version, headerComp) {
33336 if (version != this.headerCompVersion || !this.isAlive()) {
33337 this.destroyBean(headerComp);
33338 return;
33339 }
33340 this.destroyHeaderComp();
33341 this.headerComp = headerComp;
33342 this.headerCompGui = headerComp.getGui();
33343 this.getGui().appendChild(this.headerCompGui);
33344 this.ctrl.setDragSource(this.headerCompGui);
33345 };
33346 HeaderCellComp.TEMPLATE = "<div class=\"ag-header-cell\" role=\"columnheader\" tabindex=\"-1\">\n <div ref=\"eResize\" class=\"ag-header-cell-resize\" role=\"presentation\"></div>\n </div>";
33347 __decorate([
33348 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('eResize')
33349 ], HeaderCellComp.prototype, "eResize", void 0);
33350 __decorate([
33351 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
33352 ], HeaderCellComp.prototype, "postConstruct", null);
33353 __decorate([
33354 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
33355 ], HeaderCellComp.prototype, "destroyHeaderComp", null);
33356 return HeaderCellComp;
33357}(_abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_3__["AbstractHeaderCellComp"]));
33358
33359
33360
33361
33362
33363/***/ }),
33364/* 151 */
33365/***/ (function(module, __webpack_exports__, __webpack_require__) {
33366
33367"use strict";
33368__webpack_require__.r(__webpack_exports__);
33369/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupCellComp", function() { return HeaderGroupCellComp; });
33370/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
33371/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
33372/* harmony import */ var _abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(109);
33373/**
33374 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
33375 * @version v27.3.0
33376 * @link https://www.ag-grid.com/
33377 * @license MIT
33378 */
33379var __extends = (undefined && undefined.__extends) || (function () {
33380 var extendStatics = function (d, b) {
33381 extendStatics = Object.setPrototypeOf ||
33382 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33383 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33384 return extendStatics(d, b);
33385 };
33386 return function (d, b) {
33387 extendStatics(d, b);
33388 function __() { this.constructor = d; }
33389 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33390 };
33391})();
33392var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33393 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33394 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33395 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33396 return c > 3 && r && Object.defineProperty(target, key, r), r;
33397};
33398
33399
33400
33401var HeaderGroupCellComp = /** @class */ (function (_super) {
33402 __extends(HeaderGroupCellComp, _super);
33403 function HeaderGroupCellComp(ctrl) {
33404 return _super.call(this, HeaderGroupCellComp.TEMPLATE, ctrl) || this;
33405 }
33406 HeaderGroupCellComp.prototype.postConstruct = function () {
33407 var _this = this;
33408 var eGui = this.getGui();
33409 var setAttribute = function (key, value) {
33410 return value != undefined ? eGui.setAttribute(key, value) : eGui.removeAttribute(key);
33411 };
33412 var compProxy = {
33413 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
33414 addOrRemoveResizableCssClass: function (cssClassName, on) { return _this.eResize.classList.toggle(cssClassName, on); },
33415 setWidth: function (width) { return eGui.style.width = width; },
33416 setColId: function (id) { return eGui.setAttribute("col-id", id); },
33417 setAriaExpanded: function (expanded) { return setAttribute('aria-expanded', expanded); },
33418 setTitle: function (title) { return setAttribute("title", title); },
33419 setUserCompDetails: function (details) { return _this.setUserCompDetails(details); }
33420 };
33421 this.ctrl.setComp(compProxy, eGui, this.eResize);
33422 };
33423 HeaderGroupCellComp.prototype.setUserCompDetails = function (details) {
33424 var _this = this;
33425 details.newAgStackInstance().then(function (comp) { return _this.afterHeaderCompCreated(comp); });
33426 };
33427 HeaderGroupCellComp.prototype.afterHeaderCompCreated = function (headerGroupComp) {
33428 var _this = this;
33429 var destroyFunc = function () { return _this.destroyBean(headerGroupComp); };
33430 if (!this.isAlive()) {
33431 destroyFunc();
33432 return;
33433 }
33434 this.getGui().appendChild(headerGroupComp.getGui());
33435 this.addDestroyFunc(destroyFunc);
33436 this.ctrl.setDragSource(headerGroupComp.getGui());
33437 };
33438 HeaderGroupCellComp.TEMPLATE = "<div class=\"ag-header-group-cell\" role=\"columnheader\" tabindex=\"-1\">\n <div ref=\"eResize\" class=\"ag-header-cell-resize\" role=\"presentation\"></div>\n </div>";
33439 __decorate([
33440 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('userComponentFactory')
33441 ], HeaderGroupCellComp.prototype, "userComponentFactory", void 0);
33442 __decorate([
33443 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eResize')
33444 ], HeaderGroupCellComp.prototype, "eResize", void 0);
33445 __decorate([
33446 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
33447 ], HeaderGroupCellComp.prototype, "postConstruct", null);
33448 return HeaderGroupCellComp;
33449}(_abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_2__["AbstractHeaderCellComp"]));
33450
33451
33452
33453
33454
33455/***/ }),
33456/* 152 */
33457/***/ (function(module, __webpack_exports__, __webpack_require__) {
33458
33459"use strict";
33460__webpack_require__.r(__webpack_exports__);
33461/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerCtrl", function() { return HeaderRowContainerCtrl; });
33462/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
33463/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
33464/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
33465/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
33466/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24);
33467/* harmony import */ var _gridBodyComp_centerWidthFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(136);
33468/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(37);
33469/* harmony import */ var _columnDrag_bodyDropTarget__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(145);
33470/* harmony import */ var _row_headerRowComp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(149);
33471/* harmony import */ var _row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(153);
33472/**
33473 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
33474 * @version v27.3.0
33475 * @link https://www.ag-grid.com/
33476 * @license MIT
33477 */
33478var __extends = (undefined && undefined.__extends) || (function () {
33479 var extendStatics = function (d, b) {
33480 extendStatics = Object.setPrototypeOf ||
33481 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33482 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33483 return extendStatics(d, b);
33484 };
33485 return function (d, b) {
33486 extendStatics(d, b);
33487 function __() { this.constructor = d; }
33488 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33489 };
33490})();
33491var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33492 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33493 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33494 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33495 return c > 3 && r && Object.defineProperty(target, key, r), r;
33496};
33497var __read = (undefined && undefined.__read) || function (o, n) {
33498 var m = typeof Symbol === "function" && o[Symbol.iterator];
33499 if (!m) return o;
33500 var i = m.call(o), r, ar = [], e;
33501 try {
33502 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
33503 }
33504 catch (error) { e = { error: error }; }
33505 finally {
33506 try {
33507 if (r && !r.done && (m = i["return"])) m.call(i);
33508 }
33509 finally { if (e) throw e.error; }
33510 }
33511 return ar;
33512};
33513var __spread = (undefined && undefined.__spread) || function () {
33514 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
33515 return ar;
33516};
33517
33518
33519
33520
33521
33522
33523
33524
33525
33526
33527var HeaderRowContainerCtrl = /** @class */ (function (_super) {
33528 __extends(HeaderRowContainerCtrl, _super);
33529 function HeaderRowContainerCtrl(pinned) {
33530 var _this = _super.call(this) || this;
33531 _this.groupsRowCtrls = [];
33532 _this.pinned = pinned;
33533 return _this;
33534 }
33535 HeaderRowContainerCtrl.prototype.setComp = function (comp, eGui) {
33536 this.comp = comp;
33537 this.setupCenterWidth();
33538 this.setupPinnedWidth();
33539 this.setupDragAndDrop(eGui);
33540 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_GRID_COLUMNS_CHANGED, this.onGridColumnsChanged.bind(this));
33541 this.ctrlsService.registerHeaderContainer(this, this.pinned);
33542 if (this.columnModel.isReady()) {
33543 this.refresh();
33544 }
33545 };
33546 HeaderRowContainerCtrl.prototype.setupDragAndDrop = function (dropContainer) {
33547 var bodyDropTarget = new _columnDrag_bodyDropTarget__WEBPACK_IMPORTED_MODULE_7__["BodyDropTarget"](this.pinned, dropContainer);
33548 this.createManagedBean(bodyDropTarget);
33549 };
33550 HeaderRowContainerCtrl.prototype.refresh = function (keepColumns) {
33551 var _this = this;
33552 if (keepColumns === void 0) { keepColumns = false; }
33553 var sequence = new _utils__WEBPACK_IMPORTED_MODULE_6__["NumberSequence"]();
33554 var focusedHeaderPosition = this.focusService.getFocusHeaderToUseAfterRefresh();
33555 var refreshColumnGroups = function () {
33556 var groupRowCount = _this.columnModel.getHeaderRowCount() - 1;
33557 _this.groupsRowCtrls = _this.destroyBeans(_this.groupsRowCtrls);
33558 for (var i = 0; i < groupRowCount; i++) {
33559 var ctrl = _this.createBean(new _row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_9__["HeaderRowCtrl"](sequence.next(), _this.pinned, _row_headerRowComp__WEBPACK_IMPORTED_MODULE_8__["HeaderRowType"].COLUMN_GROUP));
33560 _this.groupsRowCtrls.push(ctrl);
33561 }
33562 };
33563 var refreshColumns = function () {
33564 var rowIndex = sequence.next();
33565 var needNewInstance = _this.columnsRowCtrl == null || !keepColumns || _this.columnsRowCtrl.getRowIndex() !== rowIndex;
33566 if (needNewInstance) {
33567 _this.destroyBean(_this.columnsRowCtrl);
33568 _this.columnsRowCtrl = _this.createBean(new _row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_9__["HeaderRowCtrl"](rowIndex, _this.pinned, _row_headerRowComp__WEBPACK_IMPORTED_MODULE_8__["HeaderRowType"].COLUMN));
33569 }
33570 };
33571 var refreshFilters = function () {
33572 var includeFloatingFilter = _this.columnModel.hasFloatingFilters();
33573 var destroyPreviousComp = function () {
33574 _this.filtersRowCtrl = _this.destroyBean(_this.filtersRowCtrl);
33575 };
33576 if (!includeFloatingFilter) {
33577 destroyPreviousComp();
33578 return;
33579 }
33580 var rowIndex = sequence.next();
33581 if (_this.filtersRowCtrl) {
33582 var rowIndexMismatch = _this.filtersRowCtrl.getRowIndex() !== rowIndex;
33583 if (!keepColumns || rowIndexMismatch) {
33584 destroyPreviousComp();
33585 }
33586 }
33587 if (!_this.filtersRowCtrl) {
33588 _this.filtersRowCtrl = _this.createBean(new _row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_9__["HeaderRowCtrl"](rowIndex, _this.pinned, _row_headerRowComp__WEBPACK_IMPORTED_MODULE_8__["HeaderRowType"].FLOATING_FILTER));
33589 }
33590 };
33591 refreshColumnGroups();
33592 refreshColumns();
33593 refreshFilters();
33594 var allCtrls = this.getAllCtrls();
33595 this.comp.setCtrls(allCtrls);
33596 this.restoreFocusOnHeader(focusedHeaderPosition);
33597 };
33598 HeaderRowContainerCtrl.prototype.restoreFocusOnHeader = function (position) {
33599 if (position == null || position.column.getPinned() != this.pinned) {
33600 return;
33601 }
33602 this.focusService.focusHeaderPosition({ headerPosition: position });
33603 };
33604 HeaderRowContainerCtrl.prototype.getAllCtrls = function () {
33605 var res = __spread(this.groupsRowCtrls, [this.columnsRowCtrl]);
33606 if (this.filtersRowCtrl) {
33607 res.push(this.filtersRowCtrl);
33608 }
33609 return res;
33610 };
33611 // grid cols have changed - this also means the number of rows in the header can have
33612 // changed. so we remove all the old rows and insert new ones for a complete refresh
33613 HeaderRowContainerCtrl.prototype.onGridColumnsChanged = function () {
33614 this.refresh(true);
33615 };
33616 HeaderRowContainerCtrl.prototype.setupCenterWidth = function () {
33617 var _this = this;
33618 if (this.pinned != null) {
33619 return;
33620 }
33621 this.createManagedBean(new _gridBodyComp_centerWidthFeature__WEBPACK_IMPORTED_MODULE_5__["CenterWidthFeature"](function (width) { return _this.comp.setCenterWidth(width + "px"); }));
33622 };
33623 HeaderRowContainerCtrl.prototype.setHorizontalScroll = function (offset) {
33624 this.comp.setContainerTransform("translateX(" + offset + "px)");
33625 };
33626 HeaderRowContainerCtrl.prototype.setupPinnedWidth = function () {
33627 var _this = this;
33628 if (this.pinned == null) {
33629 return;
33630 }
33631 var pinningLeft = this.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_LEFT;
33632 var pinningRight = this.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_RIGHT;
33633 var listener = function () {
33634 var width = pinningLeft ? _this.pinnedWidthService.getPinnedLeftWidth() : _this.pinnedWidthService.getPinnedRightWidth();
33635 if (width == null) {
33636 return;
33637 } // can happen at initialisation, width not yet set
33638 var hidden = width == 0;
33639 var isRtl = _this.gridOptionsWrapper.isEnableRtl();
33640 var scrollbarWidth = _this.gridOptionsWrapper.getScrollbarWidth();
33641 // if there is a scroll showing (and taking up space, so Windows, and not iOS)
33642 // in the body, then we add extra space to keep header aligned with the body,
33643 // as body width fits the cols and the scrollbar
33644 var addPaddingForScrollbar = _this.scrollVisibleService.isVerticalScrollShowing() && ((isRtl && pinningLeft) || (!isRtl && pinningRight));
33645 var widthWithPadding = addPaddingForScrollbar ? width + scrollbarWidth : width;
33646 _this.comp.setPinnedContainerWidth(widthWithPadding + 'px');
33647 _this.comp.addOrRemoveCssClass('ag-hidden', hidden);
33648 };
33649 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_LEFT_PINNED_WIDTH_CHANGED, listener);
33650 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_RIGHT_PINNED_WIDTH_CHANGED, listener);
33651 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED, listener);
33652 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_SCROLLBAR_WIDTH_CHANGED, listener);
33653 };
33654 HeaderRowContainerCtrl.prototype.getHeaderCtrlForColumn = function (column) {
33655 if (column instanceof _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"]) {
33656 if (!this.columnsRowCtrl) {
33657 return;
33658 }
33659 return this.columnsRowCtrl.getHeaderCellCtrl(column);
33660 }
33661 if (this.groupsRowCtrls.length === 0) {
33662 return;
33663 }
33664 for (var i = 0; i < this.groupsRowCtrls.length; i++) {
33665 var ctrl = this.groupsRowCtrls[i].getHeaderCellCtrl(column);
33666 if (ctrl) {
33667 return ctrl;
33668 }
33669 }
33670 };
33671 HeaderRowContainerCtrl.prototype.getHtmlElementForColumnHeader = function (column) {
33672 /* tslint:enable */
33673 var cellCtrl = this.getHeaderCtrlForColumn(column);
33674 if (!cellCtrl) {
33675 return null;
33676 }
33677 return cellCtrl.getGui();
33678 };
33679 HeaderRowContainerCtrl.prototype.getRowType = function (rowIndex) {
33680 var allCtrls = this.getAllCtrls();
33681 var ctrl = allCtrls[rowIndex];
33682 return ctrl ? ctrl.getType() : undefined;
33683 };
33684 HeaderRowContainerCtrl.prototype.focusHeader = function (rowIndex, column, event) {
33685 var allCtrls = this.getAllCtrls();
33686 var ctrl = allCtrls[rowIndex];
33687 if (!ctrl) {
33688 return false;
33689 }
33690 return ctrl.focusHeader(column, event);
33691 };
33692 HeaderRowContainerCtrl.prototype.getRowCount = function () {
33693 return this.getAllCtrls().length;
33694 };
33695 __decorate([
33696 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('ctrlsService')
33697 ], HeaderRowContainerCtrl.prototype, "ctrlsService", void 0);
33698 __decorate([
33699 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('scrollVisibleService')
33700 ], HeaderRowContainerCtrl.prototype, "scrollVisibleService", void 0);
33701 __decorate([
33702 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('pinnedWidthService')
33703 ], HeaderRowContainerCtrl.prototype, "pinnedWidthService", void 0);
33704 __decorate([
33705 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
33706 ], HeaderRowContainerCtrl.prototype, "columnModel", void 0);
33707 __decorate([
33708 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('focusService')
33709 ], HeaderRowContainerCtrl.prototype, "focusService", void 0);
33710 return HeaderRowContainerCtrl;
33711}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
33712
33713
33714
33715
33716
33717/***/ }),
33718/* 153 */
33719/***/ (function(module, __webpack_exports__, __webpack_require__) {
33720
33721"use strict";
33722__webpack_require__.r(__webpack_exports__);
33723/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRowCtrl", function() { return HeaderRowCtrl; });
33724/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
33725/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
33726/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
33727/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24);
33728/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(112);
33729/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43);
33730/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13);
33731/* harmony import */ var _cells_floatingFilter_headerFilterCellCtrl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(154);
33732/* harmony import */ var _cells_column_headerCellCtrl__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(160);
33733/* harmony import */ var _cells_columnGroup_headerGroupCellCtrl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(164);
33734/* harmony import */ var _headerRowComp__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(149);
33735/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7);
33736/**
33737 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
33738 * @version v27.3.0
33739 * @link https://www.ag-grid.com/
33740 * @license MIT
33741 */
33742var __extends = (undefined && undefined.__extends) || (function () {
33743 var extendStatics = function (d, b) {
33744 extendStatics = Object.setPrototypeOf ||
33745 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33746 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33747 return extendStatics(d, b);
33748 };
33749 return function (d, b) {
33750 extendStatics(d, b);
33751 function __() { this.constructor = d; }
33752 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33753 };
33754})();
33755var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33756 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33757 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33758 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33759 return c > 3 && r && Object.defineProperty(target, key, r), r;
33760};
33761
33762
33763
33764
33765
33766
33767
33768
33769
33770
33771
33772
33773var instanceIdSequence = 0;
33774var HeaderRowCtrl = /** @class */ (function (_super) {
33775 __extends(HeaderRowCtrl, _super);
33776 function HeaderRowCtrl(rowIndex, pinned, type) {
33777 var _this = _super.call(this) || this;
33778 _this.instanceId = instanceIdSequence++;
33779 _this.headerCellCtrls = {};
33780 _this.rowIndex = rowIndex;
33781 _this.pinned = pinned;
33782 _this.type = type;
33783 return _this;
33784 }
33785 HeaderRowCtrl.prototype.getInstanceId = function () {
33786 return this.instanceId;
33787 };
33788 HeaderRowCtrl.prototype.setComp = function (comp) {
33789 this.comp = comp;
33790 this.onRowHeightChanged();
33791 this.onVirtualColumnsChanged();
33792 this.setWidth();
33793 this.addEventListeners();
33794 if (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_5__["isBrowserSafari"])()) {
33795 // fix for a Safari rendering bug that caused the header to flicker above chart panels
33796 // as you move the mouse over the header
33797 this.comp.setTransform('translateZ(0)');
33798 }
33799 comp.setAriaRowIndex(this.rowIndex + 1);
33800 };
33801 HeaderRowCtrl.prototype.addEventListeners = function () {
33802 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_COLUMN_RESIZED, this.onColumnResized.bind(this));
33803 // when print layout changes, it changes what columns are in what section
33804 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_DOM_LAYOUT, this.onDisplayedColumnsChanged.bind(this));
33805 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));
33806 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_VIRTUAL_COLUMNS_CHANGED, this.onVirtualColumnsChanged.bind(this));
33807 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));
33808 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_PIVOT_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));
33809 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_GROUP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));
33810 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_PIVOT_GROUP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));
33811 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_FLOATING_FILTERS_HEIGHT, this.onRowHeightChanged.bind(this));
33812 };
33813 HeaderRowCtrl.prototype.getHeaderCellCtrl = function (column) {
33814 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_11__["values"])(this.headerCellCtrls).find(function (cellCtrl) { return cellCtrl.getColumnGroupChild() === column; });
33815 };
33816 HeaderRowCtrl.prototype.onDisplayedColumnsChanged = function () {
33817 this.onVirtualColumnsChanged();
33818 this.setWidth();
33819 };
33820 HeaderRowCtrl.prototype.getType = function () {
33821 return this.type;
33822 };
33823 HeaderRowCtrl.prototype.onColumnResized = function () {
33824 this.setWidth();
33825 };
33826 HeaderRowCtrl.prototype.setWidth = function () {
33827 var width = this.getWidthForRow();
33828 this.comp.setWidth(width + "px");
33829 };
33830 HeaderRowCtrl.prototype.getWidthForRow = function () {
33831 var printLayout = this.gridOptionsWrapper.getDomLayout() === _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].DOM_LAYOUT_PRINT;
33832 if (printLayout) {
33833 var pinned = this.pinned != null;
33834 if (pinned) {
33835 return 0;
33836 }
33837 return this.columnModel.getContainerWidth(_constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_RIGHT)
33838 + this.columnModel.getContainerWidth(_constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_LEFT)
33839 + this.columnModel.getContainerWidth(null);
33840 }
33841 // if not printing, just return the width as normal
33842 return this.columnModel.getContainerWidth(this.pinned);
33843 };
33844 HeaderRowCtrl.prototype.onRowHeightChanged = function () {
33845 var headerRowCount = this.columnModel.getHeaderRowCount();
33846 var sizes = [];
33847 var numberOfFloating = 0;
33848 var groupHeight;
33849 var headerHeight;
33850 if (this.columnModel.hasFloatingFilters()) {
33851 headerRowCount++;
33852 numberOfFloating = 1;
33853 }
33854 if (this.columnModel.isPivotMode()) {
33855 groupHeight = this.gridOptionsWrapper.getPivotGroupHeaderHeight();
33856 headerHeight = this.gridOptionsWrapper.getPivotHeaderHeight();
33857 }
33858 else {
33859 groupHeight = this.gridOptionsWrapper.getGroupHeaderHeight();
33860 headerHeight = this.gridOptionsWrapper.getHeaderHeight();
33861 }
33862 var numberOfNonGroups = 1 + numberOfFloating;
33863 var numberOfGroups = headerRowCount - numberOfNonGroups;
33864 for (var i = 0; i < numberOfGroups; i++) {
33865 sizes.push(groupHeight);
33866 }
33867 sizes.push(headerHeight);
33868 for (var i = 0; i < numberOfFloating; i++) {
33869 sizes.push(this.gridOptionsWrapper.getFloatingFiltersHeight());
33870 }
33871 var rowHeight = 0;
33872 for (var i = 0; i < this.rowIndex; i++) {
33873 rowHeight += sizes[i];
33874 }
33875 this.comp.setTop(rowHeight + 'px');
33876 this.comp.setHeight(sizes[this.rowIndex] + 'px');
33877 };
33878 HeaderRowCtrl.prototype.getPinned = function () {
33879 return this.pinned;
33880 };
33881 HeaderRowCtrl.prototype.getRowIndex = function () {
33882 return this.rowIndex;
33883 };
33884 HeaderRowCtrl.prototype.onVirtualColumnsChanged = function () {
33885 var _this = this;
33886 var oldCtrls = this.headerCellCtrls;
33887 this.headerCellCtrls = {};
33888 var columns = this.getColumnsInViewport();
33889 columns.forEach(function (child) {
33890 // skip groups that have no displayed children. this can happen when the group is broken,
33891 // and this section happens to have nothing to display for the open / closed state.
33892 // (a broken group is one that is split, ie columns in the group have a non-group column
33893 // in between them)
33894 if (child.isEmptyGroup()) {
33895 return;
33896 }
33897 var idOfChild = child.getUniqueId();
33898 // if we already have this cell rendered, do nothing
33899 var headerCtrl = oldCtrls[idOfChild];
33900 delete oldCtrls[idOfChild];
33901 // it's possible there is a new Column with the same ID, but it's for a different Column.
33902 // this is common with pivoting, where the pivot cols change, but the id's are still pivot_0,
33903 // pivot_1 etc. so if new col but same ID, need to remove the old col here first as we are
33904 // about to replace it in the this.headerComps map.
33905 var forOldColumn = headerCtrl && headerCtrl.getColumnGroupChild() != child;
33906 if (forOldColumn) {
33907 _this.destroyBean(headerCtrl);
33908 headerCtrl = undefined;
33909 }
33910 if (headerCtrl == null) {
33911 switch (_this.type) {
33912 case _headerRowComp__WEBPACK_IMPORTED_MODULE_10__["HeaderRowType"].FLOATING_FILTER:
33913 headerCtrl = _this.createBean(new _cells_floatingFilter_headerFilterCellCtrl__WEBPACK_IMPORTED_MODULE_7__["HeaderFilterCellCtrl"](child, _this));
33914 break;
33915 case _headerRowComp__WEBPACK_IMPORTED_MODULE_10__["HeaderRowType"].COLUMN_GROUP:
33916 headerCtrl = _this.createBean(new _cells_columnGroup_headerGroupCellCtrl__WEBPACK_IMPORTED_MODULE_9__["HeaderGroupCellCtrl"](child, _this));
33917 break;
33918 default:
33919 headerCtrl = _this.createBean(new _cells_column_headerCellCtrl__WEBPACK_IMPORTED_MODULE_8__["HeaderCellCtrl"](child, _this));
33920 break;
33921 }
33922 }
33923 _this.headerCellCtrls[idOfChild] = headerCtrl;
33924 });
33925 // we want to keep columns that are focused, otherwise keyboard navigation breaks
33926 var isFocusedAndDisplayed = function (ctrl) {
33927 var isFocused = _this.focusService.isHeaderWrapperFocused(ctrl);
33928 if (!isFocused) {
33929 return false;
33930 }
33931 var isDisplayed = _this.columnModel.isDisplayed(ctrl.getColumnGroupChild());
33932 return isDisplayed;
33933 };
33934 Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["iterateObject"])(oldCtrls, function (id, oldCtrl) {
33935 var keepCtrl = isFocusedAndDisplayed(oldCtrl);
33936 if (keepCtrl) {
33937 _this.headerCellCtrls[id] = oldCtrl;
33938 }
33939 else {
33940 _this.destroyBean(oldCtrl);
33941 }
33942 });
33943 var ctrlsToDisplay = Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["getAllValuesInObject"])(this.headerCellCtrls);
33944 this.comp.setHeaderCtrls(ctrlsToDisplay);
33945 };
33946 HeaderRowCtrl.prototype.destroyCtrls = function () {
33947 var _this = this;
33948 Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["iterateObject"])(this.headerCellCtrls, function (key, ctrl) {
33949 _this.destroyBean(ctrl);
33950 });
33951 this.headerCellCtrls = {};
33952 };
33953 HeaderRowCtrl.prototype.getColumnsInViewport = function () {
33954 var printLayout = this.gridOptionsWrapper.getDomLayout() === _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].DOM_LAYOUT_PRINT;
33955 return printLayout ? this.getColumnsInViewportPrintLayout() : this.getColumnsInViewportNormalLayout();
33956 };
33957 HeaderRowCtrl.prototype.getColumnsInViewportPrintLayout = function () {
33958 var _this = this;
33959 // for print layout, we add all columns into the center
33960 if (this.pinned != null) {
33961 return [];
33962 }
33963 var viewportColumns = [];
33964 var actualDepth = this.getActualDepth();
33965 [_constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_LEFT, null, _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_RIGHT].forEach(function (pinned) {
33966 var items = _this.columnModel.getVirtualHeaderGroupRow(pinned, actualDepth);
33967 viewportColumns = viewportColumns.concat(items);
33968 });
33969 return viewportColumns;
33970 };
33971 HeaderRowCtrl.prototype.getActualDepth = function () {
33972 return this.type == _headerRowComp__WEBPACK_IMPORTED_MODULE_10__["HeaderRowType"].FLOATING_FILTER ? this.rowIndex - 1 : this.rowIndex;
33973 };
33974 HeaderRowCtrl.prototype.getColumnsInViewportNormalLayout = function () {
33975 // when in normal layout, we add the columns for that container only
33976 return this.columnModel.getVirtualHeaderGroupRow(this.pinned, this.getActualDepth());
33977 };
33978 HeaderRowCtrl.prototype.focusHeader = function (column, event) {
33979 var allCtrls = Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["getAllValuesInObject"])(this.headerCellCtrls);
33980 var ctrl = allCtrls.find(function (ctrl) { return ctrl.getColumnGroupChild() == column; });
33981 if (!ctrl) {
33982 return false;
33983 }
33984 ctrl.focus(event);
33985 return true;
33986 };
33987 __decorate([
33988 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
33989 ], HeaderRowCtrl.prototype, "columnModel", void 0);
33990 __decorate([
33991 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('focusService')
33992 ], HeaderRowCtrl.prototype, "focusService", void 0);
33993 __decorate([
33994 _context_context__WEBPACK_IMPORTED_MODULE_2__["PreDestroy"]
33995 ], HeaderRowCtrl.prototype, "destroyCtrls", null);
33996 return HeaderRowCtrl;
33997}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
33998
33999
34000
34001
34002
34003/***/ }),
34004/* 154 */
34005/***/ (function(module, __webpack_exports__, __webpack_require__) {
34006
34007"use strict";
34008__webpack_require__.r(__webpack_exports__);
34009/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellCtrl", function() { return HeaderFilterCellCtrl; });
34010/* harmony import */ var _abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(155);
34011/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65);
34012/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
34013/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
34014/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23);
34015/* harmony import */ var _gridApi__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(156);
34016/* harmony import */ var _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(158);
34017/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(42);
34018/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(48);
34019/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(64);
34020/* harmony import */ var _hoverFeature__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(159);
34021/* harmony import */ var _components_framework_componentTypes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(103);
34022/**
34023 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
34024 * @version v27.3.0
34025 * @link https://www.ag-grid.com/
34026 * @license MIT
34027 */
34028var __extends = (undefined && undefined.__extends) || (function () {
34029 var extendStatics = function (d, b) {
34030 extendStatics = Object.setPrototypeOf ||
34031 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34032 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
34033 return extendStatics(d, b);
34034 };
34035 return function (d, b) {
34036 extendStatics(d, b);
34037 function __() { this.constructor = d; }
34038 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34039 };
34040})();
34041var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34042 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34043 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34044 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
34045 return c > 3 && r && Object.defineProperty(target, key, r), r;
34046};
34047
34048
34049
34050
34051
34052
34053
34054
34055
34056
34057
34058
34059var HeaderFilterCellCtrl = /** @class */ (function (_super) {
34060 __extends(HeaderFilterCellCtrl, _super);
34061 function HeaderFilterCellCtrl(column, parentRowCtrl) {
34062 var _this = _super.call(this, column, parentRowCtrl) || this;
34063 _this.column = column;
34064 return _this;
34065 }
34066 HeaderFilterCellCtrl.prototype.setComp = function (comp, eGui, eButtonShowMainFilter, eFloatingFilterBody) {
34067 _super.prototype.setGui.call(this, eGui);
34068 this.comp = comp;
34069 this.eButtonShowMainFilter = eButtonShowMainFilter;
34070 this.eFloatingFilterBody = eFloatingFilterBody;
34071 var colDef = this.column.getColDef();
34072 var filterExists = !!colDef.filter || !!colDef.filterFramework;
34073 var floatingFilterExists = !!colDef.floatingFilter;
34074 this.active = filterExists && floatingFilterExists;
34075 this.setupWidth();
34076 this.setupLeft();
34077 this.setupHover();
34078 this.setupFocus();
34079 this.setupUserComp();
34080 this.setupSyncWithFilter();
34081 this.setupUi();
34082 this.addManagedListener(this.eButtonShowMainFilter, 'click', this.showParentFilter.bind(this));
34083 };
34084 HeaderFilterCellCtrl.prototype.setupUi = function () {
34085 this.comp.addOrRemoveButtonWrapperCssClass('ag-hidden', !this.active || this.suppressFilterButton);
34086 if (!this.active) {
34087 return;
34088 }
34089 this.comp.addOrRemoveBodyCssClass('ag-floating-filter-full-body', this.suppressFilterButton);
34090 this.comp.addOrRemoveBodyCssClass('ag-floating-filter-body', !this.suppressFilterButton);
34091 var eMenuIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_8__["createIconNoSpan"])('filter', this.gridOptionsWrapper, this.column);
34092 if (eMenuIcon) {
34093 this.eButtonShowMainFilter.appendChild(eMenuIcon);
34094 }
34095 };
34096 HeaderFilterCellCtrl.prototype.setupFocus = function () {
34097 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_9__["ManagedFocusFeature"](this.eGui, {
34098 shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),
34099 onTabKeyDown: this.onTabKeyDown.bind(this),
34100 handleKeyDown: this.handleKeyDown.bind(this),
34101 onFocusIn: this.onFocusIn.bind(this)
34102 }));
34103 };
34104 HeaderFilterCellCtrl.prototype.onTabKeyDown = function (e) {
34105 var eDocument = this.gridOptionsWrapper.getDocument();
34106 var activeEl = eDocument.activeElement;
34107 var wrapperHasFocus = activeEl === this.eGui;
34108 if (wrapperHasFocus) {
34109 return;
34110 }
34111 var nextFocusableEl = this.focusService.findNextFocusableElement(this.eGui, null, e.shiftKey);
34112 if (nextFocusableEl) {
34113 this.beans.headerNavigationService.scrollToColumn(this.column);
34114 e.preventDefault();
34115 nextFocusableEl.focus();
34116 return;
34117 }
34118 var nextFocusableColumn = this.findNextColumnWithFloatingFilter(e.shiftKey);
34119 if (!nextFocusableColumn) {
34120 return;
34121 }
34122 if (this.focusService.focusHeaderPosition({
34123 headerPosition: {
34124 headerRowIndex: this.getParentRowCtrl().getRowIndex(),
34125 column: nextFocusableColumn
34126 },
34127 event: e
34128 })) {
34129 e.preventDefault();
34130 }
34131 };
34132 HeaderFilterCellCtrl.prototype.findNextColumnWithFloatingFilter = function (backwards) {
34133 var columModel = this.beans.columnModel;
34134 var nextCol = this.column;
34135 do {
34136 nextCol = backwards
34137 ? columModel.getDisplayedColBefore(nextCol)
34138 : columModel.getDisplayedColAfter(nextCol);
34139 if (!nextCol) {
34140 break;
34141 }
34142 } while (!nextCol.getColDef().filter || !nextCol.getColDef().floatingFilter);
34143 return nextCol;
34144 };
34145 HeaderFilterCellCtrl.prototype.handleKeyDown = function (e) {
34146 var eDocument = this.gridOptionsWrapper.getDocument();
34147 var activeEl = eDocument.activeElement;
34148 var wrapperHasFocus = activeEl === this.eGui;
34149 switch (e.key) {
34150 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].UP:
34151 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].DOWN:
34152 if (!wrapperHasFocus) {
34153 e.preventDefault();
34154 }
34155 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].LEFT:
34156 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].RIGHT:
34157 if (wrapperHasFocus) {
34158 return;
34159 }
34160 e.stopPropagation();
34161 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ENTER:
34162 if (wrapperHasFocus) {
34163 if (this.focusService.focusInto(this.eGui)) {
34164 e.preventDefault();
34165 }
34166 }
34167 break;
34168 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ESCAPE:
34169 if (!wrapperHasFocus) {
34170 this.eGui.focus();
34171 }
34172 }
34173 };
34174 HeaderFilterCellCtrl.prototype.onFocusIn = function (e) {
34175 var isRelatedWithin = this.eGui.contains(e.relatedTarget);
34176 // when the focus is already within the component,
34177 // we default to the browser's behavior
34178 if (isRelatedWithin) {
34179 return;
34180 }
34181 var notFromHeaderWrapper = !!e.relatedTarget && !e.relatedTarget.classList.contains('ag-floating-filter');
34182 var fromWithinHeader = !!e.relatedTarget && Object(_utils_dom__WEBPACK_IMPORTED_MODULE_7__["isElementChildOfClass"])(e.relatedTarget, 'ag-floating-filter');
34183 if (notFromHeaderWrapper && fromWithinHeader && e.target === this.eGui) {
34184 var lastFocusEvent = this.lastFocusEvent;
34185 var fromTab = !!(lastFocusEvent && lastFocusEvent.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].TAB);
34186 if (lastFocusEvent && fromTab) {
34187 var shouldFocusLast = lastFocusEvent.shiftKey;
34188 this.focusService.focusInto(this.eGui, shouldFocusLast);
34189 }
34190 }
34191 var rowIndex = this.getRowIndex();
34192 this.beans.focusService.setFocusedHeader(rowIndex, this.column);
34193 };
34194 HeaderFilterCellCtrl.prototype.setupHover = function () {
34195 var _this = this;
34196 this.createManagedBean(new _hoverFeature__WEBPACK_IMPORTED_MODULE_10__["HoverFeature"]([this.column], this.eGui));
34197 var listener = function () {
34198 if (!_this.gridOptionsWrapper.isColumnHoverHighlight()) {
34199 return;
34200 }
34201 var hovered = _this.columnHoverService.isHovered(_this.column);
34202 _this.comp.addOrRemoveCssClass('ag-column-hover', hovered);
34203 };
34204 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_HOVER_CHANGED, listener);
34205 listener();
34206 };
34207 HeaderFilterCellCtrl.prototype.setupLeft = function () {
34208 var setLeftFeature = new _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_6__["SetLeftFeature"](this.column, this.eGui, this.beans);
34209 this.createManagedBean(setLeftFeature);
34210 };
34211 HeaderFilterCellCtrl.prototype.setupUserComp = function () {
34212 var _this = this;
34213 if (!this.active) {
34214 return;
34215 }
34216 var colDef = this.column.getColDef();
34217 var filterParams = this.filterManager.createFilterParams(this.column, colDef);
34218 var finalFilterParams = this.userComponentFactory.mergeParamsWithApplicationProvidedParams(colDef, _components_framework_componentTypes__WEBPACK_IMPORTED_MODULE_11__["FilterComponent"], filterParams);
34219 var defaultFloatingFilterType = this.userComponentFactory.getDefaultFloatingFilterType(colDef);
34220 if (defaultFloatingFilterType == null) {
34221 defaultFloatingFilterType = 'agReadOnlyFloatingFilter';
34222 }
34223 var params = {
34224 column: this.column,
34225 filterParams: finalFilterParams,
34226 currentParentModel: function () { return _this.currentParentModel(); },
34227 parentFilterInstance: function (cb) { return _this.parentFilterInstance(cb); },
34228 showParentFilter: function () { return _this.showParentFilter(); },
34229 suppressFilterButton: false // This one might be overridden from the colDef
34230 };
34231 // this is unusual - we need a params value OUTSIDE the component the params are for.
34232 // the params are for the floating filter component, but this property is actually for the wrapper.
34233 this.suppressFilterButton = colDef.floatingFilterComponentParams ? !!colDef.floatingFilterComponentParams.suppressFilterButton : false;
34234 var compDetails = this.userComponentFactory.getFloatingFilterCompDetails(colDef, params, defaultFloatingFilterType);
34235 if (compDetails) {
34236 this.comp.setCompDetails(compDetails);
34237 }
34238 };
34239 HeaderFilterCellCtrl.prototype.currentParentModel = function () {
34240 var filterComponent = this.getFilterComponent(false);
34241 return filterComponent ? filterComponent.resolveNow(null, function (filter) { return filter && filter.getModel(); }) : null;
34242 };
34243 HeaderFilterCellCtrl.prototype.getFilterComponent = function (createIfDoesNotExist) {
34244 if (createIfDoesNotExist === void 0) { createIfDoesNotExist = true; }
34245 return this.filterManager.getFilterComponent(this.column, 'NO_UI', createIfDoesNotExist);
34246 };
34247 HeaderFilterCellCtrl.prototype.parentFilterInstance = function (callback) {
34248 var filterComponent = this.getFilterComponent();
34249 if (filterComponent == null) {
34250 return;
34251 }
34252 filterComponent.then(function (instance) {
34253 callback(Object(_gridApi__WEBPACK_IMPORTED_MODULE_5__["unwrapUserComp"])(instance));
34254 });
34255 };
34256 HeaderFilterCellCtrl.prototype.showParentFilter = function () {
34257 var eventSource = this.suppressFilterButton ? this.eFloatingFilterBody : this.eButtonShowMainFilter;
34258 this.menuFactory.showMenuAfterButtonClick(this.column, eventSource, 'floatingFilter', 'filterMenuTab', ['filterMenuTab']);
34259 };
34260 HeaderFilterCellCtrl.prototype.setupSyncWithFilter = function () {
34261 var _this = this;
34262 if (!this.active) {
34263 return;
34264 }
34265 var syncWithFilter = function (filterChangedEvent) {
34266 var compPromise = _this.comp.getFloatingFilterComp();
34267 if (!compPromise) {
34268 return;
34269 }
34270 var parentModel = _this.currentParentModel();
34271 compPromise.then(function (comp) {
34272 if (comp) {
34273 comp.onParentModelChanged(parentModel, filterChangedEvent);
34274 }
34275 });
34276 };
34277 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_FILTER_CHANGED, syncWithFilter);
34278 if (this.filterManager.isFilterActive(this.column)) {
34279 syncWithFilter(null);
34280 }
34281 };
34282 HeaderFilterCellCtrl.prototype.setupWidth = function () {
34283 var _this = this;
34284 var listener = function () {
34285 var width = _this.column.getActualWidth() + "px";
34286 _this.comp.setWidth(width);
34287 };
34288 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_WIDTH_CHANGED, listener);
34289 listener();
34290 };
34291 __decorate([
34292 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('userComponentFactory')
34293 ], HeaderFilterCellCtrl.prototype, "userComponentFactory", void 0);
34294 __decorate([
34295 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('filterManager')
34296 ], HeaderFilterCellCtrl.prototype, "filterManager", void 0);
34297 __decorate([
34298 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnHoverService')
34299 ], HeaderFilterCellCtrl.prototype, "columnHoverService", void 0);
34300 __decorate([
34301 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('gridApi')
34302 ], HeaderFilterCellCtrl.prototype, "gridApi", void 0);
34303 __decorate([
34304 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('menuFactory')
34305 ], HeaderFilterCellCtrl.prototype, "menuFactory", void 0);
34306 __decorate([
34307 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('beans')
34308 ], HeaderFilterCellCtrl.prototype, "beans", void 0);
34309 return HeaderFilterCellCtrl;
34310}(_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_0__["AbstractHeaderCellCtrl"]));
34311
34312
34313
34314
34315
34316/***/ }),
34317/* 155 */
34318/***/ (function(module, __webpack_exports__, __webpack_require__) {
34319
34320"use strict";
34321__webpack_require__.r(__webpack_exports__);
34322/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractHeaderCellCtrl", function() { return AbstractHeaderCellCtrl; });
34323/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
34324/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
34325/* harmony import */ var _utils_keyboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49);
34326/**
34327 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
34328 * @version v27.3.0
34329 * @link https://www.ag-grid.com/
34330 * @license MIT
34331 */
34332var __extends = (undefined && undefined.__extends) || (function () {
34333 var extendStatics = function (d, b) {
34334 extendStatics = Object.setPrototypeOf ||
34335 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34336 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
34337 return extendStatics(d, b);
34338 };
34339 return function (d, b) {
34340 extendStatics(d, b);
34341 function __() { this.constructor = d; }
34342 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34343 };
34344})();
34345var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34346 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34347 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34348 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
34349 return c > 3 && r && Object.defineProperty(target, key, r), r;
34350};
34351
34352
34353
34354var instanceIdSequence = 0;
34355var AbstractHeaderCellCtrl = /** @class */ (function (_super) {
34356 __extends(AbstractHeaderCellCtrl, _super);
34357 function AbstractHeaderCellCtrl(columnGroupChild, parentRowCtrl) {
34358 var _this = _super.call(this) || this;
34359 _this.lastFocusEvent = null;
34360 _this.columnGroupChild = columnGroupChild;
34361 _this.parentRowCtrl = parentRowCtrl;
34362 // unique id to this instance, including the column ID to help with debugging in React as it's used in 'key'
34363 _this.instanceId = columnGroupChild.getUniqueId() + '-' + instanceIdSequence++;
34364 return _this;
34365 }
34366 AbstractHeaderCellCtrl.prototype.shouldStopEventPropagation = function (e) {
34367 var _a = this.focusService.getFocusedHeader(), headerRowIndex = _a.headerRowIndex, column = _a.column;
34368 return Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_2__["isUserSuppressingHeaderKeyboardEvent"])(this.gridOptionsWrapper, e, headerRowIndex, column);
34369 };
34370 AbstractHeaderCellCtrl.prototype.setGui = function (eGui) {
34371 this.eGui = eGui;
34372 this.addDomData();
34373 };
34374 AbstractHeaderCellCtrl.prototype.addDomData = function () {
34375 var _this = this;
34376 var key = AbstractHeaderCellCtrl.DOM_DATA_KEY_HEADER_CTRL;
34377 this.gridOptionsWrapper.setDomData(this.eGui, key, this);
34378 this.addDestroyFunc(function () { return _this.gridOptionsWrapper.setDomData(_this.eGui, key, null); });
34379 };
34380 AbstractHeaderCellCtrl.prototype.getGui = function () {
34381 return this.eGui;
34382 };
34383 AbstractHeaderCellCtrl.prototype.focus = function (event) {
34384 if (!this.eGui) {
34385 return false;
34386 }
34387 this.lastFocusEvent = event || null;
34388 this.eGui.focus();
34389 return true;
34390 };
34391 AbstractHeaderCellCtrl.prototype.getRowIndex = function () {
34392 return this.parentRowCtrl.getRowIndex();
34393 };
34394 AbstractHeaderCellCtrl.prototype.getParentRowCtrl = function () {
34395 return this.parentRowCtrl;
34396 };
34397 AbstractHeaderCellCtrl.prototype.getPinned = function () {
34398 return this.parentRowCtrl.getPinned();
34399 };
34400 AbstractHeaderCellCtrl.prototype.getInstanceId = function () {
34401 return this.instanceId;
34402 };
34403 AbstractHeaderCellCtrl.prototype.getColumnGroupChild = function () {
34404 return this.columnGroupChild;
34405 };
34406 AbstractHeaderCellCtrl.DOM_DATA_KEY_HEADER_CTRL = 'headerCtrl';
34407 __decorate([
34408 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('focusService')
34409 ], AbstractHeaderCellCtrl.prototype, "focusService", void 0);
34410 return AbstractHeaderCellCtrl;
34411}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
34412
34413
34414
34415
34416
34417/***/ }),
34418/* 156 */
34419/***/ (function(module, __webpack_exports__, __webpack_require__) {
34420
34421"use strict";
34422__webpack_require__.r(__webpack_exports__);
34423/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unwrapUserComp", function() { return unwrapUserComp; });
34424/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridApi", function() { return GridApi; });
34425/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
34426/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
34427/* harmony import */ var _entities_sideBar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(113);
34428/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(112);
34429/* harmony import */ var _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(157);
34430/* harmony import */ var _interfaces_iExcelCreator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(105);
34431/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(16);
34432/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(17);
34433/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14);
34434/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7);
34435/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(13);
34436/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(26);
34437/**
34438 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
34439 * @version v27.3.0
34440 * @link https://www.ag-grid.com/
34441 * @license MIT
34442 */
34443var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34444 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34445 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34446 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
34447 return c > 3 && r && Object.defineProperty(target, key, r), r;
34448};
34449
34450
34451
34452
34453
34454
34455
34456
34457
34458
34459
34460
34461function unwrapUserComp(comp) {
34462 var compAsAny = comp;
34463 var isProxy = compAsAny != null && compAsAny.getFrameworkComponentInstance != null;
34464 return isProxy ? compAsAny.getFrameworkComponentInstance() : comp;
34465}
34466var GridApi = /** @class */ (function () {
34467 function GridApi() {
34468 this.detailGridInfoMap = {};
34469 this.destroyCalled = false;
34470 }
34471 GridApi.prototype.registerOverlayWrapperComp = function (overlayWrapperComp) {
34472 this.overlayWrapperComp = overlayWrapperComp;
34473 };
34474 GridApi.prototype.registerSideBarComp = function (sideBarComp) {
34475 this.sideBarComp = sideBarComp;
34476 };
34477 GridApi.prototype.init = function () {
34478 var _this = this;
34479 switch (this.rowModel.getType()) {
34480 case _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE:
34481 this.clientSideRowModel = this.rowModel;
34482 break;
34483 case _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_INFINITE:
34484 this.infiniteRowModel = this.rowModel;
34485 break;
34486 case _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_SERVER_SIDE:
34487 this.serverSideRowModel = this.rowModel;
34488 break;
34489 }
34490 this.ctrlsService.whenReady(function () {
34491 _this.gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();
34492 });
34493 };
34494 /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */
34495 GridApi.prototype.__getAlignedGridService = function () {
34496 return this.alignedGridsService;
34497 };
34498 /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */
34499 GridApi.prototype.__getContext = function () {
34500 return this.context;
34501 };
34502 /** Register a detail grid with the master grid when it is created. */
34503 GridApi.prototype.addDetailGridInfo = function (id, gridInfo) {
34504 this.detailGridInfoMap[id] = gridInfo;
34505 };
34506 /** Unregister a detail grid from the master grid when it is destroyed. */
34507 GridApi.prototype.removeDetailGridInfo = function (id) {
34508 this.detailGridInfoMap[id] = undefined;
34509 };
34510 /** Returns the `DetailGridInfo` corresponding to the supplied `detailGridId`. */
34511 GridApi.prototype.getDetailGridInfo = function (id) {
34512 return this.detailGridInfoMap[id];
34513 };
34514 /** Iterates through each `DetailGridInfo` in the grid and calls the supplied callback on each. */
34515 GridApi.prototype.forEachDetailGridInfo = function (callback) {
34516 var index = 0;
34517 Object(_utils_object__WEBPACK_IMPORTED_MODULE_10__["iterateObject"])(this.detailGridInfoMap, function (id, gridInfo) {
34518 // check for undefined, as old references will still be lying around
34519 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(gridInfo)) {
34520 callback(gridInfo, index);
34521 index++;
34522 }
34523 });
34524 };
34525 /** Similar to `exportDataAsCsv`, except returns the result as a string rather than download it. */
34526 GridApi.prototype.getDataAsCsv = function (params) {
34527 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].CsvExportModule, 'api.getDataAsCsv')) {
34528 return this.csvCreator.getDataAsCsv(params);
34529 }
34530 };
34531 /** Downloads a CSV export of the grid's data. */
34532 GridApi.prototype.exportDataAsCsv = function (params) {
34533 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].CsvExportModule, 'api.exportDataAsCSv')) {
34534 this.csvCreator.exportDataAsCsv(params);
34535 }
34536 };
34537 GridApi.prototype.getExcelExportMode = function (params) {
34538 var baseParams = this.gridOptionsWrapper.getDefaultExportParams('excel');
34539 var mergedParams = Object.assign({ exportMode: 'xlsx' }, baseParams, params);
34540 return mergedParams.exportMode;
34541 };
34542 /** Similar to `exportDataAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. */
34543 GridApi.prototype.getDataAsExcel = function (params) {
34544 if (!_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].ExcelExportModule, 'api.getDataAsExcel')) {
34545 return;
34546 }
34547 var exportMode = this.getExcelExportMode(params);
34548 if (this.excelCreator.getFactoryMode(exportMode) === _interfaces_iExcelCreator__WEBPACK_IMPORTED_MODULE_5__["ExcelFactoryMode"].MULTI_SHEET) {
34549 console.warn('AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`');
34550 return;
34551 }
34552 return this.excelCreator.getDataAsExcel(params);
34553 };
34554 /** Downloads an Excel export of the grid's data. */
34555 GridApi.prototype.exportDataAsExcel = function (params) {
34556 if (!_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].ExcelExportModule, 'api.exportDataAsExcel')) {
34557 return;
34558 }
34559 var exportMode = this.getExcelExportMode(params);
34560 if (this.excelCreator.getFactoryMode(exportMode) === _interfaces_iExcelCreator__WEBPACK_IMPORTED_MODULE_5__["ExcelFactoryMode"].MULTI_SHEET) {
34561 console.warn('AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`');
34562 return;
34563 }
34564 this.excelCreator.exportDataAsExcel(params);
34565 };
34566 /** This is method to be used to get the grid's data as a sheet, that will later be exported either by `getMultipleSheetsAsExcel()` or `exportMultipleSheetsAsExcel()`. */
34567 GridApi.prototype.getSheetDataForExcel = function (params) {
34568 if (!_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].ExcelExportModule, 'api.getSheetDataForExcel')) {
34569 return;
34570 }
34571 var exportMode = this.getExcelExportMode(params);
34572 this.excelCreator.setFactoryMode(_interfaces_iExcelCreator__WEBPACK_IMPORTED_MODULE_5__["ExcelFactoryMode"].MULTI_SHEET, exportMode);
34573 return this.excelCreator.getSheetDataForExcel(params);
34574 };
34575 /** Similar to `exportMultipleSheetsAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. */
34576 GridApi.prototype.getMultipleSheetsAsExcel = function (params) {
34577 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].ExcelExportModule, 'api.getMultipleSheetsAsExcel')) {
34578 return this.excelCreator.getMultipleSheetsAsExcel(params);
34579 }
34580 };
34581 /** Downloads an Excel export of multiple sheets in one file. */
34582 GridApi.prototype.exportMultipleSheetsAsExcel = function (params) {
34583 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].ExcelExportModule, 'api.exportMultipleSheetsAsExcel')) {
34584 return this.excelCreator.exportMultipleSheetsAsExcel(params);
34585 }
34586 };
34587 /** @deprecated */
34588 GridApi.prototype.setEnterpriseDatasource = function (datasource) {
34589 console.warn("AG Grid: since version 18.x, api.setEnterpriseDatasource() should be replaced with api.setServerSideDatasource()");
34590 this.setServerSideDatasource(datasource);
34591 };
34592 /**
34593 * Sets an ARIA property in the grid panel (element with `role=\"grid\"`), and removes an ARIA property when the value is null.
34594 *
34595 * Example: `api.setGridAriaProperty('label', 'my grid')` will set `aria-label=\"my grid\"`.
34596 *
34597 * `api.setGridAriaProperty('label', null)` will remove the `aria-label` attribute from the grid element.
34598 */
34599 GridApi.prototype.setGridAriaProperty = function (property, value) {
34600 if (!property) {
34601 return;
34602 }
34603 var eGrid = this.ctrlsService.getGridBodyCtrl().getGui();
34604 var ariaProperty = "aria-" + property;
34605 if (value === null) {
34606 eGrid.removeAttribute(ariaProperty);
34607 }
34608 else {
34609 eGrid.setAttribute(ariaProperty, value);
34610 }
34611 };
34612 /** Set new datasource for Server-Side Row Model. */
34613 GridApi.prototype.setServerSideDatasource = function (datasource) {
34614 if (this.serverSideRowModel) {
34615 // should really have an IEnterpriseRowModel interface, so we are not casting to any
34616 this.serverSideRowModel.setDatasource(datasource);
34617 }
34618 else {
34619 console.warn("AG Grid: you can only use an enterprise datasource when gridOptions.rowModelType is '" + _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_SERVER_SIDE + "'");
34620 }
34621 };
34622 /** Set new datasource for Infinite Row Model. */
34623 GridApi.prototype.setDatasource = function (datasource) {
34624 if (this.gridOptionsWrapper.isRowModelInfinite()) {
34625 this.rowModel.setDatasource(datasource);
34626 }
34627 else {
34628 console.warn("AG Grid: you can only use a datasource when gridOptions.rowModelType is '" + _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_INFINITE + "'");
34629 }
34630 };
34631 /** Set new datasource for Viewport Row Model. */
34632 GridApi.prototype.setViewportDatasource = function (viewportDatasource) {
34633 if (this.gridOptionsWrapper.isRowModelViewport()) {
34634 // this is bad coding, because it's using an interface that's exposed in the enterprise.
34635 // really we should create an interface in the core for viewportDatasource and let
34636 // the enterprise implement it, rather than casting to 'any' here
34637 this.rowModel.setViewportDatasource(viewportDatasource);
34638 }
34639 else {
34640 console.warn("AG Grid: you can only use a viewport datasource when gridOptions.rowModelType is '" + _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_VIEWPORT + "'");
34641 }
34642 };
34643 /** Set the row data. */
34644 GridApi.prototype.setRowData = function (rowData) {
34645 // immutable service is part of the CSRM module, if missing, no CSRM
34646 var missingImmutableService = this.immutableService == null;
34647 if (missingImmutableService) {
34648 console.warn('AG Grid: you can only set rowData when using the Client Side Row Model');
34649 return;
34650 }
34651 // if no keys provided provided for rows, then we can tread the operation as Immutable
34652 if (this.immutableService.isActive()) {
34653 this.immutableService.setRowData(rowData);
34654 }
34655 else {
34656 this.selectionService.reset();
34657 this.clientSideRowModel.setRowData(rowData);
34658 }
34659 };
34660 /** @deprecated */
34661 GridApi.prototype.setFloatingTopRowData = function (rows) {
34662 console.warn('AG Grid: since v12, api.setFloatingTopRowData() is now api.setPinnedTopRowData()');
34663 this.setPinnedTopRowData(rows);
34664 };
34665 /** @deprecated */
34666 GridApi.prototype.setFloatingBottomRowData = function (rows) {
34667 console.warn('AG Grid: since v12, api.setFloatingBottomRowData() is now api.setPinnedBottomRowData()');
34668 this.setPinnedBottomRowData(rows);
34669 };
34670 /** @deprecated */
34671 GridApi.prototype.getFloatingTopRowCount = function () {
34672 console.warn('AG Grid: since v12, api.getFloatingTopRowCount() is now api.getPinnedTopRowCount()');
34673 return this.getPinnedTopRowCount();
34674 };
34675 /** @deprecated */
34676 GridApi.prototype.getFloatingBottomRowCount = function () {
34677 console.warn('AG Grid: since v12, api.getFloatingBottomRowCount() is now api.getPinnedBottomRowCount()');
34678 return this.getPinnedBottomRowCount();
34679 };
34680 /** @deprecated */
34681 GridApi.prototype.getFloatingTopRow = function (index) {
34682 console.warn('AG Grid: since v12, api.getFloatingTopRow() is now api.getPinnedTopRow()');
34683 return this.getPinnedTopRow(index);
34684 };
34685 /** @deprecated */
34686 GridApi.prototype.getFloatingBottomRow = function (index) {
34687 console.warn('AG Grid: since v12, api.getFloatingBottomRow() is now api.getPinnedBottomRow()');
34688 return this.getPinnedBottomRow(index);
34689 };
34690 /** Set the top pinned rows. Call with no rows / undefined to clear top pinned rows. */
34691 GridApi.prototype.setPinnedTopRowData = function (rows) {
34692 this.pinnedRowModel.setPinnedTopRowData(rows);
34693 };
34694 /** Set the bottom pinned rows. Call with no rows / undefined to clear bottom pinned rows. */
34695 GridApi.prototype.setPinnedBottomRowData = function (rows) {
34696 this.pinnedRowModel.setPinnedBottomRowData(rows);
34697 };
34698 /** Gets the number of top pinned rows. */
34699 GridApi.prototype.getPinnedTopRowCount = function () {
34700 return this.pinnedRowModel.getPinnedTopRowCount();
34701 };
34702 /** Gets the number of bottom pinned rows. */
34703 GridApi.prototype.getPinnedBottomRowCount = function () {
34704 return this.pinnedRowModel.getPinnedBottomRowCount();
34705 };
34706 /** Gets the top pinned row with the specified index. */
34707 GridApi.prototype.getPinnedTopRow = function (index) {
34708 return this.pinnedRowModel.getPinnedTopRow(index);
34709 };
34710 /** Gets the top pinned row with the specified index. */
34711 GridApi.prototype.getPinnedBottomRow = function (index) {
34712 return this.pinnedRowModel.getPinnedBottomRow(index);
34713 };
34714 /**
34715 * Call to set new column definitions. The grid will redraw all the column headers, and then redraw all of the rows.
34716 */
34717 GridApi.prototype.setColumnDefs = function (colDefs, source) {
34718 if (source === void 0) { source = "api"; }
34719 this.columnModel.setColumnDefs(colDefs, source);
34720 };
34721 /** Call to set new auto group column definition. The grid will recreate any auto-group columns if present. */
34722 GridApi.prototype.setAutoGroupColumnDef = function (colDef, source) {
34723 if (source === void 0) { source = "api"; }
34724 this.gridOptionsWrapper.setProperty('autoGroupColumnDef', colDef, true);
34725 };
34726 /** Call to set new Default Column Definition. */
34727 GridApi.prototype.setDefaultColDef = function (colDef, source) {
34728 if (source === void 0) { source = "api"; }
34729 this.gridOptionsWrapper.setProperty('defaultColDef', colDef, true);
34730 };
34731 GridApi.prototype.expireValueCache = function () {
34732 this.valueCache.expire();
34733 };
34734 /**
34735 * Returns an object with two properties:
34736 * - `top`: The top pixel position of the current scroll in the grid
34737 * - `bottom`: The bottom pixel position of the current scroll in the grid
34738 */
34739 GridApi.prototype.getVerticalPixelRange = function () {
34740 return this.gridBodyCtrl.getScrollFeature().getVScrollPosition();
34741 };
34742 /**
34743 * Returns an object with two properties:
34744 * - `left`: The left pixel position of the current scroll in the grid
34745 * - `right`: The right pixel position of the current scroll in the grid
34746 */
34747 GridApi.prototype.getHorizontalPixelRange = function () {
34748 return this.gridBodyCtrl.getScrollFeature().getHScrollPosition();
34749 };
34750 /** If `true`, the horizontal scrollbar will always be present, even if not required. Otherwise, it will only be displayed when necessary. */
34751 GridApi.prototype.setAlwaysShowHorizontalScroll = function (show) {
34752 this.gridOptionsWrapper.setProperty('alwaysShowHorizontalScroll', show);
34753 };
34754 /** If `true`, the vertical scrollbar will always be present, even if not required. Otherwise it will only be displayed when necessary. */
34755 GridApi.prototype.setAlwaysShowVerticalScroll = function (show) {
34756 this.gridOptionsWrapper.setProperty('alwaysShowVerticalScroll', show);
34757 };
34758 /** Force refresh all tool panels by calling their `refresh` method. */
34759 GridApi.prototype.refreshToolPanel = function () {
34760 if (!this.sideBarComp) {
34761 return;
34762 }
34763 this.sideBarComp.refresh();
34764 };
34765 /** Performs change detection on all cells, refreshing cells where required. */
34766 GridApi.prototype.refreshCells = function (params) {
34767 if (params === void 0) { params = {}; }
34768 if (Array.isArray(params)) {
34769 // the old version of refreshCells() took an array of rowNodes for the first argument
34770 console.warn('since AG Grid v11.1, refreshCells() now takes parameters, please see the documentation.');
34771 return;
34772 }
34773 this.rowRenderer.refreshCells(params);
34774 };
34775 /** Flash rows, columns or individual cells. */
34776 GridApi.prototype.flashCells = function (params) {
34777 if (params === void 0) { params = {}; }
34778 this.rowRenderer.flashCells(params);
34779 };
34780 /** Remove row(s) from the DOM and recreate them again from scratch. */
34781 GridApi.prototype.redrawRows = function (params) {
34782 if (params === void 0) { params = {}; }
34783 var rowNodes = params ? params.rowNodes : undefined;
34784 this.rowRenderer.redrawRows(rowNodes);
34785 };
34786 GridApi.prototype.setFunctionsReadOnly = function (readOnly) {
34787 this.gridOptionsWrapper.setProperty('functionsReadOnly', readOnly);
34788 };
34789 /** Redraws the header. Useful if a column name changes, or something else that changes how the column header is displayed. */
34790 GridApi.prototype.refreshHeader = function () {
34791 this.ctrlsService.getHeaderRowContainerCtrls().forEach(function (c) { return c.refresh(); });
34792 };
34793 /** Returns `true` if any filter is set. This includes quick filter, advanced filter or external filter. */
34794 GridApi.prototype.isAnyFilterPresent = function () {
34795 return this.filterManager.isAnyFilterPresent();
34796 };
34797 /** Returns `true` if any column filter is set, otherwise `false`. */
34798 GridApi.prototype.isColumnFilterPresent = function () {
34799 return this.filterManager.isColumnFilterPresent() || this.filterManager.isAggregateFilterPresent();
34800 };
34801 /** Returns `true` if the quick filter is set, otherwise `false`. */
34802 GridApi.prototype.isQuickFilterPresent = function () {
34803 return this.filterManager.isQuickFilterPresent();
34804 };
34805 /**
34806 * Returns the row model inside the table.
34807 * From here you can see the original rows, rows after filter has been applied,
34808 * rows after aggregation has been applied, and the final set of 'to be displayed' rows.
34809 */
34810 GridApi.prototype.getModel = function () {
34811 return this.rowModel;
34812 };
34813 /** Expand or collapse a specific row node. */
34814 GridApi.prototype.setRowNodeExpanded = function (rowNode, expanded) {
34815 if (rowNode) {
34816 rowNode.setExpanded(expanded);
34817 }
34818 };
34819 /**
34820 * If after getting the model, you expand or collapse a group, call this method to inform the grid.
34821 * It will work out the final set of 'to be displayed' rows again (i.e. expand or collapse the group visually).
34822 */
34823 GridApi.prototype.onGroupExpandedOrCollapsed = function (deprecated_refreshFromIndex) {
34824 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.clientSideRowModel)) {
34825 console.warn('AG Grid: cannot call onGroupExpandedOrCollapsed unless using normal row model');
34826 }
34827 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(deprecated_refreshFromIndex)) {
34828 console.warn('AG Grid: api.onGroupExpandedOrCollapsed - refreshFromIndex parameter is no longer used, the grid will refresh all rows');
34829 }
34830 // we don't really want the user calling this if only one rowNode was expanded, instead they should be
34831 // calling rowNode.setExpanded(boolean) - this way we do a 'keepRenderedRows=false' so that the whole
34832 // grid gets refreshed again - otherwise the row with the rowNodes that were changed won't get updated,
34833 // and thus the expand icon in the group cell won't get 'opened' or 'closed'.
34834 this.clientSideRowModel.refreshModel({ step: _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_4__["ClientSideRowModelSteps"].MAP });
34835 };
34836 GridApi.prototype.refreshInMemoryRowModel = function (step) {
34837 console.warn("ag-grid: since version 18.x, api.refreshInMemoryRowModel() should be replaced with api.refreshClientSideRowModel()");
34838 this.refreshClientSideRowModel(step);
34839 };
34840 /** Gets the Client-Side Row Model to refresh, executing the grouping, filtering and sorting again. */
34841 GridApi.prototype.refreshClientSideRowModel = function (step) {
34842 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.clientSideRowModel)) {
34843 console.warn('cannot call refreshClientSideRowModel unless using normal row model');
34844 }
34845 var paramsStep = _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_4__["ClientSideRowModelSteps"].EVERYTHING;
34846 var stepsMapped = {
34847 group: _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_4__["ClientSideRowModelSteps"].EVERYTHING,
34848 filter: _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_4__["ClientSideRowModelSteps"].FILTER,
34849 map: _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_4__["ClientSideRowModelSteps"].MAP,
34850 aggregate: _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_4__["ClientSideRowModelSteps"].AGGREGATE,
34851 sort: _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_4__["ClientSideRowModelSteps"].SORT,
34852 pivot: _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_4__["ClientSideRowModelSteps"].PIVOT
34853 };
34854 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(step)) {
34855 paramsStep = stepsMapped[step];
34856 }
34857 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(paramsStep)) {
34858 console.error("AG Grid: invalid step " + step + ", available steps are " + Object.keys(stepsMapped).join(', '));
34859 return;
34860 }
34861 var animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();
34862 var modelParams = {
34863 step: paramsStep,
34864 keepRenderedRows: true,
34865 keepEditingRows: true,
34866 animate: animate
34867 };
34868 this.clientSideRowModel.refreshModel(modelParams);
34869 };
34870 /** Returns `true` when there are no more animation frames left to process. */
34871 GridApi.prototype.isAnimationFrameQueueEmpty = function () {
34872 return this.animationFrameService.isQueueEmpty();
34873 };
34874 GridApi.prototype.flushAllAnimationFrames = function () {
34875 this.animationFrameService.flushAllFrames();
34876 };
34877 /**
34878 * Returns the row node with the given ID.
34879 * The row node ID is the one you provide from the callback `getRowId(params)`,
34880 * otherwise the ID is a number (cast as string) auto-generated by the grid when
34881 * the row data is set.
34882 */
34883 GridApi.prototype.getRowNode = function (id) {
34884 return this.rowModel.getRowNode(id);
34885 };
34886 /**
34887 * Gets the sizes that various UI elements will be rendered at with the current theme.
34888 * If you override the row or header height using `gridOptions`, the override value you provided will be returned.
34889 */
34890 GridApi.prototype.getSizesForCurrentTheme = function () {
34891 return {
34892 rowHeight: this.gridOptionsWrapper.getRowHeightAsNumber(),
34893 headerHeight: this.gridOptionsWrapper.getHeaderHeight()
34894 };
34895 };
34896 /** Expand all groups. */
34897 GridApi.prototype.expandAll = function () {
34898 if (this.clientSideRowModel) {
34899 this.clientSideRowModel.expandOrCollapseAll(true);
34900 }
34901 else if (this.serverSideRowModel) {
34902 this.serverSideRowModel.expandAll(true);
34903 }
34904 else {
34905 console.warn('AG Grid: expandAll only works with Client Side Row Model and Server Side Row Model');
34906 }
34907 };
34908 /** Collapse all groups. */
34909 GridApi.prototype.collapseAll = function () {
34910 if (this.clientSideRowModel) {
34911 this.clientSideRowModel.expandOrCollapseAll(false);
34912 }
34913 else if (this.serverSideRowModel) {
34914 this.serverSideRowModel.expandAll(false);
34915 }
34916 else {
34917 console.warn('AG Grid: collapseAll only works with Client Side Row Model and Server Side Row Model');
34918 }
34919 };
34920 /** Gets the tool panel instance corresponding to the supplied `id`. */
34921 GridApi.prototype.getToolPanelInstance = function (id) {
34922 if (!this.sideBarComp) {
34923 console.warn('AG Grid: toolPanel is only available in AG Grid Enterprise');
34924 return;
34925 }
34926 var comp = this.sideBarComp.getToolPanelInstance(id);
34927 return unwrapUserComp(comp);
34928 };
34929 GridApi.prototype.addVirtualRowListener = function (eventName, rowIndex, callback) {
34930 if (typeof eventName !== 'string') {
34931 console.warn('AG Grid: addVirtualRowListener is deprecated, please use addRenderedRowListener.');
34932 }
34933 this.addRenderedRowListener(eventName, rowIndex, callback);
34934 };
34935 /**
34936 * Registers a callback to a virtual row.
34937 * A virtual row is a row that is visually rendered on the screen (rows that are not visible because of the scroll position are not rendered).
34938 * Unlike normal events, you do not need to unregister rendered row listeners.
34939 * When the rendered row is removed from the grid, all associated rendered row listeners will also be removed.
34940 * Currently supports only one event, `virtualRowRemoved`;
34941 * listen for this event if your `cellRenderer` needs to do cleanup when the row no longer exists.
34942 */
34943 GridApi.prototype.addRenderedRowListener = function (eventName, rowIndex, callback) {
34944 if (eventName === 'virtualRowSelected') {
34945 console.warn("AG Grid: event virtualRowSelected is deprecated, to register for individual row\n selection events, add a listener directly to the row node.");
34946 }
34947 this.rowRenderer.addRenderedRowListener(eventName, rowIndex, callback);
34948 };
34949 /** Pass a quick filter text into the grid for filtering. */
34950 GridApi.prototype.setQuickFilter = function (newFilter) {
34951 this.filterManager.setQuickFilter(newFilter);
34952 };
34953 GridApi.prototype.selectIndex = function (index, tryMulti, suppressEvents) {
34954 console.warn('AG Grid: do not use api for selection, call node.setSelected(value) instead');
34955 if (suppressEvents) {
34956 console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');
34957 }
34958 this.selectionService.selectIndex(index, tryMulti);
34959 };
34960 GridApi.prototype.deselectIndex = function (index, suppressEvents) {
34961 if (suppressEvents === void 0) { suppressEvents = false; }
34962 console.warn('AG Grid: do not use api for selection, call node.setSelected(value) instead');
34963 if (suppressEvents) {
34964 console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');
34965 }
34966 this.selectionService.deselectIndex(index);
34967 };
34968 GridApi.prototype.selectNode = function (node, tryMulti, suppressEvents) {
34969 if (tryMulti === void 0) { tryMulti = false; }
34970 if (suppressEvents === void 0) { suppressEvents = false; }
34971 console.warn('AG Grid: API for selection is deprecated, call node.setSelected(value) instead');
34972 if (suppressEvents) {
34973 console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');
34974 }
34975 node.setSelectedParams({ newValue: true, clearSelection: !tryMulti });
34976 };
34977 GridApi.prototype.deselectNode = function (node, suppressEvents) {
34978 if (suppressEvents === void 0) { suppressEvents = false; }
34979 console.warn('AG Grid: API for selection is deprecated, call node.setSelected(value) instead');
34980 if (suppressEvents) {
34981 console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');
34982 }
34983 node.setSelectedParams({ newValue: false });
34984 };
34985 /** Select all rows, regardless of filtering and rows that are not visible due to grouping being enabled and their groups not expanded. */
34986 GridApi.prototype.selectAll = function () {
34987 this.selectionService.selectAllRowNodes();
34988 };
34989 /** Clear all row selections, regardless of filtering. */
34990 GridApi.prototype.deselectAll = function () {
34991 this.selectionService.deselectAllRowNodes();
34992 };
34993 /** Select all filtered rows. */
34994 GridApi.prototype.selectAllFiltered = function () {
34995 this.selectionService.selectAllRowNodes(true);
34996 };
34997 /** Clear all filtered selections. */
34998 GridApi.prototype.deselectAllFiltered = function () {
34999 this.selectionService.deselectAllRowNodes(true);
35000 };
35001 GridApi.prototype.recomputeAggregates = function () {
35002 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.clientSideRowModel)) {
35003 console.warn('cannot call recomputeAggregates unless using normal row model');
35004 }
35005 console.warn("recomputeAggregates is deprecated, please call api.refreshClientSideRowModel('aggregate') instead");
35006 this.clientSideRowModel.refreshModel({ step: _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_4__["ClientSideRowModelSteps"].AGGREGATE });
35007 };
35008 /** Sets columns to adjust in size to fit the grid horizontally. */
35009 GridApi.prototype.sizeColumnsToFit = function () {
35010 this.gridBodyCtrl.sizeColumnsToFit();
35011 };
35012 /** Show the 'loading' overlay. */
35013 GridApi.prototype.showLoadingOverlay = function () {
35014 this.overlayWrapperComp.showLoadingOverlay();
35015 };
35016 /** Show the 'no rows' overlay. */
35017 GridApi.prototype.showNoRowsOverlay = function () {
35018 this.overlayWrapperComp.showNoRowsOverlay();
35019 };
35020 /** Hides the overlay if showing. */
35021 GridApi.prototype.hideOverlay = function () {
35022 this.overlayWrapperComp.hideOverlay();
35023 };
35024 GridApi.prototype.isNodeSelected = function (node) {
35025 console.warn('AG Grid: no need to call api.isNodeSelected(), just call node.isSelected() instead');
35026 return node.isSelected();
35027 };
35028 GridApi.prototype.getSelectedNodesById = function () {
35029 console.error('AG Grid: since version 3.4, getSelectedNodesById no longer exists, use getSelectedNodes() instead');
35030 return null;
35031 };
35032 /**
35033 * Returns a list of selected nodes.
35034 * Getting the underlying node (rather than the data) is useful when working with tree / aggregated data,
35035 * as the node can be traversed.
35036 */
35037 GridApi.prototype.getSelectedNodes = function () {
35038 return this.selectionService.getSelectedNodes();
35039 };
35040 /** Returns a list of selected rows (i.e. row data that you provided). */
35041 GridApi.prototype.getSelectedRows = function () {
35042 return this.selectionService.getSelectedRows();
35043 };
35044 /**
35045 * Returns a list of all selected nodes at 'best cost', a feature to be used with groups / trees.
35046 * If a group has all its children selected, then the group appears in the result, but not the children.
35047 * Designed for use with `'children'` as the group selection type, where groups don't actually appear in the selection normally.
35048 */
35049 GridApi.prototype.getBestCostNodeSelection = function () {
35050 return this.selectionService.getBestCostNodeSelection();
35051 };
35052 /** Retrieve rendered nodes. Due to virtualisation this will contain only the current visible rows and those in the buffer. */
35053 GridApi.prototype.getRenderedNodes = function () {
35054 return this.rowRenderer.getRenderedNodes();
35055 };
35056 GridApi.prototype.ensureColIndexVisible = function (index) {
35057 console.warn('AG Grid: ensureColIndexVisible(index) no longer supported, use ensureColumnVisible(colKey) instead.');
35058 };
35059 /**
35060 * Ensures the column is visible by scrolling the table if needed.
35061 * @param key - The column to ensure visible
35062 * @param position - Where the column will be positioned.
35063 * - `auto` - Scrolls the minimum amount to make sure the column is visible.
35064 * - `start` - Scrolls the column to the start of the viewport.
35065 * - `middle` - Scrolls the column to the middle of the viewport.
35066 * - `end` - Scrolls the column to the end of the viewport.
35067 */
35068 GridApi.prototype.ensureColumnVisible = function (key, position) {
35069 if (position === void 0) { position = 'auto'; }
35070 this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(key, position);
35071 };
35072 /**
35073 * Ensures the row index is visible by vertically scrolling the grid.
35074 * If a position of `'top'`, `'middle'` or `'bottom'` is supplied, the grid will scroll the grid to place the row at the top, middle or bottom respectively.
35075 * Otherwise, the grid will do the minimum scrolling possible to show the row.
35076 * i.e.
35077 * - if the grid needs to scroll up then it will scroll so that the row is at the top,
35078 * - if the grid needs to scroll down then it will scroll so that the row is at the bottom,
35079 * - if the row is already in view then the grid will do nothing.
35080 */
35081 GridApi.prototype.ensureIndexVisible = function (index, position) {
35082 this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(index, position);
35083 };
35084 /**
35085 * Ensures a row node is visible, scrolling the grid if needed.
35086 * Provide either:
35087 * - the node,
35088 * - the data object
35089 * - a comparator function (that takes the node as a parameter, and returns `true` for match or `false` for no match).
35090 */
35091 GridApi.prototype.ensureNodeVisible = function (comparator, position) {
35092 if (position === void 0) { position = null; }
35093 this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(comparator, position);
35094 };
35095 /**
35096 * Similar to `forEachNode`, except lists all the leaf nodes.
35097 * This effectively goes through all the data that you provided to the grid before the grid performed any grouping.
35098 * If using tree data, goes through all the nodes for the data you provided, including nodes that have children,
35099 * but excluding groups the grid created where gaps were missing in the hierarchy.
35100 */
35101 GridApi.prototype.forEachLeafNode = function (callback) {
35102 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.clientSideRowModel)) {
35103 console.warn('cannot call forEachNode unless using normal row model');
35104 }
35105 this.clientSideRowModel.forEachLeafNode(callback);
35106 };
35107 /**
35108 * Iterates through each node (row) in the grid and calls the callback for each node.
35109 * This works similar to the `forEach` method on a JavaScript array.
35110 * This is called for every node, ignoring any filtering or sorting applied within the grid.
35111 * If using the Infinite Row Model, then this gets called for each page loaded in the page cache.
35112 */
35113 GridApi.prototype.forEachNode = function (callback) {
35114 this.rowModel.forEachNode(callback);
35115 };
35116 /** Similar to `forEachNode`, except skips any filtered out data. */
35117 GridApi.prototype.forEachNodeAfterFilter = function (callback) {
35118 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.clientSideRowModel)) {
35119 console.warn('cannot call forEachNodeAfterFilter unless using normal row model');
35120 }
35121 this.clientSideRowModel.forEachNodeAfterFilter(callback);
35122 };
35123 /** Similar to `forEachNodeAfterFilter`, except the callbacks are called in the order the rows are displayed in the grid. */
35124 GridApi.prototype.forEachNodeAfterFilterAndSort = function (callback) {
35125 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.clientSideRowModel)) {
35126 console.warn('cannot call forEachNodeAfterFilterAndSort unless using normal row model');
35127 }
35128 this.clientSideRowModel.forEachNodeAfterFilterAndSort(callback);
35129 };
35130 /**
35131 * Returns the filter component instance for a column.
35132 * `key` can be a string field name or a ColDef object (matches on object reference, useful if field names are not unique).
35133 * If your filter is created asynchronously, `getFilterInstance` will return `null` so you will need to use the `callback` to access the filter instance instead.
35134 */
35135 GridApi.prototype.getFilterInstance = function (key, callback) {
35136 var res = this.getFilterInstanceImpl(key, function (instance) {
35137 if (!callback) {
35138 return;
35139 }
35140 var unwrapped = unwrapUserComp(instance);
35141 callback(unwrapped);
35142 });
35143 var unwrapped = unwrapUserComp(res);
35144 return unwrapped;
35145 };
35146 GridApi.prototype.getFilterInstanceImpl = function (key, callback) {
35147 var column = this.columnModel.getPrimaryColumn(key);
35148 if (!column) {
35149 return undefined;
35150 }
35151 var filterPromise = this.filterManager.getFilterComponent(column, 'NO_UI');
35152 var currentValue = filterPromise && filterPromise.resolveNow(null, function (filterComp) { return filterComp; });
35153 if (currentValue) {
35154 setTimeout(callback, 0, currentValue);
35155 }
35156 else if (filterPromise) {
35157 filterPromise.then(function (comp) {
35158 callback(comp);
35159 });
35160 }
35161 return currentValue;
35162 };
35163 /** Destroys a filter. Useful to force a particular filter to be created from scratch again. */
35164 GridApi.prototype.destroyFilter = function (key) {
35165 var column = this.columnModel.getPrimaryColumn(key);
35166 if (column) {
35167 return this.filterManager.destroyFilter(column, "filterDestroyed");
35168 }
35169 };
35170 /** Gets the status panel instance corresponding to the supplied `id`. */
35171 GridApi.prototype.getStatusPanel = function (key) {
35172 if (!this.statusBarService) {
35173 return;
35174 }
35175 var comp = this.statusBarService.getStatusPanel(key);
35176 return unwrapUserComp(comp);
35177 };
35178 GridApi.prototype.getColumnDef = function (key) {
35179 var column = this.columnModel.getPrimaryColumn(key);
35180 if (column) {
35181 return column.getColDef();
35182 }
35183 return null;
35184 };
35185 /**
35186 * Returns the current column definitions.
35187 */
35188 GridApi.prototype.getColumnDefs = function () { return this.columnModel.getColumnDefs(); };
35189 /** Informs the grid that a filter has changed. This is typically called after a filter change through one of the filter APIs. */
35190 GridApi.prototype.onFilterChanged = function () {
35191 this.filterManager.onFilterChanged();
35192 };
35193 /**
35194 * Gets the grid to act as if the sort was changed.
35195 * Useful if you update some values and want to get the grid to reorder them according to the new values.
35196 */
35197 GridApi.prototype.onSortChanged = function () {
35198 this.sortController.onSortChanged('api');
35199 };
35200 /** Sets the state of all the advanced filters. Provide it with what you get from `getFilterModel()` to restore filter state. */
35201 GridApi.prototype.setFilterModel = function (model) {
35202 this.filterManager.setFilterModel(model);
35203 };
35204 /** Gets the current state of all the advanced filters. Used for saving filter state. */
35205 GridApi.prototype.getFilterModel = function () {
35206 return this.filterManager.getFilterModel();
35207 };
35208 /** Returns the focused cell (or the last focused cell if the grid lost focus). */
35209 GridApi.prototype.getFocusedCell = function () {
35210 return this.focusService.getFocusedCell();
35211 };
35212 /** Clears the focused cell. */
35213 GridApi.prototype.clearFocusedCell = function () {
35214 return this.focusService.clearFocusedCell();
35215 };
35216 /** Sets the focus to the specified cell. `rowPinned` can be either 'top', 'bottom' or null (for not pinned). */
35217 GridApi.prototype.setFocusedCell = function (rowIndex, colKey, rowPinned) {
35218 this.focusService.setFocusedCell(rowIndex, colKey, rowPinned, true);
35219 };
35220 /** Sets the `suppressRowDrag` property. */
35221 GridApi.prototype.setSuppressRowDrag = function (value) {
35222 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_SUPPRESS_ROW_DRAG, value);
35223 };
35224 /** Sets the `suppressMoveWhenRowDragging` property. */
35225 GridApi.prototype.setSuppressMoveWhenRowDragging = function (value) {
35226 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG, value);
35227 };
35228 /** Sets the `suppressRowClickSelection` property. */
35229 GridApi.prototype.setSuppressRowClickSelection = function (value) {
35230 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_SUPPRESS_ROW_CLICK_SELECTION, value);
35231 };
35232 /** Adds a drop zone outside of the grid where rows can be dropped. */
35233 GridApi.prototype.addRowDropZone = function (params) {
35234 this.gridBodyCtrl.getRowDragFeature().addRowDropZone(params);
35235 };
35236 /** Removes an external drop zone added by `addRowDropZone`. */
35237 GridApi.prototype.removeRowDropZone = function (params) {
35238 var activeDropTarget = this.dragAndDropService.findExternalZone(params);
35239 if (activeDropTarget) {
35240 this.dragAndDropService.removeDropTarget(activeDropTarget);
35241 }
35242 };
35243 /** Returns the `RowDropZoneParams` to be used by another grid's `addRowDropZone` method. */
35244 GridApi.prototype.getRowDropZoneParams = function (events) {
35245 return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(events);
35246 };
35247 /** Sets the height in pixels for the row containing the column label header. */
35248 GridApi.prototype.setHeaderHeight = function (headerHeight) {
35249 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_HEADER_HEIGHT, headerHeight);
35250 };
35251 /**
35252 * Switch between layout options: `normal`, `autoHeight`, `print`.
35253 * Defaults to `normal` if no domLayout provided.
35254 */
35255 GridApi.prototype.setDomLayout = function (domLayout) {
35256 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_DOM_LAYOUT, domLayout);
35257 };
35258 /** Sets the `enableCellTextSelection` property. */
35259 GridApi.prototype.setEnableCellTextSelection = function (selectable) {
35260 this.gridBodyCtrl.setCellTextSelection(selectable);
35261 };
35262 /** Sets the preferred direction for the selection fill handle. */
35263 GridApi.prototype.setFillHandleDirection = function (direction) {
35264 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_FILL_HANDLE_DIRECTION, direction);
35265 };
35266 /** Sets the height in pixels for the rows containing header column groups. */
35267 GridApi.prototype.setGroupHeaderHeight = function (headerHeight) {
35268 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GROUP_HEADER_HEIGHT, headerHeight);
35269 };
35270 /** Sets the height in pixels for the row containing the floating filters. */
35271 GridApi.prototype.setFloatingFiltersHeight = function (headerHeight) {
35272 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_FLOATING_FILTERS_HEIGHT, headerHeight);
35273 };
35274 /** Sets the height in pixels for the row containing the columns when in pivot mode. */
35275 GridApi.prototype.setPivotHeaderHeight = function (headerHeight) {
35276 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_PIVOT_HEADER_HEIGHT, headerHeight);
35277 };
35278 /** Sets the height in pixels for the row containing header column groups when in pivot mode. */
35279 GridApi.prototype.setPivotGroupHeaderHeight = function (headerHeight) {
35280 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_PIVOT_GROUP_HEADER_HEIGHT, headerHeight);
35281 };
35282 GridApi.prototype.setIsExternalFilterPresent = function (isExternalFilterPresentFunc) {
35283 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_IS_EXTERNAL_FILTER_PRESENT, isExternalFilterPresentFunc);
35284 };
35285 GridApi.prototype.setDoesExternalFilterPass = function (doesExternalFilterPassFunc) {
35286 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_DOES_EXTERNAL_FILTER_PASS, doesExternalFilterPassFunc);
35287 };
35288 GridApi.prototype.setNavigateToNextCell = function (navigateToNextCellFunc) {
35289 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_NAVIGATE_TO_NEXT_CELL, navigateToNextCellFunc);
35290 };
35291 GridApi.prototype.setTabToNextCell = function (tabToNextCellFunc) {
35292 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_TAB_TO_NEXT_CELL, tabToNextCellFunc);
35293 };
35294 GridApi.prototype.setTabToNextHeader = function (tabToNextHeaderFunc) {
35295 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_TAB_TO_NEXT_HEADER, tabToNextHeaderFunc);
35296 };
35297 GridApi.prototype.setNavigateToNextHeader = function (navigateToNextHeaderFunc) {
35298 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_NAVIGATE_TO_NEXT_HEADER, navigateToNextHeaderFunc);
35299 };
35300 GridApi.prototype.setGroupRowAggNodes = function (groupRowAggNodesFunc) {
35301 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GROUP_ROW_AGG_NODES, groupRowAggNodesFunc);
35302 };
35303 GridApi.prototype.setGetGroupRowAgg = function (getGroupRowAggFunc) {
35304 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_GROUP_ROW_AGG, getGroupRowAggFunc);
35305 };
35306 GridApi.prototype.setGetBusinessKeyForNode = function (getBusinessKeyForNodeFunc) {
35307 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_BUSINESS_KEY_FOR_NODE, getBusinessKeyForNodeFunc);
35308 };
35309 GridApi.prototype.setGetChildCount = function (getChildCountFunc) {
35310 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_CHILD_COUNT, getChildCountFunc);
35311 };
35312 GridApi.prototype.setProcessRowPostCreate = function (processRowPostCreateFunc) {
35313 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_PROCESS_ROW_POST_CREATE, processRowPostCreateFunc);
35314 };
35315 GridApi.prototype.setGetRowNodeId = function (getRowNodeIdFunc) {
35316 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_ROW_NODE_ID, getRowNodeIdFunc);
35317 };
35318 GridApi.prototype.setGetRowId = function (getRowIdFunc) {
35319 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_ROW_ID, getRowIdFunc);
35320 };
35321 GridApi.prototype.setGetRowClass = function (rowClassFunc) {
35322 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_ROW_CLASS, rowClassFunc);
35323 };
35324 GridApi.prototype.setIsFullWidthCell = function (isFullWidthCellFunc) {
35325 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_IS_FULL_WIDTH_CELL, isFullWidthCellFunc);
35326 };
35327 GridApi.prototype.setIsFullWidthRow = function (isFullWidthRowFunc) {
35328 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_IS_FULL_WIDTH_ROW, isFullWidthRowFunc);
35329 };
35330 GridApi.prototype.setIsRowSelectable = function (isRowSelectableFunc) {
35331 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_IS_ROW_SELECTABLE, isRowSelectableFunc);
35332 };
35333 GridApi.prototype.setIsRowMaster = function (isRowMasterFunc) {
35334 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_IS_ROW_MASTER, isRowMasterFunc);
35335 };
35336 GridApi.prototype.setPostSort = function (postSortFunc) {
35337 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_POST_SORT, postSortFunc);
35338 };
35339 GridApi.prototype.setPostSortRows = function (postSortRowsFunc) {
35340 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_POST_SORT_ROWS, postSortRowsFunc);
35341 };
35342 GridApi.prototype.setGetDocument = function (getDocumentFunc) {
35343 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_DOCUMENT, getDocumentFunc);
35344 };
35345 GridApi.prototype.setGetContextMenuItems = function (getContextMenuItemsFunc) {
35346 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_CONTEXT_MENU_ITEMS, getContextMenuItemsFunc);
35347 };
35348 GridApi.prototype.setGetMainMenuItems = function (getMainMenuItemsFunc) {
35349 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_MAIN_MENU_ITEMS, getMainMenuItemsFunc);
35350 };
35351 GridApi.prototype.setProcessCellForClipboard = function (processCellForClipboardFunc) {
35352 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_PROCESS_CELL_FOR_CLIPBOARD, processCellForClipboardFunc);
35353 };
35354 GridApi.prototype.setSendToClipboard = function (sendToClipboardFunc) {
35355 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_SEND_TO_CLIPBOARD, sendToClipboardFunc);
35356 };
35357 GridApi.prototype.setProcessCellFromClipboard = function (processCellFromClipboardFunc) {
35358 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_PROCESS_CELL_FROM_CLIPBOARD, processCellFromClipboardFunc);
35359 };
35360 GridApi.prototype.setProcessSecondaryColDef = function (processSecondaryColDefFunc) {
35361 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_PROCESS_TO_SECONDARY_COLDEF, processSecondaryColDefFunc);
35362 };
35363 GridApi.prototype.setProcessSecondaryColGroupDef = function (processSecondaryColGroupDefFunc) {
35364 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_PROCESS_SECONDARY_COL_GROUP_DEF, processSecondaryColGroupDefFunc);
35365 };
35366 GridApi.prototype.setPostProcessPopup = function (postProcessPopupFunc) {
35367 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_POST_PROCESS_POPUP, postProcessPopupFunc);
35368 };
35369 GridApi.prototype.setDefaultGroupOrderComparator = function (defaultGroupOrderComparatorFunc) {
35370 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_DEFAULT_GROUP_ORDER_COMPARATOR, defaultGroupOrderComparatorFunc);
35371 };
35372 GridApi.prototype.setInitialGroupOrderComparator = function (initialGroupOrderComparatorFunc) {
35373 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_INITIAL_GROUP_ORDER_COMPARATOR, initialGroupOrderComparatorFunc);
35374 };
35375 GridApi.prototype.setGetChartToolbarItems = function (getChartToolbarItemsFunc) {
35376 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_CHART_TOOLBAR_ITEMS, getChartToolbarItemsFunc);
35377 };
35378 GridApi.prototype.setPaginationNumberFormatter = function (paginationNumberFormatterFunc) {
35379 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_PAGINATION_NUMBER_FORMATTER, paginationNumberFormatterFunc);
35380 };
35381 GridApi.prototype.setGetServerSideStoreParams = function (getServerSideStoreParamsFunc) {
35382 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_SERVER_SIDE_STORE_PARAMS, getServerSideStoreParamsFunc);
35383 };
35384 GridApi.prototype.setIsServerSideGroupOpenByDefault = function (isServerSideGroupOpenByDefaultFunc) {
35385 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT, isServerSideGroupOpenByDefaultFunc);
35386 };
35387 GridApi.prototype.setIsApplyServerSideTransaction = function (isApplyServerSideTransactionFunc) {
35388 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_IS_APPLY_SERVER_SIDE_TRANSACTION, isApplyServerSideTransactionFunc);
35389 };
35390 GridApi.prototype.setIsServerSideGroup = function (isServerSideGroupFunc) {
35391 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_IS_SERVER_SIDE_GROUP, isServerSideGroupFunc);
35392 };
35393 GridApi.prototype.setGetServerSideGroupKey = function (getServerSideGroupKeyFunc) {
35394 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_SERVER_SIDE_GROUP_KEY, getServerSideGroupKeyFunc);
35395 };
35396 GridApi.prototype.setGetRowStyle = function (rowStyleFunc) {
35397 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_ROW_STYLE, rowStyleFunc);
35398 };
35399 GridApi.prototype.setGetRowHeight = function (rowHeightFunc) {
35400 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GET_ROW_HEIGHT, rowHeightFunc);
35401 };
35402 /** Returns `true` if the side bar is visible. */
35403 GridApi.prototype.isSideBarVisible = function () {
35404 return this.sideBarComp ? this.sideBarComp.isDisplayed() : false;
35405 };
35406 /** Show/hide the entire side bar, including any visible panel and the tab buttons. */
35407 GridApi.prototype.setSideBarVisible = function (show) {
35408 if (!this.sideBarComp) {
35409 if (show) {
35410 console.warn('AG Grid: sideBar is not loaded');
35411 }
35412 return;
35413 }
35414 this.sideBarComp.setDisplayed(show);
35415 };
35416 /** Sets the side bar position relative to the grid. Possible values are `'left'` or `'right'`. */
35417 GridApi.prototype.setSideBarPosition = function (position) {
35418 if (!this.sideBarComp) {
35419 console.warn('AG Grid: sideBar is not loaded');
35420 return;
35421 }
35422 this.sideBarComp.setSideBarPosition(position);
35423 };
35424 /** Opens a particular tool panel. Provide the ID of the tool panel to open. */
35425 GridApi.prototype.openToolPanel = function (key) {
35426 if (!this.sideBarComp) {
35427 console.warn('AG Grid: toolPanel is only available in AG Grid Enterprise');
35428 return;
35429 }
35430 this.sideBarComp.openToolPanel(key);
35431 };
35432 /** Closes the currently open tool panel (if any). */
35433 GridApi.prototype.closeToolPanel = function () {
35434 if (!this.sideBarComp) {
35435 console.warn('AG Grid: toolPanel is only available in AG Grid Enterprise');
35436 return;
35437 }
35438 this.sideBarComp.close();
35439 };
35440 /** Returns the ID of the currently shown tool panel if any, otherwise `null`. */
35441 GridApi.prototype.getOpenedToolPanel = function () {
35442 return this.sideBarComp ? this.sideBarComp.openedItem() : null;
35443 };
35444 /** Returns the current side bar configuration. If a shortcut was used, returns the detailed long form. */
35445 GridApi.prototype.getSideBar = function () {
35446 return this.gridOptionsWrapper.getSideBar();
35447 };
35448 /** Resets the side bar to the provided configuration. The parameter is the same as the sideBar grid property. The side bar is re-created from scratch with the new config. */
35449 GridApi.prototype.setSideBar = function (def) {
35450 this.gridOptionsWrapper.setProperty('sideBar', _entities_sideBar__WEBPACK_IMPORTED_MODULE_2__["SideBarDefParser"].parse(def));
35451 };
35452 GridApi.prototype.setSuppressClipboardPaste = function (value) {
35453 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_SUPPRESS_CLIPBOARD_PASTE, value);
35454 };
35455 /** Returns `true` if the tool panel is showing, otherwise `false`. */
35456 GridApi.prototype.isToolPanelShowing = function () {
35457 return this.sideBarComp.isToolPanelShowing();
35458 };
35459 GridApi.prototype.doLayout = function () {
35460 var message = "AG Grid - since version 25.1, doLayout was taken out, as it's not needed. The grid responds to grid size changes automatically";
35461 Object(_utils_function__WEBPACK_IMPORTED_MODULE_8__["doOnce"])(function () { return console.warn(message); }, 'doLayoutDeprecated');
35462 };
35463 /** Tells the grid to recalculate the row heights. */
35464 GridApi.prototype.resetRowHeights = function () {
35465 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(this.clientSideRowModel)) {
35466 if (this.columnModel.isAutoRowHeightActive()) {
35467 console.warn('AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.');
35468 return;
35469 }
35470 this.clientSideRowModel.resetRowHeights();
35471 }
35472 };
35473 GridApi.prototype.setGroupRemoveSingleChildren = function (value) {
35474 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GROUP_REMOVE_SINGLE_CHILDREN, value);
35475 };
35476 GridApi.prototype.setGroupRemoveLowestSingleChildren = function (value) {
35477 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN, value);
35478 };
35479 /** Tells the grid a row height has changed. To be used after calling `rowNode.setRowHeight(newHeight)`. */
35480 GridApi.prototype.onRowHeightChanged = function () {
35481 if (this.clientSideRowModel) {
35482 this.clientSideRowModel.onRowHeightChanged();
35483 }
35484 else if (this.serverSideRowModel) {
35485 this.serverSideRowModel.onRowHeightChanged();
35486 }
35487 };
35488 /**
35489 * Gets the value for a column for a particular `rowNode` (row).
35490 * This is useful if you want the raw value of a cell e.g. if implementing your own CSV export.
35491 */
35492 GridApi.prototype.getValue = function (colKey, rowNode) {
35493 var column = this.columnModel.getPrimaryColumn(colKey);
35494 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(column)) {
35495 column = this.columnModel.getGridColumn(colKey);
35496 }
35497 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(column)) {
35498 return null;
35499 }
35500 return this.valueService.getValue(column, rowNode);
35501 };
35502 /** Add an event listener for the specified `eventType`. Works similar to `addEventListener` for a browser DOM element. */
35503 GridApi.prototype.addEventListener = function (eventType, listener) {
35504 var async = this.gridOptionsWrapper.useAsyncEvents();
35505 this.eventService.addEventListener(eventType, listener, async);
35506 };
35507 /** Add an event listener for all event types coming from the grid. */
35508 GridApi.prototype.addGlobalListener = function (listener) {
35509 var async = this.gridOptionsWrapper.useAsyncEvents();
35510 this.eventService.addGlobalListener(listener, async);
35511 };
35512 /** Remove an event listener. */
35513 GridApi.prototype.removeEventListener = function (eventType, listener) {
35514 var async = this.gridOptionsWrapper.useAsyncEvents();
35515 this.eventService.removeEventListener(eventType, listener, async);
35516 };
35517 /** Remove a global event listener. */
35518 GridApi.prototype.removeGlobalListener = function (listener) {
35519 var async = this.gridOptionsWrapper.useAsyncEvents();
35520 this.eventService.removeGlobalListener(listener, async);
35521 };
35522 GridApi.prototype.dispatchEvent = function (event) {
35523 this.eventService.dispatchEvent(event);
35524 };
35525 /** Will destroy the grid and release resources. If you are using a framework you do not need to call this, as the grid links in with the framework lifecycle. However if you are using Web Components or native JavaScript, you do need to call this, to avoid a memory leak in your application. */
35526 GridApi.prototype.destroy = function () {
35527 // this is needed as GridAPI is a bean, and GridAPI.destroy() is called as part
35528 // of context.destroy(). so we need to stop the infinite loop.
35529 if (this.destroyCalled) {
35530 return;
35531 }
35532 this.destroyCalled = true;
35533 // destroy the UI first (as they use the services)
35534 var gridCtrl = this.ctrlsService.getGridCtrl();
35535 if (gridCtrl) {
35536 gridCtrl.destroyGridUi();
35537 }
35538 // destroy the services
35539 this.context.destroy();
35540 };
35541 GridApi.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid = function () {
35542 // some users were raising support issues with regards memory leaks. the problem was the customers applications
35543 // were keeping references to the API. trying to educate them all would be difficult, easier to just remove
35544 // all references in the API so at least the core grid can be garbage collected.
35545 //
35546 // wait about 100ms before clearing down the references, in case user has some cleanup to do,
35547 // and needs to deference the API first
35548 setTimeout(_utils_object__WEBPACK_IMPORTED_MODULE_10__["removeAllReferences"].bind(window, this, 'Grid API'), 100);
35549 };
35550 GridApi.prototype.warnIfDestroyed = function (methodName) {
35551 if (this.destroyCalled) {
35552 console.warn("AG Grid: Grid API method " + methodName + " was called on a grid that was destroyed.");
35553 }
35554 return this.destroyCalled;
35555 };
35556 /** Reset the quick filter cache text on every rowNode. */
35557 GridApi.prototype.resetQuickFilter = function () {
35558 if (this.warnIfDestroyed('resetQuickFilter')) {
35559 return;
35560 }
35561 this.rowModel.forEachNode(function (node) { return node.quickFilterAggregateText = null; });
35562 };
35563 GridApi.prototype.getRangeSelections = function () {
35564 console.warn("AG Grid: in v20.1.x, api.getRangeSelections() is gone, please use getCellRanges() instead.\n We had to change how cell selections works a small bit to allow charting to integrate. The return type of\n getCellRanges() is a bit different, please check the AG Grid documentation.");
35565 return null;
35566 };
35567 /** Returns the list of selected cell ranges. */
35568 GridApi.prototype.getCellRanges = function () {
35569 if (this.rangeService) {
35570 return this.rangeService.getCellRanges();
35571 }
35572 console.warn('AG Grid: cell range selection is only available in AG Grid Enterprise');
35573 return null;
35574 };
35575 GridApi.prototype.camelCaseToHumanReadable = function (camelCase) {
35576 return Object(_utils_string__WEBPACK_IMPORTED_MODULE_11__["camelCaseToHumanText"])(camelCase);
35577 };
35578 GridApi.prototype.addRangeSelection = function (deprecatedNoLongerUsed) {
35579 console.warn('AG Grid: As of version 21.x, range selection changed slightly to allow charting integration. Please call api.addCellRange() instead of api.addRangeSelection()');
35580 };
35581 /** Adds the provided cell range to the selected ranges. */
35582 GridApi.prototype.addCellRange = function (params) {
35583 if (!this.rangeService) {
35584 console.warn('AG Grid: cell range selection is only available in AG Grid Enterprise');
35585 }
35586 this.rangeService.addCellRange(params);
35587 };
35588 /** Clears the selected ranges. */
35589 GridApi.prototype.clearRangeSelection = function () {
35590 if (!this.rangeService) {
35591 console.warn('AG Grid: cell range selection is only available in AG Grid Enterprise');
35592 }
35593 this.rangeService.removeAllCellRanges();
35594 };
35595 /** Reverts the last cell edit. */
35596 GridApi.prototype.undoCellEditing = function () {
35597 this.undoRedoService.undo();
35598 };
35599 /** Re-applies the most recently undone cell edit. */
35600 GridApi.prototype.redoCellEditing = function () {
35601 this.undoRedoService.redo();
35602 };
35603 /** Returns current number of available cell edit undo operations. */
35604 GridApi.prototype.getCurrentUndoSize = function () {
35605 return this.undoRedoService.getCurrentUndoStackSize();
35606 };
35607 /** Returns current number of available cell edit redo operations. */
35608 GridApi.prototype.getCurrentRedoSize = function () {
35609 return this.undoRedoService.getCurrentRedoStackSize();
35610 };
35611 /** Returns a list of models with information about the charts that are currently rendered from the grid. */
35612 GridApi.prototype.getChartModels = function () {
35613 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].RangeSelectionModule, 'api.getChartModels') &&
35614 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].GridChartsModule, 'api.getChartModels')) {
35615 return this.chartService.getChartModels();
35616 }
35617 };
35618 /** Returns the `ChartRef` using the supplied `chartId`. */
35619 GridApi.prototype.getChartRef = function (chartId) {
35620 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].RangeSelectionModule, 'api.getChartRef') &&
35621 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].GridChartsModule, 'api.getChartRef')) {
35622 return this.chartService.getChartRef(chartId);
35623 }
35624 };
35625 /** Returns a string containing the requested data URL which contains a representation of the chart image. */
35626 GridApi.prototype.getChartImageDataURL = function (params) {
35627 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].RangeSelectionModule, 'api.getChartImageDataURL') &&
35628 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].GridChartsModule, 'api.getChartImageDataURL')) {
35629 return this.chartService.getChartImageDataURL(params);
35630 }
35631 };
35632 /** Used to programmatically create charts from a range. */
35633 GridApi.prototype.createRangeChart = function (params) {
35634 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].RangeSelectionModule, 'api.createRangeChart') &&
35635 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].GridChartsModule, 'api.createRangeChart')) {
35636 return this.chartService.createRangeChart(params);
35637 }
35638 };
35639 /** Used to programmatically create cross filter charts from a range. */
35640 GridApi.prototype.createCrossFilterChart = function (params) {
35641 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].RangeSelectionModule, 'api.createCrossFilterChart') &&
35642 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].GridChartsModule, 'api.createCrossFilterChart')) {
35643 return this.chartService.createCrossFilterChart(params);
35644 }
35645 };
35646 /** Restores a chart using the `ChartModel` that was previously obtained from `getChartModels()`. */
35647 GridApi.prototype.restoreChart = function (chartModel, chartContainer) {
35648 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].RangeSelectionModule, 'api.restoreChart') &&
35649 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].GridChartsModule, 'api.restoreChart')) {
35650 return this.chartService.restoreChart(chartModel, chartContainer);
35651 }
35652 };
35653 /** Used to programmatically create pivot charts from a grid. */
35654 GridApi.prototype.createPivotChart = function (params) {
35655 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].RangeSelectionModule, 'api.createPivotChart') &&
35656 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].GridChartsModule, 'api.createPivotChart')) {
35657 return this.chartService.createPivotChart(params);
35658 }
35659 };
35660 /** Copies the selected rows to the clipboard. */
35661 GridApi.prototype.copySelectedRowsToClipboard = function (params) {
35662 if (!this.clipboardService) {
35663 console.warn('AG Grid: clipboard is only available in AG Grid Enterprise');
35664 }
35665 this.clipboardService.copySelectedRowsToClipboard(params);
35666 };
35667 /** Copies the selected ranges to the clipboard. */
35668 GridApi.prototype.copySelectedRangeToClipboard = function (params) {
35669 if (!this.clipboardService) {
35670 console.warn('AG Grid: clipboard is only available in AG Grid Enterprise');
35671 }
35672 this.clipboardService.copySelectedRangeToClipboard(params);
35673 };
35674 /** Copies the selected range down, similar to `Ctrl + D` in Excel. */
35675 GridApi.prototype.copySelectedRangeDown = function () {
35676 if (!this.clipboardService) {
35677 console.warn('AG Grid: clipboard is only available in AG Grid Enterprise');
35678 }
35679 this.clipboardService.copyRangeDown();
35680 };
35681 /** Shows the column menu after and positions it relative to the provided button element. Use in conjunction with your own header template. */
35682 GridApi.prototype.showColumnMenuAfterButtonClick = function (colKey, buttonElement) {
35683 // use grid column so works with pivot mode
35684 var column = this.columnModel.getGridColumn(colKey);
35685 this.menuFactory.showMenuAfterButtonClick(column, buttonElement, 'columnMenu');
35686 };
35687 /** Shows the column menu after and positions it relative to the mouse event. Use in conjunction with your own header template. */
35688 GridApi.prototype.showColumnMenuAfterMouseClick = function (colKey, mouseEvent) {
35689 // use grid column so works with pivot mode
35690 var column = this.columnModel.getGridColumn(colKey);
35691 if (!column) {
35692 column = this.columnModel.getPrimaryColumn(colKey);
35693 }
35694 if (!column) {
35695 console.error("AG Grid: column '" + colKey + "' not found");
35696 return;
35697 }
35698 this.menuFactory.showMenuAfterMouseEvent(column, mouseEvent);
35699 };
35700 /** Hides any visible context menu or column menu. */
35701 GridApi.prototype.hidePopupMenu = function () {
35702 // hide the context menu if in enterprise
35703 if (this.contextMenuFactory) {
35704 this.contextMenuFactory.hideActiveMenu();
35705 }
35706 // and hide the column menu always
35707 this.menuFactory.hideActiveMenu();
35708 };
35709 /** DOM element to use as the popup parent for grid popups (context menu, column menu etc). */
35710 GridApi.prototype.setPopupParent = function (ePopupParent) {
35711 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_POPUP_PARENT, ePopupParent);
35712 };
35713 /** Navigates the grid focus to the next cell, as if tabbing. */
35714 GridApi.prototype.tabToNextCell = function (event) {
35715 return this.navigationService.tabToNextCell(false, event);
35716 };
35717 /** Navigates the grid focus to the previous cell, as if shift-tabbing. */
35718 GridApi.prototype.tabToPreviousCell = function (event) {
35719 return this.navigationService.tabToNextCell(true, event);
35720 };
35721 /** Returns the list of active cell renderer instances. */
35722 GridApi.prototype.getCellRendererInstances = function (params) {
35723 if (params === void 0) { params = {}; }
35724 var res = this.rowRenderer.getCellRendererInstances(params);
35725 var unwrapped = res.map(unwrapUserComp);
35726 return unwrapped;
35727 };
35728 /** Returns the list of active cell editor instances. Optionally provide parameters to restrict to certain columns / row nodes. */
35729 GridApi.prototype.getCellEditorInstances = function (params) {
35730 if (params === void 0) { params = {}; }
35731 var res = this.rowRenderer.getCellEditorInstances(params);
35732 var unwrapped = res.map(unwrapUserComp);
35733 return unwrapped;
35734 };
35735 /** If the grid is editing, returns back details of the editing cell(s). */
35736 GridApi.prototype.getEditingCells = function () {
35737 return this.rowRenderer.getEditingCells();
35738 };
35739 /** If a cell is editing, it stops the editing. Pass `true` if you want to cancel the editing (i.e. don't accept changes). */
35740 GridApi.prototype.stopEditing = function (cancel) {
35741 if (cancel === void 0) { cancel = false; }
35742 this.rowRenderer.stopEditing(cancel);
35743 };
35744 /** Start editing the provided cell. If another cell is editing, the editing will be stopped in that other cell. */
35745 GridApi.prototype.startEditingCell = function (params) {
35746 var column = this.columnModel.getGridColumn(params.colKey);
35747 if (!column) {
35748 console.warn("AG Grid: no column found for " + params.colKey);
35749 return;
35750 }
35751 var cellPosition = {
35752 rowIndex: params.rowIndex,
35753 rowPinned: params.rowPinned || null,
35754 column: column
35755 };
35756 var notPinned = params.rowPinned == null;
35757 if (notPinned) {
35758 this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(params.rowIndex);
35759 }
35760 var cell = this.navigationService.getCellByPosition(cellPosition);
35761 if (!cell) {
35762 return;
35763 }
35764 cell.startRowOrCellEdit(params.key, params.charPress);
35765 };
35766 /** Add an aggregation function with the specified key. */
35767 GridApi.prototype.addAggFunc = function (key, aggFunc) {
35768 if (this.aggFuncService) {
35769 this.aggFuncService.addAggFunc(key, aggFunc);
35770 }
35771 };
35772 /** Add aggregations function with the specified keys. */
35773 GridApi.prototype.addAggFuncs = function (aggFuncs) {
35774 if (this.aggFuncService) {
35775 this.aggFuncService.addAggFuncs(aggFuncs);
35776 }
35777 };
35778 /** Clears all aggregation functions (including those provided by the grid). */
35779 GridApi.prototype.clearAggFuncs = function () {
35780 if (this.aggFuncService) {
35781 this.aggFuncService.clear();
35782 }
35783 };
35784 /** Apply transactions to the server side row model. */
35785 GridApi.prototype.applyServerSideTransaction = function (transaction) {
35786 if (!this.serverSideTransactionManager) {
35787 console.warn('AG Grid: Cannot apply Server Side Transaction if not using the Server Side Row Model.');
35788 return;
35789 }
35790 return this.serverSideTransactionManager.applyTransaction(transaction);
35791 };
35792 GridApi.prototype.applyServerSideTransactionAsync = function (transaction, callback) {
35793 if (!this.serverSideTransactionManager) {
35794 console.warn('AG Grid: Cannot apply Server Side Transaction if not using the Server Side Row Model.');
35795 return;
35796 }
35797 return this.serverSideTransactionManager.applyTransactionAsync(transaction, callback);
35798 };
35799 /** Gets all failed server side loads to retry. */
35800 GridApi.prototype.retryServerSideLoads = function () {
35801 if (!this.serverSideRowModel) {
35802 console.warn('AG Grid: API retryServerSideLoads() can only be used when using Server-Side Row Model.');
35803 return;
35804 }
35805 this.serverSideRowModel.retryLoads();
35806 };
35807 GridApi.prototype.flushServerSideAsyncTransactions = function () {
35808 if (!this.serverSideTransactionManager) {
35809 console.warn('AG Grid: Cannot flush Server Side Transaction if not using the Server Side Row Model.');
35810 return;
35811 }
35812 return this.serverSideTransactionManager.flushAsyncTransactions();
35813 };
35814 /** Update row data. Pass a transaction object with lists for `add`, `remove` and `update`. */
35815 GridApi.prototype.applyTransaction = function (rowDataTransaction) {
35816 if (!this.clientSideRowModel) {
35817 console.error('AG Grid: updateRowData() only works with ClientSideRowModel. Working with InfiniteRowModel was deprecated in v23.1 and removed in v24.1');
35818 return;
35819 }
35820 var res = this.clientSideRowModel.updateRowData(rowDataTransaction);
35821 // refresh all the full width rows
35822 this.rowRenderer.refreshFullWidthRows(res.update);
35823 // do change detection for all present cells
35824 if (!this.gridOptionsWrapper.isSuppressChangeDetection()) {
35825 this.rowRenderer.refreshCells();
35826 }
35827 return res;
35828 };
35829 /** Sets the `deltaSort` property */
35830 GridApi.prototype.setDeltaSort = function (enable) {
35831 this.gridOptionsWrapper.setProperty('deltaSort', enable);
35832 };
35833 /** @deprecated */
35834 GridApi.prototype.updateRowData = function (rowDataTransaction) {
35835 var message = 'AG Grid: as of v23.1, grid API updateRowData(transaction) is now called applyTransaction(transaction). updateRowData is deprecated and will be removed in a future major release.';
35836 Object(_utils_function__WEBPACK_IMPORTED_MODULE_8__["doOnce"])(function () { return console.warn(message); }, 'updateRowData deprecated');
35837 return this.applyTransaction(rowDataTransaction);
35838 };
35839 /** Same as `applyTransaction` except executes asynchronously for efficiency. */
35840 GridApi.prototype.applyTransactionAsync = function (rowDataTransaction, callback) {
35841 if (!this.clientSideRowModel) {
35842 console.error('AG Grid: api.applyTransactionAsync() only works with ClientSideRowModel.');
35843 return;
35844 }
35845 this.clientSideRowModel.batchUpdateRowData(rowDataTransaction, callback);
35846 };
35847 /** Executes any remaining asynchronous grid transactions, if any are waiting to be executed. */
35848 GridApi.prototype.flushAsyncTransactions = function () {
35849 if (!this.clientSideRowModel) {
35850 console.error('AG Grid: api.applyTransactionAsync() only works with ClientSideRowModel.');
35851 return;
35852 }
35853 this.clientSideRowModel.flushAsyncTransactions();
35854 };
35855 /** @deprecated */
35856 GridApi.prototype.batchUpdateRowData = function (rowDataTransaction, callback) {
35857 var message = 'AG Grid: as of v23.1, grid API batchUpdateRowData(transaction, callback) is now called applyTransactionAsync(transaction, callback). batchUpdateRowData is deprecated and will be removed in a future major release.';
35858 Object(_utils_function__WEBPACK_IMPORTED_MODULE_8__["doOnce"])(function () { return console.warn(message); }, 'batchUpdateRowData deprecated');
35859 this.applyTransactionAsync(rowDataTransaction, callback);
35860 };
35861 GridApi.prototype.insertItemsAtIndex = function (index, items, skipRefresh) {
35862 if (skipRefresh === void 0) { skipRefresh = false; }
35863 console.warn('AG Grid: insertItemsAtIndex() is deprecated, use updateRowData(transaction) instead.');
35864 this.updateRowData({ add: items, addIndex: index, update: null, remove: null });
35865 };
35866 GridApi.prototype.removeItems = function (rowNodes, skipRefresh) {
35867 if (skipRefresh === void 0) { skipRefresh = false; }
35868 console.warn('AG Grid: removeItems() is deprecated, use updateRowData(transaction) instead.');
35869 var dataToRemove = rowNodes.map(function (rowNode) { return rowNode.data; });
35870 this.updateRowData({ add: null, addIndex: null, update: null, remove: dataToRemove });
35871 };
35872 GridApi.prototype.addItems = function (items, skipRefresh) {
35873 if (skipRefresh === void 0) { skipRefresh = false; }
35874 console.warn('AG Grid: addItems() is deprecated, use updateRowData(transaction) instead.');
35875 this.updateRowData({ add: items, addIndex: null, update: null, remove: null });
35876 };
35877 GridApi.prototype.refreshVirtualPageCache = function () {
35878 console.warn('AG Grid: refreshVirtualPageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead');
35879 this.refreshInfiniteCache();
35880 };
35881 GridApi.prototype.refreshInfinitePageCache = function () {
35882 console.warn('AG Grid: refreshInfinitePageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead');
35883 this.refreshInfiniteCache();
35884 };
35885 /**
35886 * Marks all the currently loaded blocks in the cache for reload.
35887 * If you have 10 blocks in the cache, all 10 will be marked for reload.
35888 * The old data will continue to be displayed until the new data is loaded.
35889 */
35890 GridApi.prototype.refreshInfiniteCache = function () {
35891 if (this.infiniteRowModel) {
35892 this.infiniteRowModel.refreshCache();
35893 }
35894 else {
35895 console.warn("AG Grid: api.refreshInfiniteCache is only available when rowModelType='infinite'.");
35896 }
35897 };
35898 GridApi.prototype.purgeVirtualPageCache = function () {
35899 console.warn('AG Grid: purgeVirtualPageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead');
35900 this.purgeInfinitePageCache();
35901 };
35902 GridApi.prototype.purgeInfinitePageCache = function () {
35903 console.warn('AG Grid: purgeInfinitePageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead');
35904 this.purgeInfiniteCache();
35905 };
35906 /**
35907 * Purges the cache.
35908 * The grid is then told to refresh. Only the blocks required to display the current data on screen are fetched (typically no more than 2).
35909 * The grid will display nothing while the new blocks are loaded.
35910 * Use this to immediately remove the old data from the user.
35911 */
35912 GridApi.prototype.purgeInfiniteCache = function () {
35913 if (this.infiniteRowModel) {
35914 this.infiniteRowModel.purgeCache();
35915 }
35916 else {
35917 console.warn("AG Grid: api.purgeInfiniteCache is only available when rowModelType='infinite'.");
35918 }
35919 };
35920 /** @deprecated */
35921 GridApi.prototype.purgeEnterpriseCache = function (route) {
35922 console.warn("ag-grid: since version 18.x, api.purgeEnterpriseCache() should be replaced with api.purgeServerSideCache()");
35923 this.purgeServerSideCache(route);
35924 };
35925 /** @deprecated */
35926 GridApi.prototype.purgeServerSideCache = function (route) {
35927 if (route === void 0) { route = []; }
35928 if (this.serverSideRowModel) {
35929 console.warn("AG Grid: since v25.0, api.purgeServerSideCache is deprecated. Please use api.refreshServerSideStore({purge: true}) instead.");
35930 this.refreshServerSideStore({
35931 route: route,
35932 purge: true
35933 });
35934 }
35935 else {
35936 console.warn("AG Grid: api.purgeServerSideCache is only available when rowModelType='serverSide'.");
35937 }
35938 };
35939 /**
35940 * Refresh a server-side store.
35941 * If you pass no parameters, then the top level cache is purged.
35942 * To purge a child cache, pass in the string of keys to get to the child cache.
35943 */
35944 GridApi.prototype.refreshServerSideStore = function (params) {
35945 if (this.serverSideRowModel) {
35946 this.serverSideRowModel.refreshStore(params);
35947 }
35948 else {
35949 console.warn("AG Grid: api.refreshServerSideStore is only available when rowModelType='serverSide'.");
35950 }
35951 };
35952 /** Returns info on all server side stores. */
35953 GridApi.prototype.getServerSideStoreState = function () {
35954 if (this.serverSideRowModel) {
35955 return this.serverSideRowModel.getStoreState();
35956 }
35957 else {
35958 console.warn("AG Grid: api.getServerSideStoreState is only available when rowModelType='serverSide'.");
35959 return [];
35960 }
35961 };
35962 GridApi.prototype.getVirtualRowCount = function () {
35963 console.warn('AG Grid: getVirtualRowCount() is now called getInfiniteRowCount(), please call getInfiniteRowCount() instead');
35964 return this.getInfiniteRowCount();
35965 };
35966 /** The row count defines how many rows the grid allows scrolling to. */
35967 GridApi.prototype.getInfiniteRowCount = function () {
35968 if (this.infiniteRowModel) {
35969 return this.infiniteRowModel.getRowCount();
35970 }
35971 else {
35972 console.warn("AG Grid: api.getVirtualRowCount is only available when rowModelType='virtual'.");
35973 }
35974 };
35975 GridApi.prototype.isMaxRowFound = function () {
35976 console.warn("AG Grid: api.isLastRowIndexKnown is deprecated, please use api.isLastRowIndexKnown()");
35977 return this.isLastRowIndexKnown();
35978 };
35979 /** Returns `true` if grid allows for scrolling past the last row to load more rows, thus providing infinite scroll. */
35980 GridApi.prototype.isLastRowIndexKnown = function () {
35981 if (this.infiniteRowModel) {
35982 return this.infiniteRowModel.isLastRowIndexKnown();
35983 }
35984 else {
35985 console.warn("AG Grid: api.isMaxRowFound is only available when rowModelType='virtual'.");
35986 }
35987 };
35988 GridApi.prototype.setVirtualRowCount = function (rowCount, maxRowFound) {
35989 console.warn('AG Grid: setVirtualRowCount() is now called setInfiniteRowCount(), please call setInfiniteRowCount() instead');
35990 this.setRowCount(rowCount, maxRowFound);
35991 };
35992 GridApi.prototype.setInfiniteRowCount = function (rowCount, maxRowFound) {
35993 console.warn('AG Grid: setInfiniteRowCount() is now called setRowCount(), please call setRowCount() instead');
35994 this.setRowCount(rowCount, maxRowFound);
35995 };
35996 /**
35997 * Sets the `rowCount` and `lastRowIndexKnown` properties.
35998 * The second parameter, `lastRowIndexKnown`, is optional and if left out, only `rowCount` is set.
35999 * Set `rowCount` to adjust the height of the vertical scroll.
36000 * Set `lastRowIndexKnown` to enable / disable searching for more rows.
36001 * Use this method if you add or remove rows into the dataset and need to reset the number of rows or put the data back into 'look for data' mode.
36002 */
36003 GridApi.prototype.setRowCount = function (rowCount, maxRowFound) {
36004 if (this.infiniteRowModel) {
36005 this.infiniteRowModel.setRowCount(rowCount, maxRowFound);
36006 }
36007 else {
36008 console.warn("AG Grid: api.setRowCount is only available for Infinite Row Model.");
36009 }
36010 };
36011 GridApi.prototype.getVirtualPageState = function () {
36012 console.warn('AG Grid: getVirtualPageState() is now called getCacheBlockState(), please call getCacheBlockState() instead');
36013 return this.getCacheBlockState();
36014 };
36015 GridApi.prototype.getInfinitePageState = function () {
36016 console.warn('AG Grid: getInfinitePageState() is now called getCacheBlockState(), please call getCacheBlockState() instead');
36017 return this.getCacheBlockState();
36018 };
36019 /**
36020 * Returns an object representing the state of the cache. This is useful for debugging and understanding how the cache is working.
36021 */
36022 GridApi.prototype.getCacheBlockState = function () {
36023 return this.rowNodeBlockLoader.getBlockState();
36024 };
36025 GridApi.prototype.checkGridSize = function () {
36026 console.warn("in AG Grid v25.2.0, checkGridSize() was removed, as it was legacy and didn't do anything uesful.");
36027 };
36028 GridApi.prototype.getFirstRenderedRow = function () {
36029 console.warn('in AG Grid v12, getFirstRenderedRow() was renamed to getFirstDisplayedRow()');
36030 return this.getFirstDisplayedRow();
36031 };
36032 /** Get the index of the first displayed row due to scrolling (includes invisible rendered rows in the buffer). */
36033 GridApi.prototype.getFirstDisplayedRow = function () {
36034 return this.rowRenderer.getFirstVirtualRenderedRow();
36035 };
36036 GridApi.prototype.getLastRenderedRow = function () {
36037 console.warn('in AG Grid v12, getLastRenderedRow() was renamed to getLastDisplayedRow()');
36038 return this.getLastDisplayedRow();
36039 };
36040 /** Get the index of the last displayed row due to scrolling (includes invisible rendered rows in the buffer). */
36041 GridApi.prototype.getLastDisplayedRow = function () {
36042 return this.rowRenderer.getLastVirtualRenderedRow();
36043 };
36044 /** Returns the displayed `RowNode` at the given `index`. */
36045 GridApi.prototype.getDisplayedRowAtIndex = function (index) {
36046 return this.rowModel.getRow(index);
36047 };
36048 /** Returns the total number of displayed rows. */
36049 GridApi.prototype.getDisplayedRowCount = function () {
36050 return this.rowModel.getRowCount();
36051 };
36052 /**
36053 * Returns `true` when the last page is known.
36054 * This will always be `true` if you are using the Client-Side Row Model for pagination.
36055 * Returns `false` when the last page is not known; this only happens when using Infinite Row Model.
36056 */
36057 GridApi.prototype.paginationIsLastPageFound = function () {
36058 return this.paginationProxy.isLastPageFound();
36059 };
36060 /** Returns how many rows are being shown per page. */
36061 GridApi.prototype.paginationGetPageSize = function () {
36062 return this.paginationProxy.getPageSize();
36063 };
36064 /** Sets the `paginationPageSize`, then re-paginates the grid so the changes are applied immediately. */
36065 GridApi.prototype.paginationSetPageSize = function (size) {
36066 this.gridOptionsWrapper.setProperty('paginationPageSize', size);
36067 };
36068 /** Returns the 0-based index of the page which is showing. */
36069 GridApi.prototype.paginationGetCurrentPage = function () {
36070 return this.paginationProxy.getCurrentPage();
36071 };
36072 /** Returns the total number of pages. Returns `null` if `paginationIsLastPageFound() === false`. */
36073 GridApi.prototype.paginationGetTotalPages = function () {
36074 return this.paginationProxy.getTotalPages();
36075 };
36076 /** The total number of rows. Returns `null` if `paginationIsLastPageFound() === false`. */
36077 GridApi.prototype.paginationGetRowCount = function () {
36078 return this.paginationProxy.getMasterRowCount();
36079 };
36080 /** Navigates to the next page. */
36081 GridApi.prototype.paginationGoToNextPage = function () {
36082 this.paginationProxy.goToNextPage();
36083 };
36084 /** Navigates to the previous page. */
36085 GridApi.prototype.paginationGoToPreviousPage = function () {
36086 this.paginationProxy.goToPreviousPage();
36087 };
36088 /** Navigates to the first page. */
36089 GridApi.prototype.paginationGoToFirstPage = function () {
36090 this.paginationProxy.goToFirstPage();
36091 };
36092 /** Navigates to the last page. */
36093 GridApi.prototype.paginationGoToLastPage = function () {
36094 this.paginationProxy.goToLastPage();
36095 };
36096 /** Goes to the specified page. If the page requested doesn't exist, it will go to the last page. */
36097 GridApi.prototype.paginationGoToPage = function (page) {
36098 this.paginationProxy.goToPage(page);
36099 };
36100 GridApi.prototype.setRowClass = function (className) {
36101 this.gridOptionsWrapper.setProperty(_gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"].PROP_ROW_CLASS, className);
36102 };
36103 __decorate([
36104 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('immutableService')
36105 ], GridApi.prototype, "immutableService", void 0);
36106 __decorate([
36107 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('csvCreator')
36108 ], GridApi.prototype, "csvCreator", void 0);
36109 __decorate([
36110 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('excelCreator')
36111 ], GridApi.prototype, "excelCreator", void 0);
36112 __decorate([
36113 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowRenderer')
36114 ], GridApi.prototype, "rowRenderer", void 0);
36115 __decorate([
36116 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('navigationService')
36117 ], GridApi.prototype, "navigationService", void 0);
36118 __decorate([
36119 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('filterManager')
36120 ], GridApi.prototype, "filterManager", void 0);
36121 __decorate([
36122 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
36123 ], GridApi.prototype, "columnModel", void 0);
36124 __decorate([
36125 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('selectionService')
36126 ], GridApi.prototype, "selectionService", void 0);
36127 __decorate([
36128 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptionsWrapper')
36129 ], GridApi.prototype, "gridOptionsWrapper", void 0);
36130 __decorate([
36131 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('valueService')
36132 ], GridApi.prototype, "valueService", void 0);
36133 __decorate([
36134 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('alignedGridsService')
36135 ], GridApi.prototype, "alignedGridsService", void 0);
36136 __decorate([
36137 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('eventService')
36138 ], GridApi.prototype, "eventService", void 0);
36139 __decorate([
36140 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('pinnedRowModel')
36141 ], GridApi.prototype, "pinnedRowModel", void 0);
36142 __decorate([
36143 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('context')
36144 ], GridApi.prototype, "context", void 0);
36145 __decorate([
36146 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowModel')
36147 ], GridApi.prototype, "rowModel", void 0);
36148 __decorate([
36149 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('sortController')
36150 ], GridApi.prototype, "sortController", void 0);
36151 __decorate([
36152 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('paginationProxy')
36153 ], GridApi.prototype, "paginationProxy", void 0);
36154 __decorate([
36155 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('focusService')
36156 ], GridApi.prototype, "focusService", void 0);
36157 __decorate([
36158 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragAndDropService')
36159 ], GridApi.prototype, "dragAndDropService", void 0);
36160 __decorate([
36161 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('rangeService')
36162 ], GridApi.prototype, "rangeService", void 0);
36163 __decorate([
36164 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('clipboardService')
36165 ], GridApi.prototype, "clipboardService", void 0);
36166 __decorate([
36167 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('aggFuncService')
36168 ], GridApi.prototype, "aggFuncService", void 0);
36169 __decorate([
36170 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('menuFactory')
36171 ], GridApi.prototype, "menuFactory", void 0);
36172 __decorate([
36173 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('contextMenuFactory')
36174 ], GridApi.prototype, "contextMenuFactory", void 0);
36175 __decorate([
36176 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('valueCache')
36177 ], GridApi.prototype, "valueCache", void 0);
36178 __decorate([
36179 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('animationFrameService')
36180 ], GridApi.prototype, "animationFrameService", void 0);
36181 __decorate([
36182 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('statusBarService')
36183 ], GridApi.prototype, "statusBarService", void 0);
36184 __decorate([
36185 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('chartService')
36186 ], GridApi.prototype, "chartService", void 0);
36187 __decorate([
36188 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('undoRedoService')
36189 ], GridApi.prototype, "undoRedoService", void 0);
36190 __decorate([
36191 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('rowNodeBlockLoader')
36192 ], GridApi.prototype, "rowNodeBlockLoader", void 0);
36193 __decorate([
36194 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('ssrmTransactionManager')
36195 ], GridApi.prototype, "serverSideTransactionManager", void 0);
36196 __decorate([
36197 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
36198 ], GridApi.prototype, "ctrlsService", void 0);
36199 __decorate([
36200 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('frameworkComponentWrapper')
36201 ], GridApi.prototype, "frameworkComponentWrapper", void 0);
36202 __decorate([
36203 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
36204 ], GridApi.prototype, "init", null);
36205 __decorate([
36206 _context_context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
36207 ], GridApi.prototype, "cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid", null);
36208 GridApi = __decorate([
36209 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('gridApi')
36210 ], GridApi);
36211 return GridApi;
36212}());
36213
36214
36215
36216
36217
36218/***/ }),
36219/* 157 */
36220/***/ (function(module, __webpack_exports__, __webpack_require__) {
36221
36222"use strict";
36223__webpack_require__.r(__webpack_exports__);
36224/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelSteps", function() { return ClientSideRowModelSteps; });
36225/**
36226 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
36227 * @version v27.3.0
36228 * @link https://www.ag-grid.com/
36229 * @license MIT
36230 */
36231var ClientSideRowModelSteps;
36232(function (ClientSideRowModelSteps) {
36233 ClientSideRowModelSteps["EVERYTHING"] = "group";
36234 ClientSideRowModelSteps["FILTER"] = "filter";
36235 ClientSideRowModelSteps["SORT"] = "sort";
36236 ClientSideRowModelSteps["MAP"] = "map";
36237 ClientSideRowModelSteps["AGGREGATE"] = "aggregate";
36238 ClientSideRowModelSteps["FILTER_AGGREGATES"] = "filter_aggregates";
36239 ClientSideRowModelSteps["PIVOT"] = "pivot";
36240 ClientSideRowModelSteps["NOTHING"] = "nothing";
36241})(ClientSideRowModelSteps || (ClientSideRowModelSteps = {}));
36242
36243
36244
36245
36246/***/ }),
36247/* 158 */
36248/***/ (function(module, __webpack_exports__, __webpack_require__) {
36249
36250"use strict";
36251__webpack_require__.r(__webpack_exports__);
36252/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetLeftFeature", function() { return SetLeftFeature; });
36253/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
36254/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
36255/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
36256/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
36257/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(44);
36258/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18);
36259/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7);
36260/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(24);
36261/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(112);
36262/**
36263 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
36264 * @version v27.3.0
36265 * @link https://www.ag-grid.com/
36266 * @license MIT
36267 */
36268var __extends = (undefined && undefined.__extends) || (function () {
36269 var extendStatics = function (d, b) {
36270 extendStatics = Object.setPrototypeOf ||
36271 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36272 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
36273 return extendStatics(d, b);
36274 };
36275 return function (d, b) {
36276 extendStatics(d, b);
36277 function __() { this.constructor = d; }
36278 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36279 };
36280})();
36281var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
36282 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36283 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
36284 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
36285 return c > 3 && r && Object.defineProperty(target, key, r), r;
36286};
36287
36288
36289
36290
36291
36292
36293
36294
36295
36296var SetLeftFeature = /** @class */ (function (_super) {
36297 __extends(SetLeftFeature, _super);
36298 function SetLeftFeature(columnOrGroup, eCell, beans, colsSpanning) {
36299 var _this = _super.call(this) || this;
36300 _this.columnOrGroup = columnOrGroup;
36301 _this.eCell = eCell;
36302 _this.ariaEl = _this.eCell.querySelector('[role=columnheader]') || _this.eCell;
36303 _this.colsSpanning = colsSpanning;
36304 _this.beans = beans;
36305 return _this;
36306 }
36307 SetLeftFeature.prototype.setColsSpanning = function (colsSpanning) {
36308 this.colsSpanning = colsSpanning;
36309 this.onLeftChanged();
36310 };
36311 SetLeftFeature.prototype.getColumnOrGroup = function () {
36312 if (this.beans.gridOptionsWrapper.isEnableRtl() && this.colsSpanning) {
36313 return Object(_utils_array__WEBPACK_IMPORTED_MODULE_5__["last"])(this.colsSpanning);
36314 }
36315 return this.columnOrGroup;
36316 };
36317 SetLeftFeature.prototype.postConstruct = function () {
36318 this.addManagedListener(this.columnOrGroup, _entities_column__WEBPACK_IMPORTED_MODULE_0__["Column"].EVENT_LEFT_CHANGED, this.onLeftChanged.bind(this));
36319 this.setLeftFirstTime();
36320 // when in print layout, the left position is also dependent on the width of the pinned sections.
36321 // so additionally update left if any column width changes.
36322 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_7__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onLeftChanged.bind(this));
36323 // setting left has a dependency on print layout
36324 this.addManagedListener(this.beans.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_8__["GridOptionsWrapper"].PROP_DOM_LAYOUT, this.onLeftChanged.bind(this));
36325 };
36326 SetLeftFeature.prototype.setLeftFirstTime = function () {
36327 var suppressMoveAnimation = this.beans.gridOptionsWrapper.isSuppressColumnMoveAnimation();
36328 var oldLeftExists = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["exists"])(this.columnOrGroup.getOldLeft());
36329 var animateColumnMove = this.beans.columnAnimationService.isActive() && oldLeftExists && !suppressMoveAnimation;
36330 if (animateColumnMove) {
36331 this.animateInLeft();
36332 }
36333 else {
36334 this.onLeftChanged();
36335 }
36336 };
36337 SetLeftFeature.prototype.animateInLeft = function () {
36338 var _this = this;
36339 var colOrGroup = this.getColumnOrGroup();
36340 var left = colOrGroup.getLeft();
36341 var oldLeft = colOrGroup.getOldLeft();
36342 var oldActualLeft = this.modifyLeftForPrintLayout(colOrGroup, oldLeft);
36343 var actualLeft = this.modifyLeftForPrintLayout(colOrGroup, left);
36344 this.setLeft(oldActualLeft);
36345 // we must keep track of the left we want to set to, as this would otherwise lead to a race
36346 // condition, if the user changed the left value many times in one VM turn, then we want to make
36347 // make sure the actualLeft we set in the timeout below (in the next VM turn) is the correct left
36348 // position. eg if user changes column position twice, then setLeft() below executes twice in next
36349 // VM turn, but only one (the correct one) should get applied.
36350 this.actualLeft = actualLeft;
36351 this.beans.columnAnimationService.executeNextVMTurn(function () {
36352 // test this left value is the latest one to be applied, and if not, do nothing
36353 if (_this.actualLeft === actualLeft) {
36354 _this.setLeft(actualLeft);
36355 }
36356 });
36357 };
36358 SetLeftFeature.prototype.onLeftChanged = function () {
36359 var colOrGroup = this.getColumnOrGroup();
36360 var left = colOrGroup.getLeft();
36361 this.actualLeft = this.modifyLeftForPrintLayout(colOrGroup, left);
36362 this.setLeft(this.actualLeft);
36363 };
36364 SetLeftFeature.prototype.modifyLeftForPrintLayout = function (colOrGroup, leftPosition) {
36365 var printLayout = this.beans.gridOptionsWrapper.getDomLayout() === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].DOM_LAYOUT_PRINT;
36366 if (!printLayout) {
36367 return leftPosition;
36368 }
36369 if (colOrGroup.getPinned() === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_LEFT) {
36370 return leftPosition;
36371 }
36372 var leftWidth = this.beans.columnModel.getDisplayedColumnsLeftWidth();
36373 if (colOrGroup.getPinned() === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_RIGHT) {
36374 var bodyWidth = this.beans.columnModel.getBodyContainerWidth();
36375 return leftWidth + bodyWidth + leftPosition;
36376 }
36377 // is in body
36378 return leftWidth + leftPosition;
36379 };
36380 SetLeftFeature.prototype.setLeft = function (value) {
36381 // if the value is null, then that means the column is no longer
36382 // displayed. there is logic in the rendering to fade these columns
36383 // out, so we don't try and change their left positions.
36384 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["exists"])(value)) {
36385 this.eCell.style.left = value + "px";
36386 }
36387 var indexColumn;
36388 if (this.columnOrGroup instanceof _entities_column__WEBPACK_IMPORTED_MODULE_0__["Column"]) {
36389 indexColumn = this.columnOrGroup;
36390 }
36391 else {
36392 var columnGroup = this.columnOrGroup;
36393 var children = columnGroup.getLeafColumns();
36394 if (!children.length) {
36395 return;
36396 }
36397 if (children.length > 1) {
36398 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_4__["setAriaColSpan"])(this.ariaEl, children.length);
36399 }
36400 indexColumn = children[0];
36401 }
36402 var index = this.beans.columnModel.getAriaColumnIndex(indexColumn);
36403 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_4__["setAriaColIndex"])(this.ariaEl, index);
36404 };
36405 __decorate([
36406 _context_context__WEBPACK_IMPORTED_MODULE_3__["PostConstruct"]
36407 ], SetLeftFeature.prototype, "postConstruct", null);
36408 return SetLeftFeature;
36409}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
36410
36411
36412
36413
36414
36415/***/ }),
36416/* 159 */
36417/***/ (function(module, __webpack_exports__, __webpack_require__) {
36418
36419"use strict";
36420__webpack_require__.r(__webpack_exports__);
36421/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HoverFeature", function() { return HoverFeature; });
36422/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
36423/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
36424/**
36425 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
36426 * @version v27.3.0
36427 * @link https://www.ag-grid.com/
36428 * @license MIT
36429 */
36430var __extends = (undefined && undefined.__extends) || (function () {
36431 var extendStatics = function (d, b) {
36432 extendStatics = Object.setPrototypeOf ||
36433 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36434 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
36435 return extendStatics(d, b);
36436 };
36437 return function (d, b) {
36438 extendStatics(d, b);
36439 function __() { this.constructor = d; }
36440 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36441 };
36442})();
36443var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
36444 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36445 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
36446 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
36447 return c > 3 && r && Object.defineProperty(target, key, r), r;
36448};
36449
36450
36451var HoverFeature = /** @class */ (function (_super) {
36452 __extends(HoverFeature, _super);
36453 function HoverFeature(columns, element) {
36454 var _this = _super.call(this) || this;
36455 _this.columns = columns;
36456 _this.element = element;
36457 return _this;
36458 }
36459 HoverFeature.prototype.postConstruct = function () {
36460 if (this.gridOptionsWrapper.isColumnHoverHighlight()) {
36461 this.addMouseHoverListeners();
36462 }
36463 };
36464 HoverFeature.prototype.addMouseHoverListeners = function () {
36465 this.addManagedListener(this.element, 'mouseout', this.onMouseOut.bind(this));
36466 this.addManagedListener(this.element, 'mouseover', this.onMouseOver.bind(this));
36467 };
36468 HoverFeature.prototype.onMouseOut = function () {
36469 this.columnHoverService.clearMouseOver();
36470 };
36471 HoverFeature.prototype.onMouseOver = function () {
36472 this.columnHoverService.setMouseOver(this.columns);
36473 };
36474 __decorate([
36475 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnHoverService')
36476 ], HoverFeature.prototype, "columnHoverService", void 0);
36477 __decorate([
36478 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
36479 ], HoverFeature.prototype, "postConstruct", null);
36480 return HoverFeature;
36481}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
36482
36483
36484
36485
36486
36487/***/ }),
36488/* 160 */
36489/***/ (function(module, __webpack_exports__, __webpack_require__) {
36490
36491"use strict";
36492__webpack_require__.r(__webpack_exports__);
36493/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderCellCtrl", function() { return HeaderCellCtrl; });
36494/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65);
36495/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
36496/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97);
36497/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
36498/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24);
36499/* harmony import */ var _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(158);
36500/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44);
36501/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(64);
36502/* harmony import */ var _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(126);
36503/* harmony import */ var _abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(155);
36504/* harmony import */ var _cssClassApplier__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(147);
36505/* harmony import */ var _hoverFeature__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(159);
36506/* harmony import */ var _resizeFeature__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(161);
36507/* harmony import */ var _selectAllFeature__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(162);
36508/**
36509 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
36510 * @version v27.3.0
36511 * @link https://www.ag-grid.com/
36512 * @license MIT
36513 */
36514var __extends = (undefined && undefined.__extends) || (function () {
36515 var extendStatics = function (d, b) {
36516 extendStatics = Object.setPrototypeOf ||
36517 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36518 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
36519 return extendStatics(d, b);
36520 };
36521 return function (d, b) {
36522 extendStatics(d, b);
36523 function __() { this.constructor = d; }
36524 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36525 };
36526})();
36527var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
36528 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36529 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
36530 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
36531 return c > 3 && r && Object.defineProperty(target, key, r), r;
36532};
36533
36534
36535
36536
36537
36538
36539
36540
36541
36542
36543
36544
36545
36546
36547var HeaderCellCtrl = /** @class */ (function (_super) {
36548 __extends(HeaderCellCtrl, _super);
36549 function HeaderCellCtrl(column, parentRowCtrl) {
36550 var _this = _super.call(this, column, parentRowCtrl) || this;
36551 _this.refreshFunctions = [];
36552 _this.userHeaderClasses = new Set();
36553 _this.ariaDescriptionProperties = new Map();
36554 _this.column = column;
36555 return _this;
36556 }
36557 HeaderCellCtrl.prototype.setComp = function (comp, eGui, eResize) {
36558 var _this = this;
36559 _super.prototype.setGui.call(this, eGui);
36560 this.comp = comp;
36561 this.colDefVersion = this.columnModel.getColDefVersion();
36562 this.updateState();
36563 this.setupWidth();
36564 this.setupMovingCss();
36565 this.setupMenuClass();
36566 this.setupSortableClass();
36567 this.addColumnHoverListener();
36568 this.setupFilterCss();
36569 this.setupColId();
36570 this.setupClassesFromColDef();
36571 this.setupTooltip();
36572 this.addActiveHeaderMouseListeners();
36573 this.setupSelectAll();
36574 this.setupUserComp();
36575 this.refreshAria();
36576 this.createManagedBean(new _resizeFeature__WEBPACK_IMPORTED_MODULE_12__["ResizeFeature"](this.getPinned(), this.column, eResize, comp, this));
36577 this.createManagedBean(new _hoverFeature__WEBPACK_IMPORTED_MODULE_11__["HoverFeature"]([this.column], eGui));
36578 this.createManagedBean(new _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_5__["SetLeftFeature"](this.column, eGui, this.beans));
36579 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_7__["ManagedFocusFeature"](eGui, {
36580 shouldStopEventPropagation: function (e) { return _this.shouldStopEventPropagation(e); },
36581 onTabKeyDown: function () { return null; },
36582 handleKeyDown: this.handleKeyDown.bind(this),
36583 onFocusIn: this.onFocusIn.bind(this),
36584 onFocusOut: this.onFocusOut.bind(this)
36585 }));
36586 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));
36587 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_VALUE_CHANGED, this.onColumnValueChanged.bind(this));
36588 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, this.onColumnRowGroupChanged.bind(this));
36589 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_PIVOT_CHANGED, this.onColumnPivotChanged.bind(this));
36590 };
36591 HeaderCellCtrl.prototype.setupUserComp = function () {
36592 var compDetails = this.lookupUserCompDetails();
36593 this.setCompDetails(compDetails);
36594 };
36595 HeaderCellCtrl.prototype.setCompDetails = function (compDetails) {
36596 this.userCompDetails = compDetails;
36597 this.comp.setUserCompDetails(compDetails);
36598 };
36599 HeaderCellCtrl.prototype.lookupUserCompDetails = function () {
36600 var params = this.createParams();
36601 var colDef = this.column.getColDef();
36602 return this.userComponentFactory.getHeaderCompDetails(colDef, params);
36603 };
36604 HeaderCellCtrl.prototype.createParams = function () {
36605 var _this = this;
36606 var colDef = this.column.getColDef();
36607 var params = {
36608 column: this.column,
36609 displayName: this.displayName,
36610 enableSorting: colDef.sortable,
36611 enableMenu: this.menuEnabled,
36612 showColumnMenu: function (source) {
36613 _this.gridApi.showColumnMenuAfterButtonClick(_this.column, source);
36614 },
36615 progressSort: function (multiSort) {
36616 _this.sortController.progressSort(_this.column, !!multiSort, "uiColumnSorted");
36617 },
36618 setSort: function (sort, multiSort) {
36619 _this.sortController.setSortForColumn(_this.column, sort, !!multiSort, "uiColumnSorted");
36620 },
36621 api: this.gridApi,
36622 columnApi: this.columnApi,
36623 context: this.gridOptionsWrapper.getContext(),
36624 eGridHeader: this.getGui()
36625 };
36626 return params;
36627 };
36628 HeaderCellCtrl.prototype.setupSelectAll = function () {
36629 this.selectAllFeature = this.createManagedBean(new _selectAllFeature__WEBPACK_IMPORTED_MODULE_13__["SelectAllFeature"](this.column));
36630 this.selectAllFeature.setComp(this);
36631 };
36632 HeaderCellCtrl.prototype.getSelectAllGui = function () {
36633 return this.selectAllFeature.getCheckboxGui();
36634 };
36635 HeaderCellCtrl.prototype.handleKeyDown = function (e) {
36636 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].SPACE) {
36637 this.selectAllFeature.onSpaceKeyPressed(e);
36638 }
36639 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].ENTER) {
36640 this.onEnterKeyPressed(e);
36641 }
36642 };
36643 HeaderCellCtrl.prototype.onEnterKeyPressed = function (e) {
36644 /// THIS IS BAD - we are assuming the header is not a user provided comp
36645 var headerComp = this.comp.getUserCompInstance();
36646 if (!headerComp) {
36647 return;
36648 }
36649 if (e.ctrlKey || e.metaKey) {
36650 if (this.menuEnabled && headerComp.showMenu) {
36651 e.preventDefault();
36652 headerComp.showMenu();
36653 }
36654 }
36655 else if (this.sortable) {
36656 var multiSort = e.shiftKey;
36657 this.sortController.progressSort(this.column, multiSort, "uiColumnSorted");
36658 }
36659 };
36660 HeaderCellCtrl.prototype.isMenuEnabled = function () {
36661 return this.menuEnabled;
36662 };
36663 HeaderCellCtrl.prototype.onFocusIn = function (e) {
36664 if (!this.getGui().contains(e.relatedTarget)) {
36665 var rowIndex = this.getRowIndex();
36666 this.focusService.setFocusedHeader(rowIndex, this.column);
36667 }
36668 this.setActiveHeader(true);
36669 };
36670 HeaderCellCtrl.prototype.onFocusOut = function (e) {
36671 if (this.getGui().contains(e.relatedTarget)) {
36672 return;
36673 }
36674 this.setActiveHeader(false);
36675 };
36676 HeaderCellCtrl.prototype.setupTooltip = function () {
36677 var _this = this;
36678 var tooltipCtrl = {
36679 getColumn: function () { return _this.column; },
36680 getColDef: function () { return _this.column.getColDef(); },
36681 getGui: function () { return _this.eGui; },
36682 getLocation: function () { return 'header'; },
36683 getTooltipValue: function () {
36684 var res = _this.column.getColDef().headerTooltip;
36685 return res;
36686 },
36687 };
36688 var tooltipFeature = this.createManagedBean(new _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_8__["TooltipFeature"](tooltipCtrl, this.beans));
36689 tooltipFeature.setComp(this.comp);
36690 this.refreshFunctions.push(function () { return tooltipFeature.refreshToolTip(); });
36691 };
36692 HeaderCellCtrl.prototype.setupClassesFromColDef = function () {
36693 var _this = this;
36694 var refreshHeaderClasses = function () {
36695 var colDef = _this.column.getColDef();
36696 var goa = _this.gridOptionsWrapper;
36697 var classes = _cssClassApplier__WEBPACK_IMPORTED_MODULE_10__["CssClassApplier"].getHeaderClassesFromColDef(colDef, goa, _this.column, null);
36698 var oldClasses = _this.userHeaderClasses;
36699 _this.userHeaderClasses = new Set(classes);
36700 classes.forEach(function (c) {
36701 if (oldClasses.has(c)) {
36702 // class already added, no need to apply it, but remove from old set
36703 oldClasses.delete(c);
36704 }
36705 else {
36706 // class new since last time, so apply it
36707 _this.comp.addOrRemoveCssClass(c, true);
36708 }
36709 });
36710 // now old set only has classes that were applied last time, but not this time, so remove them
36711 oldClasses.forEach(function (c) { return _this.comp.addOrRemoveCssClass(c, false); });
36712 };
36713 this.refreshFunctions.push(refreshHeaderClasses);
36714 refreshHeaderClasses();
36715 };
36716 HeaderCellCtrl.prototype.setDragSource = function (eSource) {
36717 var _this = this;
36718 this.dragSourceElement = eSource;
36719 this.removeDragSource();
36720 if (!eSource) {
36721 return;
36722 }
36723 if (!this.draggable) {
36724 return;
36725 }
36726 this.moveDragSource = {
36727 type: _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragSourceType"].HeaderCell,
36728 eElement: eSource,
36729 defaultIconName: _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_HIDE,
36730 getDragItem: function () { return _this.createDragItem(); },
36731 dragItemName: this.displayName,
36732 onDragStarted: function () { return _this.column.setMoving(true, "uiColumnMoved"); },
36733 onDragStopped: function () { return _this.column.setMoving(false, "uiColumnMoved"); }
36734 };
36735 this.dragAndDropService.addDragSource(this.moveDragSource, true);
36736 };
36737 HeaderCellCtrl.prototype.createDragItem = function () {
36738 var visibleState = {};
36739 visibleState[this.column.getId()] = this.column.isVisible();
36740 return {
36741 columns: [this.column],
36742 visibleState: visibleState
36743 };
36744 };
36745 HeaderCellCtrl.prototype.removeDragSource = function () {
36746 if (this.moveDragSource) {
36747 this.dragAndDropService.removeDragSource(this.moveDragSource);
36748 this.moveDragSource = undefined;
36749 }
36750 };
36751 HeaderCellCtrl.prototype.onNewColumnsLoaded = function () {
36752 var colDefVersionNow = this.columnModel.getColDefVersion();
36753 if (colDefVersionNow != this.colDefVersion) {
36754 this.colDefVersion = colDefVersionNow;
36755 this.refresh();
36756 }
36757 };
36758 HeaderCellCtrl.prototype.updateState = function () {
36759 var colDef = this.column.getColDef();
36760 this.menuEnabled = this.menuFactory.isMenuEnabled(this.column) && !colDef.suppressMenu;
36761 this.sortable = colDef.sortable;
36762 this.displayName = this.calculateDisplayName();
36763 this.draggable = this.workOutDraggable();
36764 };
36765 HeaderCellCtrl.prototype.addRefreshFunction = function (func) {
36766 this.refreshFunctions.push(func);
36767 };
36768 HeaderCellCtrl.prototype.refresh = function () {
36769 this.updateState();
36770 this.refreshHeaderComp();
36771 this.refreshAria();
36772 this.refreshFunctions.forEach(function (f) { return f(); });
36773 };
36774 HeaderCellCtrl.prototype.refreshHeaderComp = function () {
36775 var newCompDetails = this.lookupUserCompDetails();
36776 var compInstance = this.comp.getUserCompInstance();
36777 // only try refresh if old comp exists adn it is the correct type
36778 var attemptRefresh = compInstance != null && this.userCompDetails.componentClass == newCompDetails.componentClass;
36779 var headerCompRefreshed = attemptRefresh ? this.attemptHeaderCompRefresh(newCompDetails.params) : false;
36780 if (headerCompRefreshed) {
36781 // we do this as a refresh happens after colDefs change, and it's possible the column has had it's
36782 // draggable property toggled. no need to call this if not refreshing, as setDragSource is done
36783 // as part of appendHeaderComp
36784 this.setDragSource(this.dragSourceElement);
36785 }
36786 else {
36787 this.setCompDetails(newCompDetails);
36788 }
36789 };
36790 HeaderCellCtrl.prototype.attemptHeaderCompRefresh = function (params) {
36791 var headerComp = this.comp.getUserCompInstance();
36792 if (!headerComp) {
36793 return false;
36794 }
36795 // if no refresh method, then we want to replace the headerComp
36796 if (!headerComp.refresh) {
36797 return false;
36798 }
36799 var res = headerComp.refresh(params);
36800 return res;
36801 };
36802 HeaderCellCtrl.prototype.calculateDisplayName = function () {
36803 return this.columnModel.getDisplayNameForColumn(this.column, 'header', true);
36804 };
36805 HeaderCellCtrl.prototype.checkDisplayName = function () {
36806 // display name can change if aggFunc different, eg sum(Gold) is now max(Gold)
36807 if (this.displayName !== this.calculateDisplayName()) {
36808 this.refresh();
36809 }
36810 };
36811 HeaderCellCtrl.prototype.workOutDraggable = function () {
36812 var colDef = this.column.getColDef();
36813 var isSuppressMovableColumns = this.gridOptionsWrapper.isSuppressMovableColumns();
36814 var colCanMove = !isSuppressMovableColumns && !colDef.suppressMovable && !colDef.lockPosition;
36815 // we should still be allowed drag the column, even if it can't be moved, if the column
36816 // can be dragged to a rowGroup or pivot drop zone
36817 return !!colCanMove || !!colDef.enableRowGroup || !!colDef.enablePivot;
36818 };
36819 HeaderCellCtrl.prototype.onColumnRowGroupChanged = function () {
36820 this.checkDisplayName();
36821 };
36822 HeaderCellCtrl.prototype.onColumnPivotChanged = function () {
36823 this.checkDisplayName();
36824 };
36825 HeaderCellCtrl.prototype.onColumnValueChanged = function () {
36826 this.checkDisplayName();
36827 };
36828 HeaderCellCtrl.prototype.setupWidth = function () {
36829 var _this = this;
36830 var listener = function () {
36831 _this.comp.setWidth(_this.column.getActualWidth() + 'px');
36832 };
36833 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_WIDTH_CHANGED, listener);
36834 listener();
36835 };
36836 HeaderCellCtrl.prototype.setupMovingCss = function () {
36837 var _this = this;
36838 var listener = function () {
36839 // this is what makes the header go dark when it is been moved (gives impression to
36840 // user that the column was picked up).
36841 _this.comp.addOrRemoveCssClass('ag-header-cell-moving', _this.column.isMoving());
36842 };
36843 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_MOVING_CHANGED, listener);
36844 listener();
36845 };
36846 HeaderCellCtrl.prototype.setupMenuClass = function () {
36847 var _this = this;
36848 var listener = function () {
36849 _this.comp.addOrRemoveCssClass('ag-column-menu-visible', _this.column.isMenuVisible());
36850 };
36851 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_MENU_VISIBLE_CHANGED, listener);
36852 listener();
36853 };
36854 HeaderCellCtrl.prototype.setupSortableClass = function () {
36855 var _this = this;
36856 var updateSortableCssClass = function () {
36857 _this.comp.addOrRemoveCssClass('ag-header-cell-sortable', !!_this.sortable);
36858 };
36859 updateSortableCssClass();
36860 this.addRefreshFunction(updateSortableCssClass);
36861 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_SORT_CHANGED, this.refreshAriaSort.bind(this));
36862 };
36863 HeaderCellCtrl.prototype.refreshAriaSort = function () {
36864 if (this.sortable) {
36865 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
36866 this.comp.setAriaSort(Object(_utils_aria__WEBPACK_IMPORTED_MODULE_6__["getAriaSortState"])(this.column));
36867 this.setAriaDescriptionProperty('sort', translate('ariaSortableColumn', 'Press ENTER to sort.'));
36868 }
36869 else {
36870 this.comp.setAriaSort();
36871 this.setAriaDescriptionProperty('sort', null);
36872 }
36873 };
36874 HeaderCellCtrl.prototype.refreshAriaMenu = function () {
36875 if (this.menuEnabled) {
36876 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
36877 this.setAriaDescriptionProperty('menu', translate('ariaMenuColumn', 'Press CTRL ENTER to open column menu.'));
36878 }
36879 else {
36880 this.setAriaDescriptionProperty('menu', null);
36881 }
36882 };
36883 HeaderCellCtrl.prototype.setAriaDescriptionProperty = function (property, value) {
36884 if (value != null) {
36885 this.ariaDescriptionProperties.set(property, value);
36886 }
36887 else {
36888 this.ariaDescriptionProperties.delete(property);
36889 }
36890 };
36891 HeaderCellCtrl.prototype.refreshAriaDescription = function () {
36892 var descriptionArray = Array.from(this.ariaDescriptionProperties.values());
36893 this.comp.setAriaDescription(descriptionArray.length ? descriptionArray.join(' ') : undefined);
36894 };
36895 HeaderCellCtrl.prototype.refreshAria = function () {
36896 this.refreshAriaSort();
36897 this.refreshAriaMenu();
36898 this.refreshAriaDescription();
36899 };
36900 HeaderCellCtrl.prototype.addColumnHoverListener = function () {
36901 var _this = this;
36902 var listener = function () {
36903 if (!_this.gridOptionsWrapper.isColumnHoverHighlight()) {
36904 return;
36905 }
36906 var isHovered = _this.columnHoverService.isHovered(_this.column);
36907 _this.comp.addOrRemoveCssClass('ag-column-hover', isHovered);
36908 };
36909 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_HOVER_CHANGED, listener);
36910 listener();
36911 };
36912 HeaderCellCtrl.prototype.setupFilterCss = function () {
36913 var _this = this;
36914 var listener = function () {
36915 _this.comp.addOrRemoveCssClass('ag-header-cell-filtered', _this.column.isFilterActive());
36916 };
36917 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_FILTER_ACTIVE_CHANGED, listener);
36918 listener();
36919 };
36920 HeaderCellCtrl.prototype.setupColId = function () {
36921 this.comp.setColId(this.column.getColId());
36922 };
36923 HeaderCellCtrl.prototype.addActiveHeaderMouseListeners = function () {
36924 var _this = this;
36925 var listener = function (e) { return _this.setActiveHeader(e.type === 'mouseenter'); };
36926 this.addManagedListener(this.getGui(), 'mouseenter', listener);
36927 this.addManagedListener(this.getGui(), 'mouseleave', listener);
36928 };
36929 HeaderCellCtrl.prototype.setActiveHeader = function (active) {
36930 this.comp.addOrRemoveCssClass('ag-header-active', active);
36931 };
36932 __decorate([
36933 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
36934 ], HeaderCellCtrl.prototype, "columnModel", void 0);
36935 __decorate([
36936 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnHoverService')
36937 ], HeaderCellCtrl.prototype, "columnHoverService", void 0);
36938 __decorate([
36939 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('beans')
36940 ], HeaderCellCtrl.prototype, "beans", void 0);
36941 __decorate([
36942 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('sortController')
36943 ], HeaderCellCtrl.prototype, "sortController", void 0);
36944 __decorate([
36945 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('menuFactory')
36946 ], HeaderCellCtrl.prototype, "menuFactory", void 0);
36947 __decorate([
36948 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragAndDropService')
36949 ], HeaderCellCtrl.prototype, "dragAndDropService", void 0);
36950 __decorate([
36951 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridApi')
36952 ], HeaderCellCtrl.prototype, "gridApi", void 0);
36953 __decorate([
36954 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnApi')
36955 ], HeaderCellCtrl.prototype, "columnApi", void 0);
36956 __decorate([
36957 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('userComponentFactory')
36958 ], HeaderCellCtrl.prototype, "userComponentFactory", void 0);
36959 __decorate([
36960 _context_context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
36961 ], HeaderCellCtrl.prototype, "removeDragSource", null);
36962 return HeaderCellCtrl;
36963}(_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_9__["AbstractHeaderCellCtrl"]));
36964
36965
36966
36967
36968
36969/***/ }),
36970/* 161 */
36971/***/ (function(module, __webpack_exports__, __webpack_require__) {
36972
36973"use strict";
36974__webpack_require__.r(__webpack_exports__);
36975/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResizeFeature", function() { return ResizeFeature; });
36976/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
36977/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
36978/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
36979/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
36980/* harmony import */ var _widgets_touchListener__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(82);
36981/**
36982 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
36983 * @version v27.3.0
36984 * @link https://www.ag-grid.com/
36985 * @license MIT
36986 */
36987var __extends = (undefined && undefined.__extends) || (function () {
36988 var extendStatics = function (d, b) {
36989 extendStatics = Object.setPrototypeOf ||
36990 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36991 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
36992 return extendStatics(d, b);
36993 };
36994 return function (d, b) {
36995 extendStatics(d, b);
36996 function __() { this.constructor = d; }
36997 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36998 };
36999})();
37000var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
37001 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
37002 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37003 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
37004 return c > 3 && r && Object.defineProperty(target, key, r), r;
37005};
37006
37007
37008
37009
37010
37011var ResizeFeature = /** @class */ (function (_super) {
37012 __extends(ResizeFeature, _super);
37013 function ResizeFeature(pinned, column, eResize, comp, ctrl) {
37014 var _this = _super.call(this) || this;
37015 _this.pinned = pinned;
37016 _this.column = column;
37017 _this.eResize = eResize;
37018 _this.comp = comp;
37019 _this.ctrl = ctrl;
37020 return _this;
37021 }
37022 ResizeFeature.prototype.postConstruct = function () {
37023 var _this = this;
37024 var colDef = this.column.getColDef();
37025 var destroyResizeFuncs = [];
37026 var canResize;
37027 var canAutosize;
37028 var addResize = function () {
37029 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setDisplayed"])(_this.eResize, canResize);
37030 if (!canResize) {
37031 return;
37032 }
37033 var finishedWithResizeFunc = _this.horizontalResizeService.addResizeBar({
37034 eResizeBar: _this.eResize,
37035 onResizeStart: _this.onResizeStart.bind(_this),
37036 onResizing: _this.onResizing.bind(_this, false),
37037 onResizeEnd: _this.onResizing.bind(_this, true)
37038 });
37039 destroyResizeFuncs.push(finishedWithResizeFunc);
37040 if (canAutosize) {
37041 var skipHeaderOnAutoSize_1 = _this.gridOptionsWrapper.isSkipHeaderOnAutoSize();
37042 var autoSizeColListener_1 = function () {
37043 _this.columnModel.autoSizeColumn(_this.column, skipHeaderOnAutoSize_1, "uiColumnResized");
37044 };
37045 _this.eResize.addEventListener('dblclick', autoSizeColListener_1);
37046 var touchListener_1 = new _widgets_touchListener__WEBPACK_IMPORTED_MODULE_4__["TouchListener"](_this.eResize);
37047 touchListener_1.addEventListener(_widgets_touchListener__WEBPACK_IMPORTED_MODULE_4__["TouchListener"].EVENT_DOUBLE_TAP, autoSizeColListener_1);
37048 _this.addDestroyFunc(function () {
37049 _this.eResize.removeEventListener('dblclick', autoSizeColListener_1);
37050 touchListener_1.removeEventListener(_widgets_touchListener__WEBPACK_IMPORTED_MODULE_4__["TouchListener"].EVENT_DOUBLE_TAP, autoSizeColListener_1);
37051 touchListener_1.destroy();
37052 });
37053 }
37054 };
37055 var removeResize = function () {
37056 destroyResizeFuncs.forEach(function (f) { return f(); });
37057 destroyResizeFuncs.length = 0;
37058 };
37059 var refresh = function () {
37060 var resize = _this.column.isResizable();
37061 var autoSize = !_this.gridOptionsWrapper.isSuppressAutoSize() && !colDef.suppressAutoSize;
37062 var propertyChange = resize !== canResize || autoSize !== canAutosize;
37063 if (propertyChange) {
37064 canResize = resize;
37065 canAutosize = autoSize;
37066 removeResize();
37067 addResize();
37068 }
37069 };
37070 refresh();
37071 this.addDestroyFunc(removeResize);
37072 this.ctrl.addRefreshFunction(refresh);
37073 };
37074 ResizeFeature.prototype.onResizing = function (finished, resizeAmount) {
37075 var resizeAmountNormalised = this.normaliseResizeAmount(resizeAmount);
37076 var columnWidths = [{ key: this.column, newWidth: this.resizeStartWidth + resizeAmountNormalised }];
37077 this.columnModel.setColumnWidths(columnWidths, this.resizeWithShiftKey, finished, "uiColumnDragged");
37078 if (finished) {
37079 this.comp.addOrRemoveCssClass('ag-column-resizing', false);
37080 }
37081 };
37082 ResizeFeature.prototype.onResizeStart = function (shiftKey) {
37083 this.resizeStartWidth = this.column.getActualWidth();
37084 this.resizeWithShiftKey = shiftKey;
37085 this.comp.addOrRemoveCssClass('ag-column-resizing', true);
37086 };
37087 // optionally inverts the drag, depending on pinned and RTL
37088 // note - this method is duplicated in RenderedHeaderGroupCell - should refactor out?
37089 ResizeFeature.prototype.normaliseResizeAmount = function (dragChange) {
37090 var result = dragChange;
37091 var notPinningLeft = this.pinned !== _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_LEFT;
37092 var pinningRight = this.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_RIGHT;
37093 if (this.gridOptionsWrapper.isEnableRtl()) {
37094 // for RTL, dragging left makes the col bigger, except when pinning left
37095 if (notPinningLeft) {
37096 result *= -1;
37097 }
37098 }
37099 else {
37100 // for LTR (ie normal), dragging left makes the col smaller, except when pinning right
37101 if (pinningRight) {
37102 result *= -1;
37103 }
37104 }
37105 return result;
37106 };
37107 __decorate([
37108 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('horizontalResizeService')
37109 ], ResizeFeature.prototype, "horizontalResizeService", void 0);
37110 __decorate([
37111 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
37112 ], ResizeFeature.prototype, "columnModel", void 0);
37113 __decorate([
37114 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
37115 ], ResizeFeature.prototype, "postConstruct", null);
37116 return ResizeFeature;
37117}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
37118
37119
37120
37121
37122
37123/***/ }),
37124/* 162 */
37125/***/ (function(module, __webpack_exports__, __webpack_require__) {
37126
37127"use strict";
37128__webpack_require__.r(__webpack_exports__);
37129/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectAllFeature", function() { return SelectAllFeature; });
37130/* harmony import */ var _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(163);
37131/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
37132/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
37133/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
37134/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15);
37135/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(44);
37136/**
37137 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
37138 * @version v27.3.0
37139 * @link https://www.ag-grid.com/
37140 * @license MIT
37141 */
37142var __extends = (undefined && undefined.__extends) || (function () {
37143 var extendStatics = function (d, b) {
37144 extendStatics = Object.setPrototypeOf ||
37145 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
37146 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
37147 return extendStatics(d, b);
37148 };
37149 return function (d, b) {
37150 extendStatics(d, b);
37151 function __() { this.constructor = d; }
37152 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
37153 };
37154})();
37155var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
37156 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
37157 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37158 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
37159 return c > 3 && r && Object.defineProperty(target, key, r), r;
37160};
37161
37162
37163
37164
37165
37166
37167var SelectAllFeature = /** @class */ (function (_super) {
37168 __extends(SelectAllFeature, _super);
37169 function SelectAllFeature(column) {
37170 var _this = _super.call(this) || this;
37171 _this.cbSelectAllVisible = false;
37172 _this.processingEventFromCheckbox = false;
37173 _this.column = column;
37174 var colDef = column.getColDef();
37175 _this.filteredOnly = colDef ? !!colDef.headerCheckboxSelectionFilteredOnly : false;
37176 return _this;
37177 }
37178 SelectAllFeature.prototype.onSpaceKeyPressed = function (e) {
37179 var checkbox = this.cbSelectAll;
37180 var eDocument = this.gridOptionsWrapper.getDocument();
37181 if (checkbox.isDisplayed() && !checkbox.getGui().contains(eDocument.activeElement)) {
37182 e.preventDefault();
37183 checkbox.setValue(!checkbox.getValue());
37184 }
37185 };
37186 SelectAllFeature.prototype.getCheckboxGui = function () {
37187 return this.cbSelectAll.getGui();
37188 };
37189 SelectAllFeature.prototype.setComp = function (ctrl) {
37190 this.headerCellCtrl = ctrl;
37191 this.cbSelectAll = this.createManagedBean(new _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_0__["AgCheckbox"]());
37192 this.cbSelectAll.addCssClass('ag-header-select-all');
37193 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaRole"])(this.cbSelectAll.getGui(), 'presentation');
37194 this.showOrHideSelectAll();
37195 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_NEW_COLUMNS_LOADED, this.showOrHideSelectAll.bind(this));
37196 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.showOrHideSelectAll.bind(this));
37197 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_SELECTION_CHANGED, this.onSelectionChanged.bind(this));
37198 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_MODEL_UPDATED, this.onModelChanged.bind(this));
37199 this.addManagedListener(this.cbSelectAll, _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_0__["AgCheckbox"].EVENT_CHANGED, this.onCbSelectAll.bind(this));
37200 this.cbSelectAll.getInputElement().setAttribute('tabindex', '-1');
37201 this.refreshSelectAllLabel();
37202 };
37203 SelectAllFeature.prototype.showOrHideSelectAll = function () {
37204 this.cbSelectAllVisible = this.isCheckboxSelection();
37205 this.cbSelectAll.setDisplayed(this.cbSelectAllVisible);
37206 if (this.cbSelectAllVisible) {
37207 // in case user is trying this feature with the wrong model type
37208 this.checkRightRowModelType();
37209 // make sure checkbox is showing the right state
37210 this.updateStateOfCheckbox();
37211 }
37212 this.refreshSelectAllLabel();
37213 };
37214 SelectAllFeature.prototype.onModelChanged = function () {
37215 if (!this.cbSelectAllVisible) {
37216 return;
37217 }
37218 this.updateStateOfCheckbox();
37219 };
37220 SelectAllFeature.prototype.onSelectionChanged = function () {
37221 if (!this.cbSelectAllVisible) {
37222 return;
37223 }
37224 this.updateStateOfCheckbox();
37225 };
37226 SelectAllFeature.prototype.getNextCheckboxState = function (selectionCount) {
37227 // if no rows, always have it unselected
37228 if (selectionCount.selected === 0 && selectionCount.notSelected === 0) {
37229 return false;
37230 }
37231 // if mix of selected and unselected, this is the tri-state
37232 if (selectionCount.selected > 0 && selectionCount.notSelected > 0) {
37233 return null;
37234 }
37235 // only selected
37236 if (selectionCount.selected > 0) {
37237 return true;
37238 }
37239 // nothing selected
37240 return false;
37241 };
37242 SelectAllFeature.prototype.updateStateOfCheckbox = function () {
37243 if (this.processingEventFromCheckbox) {
37244 return;
37245 }
37246 this.processingEventFromCheckbox = true;
37247 var selectionCount = this.getSelectionCount();
37248 var allSelected = this.getNextCheckboxState(selectionCount);
37249 this.cbSelectAll.setValue(allSelected);
37250 this.refreshSelectAllLabel();
37251 this.processingEventFromCheckbox = false;
37252 };
37253 SelectAllFeature.prototype.refreshSelectAllLabel = function () {
37254 if (!this.cbSelectAllVisible) {
37255 this.headerCellCtrl.setAriaDescriptionProperty('selectAll', null);
37256 }
37257 else {
37258 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
37259 var checked = this.cbSelectAll.getValue();
37260 var ariaStatus = checked ? translate('ariaChecked', 'checked') : translate('ariaUnchecked', 'unchecked');
37261 var ariaLabel = translate('ariaRowSelectAll', 'Press Space to toggle all rows selection');
37262 this.headerCellCtrl.setAriaDescriptionProperty('selectAll', ariaLabel + " (" + ariaStatus + ")");
37263 }
37264 this.headerCellCtrl.refreshAriaDescription();
37265 };
37266 SelectAllFeature.prototype.getSelectionCount = function () {
37267 var _this = this;
37268 var selectedCount = 0;
37269 var notSelectedCount = 0;
37270 var callback = function (node) {
37271 if (_this.gridOptionsWrapper.isGroupSelectsChildren() && node.group) {
37272 return;
37273 }
37274 if (node.isSelected()) {
37275 selectedCount++;
37276 }
37277 else if (!node.selectable) {
37278 // don't count non-selectable nodes!
37279 }
37280 else {
37281 notSelectedCount++;
37282 }
37283 };
37284 if (this.filteredOnly) {
37285 this.gridApi.forEachNodeAfterFilter(callback);
37286 }
37287 else {
37288 this.gridApi.forEachNode(callback);
37289 }
37290 return {
37291 notSelected: notSelectedCount,
37292 selected: selectedCount
37293 };
37294 };
37295 SelectAllFeature.prototype.checkRightRowModelType = function () {
37296 var rowModelType = this.rowModel.getType();
37297 var rowModelMatches = rowModelType === _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE;
37298 if (!rowModelMatches) {
37299 console.warn("AG Grid: selectAllCheckbox is only available if using normal row model, you are using " + rowModelType);
37300 }
37301 };
37302 SelectAllFeature.prototype.onCbSelectAll = function () {
37303 if (this.processingEventFromCheckbox) {
37304 return;
37305 }
37306 if (!this.cbSelectAllVisible) {
37307 return;
37308 }
37309 var value = this.cbSelectAll.getValue();
37310 if (value) {
37311 this.selectionService.selectAllRowNodes(this.filteredOnly);
37312 }
37313 else {
37314 this.selectionService.deselectAllRowNodes(this.filteredOnly);
37315 }
37316 };
37317 SelectAllFeature.prototype.isCheckboxSelection = function () {
37318 var result = this.column.getColDef().headerCheckboxSelection;
37319 if (typeof result === 'function') {
37320 var func = result;
37321 var params = {
37322 column: this.column,
37323 colDef: this.column.getColDef(),
37324 columnApi: this.columnApi,
37325 api: this.gridApi,
37326 context: this.gridOptionsWrapper.getContext()
37327 };
37328 result = func(params);
37329 }
37330 if (result) {
37331 if (this.gridOptionsWrapper.isRowModelServerSide()) {
37332 console.warn('AG Grid: headerCheckboxSelection is not supported for Server Side Row Model');
37333 return false;
37334 }
37335 if (this.gridOptionsWrapper.isRowModelInfinite()) {
37336 console.warn('AG Grid: headerCheckboxSelection is not supported for Infinite Row Model');
37337 return false;
37338 }
37339 if (this.gridOptionsWrapper.isRowModelViewport()) {
37340 console.warn('AG Grid: headerCheckboxSelection is not supported for Viewport Row Model');
37341 return false;
37342 }
37343 // otherwise the row model is compatible, so return true
37344 return true;
37345 }
37346 return false;
37347 };
37348 __decorate([
37349 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('gridApi')
37350 ], SelectAllFeature.prototype, "gridApi", void 0);
37351 __decorate([
37352 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnApi')
37353 ], SelectAllFeature.prototype, "columnApi", void 0);
37354 __decorate([
37355 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('rowModel')
37356 ], SelectAllFeature.prototype, "rowModel", void 0);
37357 __decorate([
37358 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('selectionService')
37359 ], SelectAllFeature.prototype, "selectionService", void 0);
37360 return SelectAllFeature;
37361}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
37362
37363
37364
37365
37366
37367/***/ }),
37368/* 163 */
37369/***/ (function(module, __webpack_exports__, __webpack_require__) {
37370
37371"use strict";
37372__webpack_require__.r(__webpack_exports__);
37373/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgCheckbox", function() { return AgCheckbox; });
37374/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
37375/* harmony import */ var _agAbstractInputField__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71);
37376/**
37377 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
37378 * @version v27.3.0
37379 * @link https://www.ag-grid.com/
37380 * @license MIT
37381 */
37382var __extends = (undefined && undefined.__extends) || (function () {
37383 var extendStatics = function (d, b) {
37384 extendStatics = Object.setPrototypeOf ||
37385 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
37386 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
37387 return extendStatics(d, b);
37388 };
37389 return function (d, b) {
37390 extendStatics(d, b);
37391 function __() { this.constructor = d; }
37392 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
37393 };
37394})();
37395
37396
37397var AgCheckbox = /** @class */ (function (_super) {
37398 __extends(AgCheckbox, _super);
37399 function AgCheckbox(config, className, inputType) {
37400 if (className === void 0) { className = 'ag-checkbox'; }
37401 if (inputType === void 0) { inputType = 'checkbox'; }
37402 var _this = _super.call(this, config, className, inputType) || this;
37403 _this.labelAlignment = 'right';
37404 _this.selected = false;
37405 _this.readOnly = false;
37406 _this.passive = false;
37407 return _this;
37408 }
37409 AgCheckbox.prototype.addInputListeners = function () {
37410 this.addManagedListener(this.eInput, 'click', this.onCheckboxClick.bind(this));
37411 this.addManagedListener(this.eLabel, 'click', this.toggle.bind(this));
37412 };
37413 AgCheckbox.prototype.getNextValue = function () {
37414 return this.selected === undefined ? true : !this.selected;
37415 };
37416 AgCheckbox.prototype.setPassive = function (passive) {
37417 this.passive = passive;
37418 };
37419 AgCheckbox.prototype.isReadOnly = function () {
37420 return this.readOnly;
37421 };
37422 AgCheckbox.prototype.setReadOnly = function (readOnly) {
37423 this.eWrapper.classList.toggle('ag-disabled', readOnly);
37424 this.eInput.disabled = readOnly;
37425 this.readOnly = readOnly;
37426 };
37427 AgCheckbox.prototype.setDisabled = function (disabled) {
37428 this.eWrapper.classList.toggle('ag-disabled', disabled);
37429 return _super.prototype.setDisabled.call(this, disabled);
37430 };
37431 AgCheckbox.prototype.toggle = function () {
37432 if (this.eInput.disabled) {
37433 return;
37434 }
37435 var previousValue = this.isSelected();
37436 var nextValue = this.getNextValue();
37437 if (this.passive) {
37438 this.dispatchChange(nextValue, previousValue);
37439 }
37440 else {
37441 this.setValue(nextValue);
37442 }
37443 };
37444 AgCheckbox.prototype.getValue = function () {
37445 return this.isSelected();
37446 };
37447 AgCheckbox.prototype.setValue = function (value, silent) {
37448 this.refreshSelectedClass(value);
37449 this.setSelected(value, silent);
37450 return this;
37451 };
37452 AgCheckbox.prototype.setName = function (name) {
37453 var input = this.getInputElement();
37454 input.name = name;
37455 return this;
37456 };
37457 AgCheckbox.prototype.isSelected = function () {
37458 return this.selected;
37459 };
37460 AgCheckbox.prototype.setSelected = function (selected, silent) {
37461 if (this.isSelected() === selected) {
37462 return;
37463 }
37464 this.previousValue = this.isSelected();
37465 selected = this.selected = typeof selected === 'boolean' ? selected : undefined;
37466 this.eInput.checked = selected;
37467 this.eInput.indeterminate = selected === undefined;
37468 if (!silent) {
37469 this.dispatchChange(this.selected, this.previousValue);
37470 }
37471 };
37472 AgCheckbox.prototype.dispatchChange = function (selected, previousValue, event) {
37473 this.dispatchEvent({ type: AgCheckbox.EVENT_CHANGED, selected: selected, previousValue: previousValue, event: event });
37474 var input = this.getInputElement();
37475 var checkboxChangedEvent = {
37476 type: _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CHECKBOX_CHANGED,
37477 id: input.id,
37478 name: input.name,
37479 selected: selected,
37480 previousValue: previousValue
37481 };
37482 this.eventService.dispatchEvent(checkboxChangedEvent);
37483 };
37484 AgCheckbox.prototype.onCheckboxClick = function (e) {
37485 if (this.passive || this.eInput.disabled) {
37486 return;
37487 }
37488 var previousValue = this.isSelected();
37489 var selected = this.selected = e.target.checked;
37490 this.refreshSelectedClass(selected);
37491 this.dispatchChange(selected, previousValue, e);
37492 };
37493 AgCheckbox.prototype.refreshSelectedClass = function (value) {
37494 this.eWrapper.classList.toggle('ag-checked', value === true);
37495 this.eWrapper.classList.toggle('ag-indeterminate', value == null);
37496 };
37497 return AgCheckbox;
37498}(_agAbstractInputField__WEBPACK_IMPORTED_MODULE_1__["AgAbstractInputField"]));
37499
37500
37501
37502
37503
37504/***/ }),
37505/* 164 */
37506/***/ (function(module, __webpack_exports__, __webpack_require__) {
37507
37508"use strict";
37509__webpack_require__.r(__webpack_exports__);
37510/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupCellCtrl", function() { return HeaderGroupCellCtrl; });
37511/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65);
37512/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
37513/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97);
37514/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
37515/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
37516/* harmony import */ var _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(158);
37517/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18);
37518/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(64);
37519/* harmony import */ var _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(126);
37520/* harmony import */ var _abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(155);
37521/* harmony import */ var _cssClassApplier__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(147);
37522/* harmony import */ var _hoverFeature__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(159);
37523/* harmony import */ var _groupResizeFeature__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(165);
37524/* harmony import */ var _groupWidthFeature__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(166);
37525/**
37526 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
37527 * @version v27.3.0
37528 * @link https://www.ag-grid.com/
37529 * @license MIT
37530 */
37531var __extends = (undefined && undefined.__extends) || (function () {
37532 var extendStatics = function (d, b) {
37533 extendStatics = Object.setPrototypeOf ||
37534 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
37535 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
37536 return extendStatics(d, b);
37537 };
37538 return function (d, b) {
37539 extendStatics(d, b);
37540 function __() { this.constructor = d; }
37541 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
37542 };
37543})();
37544var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
37545 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
37546 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37547 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
37548 return c > 3 && r && Object.defineProperty(target, key, r), r;
37549};
37550
37551
37552
37553
37554
37555
37556
37557
37558
37559
37560
37561
37562
37563
37564var HeaderGroupCellCtrl = /** @class */ (function (_super) {
37565 __extends(HeaderGroupCellCtrl, _super);
37566 function HeaderGroupCellCtrl(columnGroup, parentRowCtrl) {
37567 var _this = _super.call(this, columnGroup, parentRowCtrl) || this;
37568 _this.columnGroup = columnGroup;
37569 return _this;
37570 }
37571 HeaderGroupCellCtrl.prototype.setComp = function (comp, eGui, eResize) {
37572 _super.prototype.setGui.call(this, eGui);
37573 this.comp = comp;
37574 this.displayName = this.columnModel.getDisplayNameForColumnGroup(this.columnGroup, 'header');
37575 this.addClasses();
37576 this.addAttributes();
37577 this.setupMovingCss();
37578 this.setupExpandable();
37579 this.setupTooltip();
37580 this.setupUserComp();
37581 var pinned = this.getParentRowCtrl().getPinned();
37582 var leafCols = this.columnGroup.getProvidedColumnGroup().getLeafColumns();
37583 this.createManagedBean(new _hoverFeature__WEBPACK_IMPORTED_MODULE_11__["HoverFeature"](leafCols, eGui));
37584 this.createManagedBean(new _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_5__["SetLeftFeature"](this.columnGroup, eGui, this.beans));
37585 this.createManagedBean(new _groupWidthFeature__WEBPACK_IMPORTED_MODULE_13__["GroupWidthFeature"](comp, this.columnGroup));
37586 this.groupResizeFeature = this.createManagedBean(new _groupResizeFeature__WEBPACK_IMPORTED_MODULE_12__["GroupResizeFeature"](comp, eResize, pinned, this.columnGroup));
37587 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_7__["ManagedFocusFeature"](eGui, {
37588 shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),
37589 onTabKeyDown: function () { return undefined; },
37590 handleKeyDown: this.handleKeyDown.bind(this),
37591 onFocusIn: this.onFocusIn.bind(this)
37592 }));
37593 };
37594 HeaderGroupCellCtrl.prototype.resizeLeafColumnsToFit = function () {
37595 this.groupResizeFeature.onResizeStart(false);
37596 this.groupResizeFeature.resizeLeafColumnsToFit();
37597 };
37598 HeaderGroupCellCtrl.prototype.setupUserComp = function () {
37599 var _this = this;
37600 var displayName = this.displayName;
37601 var params = {
37602 displayName: this.displayName,
37603 columnGroup: this.columnGroup,
37604 setExpanded: function (expanded) {
37605 _this.columnModel.setColumnGroupOpened(_this.columnGroup.getProvidedColumnGroup(), expanded, "gridInitializing");
37606 },
37607 api: this.gridApi,
37608 columnApi: this.columnApi,
37609 context: this.gridOptionsWrapper.getContext()
37610 };
37611 if (!displayName) {
37612 var columnGroup = this.columnGroup;
37613 var leafCols = columnGroup.getLeafColumns();
37614 // find the top most column group that represents the same columns. so if we are dragging a group, we also
37615 // want to visually show the parent groups dragging for the same column set. for example imaging 5 levels
37616 // of grouping, with each group only containing the next group, and the last group containing three columns,
37617 // then when you move any group (even the lowest level group) you are in-fact moving all the groups, as all
37618 // the groups represent the same column set.
37619 while (columnGroup.getParent() && columnGroup.getParent().getLeafColumns().length === leafCols.length) {
37620 columnGroup = columnGroup.getParent();
37621 }
37622 var colGroupDef = columnGroup.getColGroupDef();
37623 if (colGroupDef) {
37624 displayName = colGroupDef.headerName;
37625 }
37626 if (!displayName) {
37627 displayName = leafCols ? this.columnModel.getDisplayNameForColumn(leafCols[0], 'header', true) : '';
37628 }
37629 }
37630 var compDetails = this.userComponentFactory.getHeaderGroupCompDetails(params);
37631 this.comp.setUserCompDetails(compDetails);
37632 };
37633 HeaderGroupCellCtrl.prototype.setupTooltip = function () {
37634 var _this = this;
37635 var colGroupDef = this.columnGroup.getColGroupDef();
37636 var tooltipCtrl = {
37637 getColumn: function () { return _this.columnGroup; },
37638 getGui: function () { return _this.eGui; },
37639 getLocation: function () { return 'headerGroup'; },
37640 getTooltipValue: function () { return colGroupDef && colGroupDef.headerTooltip; }
37641 };
37642 if (colGroupDef) {
37643 tooltipCtrl.getColDef = function () { return colGroupDef; };
37644 }
37645 var tooltipFeature = this.createManagedBean(new _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_8__["TooltipFeature"](tooltipCtrl, this.beans));
37646 tooltipFeature.setComp(this.comp);
37647 };
37648 HeaderGroupCellCtrl.prototype.setupExpandable = function () {
37649 var providedColGroup = this.columnGroup.getProvidedColumnGroup();
37650 this.refreshExpanded();
37651 this.addManagedListener(providedColGroup, _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"].EVENT_EXPANDABLE_CHANGED, this.refreshExpanded.bind(this));
37652 this.addManagedListener(providedColGroup, _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"].EVENT_EXPANDED_CHANGED, this.refreshExpanded.bind(this));
37653 };
37654 HeaderGroupCellCtrl.prototype.refreshExpanded = function () {
37655 var column = this.columnGroup;
37656 this.expandable = column.isExpandable();
37657 var expanded = column.isExpanded();
37658 if (this.expandable) {
37659 this.comp.setAriaExpanded(expanded ? 'true' : 'false');
37660 }
37661 else {
37662 this.comp.setAriaExpanded(undefined);
37663 }
37664 };
37665 HeaderGroupCellCtrl.prototype.addAttributes = function () {
37666 this.comp.setColId(this.columnGroup.getUniqueId());
37667 };
37668 HeaderGroupCellCtrl.prototype.addClasses = function () {
37669 var _this = this;
37670 var colGroupDef = this.columnGroup.getColGroupDef();
37671 var classes = _cssClassApplier__WEBPACK_IMPORTED_MODULE_10__["CssClassApplier"].getHeaderClassesFromColDef(colGroupDef, this.gridOptionsWrapper, null, this.columnGroup);
37672 // having different classes below allows the style to not have a bottom border
37673 // on the group header, if no group is specified
37674 classes.push(this.columnGroup.isPadding() ? "ag-header-group-cell-no-group" : "ag-header-group-cell-with-group");
37675 classes.forEach(function (c) { return _this.comp.addOrRemoveCssClass(c, true); });
37676 };
37677 HeaderGroupCellCtrl.prototype.setupMovingCss = function () {
37678 var _this = this;
37679 var providedColumnGroup = this.columnGroup.getProvidedColumnGroup();
37680 var leafColumns = providedColumnGroup.getLeafColumns();
37681 // this function adds or removes the moving css, based on if the col is moving.
37682 // this is what makes the header go dark when it is been moved (gives impression to
37683 // user that the column was picked up).
37684 var listener = function () { return _this.comp.addOrRemoveCssClass('ag-header-cell-moving', _this.columnGroup.isMoving()); };
37685 leafColumns.forEach(function (col) {
37686 _this.addManagedListener(col, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_MOVING_CHANGED, listener);
37687 });
37688 listener();
37689 };
37690 HeaderGroupCellCtrl.prototype.onFocusIn = function (e) {
37691 if (!this.eGui.contains(e.relatedTarget)) {
37692 var rowIndex = this.getRowIndex();
37693 this.beans.focusService.setFocusedHeader(rowIndex, this.columnGroup);
37694 }
37695 };
37696 HeaderGroupCellCtrl.prototype.handleKeyDown = function (e) {
37697 var eDocument = this.gridOptionsWrapper.getDocument();
37698 var activeEl = eDocument.activeElement;
37699 var wrapperHasFocus = activeEl === this.eGui;
37700 if (!this.expandable || !wrapperHasFocus) {
37701 return;
37702 }
37703 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].ENTER) {
37704 var column = this.columnGroup;
37705 var newExpandedValue = !column.isExpanded();
37706 this.columnModel.setColumnGroupOpened(column.getProvidedColumnGroup(), newExpandedValue, "uiColumnExpanded");
37707 }
37708 };
37709 // unlike columns, this will only get called once, as we don't react on props on column groups
37710 // (we will always destroy and recreate this comp if something changes)
37711 HeaderGroupCellCtrl.prototype.setDragSource = function (eHeaderGroup) {
37712 var _this = this;
37713 if (this.isSuppressMoving()) {
37714 return;
37715 }
37716 var allLeafColumns = this.columnGroup.getProvidedColumnGroup().getLeafColumns();
37717 var dragSource = {
37718 type: _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragSourceType"].HeaderCell,
37719 eElement: eHeaderGroup,
37720 defaultIconName: _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_HIDE,
37721 dragItemName: this.displayName,
37722 // we add in the original group leaf columns, so we move both visible and non-visible items
37723 getDragItem: this.getDragItemForGroup.bind(this),
37724 onDragStarted: function () { return allLeafColumns.forEach(function (col) { return col.setMoving(true, "uiColumnDragged"); }); },
37725 onDragStopped: function () { return allLeafColumns.forEach(function (col) { return col.setMoving(false, "uiColumnDragged"); }); }
37726 };
37727 this.dragAndDropService.addDragSource(dragSource, true);
37728 this.addDestroyFunc(function () { return _this.dragAndDropService.removeDragSource(dragSource); });
37729 };
37730 // when moving the columns, we want to move all the columns (contained within the DragItem) in this group in one go,
37731 // and in the order they are currently in the screen.
37732 HeaderGroupCellCtrl.prototype.getDragItemForGroup = function () {
37733 var allColumnsOriginalOrder = this.columnGroup.getProvidedColumnGroup().getLeafColumns();
37734 // capture visible state, used when re-entering grid to dictate which columns should be visible
37735 var visibleState = {};
37736 allColumnsOriginalOrder.forEach(function (column) { return visibleState[column.getId()] = column.isVisible(); });
37737 var allColumnsCurrentOrder = [];
37738 this.columnModel.getAllDisplayedColumns().forEach(function (column) {
37739 if (allColumnsOriginalOrder.indexOf(column) >= 0) {
37740 allColumnsCurrentOrder.push(column);
37741 Object(_utils_array__WEBPACK_IMPORTED_MODULE_6__["removeFromArray"])(allColumnsOriginalOrder, column);
37742 }
37743 });
37744 // we are left with non-visible columns, stick these in at the end
37745 allColumnsOriginalOrder.forEach(function (column) { return allColumnsCurrentOrder.push(column); });
37746 // create and return dragItem
37747 return {
37748 columns: allColumnsCurrentOrder,
37749 visibleState: visibleState
37750 };
37751 };
37752 HeaderGroupCellCtrl.prototype.isSuppressMoving = function () {
37753 // if any child is fixed, then don't allow moving
37754 var childSuppressesMoving = false;
37755 this.columnGroup.getLeafColumns().forEach(function (column) {
37756 if (column.getColDef().suppressMovable || column.getColDef().lockPosition) {
37757 childSuppressesMoving = true;
37758 }
37759 });
37760 var result = childSuppressesMoving || this.gridOptionsWrapper.isSuppressMovableColumns();
37761 return result;
37762 };
37763 __decorate([
37764 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('beans')
37765 ], HeaderGroupCellCtrl.prototype, "beans", void 0);
37766 __decorate([
37767 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
37768 ], HeaderGroupCellCtrl.prototype, "columnModel", void 0);
37769 __decorate([
37770 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragAndDropService')
37771 ], HeaderGroupCellCtrl.prototype, "dragAndDropService", void 0);
37772 __decorate([
37773 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('userComponentFactory')
37774 ], HeaderGroupCellCtrl.prototype, "userComponentFactory", void 0);
37775 __decorate([
37776 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridApi')
37777 ], HeaderGroupCellCtrl.prototype, "gridApi", void 0);
37778 __decorate([
37779 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnApi')
37780 ], HeaderGroupCellCtrl.prototype, "columnApi", void 0);
37781 return HeaderGroupCellCtrl;
37782}(_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_9__["AbstractHeaderCellCtrl"]));
37783
37784
37785
37786
37787
37788/***/ }),
37789/* 165 */
37790/***/ (function(module, __webpack_exports__, __webpack_require__) {
37791
37792"use strict";
37793__webpack_require__.r(__webpack_exports__);
37794/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupResizeFeature", function() { return GroupResizeFeature; });
37795/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
37796/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
37797/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
37798/**
37799 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
37800 * @version v27.3.0
37801 * @link https://www.ag-grid.com/
37802 * @license MIT
37803 */
37804var __extends = (undefined && undefined.__extends) || (function () {
37805 var extendStatics = function (d, b) {
37806 extendStatics = Object.setPrototypeOf ||
37807 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
37808 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
37809 return extendStatics(d, b);
37810 };
37811 return function (d, b) {
37812 extendStatics(d, b);
37813 function __() { this.constructor = d; }
37814 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
37815 };
37816})();
37817var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
37818 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
37819 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37820 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
37821 return c > 3 && r && Object.defineProperty(target, key, r), r;
37822};
37823
37824
37825
37826var GroupResizeFeature = /** @class */ (function (_super) {
37827 __extends(GroupResizeFeature, _super);
37828 function GroupResizeFeature(comp, eResize, pinned, columnGroup) {
37829 var _this = _super.call(this) || this;
37830 _this.eResize = eResize;
37831 _this.comp = comp;
37832 _this.pinned = pinned;
37833 _this.columnGroup = columnGroup;
37834 return _this;
37835 }
37836 GroupResizeFeature.prototype.postConstruct = function () {
37837 var _this = this;
37838 if (!this.columnGroup.isResizable()) {
37839 this.comp.addOrRemoveResizableCssClass('ag-hidden', true);
37840 return;
37841 }
37842 var finishedWithResizeFunc = this.horizontalResizeService.addResizeBar({
37843 eResizeBar: this.eResize,
37844 onResizeStart: this.onResizeStart.bind(this),
37845 onResizing: this.onResizing.bind(this, false),
37846 onResizeEnd: this.onResizing.bind(this, true)
37847 });
37848 this.addDestroyFunc(finishedWithResizeFunc);
37849 if (!this.gridOptionsWrapper.isSuppressAutoSize()) {
37850 var skipHeaderOnAutoSize_1 = this.gridOptionsWrapper.isSkipHeaderOnAutoSize();
37851 this.eResize.addEventListener('dblclick', function () {
37852 // get list of all the column keys we are responsible for
37853 var keys = [];
37854 var leafCols = _this.columnGroup.getDisplayedLeafColumns();
37855 leafCols.forEach(function (column) {
37856 // not all cols in the group may be participating with auto-resize
37857 if (!column.getColDef().suppressAutoSize) {
37858 keys.push(column.getColId());
37859 }
37860 });
37861 if (keys.length > 0) {
37862 _this.columnModel.autoSizeColumns({
37863 columns: keys,
37864 skipHeader: skipHeaderOnAutoSize_1,
37865 stopAtGroup: _this.columnGroup,
37866 source: 'uiColumnResized'
37867 });
37868 }
37869 _this.resizeLeafColumnsToFit();
37870 });
37871 }
37872 };
37873 GroupResizeFeature.prototype.onResizeStart = function (shiftKey) {
37874 var _this = this;
37875 this.calculateInitialValues();
37876 var takeFromGroup = null;
37877 if (shiftKey) {
37878 takeFromGroup = this.columnModel.getDisplayedGroupAfter(this.columnGroup);
37879 }
37880 if (takeFromGroup) {
37881 var takeFromLeafCols = takeFromGroup.getDisplayedLeafColumns();
37882 this.resizeTakeFromCols = takeFromLeafCols.filter(function (col) { return col.isResizable(); });
37883 this.resizeTakeFromStartWidth = 0;
37884 this.resizeTakeFromCols.forEach(function (col) { return _this.resizeTakeFromStartWidth += col.getActualWidth(); });
37885 this.resizeTakeFromRatios = [];
37886 this.resizeTakeFromCols.forEach(function (col) { return _this.resizeTakeFromRatios.push(col.getActualWidth() / _this.resizeTakeFromStartWidth); });
37887 }
37888 else {
37889 this.resizeTakeFromCols = null;
37890 this.resizeTakeFromStartWidth = null;
37891 this.resizeTakeFromRatios = null;
37892 }
37893 this.comp.addOrRemoveCssClass('ag-column-resizing', true);
37894 };
37895 GroupResizeFeature.prototype.onResizing = function (finished, resizeAmount) {
37896 var resizeAmountNormalised = this.normaliseDragChange(resizeAmount);
37897 var width = this.resizeStartWidth + resizeAmountNormalised;
37898 this.resizeColumns(width, finished);
37899 };
37900 GroupResizeFeature.prototype.resizeLeafColumnsToFit = function () {
37901 var preferredSize = this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup);
37902 this.calculateInitialValues();
37903 if (preferredSize > this.resizeStartWidth) {
37904 this.resizeColumns(preferredSize, true);
37905 }
37906 };
37907 GroupResizeFeature.prototype.resizeColumns = function (totalWidth, finished) {
37908 if (finished === void 0) { finished = true; }
37909 var resizeSets = [];
37910 resizeSets.push({
37911 columns: this.resizeCols,
37912 ratios: this.resizeRatios,
37913 width: totalWidth
37914 });
37915 if (this.resizeTakeFromCols) {
37916 var diff = totalWidth - this.resizeStartWidth;
37917 resizeSets.push({
37918 columns: this.resizeTakeFromCols,
37919 ratios: this.resizeTakeFromRatios,
37920 width: this.resizeTakeFromStartWidth - diff
37921 });
37922 }
37923 this.columnModel.resizeColumnSets({
37924 resizeSets: resizeSets,
37925 finished: finished,
37926 source: 'uiColumnDragged'
37927 });
37928 if (finished) {
37929 this.comp.addOrRemoveCssClass('ag-column-resizing', false);
37930 }
37931 };
37932 GroupResizeFeature.prototype.calculateInitialValues = function () {
37933 var _this = this;
37934 var leafCols = this.columnGroup.getDisplayedLeafColumns();
37935 this.resizeCols = leafCols.filter(function (col) { return col.isResizable(); });
37936 this.resizeStartWidth = 0;
37937 this.resizeCols.forEach(function (col) { return _this.resizeStartWidth += col.getActualWidth(); });
37938 this.resizeRatios = [];
37939 this.resizeCols.forEach(function (col) { return _this.resizeRatios.push(col.getActualWidth() / _this.resizeStartWidth); });
37940 };
37941 // optionally inverts the drag, depending on pinned and RTL
37942 // note - this method is duplicated in RenderedHeaderCell - should refactor out?
37943 GroupResizeFeature.prototype.normaliseDragChange = function (dragChange) {
37944 var result = dragChange;
37945 if (this.gridOptionsWrapper.isEnableRtl()) {
37946 // for RTL, dragging left makes the col bigger, except when pinning left
37947 if (this.pinned !== _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_LEFT) {
37948 result *= -1;
37949 }
37950 }
37951 else if (this.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_RIGHT) {
37952 // for LTR (ie normal), dragging left makes the col smaller, except when pinning right
37953 result *= -1;
37954 }
37955 return result;
37956 };
37957 __decorate([
37958 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('horizontalResizeService')
37959 ], GroupResizeFeature.prototype, "horizontalResizeService", void 0);
37960 __decorate([
37961 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('autoWidthCalculator')
37962 ], GroupResizeFeature.prototype, "autoWidthCalculator", void 0);
37963 __decorate([
37964 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
37965 ], GroupResizeFeature.prototype, "columnModel", void 0);
37966 __decorate([
37967 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
37968 ], GroupResizeFeature.prototype, "postConstruct", null);
37969 return GroupResizeFeature;
37970}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
37971
37972
37973
37974
37975
37976/***/ }),
37977/* 166 */
37978/***/ (function(module, __webpack_exports__, __webpack_require__) {
37979
37980"use strict";
37981__webpack_require__.r(__webpack_exports__);
37982/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupWidthFeature", function() { return GroupWidthFeature; });
37983/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
37984/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
37985/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
37986/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
37987/**
37988 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
37989 * @version v27.3.0
37990 * @link https://www.ag-grid.com/
37991 * @license MIT
37992 */
37993var __extends = (undefined && undefined.__extends) || (function () {
37994 var extendStatics = function (d, b) {
37995 extendStatics = Object.setPrototypeOf ||
37996 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
37997 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
37998 return extendStatics(d, b);
37999 };
38000 return function (d, b) {
38001 extendStatics(d, b);
38002 function __() { this.constructor = d; }
38003 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38004 };
38005})();
38006var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38007 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38008 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38009 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
38010 return c > 3 && r && Object.defineProperty(target, key, r), r;
38011};
38012
38013
38014
38015
38016var GroupWidthFeature = /** @class */ (function (_super) {
38017 __extends(GroupWidthFeature, _super);
38018 function GroupWidthFeature(comp, columnGroup) {
38019 var _this = _super.call(this) || this;
38020 // the children can change, we keep destroy functions related to listening to the children here
38021 _this.removeChildListenersFuncs = [];
38022 _this.columnGroup = columnGroup;
38023 _this.comp = comp;
38024 return _this;
38025 }
38026 GroupWidthFeature.prototype.postConstruct = function () {
38027 // we need to listen to changes in child columns, as they impact our width
38028 this.addListenersToChildrenColumns();
38029 // the children belonging to this group can change, so we need to add and remove listeners as they change
38030 this.addManagedListener(this.columnGroup, _entities_columnGroup__WEBPACK_IMPORTED_MODULE_3__["ColumnGroup"].EVENT_DISPLAYED_CHILDREN_CHANGED, this.onDisplayedChildrenChanged.bind(this));
38031 this.onWidthChanged();
38032 // the child listeners are not tied to this components life-cycle, as children can get added and removed
38033 // to the group - hence they are on a different life-cycle. so we must make sure the existing children
38034 // listeners are removed when we finally get destroyed
38035 this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this));
38036 };
38037 GroupWidthFeature.prototype.addListenersToChildrenColumns = function () {
38038 var _this = this;
38039 // first destroy any old listeners
38040 this.removeListenersOnChildrenColumns();
38041 // now add new listeners to the new set of children
38042 var widthChangedListener = this.onWidthChanged.bind(this);
38043 this.columnGroup.getLeafColumns().forEach(function (column) {
38044 column.addEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_WIDTH_CHANGED, widthChangedListener);
38045 column.addEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_VISIBLE_CHANGED, widthChangedListener);
38046 _this.removeChildListenersFuncs.push(function () {
38047 column.removeEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_WIDTH_CHANGED, widthChangedListener);
38048 column.removeEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_VISIBLE_CHANGED, widthChangedListener);
38049 });
38050 });
38051 };
38052 GroupWidthFeature.prototype.removeListenersOnChildrenColumns = function () {
38053 this.removeChildListenersFuncs.forEach(function (func) { return func(); });
38054 this.removeChildListenersFuncs = [];
38055 };
38056 GroupWidthFeature.prototype.onDisplayedChildrenChanged = function () {
38057 this.addListenersToChildrenColumns();
38058 this.onWidthChanged();
38059 };
38060 GroupWidthFeature.prototype.onWidthChanged = function () {
38061 this.comp.setWidth(this.columnGroup.getActualWidth() + 'px');
38062 };
38063 __decorate([
38064 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
38065 ], GroupWidthFeature.prototype, "postConstruct", null);
38066 return GroupWidthFeature;
38067}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
38068
38069
38070
38071
38072
38073/***/ }),
38074/* 167 */
38075/***/ (function(module, __webpack_exports__, __webpack_require__) {
38076
38077"use strict";
38078__webpack_require__.r(__webpack_exports__);
38079/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridHeaderComp", function() { return GridHeaderComp; });
38080/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
38081/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
38082/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36);
38083/* harmony import */ var _gridHeaderCtrl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
38084/* harmony import */ var _rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(148);
38085/**
38086 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38087 * @version v27.3.0
38088 * @link https://www.ag-grid.com/
38089 * @license MIT
38090 */
38091var __extends = (undefined && undefined.__extends) || (function () {
38092 var extendStatics = function (d, b) {
38093 extendStatics = Object.setPrototypeOf ||
38094 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38095 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
38096 return extendStatics(d, b);
38097 };
38098 return function (d, b) {
38099 extendStatics(d, b);
38100 function __() { this.constructor = d; }
38101 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38102 };
38103})();
38104var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38105 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38106 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38107 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
38108 return c > 3 && r && Object.defineProperty(target, key, r), r;
38109};
38110
38111
38112
38113
38114
38115var GridHeaderComp = /** @class */ (function (_super) {
38116 __extends(GridHeaderComp, _super);
38117 function GridHeaderComp() {
38118 return _super.call(this, GridHeaderComp.TEMPLATE) || this;
38119 }
38120 GridHeaderComp.prototype.postConstruct = function () {
38121 var _this = this;
38122 var compProxy = {
38123 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
38124 setHeightAndMinHeight: function (height) {
38125 _this.getGui().style.height = height;
38126 _this.getGui().style.minHeight = height;
38127 }
38128 };
38129 var ctrl = this.createManagedBean(new _gridHeaderCtrl__WEBPACK_IMPORTED_MODULE_3__["GridHeaderCtrl"]());
38130 ctrl.setComp(compProxy, this.getGui(), this.getFocusableElement());
38131 var addContainer = function (container) {
38132 _this.createManagedBean(container);
38133 _this.appendChild(container);
38134 };
38135 addContainer(new _rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_4__["HeaderRowContainerComp"](_constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_LEFT));
38136 addContainer(new _rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_4__["HeaderRowContainerComp"](null));
38137 addContainer(new _rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_4__["HeaderRowContainerComp"](_constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].PINNED_RIGHT));
38138 };
38139 GridHeaderComp.TEMPLATE = "<div class=\"ag-header\" role=\"presentation\"/>";
38140 __decorate([
38141 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
38142 ], GridHeaderComp.prototype, "postConstruct", null);
38143 return GridHeaderComp;
38144}(_widgets_component__WEBPACK_IMPORTED_MODULE_2__["Component"]));
38145
38146
38147
38148
38149
38150/***/ }),
38151/* 168 */
38152/***/ (function(module, __webpack_exports__, __webpack_require__) {
38153
38154"use strict";
38155__webpack_require__.r(__webpack_exports__);
38156/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridHeaderCtrl", function() { return GridHeaderCtrl; });
38157/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65);
38158/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
38159/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
38160/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24);
38161/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(112);
38162/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
38163/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(64);
38164/* harmony import */ var _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(169);
38165/**
38166 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38167 * @version v27.3.0
38168 * @link https://www.ag-grid.com/
38169 * @license MIT
38170 */
38171var __extends = (undefined && undefined.__extends) || (function () {
38172 var extendStatics = function (d, b) {
38173 extendStatics = Object.setPrototypeOf ||
38174 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38175 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
38176 return extendStatics(d, b);
38177 };
38178 return function (d, b) {
38179 extendStatics(d, b);
38180 function __() { this.constructor = d; }
38181 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38182 };
38183})();
38184var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38185 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38186 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38187 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
38188 return c > 3 && r && Object.defineProperty(target, key, r), r;
38189};
38190
38191
38192
38193
38194
38195
38196
38197
38198var GridHeaderCtrl = /** @class */ (function (_super) {
38199 __extends(GridHeaderCtrl, _super);
38200 function GridHeaderCtrl() {
38201 return _super !== null && _super.apply(this, arguments) || this;
38202 }
38203 GridHeaderCtrl.prototype.setComp = function (comp, eGui, eFocusableElement) {
38204 this.comp = comp;
38205 this.eGui = eGui;
38206 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_6__["ManagedFocusFeature"](eFocusableElement, {
38207 onTabKeyDown: this.onTabKeyDown.bind(this),
38208 handleKeyDown: this.handleKeyDown.bind(this),
38209 onFocusOut: this.onFocusOut.bind(this)
38210 }));
38211 // for setting ag-pivot-on / ag-pivot-off CSS classes
38212 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onPivotModeChanged.bind(this));
38213 this.onPivotModeChanged();
38214 this.setupHeaderHeight();
38215 this.ctrlsService.registerGridHeaderCtrl(this);
38216 };
38217 GridHeaderCtrl.prototype.setupHeaderHeight = function () {
38218 var listener = this.setHeaderHeight.bind(this);
38219 listener();
38220 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_HEADER_HEIGHT, listener);
38221 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_PIVOT_HEADER_HEIGHT, listener);
38222 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_GROUP_HEADER_HEIGHT, listener);
38223 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_PIVOT_GROUP_HEADER_HEIGHT, listener);
38224 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_FLOATING_FILTERS_HEIGHT, listener);
38225 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, listener);
38226 };
38227 GridHeaderCtrl.prototype.setHeaderHeight = function () {
38228 var _a = this, columnModel = _a.columnModel, gridOptionsWrapper = _a.gridOptionsWrapper;
38229 var numberOfFloating = 0;
38230 var headerRowCount = columnModel.getHeaderRowCount();
38231 var totalHeaderHeight;
38232 var groupHeight;
38233 var headerHeight;
38234 var hasFloatingFilters = columnModel.hasFloatingFilters();
38235 if (hasFloatingFilters) {
38236 headerRowCount++;
38237 numberOfFloating = 1;
38238 }
38239 if (columnModel.isPivotMode()) {
38240 groupHeight = gridOptionsWrapper.getPivotGroupHeaderHeight();
38241 headerHeight = gridOptionsWrapper.getPivotHeaderHeight();
38242 }
38243 else {
38244 groupHeight = gridOptionsWrapper.getGroupHeaderHeight();
38245 headerHeight = gridOptionsWrapper.getHeaderHeight();
38246 }
38247 var numberOfNonGroups = 1 + numberOfFloating;
38248 var numberOfGroups = headerRowCount - numberOfNonGroups;
38249 totalHeaderHeight = numberOfFloating * gridOptionsWrapper.getFloatingFiltersHeight();
38250 totalHeaderHeight += numberOfGroups * groupHeight;
38251 totalHeaderHeight += headerHeight;
38252 // one extra pixel is needed here to account for the
38253 // height of the border
38254 var px = totalHeaderHeight + 1 + "px";
38255 this.comp.setHeightAndMinHeight(px);
38256 };
38257 GridHeaderCtrl.prototype.onPivotModeChanged = function () {
38258 var pivotMode = this.columnModel.isPivotMode();
38259 this.comp.addOrRemoveCssClass('ag-pivot-on', pivotMode);
38260 this.comp.addOrRemoveCssClass('ag-pivot-off', !pivotMode);
38261 };
38262 GridHeaderCtrl.prototype.onTabKeyDown = function (e) {
38263 var isRtl = this.gridOptionsWrapper.isEnableRtl();
38264 var direction = e.shiftKey !== isRtl
38265 ? _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_7__["HeaderNavigationDirection"].LEFT
38266 : _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_7__["HeaderNavigationDirection"].RIGHT;
38267 if (this.headerNavigationService.navigateHorizontally(direction, true, e) ||
38268 this.focusService.focusNextGridCoreContainer(e.shiftKey)) {
38269 e.preventDefault();
38270 }
38271 };
38272 GridHeaderCtrl.prototype.handleKeyDown = function (e) {
38273 var direction = null;
38274 switch (e.key) {
38275 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].LEFT:
38276 direction = _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_7__["HeaderNavigationDirection"].LEFT;
38277 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].RIGHT:
38278 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(direction)) {
38279 direction = _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_7__["HeaderNavigationDirection"].RIGHT;
38280 }
38281 this.headerNavigationService.navigateHorizontally(direction, false, e);
38282 break;
38283 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].UP:
38284 direction = _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_7__["HeaderNavigationDirection"].UP;
38285 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].DOWN:
38286 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(direction)) {
38287 direction = _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_7__["HeaderNavigationDirection"].DOWN;
38288 }
38289 if (this.headerNavigationService.navigateVertically(direction, null, e)) {
38290 e.preventDefault();
38291 }
38292 break;
38293 default:
38294 return;
38295 }
38296 };
38297 GridHeaderCtrl.prototype.onFocusOut = function (e) {
38298 var eDocument = this.gridOptionsWrapper.getDocument();
38299 var relatedTarget = e.relatedTarget;
38300 if (!relatedTarget && this.eGui.contains(eDocument.activeElement)) {
38301 return;
38302 }
38303 if (!this.eGui.contains(relatedTarget)) {
38304 this.focusService.clearFocusedHeader();
38305 }
38306 };
38307 __decorate([
38308 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('headerNavigationService')
38309 ], GridHeaderCtrl.prototype, "headerNavigationService", void 0);
38310 __decorate([
38311 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('focusService')
38312 ], GridHeaderCtrl.prototype, "focusService", void 0);
38313 __decorate([
38314 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
38315 ], GridHeaderCtrl.prototype, "columnModel", void 0);
38316 __decorate([
38317 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('ctrlsService')
38318 ], GridHeaderCtrl.prototype, "ctrlsService", void 0);
38319 return GridHeaderCtrl;
38320}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
38321
38322
38323
38324
38325
38326/***/ }),
38327/* 169 */
38328/***/ (function(module, __webpack_exports__, __webpack_require__) {
38329
38330"use strict";
38331__webpack_require__.r(__webpack_exports__);
38332/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationDirection", function() { return HeaderNavigationDirection; });
38333/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationService", function() { return HeaderNavigationService; });
38334/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
38335/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
38336/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
38337/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
38338/* harmony import */ var _row_headerRowComp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(149);
38339/**
38340 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38341 * @version v27.3.0
38342 * @link https://www.ag-grid.com/
38343 * @license MIT
38344 */
38345var __extends = (undefined && undefined.__extends) || (function () {
38346 var extendStatics = function (d, b) {
38347 extendStatics = Object.setPrototypeOf ||
38348 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38349 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
38350 return extendStatics(d, b);
38351 };
38352 return function (d, b) {
38353 extendStatics(d, b);
38354 function __() { this.constructor = d; }
38355 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38356 };
38357})();
38358var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38359 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38360 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38361 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
38362 return c > 3 && r && Object.defineProperty(target, key, r), r;
38363};
38364
38365
38366
38367
38368
38369var HeaderNavigationDirection;
38370(function (HeaderNavigationDirection) {
38371 HeaderNavigationDirection[HeaderNavigationDirection["UP"] = 0] = "UP";
38372 HeaderNavigationDirection[HeaderNavigationDirection["DOWN"] = 1] = "DOWN";
38373 HeaderNavigationDirection[HeaderNavigationDirection["LEFT"] = 2] = "LEFT";
38374 HeaderNavigationDirection[HeaderNavigationDirection["RIGHT"] = 3] = "RIGHT";
38375})(HeaderNavigationDirection || (HeaderNavigationDirection = {}));
38376var HeaderNavigationService = /** @class */ (function (_super) {
38377 __extends(HeaderNavigationService, _super);
38378 function HeaderNavigationService() {
38379 return _super !== null && _super.apply(this, arguments) || this;
38380 }
38381 HeaderNavigationService.prototype.postConstruct = function () {
38382 var _this = this;
38383 this.ctrlsService.whenReady(function (p) {
38384 _this.gridBodyCon = p.gridBodyCtrl;
38385 });
38386 };
38387 HeaderNavigationService.prototype.getHeaderRowCount = function () {
38388 var centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();
38389 return centerHeaderContainer ? centerHeaderContainer.getRowCount() : 0;
38390 };
38391 HeaderNavigationService.prototype.getHeaderRowType = function (rowIndex) {
38392 var centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();
38393 if (centerHeaderContainer) {
38394 return centerHeaderContainer.getRowType(rowIndex);
38395 }
38396 };
38397 /*
38398 * This method navigates grid header vertically
38399 * @return {boolean} true to preventDefault on the event that caused this navigation.
38400 */
38401 HeaderNavigationService.prototype.navigateVertically = function (direction, fromHeader, event) {
38402 if (!fromHeader) {
38403 fromHeader = this.focusService.getFocusedHeader();
38404 }
38405 if (!fromHeader) {
38406 return false;
38407 }
38408 var headerRowIndex = fromHeader.headerRowIndex, column = fromHeader.column;
38409 var rowLen = this.getHeaderRowCount();
38410 var isUp = direction === HeaderNavigationDirection.UP;
38411 var nextRow = isUp ? headerRowIndex - 1 : headerRowIndex + 1;
38412 var nextFocusColumn = null;
38413 var skipColumn = false;
38414 if (nextRow < 0) {
38415 nextRow = 0;
38416 nextFocusColumn = column;
38417 skipColumn = true;
38418 }
38419 if (nextRow >= rowLen) {
38420 nextRow = -1; // -1 indicates the focus should move to grid rows.
38421 }
38422 var currentRowType = this.getHeaderRowType(headerRowIndex);
38423 if (!skipColumn) {
38424 if (currentRowType === _row_headerRowComp__WEBPACK_IMPORTED_MODULE_4__["HeaderRowType"].COLUMN_GROUP) {
38425 var currentColumn = column;
38426 nextFocusColumn = isUp ? column.getParent() : currentColumn.getDisplayedChildren()[0];
38427 }
38428 else if (currentRowType === _row_headerRowComp__WEBPACK_IMPORTED_MODULE_4__["HeaderRowType"].FLOATING_FILTER) {
38429 nextFocusColumn = column;
38430 }
38431 else {
38432 var currentColumn = column;
38433 nextFocusColumn = isUp ? currentColumn.getParent() : currentColumn;
38434 }
38435 if (!nextFocusColumn) {
38436 return false;
38437 }
38438 }
38439 return this.focusService.focusHeaderPosition({
38440 headerPosition: { headerRowIndex: nextRow, column: nextFocusColumn },
38441 allowUserOverride: true,
38442 event: event
38443 });
38444 };
38445 /*
38446 * This method navigates grid header horizontally
38447 * @return {boolean} true to preventDefault on the event that caused this navigation.
38448 */
38449 HeaderNavigationService.prototype.navigateHorizontally = function (direction, fromTab, event) {
38450 if (fromTab === void 0) { fromTab = false; }
38451 var focusedHeader = this.focusService.getFocusedHeader();
38452 var isLeft = direction === HeaderNavigationDirection.LEFT;
38453 var isRtl = this.gridOptionsWrapper.isEnableRtl();
38454 var nextHeader;
38455 var normalisedDirection;
38456 // either navigating to the left or isRtl (cannot be both)
38457 if (isLeft !== isRtl) {
38458 normalisedDirection = 'Before';
38459 nextHeader = this.headerPositionUtils.findHeader(focusedHeader, normalisedDirection);
38460 }
38461 else {
38462 normalisedDirection = 'After';
38463 nextHeader = this.headerPositionUtils.findHeader(focusedHeader, normalisedDirection);
38464 }
38465 if (nextHeader) {
38466 return this.focusService.focusHeaderPosition({
38467 headerPosition: nextHeader,
38468 direction: normalisedDirection,
38469 fromTab: fromTab,
38470 allowUserOverride: true,
38471 event: event
38472 });
38473 }
38474 if (!fromTab) {
38475 return true;
38476 }
38477 return this.focusNextHeaderRow(focusedHeader, normalisedDirection, event);
38478 };
38479 HeaderNavigationService.prototype.focusNextHeaderRow = function (focusedHeader, direction, event) {
38480 var currentIndex = focusedHeader.headerRowIndex;
38481 var nextPosition = null;
38482 var nextRowIndex;
38483 if (direction === 'Before') {
38484 if (currentIndex > 0) {
38485 nextRowIndex = currentIndex - 1;
38486 nextPosition = this.headerPositionUtils.findColAtEdgeForHeaderRow(nextRowIndex, 'end');
38487 }
38488 }
38489 else {
38490 nextRowIndex = currentIndex + 1;
38491 nextPosition = this.headerPositionUtils.findColAtEdgeForHeaderRow(nextRowIndex, 'start');
38492 }
38493 return this.focusService.focusHeaderPosition({
38494 headerPosition: nextPosition,
38495 direction: direction,
38496 fromTab: true,
38497 allowUserOverride: true,
38498 event: event
38499 });
38500 };
38501 HeaderNavigationService.prototype.scrollToColumn = function (column, direction) {
38502 if (direction === void 0) { direction = 'After'; }
38503 if (column.getPinned()) {
38504 return;
38505 }
38506 var columnToScrollTo;
38507 if (column instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_2__["ColumnGroup"]) {
38508 var columns = column.getDisplayedLeafColumns();
38509 columnToScrollTo = direction === 'Before' ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(columns) : columns[0];
38510 }
38511 else {
38512 columnToScrollTo = column;
38513 }
38514 this.gridBodyCon.getScrollFeature().ensureColumnVisible(columnToScrollTo);
38515 // need to nudge the scrolls for the floating items. otherwise when we set focus on a non-visible
38516 // floating cell, the scrolls get out of sync
38517 this.gridBodyCon.getScrollFeature().horizontallyScrollHeaderCenterAndFloatingCenter();
38518 // need to flush frames, to make sure the correct cells are rendered
38519 this.animationFrameService.flushAllFrames();
38520 };
38521 __decorate([
38522 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('focusService')
38523 ], HeaderNavigationService.prototype, "focusService", void 0);
38524 __decorate([
38525 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('headerPositionUtils')
38526 ], HeaderNavigationService.prototype, "headerPositionUtils", void 0);
38527 __decorate([
38528 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('animationFrameService')
38529 ], HeaderNavigationService.prototype, "animationFrameService", void 0);
38530 __decorate([
38531 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
38532 ], HeaderNavigationService.prototype, "ctrlsService", void 0);
38533 __decorate([
38534 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
38535 ], HeaderNavigationService.prototype, "postConstruct", null);
38536 HeaderNavigationService = __decorate([
38537 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('headerNavigationService')
38538 ], HeaderNavigationService);
38539 return HeaderNavigationService;
38540}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
38541
38542
38543
38544
38545
38546/***/ }),
38547/* 170 */
38548/***/ (function(module, __webpack_exports__, __webpack_require__) {
38549
38550"use strict";
38551__webpack_require__.r(__webpack_exports__);
38552/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HorizontalResizeService", function() { return HorizontalResizeService; });
38553/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
38554/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
38555/**
38556 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38557 * @version v27.3.0
38558 * @link https://www.ag-grid.com/
38559 * @license MIT
38560 */
38561var __extends = (undefined && undefined.__extends) || (function () {
38562 var extendStatics = function (d, b) {
38563 extendStatics = Object.setPrototypeOf ||
38564 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38565 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
38566 return extendStatics(d, b);
38567 };
38568 return function (d, b) {
38569 extendStatics(d, b);
38570 function __() { this.constructor = d; }
38571 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38572 };
38573})();
38574var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38575 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38576 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38577 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
38578 return c > 3 && r && Object.defineProperty(target, key, r), r;
38579};
38580
38581
38582var HorizontalResizeService = /** @class */ (function (_super) {
38583 __extends(HorizontalResizeService, _super);
38584 function HorizontalResizeService() {
38585 return _super !== null && _super.apply(this, arguments) || this;
38586 }
38587 HorizontalResizeService.prototype.addResizeBar = function (params) {
38588 var _this = this;
38589 var dragSource = {
38590 dragStartPixels: params.dragStartPixels || 0,
38591 eElement: params.eResizeBar,
38592 onDragStart: this.onDragStart.bind(this, params),
38593 onDragStop: this.onDragStop.bind(this, params),
38594 onDragging: this.onDragging.bind(this, params)
38595 };
38596 this.dragService.addDragSource(dragSource, true);
38597 // we pass remove func back to the caller, so call can tell us when they
38598 // are finished, and then we remove the listener from the drag source
38599 var finishedWithResizeFunc = function () { return _this.dragService.removeDragSource(dragSource); };
38600 return finishedWithResizeFunc;
38601 };
38602 HorizontalResizeService.prototype.onDragStart = function (params, mouseEvent) {
38603 this.dragStartX = mouseEvent.clientX;
38604 this.setResizeIcons();
38605 var shiftKey = mouseEvent instanceof MouseEvent && mouseEvent.shiftKey === true;
38606 params.onResizeStart(shiftKey);
38607 };
38608 HorizontalResizeService.prototype.setResizeIcons = function () {
38609 var ctrl = this.ctrlsService.getGridCtrl();
38610 // change the body cursor, so when drag moves out of the drag bar, the cursor is still 'resize' (or 'move'
38611 ctrl.setResizeCursor(true);
38612 // we don't want text selection outside the grid (otherwise it looks weird as text highlights when we move)
38613 ctrl.disableUserSelect(true);
38614 };
38615 HorizontalResizeService.prototype.onDragStop = function (params, mouseEvent) {
38616 params.onResizeEnd(this.resizeAmount);
38617 this.resetIcons();
38618 };
38619 HorizontalResizeService.prototype.resetIcons = function () {
38620 var ctrl = this.ctrlsService.getGridCtrl();
38621 ctrl.setResizeCursor(false);
38622 ctrl.disableUserSelect(false);
38623 };
38624 HorizontalResizeService.prototype.onDragging = function (params, mouseEvent) {
38625 this.resizeAmount = mouseEvent.clientX - this.dragStartX;
38626 params.onResizing(this.resizeAmount);
38627 };
38628 __decorate([
38629 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('dragService')
38630 ], HorizontalResizeService.prototype, "dragService", void 0);
38631 __decorate([
38632 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
38633 ], HorizontalResizeService.prototype, "ctrlsService", void 0);
38634 HorizontalResizeService = __decorate([
38635 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('horizontalResizeService')
38636 ], HorizontalResizeService);
38637 return HorizontalResizeService;
38638}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
38639
38640
38641
38642
38643
38644/***/ }),
38645/* 171 */
38646/***/ (function(module, __webpack_exports__, __webpack_require__) {
38647
38648"use strict";
38649__webpack_require__.r(__webpack_exports__);
38650/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandardMenuFactory", function() { return StandardMenuFactory; });
38651/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
38652/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
38653/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
38654/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65);
38655/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(44);
38656/**
38657 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38658 * @version v27.3.0
38659 * @link https://www.ag-grid.com/
38660 * @license MIT
38661 */
38662var __extends = (undefined && undefined.__extends) || (function () {
38663 var extendStatics = function (d, b) {
38664 extendStatics = Object.setPrototypeOf ||
38665 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38666 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
38667 return extendStatics(d, b);
38668 };
38669 return function (d, b) {
38670 extendStatics(d, b);
38671 function __() { this.constructor = d; }
38672 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38673 };
38674})();
38675var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38676 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38677 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38678 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
38679 return c > 3 && r && Object.defineProperty(target, key, r), r;
38680};
38681
38682
38683
38684
38685
38686var StandardMenuFactory = /** @class */ (function (_super) {
38687 __extends(StandardMenuFactory, _super);
38688 function StandardMenuFactory() {
38689 return _super !== null && _super.apply(this, arguments) || this;
38690 }
38691 StandardMenuFactory.prototype.hideActiveMenu = function () {
38692 if (this.hidePopup) {
38693 this.hidePopup();
38694 }
38695 };
38696 StandardMenuFactory.prototype.showMenuAfterMouseEvent = function (column, mouseEvent) {
38697 var _this = this;
38698 this.showPopup(column, function (eMenu) {
38699 _this.popupService.positionPopupUnderMouseEvent({
38700 column: column,
38701 type: 'columnMenu',
38702 mouseEvent: mouseEvent,
38703 ePopup: eMenu
38704 });
38705 }, mouseEvent.target);
38706 };
38707 StandardMenuFactory.prototype.showMenuAfterButtonClick = function (column, eventSource, containerType) {
38708 var _this = this;
38709 this.showPopup(column, function (eMenu) {
38710 _this.popupService.positionPopupUnderComponent({
38711 type: containerType,
38712 eventSource: eventSource,
38713 ePopup: eMenu,
38714 keepWithinBounds: true,
38715 column: column
38716 });
38717 }, eventSource);
38718 };
38719 StandardMenuFactory.prototype.showPopup = function (column, positionCallback, eventSource) {
38720 var _this = this;
38721 var filterWrapper = this.filterManager.getOrCreateFilterWrapper(column, 'COLUMN_MENU');
38722 if (!filterWrapper) {
38723 throw new Error('AG Grid - unable to show popup filter, filter instantiation failed');
38724 }
38725 var eMenu = document.createElement('div');
38726 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_4__["setAriaRole"])(eMenu, 'presentation');
38727 eMenu.classList.add('ag-menu');
38728 this.tabListener = this.addManagedListener(eMenu, 'keydown', function (e) { return _this.trapFocusWithin(e, eMenu); });
38729 filterWrapper.guiPromise.then(function (gui) { return eMenu.appendChild(gui); });
38730 var hidePopup;
38731 var anchorToElement = eventSource || this.ctrlsService.getGridBodyCtrl().getGui();
38732 var closedCallback = function (e) {
38733 column.setMenuVisible(false, 'contextMenu');
38734 var isKeyboardEvent = e instanceof KeyboardEvent;
38735 if (_this.tabListener) {
38736 _this.tabListener = _this.tabListener();
38737 }
38738 if (isKeyboardEvent && eventSource && Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isVisible"])(eventSource)) {
38739 var focusableEl = _this.focusService.findTabbableParent(eventSource);
38740 if (focusableEl) {
38741 focusableEl.focus();
38742 }
38743 }
38744 };
38745 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
38746 var addPopupRes = this.popupService.addPopup({
38747 modal: true,
38748 eChild: eMenu,
38749 closeOnEsc: true,
38750 closedCallback: closedCallback,
38751 positionCallback: function () { return positionCallback(eMenu); },
38752 anchorToElement: anchorToElement,
38753 ariaLabel: translate('ariaLabelColumnMenu', 'Column Menu')
38754 });
38755 if (addPopupRes) {
38756 this.hidePopup = hidePopup = addPopupRes.hideFunc;
38757 }
38758 filterWrapper.filterPromise.then(function (filter) {
38759 // need to make sure the filter is present before positioning, as only
38760 // after filter it is visible can we find out what the width of it is
38761 positionCallback(eMenu);
38762 if (filter.afterGuiAttached) {
38763 filter.afterGuiAttached({ container: 'columnMenu', hidePopup: hidePopup });
38764 }
38765 });
38766 column.setMenuVisible(true, 'contextMenu');
38767 };
38768 StandardMenuFactory.prototype.trapFocusWithin = function (e, menu) {
38769 if (e.key !== _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].TAB ||
38770 e.defaultPrevented ||
38771 this.focusService.findNextFocusableElement(menu, false, e.shiftKey)) {
38772 return;
38773 }
38774 e.preventDefault();
38775 this.focusService.focusInto(menu, e.shiftKey);
38776 };
38777 StandardMenuFactory.prototype.isMenuEnabled = function (column) {
38778 // for standard, we show menu if filter is enabled, and the menu is not suppressed
38779 return column.isFilterAllowed();
38780 };
38781 __decorate([
38782 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
38783 ], StandardMenuFactory.prototype, "filterManager", void 0);
38784 __decorate([
38785 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('popupService')
38786 ], StandardMenuFactory.prototype, "popupService", void 0);
38787 __decorate([
38788 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
38789 ], StandardMenuFactory.prototype, "focusService", void 0);
38790 __decorate([
38791 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
38792 ], StandardMenuFactory.prototype, "ctrlsService", void 0);
38793 StandardMenuFactory = __decorate([
38794 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('menuFactory')
38795 ], StandardMenuFactory);
38796 return StandardMenuFactory;
38797}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
38798
38799
38800
38801
38802
38803/***/ }),
38804/* 172 */
38805/***/ (function(module, __webpack_exports__, __webpack_require__) {
38806
38807"use strict";
38808__webpack_require__.r(__webpack_exports__);
38809/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabbedLayout", function() { return TabbedLayout; });
38810/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
38811/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64);
38812/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
38813/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44);
38814/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
38815/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65);
38816/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36);
38817/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12);
38818/**
38819 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38820 * @version v27.3.0
38821 * @link https://www.ag-grid.com/
38822 * @license MIT
38823 */
38824var __extends = (undefined && undefined.__extends) || (function () {
38825 var extendStatics = function (d, b) {
38826 extendStatics = Object.setPrototypeOf ||
38827 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38828 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
38829 return extendStatics(d, b);
38830 };
38831 return function (d, b) {
38832 extendStatics(d, b);
38833 function __() { this.constructor = d; }
38834 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38835 };
38836})();
38837var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38838 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38839 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38840 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
38841 return c > 3 && r && Object.defineProperty(target, key, r), r;
38842};
38843
38844
38845
38846
38847
38848
38849
38850
38851var TabbedLayout = /** @class */ (function (_super) {
38852 __extends(TabbedLayout, _super);
38853 function TabbedLayout(params) {
38854 var _this = _super.call(this, TabbedLayout.getTemplate(params.cssClass)) || this;
38855 _this.items = [];
38856 _this.tabbedItemScrollMap = new Map();
38857 _this.params = params;
38858 if (params.items) {
38859 params.items.forEach(function (item) { return _this.addItem(item); });
38860 }
38861 return _this;
38862 }
38863 TabbedLayout.prototype.postConstruct = function () {
38864 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_1__["ManagedFocusFeature"](this.getFocusableElement(), {
38865 onTabKeyDown: this.onTabKeyDown.bind(this),
38866 handleKeyDown: this.handleKeyDown.bind(this)
38867 }));
38868 };
38869 TabbedLayout.getTemplate = function (cssClass) {
38870 return /* html */ "<div class=\"ag-tabs " + cssClass + "\">\n <div ref=\"eHeader\" role=\"tablist\" class=\"ag-tabs-header " + (cssClass ? cssClass + "-header" : '') + "\"></div>\n <div ref=\"eBody\" role=\"presentation\" class=\"ag-tabs-body " + (cssClass ? cssClass + "-body" : '') + "\"></div>\n </div>";
38871 };
38872 TabbedLayout.prototype.handleKeyDown = function (e) {
38873 var eDocument = this.gridOptionsWrapper.getDocument();
38874 switch (e.key) {
38875 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].RIGHT:
38876 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].LEFT:
38877 if (!this.eHeader.contains(eDocument.activeElement)) {
38878 return;
38879 }
38880 var currentPosition = this.items.indexOf(this.activeItem);
38881 var nextPosition = e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].RIGHT ? Math.min(currentPosition + 1, this.items.length - 1) : Math.max(currentPosition - 1, 0);
38882 if (currentPosition === nextPosition) {
38883 return;
38884 }
38885 e.preventDefault();
38886 var nextItem = this.items[nextPosition];
38887 this.showItemWrapper(nextItem);
38888 nextItem.eHeaderButton.focus();
38889 break;
38890 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].UP:
38891 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].DOWN:
38892 e.stopPropagation();
38893 break;
38894 }
38895 };
38896 TabbedLayout.prototype.onTabKeyDown = function (e) {
38897 if (e.defaultPrevented) {
38898 return;
38899 }
38900 var _a = this, focusService = _a.focusService, eHeader = _a.eHeader, eBody = _a.eBody, activeItem = _a.activeItem;
38901 var eDocument = this.gridOptionsWrapper.getDocument();
38902 var activeElement = eDocument.activeElement;
38903 e.preventDefault();
38904 if (eHeader.contains(activeElement)) {
38905 // focus is in header, move into body of popup
38906 focusService.focusInto(eBody, e.shiftKey);
38907 }
38908 else {
38909 // focus is in body, establish if it should return to header
38910 if (focusService.isFocusUnderManagedComponent(eBody)) {
38911 // focus was in a managed focus component and has now left, so we can return to the header
38912 activeItem.eHeaderButton.focus();
38913 }
38914 else {
38915 var nextEl = focusService.findNextFocusableElement(eBody, false, e.shiftKey);
38916 if (nextEl) {
38917 // if another element exists in the body that can be focussed, go to that
38918 nextEl.focus();
38919 }
38920 else {
38921 // otherwise return to the header
38922 activeItem.eHeaderButton.focus();
38923 }
38924 }
38925 }
38926 };
38927 TabbedLayout.prototype.setAfterAttachedParams = function (params) {
38928 this.afterAttachedParams = params;
38929 };
38930 TabbedLayout.prototype.showFirstItem = function () {
38931 if (this.items.length > 0) {
38932 this.showItemWrapper(this.items[0]);
38933 }
38934 };
38935 TabbedLayout.prototype.addItem = function (item) {
38936 var eHeaderButton = document.createElement('span');
38937 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaRole"])(eHeaderButton, 'tab');
38938 eHeaderButton.setAttribute('tabIndex', '-1');
38939 eHeaderButton.appendChild(item.title);
38940 eHeaderButton.classList.add('ag-tab');
38941 this.eHeader.appendChild(eHeaderButton);
38942 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaLabel"])(eHeaderButton, item.titleLabel);
38943 var wrapper = {
38944 tabbedItem: item,
38945 eHeaderButton: eHeaderButton
38946 };
38947 this.items.push(wrapper);
38948 eHeaderButton.addEventListener('click', this.showItemWrapper.bind(this, wrapper));
38949 };
38950 TabbedLayout.prototype.showItem = function (tabbedItem) {
38951 var itemWrapper = this.items.find(function (wrapper) { return wrapper.tabbedItem === tabbedItem; });
38952 if (itemWrapper) {
38953 this.showItemWrapper(itemWrapper);
38954 }
38955 };
38956 TabbedLayout.prototype.showItemWrapper = function (wrapper) {
38957 var _this = this;
38958 var tabbedItem = wrapper.tabbedItem, eHeaderButton = wrapper.eHeaderButton;
38959 if (this.params.onItemClicked) {
38960 this.params.onItemClicked({ item: tabbedItem });
38961 }
38962 if (this.activeItem === wrapper) {
38963 Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["callIfPresent"])(this.params.onActiveItemClicked);
38964 return;
38965 }
38966 if (this.lastScrollListener) {
38967 this.lastScrollListener = this.lastScrollListener();
38968 }
38969 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["clearElement"])(this.eBody);
38970 tabbedItem.bodyPromise.then(function (body) {
38971 _this.eBody.appendChild(body);
38972 var onlyUnmanaged = !_this.focusService.isKeyboardMode();
38973 _this.focusService.focusInto(_this.eBody, false, onlyUnmanaged);
38974 if (tabbedItem.afterAttachedCallback) {
38975 tabbedItem.afterAttachedCallback(_this.afterAttachedParams);
38976 }
38977 if (_this.params.keepScrollPosition) {
38978 var scrollableContainer_1 = (tabbedItem.getScrollableContainer && tabbedItem.getScrollableContainer()) || body;
38979 _this.lastScrollListener = _this.addManagedListener(scrollableContainer_1, 'scroll', function () {
38980 _this.tabbedItemScrollMap.set(tabbedItem.name, scrollableContainer_1.scrollTop);
38981 });
38982 var scrollPosition_1 = _this.tabbedItemScrollMap.get(tabbedItem.name);
38983 if (scrollPosition_1 !== undefined) {
38984 // Safari needs a small timeout or it will fire a scroll event to position 0
38985 setTimeout(function () {
38986 scrollableContainer_1.scrollTop = scrollPosition_1;
38987 }, 0);
38988 }
38989 }
38990 });
38991 if (this.activeItem) {
38992 this.activeItem.eHeaderButton.classList.remove('ag-tab-selected');
38993 }
38994 eHeaderButton.classList.add('ag-tab-selected');
38995 this.activeItem = wrapper;
38996 };
38997 __decorate([
38998 Object(_context_context__WEBPACK_IMPORTED_MODULE_7__["Autowired"])('focusService')
38999 ], TabbedLayout.prototype, "focusService", void 0);
39000 __decorate([
39001 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eHeader')
39002 ], TabbedLayout.prototype, "eHeader", void 0);
39003 __decorate([
39004 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eBody')
39005 ], TabbedLayout.prototype, "eBody", void 0);
39006 __decorate([
39007 _context_context__WEBPACK_IMPORTED_MODULE_7__["PostConstruct"]
39008 ], TabbedLayout.prototype, "postConstruct", null);
39009 return TabbedLayout;
39010}(_widgets_component__WEBPACK_IMPORTED_MODULE_6__["Component"]));
39011
39012
39013
39014
39015
39016/***/ }),
39017/* 173 */
39018/***/ (function(module, __webpack_exports__, __webpack_require__) {
39019
39020"use strict";
39021__webpack_require__.r(__webpack_exports__);
39022/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simpleHttpRequest", function() { return simpleHttpRequest; });
39023/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37);
39024/**
39025 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
39026 * @version v27.3.0
39027 * @link https://www.ag-grid.com/
39028 * @license MIT
39029 */
39030
39031/**
39032 * @deprecated
39033 */
39034function simpleHttpRequest(params) {
39035 return new _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"](function (resolve) {
39036 var httpRequest = new XMLHttpRequest();
39037 httpRequest.open('GET', params.url);
39038 httpRequest.send();
39039 httpRequest.onreadystatechange = function () {
39040 if (httpRequest.readyState === 4 && httpRequest.status === 200) {
39041 resolve(JSON.parse(httpRequest.responseText));
39042 }
39043 };
39044 });
39045}
39046
39047
39048
39049
39050/***/ }),
39051/* 174 */
39052/***/ (function(module, __webpack_exports__, __webpack_require__) {
39053
39054"use strict";
39055__webpack_require__.r(__webpack_exports__);
39056/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResizeObserverService", function() { return ResizeObserverService; });
39057/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
39058/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
39059/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
39060/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
39061/**
39062 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
39063 * @version v27.3.0
39064 * @link https://www.ag-grid.com/
39065 * @license MIT
39066 */
39067var __extends = (undefined && undefined.__extends) || (function () {
39068 var extendStatics = function (d, b) {
39069 extendStatics = Object.setPrototypeOf ||
39070 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
39071 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
39072 return extendStatics(d, b);
39073 };
39074 return function (d, b) {
39075 extendStatics(d, b);
39076 function __() { this.constructor = d; }
39077 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
39078 };
39079})();
39080var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
39081 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
39082 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
39083 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
39084 return c > 3 && r && Object.defineProperty(target, key, r), r;
39085};
39086
39087
39088
39089
39090var DEBOUNCE_DELAY = 50;
39091var ResizeObserverService = /** @class */ (function (_super) {
39092 __extends(ResizeObserverService, _super);
39093 function ResizeObserverService() {
39094 var _this = _super !== null && _super.apply(this, arguments) || this;
39095 _this.polyfillFunctions = [];
39096 return _this;
39097 }
39098 ResizeObserverService.prototype.observeResize = function (element, callback) {
39099 var _this = this;
39100 var eDocument = this.gridOptionsWrapper.getDocument();
39101 var win = (eDocument.defaultView || window);
39102 // this gets fired too often and might cause some relayout issues
39103 // so we add a debounce to the callback here to avoid the flashing effect.
39104 var debouncedCallback = Object(_utils_function__WEBPACK_IMPORTED_MODULE_2__["debounce"])(callback, DEBOUNCE_DELAY);
39105 var useBrowserResizeObserver = function () {
39106 var resizeObserver = new win.ResizeObserver(debouncedCallback);
39107 resizeObserver.observe(element);
39108 return function () { return resizeObserver.disconnect(); };
39109 };
39110 var usePolyfill = function () {
39111 // initialise to the current width and height, so first call will have no changes
39112 var widthLastTime = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["offsetWidth"])(element);
39113 var heightLastTime = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["offsetHeight"])(element);
39114 // when finished, this gets turned to false.
39115 var running = true;
39116 var periodicallyCheckWidthAndHeight = function () {
39117 if (running) {
39118 var newWidth = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["offsetWidth"])(element);
39119 var newHeight = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["offsetHeight"])(element);
39120 var changed = newWidth !== widthLastTime || newHeight !== heightLastTime;
39121 if (changed) {
39122 widthLastTime = newWidth;
39123 heightLastTime = newHeight;
39124 callback();
39125 }
39126 _this.doNextPolyfillTurn(periodicallyCheckWidthAndHeight);
39127 }
39128 };
39129 periodicallyCheckWidthAndHeight();
39130 // the callback function we return sets running to false
39131 return function () { return running = false; };
39132 };
39133 var suppressResize = this.gridOptionsWrapper.isSuppressBrowserResizeObserver();
39134 var resizeObserverExists = !!win.ResizeObserver;
39135 if (resizeObserverExists && !suppressResize) {
39136 return useBrowserResizeObserver();
39137 }
39138 return usePolyfill();
39139 };
39140 ResizeObserverService.prototype.doNextPolyfillTurn = function (func) {
39141 this.polyfillFunctions.push(func);
39142 this.schedulePolyfill();
39143 };
39144 ResizeObserverService.prototype.schedulePolyfill = function () {
39145 var _this = this;
39146 if (this.polyfillScheduled) {
39147 return;
39148 }
39149 var executeAllFuncs = function () {
39150 var funcs = _this.polyfillFunctions;
39151 // make sure set scheduled to false and clear clear array
39152 // before executing the funcs, as the funcs could add more funcs
39153 _this.polyfillScheduled = false;
39154 _this.polyfillFunctions = [];
39155 funcs.forEach(function (f) { return f(); });
39156 };
39157 this.polyfillScheduled = true;
39158 this.getFrameworkOverrides().setTimeout(executeAllFuncs, DEBOUNCE_DELAY);
39159 };
39160 ResizeObserverService = __decorate([
39161 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('resizeObserverService')
39162 ], ResizeObserverService);
39163 return ResizeObserverService;
39164}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
39165
39166
39167
39168
39169
39170/***/ }),
39171/* 175 */
39172/***/ (function(module, __webpack_exports__, __webpack_require__) {
39173
39174"use strict";
39175__webpack_require__.r(__webpack_exports__);
39176/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameService", function() { return AnimationFrameService; });
39177/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
39178/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
39179/**
39180 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
39181 * @version v27.3.0
39182 * @link https://www.ag-grid.com/
39183 * @license MIT
39184 */
39185var __extends = (undefined && undefined.__extends) || (function () {
39186 var extendStatics = function (d, b) {
39187 extendStatics = Object.setPrototypeOf ||
39188 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
39189 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
39190 return extendStatics(d, b);
39191 };
39192 return function (d, b) {
39193 extendStatics(d, b);
39194 function __() { this.constructor = d; }
39195 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
39196 };
39197})();
39198var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
39199 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
39200 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
39201 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
39202 return c > 3 && r && Object.defineProperty(target, key, r), r;
39203};
39204
39205
39206var AnimationFrameService = /** @class */ (function (_super) {
39207 __extends(AnimationFrameService, _super);
39208 function AnimationFrameService() {
39209 var _this = _super !== null && _super.apply(this, arguments) || this;
39210 // p1 and p2 are create tasks are to do with row and cell creation.
39211 // for them we want to execute according to row order, so we use
39212 // TaskItem so we know what index the item is for.
39213 _this.createTasksP1 = { list: [], sorted: false }; // eg drawing back-ground of rows
39214 _this.createTasksP2 = { list: [], sorted: false }; // eg cell renderers, adding hover functionality
39215 // destroy tasks are to do with row removal. they are done after row creation as the user will need to see new
39216 // rows first (as blank is scrolled into view), when we remove the old rows (no longer in view) is not as
39217 // important.
39218 _this.destroyTasks = [];
39219 _this.ticking = false;
39220 // we need to know direction of scroll, to build up rows in the direction of
39221 // the scroll. eg if user scrolls down, we extend the rows by building down.
39222 _this.scrollGoingDown = true;
39223 _this.lastScrollTop = 0;
39224 _this.taskCount = 0;
39225 _this.cancelledTasks = new Set();
39226 return _this;
39227 }
39228 AnimationFrameService.prototype.setScrollTop = function (scrollTop) {
39229 this.scrollGoingDown = scrollTop > this.lastScrollTop;
39230 this.lastScrollTop = scrollTop;
39231 };
39232 AnimationFrameService.prototype.init = function () {
39233 this.useAnimationFrame = !this.gridOptionsWrapper.isSuppressAnimationFrame();
39234 };
39235 AnimationFrameService.prototype.isOn = function () {
39236 return this.useAnimationFrame;
39237 };
39238 // this method is for our AG Grid sanity only - if animation frames are turned off,
39239 // then no place in the code should be looking to add any work to be done in animation
39240 // frames. this stops bugs - where some code is asking for a frame to be executed
39241 // when it should not.
39242 AnimationFrameService.prototype.verifyAnimationFrameOn = function (methodName) {
39243 if (this.useAnimationFrame === false) {
39244 console.warn("AG Grid: AnimationFrameService." + methodName + " called but animation frames are off");
39245 }
39246 };
39247 AnimationFrameService.prototype.createTask = function (task, index, list) {
39248 this.verifyAnimationFrameOn(list);
39249 var taskItem = { task: task, index: index, createOrder: ++this.taskCount };
39250 this.addTaskToList(this[list], taskItem);
39251 this.schedule();
39252 };
39253 AnimationFrameService.prototype.cancelTask = function (task) {
39254 this.cancelledTasks.add(task);
39255 };
39256 AnimationFrameService.prototype.addTaskToList = function (taskList, task) {
39257 taskList.list.push(task);
39258 taskList.sorted = false;
39259 };
39260 AnimationFrameService.prototype.sortTaskList = function (taskList) {
39261 if (taskList.sorted) {
39262 return;
39263 }
39264 var sortDirection = this.scrollGoingDown ? 1 : -1;
39265 // sort first by row index (taking into account scroll direction), then by
39266 // order of task creation (always ascending, so cells will render left-to-right)
39267 taskList.list.sort(function (a, b) { return a.index !== b.index ? sortDirection * (b.index - a.index) : b.createOrder - a.createOrder; });
39268 taskList.sorted = true;
39269 };
39270 AnimationFrameService.prototype.addDestroyTask = function (task) {
39271 this.verifyAnimationFrameOn('createTasksP3');
39272 this.destroyTasks.push(task);
39273 this.schedule();
39274 };
39275 AnimationFrameService.prototype.executeFrame = function (millis) {
39276 this.verifyAnimationFrameOn('executeFrame');
39277 var p1TaskList = this.createTasksP1;
39278 var p1Tasks = p1TaskList.list;
39279 var p2TaskList = this.createTasksP2;
39280 var p2Tasks = p2TaskList.list;
39281 var destroyTasks = this.destroyTasks;
39282 var frameStart = new Date().getTime();
39283 var duration = (new Date().getTime()) - frameStart;
39284 // 16ms is 60 fps
39285 var noMaxMillis = millis <= 0;
39286 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
39287 while (noMaxMillis || duration < millis) {
39288 var gridBodyDidSomething = gridBodyCon.getScrollFeature().executeAnimationFrameScroll();
39289 if (!gridBodyDidSomething) {
39290 var task = void 0;
39291 if (p1Tasks.length) {
39292 this.sortTaskList(p1TaskList);
39293 task = p1Tasks.pop().task;
39294 }
39295 else if (p2Tasks.length) {
39296 this.sortTaskList(p2TaskList);
39297 task = p2Tasks.pop().task;
39298 }
39299 else if (destroyTasks.length) {
39300 task = destroyTasks.pop();
39301 }
39302 else {
39303 this.cancelledTasks.clear();
39304 break;
39305 }
39306 if (!this.cancelledTasks.has(task)) {
39307 task();
39308 }
39309 }
39310 duration = (new Date().getTime()) - frameStart;
39311 }
39312 if (p1Tasks.length || p2Tasks.length || destroyTasks.length) {
39313 this.requestFrame();
39314 }
39315 else {
39316 this.stopTicking();
39317 }
39318 };
39319 AnimationFrameService.prototype.stopTicking = function () {
39320 this.ticking = false;
39321 };
39322 AnimationFrameService.prototype.flushAllFrames = function () {
39323 if (!this.useAnimationFrame) {
39324 return;
39325 }
39326 this.executeFrame(-1);
39327 };
39328 AnimationFrameService.prototype.schedule = function () {
39329 if (!this.useAnimationFrame) {
39330 return;
39331 }
39332 if (!this.ticking) {
39333 this.ticking = true;
39334 this.requestFrame();
39335 }
39336 };
39337 AnimationFrameService.prototype.requestFrame = function () {
39338 // check for the existence of requestAnimationFrame, and if
39339 // it's missing, then we polyfill it with setTimeout()
39340 var callback = this.executeFrame.bind(this, 60);
39341 var eDocument = this.gridOptionsWrapper.getDocument();
39342 var win = (eDocument.defaultView || window);
39343 if (win.requestAnimationFrame) {
39344 win.requestAnimationFrame(callback);
39345 }
39346 else if (win.webkitRequestAnimationFrame) {
39347 win.webkitRequestAnimationFrame(callback);
39348 }
39349 else {
39350 win.setTimeout(callback, 0);
39351 }
39352 };
39353 AnimationFrameService.prototype.isQueueEmpty = function () {
39354 return !this.ticking;
39355 };
39356 // a debounce utility used for parts of the app involved with rendering.
39357 // the advantage over normal debounce is the client can call flushAllFrames()
39358 // to make sure all rendering is complete. we don't wait any milliseconds,
39359 // as this is intended to batch calls in one VM turn.
39360 AnimationFrameService.prototype.debounce = function (func) {
39361 var _this = this;
39362 var pending = false;
39363 return function () {
39364 if (!_this.isOn()) {
39365 _this.getFrameworkOverrides().setTimeout(func, 0);
39366 return;
39367 }
39368 if (pending) {
39369 return;
39370 }
39371 pending = true;
39372 _this.addDestroyTask(function () {
39373 pending = false;
39374 func();
39375 });
39376 };
39377 };
39378 __decorate([
39379 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
39380 ], AnimationFrameService.prototype, "ctrlsService", void 0);
39381 __decorate([
39382 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
39383 ], AnimationFrameService.prototype, "init", null);
39384 AnimationFrameService = __decorate([
39385 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('animationFrameService')
39386 ], AnimationFrameService);
39387 return AnimationFrameService;
39388}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
39389
39390
39391
39392
39393
39394/***/ }),
39395/* 176 */
39396/***/ (function(module, __webpack_exports__, __webpack_require__) {
39397
39398"use strict";
39399__webpack_require__.r(__webpack_exports__);
39400/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PositionableFeature", function() { return PositionableFeature; });
39401/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
39402/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
39403/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
39404/**
39405 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
39406 * @version v27.3.0
39407 * @link https://www.ag-grid.com/
39408 * @license MIT
39409 */
39410var __extends = (undefined && undefined.__extends) || (function () {
39411 var extendStatics = function (d, b) {
39412 extendStatics = Object.setPrototypeOf ||
39413 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
39414 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
39415 return extendStatics(d, b);
39416 };
39417 return function (d, b) {
39418 extendStatics(d, b);
39419 function __() { this.constructor = d; }
39420 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
39421 };
39422})();
39423var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
39424 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
39425 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
39426 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
39427 return c > 3 && r && Object.defineProperty(target, key, r), r;
39428};
39429
39430
39431
39432var RESIZE_CONTAINER_STYLE = 'ag-resizer-wrapper';
39433var RESIZE_TEMPLATE = /* html */ "<div class=\"" + RESIZE_CONTAINER_STYLE + "\">\n <div ref=\"eTopLeftResizer\" class=\"ag-resizer ag-resizer-topLeft\"></div>\n <div ref=\"eTopResizer\" class=\"ag-resizer ag-resizer-top\"></div>\n <div ref=\"eTopRightResizer\" class=\"ag-resizer ag-resizer-topRight\"></div>\n <div ref=\"eRightResizer\" class=\"ag-resizer ag-resizer-right\"></div>\n <div ref=\"eBottomRightResizer\" class=\"ag-resizer ag-resizer-bottomRight\"></div>\n <div ref=\"eBottomResizer\" class=\"ag-resizer ag-resizer-bottom\"></div>\n <div ref=\"eBottomLeftResizer\" class=\"ag-resizer ag-resizer-bottomLeft\"></div>\n <div ref=\"eLeftResizer\" class=\"ag-resizer ag-resizer-left\"></div>\n </div>";
39434var PositionableFeature = /** @class */ (function (_super) {
39435 __extends(PositionableFeature, _super);
39436 function PositionableFeature(element, config) {
39437 var _this = _super.call(this) || this;
39438 _this.element = element;
39439 _this.dragStartPosition = {
39440 x: 0,
39441 y: 0
39442 };
39443 _this.position = {
39444 x: 0,
39445 y: 0
39446 };
39447 _this.lastSize = {
39448 width: -1,
39449 height: -1
39450 };
39451 _this.positioned = false;
39452 _this.resizersAdded = false;
39453 _this.resizeListeners = [];
39454 _this.boundaryEl = null;
39455 _this.isResizing = false;
39456 _this.isMoving = false;
39457 _this.resizable = {};
39458 _this.movable = false;
39459 _this.currentResizer = null;
39460 _this.config = Object.assign({}, { popup: false }, config);
39461 return _this;
39462 }
39463 PositionableFeature.prototype.center = function () {
39464 var _a = this.offsetParent, clientHeight = _a.clientHeight, clientWidth = _a.clientWidth;
39465 var x = (clientWidth / 2) - (this.getWidth() / 2);
39466 var y = (clientHeight / 2) - (this.getHeight() / 2);
39467 this.offsetElement(x, y);
39468 };
39469 PositionableFeature.prototype.initialisePosition = function () {
39470 var _a = this.config, centered = _a.centered, forcePopupParentAsOffsetParent = _a.forcePopupParentAsOffsetParent, minWidth = _a.minWidth, width = _a.width, minHeight = _a.minHeight, height = _a.height, x = _a.x, y = _a.y;
39471 if (!this.offsetParent) {
39472 this.setOffsetParent();
39473 }
39474 var computedMinHeight = 0;
39475 var computedMinWidth = 0;
39476 // here we don't use the main offset parent but the element's offsetParent
39477 // in order to calculated the minWidth and minHeight correctly
39478 var isVisible = !!this.element.offsetParent;
39479 if (isVisible) {
39480 var boundaryEl = this.findBoundaryElement();
39481 var offsetParentComputedStyles = window.getComputedStyle(boundaryEl);
39482 if (offsetParentComputedStyles.minWidth != null) {
39483 var paddingWidth = boundaryEl.offsetWidth - this.element.offsetWidth;
39484 computedMinWidth = parseInt(offsetParentComputedStyles.minWidth, 10) - paddingWidth;
39485 }
39486 if (offsetParentComputedStyles.minHeight != null) {
39487 var paddingHeight = boundaryEl.offsetHeight - this.element.offsetHeight;
39488 computedMinHeight = parseInt(offsetParentComputedStyles.minHeight, 10) - paddingHeight;
39489 }
39490 }
39491 this.minHeight = minHeight || computedMinHeight;
39492 this.minWidth = minWidth || computedMinWidth;
39493 if (width) {
39494 this.setWidth(width);
39495 }
39496 if (height) {
39497 this.setHeight(height);
39498 }
39499 if (!width || !height) {
39500 this.refreshSize();
39501 }
39502 if (centered) {
39503 this.center();
39504 }
39505 else if (x || y) {
39506 this.offsetElement(x, y);
39507 }
39508 else if (isVisible && forcePopupParentAsOffsetParent && this.boundaryEl) {
39509 var top_1 = parseFloat(this.boundaryEl.style.top);
39510 var left = parseFloat(this.boundaryEl.style.left);
39511 this.offsetElement(isNaN(left) ? 0 : left, isNaN(top_1) ? 0 : top_1);
39512 }
39513 this.positioned = !!this.offsetParent;
39514 };
39515 PositionableFeature.prototype.isPositioned = function () {
39516 return this.positioned;
39517 };
39518 PositionableFeature.prototype.getPosition = function () {
39519 return this.position;
39520 };
39521 PositionableFeature.prototype.setMovable = function (movable, moveElement) {
39522 if (!this.config.popup || movable === this.movable) {
39523 return;
39524 }
39525 this.movable = movable;
39526 var params = this.moveElementDragListener || {
39527 eElement: moveElement,
39528 onDragStart: this.onMoveStart.bind(this),
39529 onDragging: this.onMove.bind(this),
39530 onDragStop: this.onMoveEnd.bind(this)
39531 };
39532 if (movable) {
39533 this.dragService.addDragSource(params);
39534 this.moveElementDragListener = params;
39535 }
39536 else {
39537 this.dragService.removeDragSource(params);
39538 this.moveElementDragListener = undefined;
39539 }
39540 };
39541 PositionableFeature.prototype.setResizable = function (resizable) {
39542 var _this = this;
39543 this.clearResizeListeners();
39544 if (resizable) {
39545 this.addResizers();
39546 }
39547 else {
39548 this.removeResizers();
39549 }
39550 if (typeof resizable === 'boolean') {
39551 if (resizable === false) {
39552 return;
39553 }
39554 resizable = {
39555 topLeft: resizable,
39556 top: resizable,
39557 topRight: resizable,
39558 right: resizable,
39559 bottomRight: resizable,
39560 bottom: resizable,
39561 bottomLeft: resizable,
39562 left: resizable
39563 };
39564 }
39565 Object.keys(resizable).forEach(function (side) {
39566 var resizableStructure = resizable;
39567 var val = !!resizableStructure[side];
39568 var resizerEl = _this.getResizerElement(side);
39569 var params = {
39570 dragStartPixels: 0,
39571 eElement: resizerEl,
39572 onDragStart: function (e) { return _this.onResizeStart(e, side); },
39573 onDragging: _this.onResize.bind(_this),
39574 onDragStop: function (e) { return _this.onResizeEnd(e, side); },
39575 };
39576 if (!!_this.resizable[side] !== val || (!_this.isAlive() && !val)) {
39577 if (val) {
39578 _this.dragService.addDragSource(params);
39579 _this.resizeListeners.push(params);
39580 resizerEl.style.pointerEvents = 'all';
39581 }
39582 else {
39583 resizerEl.style.pointerEvents = 'none';
39584 }
39585 }
39586 });
39587 };
39588 PositionableFeature.prototype.removeSizeFromEl = function () {
39589 this.element.style.removeProperty('height');
39590 this.element.style.removeProperty('width');
39591 this.element.style.removeProperty('flex');
39592 };
39593 PositionableFeature.prototype.restoreLastSize = function () {
39594 this.element.style.flex = '0 0 auto';
39595 var _a = this.lastSize, height = _a.height, width = _a.width;
39596 if (width !== -1) {
39597 this.element.style.width = width + "px";
39598 }
39599 if (height !== -1) {
39600 this.element.style.height = height + "px";
39601 }
39602 };
39603 PositionableFeature.prototype.getHeight = function () {
39604 return this.element.offsetHeight;
39605 };
39606 PositionableFeature.prototype.setHeight = function (height) {
39607 var popup = this.config.popup;
39608 var eGui = this.element;
39609 var isPercent = false;
39610 if (typeof height === 'string' && height.indexOf('%') !== -1) {
39611 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedHeight"])(eGui, height);
39612 height = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["getAbsoluteHeight"])(eGui);
39613 isPercent = true;
39614 }
39615 else if (this.positioned) {
39616 var elRect = this.element.getBoundingClientRect();
39617 var parentRect = this.offsetParent.getBoundingClientRect();
39618 height = Math.max(this.minHeight, height);
39619 var clientHeight = this.offsetParent.clientHeight;
39620 var yPosition = popup ? this.position.y : elRect.top;
39621 var parentTop = popup ? 0 : parentRect.top;
39622 if (clientHeight && (height + yPosition > clientHeight + parentTop)) {
39623 height = clientHeight - yPosition;
39624 }
39625 }
39626 if (this.getHeight() === height) {
39627 return;
39628 }
39629 if (!isPercent) {
39630 if (popup) {
39631 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedHeight"])(eGui, height);
39632 }
39633 else {
39634 eGui.style.height = height + "px";
39635 eGui.style.flex = '0 0 auto';
39636 this.lastSize.height = typeof height === 'number' ? height : parseFloat(height);
39637 }
39638 }
39639 else {
39640 eGui.style.maxHeight = 'unset';
39641 eGui.style.minHeight = 'unset';
39642 }
39643 };
39644 PositionableFeature.prototype.getWidth = function () {
39645 return this.element.offsetWidth;
39646 };
39647 PositionableFeature.prototype.setWidth = function (width) {
39648 var eGui = this.element;
39649 var popup = this.config.popup;
39650 var isPercent = false;
39651 if (typeof width === 'string' && width.indexOf('%') !== -1) {
39652 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedWidth"])(eGui, width);
39653 width = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["getAbsoluteWidth"])(eGui);
39654 isPercent = true;
39655 }
39656 else if (this.positioned) {
39657 width = Math.max(this.minWidth, width);
39658 var clientWidth = this.offsetParent.clientWidth;
39659 var xPosition = popup ? this.position.x : this.element.getBoundingClientRect().left;
39660 if (clientWidth && (width + xPosition > clientWidth)) {
39661 width = clientWidth - xPosition;
39662 }
39663 }
39664 if (this.getWidth() === width) {
39665 return;
39666 }
39667 if (!isPercent) {
39668 if (this.config.popup) {
39669 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedWidth"])(eGui, width);
39670 }
39671 else {
39672 eGui.style.width = width + "px";
39673 eGui.style.flex = ' unset';
39674 this.lastSize.width = typeof width === 'number' ? width : parseFloat(width);
39675 }
39676 }
39677 else {
39678 eGui.style.maxWidth = 'unset';
39679 eGui.style.minWidth = 'unset';
39680 }
39681 };
39682 PositionableFeature.prototype.offsetElement = function (x, y) {
39683 if (x === void 0) { x = 0; }
39684 if (y === void 0) { y = 0; }
39685 var ePopup = this.config.forcePopupParentAsOffsetParent ? this.boundaryEl : this.element;
39686 this.popupService.positionPopup({
39687 ePopup: ePopup,
39688 x: x,
39689 y: y,
39690 keepWithinBounds: true
39691 });
39692 this.setPosition(parseFloat(ePopup.style.left), parseFloat(ePopup.style.top));
39693 };
39694 PositionableFeature.prototype.setPosition = function (x, y) {
39695 this.position.x = x;
39696 this.position.y = y;
39697 };
39698 PositionableFeature.prototype.updateDragStartPosition = function (x, y) {
39699 this.dragStartPosition = { x: x, y: y };
39700 };
39701 PositionableFeature.prototype.calculateMouseMovement = function (params) {
39702 var e = params.e, isLeft = params.isLeft, isTop = params.isTop, anywhereWithin = params.anywhereWithin, topBuffer = params.topBuffer;
39703 var xDiff = e.clientX - this.dragStartPosition.x;
39704 var yDiff = e.clientY - this.dragStartPosition.y;
39705 var movementX = this.shouldSkipX(e, !!isLeft, !!anywhereWithin, xDiff) ? 0 : xDiff;
39706 var movementY = this.shouldSkipY(e, !!isTop, topBuffer, yDiff) ? 0 : yDiff;
39707 return { movementX: movementX, movementY: movementY };
39708 };
39709 PositionableFeature.prototype.shouldSkipX = function (e, isLeft, anywhereWithin, diff) {
39710 var elRect = this.element.getBoundingClientRect();
39711 var parentRect = this.offsetParent.getBoundingClientRect();
39712 var boundaryElRect = this.boundaryEl.getBoundingClientRect();
39713 var xPosition = this.config.popup ? this.position.x : elRect.left;
39714 // skip if cursor is outside of popupParent horizontally
39715 var skipX = ((xPosition <= 0 && parentRect.left >= e.clientX) ||
39716 (parentRect.right <= e.clientX && parentRect.right <= boundaryElRect.right));
39717 if (skipX) {
39718 return true;
39719 }
39720 if (isLeft) {
39721 skipX = (
39722 // skip if we are moving to the left and the cursor
39723 // is positioned to the right of the left side anchor
39724 (diff < 0 && e.clientX > xPosition + parentRect.left) ||
39725 // skip if we are moving to the right and the cursor
39726 // is positioned to the left of the dialog
39727 (diff > 0 && e.clientX < xPosition + parentRect.left));
39728 }
39729 else {
39730 if (anywhereWithin) {
39731 // if anywhereWithin is true, we allow to move
39732 // as long as the cursor is within the dialog
39733 skipX = ((diff < 0 && e.clientX > boundaryElRect.right) ||
39734 (diff > 0 && e.clientX < xPosition + parentRect.left));
39735 }
39736 else {
39737 skipX = (
39738 // if the movement is bound to the right side of the dialog
39739 // we skip if we are moving to the left and the cursor
39740 // is to the right of the dialog
39741 (diff < 0 && e.clientX > boundaryElRect.right) ||
39742 // or skip if we are moving to the right and the cursor
39743 // is to the left of the right side anchor
39744 (diff > 0 && e.clientX < boundaryElRect.right));
39745 }
39746 }
39747 return skipX;
39748 };
39749 PositionableFeature.prototype.shouldSkipY = function (e, isTop, topBuffer, diff) {
39750 if (topBuffer === void 0) { topBuffer = 0; }
39751 var elRect = this.element.getBoundingClientRect();
39752 var parentRect = this.offsetParent.getBoundingClientRect();
39753 var boundaryElRect = this.boundaryEl.getBoundingClientRect();
39754 var yPosition = this.config.popup ? this.position.y : elRect.top;
39755 // skip if cursor is outside of popupParent vertically
39756 var skipY = ((yPosition <= 0 && parentRect.top >= e.clientY) ||
39757 (parentRect.bottom <= e.clientY && parentRect.bottom <= boundaryElRect.bottom));
39758 if (skipY) {
39759 return true;
39760 }
39761 if (isTop) {
39762 skipY = (
39763 // skip if we are moving to towards top and the cursor is
39764 // below the top anchor + topBuffer
39765 // note: topBuffer is used when moving the dialog using the title bar
39766 (diff < 0 && e.clientY > yPosition + parentRect.top + topBuffer) ||
39767 // skip if we are moving to the bottom and the cursor is
39768 // above the top anchor
39769 (diff > 0 && e.clientY < yPosition + parentRect.top));
39770 }
39771 else {
39772 skipY = (
39773 // skip if we are moving towards the top and the cursor
39774 // is below the bottom anchor
39775 (diff < 0 && e.clientY > boundaryElRect.bottom) ||
39776 // skip if we are moving towards the bottom and the cursor
39777 // is above the bottom anchor
39778 (diff > 0 && e.clientY < boundaryElRect.bottom));
39779 }
39780 return skipY;
39781 };
39782 PositionableFeature.prototype.createResizeMap = function () {
39783 var eGui = this.element;
39784 this.resizerMap = {
39785 topLeft: { element: eGui.querySelector('[ref=eTopLeftResizer]') },
39786 top: { element: eGui.querySelector('[ref=eTopResizer]') },
39787 topRight: { element: eGui.querySelector('[ref=eTopRightResizer]') },
39788 right: { element: eGui.querySelector('[ref=eRightResizer]') },
39789 bottomRight: { element: eGui.querySelector('[ref=eBottomRightResizer]') },
39790 bottom: { element: eGui.querySelector('[ref=eBottomResizer]') },
39791 bottomLeft: { element: eGui.querySelector('[ref=eBottomLeftResizer]') },
39792 left: { element: eGui.querySelector('[ref=eLeftResizer]') }
39793 };
39794 };
39795 PositionableFeature.prototype.addResizers = function () {
39796 if (this.resizersAdded) {
39797 return;
39798 }
39799 var eGui = this.element;
39800 if (!eGui) {
39801 return;
39802 }
39803 var parser = new DOMParser();
39804 var resizers = parser.parseFromString(RESIZE_TEMPLATE, 'text/html').body;
39805 eGui.appendChild(resizers.firstChild);
39806 this.createResizeMap();
39807 this.resizersAdded = true;
39808 };
39809 PositionableFeature.prototype.removeResizers = function () {
39810 this.resizerMap = undefined;
39811 var resizerEl = this.element.querySelector("." + RESIZE_CONTAINER_STYLE);
39812 if (resizerEl) {
39813 this.element.removeChild(resizerEl);
39814 }
39815 this.resizersAdded = false;
39816 };
39817 PositionableFeature.prototype.getResizerElement = function (side) {
39818 return this.resizerMap[side].element;
39819 };
39820 PositionableFeature.prototype.onResizeStart = function (e, side) {
39821 this.boundaryEl = this.findBoundaryElement();
39822 if (!this.positioned) {
39823 this.initialisePosition();
39824 }
39825 this.currentResizer = {
39826 isTop: !!side.match(/top/i),
39827 isRight: !!side.match(/right/i),
39828 isBottom: !!side.match(/bottom/i),
39829 isLeft: !!side.match(/left/i),
39830 };
39831 this.element.classList.add('ag-resizing');
39832 this.resizerMap[side].element.classList.add('ag-active');
39833 var _a = this.config, popup = _a.popup, forcePopupParentAsOffsetParent = _a.forcePopupParentAsOffsetParent;
39834 if (!popup && !forcePopupParentAsOffsetParent) {
39835 this.applySizeToSiblings(this.currentResizer.isBottom || this.currentResizer.isTop);
39836 }
39837 this.isResizing = true;
39838 this.updateDragStartPosition(e.clientX, e.clientY);
39839 };
39840 PositionableFeature.prototype.getSiblings = function () {
39841 var element = this.element;
39842 var parent = element.parentElement;
39843 if (!parent) {
39844 return null;
39845 }
39846 return Array.prototype.slice.call(parent.children).filter(function (el) { return !el.classList.contains('ag-hidden'); });
39847 };
39848 PositionableFeature.prototype.getMinSizeOfSiblings = function () {
39849 var siblings = this.getSiblings() || [];
39850 var height = 0;
39851 var width = 0;
39852 for (var i = 0; i < siblings.length; i++) {
39853 var currentEl = siblings[i];
39854 var isFlex = !!currentEl.style.flex && currentEl.style.flex !== '0 0 auto';
39855 if (currentEl === this.element) {
39856 continue;
39857 }
39858 var nextHeight = this.minHeight || 0;
39859 var nextWidth = this.minWidth || 0;
39860 if (isFlex) {
39861 var computedStyle = window.getComputedStyle(currentEl);
39862 if (computedStyle.minHeight) {
39863 nextHeight = parseInt(computedStyle.minHeight, 10);
39864 }
39865 if (computedStyle.minWidth) {
39866 nextWidth = parseInt(computedStyle.minWidth, 10);
39867 }
39868 }
39869 else {
39870 nextHeight = currentEl.offsetHeight;
39871 nextWidth = currentEl.offsetWidth;
39872 }
39873 height += nextHeight;
39874 width += nextWidth;
39875 }
39876 return { height: height, width: width };
39877 };
39878 PositionableFeature.prototype.applySizeToSiblings = function (vertical) {
39879 var containerToFlex = null;
39880 var siblings = this.getSiblings();
39881 if (!siblings) {
39882 return;
39883 }
39884 for (var i = 0; i < siblings.length; i++) {
39885 var el = siblings[i];
39886 if (el === containerToFlex) {
39887 continue;
39888 }
39889 if (vertical) {
39890 el.style.height = el.offsetHeight + "px";
39891 }
39892 else {
39893 el.style.width = el.offsetWidth + "px";
39894 }
39895 el.style.flex = '0 0 auto';
39896 if (el === this.element) {
39897 containerToFlex = siblings[i + 1];
39898 }
39899 }
39900 if (containerToFlex) {
39901 containerToFlex.style.removeProperty('height');
39902 containerToFlex.style.removeProperty('min-height');
39903 containerToFlex.style.removeProperty('max-height');
39904 containerToFlex.style.flex = '1 1 auto';
39905 }
39906 };
39907 PositionableFeature.prototype.onResize = function (e) {
39908 if (!this.isResizing || !this.currentResizer) {
39909 return;
39910 }
39911 var _a = this.config, popup = _a.popup, forcePopupParentAsOffsetParent = _a.forcePopupParentAsOffsetParent;
39912 var _b = this.currentResizer, isTop = _b.isTop, isRight = _b.isRight, isBottom = _b.isBottom, isLeft = _b.isLeft;
39913 var isHorizontal = isRight || isLeft;
39914 var isVertical = isBottom || isTop;
39915 var _c = this.calculateMouseMovement({ e: e, isLeft: isLeft, isTop: isTop }), movementX = _c.movementX, movementY = _c.movementY;
39916 var xPosition = this.position.x;
39917 var yPosition = this.position.y;
39918 var offsetLeft = 0;
39919 var offsetTop = 0;
39920 if (isHorizontal && movementX) {
39921 var direction = isLeft ? -1 : 1;
39922 var oldWidth = this.getWidth();
39923 var newWidth = oldWidth + (movementX * direction);
39924 var skipWidth = false;
39925 if (isLeft) {
39926 offsetLeft = oldWidth - newWidth;
39927 if (xPosition + offsetLeft <= 0 || newWidth <= this.minWidth) {
39928 skipWidth = true;
39929 offsetLeft = 0;
39930 }
39931 }
39932 if (!skipWidth) {
39933 this.setWidth(newWidth);
39934 }
39935 }
39936 if (isVertical && movementY) {
39937 var direction = isTop ? -1 : 1;
39938 var oldHeight = this.getHeight();
39939 var newHeight = oldHeight + (movementY * direction);
39940 var skipHeight = false;
39941 if (isTop) {
39942 offsetTop = oldHeight - newHeight;
39943 if (yPosition + offsetTop <= 0 || newHeight <= this.minHeight) {
39944 skipHeight = true;
39945 offsetTop = 0;
39946 }
39947 }
39948 else {
39949 // do not let the size of all siblings be higher than the parent container
39950 if (!this.config.popup &&
39951 !this.config.forcePopupParentAsOffsetParent &&
39952 oldHeight < newHeight &&
39953 (this.getMinSizeOfSiblings().height + newHeight) > this.element.parentElement.offsetHeight) {
39954 skipHeight = true;
39955 }
39956 }
39957 if (!skipHeight) {
39958 this.setHeight(newHeight);
39959 }
39960 }
39961 this.updateDragStartPosition(e.clientX, e.clientY);
39962 if ((popup || forcePopupParentAsOffsetParent) && offsetLeft || offsetTop) {
39963 this.offsetElement(xPosition + offsetLeft, yPosition + offsetTop);
39964 }
39965 };
39966 PositionableFeature.prototype.onResizeEnd = function (e, side) {
39967 this.isResizing = false;
39968 this.currentResizer = null;
39969 this.boundaryEl = null;
39970 var params = {
39971 type: 'resize',
39972 api: this.gridOptionsWrapper.getApi(),
39973 columnApi: this.gridOptionsWrapper.getColumnApi()
39974 };
39975 this.element.classList.remove('ag-resizing');
39976 this.resizerMap[side].element.classList.remove('ag-active');
39977 this.dispatchEvent(params);
39978 };
39979 PositionableFeature.prototype.refreshSize = function () {
39980 var eGui = this.element;
39981 if (this.config.popup) {
39982 if (!this.config.width) {
39983 this.setWidth(eGui.offsetWidth);
39984 }
39985 if (!this.config.height) {
39986 this.setHeight(eGui.offsetHeight);
39987 }
39988 }
39989 };
39990 PositionableFeature.prototype.onMoveStart = function (e) {
39991 this.boundaryEl = this.findBoundaryElement();
39992 if (!this.positioned) {
39993 this.initialisePosition();
39994 }
39995 this.isMoving = true;
39996 this.element.classList.add('ag-moving');
39997 this.updateDragStartPosition(e.clientX, e.clientY);
39998 };
39999 PositionableFeature.prototype.onMove = function (e) {
40000 if (!this.isMoving) {
40001 return;
40002 }
40003 var _a = this.position, x = _a.x, y = _a.y;
40004 var topBuffer;
40005 if (this.config.calculateTopBuffer) {
40006 topBuffer = this.config.calculateTopBuffer();
40007 }
40008 var _b = this.calculateMouseMovement({
40009 e: e,
40010 isTop: true,
40011 anywhereWithin: true,
40012 topBuffer: topBuffer
40013 }), movementX = _b.movementX, movementY = _b.movementY;
40014 this.offsetElement(x + movementX, y + movementY);
40015 this.updateDragStartPosition(e.clientX, e.clientY);
40016 };
40017 PositionableFeature.prototype.onMoveEnd = function () {
40018 this.isMoving = false;
40019 this.boundaryEl = null;
40020 this.element.classList.remove('ag-moving');
40021 };
40022 PositionableFeature.prototype.setOffsetParent = function () {
40023 if (this.config.forcePopupParentAsOffsetParent) {
40024 this.offsetParent = this.popupService.getPopupParent();
40025 }
40026 else {
40027 this.offsetParent = this.element.offsetParent;
40028 }
40029 };
40030 PositionableFeature.prototype.findBoundaryElement = function () {
40031 var el = this.element;
40032 while (el) {
40033 if (window.getComputedStyle(el).position !== 'static') {
40034 return el;
40035 }
40036 el = el.parentElement;
40037 }
40038 return this.element;
40039 };
40040 PositionableFeature.prototype.clearResizeListeners = function () {
40041 while (this.resizeListeners.length) {
40042 var params = this.resizeListeners.pop();
40043 this.dragService.removeDragSource(params);
40044 }
40045 };
40046 PositionableFeature.prototype.destroy = function () {
40047 _super.prototype.destroy.call(this);
40048 if (this.moveElementDragListener) {
40049 this.dragService.removeDragSource(this.moveElementDragListener);
40050 }
40051 this.clearResizeListeners();
40052 this.removeResizers();
40053 };
40054 __decorate([
40055 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('popupService')
40056 ], PositionableFeature.prototype, "popupService", void 0);
40057 __decorate([
40058 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragService')
40059 ], PositionableFeature.prototype, "dragService", void 0);
40060 return PositionableFeature;
40061}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
40062
40063
40064
40065
40066
40067/***/ }),
40068/* 177 */
40069/***/ (function(module, __webpack_exports__, __webpack_require__) {
40070
40071"use strict";
40072__webpack_require__.r(__webpack_exports__);
40073/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutoWidthCalculator", function() { return AutoWidthCalculator; });
40074/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
40075/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
40076/**
40077 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
40078 * @version v27.3.0
40079 * @link https://www.ag-grid.com/
40080 * @license MIT
40081 */
40082var __extends = (undefined && undefined.__extends) || (function () {
40083 var extendStatics = function (d, b) {
40084 extendStatics = Object.setPrototypeOf ||
40085 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
40086 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
40087 return extendStatics(d, b);
40088 };
40089 return function (d, b) {
40090 extendStatics(d, b);
40091 function __() { this.constructor = d; }
40092 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
40093 };
40094})();
40095var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
40096 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
40097 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
40098 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
40099 return c > 3 && r && Object.defineProperty(target, key, r), r;
40100};
40101
40102
40103var AutoWidthCalculator = /** @class */ (function (_super) {
40104 __extends(AutoWidthCalculator, _super);
40105 function AutoWidthCalculator() {
40106 return _super !== null && _super.apply(this, arguments) || this;
40107 }
40108 AutoWidthCalculator.prototype.postConstruct = function () {
40109 var _this = this;
40110 this.ctrlsService.whenReady(function (p) {
40111 _this.centerRowContainerCtrl = p.centerRowContainerCtrl;
40112 });
40113 };
40114 // this is the trick: we create a dummy container and clone all the cells
40115 // into the dummy, then check the dummy's width. then destroy the dummy
40116 // as we don't need it any more.
40117 // drawback: only the cells visible on the screen are considered
40118 AutoWidthCalculator.prototype.getPreferredWidthForColumn = function (column, skipHeader) {
40119 var eHeaderCell = this.getHeaderCellForColumn(column);
40120 // cell isn't visible
40121 if (!eHeaderCell) {
40122 return -1;
40123 }
40124 var elements = this.rowRenderer.getAllCellsForColumn(column);
40125 if (!skipHeader) {
40126 // we only consider the lowest level cell, not the group cell. in 99% of the time, this
40127 // will be enough. if we consider groups, then it gets too complicated for what it's worth,
40128 // as the groups can span columns and this class only considers one column at a time.
40129 elements.push(eHeaderCell);
40130 }
40131 return this.addElementsToContainerAndGetWidth(elements);
40132 };
40133 AutoWidthCalculator.prototype.getPreferredWidthForColumnGroup = function (columnGroup) {
40134 var eHeaderCell = this.getHeaderCellForColumn(columnGroup);
40135 if (!eHeaderCell) {
40136 return -1;
40137 }
40138 return this.addElementsToContainerAndGetWidth([eHeaderCell]);
40139 };
40140 AutoWidthCalculator.prototype.addElementsToContainerAndGetWidth = function (elements) {
40141 var _this = this;
40142 var eDummyContainer = document.createElement('span');
40143 // position fixed, so it isn't restricted to the boundaries of the parent
40144 eDummyContainer.style.position = 'fixed';
40145 // we put the dummy into the body container, so it will inherit all the
40146 // css styles that the real cells are inheriting
40147 var eBodyContainer = this.centerRowContainerCtrl.getContainerElement();
40148 eBodyContainer.appendChild(eDummyContainer);
40149 elements.forEach(function (el) { return _this.cloneItemIntoDummy(el, eDummyContainer); });
40150 // at this point, all the clones are lined up vertically with natural widths. the dummy
40151 // container will have a width wide enough just to fit the largest.
40152 var dummyContainerWidth = eDummyContainer.offsetWidth;
40153 // we are finished with the dummy container, so get rid of it
40154 eBodyContainer.removeChild(eDummyContainer);
40155 // we add padding as I found sometimes the gui still put '...' after some of the texts. so the
40156 // user can configure the grid to add a few more pixels after the calculated width
40157 var autoSizePadding = this.gridOptionsWrapper.getAutoSizePadding();
40158 return dummyContainerWidth + autoSizePadding;
40159 };
40160 AutoWidthCalculator.prototype.getHeaderCellForColumn = function (column) {
40161 /* tslint:enable */
40162 var element = null;
40163 this.ctrlsService.getHeaderRowContainerCtrls().forEach(function (container) {
40164 var res = container.getHtmlElementForColumnHeader(column);
40165 if (res != null) {
40166 element = res;
40167 }
40168 });
40169 return element;
40170 };
40171 AutoWidthCalculator.prototype.cloneItemIntoDummy = function (eCell, eDummyContainer) {
40172 // make a deep clone of the cell
40173 var eCellClone = eCell.cloneNode(true);
40174 // the original has a fixed width, we remove this to allow the natural width based on content
40175 eCellClone.style.width = '';
40176 // the original has position = absolute, we need to remove this so it's positioned normally
40177 eCellClone.style.position = 'static';
40178 eCellClone.style.left = '';
40179 // we put the cell into a containing div, as otherwise the cells would just line up
40180 // on the same line, standard flow layout, by putting them into divs, they are laid
40181 // out one per line
40182 var eCloneParent = document.createElement('div');
40183 var eCloneParentClassList = eCloneParent.classList;
40184 var isHeader = ['ag-header-cell', 'ag-header-group-cell'].some(function (cls) { return eCellClone.classList.contains(cls); });
40185 if (isHeader) {
40186 eCloneParentClassList.add('ag-header', 'ag-header-row');
40187 eCloneParent.style.position = 'static';
40188 }
40189 else {
40190 eCloneParentClassList.add('ag-row');
40191 }
40192 // find parent using classes (headers have ag-header-cell, rows have ag-row), and copy classes from it.
40193 // if we didn't do this, things like ag-row-level-2 would be missing if present, which sets indents
40194 // onto group items.
40195 var pointer = eCell.parentElement;
40196 while (pointer) {
40197 var isRow = ['ag-header-row', 'ag-row'].some(function (cls) { return pointer.classList.contains(cls); });
40198 if (isRow) {
40199 for (var i = 0; i < pointer.classList.length; i++) {
40200 var item = pointer.classList[i];
40201 // we skip ag-row-position-absolute, as this has structural CSS applied that stops the
40202 // element from fitting into it's parent, and we need the element to stretch the parent
40203 // as we are measuring the parents width
40204 if (item != 'ag-row-position-absolute') {
40205 eCloneParentClassList.add(item);
40206 }
40207 }
40208 break;
40209 }
40210 pointer = pointer.parentElement;
40211 }
40212 // the twig on the branch, the branch on the tree, the tree in the hole,
40213 // the hole in the bog, the bog in the clone, the clone in the parent,
40214 // the parent in the dummy, and the dummy down in the vall-e-ooo, OOOOOOOOO! Oh row the rattling bog....
40215 eCloneParent.appendChild(eCellClone);
40216 eDummyContainer.appendChild(eCloneParent);
40217 };
40218 __decorate([
40219 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
40220 ], AutoWidthCalculator.prototype, "rowRenderer", void 0);
40221 __decorate([
40222 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
40223 ], AutoWidthCalculator.prototype, "ctrlsService", void 0);
40224 __decorate([
40225 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowCssClassCalculator')
40226 ], AutoWidthCalculator.prototype, "rowCssClassCalculator", void 0);
40227 __decorate([
40228 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
40229 ], AutoWidthCalculator.prototype, "postConstruct", null);
40230 AutoWidthCalculator = __decorate([
40231 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('autoWidthCalculator')
40232 ], AutoWidthCalculator);
40233 return AutoWidthCalculator;
40234}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
40235
40236
40237
40238
40239
40240/***/ }),
40241/* 178 */
40242/***/ (function(module, __webpack_exports__, __webpack_require__) {
40243
40244"use strict";
40245__webpack_require__.r(__webpack_exports__);
40246/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowRenderer", function() { return RowRenderer; });
40247/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(112);
40248/* harmony import */ var _row_rowCtrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(120);
40249/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
40250/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
40251/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15);
40252/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12);
40253/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20);
40254/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
40255/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(13);
40256/* harmony import */ var _utils_number__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46);
40257/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14);
40258/* harmony import */ var _cell_cellCtrl__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(121);
40259/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(18);
40260/**
40261 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
40262 * @version v27.3.0
40263 * @link https://www.ag-grid.com/
40264 * @license MIT
40265 */
40266var __extends = (undefined && undefined.__extends) || (function () {
40267 var extendStatics = function (d, b) {
40268 extendStatics = Object.setPrototypeOf ||
40269 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
40270 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
40271 return extendStatics(d, b);
40272 };
40273 return function (d, b) {
40274 extendStatics(d, b);
40275 function __() { this.constructor = d; }
40276 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
40277 };
40278})();
40279var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
40280 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
40281 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
40282 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
40283 return c > 3 && r && Object.defineProperty(target, key, r), r;
40284};
40285var __read = (undefined && undefined.__read) || function (o, n) {
40286 var m = typeof Symbol === "function" && o[Symbol.iterator];
40287 if (!m) return o;
40288 var i = m.call(o), r, ar = [], e;
40289 try {
40290 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
40291 }
40292 catch (error) { e = { error: error }; }
40293 finally {
40294 try {
40295 if (r && !r.done && (m = i["return"])) m.call(i);
40296 }
40297 finally { if (e) throw e.error; }
40298 }
40299 return ar;
40300};
40301var __spread = (undefined && undefined.__spread) || function () {
40302 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
40303 return ar;
40304};
40305
40306
40307
40308
40309
40310
40311
40312
40313
40314
40315
40316
40317
40318var RowRenderer = /** @class */ (function (_super) {
40319 __extends(RowRenderer, _super);
40320 function RowRenderer() {
40321 var _this = _super !== null && _super.apply(this, arguments) || this;
40322 _this.destroyFuncsForColumnListeners = [];
40323 // map of row ids to row objects. keeps track of which elements
40324 // are rendered for which rows in the dom.
40325 _this.rowCtrlsByRowIndex = {};
40326 _this.zombieRowCtrls = {};
40327 _this.allRowCtrls = [];
40328 _this.topRowCtrls = [];
40329 _this.bottomRowCtrls = [];
40330 // we only allow one refresh at a time, otherwise the internal memory structure here
40331 // will get messed up. this can happen if the user has a cellRenderer, and inside the
40332 // renderer they call an API method that results in another pass of the refresh,
40333 // then it will be trying to draw rows in the middle of a refresh.
40334 _this.refreshInProgress = false;
40335 return _this;
40336 }
40337 RowRenderer.prototype.postConstruct = function () {
40338 var _this = this;
40339 this.ctrlsService.whenReady(function () {
40340 _this.gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();
40341 _this.initialise();
40342 });
40343 };
40344 RowRenderer.prototype.initialise = function () {
40345 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_PAGINATION_CHANGED, this.onPageLoaded.bind(this));
40346 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_PINNED_ROW_DATA_CHANGED, this.onPinnedRowDataChanged.bind(this));
40347 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));
40348 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_BODY_SCROLL, this.redrawAfterScroll.bind(this));
40349 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_BODY_HEIGHT_CHANGED, this.redrawAfterScroll.bind(this));
40350 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_0__["GridOptionsWrapper"].PROP_DOM_LAYOUT, this.onDomLayoutChanged.bind(this));
40351 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_0__["GridOptionsWrapper"].PROP_ROW_CLASS, this.redrawRows.bind(this));
40352 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));
40353 this.registerCellEventListeners();
40354 this.initialiseCache();
40355 this.printLayout = this.gridOptionsWrapper.getDomLayout() === _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].DOM_LAYOUT_PRINT;
40356 this.embedFullWidthRows = this.printLayout || this.gridOptionsWrapper.isEmbedFullWidthRows();
40357 this.redrawAfterModelUpdate();
40358 };
40359 RowRenderer.prototype.initialiseCache = function () {
40360 if (this.gridOptionsWrapper.isKeepDetailRows()) {
40361 var countProp = this.gridOptionsWrapper.getKeepDetailRowsCount();
40362 var count = countProp != null ? countProp : 3;
40363 this.cachedRowCtrls = new RowCtrlCache(count);
40364 }
40365 };
40366 RowRenderer.prototype.getRowCtrls = function () {
40367 return this.allRowCtrls;
40368 };
40369 RowRenderer.prototype.updateAllRowCtrls = function () {
40370 var liveList = Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["getAllValuesInObject"])(this.rowCtrlsByRowIndex);
40371 if (this.gridOptionsWrapper.isEnsureDomOrder()) {
40372 liveList.sort(function (a, b) { return a.getRowNode().rowIndex - b.getRowNode.rowIndex; });
40373 }
40374 var zombieList = Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["getAllValuesInObject"])(this.zombieRowCtrls);
40375 var cachedList = this.cachedRowCtrls ? this.cachedRowCtrls.getEntries() : [];
40376 this.allRowCtrls = __spread(liveList, zombieList, cachedList);
40377 };
40378 // in a clean design, each cell would register for each of these events. however when scrolling, all the cells
40379 // registering and de-registering for events is a performance bottleneck. so we register here once and inform
40380 // all active cells.
40381 RowRenderer.prototype.registerCellEventListeners = function () {
40382 var _this = this;
40383 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_CELL_FOCUSED, function (event) {
40384 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onCellFocused(event); });
40385 _this.getFullWidthRowCtrls().forEach(function (rowCtrl) {
40386 rowCtrl.onFullWidthRowFocused(event);
40387 });
40388 });
40389 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_FLASH_CELLS, function (event) {
40390 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onFlashCells(event); });
40391 });
40392 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_COLUMN_HOVER_CHANGED, function () {
40393 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onColumnHover(); });
40394 });
40395 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, function () {
40396 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onDisplayedColumnsChanged(); });
40397 });
40398 // only for printLayout - because we are rendering all the cells in the same row, regardless of pinned state,
40399 // then changing the width of the containers will impact left position. eg the center cols all have their
40400 // left position adjusted by the width of the left pinned column, so if the pinned left column width changes,
40401 // all the center cols need to be shifted to accommodate this. when in normal layout, the pinned cols are
40402 // in different containers so doesn't impact.
40403 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, function () {
40404 if (_this.printLayout) {
40405 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onLeftChanged(); });
40406 }
40407 });
40408 var rangeSelectionEnabled = this.gridOptionsWrapper.isEnableRangeSelection();
40409 if (rangeSelectionEnabled) {
40410 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_RANGE_SELECTION_CHANGED, function () {
40411 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onRangeSelectionChanged(); });
40412 });
40413 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_COLUMN_MOVED, function () {
40414 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });
40415 });
40416 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_COLUMN_PINNED, function () {
40417 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });
40418 });
40419 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_COLUMN_VISIBLE, function () {
40420 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });
40421 });
40422 }
40423 // add listeners to the grid columns
40424 this.refreshListenersToColumnsForCellComps();
40425 // if the grid columns change, then refresh the listeners again
40426 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_GRID_COLUMNS_CHANGED, this.refreshListenersToColumnsForCellComps.bind(this));
40427 this.addDestroyFunc(this.removeGridColumnListeners.bind(this));
40428 };
40429 // executes all functions in destroyFuncsForColumnListeners and then clears the list
40430 RowRenderer.prototype.removeGridColumnListeners = function () {
40431 this.destroyFuncsForColumnListeners.forEach(function (func) { return func(); });
40432 this.destroyFuncsForColumnListeners.length = 0;
40433 };
40434 // this function adds listeners onto all the grid columns, which are the column that we could have cellComps for.
40435 // when the grid columns change, we add listeners again. in an ideal design, each CellComp would just register to
40436 // the column it belongs to on creation, however this was a bottleneck with the number of cells, so do it here
40437 // once instead.
40438 RowRenderer.prototype.refreshListenersToColumnsForCellComps = function () {
40439 var _this = this;
40440 this.removeGridColumnListeners();
40441 var cols = this.columnModel.getAllGridColumns();
40442 if (!cols) {
40443 return;
40444 }
40445 cols.forEach(function (col) {
40446 var forEachCellWithThisCol = function (callback) {
40447 _this.getAllCellCtrls().forEach(function (cellCtrl) {
40448 if (cellCtrl.getColumn() === col) {
40449 callback(cellCtrl);
40450 }
40451 });
40452 };
40453 var leftChangedListener = function () {
40454 forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onLeftChanged(); });
40455 };
40456 var widthChangedListener = function () {
40457 forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onWidthChanged(); });
40458 };
40459 var firstRightPinnedChangedListener = function () {
40460 forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onFirstRightPinnedChanged(); });
40461 };
40462 var lastLeftPinnedChangedListener = function () {
40463 forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onLastLeftPinnedChanged(); });
40464 };
40465 col.addEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_LEFT_CHANGED, leftChangedListener);
40466 col.addEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_WIDTH_CHANGED, widthChangedListener);
40467 col.addEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_FIRST_RIGHT_PINNED_CHANGED, firstRightPinnedChangedListener);
40468 col.addEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_LAST_LEFT_PINNED_CHANGED, lastLeftPinnedChangedListener);
40469 _this.destroyFuncsForColumnListeners.push(function () {
40470 col.removeEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_LEFT_CHANGED, leftChangedListener);
40471 col.removeEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_WIDTH_CHANGED, widthChangedListener);
40472 col.removeEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_FIRST_RIGHT_PINNED_CHANGED, firstRightPinnedChangedListener);
40473 col.removeEventListener(_entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"].EVENT_LAST_LEFT_PINNED_CHANGED, lastLeftPinnedChangedListener);
40474 });
40475 });
40476 };
40477 RowRenderer.prototype.onDomLayoutChanged = function () {
40478 var printLayout = this.gridOptionsWrapper.getDomLayout() === _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].DOM_LAYOUT_PRINT;
40479 var embedFullWidthRows = printLayout || this.gridOptionsWrapper.isEmbedFullWidthRows();
40480 // if moving towards or away from print layout, means we need to destroy all rows, as rows are not laid
40481 // out using absolute positioning when doing print layout
40482 var destroyRows = embedFullWidthRows !== this.embedFullWidthRows || this.printLayout !== printLayout;
40483 this.printLayout = printLayout;
40484 this.embedFullWidthRows = embedFullWidthRows;
40485 if (destroyRows) {
40486 this.redrawAfterModelUpdate();
40487 }
40488 };
40489 // for row models that have datasources, when we update the datasource, we need to force the rowRenderer
40490 // to redraw all rows. otherwise the old rows from the old datasource will stay displayed.
40491 RowRenderer.prototype.datasourceChanged = function () {
40492 this.firstRenderedRow = 0;
40493 this.lastRenderedRow = -1;
40494 var rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);
40495 this.removeRowCtrls(rowIndexesToRemove);
40496 };
40497 RowRenderer.prototype.onPageLoaded = function (event) {
40498 var params = {
40499 recycleRows: event.keepRenderedRows,
40500 animate: event.animate,
40501 newData: event.newData,
40502 newPage: event.newPage,
40503 // because this is a model updated event (not pinned rows), we
40504 // can skip updating the pinned rows. this is needed so that if user
40505 // is doing transaction updates, the pinned rows are not getting constantly
40506 // trashed - or editing cells in pinned rows are not refreshed and put into read mode
40507 onlyBody: true
40508 };
40509 this.redrawAfterModelUpdate(params);
40510 };
40511 RowRenderer.prototype.getAllCellsForColumn = function (column) {
40512 var res = [];
40513 this.getAllRowCtrls().forEach(function (rowCtrl) {
40514 var eCell = rowCtrl.getCellElement(column);
40515 if (eCell) {
40516 res.push(eCell);
40517 }
40518 });
40519 return res;
40520 };
40521 RowRenderer.prototype.refreshFloatingRowComps = function () {
40522 this.refreshFloatingRows(this.topRowCtrls, this.pinnedRowModel.getPinnedTopRowData());
40523 this.refreshFloatingRows(this.bottomRowCtrls, this.pinnedRowModel.getPinnedBottomRowData());
40524 };
40525 RowRenderer.prototype.getTopRowCtrls = function () {
40526 return this.topRowCtrls;
40527 };
40528 RowRenderer.prototype.getBottomRowCtrls = function () {
40529 return this.bottomRowCtrls;
40530 };
40531 RowRenderer.prototype.refreshFloatingRows = function (rowComps, rowNodes) {
40532 var _this = this;
40533 rowComps.forEach(function (row) {
40534 row.destroyFirstPass();
40535 row.destroySecondPass();
40536 });
40537 rowComps.length = 0;
40538 if (!rowNodes) {
40539 return;
40540 }
40541 rowNodes.forEach(function (rowNode) {
40542 var rowCtrl = new _row_rowCtrl__WEBPACK_IMPORTED_MODULE_1__["RowCtrl"](rowNode, _this.beans, false, false, _this.printLayout);
40543 rowComps.push(rowCtrl);
40544 });
40545 };
40546 RowRenderer.prototype.onPinnedRowDataChanged = function () {
40547 // recycling rows in order to ensure cell editing is not cancelled
40548 var params = {
40549 recycleRows: true
40550 };
40551 this.redrawAfterModelUpdate(params);
40552 };
40553 // if the row nodes are not rendered, no index is returned
40554 RowRenderer.prototype.getRenderedIndexesForRowNodes = function (rowNodes) {
40555 var result = [];
40556 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["missing"])(rowNodes)) {
40557 return result;
40558 }
40559 Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["iterateObject"])(this.rowCtrlsByRowIndex, function (index, renderedRow) {
40560 var rowNode = renderedRow.getRowNode();
40561 if (rowNodes.indexOf(rowNode) >= 0) {
40562 result.push(index);
40563 }
40564 });
40565 return result;
40566 };
40567 RowRenderer.prototype.redrawRows = function (rowNodes) {
40568 // if no row nodes provided, then refresh everything
40569 var partialRefresh = rowNodes != null && rowNodes.length > 0;
40570 if (partialRefresh) {
40571 var indexesToRemove = this.getRenderedIndexesForRowNodes(rowNodes);
40572 // remove the rows
40573 this.removeRowCtrls(indexesToRemove);
40574 }
40575 // add draw them again
40576 this.redrawAfterModelUpdate({
40577 recycleRows: partialRefresh
40578 });
40579 };
40580 RowRenderer.prototype.getCellToRestoreFocusToAfterRefresh = function (params) {
40581 var focusedCell = params.suppressKeepFocus ? null : this.focusService.getFocusCellToUseAfterRefresh();
40582 if (focusedCell == null) {
40583 return null;
40584 }
40585 // if the dom is not actually focused on a cell, then we don't try to refocus. the problem this
40586 // solves is with editing - if the user is editing, eg focus is on a text field, and not on the
40587 // cell itself, then the cell can be registered as having focus, however it's the text field that
40588 // has the focus and not the cell div. therefore, when the refresh is finished, the grid will focus
40589 // the cell, and not the textfield. that means if the user is in a text field, and the grid refreshes,
40590 // the focus is lost from the text field. we do not want this.
40591 var eDocument = this.gridOptionsWrapper.getDocument();
40592 var activeElement = eDocument.activeElement;
40593 var cellDomData = this.gridOptionsWrapper.getDomData(activeElement, _cell_cellCtrl__WEBPACK_IMPORTED_MODULE_11__["CellCtrl"].DOM_DATA_KEY_CELL_CTRL);
40594 var rowDomData = this.gridOptionsWrapper.getDomData(activeElement, _row_rowCtrl__WEBPACK_IMPORTED_MODULE_1__["RowCtrl"].DOM_DATA_KEY_ROW_CTRL);
40595 var gridElementFocused = cellDomData || rowDomData;
40596 return gridElementFocused ? focusedCell : null;
40597 };
40598 // gets called from:
40599 // +) initialisation (in registerGridComp) params = null
40600 // +) onDomLayoutChanged, params = null
40601 // +) onPageLoaded, recycleRows, animate, newData, newPage from event, onlyBody=true
40602 // +) onPinnedRowDataChanged, recycleRows = true
40603 // +) redrawRows (from Grid API), recycleRows = true/false
40604 RowRenderer.prototype.redrawAfterModelUpdate = function (params) {
40605 if (params === void 0) { params = {}; }
40606 this.getLockOnRefresh();
40607 var focusedCell = this.getCellToRestoreFocusToAfterRefresh(params);
40608 this.updateContainerHeights();
40609 this.scrollToTopIfNewData(params);
40610 // never recycle rows when print layout, we draw each row again from scratch. this is because print layout
40611 // uses normal dom layout to put cells into dom - it doesn't allow reordering rows.
40612 var recycleRows = !this.printLayout && !!params.recycleRows;
40613 var animate = params.animate && this.gridOptionsWrapper.isAnimateRows();
40614 // after modelUpdate, row indexes can change, so we clear out the rowsByIndex map,
40615 // however we can reuse the rows, so we keep them but index by rowNode.id
40616 var rowsToRecycle = recycleRows ? this.recycleRows() : null;
40617 if (!recycleRows) {
40618 this.removeAllRowComps();
40619 }
40620 var isFocusedCellGettingRecycled = function () {
40621 if (focusedCell == null || rowsToRecycle == null) {
40622 return false;
40623 }
40624 var res = false;
40625 Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["iterateObject"])(rowsToRecycle, function (key, rowComp) {
40626 var rowNode = rowComp.getRowNode();
40627 var rowIndexEqual = rowNode.rowIndex == focusedCell.rowIndex;
40628 var pinnedEqual = rowNode.rowPinned == focusedCell.rowPinned;
40629 if (rowIndexEqual && pinnedEqual) {
40630 res = true;
40631 }
40632 });
40633 return res;
40634 };
40635 var focusedCellRecycled = isFocusedCellGettingRecycled();
40636 this.redraw(rowsToRecycle, animate);
40637 if (!params.onlyBody) {
40638 this.refreshFloatingRowComps();
40639 }
40640 this.dispatchDisplayedRowsChanged();
40641 // if we focus a cell that's already focused, then we get an unnecessary 'cellFocused' event fired.
40642 // this was happening when user clicked 'expand' on a rowGroup, then cellFocused was getting fired twice.
40643 if (!focusedCellRecycled) {
40644 this.restoreFocusedCell(focusedCell);
40645 }
40646 this.releaseLockOnRefresh();
40647 };
40648 RowRenderer.prototype.scrollToTopIfNewData = function (params) {
40649 var scrollToTop = params.newData || params.newPage;
40650 var suppressScrollToTop = this.gridOptionsWrapper.isSuppressScrollOnNewData();
40651 if (scrollToTop && !suppressScrollToTop) {
40652 this.gridBodyCtrl.getScrollFeature().scrollToTop();
40653 }
40654 };
40655 RowRenderer.prototype.updateContainerHeights = function () {
40656 // when doing print layout, we don't explicitly set height on the containers
40657 if (this.printLayout) {
40658 this.rowContainerHeightService.setModelHeight(null);
40659 return;
40660 }
40661 var containerHeight = this.paginationProxy.getCurrentPageHeight();
40662 // we need at least 1 pixel for the horizontal scroll to work. so if there are now rows,
40663 // we still want the scroll to be present, otherwise there would be no way to scroll the header
40664 // which might be needed us user wants to access columns
40665 // on the RHS - and if that was where the filter was that cause no rows to be presented, there
40666 // is no way to remove the filter.
40667 if (containerHeight === 0) {
40668 containerHeight = 1;
40669 }
40670 this.rowContainerHeightService.setModelHeight(containerHeight);
40671 };
40672 RowRenderer.prototype.getLockOnRefresh = function () {
40673 if (this.refreshInProgress) {
40674 throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. " +
40675 "Your code probably called a grid API method while the grid was in the render stage. To overcome " +
40676 "this, put the API call into a timeout, e.g. instead of api.redrawRows(), " +
40677 "call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code " +
40678 "that caused the refresh check this stacktrace.");
40679 }
40680 this.refreshInProgress = true;
40681 };
40682 RowRenderer.prototype.releaseLockOnRefresh = function () {
40683 this.refreshInProgress = false;
40684 };
40685 RowRenderer.prototype.isRefreshInProgress = function () {
40686 return this.refreshInProgress;
40687 };
40688 // sets the focus to the provided cell, if the cell is provided. this way, the user can call refresh without
40689 // worry about the focus been lost. this is important when the user is using keyboard navigation to do edits
40690 // and the cellEditor is calling 'refresh' to get other cells to update (as other cells might depend on the
40691 // edited cell).
40692 RowRenderer.prototype.restoreFocusedCell = function (cellPosition) {
40693 if (cellPosition) {
40694 this.focusService.setFocusedCell(cellPosition.rowIndex, cellPosition.column, cellPosition.rowPinned, true);
40695 }
40696 };
40697 RowRenderer.prototype.stopEditing = function (cancel) {
40698 if (cancel === void 0) { cancel = false; }
40699 this.getAllRowCtrls().forEach(function (rowCtrl) {
40700 rowCtrl.stopEditing(cancel);
40701 });
40702 };
40703 RowRenderer.prototype.onNewColumnsLoaded = function () {
40704 // we don't want each cellComp to register for events, as would increase rendering time.
40705 // so for newColumnsLoaded, we register once here (in rowRenderer) and then inform
40706 // each cell if / when event was fired.
40707 this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onNewColumnsLoaded(); });
40708 };
40709 RowRenderer.prototype.getAllCellCtrls = function () {
40710 var res = [];
40711 this.getAllRowCtrls().forEach(function (rowCtrl) { return res = res.concat(rowCtrl.getAllCellCtrls()); });
40712 return res;
40713 };
40714 RowRenderer.prototype.getAllRowCtrls = function () {
40715 var _this = this;
40716 var res = __spread(this.topRowCtrls, this.bottomRowCtrls);
40717 Object.keys(this.rowCtrlsByRowIndex).forEach(function (key) { return res.push(_this.rowCtrlsByRowIndex[key]); });
40718 return res;
40719 };
40720 RowRenderer.prototype.addRenderedRowListener = function (eventName, rowIndex, callback) {
40721 var rowComp = this.rowCtrlsByRowIndex[rowIndex];
40722 if (rowComp) {
40723 rowComp.addEventListener(eventName, callback);
40724 }
40725 };
40726 RowRenderer.prototype.flashCells = function (params) {
40727 if (params === void 0) { params = {}; }
40728 var flashDelay = params.flashDelay, fadeDelay = params.fadeDelay;
40729 this.getCellCtrls(params.rowNodes, params.columns)
40730 .forEach(function (cellCtrl) { return cellCtrl.flashCell({ flashDelay: flashDelay, fadeDelay: fadeDelay }); });
40731 };
40732 RowRenderer.prototype.refreshCells = function (params) {
40733 if (params === void 0) { params = {}; }
40734 var refreshCellParams = {
40735 forceRefresh: params.force,
40736 newData: false,
40737 suppressFlash: params.suppressFlash
40738 };
40739 this.getCellCtrls(params.rowNodes, params.columns)
40740 .forEach(function (cellCtrl) {
40741 if (cellCtrl.refreshShouldDestroy()) {
40742 var rowCtrl = cellCtrl.getRowCtrl();
40743 if (rowCtrl) {
40744 rowCtrl.refreshCell(cellCtrl);
40745 }
40746 }
40747 else {
40748 cellCtrl.refreshCell(refreshCellParams);
40749 }
40750 });
40751 this.getFullWidthRowCtrls(params.rowNodes).forEach(function (fullWidthRowCtrl) {
40752 fullWidthRowCtrl.refreshFullWidth();
40753 });
40754 };
40755 RowRenderer.prototype.getCellRendererInstances = function (params) {
40756 var res = this.getCellCtrls(params.rowNodes, params.columns)
40757 .map(function (cellCtrl) { return cellCtrl.getCellRenderer(); })
40758 .filter(function (renderer) { return renderer != null; });
40759 return res;
40760 };
40761 RowRenderer.prototype.getCellEditorInstances = function (params) {
40762 var res = [];
40763 this.getCellCtrls(params.rowNodes, params.columns).forEach(function (cellCtrl) {
40764 var cellEditor = cellCtrl.getCellEditor();
40765 if (cellEditor) {
40766 res.push(cellEditor);
40767 }
40768 });
40769 return res;
40770 };
40771 RowRenderer.prototype.getEditingCells = function () {
40772 var res = [];
40773 this.getAllCellCtrls().forEach(function (cellCtrl) {
40774 if (cellCtrl.isEditing()) {
40775 var cellPosition = cellCtrl.getCellPosition();
40776 res.push(cellPosition);
40777 }
40778 });
40779 return res;
40780 };
40781 RowRenderer.prototype.mapRowNodes = function (rowNodes) {
40782 if (!rowNodes) {
40783 return;
40784 }
40785 var res = {
40786 top: {},
40787 bottom: {},
40788 normal: {}
40789 };
40790 rowNodes.forEach(function (rowNode) {
40791 var id = rowNode.id;
40792 if (rowNode.rowPinned === _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].PINNED_TOP) {
40793 res.top[id] = rowNode;
40794 }
40795 else if (rowNode.rowPinned === _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].PINNED_BOTTOM) {
40796 res.bottom[id] = rowNode;
40797 }
40798 else {
40799 res.normal[id] = rowNode;
40800 }
40801 });
40802 return res;
40803 };
40804 RowRenderer.prototype.isRowInMap = function (rowNode, rowIdsMap) {
40805 // skip this row if it is missing from the provided list
40806 var id = rowNode.id;
40807 var floating = rowNode.rowPinned;
40808 if (floating === _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].PINNED_BOTTOM) {
40809 return rowIdsMap.bottom[id] != null;
40810 }
40811 else if (floating === _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].PINNED_TOP) {
40812 return rowIdsMap.top[id] != null;
40813 }
40814 else {
40815 return rowIdsMap.normal[id] != null;
40816 }
40817 };
40818 // returns CellCtrl's that match the provided rowNodes and columns. eg if one row node
40819 // and two columns provided, that identifies 4 cells, so 4 CellCtrl's returned.
40820 RowRenderer.prototype.getCellCtrls = function (rowNodes, columns) {
40821 var _this = this;
40822 var rowIdsMap = this.mapRowNodes(rowNodes);
40823 var res = [];
40824 var colIdsMap;
40825 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(columns)) {
40826 colIdsMap = {};
40827 columns.forEach(function (colKey) {
40828 var column = _this.columnModel.getGridColumn(colKey);
40829 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(column)) {
40830 colIdsMap[column.getId()] = true;
40831 }
40832 });
40833 }
40834 var processRow = function (rowComp) {
40835 var rowNode = rowComp.getRowNode();
40836 // skip this row if it is missing from the provided list
40837 if (rowIdsMap != null && !_this.isRowInMap(rowNode, rowIdsMap)) {
40838 return;
40839 }
40840 rowComp.getAllCellCtrls().forEach(function (cellCtrl) {
40841 var colId = cellCtrl.getColumn().getId();
40842 var excludeColFromRefresh = colIdsMap && !colIdsMap[colId];
40843 if (excludeColFromRefresh) {
40844 return;
40845 }
40846 res.push(cellCtrl);
40847 });
40848 };
40849 Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["iterateObject"])(this.rowCtrlsByRowIndex, function (index, rowComp) {
40850 processRow(rowComp);
40851 });
40852 if (this.topRowCtrls) {
40853 this.topRowCtrls.forEach(processRow);
40854 }
40855 if (this.bottomRowCtrls) {
40856 this.bottomRowCtrls.forEach(processRow);
40857 }
40858 return res;
40859 };
40860 RowRenderer.prototype.destroy = function () {
40861 this.removeAllRowComps();
40862 _super.prototype.destroy.call(this);
40863 };
40864 RowRenderer.prototype.removeAllRowComps = function () {
40865 var rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);
40866 this.removeRowCtrls(rowIndexesToRemove);
40867 };
40868 RowRenderer.prototype.recycleRows = function () {
40869 // remove all stub nodes, they can't be reused, as no rowNode id
40870 var stubNodeIndexes = [];
40871 Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["iterateObject"])(this.rowCtrlsByRowIndex, function (index, rowComp) {
40872 var stubNode = rowComp.getRowNode().id == null;
40873 if (stubNode) {
40874 stubNodeIndexes.push(index);
40875 }
40876 });
40877 this.removeRowCtrls(stubNodeIndexes);
40878 // then clear out rowCompsByIndex, but before that take a copy, but index by id, not rowIndex
40879 var nodesByIdMap = {};
40880 Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["iterateObject"])(this.rowCtrlsByRowIndex, function (index, rowComp) {
40881 var rowNode = rowComp.getRowNode();
40882 nodesByIdMap[rowNode.id] = rowComp;
40883 });
40884 this.rowCtrlsByRowIndex = {};
40885 return nodesByIdMap;
40886 };
40887 // takes array of row indexes
40888 RowRenderer.prototype.removeRowCtrls = function (rowsToRemove) {
40889 var _this = this;
40890 // if no fromIndex then set to -1, which will refresh everything
40891 // let realFromIndex = -1;
40892 rowsToRemove.forEach(function (indexToRemove) {
40893 var rowCtrl = _this.rowCtrlsByRowIndex[indexToRemove];
40894 if (rowCtrl) {
40895 rowCtrl.destroyFirstPass();
40896 rowCtrl.destroySecondPass();
40897 }
40898 delete _this.rowCtrlsByRowIndex[indexToRemove];
40899 });
40900 };
40901 // gets called when rows don't change, but viewport does, so after:
40902 // 1) height of grid body changes, ie number of displayed rows has changed
40903 // 2) grid scrolled to new position
40904 // 3) ensure index visible (which is a scroll)
40905 RowRenderer.prototype.redrawAfterScroll = function () {
40906 this.getLockOnRefresh();
40907 this.redraw(null, false, true);
40908 this.releaseLockOnRefresh();
40909 this.dispatchDisplayedRowsChanged();
40910 };
40911 RowRenderer.prototype.removeRowCompsNotToDraw = function (indexesToDraw) {
40912 // for speedy lookup, dump into map
40913 var indexesToDrawMap = {};
40914 indexesToDraw.forEach(function (index) { return (indexesToDrawMap[index] = true); });
40915 var existingIndexes = Object.keys(this.rowCtrlsByRowIndex);
40916 var indexesNotToDraw = existingIndexes.filter(function (index) { return !indexesToDrawMap[index]; });
40917 this.removeRowCtrls(indexesNotToDraw);
40918 };
40919 RowRenderer.prototype.calculateIndexesToDraw = function (rowsToRecycle) {
40920 var _this = this;
40921 // all in all indexes in the viewport
40922 var indexesToDraw = Object(_utils_number__WEBPACK_IMPORTED_MODULE_9__["createArrayOfNumbers"])(this.firstRenderedRow, this.lastRenderedRow);
40923 var checkRowToDraw = function (indexStr, rowComp) {
40924 var index = rowComp.getRowNode().rowIndex;
40925 if (index == null) {
40926 return;
40927 }
40928 if (index < _this.firstRenderedRow || index > _this.lastRenderedRow) {
40929 if (_this.doNotUnVirtualiseRow(rowComp)) {
40930 indexesToDraw.push(index);
40931 }
40932 }
40933 };
40934 // if we are redrawing due to scrolling change, then old rows are in this.rowCompsByIndex
40935 Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["iterateObject"])(this.rowCtrlsByRowIndex, checkRowToDraw);
40936 // if we are redrawing due to model update, then old rows are in rowsToRecycle
40937 Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["iterateObject"])(rowsToRecycle, checkRowToDraw);
40938 indexesToDraw.sort(function (a, b) { return a - b; });
40939 return indexesToDraw;
40940 };
40941 RowRenderer.prototype.redraw = function (rowsToRecycle, animate, afterScroll) {
40942 var _this = this;
40943 if (animate === void 0) { animate = false; }
40944 if (afterScroll === void 0) { afterScroll = false; }
40945 this.rowContainerHeightService.updateOffset();
40946 this.workOutFirstAndLastRowsToRender();
40947 // the row can already exist and be in the following:
40948 // rowsToRecycle -> if model change, then the index may be different, however row may
40949 // exist here from previous time (mapped by id).
40950 // this.rowCompsByIndex -> if just a scroll, then this will contain what is currently in the viewport
40951 // this is all the indexes we want, including those that already exist, so this method
40952 // will end up going through each index and drawing only if the row doesn't already exist
40953 var indexesToDraw = this.calculateIndexesToDraw(rowsToRecycle);
40954 this.removeRowCompsNotToDraw(indexesToDraw);
40955 // never animate when doing print layout - as we want to get things ready to print as quickly as possible,
40956 // otherwise we risk the printer printing a row that's half faded (half way through fading in)
40957 if (this.printLayout) {
40958 animate = false;
40959 }
40960 // add in new rows
40961 var rowCtrls = [];
40962 indexesToDraw.forEach(function (rowIndex) {
40963 var rowCtrl = _this.createOrUpdateRowCtrl(rowIndex, rowsToRecycle, animate, afterScroll);
40964 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(rowCtrl)) {
40965 rowCtrls.push(rowCtrl);
40966 }
40967 });
40968 if (rowsToRecycle) {
40969 var useAnimationFrame = afterScroll && !this.gridOptionsWrapper.isSuppressAnimationFrame() && !this.printLayout;
40970 if (useAnimationFrame) {
40971 this.beans.animationFrameService.addDestroyTask(function () {
40972 _this.destroyRowCtrls(rowsToRecycle, animate);
40973 _this.updateAllRowCtrls();
40974 _this.dispatchDisplayedRowsChanged();
40975 });
40976 }
40977 else {
40978 this.destroyRowCtrls(rowsToRecycle, animate);
40979 }
40980 }
40981 this.updateAllRowCtrls();
40982 this.gridBodyCtrl.updateRowCount();
40983 };
40984 RowRenderer.prototype.dispatchDisplayedRowsChanged = function () {
40985 var event = { type: _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_ROWS_CHANGED };
40986 this.eventService.dispatchEvent(event);
40987 };
40988 RowRenderer.prototype.onDisplayedColumnsChanged = function () {
40989 var pinningLeft = this.columnModel.isPinningLeft();
40990 var pinningRight = this.columnModel.isPinningRight();
40991 var atLeastOneChanged = this.pinningLeft !== pinningLeft || pinningRight !== this.pinningRight;
40992 if (atLeastOneChanged) {
40993 this.pinningLeft = pinningLeft;
40994 this.pinningRight = pinningRight;
40995 if (this.embedFullWidthRows) {
40996 this.redrawFullWidthEmbeddedRows();
40997 }
40998 }
40999 };
41000 // when embedding, what gets showed in each section depends on what is pinned. eg if embedding group expand / collapse,
41001 // then it should go into the pinned left area if pinning left, or the center area if not pinning.
41002 RowRenderer.prototype.redrawFullWidthEmbeddedRows = function () {
41003 // if either of the pinned panels has shown / hidden, then need to redraw the fullWidth bits when
41004 // embedded, as what appears in each section depends on whether we are pinned or not
41005 var rowsToRemove = [];
41006 this.getFullWidthRowCtrls().forEach(function (fullWidthCtrl) {
41007 var rowIndex = fullWidthCtrl.getRowNode().rowIndex;
41008 rowsToRemove.push(rowIndex.toString());
41009 });
41010 this.refreshFloatingRowComps();
41011 this.removeRowCtrls(rowsToRemove);
41012 this.redrawAfterScroll();
41013 };
41014 RowRenderer.prototype.getFullWidthRowCtrls = function (rowNodes) {
41015 var _this = this;
41016 var rowNodesMap = this.mapRowNodes(rowNodes);
41017 return Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["getAllValuesInObject"])(this.rowCtrlsByRowIndex).filter(function (rowCtrl) {
41018 // include just full width
41019 if (!rowCtrl.isFullWidth()) {
41020 return false;
41021 }
41022 // if Row Nodes provided, we exclude where Row Node is missing
41023 var rowNode = rowCtrl.getRowNode();
41024 if (rowNodesMap != null && !_this.isRowInMap(rowNode, rowNodesMap)) {
41025 return false;
41026 }
41027 return true;
41028 });
41029 };
41030 RowRenderer.prototype.refreshFullWidthRows = function (rowNodesToRefresh) {
41031 var rowsToRemove = [];
41032 var selectivelyRefreshing = !!rowNodesToRefresh;
41033 var idsToRefresh = selectivelyRefreshing ? {} : undefined;
41034 if (selectivelyRefreshing && idsToRefresh) {
41035 rowNodesToRefresh.forEach(function (r) { return idsToRefresh[r.id] = true; });
41036 }
41037 this.getFullWidthRowCtrls().forEach(function (fullWidthRowCtrl) {
41038 var rowNode = fullWidthRowCtrl.getRowNode();
41039 if (selectivelyRefreshing && idsToRefresh) {
41040 // we refresh if a) this node is present or b) this parents nodes is present. checking parent
41041 // node is important for master/detail, as we want detail to refresh on changes to parent node.
41042 // it's also possible, if user is provider their own fullWidth, that details panels contain
41043 // some info on the parent, eg if in tree data and child row shows some data from parent row also.
41044 var parentId = (rowNode.level > 0 && rowNode.parent) ? rowNode.parent.id : undefined;
41045 var skipThisNode = !idsToRefresh[rowNode.id] && !idsToRefresh[parentId];
41046 if (skipThisNode) {
41047 return;
41048 }
41049 }
41050 var fullWidthRowsRefreshed = fullWidthRowCtrl.refreshFullWidth();
41051 if (!fullWidthRowsRefreshed) {
41052 var rowIndex = fullWidthRowCtrl.getRowNode().rowIndex;
41053 rowsToRemove.push(rowIndex.toString());
41054 }
41055 });
41056 this.removeRowCtrls(rowsToRemove);
41057 this.redrawAfterScroll();
41058 };
41059 RowRenderer.prototype.createOrUpdateRowCtrl = function (rowIndex, rowsToRecycle, animate, afterScroll) {
41060 var rowNode;
41061 var rowCtrl = this.rowCtrlsByRowIndex[rowIndex];
41062 // if no row comp, see if we can get it from the previous rowComps
41063 if (!rowCtrl) {
41064 rowNode = this.paginationProxy.getRow(rowIndex);
41065 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(rowNode) && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(rowsToRecycle) && rowsToRecycle[rowNode.id] && rowNode.alreadyRendered) {
41066 rowCtrl = rowsToRecycle[rowNode.id];
41067 rowsToRecycle[rowNode.id] = null;
41068 }
41069 }
41070 var creatingNewRowCtrl = !rowCtrl;
41071 if (creatingNewRowCtrl) {
41072 // create a new one
41073 if (!rowNode) {
41074 rowNode = this.paginationProxy.getRow(rowIndex);
41075 }
41076 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(rowNode)) {
41077 rowCtrl = this.createRowCon(rowNode, animate, afterScroll);
41078 }
41079 else {
41080 // this should never happen - if somehow we are trying to create
41081 // a row for a rowNode that does not exist.
41082 return;
41083 }
41084 }
41085 if (rowNode) {
41086 // set node as 'alreadyRendered' to ensure we only recycle rowComps that have been rendered, this ensures
41087 // we don't reuse rowComps that have been removed and then re-added in the same batch transaction.
41088 rowNode.alreadyRendered = true;
41089 }
41090 this.rowCtrlsByRowIndex[rowIndex] = rowCtrl;
41091 return rowCtrl;
41092 };
41093 RowRenderer.prototype.destroyRowCtrls = function (rowCtrlsMap, animate) {
41094 var _this = this;
41095 var executeInAWhileFuncs = [];
41096 Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["iterateObject"])(rowCtrlsMap, function (nodeId, rowCtrl) {
41097 // if row was used, then it's null
41098 if (!rowCtrl) {
41099 return;
41100 }
41101 if (_this.cachedRowCtrls && rowCtrl.isCacheable()) {
41102 _this.cachedRowCtrls.addRow(rowCtrl);
41103 return;
41104 }
41105 rowCtrl.destroyFirstPass();
41106 if (animate) {
41107 _this.zombieRowCtrls[rowCtrl.getInstanceId()] = rowCtrl;
41108 executeInAWhileFuncs.push(function () {
41109 rowCtrl.destroySecondPass();
41110 delete _this.zombieRowCtrls[rowCtrl.getInstanceId()];
41111 });
41112 }
41113 else {
41114 rowCtrl.destroySecondPass();
41115 }
41116 });
41117 if (animate) {
41118 // this ensures we fire displayedRowsChanged AFTER all the 'executeInAWhileFuncs' get
41119 // executed, as we added it to the end of the list.
41120 executeInAWhileFuncs.push(function () {
41121 _this.updateAllRowCtrls();
41122 _this.dispatchDisplayedRowsChanged();
41123 });
41124 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["executeInAWhile"])(executeInAWhileFuncs);
41125 }
41126 };
41127 RowRenderer.prototype.workOutFirstAndLastRowsToRender = function () {
41128 var _this = this;
41129 var newFirst;
41130 var newLast;
41131 if (!this.paginationProxy.isRowsToRender()) {
41132 newFirst = 0;
41133 newLast = -1; // setting to -1 means nothing in range
41134 }
41135 else if (this.printLayout) {
41136 newFirst = this.paginationProxy.getPageFirstRow();
41137 newLast = this.paginationProxy.getPageLastRow();
41138 }
41139 else {
41140 var bufferPixels = this.gridOptionsWrapper.getRowBufferInPixels();
41141 var gridBodyCtrl = this.ctrlsService.getGridBodyCtrl();
41142 var suppressRowVirtualisation = this.gridOptionsWrapper.isSuppressRowVirtualisation();
41143 var rowHeightsChanged = false;
41144 var firstPixel = void 0;
41145 var lastPixel = void 0;
41146 do {
41147 var paginationOffset = this.paginationProxy.getPixelOffset();
41148 var _a = this.paginationProxy.getCurrentPagePixelRange(), pageFirstPixel = _a.pageFirstPixel, pageLastPixel = _a.pageLastPixel;
41149 var divStretchOffset = this.rowContainerHeightService.getDivStretchOffset();
41150 if (suppressRowVirtualisation) {
41151 firstPixel = pageFirstPixel + divStretchOffset;
41152 lastPixel = pageLastPixel + divStretchOffset;
41153 }
41154 else {
41155 var bodyVRange = gridBodyCtrl.getScrollFeature().getVScrollPosition();
41156 var bodyTopPixel = bodyVRange.top;
41157 var bodyBottomPixel = bodyVRange.bottom;
41158 firstPixel = Math.max(bodyTopPixel + paginationOffset - bufferPixels, pageFirstPixel) + divStretchOffset;
41159 lastPixel = Math.min(bodyBottomPixel + paginationOffset + bufferPixels, pageLastPixel) + divStretchOffset;
41160 }
41161 // if the rows we are about to display get their heights changed, then that upsets the calcs from above.
41162 rowHeightsChanged = this.ensureAllRowsInRangeHaveHeightsCalculated(firstPixel, lastPixel);
41163 } while (rowHeightsChanged);
41164 var firstRowIndex = this.paginationProxy.getRowIndexAtPixel(firstPixel);
41165 var lastRowIndex = this.paginationProxy.getRowIndexAtPixel(lastPixel);
41166 var pageFirstRow = this.paginationProxy.getPageFirstRow();
41167 var pageLastRow = this.paginationProxy.getPageLastRow();
41168 // adjust, in case buffer extended actual size
41169 if (firstRowIndex < pageFirstRow) {
41170 firstRowIndex = pageFirstRow;
41171 }
41172 if (lastRowIndex > pageLastRow) {
41173 lastRowIndex = pageLastRow;
41174 }
41175 newFirst = firstRowIndex;
41176 newLast = lastRowIndex;
41177 }
41178 // sometimes user doesn't set CSS right and ends up with grid with no height and grid ends up
41179 // trying to render all the rows, eg 10,000+ rows. this will kill the browser. so instead of
41180 // killing the browser, we limit the number of rows. just in case some use case we didn't think
41181 // of, we also have a property to not do this operation.
41182 var rowLayoutNormal = this.gridOptionsWrapper.getDomLayout() === _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].DOM_LAYOUT_NORMAL;
41183 var suppressRowCountRestriction = this.gridOptionsWrapper.isSuppressMaxRenderedRowRestriction();
41184 var rowBufferMaxSize = Math.max(this.gridOptionsWrapper.getRowBuffer(), 500);
41185 if (rowLayoutNormal && !suppressRowCountRestriction) {
41186 if (newLast - newFirst > rowBufferMaxSize) {
41187 newLast = newFirst + rowBufferMaxSize;
41188 }
41189 }
41190 var firstDiffers = newFirst !== this.firstRenderedRow;
41191 var lastDiffers = newLast !== this.lastRenderedRow;
41192 if (firstDiffers || lastDiffers) {
41193 this.firstRenderedRow = newFirst;
41194 this.lastRenderedRow = newLast;
41195 var event_1 = {
41196 type: _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_VIEWPORT_CHANGED,
41197 firstRow: newFirst,
41198 lastRow: newLast,
41199 api: this.gridApi,
41200 columnApi: this.columnApi
41201 };
41202 this.eventService.dispatchEvent(event_1);
41203 }
41204 // only dispatch firstDataRendered if we have actually rendered some data
41205 if (this.paginationProxy.isRowsToRender()) {
41206 var event_2 = {
41207 type: _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_FIRST_DATA_RENDERED,
41208 firstRow: newFirst,
41209 lastRow: newLast,
41210 api: this.gridApi,
41211 columnApi: this.columnApi
41212 };
41213 // added a small delay here because in some scenarios this can be fired
41214 // before the grid is actually rendered, causing component creation
41215 // on EVENT_FIRST_DATA_RENDERED to fail.
41216 window.setTimeout(function () { return _this.eventService.dispatchEventOnce(event_2); }, 50);
41217 }
41218 };
41219 RowRenderer.prototype.ensureAllRowsInRangeHaveHeightsCalculated = function (topPixel, bottomPixel) {
41220 // ensureRowHeightsVisible only works with CSRM, as it's the only row model that allows lazy row height calcs.
41221 // all the other row models just hard code so the method just returns back false
41222 var res = this.paginationProxy.ensureRowHeightsValid(topPixel, bottomPixel, -1, -1);
41223 if (res) {
41224 this.updateContainerHeights();
41225 }
41226 return res;
41227 };
41228 RowRenderer.prototype.getFirstVirtualRenderedRow = function () {
41229 return this.firstRenderedRow;
41230 };
41231 RowRenderer.prototype.getLastVirtualRenderedRow = function () {
41232 return this.lastRenderedRow;
41233 };
41234 // check that none of the rows to remove are editing or focused as:
41235 // a) if editing, we want to keep them, otherwise the user will loose the context of the edit,
41236 // eg user starts editing, enters some text, then scrolls down and then up, next time row rendered
41237 // the edit is reset - so we want to keep it rendered.
41238 // b) if focused, we want ot keep keyboard focus, so if user ctrl+c, it goes to clipboard,
41239 // otherwise the user can range select and drag (with focus cell going out of the viewport)
41240 // and then ctrl+c, nothing will happen if cell is removed from dom.
41241 // c) if detail record of master detail, as users complained that the context of detail rows
41242 // was getting lost when detail row out of view. eg user expands to show detail row,
41243 // then manipulates the detail panel (eg sorts the detail grid), then context is lost
41244 // after detail panel is scrolled out of / into view.
41245 RowRenderer.prototype.doNotUnVirtualiseRow = function (rowComp) {
41246 var REMOVE_ROW = false;
41247 var KEEP_ROW = true;
41248 var rowNode = rowComp.getRowNode();
41249 var rowHasFocus = this.focusService.isRowNodeFocused(rowNode);
41250 var rowIsEditing = rowComp.isEditing();
41251 var rowIsDetail = rowNode.detail;
41252 var mightWantToKeepRow = rowHasFocus || rowIsEditing || rowIsDetail;
41253 // if we deffo don't want to keep it,
41254 if (!mightWantToKeepRow) {
41255 return REMOVE_ROW;
41256 }
41257 // editing row, only remove if it is no longer rendered, eg filtered out or new data set.
41258 // the reason we want to keep is if user is scrolling up and down, we don't want to loose
41259 // the context of the editing in process.
41260 var rowNodePresent = this.paginationProxy.isRowPresent(rowNode);
41261 return rowNodePresent ? KEEP_ROW : REMOVE_ROW;
41262 };
41263 RowRenderer.prototype.createRowCon = function (rowNode, animate, afterScroll) {
41264 var rowCtrlFromCache = this.cachedRowCtrls ? this.cachedRowCtrls.getRow(rowNode) : null;
41265 if (rowCtrlFromCache) {
41266 return rowCtrlFromCache;
41267 }
41268 // we don't use animations frames for printing, so the user can put the grid into print mode
41269 // and immediately print - otherwise the user would have to wait for the rows to draw in the background
41270 // (via the animation frames) which is awkward to do from code.
41271 // we only do the animation frames after scrolling, as this is where we want the smooth user experience.
41272 // having animation frames for other times makes the grid look 'jumpy'.
41273 var suppressAnimationFrame = this.gridOptionsWrapper.isSuppressAnimationFrame();
41274 var useAnimationFrameForCreate = afterScroll && !suppressAnimationFrame && !this.printLayout;
41275 var res = new _row_rowCtrl__WEBPACK_IMPORTED_MODULE_1__["RowCtrl"](rowNode, this.beans, animate, useAnimationFrameForCreate, this.printLayout);
41276 return res;
41277 };
41278 RowRenderer.prototype.getRenderedNodes = function () {
41279 var renderedRows = this.rowCtrlsByRowIndex;
41280 return Object.keys(renderedRows).map(function (key) { return renderedRows[key].getRowNode(); });
41281 };
41282 RowRenderer.prototype.getRowByPosition = function (rowPosition) {
41283 var rowComponent;
41284 switch (rowPosition.rowPinned) {
41285 case _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].PINNED_TOP:
41286 rowComponent = this.topRowCtrls[rowPosition.rowIndex];
41287 break;
41288 case _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].PINNED_BOTTOM:
41289 rowComponent = this.bottomRowCtrls[rowPosition.rowIndex];
41290 break;
41291 default:
41292 rowComponent = this.rowCtrlsByRowIndex[rowPosition.rowIndex];
41293 break;
41294 }
41295 return rowComponent;
41296 };
41297 RowRenderer.prototype.getRowNode = function (gridRow) {
41298 switch (gridRow.rowPinned) {
41299 case _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].PINNED_TOP:
41300 return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];
41301 case _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].PINNED_BOTTOM:
41302 return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];
41303 default:
41304 return this.rowModel.getRow(gridRow.rowIndex);
41305 }
41306 };
41307 // returns true if any row between startIndex and endIndex is rendered. used by
41308 // SSRM or IRM, as they don't want to purge visible blocks from cache.
41309 RowRenderer.prototype.isRangeInRenderedViewport = function (startIndex, endIndex) {
41310 // parent closed means the parent node is not expanded, thus these blocks are not visible
41311 var parentClosed = startIndex == null || endIndex == null;
41312 if (parentClosed) {
41313 return false;
41314 }
41315 var blockAfterViewport = startIndex > this.lastRenderedRow;
41316 var blockBeforeViewport = endIndex < this.firstRenderedRow;
41317 var blockInsideViewport = !blockBeforeViewport && !blockAfterViewport;
41318 return blockInsideViewport;
41319 };
41320 __decorate([
41321 Object(_context_context__WEBPACK_IMPORTED_MODULE_5__["Autowired"])("paginationProxy")
41322 ], RowRenderer.prototype, "paginationProxy", void 0);
41323 __decorate([
41324 Object(_context_context__WEBPACK_IMPORTED_MODULE_5__["Autowired"])("columnModel")
41325 ], RowRenderer.prototype, "columnModel", void 0);
41326 __decorate([
41327 Object(_context_context__WEBPACK_IMPORTED_MODULE_5__["Autowired"])("pinnedRowModel")
41328 ], RowRenderer.prototype, "pinnedRowModel", void 0);
41329 __decorate([
41330 Object(_context_context__WEBPACK_IMPORTED_MODULE_5__["Autowired"])("rowModel")
41331 ], RowRenderer.prototype, "rowModel", void 0);
41332 __decorate([
41333 Object(_context_context__WEBPACK_IMPORTED_MODULE_5__["Autowired"])("focusService")
41334 ], RowRenderer.prototype, "focusService", void 0);
41335 __decorate([
41336 Object(_context_context__WEBPACK_IMPORTED_MODULE_5__["Autowired"])("columnApi")
41337 ], RowRenderer.prototype, "columnApi", void 0);
41338 __decorate([
41339 Object(_context_context__WEBPACK_IMPORTED_MODULE_5__["Autowired"])("gridApi")
41340 ], RowRenderer.prototype, "gridApi", void 0);
41341 __decorate([
41342 Object(_context_context__WEBPACK_IMPORTED_MODULE_5__["Autowired"])("beans")
41343 ], RowRenderer.prototype, "beans", void 0);
41344 __decorate([
41345 Object(_context_context__WEBPACK_IMPORTED_MODULE_5__["Autowired"])("rowContainerHeightService")
41346 ], RowRenderer.prototype, "rowContainerHeightService", void 0);
41347 __decorate([
41348 Object(_context_context__WEBPACK_IMPORTED_MODULE_5__["Optional"])("ctrlsService")
41349 ], RowRenderer.prototype, "ctrlsService", void 0);
41350 __decorate([
41351 _context_context__WEBPACK_IMPORTED_MODULE_5__["PostConstruct"]
41352 ], RowRenderer.prototype, "postConstruct", null);
41353 RowRenderer = __decorate([
41354 Object(_context_context__WEBPACK_IMPORTED_MODULE_5__["Bean"])("rowRenderer")
41355 ], RowRenderer);
41356 return RowRenderer;
41357}(_context_beanStub__WEBPACK_IMPORTED_MODULE_6__["BeanStub"]));
41358
41359var RowCtrlCache = /** @class */ (function () {
41360 function RowCtrlCache(maxCount) {
41361 // map for fast access
41362 this.entriesMap = {};
41363 // list for keeping order
41364 this.entriesList = [];
41365 this.maxCount = maxCount;
41366 }
41367 RowCtrlCache.prototype.addRow = function (rowCtrl) {
41368 this.entriesMap[rowCtrl.getRowNode().id] = rowCtrl;
41369 this.entriesList.push(rowCtrl);
41370 rowCtrl.setCached(true);
41371 if (this.entriesList.length > this.maxCount) {
41372 var rowCtrlToDestroy = this.entriesList[0];
41373 rowCtrlToDestroy.destroyFirstPass();
41374 rowCtrlToDestroy.destroySecondPass();
41375 this.removeFromCache(rowCtrlToDestroy);
41376 }
41377 };
41378 RowCtrlCache.prototype.getRow = function (rowNode) {
41379 if (rowNode == null || rowNode.id == null) {
41380 return null;
41381 }
41382 var res = this.entriesMap[rowNode.id];
41383 if (!res) {
41384 return null;
41385 }
41386 this.removeFromCache(res);
41387 res.setCached(false);
41388 // this can happen if user reloads data, and a new RowNode is reusing
41389 // the same ID as the old one
41390 var rowNodeMismatch = res.getRowNode() != rowNode;
41391 return rowNodeMismatch ? null : res;
41392 };
41393 RowCtrlCache.prototype.removeFromCache = function (rowCtrl) {
41394 var rowNodeId = rowCtrl.getRowNode().id;
41395 delete this.entriesMap[rowNodeId];
41396 Object(_utils_array__WEBPACK_IMPORTED_MODULE_12__["removeFromArray"])(this.entriesList, rowCtrl);
41397 };
41398 RowCtrlCache.prototype.getEntries = function () {
41399 return this.entriesList;
41400 };
41401 return RowCtrlCache;
41402}());
41403
41404
41405
41406
41407/***/ }),
41408/* 179 */
41409/***/ (function(module, __webpack_exports__, __webpack_require__) {
41410
41411"use strict";
41412__webpack_require__.r(__webpack_exports__);
41413/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValueFormatterService", function() { return ValueFormatterService; });
41414/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
41415/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
41416/**
41417 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41418 * @version v27.3.0
41419 * @link https://www.ag-grid.com/
41420 * @license MIT
41421 */
41422var __extends = (undefined && undefined.__extends) || (function () {
41423 var extendStatics = function (d, b) {
41424 extendStatics = Object.setPrototypeOf ||
41425 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41426 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
41427 return extendStatics(d, b);
41428 };
41429 return function (d, b) {
41430 extendStatics(d, b);
41431 function __() { this.constructor = d; }
41432 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41433 };
41434})();
41435var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
41436 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41437 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41438 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
41439 return c > 3 && r && Object.defineProperty(target, key, r), r;
41440};
41441
41442
41443var ValueFormatterService = /** @class */ (function (_super) {
41444 __extends(ValueFormatterService, _super);
41445 function ValueFormatterService() {
41446 return _super !== null && _super.apply(this, arguments) || this;
41447 }
41448 ValueFormatterService.prototype.formatValue = function (column, node, value, suppliedFormatter, useFormatterFromColumn) {
41449 if (useFormatterFromColumn === void 0) { useFormatterFromColumn = true; }
41450 var result = null;
41451 var formatter;
41452 var colDef = column.getColDef();
41453 if (suppliedFormatter) {
41454 // use supplied formatter if provided, e.g. set filter items can have their own value formatters
41455 formatter = suppliedFormatter;
41456 }
41457 else if (useFormatterFromColumn) {
41458 // if row is pinned, give preference to the pinned formatter
41459 formatter = node && node.rowPinned && colDef.pinnedRowValueFormatter ?
41460 colDef.pinnedRowValueFormatter : colDef.valueFormatter;
41461 }
41462 if (formatter) {
41463 var params = {
41464 value: value,
41465 node: node,
41466 data: node ? node.data : null,
41467 colDef: colDef,
41468 column: column,
41469 api: this.gridOptionsWrapper.getApi(),
41470 columnApi: this.gridOptionsWrapper.getColumnApi(),
41471 context: this.gridOptionsWrapper.getContext()
41472 };
41473 result = this.expressionService.evaluate(formatter, params);
41474 }
41475 else if (colDef.refData) {
41476 return colDef.refData[value] || '';
41477 }
41478 // if we don't do this, then arrays get displayed as 1,2,3, but we want 1, 2, 3 (i.e. with spaces)
41479 if (result == null && Array.isArray(value)) {
41480 result = value.join(', ');
41481 }
41482 return result;
41483 };
41484 __decorate([
41485 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('expressionService')
41486 ], ValueFormatterService.prototype, "expressionService", void 0);
41487 ValueFormatterService = __decorate([
41488 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('valueFormatterService')
41489 ], ValueFormatterService);
41490 return ValueFormatterService;
41491}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
41492
41493
41494
41495
41496
41497/***/ }),
41498/* 180 */
41499/***/ (function(module, __webpack_exports__, __webpack_require__) {
41500
41501"use strict";
41502__webpack_require__.r(__webpack_exports__);
41503/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PinnedRowModel", function() { return PinnedRowModel; });
41504/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94);
41505/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
41506/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
41507/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
41508/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20);
41509/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
41510/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18);
41511/**
41512 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41513 * @version v27.3.0
41514 * @link https://www.ag-grid.com/
41515 * @license MIT
41516 */
41517var __extends = (undefined && undefined.__extends) || (function () {
41518 var extendStatics = function (d, b) {
41519 extendStatics = Object.setPrototypeOf ||
41520 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41521 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
41522 return extendStatics(d, b);
41523 };
41524 return function (d, b) {
41525 extendStatics(d, b);
41526 function __() { this.constructor = d; }
41527 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41528 };
41529})();
41530var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
41531 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41532 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41533 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
41534 return c > 3 && r && Object.defineProperty(target, key, r), r;
41535};
41536
41537
41538
41539
41540
41541
41542
41543var PinnedRowModel = /** @class */ (function (_super) {
41544 __extends(PinnedRowModel, _super);
41545 function PinnedRowModel() {
41546 return _super !== null && _super.apply(this, arguments) || this;
41547 }
41548 PinnedRowModel.prototype.init = function () {
41549 this.setPinnedTopRowData(this.gridOptionsWrapper.getPinnedTopRowData());
41550 this.setPinnedBottomRowData(this.gridOptionsWrapper.getPinnedBottomRowData());
41551 };
41552 PinnedRowModel.prototype.isEmpty = function (floating) {
41553 var rows = floating === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].PINNED_TOP ? this.pinnedTopRows : this.pinnedBottomRows;
41554 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missingOrEmpty"])(rows);
41555 };
41556 PinnedRowModel.prototype.isRowsToRender = function (floating) {
41557 return !this.isEmpty(floating);
41558 };
41559 PinnedRowModel.prototype.getRowAtPixel = function (pixel, floating) {
41560 var rows = floating === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].PINNED_TOP ? this.pinnedTopRows : this.pinnedBottomRows;
41561 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missingOrEmpty"])(rows)) {
41562 return 0; // this should never happen, just in case, 0 is graceful failure
41563 }
41564 for (var i = 0; i < rows.length; i++) {
41565 var rowNode = rows[i];
41566 var rowTopPixel = rowNode.rowTop + rowNode.rowHeight - 1;
41567 // only need to range check against the top pixel, as we are going through the list
41568 // in order, first row to hit the pixel wins
41569 if (rowTopPixel >= pixel) {
41570 return i;
41571 }
41572 }
41573 return rows.length - 1;
41574 };
41575 PinnedRowModel.prototype.setPinnedTopRowData = function (rowData) {
41576 this.pinnedTopRows = this.createNodesFromData(rowData, true);
41577 var event = {
41578 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_PINNED_ROW_DATA_CHANGED,
41579 api: this.gridApi,
41580 columnApi: this.columnApi
41581 };
41582 this.eventService.dispatchEvent(event);
41583 };
41584 PinnedRowModel.prototype.setPinnedBottomRowData = function (rowData) {
41585 this.pinnedBottomRows = this.createNodesFromData(rowData, false);
41586 var event = {
41587 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_PINNED_ROW_DATA_CHANGED,
41588 api: this.gridApi,
41589 columnApi: this.columnApi
41590 };
41591 this.eventService.dispatchEvent(event);
41592 };
41593 PinnedRowModel.prototype.createNodesFromData = function (allData, isTop) {
41594 var _this = this;
41595 var rowNodes = [];
41596 if (allData) {
41597 var nextRowTop_1 = 0;
41598 allData.forEach(function (dataItem, index) {
41599 var rowNode = new _entities_rowNode__WEBPACK_IMPORTED_MODULE_0__["RowNode"](_this.beans);
41600 rowNode.data = dataItem;
41601 var idPrefix = isTop ? _entities_rowNode__WEBPACK_IMPORTED_MODULE_0__["RowNode"].ID_PREFIX_TOP_PINNED : _entities_rowNode__WEBPACK_IMPORTED_MODULE_0__["RowNode"].ID_PREFIX_BOTTOM_PINNED;
41602 rowNode.id = idPrefix + index;
41603 rowNode.rowPinned = isTop ? _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].PINNED_TOP : _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].PINNED_BOTTOM;
41604 rowNode.setRowTop(nextRowTop_1);
41605 rowNode.setRowHeight(_this.gridOptionsWrapper.getRowHeightForNode(rowNode).height);
41606 rowNode.setRowIndex(index);
41607 nextRowTop_1 += rowNode.rowHeight;
41608 rowNodes.push(rowNode);
41609 });
41610 }
41611 return rowNodes;
41612 };
41613 PinnedRowModel.prototype.getPinnedTopRowData = function () {
41614 return this.pinnedTopRows;
41615 };
41616 PinnedRowModel.prototype.getPinnedBottomRowData = function () {
41617 return this.pinnedBottomRows;
41618 };
41619 PinnedRowModel.prototype.getPinnedTopTotalHeight = function () {
41620 return this.getTotalHeight(this.pinnedTopRows);
41621 };
41622 PinnedRowModel.prototype.getPinnedTopRowCount = function () {
41623 return this.pinnedTopRows ? this.pinnedTopRows.length : 0;
41624 };
41625 PinnedRowModel.prototype.getPinnedBottomRowCount = function () {
41626 return this.pinnedBottomRows ? this.pinnedBottomRows.length : 0;
41627 };
41628 PinnedRowModel.prototype.getPinnedTopRow = function (index) {
41629 return this.pinnedTopRows[index];
41630 };
41631 PinnedRowModel.prototype.getPinnedBottomRow = function (index) {
41632 return this.pinnedBottomRows[index];
41633 };
41634 PinnedRowModel.prototype.forEachPinnedTopRow = function (callback) {
41635 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missingOrEmpty"])(this.pinnedTopRows)) {
41636 return;
41637 }
41638 this.pinnedTopRows.forEach(callback);
41639 };
41640 PinnedRowModel.prototype.forEachPinnedBottomRow = function (callback) {
41641 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missingOrEmpty"])(this.pinnedBottomRows)) {
41642 return;
41643 }
41644 this.pinnedBottomRows.forEach(callback);
41645 };
41646 PinnedRowModel.prototype.getPinnedBottomTotalHeight = function () {
41647 return this.getTotalHeight(this.pinnedBottomRows);
41648 };
41649 PinnedRowModel.prototype.getTotalHeight = function (rowNodes) {
41650 if (!rowNodes || rowNodes.length === 0) {
41651 return 0;
41652 }
41653 var lastNode = Object(_utils_array__WEBPACK_IMPORTED_MODULE_6__["last"])(rowNodes);
41654 return lastNode.rowTop + lastNode.rowHeight;
41655 };
41656 __decorate([
41657 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnApi')
41658 ], PinnedRowModel.prototype, "columnApi", void 0);
41659 __decorate([
41660 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridApi')
41661 ], PinnedRowModel.prototype, "gridApi", void 0);
41662 __decorate([
41663 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('beans')
41664 ], PinnedRowModel.prototype, "beans", void 0);
41665 __decorate([
41666 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
41667 ], PinnedRowModel.prototype, "init", null);
41668 PinnedRowModel = __decorate([
41669 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('pinnedRowModel')
41670 ], PinnedRowModel);
41671 return PinnedRowModel;
41672}(_context_beanStub__WEBPACK_IMPORTED_MODULE_4__["BeanStub"]));
41673
41674
41675
41676
41677
41678/***/ }),
41679/* 181 */
41680/***/ (function(module, __webpack_exports__, __webpack_require__) {
41681
41682"use strict";
41683__webpack_require__.r(__webpack_exports__);
41684/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServerSideTransactionResultStatus", function() { return ServerSideTransactionResultStatus; });
41685/**
41686 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41687 * @version v27.3.0
41688 * @link https://www.ag-grid.com/
41689 * @license MIT
41690 */
41691var ServerSideTransactionResultStatus;
41692(function (ServerSideTransactionResultStatus) {
41693 /** Transaction was successfully applied */
41694 ServerSideTransactionResultStatus["Applied"] = "Applied";
41695 /**
41696 * Store was not found, transaction not applied.
41697 * Either invalid route, or the parent row has not yet been expanded.
41698 */
41699 ServerSideTransactionResultStatus["StoreNotFound"] = "StoreNotFound";
41700 /**
41701 * Store is loading, transaction not applied.
41702 */
41703 ServerSideTransactionResultStatus["StoreLoading"] = "StoreLoading";
41704 /**
41705 * Store is loading (as max loads exceeded), transaction not applied.
41706 */
41707 ServerSideTransactionResultStatus["StoreWaitingToLoad"] = "StoreWaitingToLoad";
41708 /**
41709 * Store load attempt failed, transaction not applied.
41710 */
41711 ServerSideTransactionResultStatus["StoreLoadingFailed"] = "StoreLoadingFailed";
41712 /**
41713 * Store is type Partial, which doesn't accept transactions
41714 */
41715 ServerSideTransactionResultStatus["StoreWrongType"] = "StoreWrongType";
41716 /**
41717 * Transaction was cancelled, due to grid.
41718 * Callback isApplyServerSideTransaction() returning false
41719 */
41720 ServerSideTransactionResultStatus["Cancelled"] = "Cancelled";
41721})(ServerSideTransactionResultStatus || (ServerSideTransactionResultStatus = {}));
41722
41723
41724
41725
41726/***/ }),
41727/* 182 */
41728/***/ (function(module, __webpack_exports__, __webpack_require__) {
41729
41730"use strict";
41731__webpack_require__.r(__webpack_exports__);
41732/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangedPath", function() { return ChangedPath; });
41733/**
41734 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41735 * @version v27.3.0
41736 * @link https://www.ag-grid.com/
41737 * @license MIT
41738 */
41739// when doing transactions, or change detection, and grouping is present
41740// in the data, there is no need for the ClientSideRowModel to update each
41741// group after an update, ony parts that were impacted by the change.
41742// this class keeps track of all groups that were impacted by a transaction.
41743// the the different CSRM operations (filter, sort etc) use the forEach method
41744// to visit each group that was changed.
41745var ChangedPath = /** @class */ (function () {
41746 function ChangedPath(keepingColumns, rootNode) {
41747 // whether changed path is active of not. it is active when a) doing
41748 // a transaction update or b) doing change detection. if we are doing
41749 // a CSRM refresh for other reasons (after sort or filter, or user calling
41750 // setRowData() without delta mode) then we are not active. we are also
41751 // marked as not active if secondary columns change in pivot (as this impacts
41752 // aggregations)
41753 this.active = true;
41754 // for each node in the change path, we also store which columns need
41755 // to be re-aggregated.
41756 this.nodeIdsToColumns = {};
41757 // for quick lookup, all items in the change path are mapped by nodeId
41758 this.mapToItems = {};
41759 this.keepingColumns = keepingColumns;
41760 this.pathRoot = {
41761 rowNode: rootNode,
41762 children: null
41763 };
41764 this.mapToItems[rootNode.id] = this.pathRoot;
41765 }
41766 // can be set inactive by:
41767 // a) ClientSideRowModel, if no transactions or
41768 // b) PivotService, if secondary columns changed
41769 ChangedPath.prototype.setInactive = function () {
41770 this.active = false;
41771 };
41772 ChangedPath.prototype.isActive = function () {
41773 return this.active;
41774 };
41775 ChangedPath.prototype.depthFirstSearchChangedPath = function (pathItem, callback) {
41776 if (pathItem.children) {
41777 for (var i = 0; i < pathItem.children.length; i++) {
41778 this.depthFirstSearchChangedPath(pathItem.children[i], callback);
41779 }
41780 }
41781 callback(pathItem.rowNode);
41782 };
41783 ChangedPath.prototype.depthFirstSearchEverything = function (rowNode, callback, traverseEverything) {
41784 if (rowNode.childrenAfterGroup) {
41785 for (var i = 0; i < rowNode.childrenAfterGroup.length; i++) {
41786 var childNode = rowNode.childrenAfterGroup[i];
41787 if (childNode.childrenAfterGroup) {
41788 this.depthFirstSearchEverything(rowNode.childrenAfterGroup[i], callback, traverseEverything);
41789 }
41790 else if (traverseEverything) {
41791 callback(childNode);
41792 }
41793 }
41794 }
41795 callback(rowNode);
41796 };
41797 // traverseLeafNodes -> used when NOT doing changed path, ie traversing everything. the callback
41798 // will be called for child nodes in addition to parent nodes.
41799 ChangedPath.prototype.forEachChangedNodeDepthFirst = function (callback, traverseLeafNodes) {
41800 if (traverseLeafNodes === void 0) { traverseLeafNodes = false; }
41801 if (this.active) {
41802 // if we are active, then use the change path to callback
41803 // only for updated groups
41804 this.depthFirstSearchChangedPath(this.pathRoot, callback);
41805 }
41806 else {
41807 // we are not active, so callback for everything, walk the entire path
41808 this.depthFirstSearchEverything(this.pathRoot.rowNode, callback, traverseLeafNodes);
41809 }
41810 };
41811 ChangedPath.prototype.executeFromRootNode = function (callback) {
41812 callback(this.pathRoot.rowNode);
41813 };
41814 ChangedPath.prototype.createPathItems = function (rowNode) {
41815 var pointer = rowNode;
41816 var newEntryCount = 0;
41817 while (!this.mapToItems[pointer.id]) {
41818 var newEntry = {
41819 rowNode: pointer,
41820 children: null
41821 };
41822 this.mapToItems[pointer.id] = newEntry;
41823 newEntryCount++;
41824 pointer = pointer.parent;
41825 }
41826 return newEntryCount;
41827 };
41828 ChangedPath.prototype.populateColumnsMap = function (rowNode, columns) {
41829 var _this = this;
41830 if (!this.keepingColumns || !columns) {
41831 return;
41832 }
41833 var pointer = rowNode;
41834 while (pointer) {
41835 // if columns, add the columns in all the way to parent, merging
41836 // in any other columns that might be there already
41837 if (!this.nodeIdsToColumns[pointer.id]) {
41838 this.nodeIdsToColumns[pointer.id] = {};
41839 }
41840 columns.forEach(function (col) { return _this.nodeIdsToColumns[pointer.id][col.getId()] = true; });
41841 pointer = pointer.parent;
41842 }
41843 };
41844 ChangedPath.prototype.linkPathItems = function (rowNode, newEntryCount) {
41845 var pointer = rowNode;
41846 for (var i = 0; i < newEntryCount; i++) {
41847 var thisItem = this.mapToItems[pointer.id];
41848 var parentItem = this.mapToItems[pointer.parent.id];
41849 if (!parentItem.children) {
41850 parentItem.children = [];
41851 }
41852 parentItem.children.push(thisItem);
41853 pointer = pointer.parent;
41854 }
41855 };
41856 // called by
41857 // 1) change detection (provides cols) and
41858 // 2) groupStage if doing transaction update (doesn't provide cols)
41859 ChangedPath.prototype.addParentNode = function (rowNode, columns) {
41860 if (!rowNode || rowNode.isRowPinned()) {
41861 return;
41862 }
41863 // we cannot do both steps below in the same loop as
41864 // the second loop has a dependency on the first loop.
41865 // ie the hierarchy cannot be stitched up yet because
41866 // we don't have it built yet
41867 // create the new PathItem objects.
41868 var newEntryCount = this.createPathItems(rowNode);
41869 // link in the node items
41870 this.linkPathItems(rowNode, newEntryCount);
41871 // update columns
41872 this.populateColumnsMap(rowNode, columns);
41873 };
41874 ChangedPath.prototype.canSkip = function (rowNode) {
41875 return this.active && !this.mapToItems[rowNode.id];
41876 };
41877 ChangedPath.prototype.getValueColumnsForNode = function (rowNode, valueColumns) {
41878 if (!this.keepingColumns) {
41879 return valueColumns;
41880 }
41881 var colsForThisNode = this.nodeIdsToColumns[rowNode.id];
41882 var result = valueColumns.filter(function (col) { return colsForThisNode[col.getId()]; });
41883 return result;
41884 };
41885 ChangedPath.prototype.getNotValueColumnsForNode = function (rowNode, valueColumns) {
41886 if (!this.keepingColumns) {
41887 return null;
41888 }
41889 var colsForThisNode = this.nodeIdsToColumns[rowNode.id];
41890 var result = valueColumns.filter(function (col) { return !colsForThisNode[col.getId()]; });
41891 return result;
41892 };
41893 return ChangedPath;
41894}());
41895
41896
41897
41898
41899
41900/***/ }),
41901/* 183 */
41902/***/ (function(module, __webpack_exports__, __webpack_require__) {
41903
41904"use strict";
41905__webpack_require__.r(__webpack_exports__);
41906/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlock", function() { return RowNodeBlock; });
41907/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
41908/**
41909 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41910 * @version v27.3.0
41911 * @link https://www.ag-grid.com/
41912 * @license MIT
41913 */
41914var __extends = (undefined && undefined.__extends) || (function () {
41915 var extendStatics = function (d, b) {
41916 extendStatics = Object.setPrototypeOf ||
41917 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41918 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
41919 return extendStatics(d, b);
41920 };
41921 return function (d, b) {
41922 extendStatics(d, b);
41923 function __() { this.constructor = d; }
41924 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41925 };
41926})();
41927
41928var RowNodeBlock = /** @class */ (function (_super) {
41929 __extends(RowNodeBlock, _super);
41930 function RowNodeBlock(id) {
41931 var _this = _super.call(this) || this;
41932 _this.state = RowNodeBlock.STATE_WAITING_TO_LOAD;
41933 _this.version = 0;
41934 _this.id = id;
41935 return _this;
41936 }
41937 RowNodeBlock.prototype.getId = function () {
41938 return this.id;
41939 };
41940 RowNodeBlock.prototype.load = function () {
41941 this.state = RowNodeBlock.STATE_LOADING;
41942 this.loadFromDatasource();
41943 };
41944 RowNodeBlock.prototype.getVersion = function () {
41945 return this.version;
41946 };
41947 RowNodeBlock.prototype.setStateWaitingToLoad = function () {
41948 // in case any current loads in progress, this will have their results ignored
41949 this.version++;
41950 this.state = RowNodeBlock.STATE_WAITING_TO_LOAD;
41951 };
41952 RowNodeBlock.prototype.getState = function () {
41953 return this.state;
41954 };
41955 RowNodeBlock.prototype.pageLoadFailed = function (version) {
41956 var requestMostRecentAndLive = this.isRequestMostRecentAndLive(version);
41957 if (requestMostRecentAndLive) {
41958 this.state = RowNodeBlock.STATE_FAILED;
41959 this.processServerFail();
41960 }
41961 this.dispatchLoadCompleted(false);
41962 };
41963 RowNodeBlock.prototype.success = function (version, params) {
41964 this.successCommon(version, params);
41965 };
41966 RowNodeBlock.prototype.pageLoaded = function (version, rows, lastRow) {
41967 this.successCommon(version, { rowData: rows, rowCount: lastRow });
41968 };
41969 RowNodeBlock.prototype.isRequestMostRecentAndLive = function (version) {
41970 // thisIsMostRecentRequest - if block was refreshed, then another request
41971 // could of been sent after this one.
41972 var thisIsMostRecentRequest = version === this.version;
41973 // weAreNotDestroyed - if InfiniteStore is purged, then blocks are destroyed
41974 // and new blocks created. so data loads of old blocks are discarded.
41975 var weAreNotDestroyed = this.isAlive();
41976 return thisIsMostRecentRequest && weAreNotDestroyed;
41977 };
41978 RowNodeBlock.prototype.successCommon = function (version, params) {
41979 // need to dispatch load complete before processing the data, as PaginationComp checks
41980 // RowNodeBlockLoader to see if it is still loading, so the RowNodeBlockLoader needs to
41981 // be updated first (via LoadComplete event) before PaginationComp updates (via processServerResult method)
41982 this.dispatchLoadCompleted();
41983 var requestMostRecentAndLive = this.isRequestMostRecentAndLive(version);
41984 if (requestMostRecentAndLive) {
41985 this.state = RowNodeBlock.STATE_LOADED;
41986 this.processServerResult(params);
41987 }
41988 };
41989 RowNodeBlock.prototype.dispatchLoadCompleted = function (success) {
41990 if (success === void 0) { success = true; }
41991 // we fire event regardless of processing data or now, as we want
41992 // the concurrentLoadRequests count to be reduced in BlockLoader
41993 var event = {
41994 type: RowNodeBlock.EVENT_LOAD_COMPLETE,
41995 success: success,
41996 block: this
41997 };
41998 this.dispatchEvent(event);
41999 };
42000 RowNodeBlock.EVENT_LOAD_COMPLETE = 'loadComplete';
42001 RowNodeBlock.STATE_WAITING_TO_LOAD = 'needsLoading';
42002 RowNodeBlock.STATE_LOADING = 'loading';
42003 RowNodeBlock.STATE_LOADED = 'loaded';
42004 RowNodeBlock.STATE_FAILED = 'failed';
42005 return RowNodeBlock;
42006}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
42007
42008
42009
42010
42011
42012/***/ }),
42013/* 184 */
42014/***/ (function(module, __webpack_exports__, __webpack_require__) {
42015
42016"use strict";
42017__webpack_require__.r(__webpack_exports__);
42018/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlockLoader", function() { return RowNodeBlockLoader; });
42019/* harmony import */ var _rowNodeBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(183);
42020/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
42021/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
42022/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37);
42023/**
42024 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42025 * @version v27.3.0
42026 * @link https://www.ag-grid.com/
42027 * @license MIT
42028 */
42029var __extends = (undefined && undefined.__extends) || (function () {
42030 var extendStatics = function (d, b) {
42031 extendStatics = Object.setPrototypeOf ||
42032 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42033 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
42034 return extendStatics(d, b);
42035 };
42036 return function (d, b) {
42037 extendStatics(d, b);
42038 function __() { this.constructor = d; }
42039 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42040 };
42041})();
42042var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
42043 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
42044 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
42045 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
42046 return c > 3 && r && Object.defineProperty(target, key, r), r;
42047};
42048var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
42049 return function (target, key) { decorator(target, key, paramIndex); }
42050};
42051
42052
42053
42054
42055var RowNodeBlockLoader = /** @class */ (function (_super) {
42056 __extends(RowNodeBlockLoader, _super);
42057 function RowNodeBlockLoader() {
42058 var _this = _super !== null && _super.apply(this, arguments) || this;
42059 _this.activeBlockLoadsCount = 0;
42060 _this.blocks = [];
42061 _this.active = true;
42062 return _this;
42063 }
42064 RowNodeBlockLoader_1 = RowNodeBlockLoader;
42065 RowNodeBlockLoader.prototype.postConstruct = function () {
42066 this.maxConcurrentRequests = this.gridOptionsWrapper.getMaxConcurrentDatasourceRequests();
42067 var blockLoadDebounceMillis = this.gridOptionsWrapper.getBlockLoadDebounceMillis();
42068 if (blockLoadDebounceMillis && blockLoadDebounceMillis > 0) {
42069 this.checkBlockToLoadDebounce = _utils__WEBPACK_IMPORTED_MODULE_3__["_"].debounce(this.performCheckBlocksToLoad.bind(this), blockLoadDebounceMillis);
42070 }
42071 };
42072 RowNodeBlockLoader.prototype.setBeans = function (loggerFactory) {
42073 this.logger = loggerFactory.create('RowNodeBlockLoader');
42074 };
42075 RowNodeBlockLoader.prototype.addBlock = function (block) {
42076 this.blocks.push(block);
42077 // note that we do not remove this listener when removing the block. this is because the
42078 // cache can get destroyed (and containing blocks) when a block is loading. however the loading block
42079 // is still counted as an active loading block and we must decrement activeBlockLoadsCount when it finishes.
42080 block.addEventListener(_rowNodeBlock__WEBPACK_IMPORTED_MODULE_0__["RowNodeBlock"].EVENT_LOAD_COMPLETE, this.loadComplete.bind(this));
42081 this.checkBlockToLoad();
42082 };
42083 RowNodeBlockLoader.prototype.removeBlock = function (block) {
42084 _utils__WEBPACK_IMPORTED_MODULE_3__["_"].removeFromArray(this.blocks, block);
42085 };
42086 RowNodeBlockLoader.prototype.destroy = function () {
42087 _super.prototype.destroy.call(this);
42088 this.active = false;
42089 };
42090 RowNodeBlockLoader.prototype.loadComplete = function () {
42091 this.activeBlockLoadsCount--;
42092 this.checkBlockToLoad();
42093 if (this.activeBlockLoadsCount == 0) {
42094 this.dispatchEvent({ type: RowNodeBlockLoader_1.BLOCK_LOADER_FINISHED_EVENT });
42095 }
42096 };
42097 RowNodeBlockLoader.prototype.checkBlockToLoad = function () {
42098 if (this.checkBlockToLoadDebounce) {
42099 this.checkBlockToLoadDebounce();
42100 }
42101 else {
42102 this.performCheckBlocksToLoad();
42103 }
42104 };
42105 RowNodeBlockLoader.prototype.performCheckBlocksToLoad = function () {
42106 if (!this.active) {
42107 return;
42108 }
42109 this.printCacheStatus();
42110 if (this.maxConcurrentRequests != null && this.activeBlockLoadsCount >= this.maxConcurrentRequests) {
42111 this.logger.log("checkBlockToLoad: max loads exceeded");
42112 return;
42113 }
42114 var blockToLoad = null;
42115 this.blocks.forEach(function (block) {
42116 if (block.getState() === _rowNodeBlock__WEBPACK_IMPORTED_MODULE_0__["RowNodeBlock"].STATE_WAITING_TO_LOAD) {
42117 blockToLoad = block;
42118 }
42119 });
42120 if (blockToLoad) {
42121 blockToLoad.load();
42122 this.activeBlockLoadsCount++;
42123 this.printCacheStatus();
42124 }
42125 };
42126 RowNodeBlockLoader.prototype.getBlockState = function () {
42127 var result = {};
42128 this.blocks.forEach(function (block) {
42129 var _a = block.getBlockStateJson(), id = _a.id, state = _a.state;
42130 result[id] = state;
42131 });
42132 return result;
42133 };
42134 RowNodeBlockLoader.prototype.printCacheStatus = function () {
42135 if (this.logger.isLogging()) {
42136 this.logger.log("printCacheStatus: activePageLoadsCount = " + this.activeBlockLoadsCount + ","
42137 + (" blocks = " + JSON.stringify(this.getBlockState())));
42138 }
42139 };
42140 RowNodeBlockLoader.prototype.isLoading = function () {
42141 return this.activeBlockLoadsCount > 0;
42142 };
42143 var RowNodeBlockLoader_1;
42144 RowNodeBlockLoader.BLOCK_LOADER_FINISHED_EVENT = 'blockLoaderFinished';
42145 __decorate([
42146 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
42147 ], RowNodeBlockLoader.prototype, "postConstruct", null);
42148 __decorate([
42149 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Qualifier"])('loggerFactory'))
42150 ], RowNodeBlockLoader.prototype, "setBeans", null);
42151 RowNodeBlockLoader = RowNodeBlockLoader_1 = __decorate([
42152 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('rowNodeBlockLoader')
42153 ], RowNodeBlockLoader);
42154 return RowNodeBlockLoader;
42155}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
42156
42157
42158
42159
42160
42161/***/ }),
42162/* 185 */
42163/***/ (function(module, __webpack_exports__, __webpack_require__) {
42164
42165"use strict";
42166__webpack_require__.r(__webpack_exports__);
42167/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PaginationProxy", function() { return PaginationProxy; });
42168/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
42169/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
42170/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
42171/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
42172/* harmony import */ var _utils_number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46);
42173/**
42174 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42175 * @version v27.3.0
42176 * @link https://www.ag-grid.com/
42177 * @license MIT
42178 */
42179var __extends = (undefined && undefined.__extends) || (function () {
42180 var extendStatics = function (d, b) {
42181 extendStatics = Object.setPrototypeOf ||
42182 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42183 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
42184 return extendStatics(d, b);
42185 };
42186 return function (d, b) {
42187 extendStatics(d, b);
42188 function __() { this.constructor = d; }
42189 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42190 };
42191})();
42192var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
42193 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
42194 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
42195 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
42196 return c > 3 && r && Object.defineProperty(target, key, r), r;
42197};
42198
42199
42200
42201
42202
42203var PaginationProxy = /** @class */ (function (_super) {
42204 __extends(PaginationProxy, _super);
42205 function PaginationProxy() {
42206 var _this = _super !== null && _super.apply(this, arguments) || this;
42207 _this.currentPage = 0;
42208 _this.topDisplayedRowIndex = 0;
42209 _this.bottomDisplayedRowIndex = 0;
42210 _this.pixelOffset = 0;
42211 _this.masterRowCount = 0;
42212 return _this;
42213 }
42214 PaginationProxy.prototype.postConstruct = function () {
42215 this.active = this.gridOptionsWrapper.isPagination();
42216 this.paginateChildRows = this.gridOptionsWrapper.isPaginateChildRows();
42217 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_MODEL_UPDATED, this.onModelUpdated.bind(this));
42218 this.addManagedListener(this.gridOptionsWrapper, 'paginationPageSize', this.onPaginationPageSizeChanged.bind(this));
42219 this.onModelUpdated();
42220 };
42221 PaginationProxy.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) {
42222 var res = this.rowModel.ensureRowHeightsValid(startPixel, endPixel, this.getPageFirstRow(), this.getPageLastRow());
42223 if (res) {
42224 this.calculatePages();
42225 }
42226 return res;
42227 };
42228 PaginationProxy.prototype.onModelUpdated = function (modelUpdatedEvent) {
42229 this.calculatePages();
42230 var paginationChangedEvent = {
42231 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PAGINATION_CHANGED,
42232 animate: modelUpdatedEvent ? modelUpdatedEvent.animate : false,
42233 newData: modelUpdatedEvent ? modelUpdatedEvent.newData : false,
42234 newPage: modelUpdatedEvent ? modelUpdatedEvent.newPage : false,
42235 keepRenderedRows: modelUpdatedEvent ? modelUpdatedEvent.keepRenderedRows : false,
42236 api: this.gridApi,
42237 columnApi: this.columnApi
42238 };
42239 this.eventService.dispatchEvent(paginationChangedEvent);
42240 };
42241 PaginationProxy.prototype.onPaginationPageSizeChanged = function () {
42242 this.calculatePages();
42243 var paginationChangedEvent = {
42244 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PAGINATION_CHANGED,
42245 animate: false,
42246 newData: false,
42247 newPage: false,
42248 // important to keep rendered rows, otherwise every time grid is resized,
42249 // we would destroy all the rows.
42250 keepRenderedRows: true,
42251 api: this.gridApi,
42252 columnApi: this.columnApi
42253 };
42254 this.eventService.dispatchEvent(paginationChangedEvent);
42255 };
42256 PaginationProxy.prototype.goToPage = function (page) {
42257 if (!this.active || this.currentPage === page) {
42258 return;
42259 }
42260 this.currentPage = page;
42261 var event = {
42262 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_MODEL_UPDATED,
42263 animate: false,
42264 keepRenderedRows: false,
42265 newData: false,
42266 newPage: true,
42267 api: this.gridApi,
42268 columnApi: this.columnApi
42269 };
42270 this.onModelUpdated(event);
42271 };
42272 PaginationProxy.prototype.getPixelOffset = function () {
42273 return this.pixelOffset;
42274 };
42275 PaginationProxy.prototype.getRow = function (index) {
42276 return this.rowModel.getRow(index);
42277 };
42278 PaginationProxy.prototype.getRowNode = function (id) {
42279 return this.rowModel.getRowNode(id);
42280 };
42281 PaginationProxy.prototype.getRowIndexAtPixel = function (pixel) {
42282 return this.rowModel.getRowIndexAtPixel(pixel);
42283 };
42284 PaginationProxy.prototype.getCurrentPageHeight = function () {
42285 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(this.topRowBounds) || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(this.bottomRowBounds)) {
42286 return 0;
42287 }
42288 return Math.max(this.bottomRowBounds.rowTop + this.bottomRowBounds.rowHeight - this.topRowBounds.rowTop, 0);
42289 };
42290 PaginationProxy.prototype.getCurrentPagePixelRange = function () {
42291 var pageFirstPixel = this.topRowBounds ? this.topRowBounds.rowTop : 0;
42292 var pageLastPixel = this.bottomRowBounds ? this.bottomRowBounds.rowTop + this.bottomRowBounds.rowHeight : 0;
42293 return { pageFirstPixel: pageFirstPixel, pageLastPixel: pageLastPixel };
42294 };
42295 PaginationProxy.prototype.isRowPresent = function (rowNode) {
42296 if (!this.rowModel.isRowPresent(rowNode)) {
42297 return false;
42298 }
42299 var nodeIsInPage = rowNode.rowIndex >= this.topDisplayedRowIndex && rowNode.rowIndex <= this.bottomDisplayedRowIndex;
42300 return nodeIsInPage;
42301 };
42302 PaginationProxy.prototype.isEmpty = function () {
42303 return this.rowModel.isEmpty();
42304 };
42305 PaginationProxy.prototype.isRowsToRender = function () {
42306 return this.rowModel.isRowsToRender();
42307 };
42308 PaginationProxy.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {
42309 return this.rowModel.getNodesInRangeForSelection(firstInRange, lastInRange);
42310 };
42311 PaginationProxy.prototype.forEachNode = function (callback) {
42312 return this.rowModel.forEachNode(callback);
42313 };
42314 PaginationProxy.prototype.getType = function () {
42315 return this.rowModel.getType();
42316 };
42317 PaginationProxy.prototype.getRowBounds = function (index) {
42318 var res = this.rowModel.getRowBounds(index);
42319 res.rowIndex = index;
42320 return res;
42321 };
42322 PaginationProxy.prototype.getPageFirstRow = function () {
42323 return this.topRowBounds ? this.topRowBounds.rowIndex : -1;
42324 };
42325 PaginationProxy.prototype.getPageLastRow = function () {
42326 return this.bottomRowBounds ? this.bottomRowBounds.rowIndex : -1;
42327 };
42328 PaginationProxy.prototype.getRowCount = function () {
42329 return this.rowModel.getRowCount();
42330 };
42331 PaginationProxy.prototype.getPageForIndex = function (index) {
42332 return Math.floor(index / this.pageSize);
42333 };
42334 PaginationProxy.prototype.goToPageWithIndex = function (index) {
42335 if (!this.active) {
42336 return;
42337 }
42338 var pageNumber = this.getPageForIndex(index);
42339 this.goToPage(pageNumber);
42340 };
42341 PaginationProxy.prototype.isRowInPage = function (row) {
42342 if (!this.active) {
42343 return true;
42344 }
42345 var rowPage = this.getPageForIndex(row.rowIndex);
42346 return rowPage === this.currentPage;
42347 };
42348 PaginationProxy.prototype.isLastPageFound = function () {
42349 return this.rowModel.isLastRowIndexKnown();
42350 };
42351 PaginationProxy.prototype.getCurrentPage = function () {
42352 return this.currentPage;
42353 };
42354 PaginationProxy.prototype.goToNextPage = function () {
42355 this.goToPage(this.currentPage + 1);
42356 };
42357 PaginationProxy.prototype.goToPreviousPage = function () {
42358 this.goToPage(this.currentPage - 1);
42359 };
42360 PaginationProxy.prototype.goToFirstPage = function () {
42361 this.goToPage(0);
42362 };
42363 PaginationProxy.prototype.goToLastPage = function () {
42364 var rowCount = this.rowModel.getRowCount();
42365 var lastPage = Math.floor(rowCount / this.pageSize);
42366 this.goToPage(lastPage);
42367 };
42368 PaginationProxy.prototype.getPageSize = function () {
42369 return this.pageSize;
42370 };
42371 PaginationProxy.prototype.getTotalPages = function () {
42372 return this.totalPages;
42373 };
42374 PaginationProxy.prototype.setPageSize = function () {
42375 // show put this into super class
42376 this.pageSize = this.gridOptionsWrapper.getPaginationPageSize();
42377 if (this.pageSize == null || this.pageSize < 1) {
42378 this.pageSize = 100;
42379 }
42380 };
42381 PaginationProxy.prototype.calculatePages = function () {
42382 if (this.active) {
42383 this.setPageSize();
42384 if (this.paginateChildRows) {
42385 this.calculatePagesAllRows();
42386 }
42387 else {
42388 this.calculatePagesMasterRowsOnly();
42389 }
42390 }
42391 else {
42392 this.calculatedPagesNotActive();
42393 }
42394 this.topRowBounds = this.rowModel.getRowBounds(this.topDisplayedRowIndex);
42395 if (this.topRowBounds) {
42396 this.topRowBounds.rowIndex = this.topDisplayedRowIndex;
42397 }
42398 this.bottomRowBounds = this.rowModel.getRowBounds(this.bottomDisplayedRowIndex);
42399 if (this.bottomRowBounds) {
42400 this.bottomRowBounds.rowIndex = this.bottomDisplayedRowIndex;
42401 }
42402 this.setPixelOffset(Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(this.topRowBounds) ? this.topRowBounds.rowTop : 0);
42403 };
42404 PaginationProxy.prototype.setPixelOffset = function (value) {
42405 if (this.pixelOffset === value) {
42406 return;
42407 }
42408 this.pixelOffset = value;
42409 this.eventService.dispatchEvent({ type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PAGINATION_PIXEL_OFFSET_CHANGED });
42410 };
42411 PaginationProxy.prototype.setZeroRows = function () {
42412 this.masterRowCount = 0;
42413 this.topDisplayedRowIndex = 0;
42414 this.bottomDisplayedRowIndex = -1;
42415 this.currentPage = 0;
42416 this.totalPages = 0;
42417 };
42418 PaginationProxy.prototype.calculatePagesMasterRowsOnly = function () {
42419 // const csrm = <ClientSideRowModel> this.rowModel;
42420 // const rootNode = csrm.getRootNode();
42421 // const masterRows = rootNode.childrenAfterSort;
42422 this.masterRowCount = this.rowModel.getTopLevelRowCount();
42423 // we say <=0 (rather than =0) as viewport returns -1 when no rows
42424 if (this.masterRowCount <= 0) {
42425 this.setZeroRows();
42426 return;
42427 }
42428 var masterLastRowIndex = this.masterRowCount - 1;
42429 this.totalPages = Math.floor((masterLastRowIndex) / this.pageSize) + 1;
42430 if (this.currentPage >= this.totalPages) {
42431 this.currentPage = this.totalPages - 1;
42432 }
42433 if (!Object(_utils_number__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(this.currentPage) || this.currentPage < 0) {
42434 this.currentPage = 0;
42435 }
42436 var masterPageStartIndex = this.pageSize * this.currentPage;
42437 var masterPageEndIndex = (this.pageSize * (this.currentPage + 1)) - 1;
42438 if (masterPageEndIndex > masterLastRowIndex) {
42439 masterPageEndIndex = masterLastRowIndex;
42440 }
42441 this.topDisplayedRowIndex = this.rowModel.getTopLevelRowDisplayedIndex(masterPageStartIndex);
42442 // masterRows[masterPageStartIndex].rowIndex;
42443 if (masterPageEndIndex === masterLastRowIndex) {
42444 // if showing the last master row, then we want to show the very last row of the model
42445 this.bottomDisplayedRowIndex = this.rowModel.getRowCount() - 1;
42446 }
42447 else {
42448 var firstIndexNotToShow = this.rowModel.getTopLevelRowDisplayedIndex(masterPageEndIndex + 1);
42449 //masterRows[masterPageEndIndex + 1].rowIndex;
42450 // this gets the index of the last child - eg current row is open, we want to display all children,
42451 // the index of the last child is one less than the index of the next parent row.
42452 this.bottomDisplayedRowIndex = firstIndexNotToShow - 1;
42453 }
42454 };
42455 PaginationProxy.prototype.getMasterRowCount = function () {
42456 return this.masterRowCount;
42457 };
42458 PaginationProxy.prototype.calculatePagesAllRows = function () {
42459 this.masterRowCount = this.rowModel.getRowCount();
42460 if (this.masterRowCount === 0) {
42461 this.setZeroRows();
42462 return;
42463 }
42464 var maxRowIndex = this.masterRowCount - 1;
42465 this.totalPages = Math.floor((maxRowIndex) / this.pageSize) + 1;
42466 if (this.currentPage >= this.totalPages) {
42467 this.currentPage = this.totalPages - 1;
42468 }
42469 if (!Object(_utils_number__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(this.currentPage) || this.currentPage < 0) {
42470 this.currentPage = 0;
42471 }
42472 this.topDisplayedRowIndex = this.pageSize * this.currentPage;
42473 this.bottomDisplayedRowIndex = (this.pageSize * (this.currentPage + 1)) - 1;
42474 if (this.bottomDisplayedRowIndex > maxRowIndex) {
42475 this.bottomDisplayedRowIndex = maxRowIndex;
42476 }
42477 };
42478 PaginationProxy.prototype.calculatedPagesNotActive = function () {
42479 this.pageSize = this.rowModel.getRowCount();
42480 this.totalPages = 1;
42481 this.currentPage = 0;
42482 this.topDisplayedRowIndex = 0;
42483 this.bottomDisplayedRowIndex = this.rowModel.getRowCount() - 1;
42484 };
42485 __decorate([
42486 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('rowModel')
42487 ], PaginationProxy.prototype, "rowModel", void 0);
42488 __decorate([
42489 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnApi')
42490 ], PaginationProxy.prototype, "columnApi", void 0);
42491 __decorate([
42492 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('gridApi')
42493 ], PaginationProxy.prototype, "gridApi", void 0);
42494 __decorate([
42495 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
42496 ], PaginationProxy.prototype, "postConstruct", null);
42497 PaginationProxy = __decorate([
42498 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('paginationProxy')
42499 ], PaginationProxy);
42500 return PaginationProxy;
42501}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
42502
42503
42504
42505
42506
42507/***/ }),
42508/* 186 */
42509/***/ (function(module, __webpack_exports__, __webpack_require__) {
42510
42511"use strict";
42512__webpack_require__.r(__webpack_exports__);
42513/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StylingService", function() { return StylingService; });
42514/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
42515/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
42516/**
42517 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42518 * @version v27.3.0
42519 * @link https://www.ag-grid.com/
42520 * @license MIT
42521 */
42522var __extends = (undefined && undefined.__extends) || (function () {
42523 var extendStatics = function (d, b) {
42524 extendStatics = Object.setPrototypeOf ||
42525 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42526 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
42527 return extendStatics(d, b);
42528 };
42529 return function (d, b) {
42530 extendStatics(d, b);
42531 function __() { this.constructor = d; }
42532 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42533 };
42534})();
42535var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
42536 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
42537 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
42538 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
42539 return c > 3 && r && Object.defineProperty(target, key, r), r;
42540};
42541
42542
42543var StylingService = /** @class */ (function (_super) {
42544 __extends(StylingService, _super);
42545 function StylingService() {
42546 return _super !== null && _super.apply(this, arguments) || this;
42547 }
42548 StylingService.prototype.processAllCellClasses = function (colDef, params, onApplicableClass, onNotApplicableClass) {
42549 this.processClassRules(colDef.cellClassRules, params, onApplicableClass, onNotApplicableClass);
42550 this.processStaticCellClasses(colDef, params, onApplicableClass);
42551 };
42552 StylingService.prototype.processClassRules = function (classRules, params, onApplicableClass, onNotApplicableClass) {
42553 if (classRules == null) {
42554 return;
42555 }
42556 var classNames = Object.keys(classRules);
42557 var classesToApply = {};
42558 var classesToRemove = {};
42559 var _loop_1 = function (i) {
42560 var className = classNames[i];
42561 var rule = classRules[className];
42562 var resultOfRule;
42563 if (typeof rule === 'string') {
42564 resultOfRule = this_1.expressionService.evaluate(rule, params);
42565 }
42566 else if (typeof rule === 'function') {
42567 resultOfRule = rule(params);
42568 }
42569 // in case className = 'my-class1 my-class2', we need to split into individual class names
42570 className.split(' ').forEach(function (singleClass) {
42571 if (singleClass == null || singleClass.trim() == '') {
42572 return;
42573 }
42574 resultOfRule ? classesToApply[singleClass] = true : classesToRemove[singleClass] = true;
42575 });
42576 };
42577 var this_1 = this;
42578 for (var i = 0; i < classNames.length; i++) {
42579 _loop_1(i);
42580 }
42581 // we remove all classes first, then add all classes second,
42582 // in case a class appears in more than one rule, this means it will be added
42583 // if appears in at least one truthy rule
42584 if (onNotApplicableClass) {
42585 Object.keys(classesToRemove).forEach(onNotApplicableClass);
42586 }
42587 Object.keys(classesToApply).forEach(onApplicableClass);
42588 };
42589 StylingService.prototype.getStaticCellClasses = function (colDef, params) {
42590 var cellClass = colDef.cellClass;
42591 if (!cellClass) {
42592 return [];
42593 }
42594 var classOrClasses;
42595 if (typeof cellClass === 'function') {
42596 var cellClassFunc = cellClass;
42597 classOrClasses = cellClassFunc(params);
42598 }
42599 else {
42600 classOrClasses = cellClass;
42601 }
42602 if (typeof classOrClasses === 'string') {
42603 classOrClasses = [classOrClasses];
42604 }
42605 return classOrClasses || [];
42606 };
42607 StylingService.prototype.processStaticCellClasses = function (colDef, params, onApplicableClass) {
42608 var classOrClasses = this.getStaticCellClasses(colDef, params);
42609 classOrClasses.forEach(function (cssClassItem) {
42610 onApplicableClass(cssClassItem);
42611 });
42612 };
42613 __decorate([
42614 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('expressionService')
42615 ], StylingService.prototype, "expressionService", void 0);
42616 StylingService = __decorate([
42617 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('stylingService')
42618 ], StylingService);
42619 return StylingService;
42620}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
42621
42622
42623
42624
42625
42626/***/ }),
42627/* 187 */
42628/***/ (function(module, __webpack_exports__, __webpack_require__) {
42629
42630"use strict";
42631__webpack_require__.r(__webpack_exports__);
42632/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgRadioButton", function() { return AgRadioButton; });
42633/* harmony import */ var _agCheckbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(163);
42634/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24);
42635/**
42636 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42637 * @version v27.3.0
42638 * @link https://www.ag-grid.com/
42639 * @license MIT
42640 */
42641var __extends = (undefined && undefined.__extends) || (function () {
42642 var extendStatics = function (d, b) {
42643 extendStatics = Object.setPrototypeOf ||
42644 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42645 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
42646 return extendStatics(d, b);
42647 };
42648 return function (d, b) {
42649 extendStatics(d, b);
42650 function __() { this.constructor = d; }
42651 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42652 };
42653})();
42654
42655
42656var AgRadioButton = /** @class */ (function (_super) {
42657 __extends(AgRadioButton, _super);
42658 function AgRadioButton(config) {
42659 return _super.call(this, config, 'ag-radio-button', 'radio') || this;
42660 }
42661 AgRadioButton.prototype.isSelected = function () {
42662 return this.eInput.checked;
42663 };
42664 AgRadioButton.prototype.toggle = function () {
42665 if (this.eInput.disabled) {
42666 return;
42667 }
42668 // do not allow an active radio button to be deselected
42669 if (!this.isSelected()) {
42670 this.setValue(true);
42671 }
42672 };
42673 AgRadioButton.prototype.addInputListeners = function () {
42674 _super.prototype.addInputListeners.call(this);
42675 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CHECKBOX_CHANGED, this.onChange.bind(this));
42676 };
42677 /**
42678 * This ensures that if another radio button in the same named group is selected, we deselect this radio button.
42679 * By default the browser does this for you, but we are managing classes ourselves in order to ensure input
42680 * elements are styled correctly in IE11, and the DOM 'changed' event is only fired when a button is selected,
42681 * not deselected, so we need to use our own event.
42682 */
42683 AgRadioButton.prototype.onChange = function (event) {
42684 if (event.selected &&
42685 event.name &&
42686 this.eInput.name &&
42687 this.eInput.name === event.name &&
42688 event.id &&
42689 this.eInput.id !== event.id) {
42690 this.setValue(false, true);
42691 }
42692 };
42693 return AgRadioButton;
42694}(_agCheckbox__WEBPACK_IMPORTED_MODULE_0__["AgCheckbox"]));
42695
42696
42697
42698
42699
42700/***/ }),
42701/* 188 */
42702/***/ (function(module, __webpack_exports__, __webpack_require__) {
42703
42704"use strict";
42705__webpack_require__.r(__webpack_exports__);
42706/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgToggleButton", function() { return AgToggleButton; });
42707/* harmony import */ var _agCheckbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(163);
42708/**
42709 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42710 * @version v27.3.0
42711 * @link https://www.ag-grid.com/
42712 * @license MIT
42713 */
42714var __extends = (undefined && undefined.__extends) || (function () {
42715 var extendStatics = function (d, b) {
42716 extendStatics = Object.setPrototypeOf ||
42717 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42718 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
42719 return extendStatics(d, b);
42720 };
42721 return function (d, b) {
42722 extendStatics(d, b);
42723 function __() { this.constructor = d; }
42724 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42725 };
42726})();
42727
42728var AgToggleButton = /** @class */ (function (_super) {
42729 __extends(AgToggleButton, _super);
42730 function AgToggleButton(config) {
42731 return _super.call(this, config, 'ag-toggle-button') || this;
42732 }
42733 AgToggleButton.prototype.setValue = function (value, silent) {
42734 _super.prototype.setValue.call(this, value, silent);
42735 this.addOrRemoveCssClass('ag-selected', this.getValue());
42736 return this;
42737 };
42738 return AgToggleButton;
42739}(_agCheckbox__WEBPACK_IMPORTED_MODULE_0__["AgCheckbox"]));
42740
42741
42742
42743
42744
42745/***/ }),
42746/* 189 */
42747/***/ (function(module, __webpack_exports__, __webpack_require__) {
42748
42749"use strict";
42750__webpack_require__.r(__webpack_exports__);
42751/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgInputTextField", function() { return AgInputTextField; });
42752/* harmony import */ var _agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71);
42753/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
42754/**
42755 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42756 * @version v27.3.0
42757 * @link https://www.ag-grid.com/
42758 * @license MIT
42759 */
42760var __extends = (undefined && undefined.__extends) || (function () {
42761 var extendStatics = function (d, b) {
42762 extendStatics = Object.setPrototypeOf ||
42763 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42764 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
42765 return extendStatics(d, b);
42766 };
42767 return function (d, b) {
42768 extendStatics(d, b);
42769 function __() { this.constructor = d; }
42770 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42771 };
42772})();
42773
42774
42775var AgInputTextField = /** @class */ (function (_super) {
42776 __extends(AgInputTextField, _super);
42777 function AgInputTextField(config, className, inputType) {
42778 if (className === void 0) { className = 'ag-text-field'; }
42779 if (inputType === void 0) { inputType = 'text'; }
42780 return _super.call(this, config, className, inputType) || this;
42781 }
42782 AgInputTextField.prototype.postConstruct = function () {
42783 _super.prototype.postConstruct.call(this);
42784 if (this.config.allowedCharPattern) {
42785 this.preventDisallowedCharacters();
42786 }
42787 };
42788 AgInputTextField.prototype.setValue = function (value, silent) {
42789 var ret = _super.prototype.setValue.call(this, value, silent);
42790 if (this.eInput.value !== value) {
42791 this.eInput.value = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_1__["exists"])(value) ? value : '';
42792 }
42793 return ret;
42794 };
42795 AgInputTextField.prototype.preventDisallowedCharacters = function () {
42796 var pattern = new RegExp("[" + this.config.allowedCharPattern + "]");
42797 var preventDisallowedCharacters = function (event) {
42798 if (event.key && !pattern.test(event.key)) {
42799 event.preventDefault();
42800 }
42801 };
42802 this.addManagedListener(this.eInput, 'keypress', preventDisallowedCharacters);
42803 this.addManagedListener(this.eInput, 'paste', function (e) {
42804 var _a;
42805 var text = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
42806 if (text && text.split('').some(function (c) { return !pattern.test(c); })) {
42807 e.preventDefault();
42808 }
42809 });
42810 };
42811 return AgInputTextField;
42812}(_agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractInputField"]));
42813
42814
42815
42816
42817
42818/***/ }),
42819/* 190 */
42820/***/ (function(module, __webpack_exports__, __webpack_require__) {
42821
42822"use strict";
42823__webpack_require__.r(__webpack_exports__);
42824/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgInputTextArea", function() { return AgInputTextArea; });
42825/* harmony import */ var _agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71);
42826/**
42827 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42828 * @version v27.3.0
42829 * @link https://www.ag-grid.com/
42830 * @license MIT
42831 */
42832var __extends = (undefined && undefined.__extends) || (function () {
42833 var extendStatics = function (d, b) {
42834 extendStatics = Object.setPrototypeOf ||
42835 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42836 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
42837 return extendStatics(d, b);
42838 };
42839 return function (d, b) {
42840 extendStatics(d, b);
42841 function __() { this.constructor = d; }
42842 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42843 };
42844})();
42845
42846var AgInputTextArea = /** @class */ (function (_super) {
42847 __extends(AgInputTextArea, _super);
42848 function AgInputTextArea(config) {
42849 return _super.call(this, config, 'ag-text-area', null, 'textarea') || this;
42850 }
42851 AgInputTextArea.prototype.setValue = function (value, silent) {
42852 var ret = _super.prototype.setValue.call(this, value, silent);
42853 this.eInput.value = value;
42854 return ret;
42855 };
42856 AgInputTextArea.prototype.setCols = function (cols) {
42857 this.eInput.cols = cols;
42858 return this;
42859 };
42860 AgInputTextArea.prototype.setRows = function (rows) {
42861 this.eInput.rows = rows;
42862 return this;
42863 };
42864 return AgInputTextArea;
42865}(_agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractInputField"]));
42866
42867
42868
42869
42870
42871/***/ }),
42872/* 191 */
42873/***/ (function(module, __webpack_exports__, __webpack_require__) {
42874
42875"use strict";
42876__webpack_require__.r(__webpack_exports__);
42877/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgInputNumberField", function() { return AgInputNumberField; });
42878/* harmony import */ var _agInputTextField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(189);
42879/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42);
42880/**
42881 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42882 * @version v27.3.0
42883 * @link https://www.ag-grid.com/
42884 * @license MIT
42885 */
42886var __extends = (undefined && undefined.__extends) || (function () {
42887 var extendStatics = function (d, b) {
42888 extendStatics = Object.setPrototypeOf ||
42889 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42890 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
42891 return extendStatics(d, b);
42892 };
42893 return function (d, b) {
42894 extendStatics(d, b);
42895 function __() { this.constructor = d; }
42896 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42897 };
42898})();
42899
42900
42901var AgInputNumberField = /** @class */ (function (_super) {
42902 __extends(AgInputNumberField, _super);
42903 function AgInputNumberField(config) {
42904 return _super.call(this, config, 'ag-number-field', 'number') || this;
42905 }
42906 AgInputNumberField.prototype.postConstruct = function () {
42907 var _this = this;
42908 _super.prototype.postConstruct.call(this);
42909 this.addManagedListener(this.eInput, 'blur', function () {
42910 var floatedValue = parseFloat(_this.eInput.value);
42911 var value = isNaN(floatedValue) ? '' : _this.normalizeValue(floatedValue.toString());
42912 if (_this.value !== value) {
42913 _this.setValue(value);
42914 }
42915 });
42916 this.eInput.step = 'any';
42917 };
42918 AgInputNumberField.prototype.normalizeValue = function (value) {
42919 if (value === '') {
42920 return '';
42921 }
42922 if (this.precision) {
42923 value = this.adjustPrecision(value);
42924 }
42925 var val = parseFloat(value);
42926 if (this.min != null && val < this.min) {
42927 value = this.min.toString();
42928 }
42929 else if (this.max != null && val > this.max) {
42930 value = this.max.toString();
42931 }
42932 return value;
42933 };
42934 AgInputNumberField.prototype.adjustPrecision = function (value) {
42935 if (this.precision) {
42936 var floatString = parseFloat(value).toFixed(this.precision);
42937 value = parseFloat(floatString).toString();
42938 }
42939 return value;
42940 };
42941 AgInputNumberField.prototype.setMin = function (min) {
42942 if (this.min === min) {
42943 return this;
42944 }
42945 this.min = min;
42946 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["addOrRemoveAttribute"])(this.eInput, 'min', min);
42947 return this;
42948 };
42949 AgInputNumberField.prototype.setMax = function (max) {
42950 if (this.max === max) {
42951 return this;
42952 }
42953 this.max = max;
42954 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["addOrRemoveAttribute"])(this.eInput, 'max', max);
42955 return this;
42956 };
42957 AgInputNumberField.prototype.setPrecision = function (precision) {
42958 this.precision = precision;
42959 return this;
42960 };
42961 AgInputNumberField.prototype.setStep = function (step) {
42962 if (this.step === step) {
42963 return this;
42964 }
42965 this.step = step;
42966 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["addOrRemoveAttribute"])(this.eInput, 'step', step);
42967 return this;
42968 };
42969 AgInputNumberField.prototype.setValue = function (value, silent) {
42970 value = this.adjustPrecision(value);
42971 var normalizedValue = this.normalizeValue(value);
42972 if (value != normalizedValue) {
42973 return this;
42974 }
42975 return _super.prototype.setValue.call(this, value, silent);
42976 };
42977 return AgInputNumberField;
42978}(_agInputTextField__WEBPACK_IMPORTED_MODULE_0__["AgInputTextField"]));
42979
42980
42981
42982
42983
42984/***/ }),
42985/* 192 */
42986/***/ (function(module, __webpack_exports__, __webpack_require__) {
42987
42988"use strict";
42989__webpack_require__.r(__webpack_exports__);
42990/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgInputRange", function() { return AgInputRange; });
42991/* harmony import */ var _agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71);
42992/**
42993 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42994 * @version v27.3.0
42995 * @link https://www.ag-grid.com/
42996 * @license MIT
42997 */
42998var __extends = (undefined && undefined.__extends) || (function () {
42999 var extendStatics = function (d, b) {
43000 extendStatics = Object.setPrototypeOf ||
43001 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43002 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
43003 return extendStatics(d, b);
43004 };
43005 return function (d, b) {
43006 extendStatics(d, b);
43007 function __() { this.constructor = d; }
43008 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43009 };
43010})();
43011
43012var AgInputRange = /** @class */ (function (_super) {
43013 __extends(AgInputRange, _super);
43014 function AgInputRange(config) {
43015 return _super.call(this, config, 'ag-range-field', 'range') || this;
43016 }
43017 AgInputRange.prototype.postConstruct = function () {
43018 _super.prototype.postConstruct.call(this);
43019 var _a = this.config, min = _a.min, max = _a.max, step = _a.step;
43020 if (min != null) {
43021 this.setMinValue(min);
43022 }
43023 if (max != null) {
43024 this.setMaxValue(max);
43025 }
43026 this.setStep(step || 1);
43027 };
43028 AgInputRange.prototype.addInputListeners = function () {
43029 var _this = this;
43030 this.addManagedListener(this.eInput, 'input', function (e) {
43031 var value = e.target.value;
43032 _this.setValue(value);
43033 });
43034 };
43035 AgInputRange.prototype.setMinValue = function (value) {
43036 this.min = value;
43037 this.eInput.setAttribute('min', value.toString());
43038 return this;
43039 };
43040 AgInputRange.prototype.setMaxValue = function (value) {
43041 this.max = value;
43042 this.eInput.setAttribute('max', value.toString());
43043 return this;
43044 };
43045 AgInputRange.prototype.setStep = function (value) {
43046 this.eInput.setAttribute('step', value.toString());
43047 return this;
43048 };
43049 AgInputRange.prototype.setValue = function (value, silent) {
43050 if (this.min != null) {
43051 value = Math.max(parseFloat(value), this.min).toString();
43052 }
43053 if (this.max != null) {
43054 value = Math.min(parseFloat(value), this.max).toString();
43055 }
43056 var ret = _super.prototype.setValue.call(this, value, silent);
43057 this.eInput.value = value;
43058 return ret;
43059 };
43060 return AgInputRange;
43061}(_agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractInputField"]));
43062
43063
43064
43065
43066
43067/***/ }),
43068/* 193 */
43069/***/ (function(module, __webpack_exports__, __webpack_require__) {
43070
43071"use strict";
43072__webpack_require__.r(__webpack_exports__);
43073/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgSlider", function() { return AgSlider; });
43074/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
43075/* harmony import */ var _agAbstractLabel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68);
43076/* harmony import */ var _agAbstractField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67);
43077/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
43078/**
43079 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
43080 * @version v27.3.0
43081 * @link https://www.ag-grid.com/
43082 * @license MIT
43083 */
43084var __extends = (undefined && undefined.__extends) || (function () {
43085 var extendStatics = function (d, b) {
43086 extendStatics = Object.setPrototypeOf ||
43087 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43088 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
43089 return extendStatics(d, b);
43090 };
43091 return function (d, b) {
43092 extendStatics(d, b);
43093 function __() { this.constructor = d; }
43094 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43095 };
43096})();
43097var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
43098 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43099 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43100 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
43101 return c > 3 && r && Object.defineProperty(target, key, r), r;
43102};
43103
43104
43105
43106
43107var AgSlider = /** @class */ (function (_super) {
43108 __extends(AgSlider, _super);
43109 function AgSlider(config) {
43110 var _this = _super.call(this, config, AgSlider.TEMPLATE) || this;
43111 _this.labelAlignment = 'top';
43112 return _this;
43113 }
43114 AgSlider.prototype.init = function () {
43115 this.eSlider.addCssClass('ag-slider-field');
43116 };
43117 AgSlider.prototype.onValueChange = function (callbackFn) {
43118 var _this = this;
43119 var eventChanged = _agAbstractField__WEBPACK_IMPORTED_MODULE_2__["AgAbstractField"].EVENT_CHANGED;
43120 this.addManagedListener(this.eText, eventChanged, function () {
43121 var textValue = parseFloat(_this.eText.getValue());
43122 _this.eSlider.setValue(textValue.toString(), true);
43123 callbackFn(textValue || 0);
43124 });
43125 this.addManagedListener(this.eSlider, eventChanged, function () {
43126 var sliderValue = _this.eSlider.getValue();
43127 _this.eText.setValue(sliderValue, true);
43128 callbackFn(parseFloat(sliderValue));
43129 });
43130 return this;
43131 };
43132 AgSlider.prototype.setSliderWidth = function (width) {
43133 this.eSlider.setWidth(width);
43134 return this;
43135 };
43136 AgSlider.prototype.setTextFieldWidth = function (width) {
43137 this.eText.setWidth(width);
43138 return this;
43139 };
43140 AgSlider.prototype.setMinValue = function (minValue) {
43141 this.eSlider.setMinValue(minValue);
43142 this.eText.setMin(minValue);
43143 return this;
43144 };
43145 AgSlider.prototype.setMaxValue = function (maxValue) {
43146 this.eSlider.setMaxValue(maxValue);
43147 this.eText.setMax(maxValue);
43148 return this;
43149 };
43150 AgSlider.prototype.getValue = function () {
43151 return this.eText.getValue();
43152 };
43153 AgSlider.prototype.setValue = function (value) {
43154 if (this.getValue() === value) {
43155 return this;
43156 }
43157 this.eText.setValue(value, true);
43158 this.eSlider.setValue(value, true);
43159 this.dispatchEvent({ type: _agAbstractField__WEBPACK_IMPORTED_MODULE_2__["AgAbstractField"].EVENT_CHANGED });
43160 return this;
43161 };
43162 AgSlider.prototype.setStep = function (step) {
43163 this.eSlider.setStep(step);
43164 this.eText.setStep(step);
43165 return this;
43166 };
43167 AgSlider.TEMPLATE = "<div class=\"ag-slider\">\n <label ref=\"eLabel\"></label>\n <div class=\"ag-wrapper ag-slider-wrapper\">\n <ag-input-range ref=\"eSlider\"></ag-input-range>\n <ag-input-number-field ref=\"eText\"></ag-input-number-field>\n </div>\n </div>";
43168 __decorate([
43169 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eLabel')
43170 ], AgSlider.prototype, "eLabel", void 0);
43171 __decorate([
43172 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eSlider')
43173 ], AgSlider.prototype, "eSlider", void 0);
43174 __decorate([
43175 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eText')
43176 ], AgSlider.prototype, "eText", void 0);
43177 __decorate([
43178 _context_context__WEBPACK_IMPORTED_MODULE_3__["PostConstruct"]
43179 ], AgSlider.prototype, "init", null);
43180 return AgSlider;
43181}(_agAbstractLabel__WEBPACK_IMPORTED_MODULE_1__["AgAbstractLabel"]));
43182
43183
43184
43185
43186
43187/***/ }),
43188/* 194 */
43189/***/ (function(module, __webpack_exports__, __webpack_require__) {
43190
43191"use strict";
43192__webpack_require__.r(__webpack_exports__);
43193/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgAngleSelect", function() { return AgAngleSelect; });
43194/* harmony import */ var _agAbstractLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68);
43195/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
43196/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
43197/* harmony import */ var _agAbstractField__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67);
43198/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
43199/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42);
43200/**
43201 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
43202 * @version v27.3.0
43203 * @link https://www.ag-grid.com/
43204 * @license MIT
43205 */
43206var __extends = (undefined && undefined.__extends) || (function () {
43207 var extendStatics = function (d, b) {
43208 extendStatics = Object.setPrototypeOf ||
43209 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43210 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
43211 return extendStatics(d, b);
43212 };
43213 return function (d, b) {
43214 extendStatics(d, b);
43215 function __() { this.constructor = d; }
43216 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43217 };
43218})();
43219var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
43220 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43221 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43222 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
43223 return c > 3 && r && Object.defineProperty(target, key, r), r;
43224};
43225
43226
43227
43228
43229
43230
43231var AgAngleSelect = /** @class */ (function (_super) {
43232 __extends(AgAngleSelect, _super);
43233 function AgAngleSelect(config) {
43234 var _this = _super.call(this, config, AgAngleSelect.TEMPLATE) || this;
43235 _this.radius = 0;
43236 _this.offsetX = 0;
43237 _this.offsetY = 0;
43238 return _this;
43239 }
43240 AgAngleSelect.prototype.postConstruct = function () {
43241 var _this = this;
43242 _super.prototype.postConstruct.call(this);
43243 this.dragListener = {
43244 eElement: this.eParentCircle,
43245 dragStartPixels: 0,
43246 onDragStart: function (e) {
43247 _this.parentCircleRect = _this.eParentCircle.getBoundingClientRect();
43248 },
43249 onDragging: function (e) { return _this.calculateAngleDrag(e); },
43250 onDragStop: function () { }
43251 };
43252 this.dragService.addDragSource(this.dragListener);
43253 this.eAngleValue
43254 .setLabel('')
43255 .setLabelWidth(5)
43256 .setInputWidth(45)
43257 .setMin(0)
43258 .setMax(360)
43259 .setValue("" + this.degrees)
43260 .onValueChange(function (value) {
43261 if (value == null || value === '') {
43262 value = '0';
43263 }
43264 value = _this.eAngleValue.normalizeValue(value);
43265 var floatValue = parseFloat(value);
43266 if (floatValue > 180) {
43267 floatValue = floatValue - 360;
43268 }
43269 _this.setValue(floatValue);
43270 });
43271 this.updateNumberInput();
43272 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(this.getValue())) {
43273 this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString());
43274 }
43275 this.addManagedListener(this, _agAbstractField__WEBPACK_IMPORTED_MODULE_3__["AgAbstractField"].EVENT_CHANGED, function () {
43276 var eDocument = _this.gridOptionsWrapper.getDocument();
43277 if (_this.eAngleValue.getInputElement().contains(eDocument.activeElement)) {
43278 return;
43279 }
43280 _this.updateNumberInput();
43281 });
43282 };
43283 AgAngleSelect.prototype.updateNumberInput = function () {
43284 var normalizedValue = this.normalizeNegativeValue(this.getValue());
43285 this.eAngleValue.setValue(normalizedValue.toString());
43286 };
43287 AgAngleSelect.prototype.positionChildCircle = function (radians) {
43288 var rect = this.parentCircleRect || { width: 24, height: 24 };
43289 var eChildCircle = this.eChildCircle;
43290 var centerX = rect.width / 2;
43291 var centerY = rect.height / 2;
43292 eChildCircle.style.left = centerX + Math.cos(radians) * 8 + "px";
43293 eChildCircle.style.top = centerY + Math.sin(radians) * 8 + "px";
43294 };
43295 AgAngleSelect.prototype.calculatePolar = function () {
43296 var x = this.offsetX;
43297 var y = this.offsetY;
43298 var radians = Math.atan2(y, x);
43299 this.degrees = this.toDegrees(radians);
43300 this.radius = Math.sqrt((x * x) + (y * y));
43301 this.positionChildCircle(radians);
43302 };
43303 AgAngleSelect.prototype.calculateCartesian = function () {
43304 var radians = this.toRadians(this.getValue());
43305 var radius = this.getRadius();
43306 this
43307 .setOffsetX(Math.cos(radians) * radius)
43308 .setOffsetY(Math.sin(radians) * radius);
43309 };
43310 AgAngleSelect.prototype.setOffsetX = function (offset) {
43311 if (this.offsetX !== offset) {
43312 this.offsetX = offset;
43313 this.calculatePolar();
43314 }
43315 return this;
43316 };
43317 AgAngleSelect.prototype.setOffsetY = function (offset) {
43318 if (this.offsetY !== offset) {
43319 this.offsetY = offset;
43320 this.calculatePolar();
43321 }
43322 return this;
43323 };
43324 AgAngleSelect.prototype.calculateAngleDrag = function (e) {
43325 var rect = this.parentCircleRect;
43326 var centerX = rect.width / 2;
43327 var centerY = rect.height / 2;
43328 var x = e.clientX - rect.left;
43329 var y = e.clientY - rect.top;
43330 var dx = x - centerX;
43331 var dy = y - centerY;
43332 var radians = Math.atan2(dy, dx);
43333 this.setValue(radians, true);
43334 };
43335 AgAngleSelect.prototype.toDegrees = function (radians) {
43336 return radians / Math.PI * 180;
43337 };
43338 AgAngleSelect.prototype.toRadians = function (degrees) {
43339 return degrees / 180 * Math.PI;
43340 };
43341 AgAngleSelect.prototype.normalizeNegativeValue = function (degrees) {
43342 return degrees < 0 ? 360 + degrees : degrees;
43343 };
43344 AgAngleSelect.prototype.normalizeAngle180 = function (radians) {
43345 radians %= Math.PI * 2;
43346 if (radians < -Math.PI) {
43347 radians += Math.PI * 2;
43348 }
43349 else if (radians >= Math.PI) {
43350 radians -= Math.PI * 2;
43351 }
43352 return radians;
43353 };
43354 AgAngleSelect.prototype.getRadius = function () {
43355 return this.radius;
43356 };
43357 AgAngleSelect.prototype.setRadius = function (r) {
43358 if (this.radius === r) {
43359 return this;
43360 }
43361 this.radius = r;
43362 this.calculateCartesian();
43363 return this;
43364 };
43365 AgAngleSelect.prototype.onValueChange = function (callbackFn) {
43366 var _this = this;
43367 this.addManagedListener(this, _agAbstractField__WEBPACK_IMPORTED_MODULE_3__["AgAbstractField"].EVENT_CHANGED, function () {
43368 callbackFn(_this.degrees);
43369 });
43370 return this;
43371 };
43372 AgAngleSelect.prototype.getValue = function (radians) {
43373 return radians ? this.toRadians(this.degrees) : this.degrees;
43374 };
43375 AgAngleSelect.prototype.setValue = function (degrees, radians) {
43376 var radiansValue;
43377 if (!radians) {
43378 radiansValue = this.normalizeAngle180(this.toRadians(degrees));
43379 }
43380 else {
43381 radiansValue = degrees;
43382 }
43383 degrees = this.toDegrees(radiansValue);
43384 if (this.degrees !== degrees) {
43385 this.degrees = Math.floor(degrees);
43386 this.calculateCartesian();
43387 this.positionChildCircle(radiansValue);
43388 this.dispatchEvent({ type: _agAbstractField__WEBPACK_IMPORTED_MODULE_3__["AgAbstractField"].EVENT_CHANGED });
43389 }
43390 return this;
43391 };
43392 AgAngleSelect.prototype.setWidth = function (width) {
43393 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["setFixedWidth"])(this.getGui(), width);
43394 return this;
43395 };
43396 AgAngleSelect.prototype.destroy = function () {
43397 this.dragService.removeDragSource(this.dragListener);
43398 _super.prototype.destroy.call(this);
43399 };
43400 AgAngleSelect.TEMPLATE = "<div class=\"ag-angle-select\">\n <div ref=\"eLabel\"></div>\n <div class=\"ag-wrapper ag-angle-select-wrapper\">\n <div ref=\"eAngleSelectField\" class=\"ag-angle-select-field\">\n <div ref=\"eParentCircle\" class=\"ag-angle-select-parent-circle\">\n <div ref=\"eChildCircle\" class=\"ag-angle-select-child-circle\"></div>\n </div>\n </div>\n <ag-input-number-field ref=\"eAngleValue\"></ag-input-number-field>\n </div>\n </div>";
43401 __decorate([
43402 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eLabel')
43403 ], AgAngleSelect.prototype, "eLabel", void 0);
43404 __decorate([
43405 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eParentCircle')
43406 ], AgAngleSelect.prototype, "eParentCircle", void 0);
43407 __decorate([
43408 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eChildCircle')
43409 ], AgAngleSelect.prototype, "eChildCircle", void 0);
43410 __decorate([
43411 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eAngleValue')
43412 ], AgAngleSelect.prototype, "eAngleValue", void 0);
43413 __decorate([
43414 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('dragService')
43415 ], AgAngleSelect.prototype, "dragService", void 0);
43416 return AgAngleSelect;
43417}(_agAbstractLabel__WEBPACK_IMPORTED_MODULE_0__["AgAbstractLabel"]));
43418
43419
43420
43421
43422
43423/***/ }),
43424/* 195 */
43425/***/ (function(module, __webpack_exports__, __webpack_require__) {
43426
43427"use strict";
43428__webpack_require__.r(__webpack_exports__);
43429/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgColorPicker", function() { return AgColorPicker; });
43430/* harmony import */ var _agColorPanel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
43431/* harmony import */ var _agDialog__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
43432/* harmony import */ var _agPickerField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69);
43433/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44);
43434/**
43435 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
43436 * @version v27.3.0
43437 * @link https://www.ag-grid.com/
43438 * @license MIT
43439 */
43440var __extends = (undefined && undefined.__extends) || (function () {
43441 var extendStatics = function (d, b) {
43442 extendStatics = Object.setPrototypeOf ||
43443 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43444 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
43445 return extendStatics(d, b);
43446 };
43447 return function (d, b) {
43448 extendStatics(d, b);
43449 function __() { this.constructor = d; }
43450 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43451 };
43452})();
43453
43454
43455
43456
43457var AgColorPicker = /** @class */ (function (_super) {
43458 __extends(AgColorPicker, _super);
43459 function AgColorPicker(config) {
43460 var _this = _super.call(this, config, 'ag-color-picker', 'colorPicker') || this;
43461 if (config && config.color) {
43462 _this.value = config.color;
43463 }
43464 return _this;
43465 }
43466 AgColorPicker.prototype.postConstruct = function () {
43467 _super.prototype.postConstruct.call(this);
43468 if (this.value) {
43469 this.setValue(this.value);
43470 }
43471 };
43472 AgColorPicker.prototype.showPicker = function () {
43473 var _this = this;
43474 var eGuiRect = this.getGui().getBoundingClientRect();
43475 var colorDialog = this.createBean(new _agDialog__WEBPACK_IMPORTED_MODULE_1__["AgDialog"]({
43476 closable: false,
43477 modal: true,
43478 hideTitleBar: true,
43479 minWidth: 190,
43480 width: 190,
43481 height: 250,
43482 x: eGuiRect.right - 190,
43483 y: eGuiRect.top - 250
43484 }));
43485 this.isPickerDisplayed = true;
43486 colorDialog.addCssClass('ag-color-dialog');
43487 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaExpanded"])(this.eWrapper, true);
43488 var colorPanel = this.createBean(new _agColorPanel__WEBPACK_IMPORTED_MODULE_0__["AgColorPanel"]({ picker: this }));
43489 colorPanel.addDestroyFunc(function () {
43490 if (colorDialog.isAlive()) {
43491 _this.destroyBean(colorDialog);
43492 }
43493 });
43494 colorDialog.setParentComponent(this);
43495 colorDialog.setBodyComponent(colorPanel);
43496 colorPanel.setValue(this.getValue());
43497 colorDialog.addDestroyFunc(function () {
43498 // here we check if the picker was already being
43499 // destroyed to avoid a stack overflow
43500 if (!_this.isDestroyingPicker) {
43501 _this.isDestroyingPicker = true;
43502 if (colorPanel.isAlive()) {
43503 _this.destroyBean(colorPanel);
43504 }
43505 }
43506 else {
43507 _this.isDestroyingPicker = false;
43508 }
43509 if (_this.isAlive()) {
43510 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaExpanded"])(_this.eWrapper, false);
43511 _this.getFocusableElement().focus();
43512 }
43513 _this.isPickerDisplayed = false;
43514 });
43515 return colorDialog;
43516 };
43517 AgColorPicker.prototype.setValue = function (color) {
43518 if (this.value === color) {
43519 return this;
43520 }
43521 this.eDisplayField.style.backgroundColor = color;
43522 return _super.prototype.setValue.call(this, color);
43523 };
43524 AgColorPicker.prototype.getValue = function () {
43525 return this.value;
43526 };
43527 return AgColorPicker;
43528}(_agPickerField__WEBPACK_IMPORTED_MODULE_2__["AgPickerField"]));
43529
43530
43531
43532
43533
43534/***/ }),
43535/* 196 */
43536/***/ (function(module, __webpack_exports__, __webpack_require__) {
43537
43538"use strict";
43539__webpack_require__.r(__webpack_exports__);
43540/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgColorPanel", function() { return AgColorPanel; });
43541/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
43542/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37);
43543/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
43544/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
43545/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
43546/**
43547 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
43548 * @version v27.3.0
43549 * @link https://www.ag-grid.com/
43550 * @license MIT
43551 */
43552var __extends = (undefined && undefined.__extends) || (function () {
43553 var extendStatics = function (d, b) {
43554 extendStatics = Object.setPrototypeOf ||
43555 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43556 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
43557 return extendStatics(d, b);
43558 };
43559 return function (d, b) {
43560 extendStatics(d, b);
43561 function __() { this.constructor = d; }
43562 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43563 };
43564})();
43565var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
43566 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43567 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43568 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
43569 return c > 3 && r && Object.defineProperty(target, key, r), r;
43570};
43571var __read = (undefined && undefined.__read) || function (o, n) {
43572 var m = typeof Symbol === "function" && o[Symbol.iterator];
43573 if (!m) return o;
43574 var i = m.call(o), r, ar = [], e;
43575 try {
43576 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
43577 }
43578 catch (error) { e = { error: error }; }
43579 finally {
43580 try {
43581 if (r && !r.done && (m = i["return"])) m.call(i);
43582 }
43583 finally { if (e) throw e.error; }
43584 }
43585 return ar;
43586};
43587
43588
43589
43590
43591
43592var AgColorPanel = /** @class */ (function (_super) {
43593 __extends(AgColorPanel, _super);
43594 function AgColorPanel(config) {
43595 var _this = _super.call(this, AgColorPanel.TEMPLATE) || this;
43596 _this.H = 1; // in the [0, 1] range
43597 _this.S = 1; // in the [0, 1] range
43598 _this.B = 1; // in the [0, 1] range
43599 _this.A = 1; // in the [0, 1] range
43600 _this.isSpectrumDragging = false;
43601 _this.isSpectrumHueDragging = false;
43602 _this.isSpectrumAlphaDragging = false;
43603 _this.colorChanged = false;
43604 _this.picker = config.picker;
43605 return _this;
43606 }
43607 AgColorPanel.prototype.postConstruct = function () {
43608 var eGui = this.getGui();
43609 this.initRecentColors();
43610 this.addManagedListener(this.spectrumVal, 'mousedown', this.onSpectrumDraggerDown.bind(this));
43611 this.addManagedListener(eGui, 'mousemove', this.onSpectrumDraggerMove.bind(this));
43612 this.addManagedListener(this.spectrumHue, 'mousedown', this.onSpectrumHueDown.bind(this));
43613 this.addManagedListener(eGui, 'mousemove', this.onSpectrumHueMove.bind(this));
43614 this.addManagedListener(this.spectrumAlpha, 'mousedown', this.onSpectrumAlphaDown.bind(this));
43615 this.addManagedListener(eGui, 'mousemove', this.onSpectrumAlphaMove.bind(this));
43616 // Listening to `mouseup` on the document on purpose. The user might release the mouse button
43617 // outside the UI control. When the mouse returns back to the control's area, the dragging
43618 // of the thumb is not expected and seen as a bug.
43619 this.addManagedListener(document, 'mouseup', this.onMouseUp.bind(this));
43620 this.addManagedListener(this.recentColors, 'click', this.onRecentColorClick.bind(this));
43621 };
43622 AgColorPanel.prototype.refreshSpectrumRect = function () {
43623 return this.spectrumValRect = this.spectrumVal.getBoundingClientRect();
43624 };
43625 AgColorPanel.prototype.refreshHueRect = function () {
43626 return this.spectrumHueRect = this.spectrumHue.getBoundingClientRect();
43627 };
43628 AgColorPanel.prototype.refreshAlphaRect = function () {
43629 return this.spectrumAlphaRect = this.spectrumAlpha.getBoundingClientRect();
43630 };
43631 AgColorPanel.prototype.onSpectrumDraggerDown = function (e) {
43632 this.refreshSpectrumRect();
43633 this.isSpectrumDragging = true;
43634 this.moveDragger(e);
43635 };
43636 AgColorPanel.prototype.onSpectrumDraggerMove = function (e) {
43637 if (this.isSpectrumDragging) {
43638 this.moveDragger(e);
43639 }
43640 };
43641 AgColorPanel.prototype.onSpectrumHueDown = function (e) {
43642 this.refreshHueRect();
43643 this.isSpectrumHueDragging = true;
43644 this.moveHueSlider(e);
43645 };
43646 AgColorPanel.prototype.onSpectrumHueMove = function (e) {
43647 if (this.isSpectrumHueDragging) {
43648 this.moveHueSlider(e);
43649 }
43650 };
43651 AgColorPanel.prototype.onSpectrumAlphaDown = function (e) {
43652 this.refreshAlphaRect();
43653 this.isSpectrumAlphaDragging = true;
43654 this.moveAlphaSlider(e);
43655 };
43656 AgColorPanel.prototype.onSpectrumAlphaMove = function (e) {
43657 if (this.isSpectrumAlphaDragging) {
43658 this.moveAlphaSlider(e);
43659 }
43660 };
43661 AgColorPanel.prototype.onMouseUp = function () {
43662 this.isSpectrumDragging = false;
43663 this.isSpectrumHueDragging = false;
43664 this.isSpectrumAlphaDragging = false;
43665 };
43666 AgColorPanel.prototype.moveDragger = function (e) {
43667 var valRect = this.spectrumValRect;
43668 if (valRect) {
43669 var x = e.clientX - valRect.left;
43670 var y = e.clientY - valRect.top;
43671 x = Math.max(x, 0);
43672 x = Math.min(x, valRect.width);
43673 y = Math.max(y, 0);
43674 y = Math.min(y, valRect.height);
43675 this.setSpectrumValue(x / valRect.width, 1 - y / valRect.height);
43676 }
43677 };
43678 AgColorPanel.prototype.moveHueSlider = function (e) {
43679 var hueRect = this.spectrumHueRect;
43680 if (hueRect) {
43681 var slider = this.spectrumHueSlider;
43682 var sliderRect = slider.getBoundingClientRect();
43683 var x = e.clientX - hueRect.left;
43684 x = Math.max(x, 0);
43685 x = Math.min(x, hueRect.width);
43686 this.H = 1 - x / hueRect.width;
43687 slider.style.left = (x + sliderRect.width / 2) + 'px';
43688 this.update();
43689 }
43690 };
43691 AgColorPanel.prototype.moveAlphaSlider = function (e) {
43692 var alphaRect = this.spectrumAlphaRect;
43693 if (alphaRect) {
43694 var slider = this.spectrumAlphaSlider;
43695 var sliderRect = slider.getBoundingClientRect();
43696 var x = e.clientX - alphaRect.left;
43697 x = Math.max(x, 0);
43698 x = Math.min(x, alphaRect.width);
43699 this.A = x / alphaRect.width;
43700 slider.style.left = (x + sliderRect.width / 2) + 'px';
43701 this.update();
43702 }
43703 };
43704 AgColorPanel.prototype.update = function () {
43705 var color = _utils__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHSB(this.H * 360, this.S, this.B, this.A);
43706 var spectrumColor = _utils__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHSB(this.H * 360, 1, 1);
43707 var rgbaColor = color.toRgbaString();
43708 // the recent color list needs to know color has actually changed
43709 var colorPicker = this.picker;
43710 var existingColor = _utils__WEBPACK_IMPORTED_MODULE_1__["Color"].fromString(colorPicker.getValue());
43711 if (existingColor.toRgbaString() !== rgbaColor) {
43712 this.colorChanged = true;
43713 }
43714 colorPicker.setValue(rgbaColor);
43715 this.spectrumColor.style.backgroundColor = spectrumColor.toRgbaString();
43716 this.spectrumDragger.style.backgroundColor = rgbaColor;
43717 };
43718 /**
43719 * @param saturation In the [0, 1] interval.
43720 * @param brightness In the [0, 1] interval.
43721 */
43722 AgColorPanel.prototype.setSpectrumValue = function (saturation, brightness) {
43723 var valRect = this.spectrumValRect || this.refreshSpectrumRect();
43724 if (valRect) {
43725 var dragger = this.spectrumDragger;
43726 var draggerRect = dragger.getBoundingClientRect();
43727 saturation = Math.max(0, saturation);
43728 saturation = Math.min(1, saturation);
43729 brightness = Math.max(0, brightness);
43730 brightness = Math.min(1, brightness);
43731 this.S = saturation;
43732 this.B = brightness;
43733 dragger.style.left = (saturation * valRect.width - draggerRect.width / 2) + 'px';
43734 dragger.style.top = ((1 - brightness) * valRect.height - draggerRect.height / 2) + 'px';
43735 this.update();
43736 }
43737 };
43738 AgColorPanel.prototype.initRecentColors = function () {
43739 var recentColors = AgColorPanel.recentColors;
43740 var innerHtml = recentColors.map(function (color, index) {
43741 return "<div class=\"ag-recent-color\" id=" + index + " style=\"background-color: " + color + "; width: 15px; height: 15px;\" recent-color=\"" + color + "\"></div>";
43742 });
43743 this.recentColors.innerHTML = innerHtml.join('');
43744 };
43745 AgColorPanel.prototype.setValue = function (val) {
43746 var color = _utils__WEBPACK_IMPORTED_MODULE_1__["Color"].fromString(val);
43747 var _a = __read(color.toHSB(), 3), h = _a[0], s = _a[1], b = _a[2];
43748 this.H = (isNaN(h) ? 0 : h) / 360;
43749 this.A = color.a;
43750 var spectrumHueRect = this.spectrumHueRect || this.refreshHueRect();
43751 var spectrumAlphaRect = this.spectrumAlphaRect || this.refreshAlphaRect();
43752 this.spectrumHueSlider.style.left = ((this.H - 1) * -spectrumHueRect.width) + "px";
43753 this.spectrumAlphaSlider.style.left = (this.A * spectrumAlphaRect.width) + "px";
43754 this.setSpectrumValue(s, b);
43755 };
43756 AgColorPanel.prototype.onRecentColorClick = function (e) {
43757 var target = e.target;
43758 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(target.id)) {
43759 return;
43760 }
43761 var id = parseInt(target.id, 10);
43762 this.setValue(AgColorPanel.recentColors[id]);
43763 this.destroy();
43764 };
43765 AgColorPanel.prototype.addRecentColor = function () {
43766 var color = _utils__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHSB(this.H * 360, this.S, this.B, this.A);
43767 var rgbaColor = color.toRgbaString();
43768 var recentColors = AgColorPanel.recentColors;
43769 if (!this.colorChanged || recentColors[0] === rgbaColor) {
43770 return;
43771 }
43772 // remove duplicate color
43773 recentColors = recentColors.filter(function (currentColor) { return currentColor != rgbaColor; });
43774 // add color to head
43775 recentColors = [rgbaColor].concat(recentColors);
43776 // ensure we don't exceed max number of recent colors
43777 if (recentColors.length > AgColorPanel.maxRecentColors) {
43778 recentColors = recentColors.slice(0, AgColorPanel.maxRecentColors);
43779 }
43780 AgColorPanel.recentColors = recentColors;
43781 };
43782 AgColorPanel.prototype.destroy = function () {
43783 this.addRecentColor();
43784 _super.prototype.destroy.call(this);
43785 };
43786 AgColorPanel.maxRecentColors = 8;
43787 AgColorPanel.recentColors = [];
43788 AgColorPanel.TEMPLATE = "<div class=\"ag-color-panel\">\n <div ref=\"spectrumColor\" class=\"ag-spectrum-color\">\n <div class=\"ag-spectrum-sat ag-spectrum-fill\">\n <div ref=\"spectrumVal\" class=\"ag-spectrum-val ag-spectrum-fill\">\n <div ref=\"spectrumDragger\" class=\"ag-spectrum-dragger\"></div>\n </div>\n </div>\n </div>\n <div class=\"ag-spectrum-tools\">\n <div ref=\"spectrumHue\" class=\"ag-spectrum-hue ag-spectrum-tool\">\n <div class=\"ag-spectrum-hue-background\"></div>\n <div ref=\"spectrumHueSlider\" class=\"ag-spectrum-slider\"></div>\n </div>\n <div ref=\"spectrumAlpha\" class=\"ag-spectrum-alpha ag-spectrum-tool\">\n <div class=\"ag-spectrum-alpha-background\"></div>\n <div ref=\"spectrumAlphaSlider\" class=\"ag-spectrum-slider\"></div>\n </div>\n <div ref=\"recentColors\" class=\"ag-recent-colors\"></div>\n </div>\n </div>";
43789 __decorate([
43790 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('spectrumColor')
43791 ], AgColorPanel.prototype, "spectrumColor", void 0);
43792 __decorate([
43793 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('spectrumVal')
43794 ], AgColorPanel.prototype, "spectrumVal", void 0);
43795 __decorate([
43796 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('spectrumDragger')
43797 ], AgColorPanel.prototype, "spectrumDragger", void 0);
43798 __decorate([
43799 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('spectrumHue')
43800 ], AgColorPanel.prototype, "spectrumHue", void 0);
43801 __decorate([
43802 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('spectrumHueSlider')
43803 ], AgColorPanel.prototype, "spectrumHueSlider", void 0);
43804 __decorate([
43805 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('spectrumAlpha')
43806 ], AgColorPanel.prototype, "spectrumAlpha", void 0);
43807 __decorate([
43808 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('spectrumAlphaSlider')
43809 ], AgColorPanel.prototype, "spectrumAlphaSlider", void 0);
43810 __decorate([
43811 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('recentColors')
43812 ], AgColorPanel.prototype, "recentColors", void 0);
43813 __decorate([
43814 _context_context__WEBPACK_IMPORTED_MODULE_3__["PostConstruct"]
43815 ], AgColorPanel.prototype, "postConstruct", null);
43816 return AgColorPanel;
43817}(_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
43818
43819
43820
43821
43822
43823/***/ }),
43824/* 197 */
43825/***/ (function(module, __webpack_exports__, __webpack_require__) {
43826
43827"use strict";
43828__webpack_require__.r(__webpack_exports__);
43829/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgDialog", function() { return AgDialog; });
43830/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
43831/* harmony import */ var _agPanel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
43832/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36);
43833/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
43834/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48);
43835/**
43836 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
43837 * @version v27.3.0
43838 * @link https://www.ag-grid.com/
43839 * @license MIT
43840 */
43841var __extends = (undefined && undefined.__extends) || (function () {
43842 var extendStatics = function (d, b) {
43843 extendStatics = Object.setPrototypeOf ||
43844 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43845 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
43846 return extendStatics(d, b);
43847 };
43848 return function (d, b) {
43849 extendStatics(d, b);
43850 function __() { this.constructor = d; }
43851 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43852 };
43853})();
43854var __assign = (undefined && undefined.__assign) || function () {
43855 __assign = Object.assign || function(t) {
43856 for (var s, i = 1, n = arguments.length; i < n; i++) {
43857 s = arguments[i];
43858 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
43859 t[p] = s[p];
43860 }
43861 return t;
43862 };
43863 return __assign.apply(this, arguments);
43864};
43865var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
43866 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43867 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43868 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
43869 return c > 3 && r && Object.defineProperty(target, key, r), r;
43870};
43871
43872
43873
43874
43875
43876var AgDialog = /** @class */ (function (_super) {
43877 __extends(AgDialog, _super);
43878 function AgDialog(config) {
43879 var _this = _super.call(this, __assign(__assign({}, config), { popup: true })) || this;
43880 _this.isMaximizable = false;
43881 _this.isMaximized = false;
43882 _this.maximizeListeners = [];
43883 _this.resizeListenerDestroy = null;
43884 _this.lastPosition = {
43885 x: 0,
43886 y: 0,
43887 width: 0,
43888 height: 0
43889 };
43890 return _this;
43891 }
43892 AgDialog.prototype.postConstruct = function () {
43893 var _this = this;
43894 var eGui = this.getGui();
43895 var _a = this.config, movable = _a.movable, resizable = _a.resizable, maximizable = _a.maximizable;
43896 this.addCssClass('ag-dialog');
43897 _super.prototype.postConstruct.call(this);
43898 this.addManagedListener(eGui, 'focusin', function (e) {
43899 if (eGui.contains(e.relatedTarget)) {
43900 return;
43901 }
43902 _this.popupService.bringPopupToFront(eGui);
43903 });
43904 if (movable) {
43905 this.setMovable(movable);
43906 }
43907 if (maximizable) {
43908 this.setMaximizable(maximizable);
43909 }
43910 if (resizable) {
43911 this.setResizable(resizable);
43912 }
43913 };
43914 AgDialog.prototype.renderComponent = function () {
43915 var eGui = this.getGui();
43916 var _a = this.config, alwaysOnTop = _a.alwaysOnTop, modal = _a.modal, title = _a.title;
43917 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
43918 var addPopupRes = this.popupService.addPopup({
43919 modal: modal,
43920 eChild: eGui,
43921 closeOnEsc: true,
43922 closedCallback: this.destroy.bind(this),
43923 alwaysOnTop: alwaysOnTop,
43924 ariaLabel: title || translate('ariaLabelDialog', 'Dialog')
43925 });
43926 if (addPopupRes) {
43927 this.close = addPopupRes.hideFunc;
43928 }
43929 };
43930 AgDialog.prototype.toggleMaximize = function () {
43931 var position = this.positionableFeature.getPosition();
43932 if (this.isMaximized) {
43933 var _a = this.lastPosition, x = _a.x, y = _a.y, width = _a.width, height = _a.height;
43934 this.setWidth(width);
43935 this.setHeight(height);
43936 this.positionableFeature.offsetElement(x, y);
43937 }
43938 else {
43939 this.lastPosition.width = this.getWidth();
43940 this.lastPosition.height = this.getHeight();
43941 this.lastPosition.x = position.x;
43942 this.lastPosition.y = position.y;
43943 this.positionableFeature.offsetElement(0, 0);
43944 this.setHeight('100%');
43945 this.setWidth('100%');
43946 }
43947 this.isMaximized = !this.isMaximized;
43948 this.refreshMaximizeIcon();
43949 };
43950 AgDialog.prototype.refreshMaximizeIcon = function () {
43951 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setDisplayed"])(this.maximizeIcon, !this.isMaximized);
43952 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setDisplayed"])(this.minimizeIcon, this.isMaximized);
43953 };
43954 AgDialog.prototype.clearMaximizebleListeners = function () {
43955 if (this.maximizeListeners.length) {
43956 this.maximizeListeners.forEach(function (destroyListener) { return destroyListener(); });
43957 this.maximizeListeners.length = 0;
43958 }
43959 if (this.resizeListenerDestroy) {
43960 this.resizeListenerDestroy();
43961 this.resizeListenerDestroy = null;
43962 }
43963 };
43964 AgDialog.prototype.destroy = function () {
43965 this.maximizeButtonComp = this.destroyBean(this.maximizeButtonComp);
43966 this.clearMaximizebleListeners();
43967 _super.prototype.destroy.call(this);
43968 };
43969 AgDialog.prototype.setResizable = function (resizable) {
43970 this.positionableFeature.setResizable(resizable);
43971 };
43972 AgDialog.prototype.setMovable = function (movable) {
43973 this.positionableFeature.setMovable(movable, this.eTitleBar);
43974 };
43975 AgDialog.prototype.setMaximizable = function (maximizable) {
43976 var _this = this;
43977 if (!maximizable) {
43978 this.clearMaximizebleListeners();
43979 if (this.maximizeButtonComp) {
43980 this.destroyBean(this.maximizeButtonComp);
43981 this.maximizeButtonComp = this.maximizeIcon = this.minimizeIcon = undefined;
43982 }
43983 return;
43984 }
43985 var eTitleBar = this.eTitleBar;
43986 if (!eTitleBar || maximizable === this.isMaximizable) {
43987 return;
43988 }
43989 var maximizeButtonComp = this.maximizeButtonComp =
43990 this.createBean(new _component__WEBPACK_IMPORTED_MODULE_2__["Component"](/* html */ "<div class=\"ag-dialog-button\"></span>"));
43991 var eGui = maximizeButtonComp.getGui();
43992 eGui.appendChild(this.maximizeIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])('maximize', this.gridOptionsWrapper));
43993 this.maximizeIcon.classList.add('ag-panel-title-bar-button-icon');
43994 eGui.appendChild(this.minimizeIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])('minimize', this.gridOptionsWrapper));
43995 this.minimizeIcon.classList.add('ag-panel-title-bar-button-icon', 'ag-hidden');
43996 maximizeButtonComp.addManagedListener(eGui, 'click', this.toggleMaximize.bind(this));
43997 this.addTitleBarButton(maximizeButtonComp, 0);
43998 this.maximizeListeners.push(this.addManagedListener(eTitleBar, 'dblclick', this.toggleMaximize.bind(this)));
43999 this.resizeListenerDestroy = this.addManagedListener(this, 'resize', function () {
44000 _this.isMaximized = false;
44001 _this.refreshMaximizeIcon();
44002 });
44003 };
44004 __decorate([
44005 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('popupService')
44006 ], AgDialog.prototype, "popupService", void 0);
44007 return AgDialog;
44008}(_agPanel__WEBPACK_IMPORTED_MODULE_1__["AgPanel"]));
44009
44010
44011
44012
44013
44014/***/ }),
44015/* 198 */
44016/***/ (function(module, __webpack_exports__, __webpack_require__) {
44017
44018"use strict";
44019__webpack_require__.r(__webpack_exports__);
44020/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgPanel", function() { return AgPanel; });
44021/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
44022/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
44023/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36);
44024/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
44025/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48);
44026/* harmony import */ var _rendering_features_positionableFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(176);
44027/**
44028 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
44029 * @version v27.3.0
44030 * @link https://www.ag-grid.com/
44031 * @license MIT
44032 */
44033var __extends = (undefined && undefined.__extends) || (function () {
44034 var extendStatics = function (d, b) {
44035 extendStatics = Object.setPrototypeOf ||
44036 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
44037 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
44038 return extendStatics(d, b);
44039 };
44040 return function (d, b) {
44041 extendStatics(d, b);
44042 function __() { this.constructor = d; }
44043 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44044 };
44045})();
44046var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
44047 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
44048 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
44049 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
44050 return c > 3 && r && Object.defineProperty(target, key, r), r;
44051};
44052
44053
44054
44055
44056
44057
44058var AgPanel = /** @class */ (function (_super) {
44059 __extends(AgPanel, _super);
44060 function AgPanel(config) {
44061 var _this = _super.call(this, AgPanel.getTemplate(config)) || this;
44062 _this.closable = true;
44063 _this.config = config;
44064 return _this;
44065 }
44066 AgPanel.getTemplate = function (config) {
44067 var cssIdentifier = (config && config.cssIdentifier) || 'default';
44068 return /* html */ "<div class=\"ag-panel ag-" + cssIdentifier + "-panel\" tabindex=\"-1\">\n <div ref=\"eTitleBar\" class=\"ag-panel-title-bar ag-" + cssIdentifier + "-panel-title-bar ag-unselectable\">\n <span ref=\"eTitle\" class=\"ag-panel-title-bar-title ag-" + cssIdentifier + "-panel-title-bar-title\"></span>\n <div ref=\"eTitleBarButtons\" class=\"ag-panel-title-bar-buttons ag-" + cssIdentifier + "-panel-title-bar-buttons\"></div>\n </div>\n <div ref=\"eContentWrapper\" class=\"ag-panel-content-wrapper ag-" + cssIdentifier + "-panel-content-wrapper\"></div>\n </div>";
44069 };
44070 AgPanel.prototype.postConstruct = function () {
44071 var _this = this;
44072 var _a = this.config, component = _a.component, closable = _a.closable, hideTitleBar = _a.hideTitleBar, title = _a.title, _b = _a.minWidth, minWidth = _b === void 0 ? 250 : _b, width = _a.width, _c = _a.minHeight, minHeight = _c === void 0 ? 250 : _c, height = _a.height, centered = _a.centered, popup = _a.popup, x = _a.x, y = _a.y;
44073 this.positionableFeature = new _rendering_features_positionableFeature__WEBPACK_IMPORTED_MODULE_5__["PositionableFeature"](this.getGui(), {
44074 minWidth: minWidth, width: width, minHeight: minHeight, height: height, centered: centered, x: x, y: y, popup: popup,
44075 calculateTopBuffer: function () { return _this.positionableFeature.getHeight() - _this.getBodyHeight(); }
44076 });
44077 this.createManagedBean(this.positionableFeature);
44078 var eGui = this.getGui();
44079 if (component) {
44080 this.setBodyComponent(component);
44081 }
44082 if (!hideTitleBar) {
44083 if (title) {
44084 this.setTitle(title);
44085 }
44086 this.setClosable(closable != null ? closable : this.closable);
44087 }
44088 else {
44089 this.eTitleBar.classList.add('ag-hidden');
44090 }
44091 this.addManagedListener(this.eTitleBar, 'mousedown', function (e) {
44092 var eDocument = _this.gridOptionsWrapper.getDocument();
44093 if (eGui.contains(e.relatedTarget) ||
44094 eGui.contains(eDocument.activeElement) ||
44095 _this.eTitleBarButtons.contains(e.target)) {
44096 e.preventDefault();
44097 return;
44098 }
44099 var focusEl = _this.eContentWrapper.querySelector('button, [href], input, select, textarea, [tabindex]');
44100 if (focusEl) {
44101 focusEl.focus();
44102 }
44103 });
44104 if (popup && this.positionableFeature.isPositioned()) {
44105 return;
44106 }
44107 if (this.renderComponent) {
44108 this.renderComponent();
44109 }
44110 this.positionableFeature.initialisePosition();
44111 this.eContentWrapper.style.height = '0';
44112 };
44113 AgPanel.prototype.renderComponent = function () {
44114 var _this = this;
44115 var eGui = this.getGui();
44116 eGui.focus();
44117 this.close = function () {
44118 eGui.parentElement.removeChild(eGui);
44119 _this.destroy();
44120 };
44121 };
44122 AgPanel.prototype.getHeight = function () {
44123 return this.positionableFeature.getHeight();
44124 };
44125 AgPanel.prototype.setHeight = function (height) {
44126 this.positionableFeature.setHeight(height);
44127 };
44128 AgPanel.prototype.getWidth = function () {
44129 return this.positionableFeature.getWidth();
44130 };
44131 AgPanel.prototype.setWidth = function (width) {
44132 this.positionableFeature.setWidth(width);
44133 };
44134 AgPanel.prototype.setClosable = function (closable) {
44135 if (closable !== this.closable) {
44136 this.closable = closable;
44137 }
44138 if (closable) {
44139 var closeButtonComp = this.closeButtonComp = new _component__WEBPACK_IMPORTED_MODULE_2__["Component"](AgPanel.CLOSE_BTN_TEMPLATE);
44140 this.getContext().createBean(closeButtonComp);
44141 var eGui = closeButtonComp.getGui();
44142 var child = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])('close', this.gridOptionsWrapper);
44143 child.classList.add('ag-panel-title-bar-button-icon');
44144 eGui.appendChild(child);
44145 this.addTitleBarButton(closeButtonComp);
44146 closeButtonComp.addManagedListener(eGui, 'click', this.onBtClose.bind(this));
44147 }
44148 else if (this.closeButtonComp) {
44149 var eGui = this.closeButtonComp.getGui();
44150 eGui.parentElement.removeChild(eGui);
44151 this.closeButtonComp = this.destroyBean(this.closeButtonComp);
44152 }
44153 };
44154 AgPanel.prototype.setBodyComponent = function (bodyComponent) {
44155 bodyComponent.setParentComponent(this);
44156 this.eContentWrapper.appendChild(bodyComponent.getGui());
44157 };
44158 AgPanel.prototype.addTitleBarButton = function (button, position) {
44159 var eTitleBarButtons = this.eTitleBarButtons;
44160 var buttons = eTitleBarButtons.children;
44161 var len = buttons.length;
44162 if (position == null) {
44163 position = len;
44164 }
44165 position = Math.max(0, Math.min(position, len));
44166 button.addCssClass('ag-panel-title-bar-button');
44167 var eGui = button.getGui();
44168 if (position === 0) {
44169 eTitleBarButtons.insertAdjacentElement('afterbegin', eGui);
44170 }
44171 else if (position === len) {
44172 eTitleBarButtons.insertAdjacentElement('beforeend', eGui);
44173 }
44174 else {
44175 buttons[position - 1].insertAdjacentElement('afterend', eGui);
44176 }
44177 button.setParentComponent(this);
44178 };
44179 AgPanel.prototype.getBodyHeight = function () {
44180 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["getInnerHeight"])(this.eContentWrapper);
44181 };
44182 AgPanel.prototype.getBodyWidth = function () {
44183 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["getInnerWidth"])(this.eContentWrapper);
44184 };
44185 AgPanel.prototype.setTitle = function (title) {
44186 this.eTitle.innerText = title;
44187 };
44188 // called when user hits the 'x' in the top right
44189 AgPanel.prototype.onBtClose = function () {
44190 this.close();
44191 };
44192 AgPanel.prototype.destroy = function () {
44193 if (this.closeButtonComp) {
44194 this.closeButtonComp = this.destroyBean(this.closeButtonComp);
44195 }
44196 var eGui = this.getGui();
44197 if (eGui && eGui.offsetParent) {
44198 this.close();
44199 }
44200 _super.prototype.destroy.call(this);
44201 };
44202 AgPanel.CLOSE_BTN_TEMPLATE = "<div class=\"ag-button\"></div>";
44203 __decorate([
44204 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eContentWrapper')
44205 ], AgPanel.prototype, "eContentWrapper", void 0);
44206 __decorate([
44207 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eTitleBar')
44208 ], AgPanel.prototype, "eTitleBar", void 0);
44209 __decorate([
44210 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eTitleBarButtons')
44211 ], AgPanel.prototype, "eTitleBarButtons", void 0);
44212 __decorate([
44213 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eTitle')
44214 ], AgPanel.prototype, "eTitle", void 0);
44215 __decorate([
44216 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
44217 ], AgPanel.prototype, "postConstruct", null);
44218 return AgPanel;
44219}(_component__WEBPACK_IMPORTED_MODULE_2__["Component"]));
44220
44221
44222
44223
44224
44225/***/ }),
44226/* 199 */
44227/***/ (function(module, __webpack_exports__, __webpack_require__) {
44228
44229"use strict";
44230__webpack_require__.r(__webpack_exports__);
44231/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgGroupComponent", function() { return AgGroupComponent; });
44232/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
44233/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
44234/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
44235/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48);
44236/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
44237/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65);
44238/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44);
44239/**
44240 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
44241 * @version v27.3.0
44242 * @link https://www.ag-grid.com/
44243 * @license MIT
44244 */
44245var __extends = (undefined && undefined.__extends) || (function () {
44246 var extendStatics = function (d, b) {
44247 extendStatics = Object.setPrototypeOf ||
44248 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
44249 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
44250 return extendStatics(d, b);
44251 };
44252 return function (d, b) {
44253 extendStatics(d, b);
44254 function __() { this.constructor = d; }
44255 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44256 };
44257})();
44258var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
44259 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
44260 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
44261 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
44262 return c > 3 && r && Object.defineProperty(target, key, r), r;
44263};
44264
44265
44266
44267
44268
44269
44270
44271var AgGroupComponent = /** @class */ (function (_super) {
44272 __extends(AgGroupComponent, _super);
44273 function AgGroupComponent(params) {
44274 if (params === void 0) { params = {}; }
44275 var _this = _super.call(this, AgGroupComponent.getTemplate(params)) || this;
44276 _this.suppressEnabledCheckbox = true;
44277 _this.suppressOpenCloseIcons = false;
44278 var title = params.title, enabled = params.enabled, items = params.items, suppressEnabledCheckbox = params.suppressEnabledCheckbox, suppressOpenCloseIcons = params.suppressOpenCloseIcons;
44279 _this.title = title;
44280 _this.cssIdentifier = params.cssIdentifier || 'default';
44281 _this.enabled = enabled != null ? enabled : true;
44282 _this.items = items || [];
44283 _this.alignItems = params.alignItems || 'center';
44284 if (suppressEnabledCheckbox != null) {
44285 _this.suppressEnabledCheckbox = suppressEnabledCheckbox;
44286 }
44287 if (suppressOpenCloseIcons != null) {
44288 _this.suppressOpenCloseIcons = suppressOpenCloseIcons;
44289 }
44290 return _this;
44291 }
44292 AgGroupComponent.getTemplate = function (params) {
44293 var cssIdentifier = params.cssIdentifier || 'default';
44294 var direction = params.direction || 'vertical';
44295 return /* html */ "<div class=\"ag-group ag-" + cssIdentifier + "-group\" role=\"presentation\">\n <div class=\"ag-group-title-bar ag-" + cssIdentifier + "-group-title-bar ag-unselectable\" ref=\"eTitleBar\" role=\"button\">\n <span class=\"ag-group-title-bar-icon ag-" + cssIdentifier + "-group-title-bar-icon\" ref=\"eGroupOpenedIcon\" role=\"presentation\"></span>\n <span class=\"ag-group-title-bar-icon ag-" + cssIdentifier + "-group-title-bar-icon\" ref=\"eGroupClosedIcon\" role=\"presentation\"></span>\n <span ref=\"eTitle\" class=\"ag-group-title ag-" + cssIdentifier + "-group-title\"></span>\n </div>\n <div ref=\"eToolbar\" class=\"ag-group-toolbar ag-" + cssIdentifier + "-group-toolbar\">\n <ag-checkbox ref=\"cbGroupEnabled\"></ag-checkbox>\n </div>\n <div ref=\"eContainer\" class=\"ag-group-container ag-group-container-" + direction + " ag-" + cssIdentifier + "-group-container\"></div>\n </div>";
44296 };
44297 AgGroupComponent.prototype.postConstruct = function () {
44298 if (this.items.length) {
44299 var initialItems = this.items;
44300 this.items = [];
44301 this.addItems(initialItems);
44302 }
44303 var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
44304 this.cbGroupEnabled.setLabel(localeTextFunc('enabled', 'Enabled'));
44305 if (this.title) {
44306 this.setTitle(this.title);
44307 }
44308 if (this.enabled) {
44309 this.setEnabled(this.enabled);
44310 }
44311 this.setAlignItems(this.alignItems);
44312 this.hideEnabledCheckbox(this.suppressEnabledCheckbox);
44313 this.hideOpenCloseIcons(this.suppressOpenCloseIcons);
44314 this.setupExpandContract();
44315 this.refreshAriaStatus();
44316 this.refreshChildDisplay();
44317 };
44318 AgGroupComponent.prototype.setupExpandContract = function () {
44319 var _this = this;
44320 this.eGroupClosedIcon.appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnSelectClosed', this.gridOptionsWrapper, null));
44321 this.eGroupOpenedIcon.appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnSelectOpen', this.gridOptionsWrapper, null));
44322 this.addManagedListener(this.eTitleBar, 'click', function () { return _this.toggleGroupExpand(); });
44323 this.addManagedListener(this.eTitleBar, 'keydown', function (e) {
44324 switch (e.key) {
44325 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].ENTER:
44326 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].SPACE:
44327 e.preventDefault();
44328 _this.toggleGroupExpand();
44329 break;
44330 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].RIGHT:
44331 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].LEFT:
44332 e.preventDefault();
44333 _this.toggleGroupExpand(e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].RIGHT);
44334 break;
44335 }
44336 });
44337 };
44338 AgGroupComponent.prototype.refreshAriaStatus = function () {
44339 if (!this.suppressOpenCloseIcons) {
44340 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_6__["setAriaExpanded"])(this.eTitleBar, this.expanded);
44341 }
44342 };
44343 AgGroupComponent.prototype.refreshChildDisplay = function () {
44344 var showIcon = !this.suppressOpenCloseIcons;
44345 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(this.eToolbar, this.expanded && !this.suppressEnabledCheckbox);
44346 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(this.eGroupOpenedIcon, showIcon && this.expanded);
44347 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(this.eGroupClosedIcon, showIcon && !this.expanded);
44348 };
44349 AgGroupComponent.prototype.isExpanded = function () {
44350 return this.expanded;
44351 };
44352 AgGroupComponent.prototype.setAlignItems = function (alignment) {
44353 if (this.alignItems !== alignment) {
44354 this.removeCssClass("ag-group-item-alignment-" + this.alignItems);
44355 }
44356 this.alignItems = alignment;
44357 var newCls = "ag-group-item-alignment-" + this.alignItems;
44358 this.addCssClass(newCls);
44359 return this;
44360 };
44361 AgGroupComponent.prototype.toggleGroupExpand = function (expanded) {
44362 if (this.suppressOpenCloseIcons) {
44363 this.expanded = true;
44364 this.refreshChildDisplay();
44365 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(this.eContainer, true);
44366 return this;
44367 }
44368 expanded = expanded != null ? expanded : !this.expanded;
44369 if (this.expanded === expanded) {
44370 return this;
44371 }
44372 this.expanded = expanded;
44373 this.refreshAriaStatus();
44374 this.refreshChildDisplay();
44375 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(this.eContainer, expanded);
44376 this.dispatchEvent({ type: this.expanded ? AgGroupComponent.EVENT_EXPANDED : AgGroupComponent.EVENT_COLLAPSED });
44377 return this;
44378 };
44379 AgGroupComponent.prototype.addItems = function (items) {
44380 var _this = this;
44381 items.forEach(function (item) { return _this.addItem(item); });
44382 };
44383 AgGroupComponent.prototype.addItem = function (item) {
44384 var container = this.eContainer;
44385 var el = item instanceof _component__WEBPACK_IMPORTED_MODULE_0__["Component"] ? item.getGui() : item;
44386 el.classList.add('ag-group-item', "ag-" + this.cssIdentifier + "-group-item");
44387 container.appendChild(el);
44388 this.items.push(el);
44389 };
44390 AgGroupComponent.prototype.hideItem = function (hide, index) {
44391 var itemToHide = this.items[index];
44392 itemToHide.classList.toggle('ag-hidden', hide);
44393 };
44394 AgGroupComponent.prototype.setTitle = function (title) {
44395 this.eTitle.innerText = title;
44396 return this;
44397 };
44398 AgGroupComponent.prototype.addCssClassToTitleBar = function (cssClass) {
44399 this.eTitleBar.classList.add(cssClass);
44400 };
44401 AgGroupComponent.prototype.setEnabled = function (enabled, skipToggle) {
44402 this.enabled = enabled;
44403 this.refreshDisabledStyles();
44404 this.toggleGroupExpand(enabled);
44405 if (!skipToggle) {
44406 this.cbGroupEnabled.setValue(enabled);
44407 }
44408 return this;
44409 };
44410 AgGroupComponent.prototype.isEnabled = function () {
44411 return this.enabled;
44412 };
44413 AgGroupComponent.prototype.onEnableChange = function (callbackFn) {
44414 var _this = this;
44415 this.cbGroupEnabled.onValueChange(function (newSelection) {
44416 _this.setEnabled(newSelection, true);
44417 callbackFn(newSelection);
44418 });
44419 return this;
44420 };
44421 AgGroupComponent.prototype.hideEnabledCheckbox = function (hide) {
44422 this.suppressEnabledCheckbox = hide;
44423 this.refreshChildDisplay();
44424 this.refreshDisabledStyles();
44425 return this;
44426 };
44427 AgGroupComponent.prototype.hideOpenCloseIcons = function (hide) {
44428 this.suppressOpenCloseIcons = hide;
44429 if (hide) {
44430 this.toggleGroupExpand(true);
44431 }
44432 return this;
44433 };
44434 AgGroupComponent.prototype.refreshDisabledStyles = function () {
44435 this.addOrRemoveCssClass('ag-disabled', !this.enabled);
44436 if (this.suppressEnabledCheckbox && !this.enabled) {
44437 this.eTitleBar.classList.add('ag-disabled-group-title-bar');
44438 this.eTitleBar.removeAttribute('tabindex');
44439 }
44440 else {
44441 this.eTitleBar.classList.remove('ag-disabled-group-title-bar');
44442 this.eTitleBar.setAttribute('tabindex', '0');
44443 }
44444 this.eContainer.classList.toggle('ag-disabled-group-container', !this.enabled);
44445 };
44446 AgGroupComponent.EVENT_EXPANDED = 'expanded';
44447 AgGroupComponent.EVENT_COLLAPSED = 'collapsed';
44448 __decorate([
44449 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eTitleBar')
44450 ], AgGroupComponent.prototype, "eTitleBar", void 0);
44451 __decorate([
44452 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eGroupOpenedIcon')
44453 ], AgGroupComponent.prototype, "eGroupOpenedIcon", void 0);
44454 __decorate([
44455 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eGroupClosedIcon')
44456 ], AgGroupComponent.prototype, "eGroupClosedIcon", void 0);
44457 __decorate([
44458 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eToolbar')
44459 ], AgGroupComponent.prototype, "eToolbar", void 0);
44460 __decorate([
44461 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('cbGroupEnabled')
44462 ], AgGroupComponent.prototype, "cbGroupEnabled", void 0);
44463 __decorate([
44464 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eTitle')
44465 ], AgGroupComponent.prototype, "eTitle", void 0);
44466 __decorate([
44467 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eContainer')
44468 ], AgGroupComponent.prototype, "eContainer", void 0);
44469 __decorate([
44470 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
44471 ], AgGroupComponent.prototype, "postConstruct", null);
44472 return AgGroupComponent;
44473}(_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
44474
44475
44476
44477
44478
44479/***/ }),
44480/* 200 */
44481/***/ (function(module, __webpack_exports__, __webpack_require__) {
44482
44483"use strict";
44484__webpack_require__.r(__webpack_exports__);
44485/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgMenuItemComponent", function() { return AgMenuItemComponent; });
44486/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
44487/* harmony import */ var _agMenuList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(201);
44488/* harmony import */ var _agMenuPanel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(204);
44489/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36);
44490/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65);
44491/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(48);
44492/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42);
44493/* harmony import */ var _customTooltipFeature__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(56);
44494/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(44);
44495/**
44496 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
44497 * @version v27.3.0
44498 * @link https://www.ag-grid.com/
44499 * @license MIT
44500 */
44501var __extends = (undefined && undefined.__extends) || (function () {
44502 var extendStatics = function (d, b) {
44503 extendStatics = Object.setPrototypeOf ||
44504 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
44505 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
44506 return extendStatics(d, b);
44507 };
44508 return function (d, b) {
44509 extendStatics(d, b);
44510 function __() { this.constructor = d; }
44511 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44512 };
44513})();
44514var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
44515 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
44516 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
44517 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
44518 return c > 3 && r && Object.defineProperty(target, key, r), r;
44519};
44520
44521
44522
44523
44524
44525
44526
44527
44528
44529
44530var AgMenuItemComponent = /** @class */ (function (_super) {
44531 __extends(AgMenuItemComponent, _super);
44532 function AgMenuItemComponent(params) {
44533 var _this = _super.call(this) || this;
44534 _this.params = params;
44535 _this.isActive = false;
44536 _this.subMenuIsOpen = false;
44537 _this.setTemplate(/* html */ "<div class=\"" + _this.getClassName() + "\" tabindex=\"-1\" role=\"treeitem\"></div>");
44538 return _this;
44539 }
44540 AgMenuItemComponent.prototype.init = function () {
44541 var _this = this;
44542 this.addIcon();
44543 this.addName();
44544 this.addShortcut();
44545 this.addSubMenu();
44546 this.addTooltip();
44547 var eGui = this.getGui();
44548 if (this.params.disabled) {
44549 this.addCssClass(this.getClassName('disabled'));
44550 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["setAriaDisabled"])(eGui, true);
44551 }
44552 else {
44553 this.addGuiEventListener('click', function (e) { return _this.onItemSelected(e); });
44554 this.addGuiEventListener('keydown', function (e) {
44555 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].ENTER || e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].SPACE) {
44556 e.preventDefault();
44557 _this.onItemSelected(e);
44558 }
44559 });
44560 this.addGuiEventListener('mousedown', function (e) {
44561 // Prevent event bubbling to other event handlers such as PopupService triggering
44562 // premature closing of any open sub-menu popup.
44563 e.stopPropagation();
44564 e.preventDefault();
44565 });
44566 this.addGuiEventListener('mouseenter', function () { return _this.onMouseEnter(); });
44567 this.addGuiEventListener('mouseleave', function () { return _this.onMouseLeave(); });
44568 }
44569 if (this.params.cssClasses) {
44570 this.params.cssClasses.forEach(function (it) { return _this.addCssClass(it); });
44571 }
44572 };
44573 AgMenuItemComponent.prototype.isDisabled = function () {
44574 return !!this.params.disabled;
44575 };
44576 AgMenuItemComponent.prototype.openSubMenu = function (activateFirstItem) {
44577 var _this = this;
44578 if (activateFirstItem === void 0) { activateFirstItem = false; }
44579 this.closeSubMenu();
44580 if (!this.params.subMenu) {
44581 return;
44582 }
44583 var ePopup = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["loadTemplate"])(/* html */ "<div class=\"ag-menu\" role=\"presentation\"></div>");
44584 var destroySubMenu;
44585 if (this.params.subMenu instanceof Array) {
44586 var currentLevel = Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["getAriaLevel"])(this.getGui());
44587 var nextLevel = isNaN(currentLevel) ? 1 : (currentLevel + 1);
44588 var childMenu_1 = this.createBean(new _agMenuList__WEBPACK_IMPORTED_MODULE_1__["AgMenuList"](nextLevel));
44589 childMenu_1.setParentComponent(this);
44590 childMenu_1.addMenuItems(this.params.subMenu);
44591 ePopup.appendChild(childMenu_1.getGui());
44592 // bubble menu item selected events
44593 this.addManagedListener(childMenu_1, AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED, function (e) { return _this.dispatchEvent(e); });
44594 childMenu_1.addGuiEventListener('mouseenter', function () { return _this.cancelDeactivate(); });
44595 destroySubMenu = function () { return _this.destroyBean(childMenu_1); };
44596 if (activateFirstItem) {
44597 setTimeout(function () { return childMenu_1.activateFirstItem(); }, 0);
44598 }
44599 }
44600 else {
44601 var subMenu_1 = this.params.subMenu;
44602 var menuPanel = this.createBean(new _agMenuPanel__WEBPACK_IMPORTED_MODULE_2__["AgMenuPanel"](subMenu_1));
44603 menuPanel.setParentComponent(this);
44604 var subMenuGui_1 = menuPanel.getGui();
44605 var mouseEvent_1 = 'mouseenter';
44606 var mouseEnterListener_1 = function () { return _this.cancelDeactivate(); };
44607 subMenuGui_1.addEventListener(mouseEvent_1, mouseEnterListener_1);
44608 destroySubMenu = function () { return subMenuGui_1.removeEventListener(mouseEvent_1, mouseEnterListener_1); };
44609 ePopup.appendChild(subMenuGui_1);
44610 if (subMenu_1.afterGuiAttached) {
44611 setTimeout(function () { return subMenu_1.afterGuiAttached(); }, 0);
44612 }
44613 }
44614 var eGui = this.getGui();
44615 var positionCallback = this.popupService.positionPopupForMenu.bind(this.popupService, { eventSource: eGui, ePopup: ePopup });
44616 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
44617 var addPopupRes = this.popupService.addPopup({
44618 modal: true,
44619 eChild: ePopup,
44620 positionCallback: positionCallback,
44621 anchorToElement: eGui,
44622 ariaLabel: translate('ariaLabelSubMenu', 'SubMenu')
44623 });
44624 this.subMenuIsOpen = true;
44625 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["setAriaExpanded"])(eGui, true);
44626 this.hideSubMenu = function () {
44627 if (addPopupRes) {
44628 addPopupRes.hideFunc();
44629 }
44630 _this.subMenuIsOpen = false;
44631 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["setAriaExpanded"])(eGui, false);
44632 destroySubMenu();
44633 };
44634 };
44635 AgMenuItemComponent.prototype.closeSubMenu = function () {
44636 if (!this.hideSubMenu) {
44637 return;
44638 }
44639 this.hideSubMenu();
44640 this.hideSubMenu = null;
44641 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["setAriaExpanded"])(this.getGui(), false);
44642 };
44643 AgMenuItemComponent.prototype.isSubMenuOpen = function () {
44644 return this.subMenuIsOpen;
44645 };
44646 AgMenuItemComponent.prototype.activate = function (openSubMenu) {
44647 var _this = this;
44648 this.cancelActivate();
44649 if (this.params.disabled) {
44650 return;
44651 }
44652 this.isActive = true;
44653 this.addCssClass(this.getClassName('active'));
44654 this.getGui().focus();
44655 if (openSubMenu && this.params.subMenu) {
44656 window.setTimeout(function () {
44657 if (_this.isAlive() && _this.isActive) {
44658 _this.openSubMenu();
44659 }
44660 }, 300);
44661 }
44662 this.onItemActivated();
44663 };
44664 AgMenuItemComponent.prototype.deactivate = function () {
44665 this.cancelDeactivate();
44666 this.removeCssClass(this.getClassName('active'));
44667 this.isActive = false;
44668 if (this.subMenuIsOpen) {
44669 this.hideSubMenu();
44670 }
44671 };
44672 AgMenuItemComponent.prototype.addIcon = function () {
44673 if (!this.params.checked && !this.params.icon && this.params.isCompact) {
44674 return;
44675 }
44676 var icon = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["loadTemplate"])(/* html */ "<span ref=\"eIcon\" class=\"" + this.getClassName('part') + " " + this.getClassName('icon') + "\" role=\"presentation\"></span>");
44677 if (this.params.checked) {
44678 icon.appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_5__["createIconNoSpan"])('check', this.gridOptionsWrapper));
44679 }
44680 else if (this.params.icon) {
44681 if (Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["isNodeOrElement"])(this.params.icon)) {
44682 icon.appendChild(this.params.icon);
44683 }
44684 else if (typeof this.params.icon === 'string') {
44685 icon.innerHTML = this.params.icon;
44686 }
44687 else {
44688 console.warn('AG Grid: menu item icon must be DOM node or string');
44689 }
44690 }
44691 this.getGui().appendChild(icon);
44692 };
44693 AgMenuItemComponent.prototype.addName = function () {
44694 if (!this.params.name && this.params.isCompact) {
44695 return;
44696 }
44697 var name = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["loadTemplate"])(/* html */ "<span ref=\"eName\" class=\"" + this.getClassName('part') + " " + this.getClassName('text') + "\">" + (this.params.name || '') + "</span>");
44698 this.getGui().appendChild(name);
44699 };
44700 AgMenuItemComponent.prototype.addTooltip = function () {
44701 if (!this.params.tooltip) {
44702 return;
44703 }
44704 this.tooltip = this.params.tooltip;
44705 if (this.gridOptionsWrapper.isEnableBrowserTooltips()) {
44706 this.getGui().setAttribute('title', this.tooltip);
44707 }
44708 else {
44709 this.createManagedBean(new _customTooltipFeature__WEBPACK_IMPORTED_MODULE_7__["CustomTooltipFeature"](this));
44710 }
44711 };
44712 AgMenuItemComponent.prototype.getTooltipParams = function () {
44713 return {
44714 location: 'menu',
44715 value: this.tooltip
44716 };
44717 };
44718 AgMenuItemComponent.prototype.addShortcut = function () {
44719 if (!this.params.shortcut && this.params.isCompact) {
44720 return;
44721 }
44722 var shortcut = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["loadTemplate"])(/* html */ "<span ref=\"eShortcut\" class=\"" + this.getClassName('part') + " " + this.getClassName('shortcut') + "\">" + (this.params.shortcut || '') + "</span>");
44723 this.getGui().appendChild(shortcut);
44724 };
44725 AgMenuItemComponent.prototype.addSubMenu = function () {
44726 if (!this.params.subMenu && this.params.isCompact) {
44727 return;
44728 }
44729 var pointer = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["loadTemplate"])(/* html */ "<span ref=\"ePopupPointer\" class=\"" + this.getClassName('part') + " " + this.getClassName('popup-pointer') + "\"></span>");
44730 var eGui = this.getGui();
44731 if (this.params.subMenu) {
44732 var iconName = this.gridOptionsWrapper.isEnableRtl() ? 'smallLeft' : 'smallRight';
44733 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["setAriaExpanded"])(eGui, false);
44734 pointer.appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_5__["createIconNoSpan"])(iconName, this.gridOptionsWrapper));
44735 }
44736 eGui.appendChild(pointer);
44737 };
44738 AgMenuItemComponent.prototype.onItemSelected = function (event) {
44739 if (this.params.action) {
44740 this.params.action();
44741 }
44742 else {
44743 this.openSubMenu(event && event.type === 'keydown');
44744 }
44745 if (this.params.subMenu && !this.params.action) {
44746 return;
44747 }
44748 var e = {
44749 type: AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,
44750 action: this.params.action,
44751 checked: this.params.checked,
44752 cssClasses: this.params.cssClasses,
44753 disabled: this.params.disabled,
44754 icon: this.params.icon,
44755 name: this.params.name,
44756 shortcut: this.params.shortcut,
44757 subMenu: this.params.subMenu,
44758 tooltip: this.params.tooltip,
44759 event: event
44760 };
44761 this.dispatchEvent(e);
44762 };
44763 AgMenuItemComponent.prototype.onItemActivated = function () {
44764 var event = {
44765 type: AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED,
44766 menuItem: this,
44767 };
44768 this.dispatchEvent(event);
44769 };
44770 AgMenuItemComponent.prototype.cancelActivate = function () {
44771 if (this.activateTimeoutId) {
44772 window.clearTimeout(this.activateTimeoutId);
44773 this.activateTimeoutId = 0;
44774 }
44775 };
44776 AgMenuItemComponent.prototype.cancelDeactivate = function () {
44777 if (this.deactivateTimeoutId) {
44778 window.clearTimeout(this.deactivateTimeoutId);
44779 this.deactivateTimeoutId = 0;
44780 }
44781 };
44782 AgMenuItemComponent.prototype.onMouseEnter = function () {
44783 var _this = this;
44784 this.cancelDeactivate();
44785 if (this.params.isAnotherSubMenuOpen()) {
44786 // wait to see if the user enters the open sub-menu
44787 this.activateTimeoutId = window.setTimeout(function () { return _this.activate(true); }, AgMenuItemComponent.ACTIVATION_DELAY);
44788 }
44789 else {
44790 // activate immediately
44791 this.activate(true);
44792 }
44793 };
44794 AgMenuItemComponent.prototype.onMouseLeave = function () {
44795 var _this = this;
44796 this.cancelActivate();
44797 if (this.isSubMenuOpen()) {
44798 // wait to see if the user enters the sub-menu
44799 this.deactivateTimeoutId = window.setTimeout(function () { return _this.deactivate(); }, AgMenuItemComponent.ACTIVATION_DELAY);
44800 }
44801 else {
44802 // de-activate immediately
44803 this.deactivate();
44804 }
44805 };
44806 AgMenuItemComponent.prototype.getClassName = function (suffix) {
44807 var prefix = this.params.isCompact ? 'ag-compact-menu-option' : 'ag-menu-option';
44808 return suffix ? prefix + "-" + suffix : prefix;
44809 };
44810 AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED = 'menuItemSelected';
44811 AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED = 'menuItemActivated';
44812 AgMenuItemComponent.ACTIVATION_DELAY = 80;
44813 __decorate([
44814 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('popupService')
44815 ], AgMenuItemComponent.prototype, "popupService", void 0);
44816 __decorate([
44817 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
44818 ], AgMenuItemComponent.prototype, "init", null);
44819 return AgMenuItemComponent;
44820}(_component__WEBPACK_IMPORTED_MODULE_3__["Component"]));
44821
44822
44823
44824
44825
44826/***/ }),
44827/* 201 */
44828/***/ (function(module, __webpack_exports__, __webpack_require__) {
44829
44830"use strict";
44831__webpack_require__.r(__webpack_exports__);
44832/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgMenuList", function() { return AgMenuList; });
44833/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
44834/* harmony import */ var _agMenuItemComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(200);
44835/* harmony import */ var _tabGuardComp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(202);
44836/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65);
44837/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
44838/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18);
44839/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44);
44840/**
44841 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
44842 * @version v27.3.0
44843 * @link https://www.ag-grid.com/
44844 * @license MIT
44845 */
44846var __extends = (undefined && undefined.__extends) || (function () {
44847 var extendStatics = function (d, b) {
44848 extendStatics = Object.setPrototypeOf ||
44849 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
44850 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
44851 return extendStatics(d, b);
44852 };
44853 return function (d, b) {
44854 extendStatics(d, b);
44855 function __() { this.constructor = d; }
44856 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44857 };
44858})();
44859var __assign = (undefined && undefined.__assign) || function () {
44860 __assign = Object.assign || function(t) {
44861 for (var s, i = 1, n = arguments.length; i < n; i++) {
44862 s = arguments[i];
44863 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
44864 t[p] = s[p];
44865 }
44866 return t;
44867 };
44868 return __assign.apply(this, arguments);
44869};
44870var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
44871 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
44872 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
44873 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
44874 return c > 3 && r && Object.defineProperty(target, key, r), r;
44875};
44876
44877
44878
44879
44880
44881
44882
44883var AgMenuList = /** @class */ (function (_super) {
44884 __extends(AgMenuList, _super);
44885 function AgMenuList(level) {
44886 if (level === void 0) { level = 1; }
44887 var _this = _super.call(this, /* html */ "<div class=\"ag-menu-list\" role=\"tree\"></div>") || this;
44888 _this.level = level;
44889 _this.menuItems = [];
44890 return _this;
44891 }
44892 AgMenuList.prototype.postConstruct = function () {
44893 var _this = this;
44894 this.initialiseTabGuard({
44895 onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },
44896 handleKeyDown: function (e) { return _this.handleKeyDown(e); }
44897 });
44898 };
44899 AgMenuList.prototype.onTabKeyDown = function (e) {
44900 var parent = this.getParentComponent();
44901 var parentGui = parent && parent.getGui();
44902 var isManaged = parentGui && parentGui.classList.contains('ag-focus-managed');
44903 if (!isManaged) {
44904 e.preventDefault();
44905 }
44906 if (e.shiftKey) {
44907 this.closeIfIsChild(e);
44908 }
44909 };
44910 AgMenuList.prototype.handleKeyDown = function (e) {
44911 switch (e.key) {
44912 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP:
44913 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].RIGHT:
44914 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].DOWN:
44915 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].LEFT:
44916 e.preventDefault();
44917 this.handleNavKey(e.key);
44918 break;
44919 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].ESCAPE:
44920 var topMenu = this.findTopMenu();
44921 if (topMenu) {
44922 this.focusService.focusInto(topMenu.getGui());
44923 }
44924 break;
44925 }
44926 };
44927 AgMenuList.prototype.clearActiveItem = function () {
44928 if (this.activeMenuItem) {
44929 this.activeMenuItem.deactivate();
44930 this.activeMenuItem = null;
44931 }
44932 };
44933 AgMenuList.prototype.addMenuItems = function (menuItems) {
44934 var _this = this;
44935 if (menuItems == null) {
44936 return;
44937 }
44938 menuItems.forEach(function (menuItemOrString) {
44939 if (menuItemOrString === 'separator') {
44940 _this.addSeparator();
44941 }
44942 else if (typeof menuItemOrString === 'string') {
44943 console.warn("AG Grid: unrecognised menu item " + menuItemOrString);
44944 }
44945 else {
44946 _this.addItem(menuItemOrString);
44947 }
44948 });
44949 };
44950 AgMenuList.prototype.addItem = function (menuItemDef) {
44951 var _this = this;
44952 var menuItem = this.createManagedBean(new _agMenuItemComponent__WEBPACK_IMPORTED_MODULE_1__["AgMenuItemComponent"](__assign(__assign({}, menuItemDef), { isAnotherSubMenuOpen: function () { return _this.menuItems.some(function (m) { return m.isSubMenuOpen(); }); } })));
44953 menuItem.setParentComponent(this);
44954 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_6__["setAriaLevel"])(menuItem.getGui(), this.level);
44955 this.menuItems.push(menuItem);
44956 this.appendChild(menuItem.getGui());
44957 this.addManagedListener(menuItem, _agMenuItemComponent__WEBPACK_IMPORTED_MODULE_1__["AgMenuItemComponent"].EVENT_MENU_ITEM_SELECTED, function (event) {
44958 _this.dispatchEvent(event);
44959 });
44960 this.addManagedListener(menuItem, _agMenuItemComponent__WEBPACK_IMPORTED_MODULE_1__["AgMenuItemComponent"].EVENT_MENU_ITEM_ACTIVATED, function (event) {
44961 if (_this.activeMenuItem && _this.activeMenuItem !== event.menuItem) {
44962 _this.activeMenuItem.deactivate();
44963 }
44964 _this.activeMenuItem = event.menuItem;
44965 });
44966 };
44967 AgMenuList.prototype.activateFirstItem = function () {
44968 var item = this.menuItems.filter(function (currentItem) { return !currentItem.isDisabled(); })[0];
44969 if (!item) {
44970 return;
44971 }
44972 item.activate();
44973 };
44974 AgMenuList.prototype.addSeparator = function () {
44975 var separatorHtml = /* html */ "\n <div class=\"ag-menu-separator\" aria-hidden=\"true\">\n <div class=\"ag-menu-separator-part\"></div>\n <div class=\"ag-menu-separator-part\"></div>\n <div class=\"ag-menu-separator-part\"></div>\n <div class=\"ag-menu-separator-part\"></div>\n </div>";
44976 this.appendChild(Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["loadTemplate"])(separatorHtml));
44977 };
44978 AgMenuList.prototype.findTopMenu = function () {
44979 var parent = this.getParentComponent();
44980 if (!parent && this instanceof AgMenuList) {
44981 return this;
44982 }
44983 while (true) {
44984 var nextParent = parent && parent.getParentComponent && parent.getParentComponent();
44985 if (!nextParent || (!(nextParent instanceof AgMenuList || nextParent instanceof _agMenuItemComponent__WEBPACK_IMPORTED_MODULE_1__["AgMenuItemComponent"]))) {
44986 break;
44987 }
44988 parent = nextParent;
44989 }
44990 return parent instanceof AgMenuList ? parent : undefined;
44991 };
44992 AgMenuList.prototype.handleNavKey = function (key) {
44993 switch (key) {
44994 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP:
44995 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].DOWN:
44996 var nextItem = this.findNextItem(key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP);
44997 if (nextItem && nextItem !== this.activeMenuItem) {
44998 nextItem.activate();
44999 }
45000 return;
45001 }
45002 var left = this.gridOptionsWrapper.isEnableRtl() ? _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].RIGHT : _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].LEFT;
45003 if (key === left) {
45004 this.closeIfIsChild();
45005 }
45006 else {
45007 this.openChild();
45008 }
45009 };
45010 AgMenuList.prototype.closeIfIsChild = function (e) {
45011 var parentItem = this.getParentComponent();
45012 if (parentItem && parentItem instanceof _agMenuItemComponent__WEBPACK_IMPORTED_MODULE_1__["AgMenuItemComponent"]) {
45013 if (e) {
45014 e.preventDefault();
45015 }
45016 parentItem.closeSubMenu();
45017 parentItem.getGui().focus();
45018 }
45019 };
45020 AgMenuList.prototype.openChild = function () {
45021 if (this.activeMenuItem) {
45022 this.activeMenuItem.openSubMenu(true);
45023 }
45024 };
45025 AgMenuList.prototype.findNextItem = function (up) {
45026 var items = this.menuItems.filter(function (item) { return !item.isDisabled(); });
45027 if (!items.length) {
45028 return;
45029 }
45030 if (!this.activeMenuItem) {
45031 return up ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_5__["last"])(items) : items[0];
45032 }
45033 if (up) {
45034 items.reverse();
45035 }
45036 var nextItem;
45037 var foundCurrent = false;
45038 for (var i = 0; i < items.length; i++) {
45039 var item = items[i];
45040 if (!foundCurrent) {
45041 if (item === this.activeMenuItem) {
45042 foundCurrent = true;
45043 }
45044 continue;
45045 }
45046 nextItem = item;
45047 break;
45048 }
45049 return nextItem || this.activeMenuItem;
45050 };
45051 AgMenuList.prototype.destroy = function () {
45052 this.clearActiveItem();
45053 _super.prototype.destroy.call(this);
45054 };
45055 __decorate([
45056 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
45057 ], AgMenuList.prototype, "focusService", void 0);
45058 __decorate([
45059 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
45060 ], AgMenuList.prototype, "postConstruct", null);
45061 return AgMenuList;
45062}(_tabGuardComp__WEBPACK_IMPORTED_MODULE_2__["TabGuardComp"]));
45063
45064
45065
45066
45067
45068/***/ }),
45069/* 202 */
45070/***/ (function(module, __webpack_exports__, __webpack_require__) {
45071
45072"use strict";
45073__webpack_require__.r(__webpack_exports__);
45074/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabGuardComp", function() { return TabGuardComp; });
45075/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
45076/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42);
45077/* harmony import */ var _tabGuardCtrl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(203);
45078/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44);
45079/**
45080 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
45081 * @version v27.3.0
45082 * @link https://www.ag-grid.com/
45083 * @license MIT
45084 */
45085var __extends = (undefined && undefined.__extends) || (function () {
45086 var extendStatics = function (d, b) {
45087 extendStatics = Object.setPrototypeOf ||
45088 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
45089 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
45090 return extendStatics(d, b);
45091 };
45092 return function (d, b) {
45093 extendStatics(d, b);
45094 function __() { this.constructor = d; }
45095 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45096 };
45097})();
45098var __read = (undefined && undefined.__read) || function (o, n) {
45099 var m = typeof Symbol === "function" && o[Symbol.iterator];
45100 if (!m) return o;
45101 var i = m.call(o), r, ar = [], e;
45102 try {
45103 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
45104 }
45105 catch (error) { e = { error: error }; }
45106 finally {
45107 try {
45108 if (r && !r.done && (m = i["return"])) m.call(i);
45109 }
45110 finally { if (e) throw e.error; }
45111 }
45112 return ar;
45113};
45114var __spread = (undefined && undefined.__spread) || function () {
45115 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
45116 return ar;
45117};
45118
45119
45120
45121
45122var TabGuardComp = /** @class */ (function (_super) {
45123 __extends(TabGuardComp, _super);
45124 function TabGuardComp() {
45125 return _super !== null && _super.apply(this, arguments) || this;
45126 }
45127 TabGuardComp.prototype.initialiseTabGuard = function (params) {
45128 this.eTopGuard = this.createTabGuard('top');
45129 this.eBottomGuard = this.createTabGuard('bottom');
45130 this.eFocusableElement = this.getFocusableElement();
45131 var tabGuards = [this.eTopGuard, this.eBottomGuard];
45132 var compProxy = {
45133 setTabIndex: function (tabIndex) {
45134 tabGuards.forEach(function (tabGuard) { return tabIndex != null ? tabGuard.setAttribute('tabIndex', tabIndex) : tabGuard.removeAttribute('tabIndex'); });
45135 }
45136 };
45137 this.addTabGuards(this.eTopGuard, this.eBottomGuard);
45138 this.tabGuardCtrl = this.createManagedBean(new _tabGuardCtrl__WEBPACK_IMPORTED_MODULE_2__["TabGuardCtrl"]({
45139 comp: compProxy,
45140 eTopGuard: this.eTopGuard,
45141 eBottomGuard: this.eBottomGuard,
45142 eFocusableElement: this.eFocusableElement,
45143 onFocusIn: params.onFocusIn,
45144 onFocusOut: params.onFocusOut,
45145 focusInnerElement: params.focusInnerElement,
45146 handleKeyDown: params.handleKeyDown,
45147 onTabKeyDown: params.onTabKeyDown,
45148 shouldStopEventPropagation: params.shouldStopEventPropagation
45149 }));
45150 };
45151 TabGuardComp.prototype.createTabGuard = function (side) {
45152 var tabGuard = document.createElement('div');
45153 tabGuard.classList.add('ag-tab-guard', "ag-tab-guard-" + side);
45154 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaRole"])(tabGuard, 'presentation');
45155 return tabGuard;
45156 };
45157 TabGuardComp.prototype.addTabGuards = function (topTabGuard, bottomTabGuard) {
45158 this.eFocusableElement.insertAdjacentElement('afterbegin', topTabGuard);
45159 this.eFocusableElement.insertAdjacentElement('beforeend', bottomTabGuard);
45160 };
45161 TabGuardComp.prototype.removeAllChildrenExceptTabGuards = function () {
45162 var tabGuards = [this.eTopGuard, this.eBottomGuard];
45163 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["clearElement"])(this.getFocusableElement());
45164 this.addTabGuards.apply(this, __spread(tabGuards));
45165 };
45166 TabGuardComp.prototype.forceFocusOutOfContainer = function (up) {
45167 if (up === void 0) { up = false; }
45168 this.tabGuardCtrl.forceFocusOutOfContainer(up);
45169 };
45170 TabGuardComp.prototype.appendChild = function (newChild, container) {
45171 if (!Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["isNodeOrElement"])(newChild)) {
45172 newChild = newChild.getGui();
45173 }
45174 var bottomTabGuard = this.eBottomGuard;
45175 if (bottomTabGuard) {
45176 bottomTabGuard.insertAdjacentElement('beforebegin', newChild);
45177 }
45178 else {
45179 _super.prototype.appendChild.call(this, newChild, container);
45180 }
45181 };
45182 return TabGuardComp;
45183}(_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
45184
45185
45186
45187
45188
45189/***/ }),
45190/* 203 */
45191/***/ (function(module, __webpack_exports__, __webpack_require__) {
45192
45193"use strict";
45194__webpack_require__.r(__webpack_exports__);
45195/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabGuardCtrl", function() { return TabGuardCtrl; });
45196/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
45197/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
45198/* harmony import */ var _managedFocusFeature__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(64);
45199/**
45200 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
45201 * @version v27.3.0
45202 * @link https://www.ag-grid.com/
45203 * @license MIT
45204 */
45205var __extends = (undefined && undefined.__extends) || (function () {
45206 var extendStatics = function (d, b) {
45207 extendStatics = Object.setPrototypeOf ||
45208 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
45209 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
45210 return extendStatics(d, b);
45211 };
45212 return function (d, b) {
45213 extendStatics(d, b);
45214 function __() { this.constructor = d; }
45215 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45216 };
45217})();
45218var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
45219 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
45220 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
45221 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
45222 return c > 3 && r && Object.defineProperty(target, key, r), r;
45223};
45224
45225
45226
45227var TabGuardCtrl = /** @class */ (function (_super) {
45228 __extends(TabGuardCtrl, _super);
45229 function TabGuardCtrl(params) {
45230 var _this = _super.call(this) || this;
45231 _this.skipTabGuardFocus = false;
45232 var comp = params.comp, eTopGuard = params.eTopGuard, eBottomGuard = params.eBottomGuard, focusInnerElement = params.focusInnerElement, onFocusIn = params.onFocusIn, onFocusOut = params.onFocusOut, shouldStopEventPropagation = params.shouldStopEventPropagation, onTabKeyDown = params.onTabKeyDown, handleKeyDown = params.handleKeyDown, eFocusableElement = params.eFocusableElement;
45233 _this.comp = comp;
45234 _this.eTopGuard = eTopGuard;
45235 _this.eBottomGuard = eBottomGuard;
45236 _this.providedFocusInnerElement = focusInnerElement;
45237 _this.eFocusableElement = eFocusableElement;
45238 _this.providedFocusIn = onFocusIn;
45239 _this.providedFocusOut = onFocusOut;
45240 _this.providedShouldStopEventPropagation = shouldStopEventPropagation;
45241 _this.providedOnTabKeyDown = onTabKeyDown;
45242 _this.providedHandleKeyDown = handleKeyDown;
45243 return _this;
45244 }
45245 TabGuardCtrl.prototype.postConstruct = function () {
45246 var _this = this;
45247 this.createManagedBean(new _managedFocusFeature__WEBPACK_IMPORTED_MODULE_2__["ManagedFocusFeature"](this.eFocusableElement, {
45248 shouldStopEventPropagation: function () { return _this.shouldStopEventPropagation(); },
45249 onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },
45250 handleKeyDown: function (e) { return _this.handleKeyDown(e); },
45251 onFocusIn: function (e) { return _this.onFocusIn(e); },
45252 onFocusOut: function (e) { return _this.onFocusOut(e); }
45253 }));
45254 this.activateTabGuards();
45255 [this.eTopGuard, this.eBottomGuard].forEach(function (guard) { return _this.addManagedListener(guard, 'focus', _this.onFocus.bind(_this)); });
45256 };
45257 TabGuardCtrl.prototype.handleKeyDown = function (e) {
45258 if (this.providedHandleKeyDown) {
45259 this.providedHandleKeyDown(e);
45260 }
45261 };
45262 TabGuardCtrl.prototype.tabGuardsAreActive = function () {
45263 return !!this.eTopGuard && this.eTopGuard.hasAttribute('tabIndex');
45264 };
45265 TabGuardCtrl.prototype.shouldStopEventPropagation = function () {
45266 if (this.providedShouldStopEventPropagation) {
45267 return this.providedShouldStopEventPropagation();
45268 }
45269 return false;
45270 };
45271 TabGuardCtrl.prototype.activateTabGuards = function () {
45272 this.comp.setTabIndex(this.getGridTabIndex());
45273 };
45274 TabGuardCtrl.prototype.deactivateTabGuards = function () {
45275 this.comp.setTabIndex();
45276 };
45277 TabGuardCtrl.prototype.onFocus = function (e) {
45278 if (this.skipTabGuardFocus) {
45279 this.skipTabGuardFocus = false;
45280 return;
45281 }
45282 var fromBottom = e.target === this.eBottomGuard;
45283 if (this.providedFocusInnerElement) {
45284 this.providedFocusInnerElement(fromBottom);
45285 }
45286 else {
45287 this.focusInnerElement(fromBottom);
45288 }
45289 };
45290 TabGuardCtrl.prototype.onFocusIn = function (e) {
45291 if (this.providedFocusIn && this.providedFocusIn(e)) {
45292 return;
45293 }
45294 this.deactivateTabGuards();
45295 };
45296 TabGuardCtrl.prototype.onFocusOut = function (e) {
45297 if (this.providedFocusOut && this.providedFocusOut(e)) {
45298 return;
45299 }
45300 if (!this.eFocusableElement.contains(e.relatedTarget)) {
45301 this.activateTabGuards();
45302 }
45303 };
45304 TabGuardCtrl.prototype.onTabKeyDown = function (e) {
45305 var _this = this;
45306 if (this.providedOnTabKeyDown) {
45307 this.providedOnTabKeyDown(e);
45308 return;
45309 }
45310 if (e.defaultPrevented) {
45311 return;
45312 }
45313 var tabGuardsAreActive = this.tabGuardsAreActive();
45314 if (tabGuardsAreActive) {
45315 this.deactivateTabGuards();
45316 }
45317 var nextRoot = this.getNextFocusableElement(e.shiftKey);
45318 if (tabGuardsAreActive) {
45319 // ensure the tab guards are only re-instated once the event has finished processing, to avoid the browser
45320 // tabbing to the tab guard from inside the component
45321 setTimeout(function () { return _this.activateTabGuards(); }, 0);
45322 }
45323 if (!nextRoot) {
45324 return;
45325 }
45326 nextRoot.focus();
45327 e.preventDefault();
45328 };
45329 TabGuardCtrl.prototype.getGridTabIndex = function () {
45330 return this.gridOptionsWrapper.getGridTabIndex();
45331 };
45332 TabGuardCtrl.prototype.focusInnerElement = function (fromBottom) {
45333 if (fromBottom === void 0) { fromBottom = false; }
45334 var focusable = this.focusService.findFocusableElements(this.eFocusableElement);
45335 if (this.tabGuardsAreActive()) {
45336 // remove tab guards from this component from list of focusable elements
45337 focusable.splice(0, 1);
45338 focusable.splice(focusable.length - 1, 1);
45339 }
45340 if (!focusable.length) {
45341 return;
45342 }
45343 focusable[fromBottom ? focusable.length - 1 : 0].focus();
45344 };
45345 TabGuardCtrl.prototype.getNextFocusableElement = function (backwards) {
45346 return this.focusService.findNextFocusableElement(this.eFocusableElement, false, backwards);
45347 };
45348 TabGuardCtrl.prototype.forceFocusOutOfContainer = function (up) {
45349 if (up === void 0) { up = false; }
45350 var tabGuardToFocus = up ? this.eTopGuard : this.eBottomGuard;
45351 this.activateTabGuards();
45352 this.skipTabGuardFocus = true;
45353 tabGuardToFocus.focus();
45354 };
45355 __decorate([
45356 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('focusService')
45357 ], TabGuardCtrl.prototype, "focusService", void 0);
45358 __decorate([
45359 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
45360 ], TabGuardCtrl.prototype, "postConstruct", null);
45361 return TabGuardCtrl;
45362}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
45363
45364
45365
45366
45367
45368/***/ }),
45369/* 204 */
45370/***/ (function(module, __webpack_exports__, __webpack_require__) {
45371
45372"use strict";
45373__webpack_require__.r(__webpack_exports__);
45374/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgMenuPanel", function() { return AgMenuPanel; });
45375/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
45376/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65);
45377/* harmony import */ var _tabGuardComp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(202);
45378/**
45379 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
45380 * @version v27.3.0
45381 * @link https://www.ag-grid.com/
45382 * @license MIT
45383 */
45384var __extends = (undefined && undefined.__extends) || (function () {
45385 var extendStatics = function (d, b) {
45386 extendStatics = Object.setPrototypeOf ||
45387 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
45388 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
45389 return extendStatics(d, b);
45390 };
45391 return function (d, b) {
45392 extendStatics(d, b);
45393 function __() { this.constructor = d; }
45394 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45395 };
45396})();
45397var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
45398 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
45399 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
45400 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
45401 return c > 3 && r && Object.defineProperty(target, key, r), r;
45402};
45403
45404
45405
45406var AgMenuPanel = /** @class */ (function (_super) {
45407 __extends(AgMenuPanel, _super);
45408 function AgMenuPanel(wrappedComponent) {
45409 var _this = _super.call(this) || this;
45410 _this.wrappedComponent = wrappedComponent;
45411 _this.setTemplateFromElement(wrappedComponent.getGui());
45412 return _this;
45413 }
45414 AgMenuPanel.prototype.postConstruct = function () {
45415 var _this = this;
45416 this.initialiseTabGuard({
45417 onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },
45418 handleKeyDown: function (e) { return _this.handleKeyDown(e); }
45419 });
45420 };
45421 AgMenuPanel.prototype.handleKeyDown = function (e) {
45422 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ESCAPE) {
45423 this.closePanel();
45424 }
45425 };
45426 AgMenuPanel.prototype.onTabKeyDown = function (e) {
45427 if (e.defaultPrevented) {
45428 return;
45429 }
45430 this.closePanel();
45431 e.preventDefault();
45432 };
45433 AgMenuPanel.prototype.closePanel = function () {
45434 var menuItem = this.parentComponent;
45435 menuItem.closeSubMenu();
45436 setTimeout(function () { return menuItem.getGui().focus(); }, 0);
45437 };
45438 __decorate([
45439 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
45440 ], AgMenuPanel.prototype, "postConstruct", null);
45441 return AgMenuPanel;
45442}(_tabGuardComp__WEBPACK_IMPORTED_MODULE_2__["TabGuardComp"]));
45443
45444
45445
45446
45447
45448/***/ }),
45449/* 205 */
45450/***/ (function(module, __webpack_exports__, __webpack_require__) {
45451
45452"use strict";
45453__webpack_require__.r(__webpack_exports__);
45454/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupService", function() { return PopupService; });
45455/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
45456/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
45457/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
45458/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
45459/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18);
45460/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21);
45461/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(65);
45462/* harmony import */ var _focusService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(206);
45463/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(37);
45464/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(44);
45465/**
45466 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
45467 * @version v27.3.0
45468 * @link https://www.ag-grid.com/
45469 * @license MIT
45470 */
45471var __extends = (undefined && undefined.__extends) || (function () {
45472 var extendStatics = function (d, b) {
45473 extendStatics = Object.setPrototypeOf ||
45474 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
45475 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
45476 return extendStatics(d, b);
45477 };
45478 return function (d, b) {
45479 extendStatics(d, b);
45480 function __() { this.constructor = d; }
45481 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45482 };
45483})();
45484var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
45485 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
45486 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
45487 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
45488 return c > 3 && r && Object.defineProperty(target, key, r), r;
45489};
45490
45491
45492
45493
45494
45495
45496
45497
45498
45499
45500var DIRECTION;
45501(function (DIRECTION) {
45502 DIRECTION[DIRECTION["vertical"] = 0] = "vertical";
45503 DIRECTION[DIRECTION["horizontal"] = 1] = "horizontal";
45504})(DIRECTION || (DIRECTION = {}));
45505var instanceIdSeq = 0;
45506var PopupService = /** @class */ (function (_super) {
45507 __extends(PopupService, _super);
45508 function PopupService() {
45509 var _this = _super !== null && _super.apply(this, arguments) || this;
45510 _this.popupList = [];
45511 return _this;
45512 }
45513 PopupService.prototype.postConstruct = function () {
45514 var _this = this;
45515 this.ctrlsService.whenReady(function (p) {
45516 _this.gridCtrl = p.gridCtrl;
45517 _this.addManagedListener(_this.gridCtrl, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_KEYBOARD_FOCUS, function () {
45518 _this.popupList.forEach(function (popup) { return popup.element.classList.add(_focusService__WEBPACK_IMPORTED_MODULE_7__["FocusService"].AG_KEYBOARD_FOCUS); });
45519 });
45520 _this.addManagedListener(_this.gridCtrl, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_MOUSE_FOCUS, function () {
45521 _this.popupList.forEach(function (popup) { return popup.element.classList.remove(_focusService__WEBPACK_IMPORTED_MODULE_7__["FocusService"].AG_KEYBOARD_FOCUS); });
45522 });
45523 });
45524 };
45525 PopupService.prototype.getPopupParent = function () {
45526 var ePopupParent = this.gridOptionsWrapper.getPopupParent();
45527 if (ePopupParent) {
45528 return ePopupParent;
45529 }
45530 return this.gridCtrl.getGui();
45531 };
45532 PopupService.prototype.positionPopupForMenu = function (params) {
45533 var sourceRect = params.eventSource.getBoundingClientRect();
45534 var parentRect = this.getParentRect();
45535 var y = this.keepXYWithinBounds(params.ePopup, sourceRect.top - parentRect.top, DIRECTION.vertical);
45536 var minWidth = (params.ePopup.clientWidth > 0) ? params.ePopup.clientWidth : 200;
45537 params.ePopup.style.minWidth = minWidth + "px";
45538 var widthOfParent = parentRect.right - parentRect.left;
45539 var maxX = widthOfParent - minWidth;
45540 // the x position of the popup depends on RTL or LTR. for normal cases, LTR, we put the child popup
45541 // to the right, unless it doesn't fit and we then put it to the left. for RTL it's the other way around,
45542 // we try place it first to the left, and then if not to the right.
45543 var x;
45544 if (this.gridOptionsWrapper.isEnableRtl()) {
45545 // for RTL, try left first
45546 x = xLeftPosition();
45547 if (x < 0) {
45548 x = xRightPosition();
45549 }
45550 if (x > maxX) {
45551 x = 0;
45552 }
45553 }
45554 else {
45555 // for LTR, try right first
45556 x = xRightPosition();
45557 if (x > maxX) {
45558 x = xLeftPosition();
45559 }
45560 if (x < 0) {
45561 x = 0;
45562 }
45563 }
45564 params.ePopup.style.left = x + "px";
45565 params.ePopup.style.top = y + "px";
45566 function xRightPosition() {
45567 return sourceRect.right - parentRect.left - 2;
45568 }
45569 function xLeftPosition() {
45570 return sourceRect.left - parentRect.left - minWidth;
45571 }
45572 };
45573 PopupService.prototype.positionPopupUnderMouseEvent = function (params) {
45574 var ePopup = params.ePopup, nudgeX = params.nudgeX, nudgeY = params.nudgeY;
45575 var _a = this.calculatePointerAlign(params.mouseEvent), x = _a.x, y = _a.y;
45576 this.positionPopup({
45577 ePopup: ePopup,
45578 x: x,
45579 y: y,
45580 nudgeX: nudgeX,
45581 nudgeY: nudgeY,
45582 keepWithinBounds: true
45583 });
45584 this.callPostProcessPopup(params.type, params.ePopup, null, params.mouseEvent, params.column, params.rowNode);
45585 };
45586 PopupService.prototype.calculatePointerAlign = function (e) {
45587 var parentRect = this.getParentRect();
45588 return {
45589 x: e.clientX - parentRect.left,
45590 y: e.clientY - parentRect.top
45591 };
45592 };
45593 PopupService.prototype.positionPopupUnderComponent = function (params) {
45594 var sourceRect = params.eventSource.getBoundingClientRect();
45595 var alignSide = params.alignSide || 'left';
45596 var parentRect = this.getParentRect();
45597 var x = sourceRect.left - parentRect.left;
45598 if (alignSide === 'right') {
45599 x -= (params.ePopup.offsetWidth - sourceRect.width);
45600 }
45601 this.positionPopup({
45602 ePopup: params.ePopup,
45603 nudgeX: params.nudgeX,
45604 nudgeY: params.nudgeY,
45605 x: x,
45606 y: sourceRect.top - parentRect.top + sourceRect.height,
45607 keepWithinBounds: params.keepWithinBounds
45608 });
45609 this.callPostProcessPopup(params.type, params.ePopup, params.eventSource, null, params.column, params.rowNode);
45610 };
45611 PopupService.prototype.positionPopupOverComponent = function (params) {
45612 var sourceRect = params.eventSource.getBoundingClientRect();
45613 var parentRect = this.getParentRect();
45614 this.positionPopup({
45615 ePopup: params.ePopup,
45616 nudgeX: params.nudgeX,
45617 nudgeY: params.nudgeY,
45618 x: sourceRect.left - parentRect.left,
45619 y: sourceRect.top - parentRect.top,
45620 keepWithinBounds: params.keepWithinBounds
45621 });
45622 this.callPostProcessPopup(params.type, params.ePopup, params.eventSource, null, params.column, params.rowNode);
45623 };
45624 PopupService.prototype.callPostProcessPopup = function (type, ePopup, eventSource, mouseEvent, column, rowNode) {
45625 var callback = this.gridOptionsWrapper.getPostProcessPopupFunc();
45626 if (callback) {
45627 var params = {
45628 column: column,
45629 rowNode: rowNode,
45630 ePopup: ePopup,
45631 type: type,
45632 eventSource: eventSource,
45633 mouseEvent: mouseEvent
45634 };
45635 callback(params);
45636 }
45637 };
45638 PopupService.prototype.positionPopup = function (params) {
45639 var ePopup = params.ePopup, keepWithinBounds = params.keepWithinBounds, nudgeX = params.nudgeX, nudgeY = params.nudgeY;
45640 var x = params.x, y = params.y;
45641 if (nudgeX) {
45642 x += nudgeX;
45643 }
45644 if (nudgeY) {
45645 y += nudgeY;
45646 }
45647 // if popup is overflowing to the bottom, move it up
45648 if (keepWithinBounds) {
45649 x = this.keepXYWithinBounds(ePopup, x, DIRECTION.horizontal);
45650 y = this.keepXYWithinBounds(ePopup, y, DIRECTION.vertical);
45651 }
45652 ePopup.style.left = x + "px";
45653 ePopup.style.top = y + "px";
45654 };
45655 PopupService.prototype.getActivePopups = function () {
45656 return this.popupList.map(function (popup) { return popup.element; });
45657 };
45658 PopupService.prototype.getPopupList = function () {
45659 return this.popupList;
45660 };
45661 PopupService.prototype.getParentRect = function () {
45662 // subtract the popup parent borders, because popupParent.getBoundingClientRect
45663 // returns the rect outside the borders, but the 0,0 coordinate for absolute
45664 // positioning is inside the border, leading the popup to be off by the width
45665 // of the border
45666 var eDocument = this.gridOptionsWrapper.getDocument();
45667 var popupParent = this.getPopupParent();
45668 if (popupParent === eDocument.body) {
45669 popupParent = eDocument.documentElement;
45670 }
45671 var style = getComputedStyle(popupParent);
45672 var bounds = popupParent.getBoundingClientRect();
45673 return {
45674 top: bounds.top + parseFloat(style.borderTopWidth) || 0,
45675 left: bounds.left + parseFloat(style.borderLeftWidth) || 0,
45676 right: bounds.right + parseFloat(style.borderRightWidth) || 0,
45677 bottom: bounds.bottom + parseFloat(style.borderBottomWidth) || 0,
45678 };
45679 };
45680 PopupService.prototype.keepXYWithinBounds = function (ePopup, position, direction) {
45681 var isVertical = direction === DIRECTION.vertical;
45682 var sizeProperty = isVertical ? 'clientHeight' : 'clientWidth';
45683 var anchorProperty = isVertical ? 'top' : 'left';
45684 var offsetProperty = isVertical ? 'offsetHeight' : 'offsetWidth';
45685 var scrollPositionProperty = isVertical ? 'scrollTop' : 'scrollLeft';
45686 var eDocument = this.gridOptionsWrapper.getDocument();
45687 var docElement = eDocument.documentElement;
45688 var popupParent = this.getPopupParent();
45689 var parentRect = popupParent.getBoundingClientRect();
45690 var documentRect = eDocument.documentElement.getBoundingClientRect();
45691 var isBody = popupParent === eDocument.body;
45692 var offsetSize = ePopup[offsetProperty];
45693 var getSize = isVertical ? _utils_dom__WEBPACK_IMPORTED_MODULE_3__["getAbsoluteHeight"] : _utils_dom__WEBPACK_IMPORTED_MODULE_3__["getAbsoluteWidth"];
45694 var sizeOfParent = isBody ? (getSize(docElement) + docElement[scrollPositionProperty]) : popupParent[sizeProperty];
45695 if (isBody) {
45696 sizeOfParent -= Math.abs(documentRect[anchorProperty] - parentRect[anchorProperty]);
45697 }
45698 var max = sizeOfParent - offsetSize;
45699 return Math.min(Math.max(position, 0), Math.abs(max));
45700 };
45701 PopupService.prototype.keepPopupPositionedRelativeTo = function (params) {
45702 var _this = this;
45703 var eParent = this.getPopupParent();
45704 var parentRect = eParent.getBoundingClientRect();
45705 var sourceRect = params.element.getBoundingClientRect();
45706 var initialDiffTop = parentRect.top - sourceRect.top;
45707 var initialDiffLeft = parentRect.left - sourceRect.left;
45708 var lastDiffTop = initialDiffTop;
45709 var lastDiffLeft = initialDiffLeft;
45710 var topPx = params.ePopup.style.top;
45711 var top = parseInt(topPx.substring(0, topPx.length - 1), 10);
45712 var leftPx = params.ePopup.style.left;
45713 var left = parseInt(leftPx.substring(0, leftPx.length - 1), 10);
45714 return new _utils__WEBPACK_IMPORTED_MODULE_8__["AgPromise"](function (resolve) {
45715 _this.getFrameworkOverrides().setInterval(function () {
45716 var pRect = eParent.getBoundingClientRect();
45717 var sRect = params.element.getBoundingClientRect();
45718 var elementNotInDom = sRect.top == 0 && sRect.left == 0 && sRect.height == 0 && sRect.width == 0;
45719 if (elementNotInDom) {
45720 params.hidePopup();
45721 return;
45722 }
45723 var currentDiffTop = pRect.top - sRect.top;
45724 if (currentDiffTop != lastDiffTop) {
45725 var newTop = _this.keepXYWithinBounds(params.ePopup, top + initialDiffTop - currentDiffTop, DIRECTION.vertical);
45726 params.ePopup.style.top = newTop + "px";
45727 }
45728 lastDiffTop = currentDiffTop;
45729 var currentDiffLeft = pRect.left - sRect.left;
45730 if (currentDiffLeft != lastDiffLeft) {
45731 var newLeft = _this.keepXYWithinBounds(params.ePopup, left + initialDiffLeft - currentDiffLeft, DIRECTION.horizontal);
45732 params.ePopup.style.left = newLeft + "px";
45733 }
45734 lastDiffLeft = currentDiffLeft;
45735 }, 200).then(function (intervalId) {
45736 var result = function () {
45737 if (intervalId != null) {
45738 window.clearInterval(intervalId);
45739 }
45740 };
45741 resolve(result);
45742 });
45743 });
45744 };
45745 PopupService.prototype.addPopup = function (params) {
45746 var _this = this;
45747 var modal = params.modal, eChild = params.eChild, closeOnEsc = params.closeOnEsc, closedCallback = params.closedCallback, click = params.click, alwaysOnTop = params.alwaysOnTop, afterGuiAttached = params.afterGuiAttached, positionCallback = params.positionCallback, anchorToElement = params.anchorToElement, ariaLabel = params.ariaLabel;
45748 var eDocument = this.gridOptionsWrapper.getDocument();
45749 var destroyPositionTracker = new _utils__WEBPACK_IMPORTED_MODULE_8__["AgPromise"](function (resolve) { return resolve(function () { }); });
45750 if (!eDocument) {
45751 console.warn('ag-grid: could not find the document, document is empty');
45752 return { hideFunc: function () { }, stopAnchoringPromise: destroyPositionTracker };
45753 }
45754 var pos = this.popupList.findIndex(function (popup) { return popup.element === eChild; });
45755 if (pos !== -1) {
45756 var popup = this.popupList[pos];
45757 return { hideFunc: popup.hideFunc, stopAnchoringPromise: popup.stopAnchoringPromise };
45758 }
45759 var ePopupParent = this.getPopupParent();
45760 if (eChild.style.top == null) {
45761 eChild.style.top = '0px';
45762 }
45763 if (eChild.style.left == null) {
45764 eChild.style.left = '0px';
45765 }
45766 // add env CSS class to child, in case user provided a popup parent, which means
45767 // theme class may be missing
45768 var eWrapper = document.createElement('div');
45769 var theme = this.environment.getTheme().theme;
45770 if (theme) {
45771 eWrapper.classList.add(theme);
45772 }
45773 eWrapper.classList.add('ag-popup');
45774 eChild.classList.add(this.gridOptionsWrapper.isEnableRtl() ? 'ag-rtl' : 'ag-ltr', 'ag-popup-child');
45775 if (!eChild.hasAttribute('role')) {
45776 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_9__["setAriaRole"])(eChild, 'dialog');
45777 }
45778 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_9__["setAriaLabel"])(eChild, ariaLabel);
45779 if (this.focusService.isKeyboardMode()) {
45780 eChild.classList.add(_focusService__WEBPACK_IMPORTED_MODULE_7__["FocusService"].AG_KEYBOARD_FOCUS);
45781 }
45782 eWrapper.appendChild(eChild);
45783 ePopupParent.appendChild(eWrapper);
45784 if (alwaysOnTop) {
45785 this.setAlwaysOnTop(eWrapper, true);
45786 }
45787 else {
45788 this.bringPopupToFront(eWrapper);
45789 }
45790 var popupHidden = false;
45791 var hidePopupOnKeyboardEvent = function (event) {
45792 if (!eWrapper.contains(eDocument.activeElement)) {
45793 return;
45794 }
45795 var key = event.key;
45796 if (key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].ESCAPE) {
45797 hidePopup({ keyboardEvent: event });
45798 }
45799 };
45800 var hidePopupOnMouseEvent = function (event) { return hidePopup({ mouseEvent: event }); };
45801 var hidePopupOnTouchEvent = function (event) { return hidePopup({ touchEvent: event }); };
45802 var hidePopup = function (popupParams) {
45803 if (popupParams === void 0) { popupParams = {}; }
45804 var mouseEvent = popupParams.mouseEvent, touchEvent = popupParams.touchEvent, keyboardEvent = popupParams.keyboardEvent;
45805 if (
45806 // we don't hide popup if the event was on the child, or any
45807 // children of this child
45808 _this.isEventFromCurrentPopup({ mouseEvent: mouseEvent, touchEvent: touchEvent }, eChild) ||
45809 // if the event to close is actually the open event, then ignore it
45810 _this.isEventSameChainAsOriginalEvent({ originalMouseEvent: click, mouseEvent: mouseEvent, touchEvent: touchEvent }) ||
45811 // this method should only be called once. the client can have different
45812 // paths, each one wanting to close, so this method may be called multiple times.
45813 popupHidden) {
45814 return;
45815 }
45816 popupHidden = true;
45817 ePopupParent.removeChild(eWrapper);
45818 eDocument.removeEventListener('keydown', hidePopupOnKeyboardEvent);
45819 eDocument.removeEventListener('mousedown', hidePopupOnMouseEvent);
45820 eDocument.removeEventListener('touchstart', hidePopupOnTouchEvent);
45821 eDocument.removeEventListener('contextmenu', hidePopupOnMouseEvent);
45822 _this.eventService.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DRAG_STARTED, hidePopupOnMouseEvent);
45823 if (closedCallback) {
45824 closedCallback(mouseEvent || touchEvent || keyboardEvent);
45825 }
45826 _this.popupList = _this.popupList.filter(function (popup) { return popup.element !== eChild; });
45827 if (destroyPositionTracker) {
45828 destroyPositionTracker.then(function (destroyFunc) { return destroyFunc && destroyFunc(); });
45829 }
45830 };
45831 if (afterGuiAttached) {
45832 afterGuiAttached({ hidePopup: hidePopup });
45833 }
45834 // if we add these listeners now, then the current mouse
45835 // click will be included, which we don't want
45836 window.setTimeout(function () {
45837 if (closeOnEsc) {
45838 eDocument.addEventListener('keydown', hidePopupOnKeyboardEvent);
45839 }
45840 if (modal) {
45841 eDocument.addEventListener('mousedown', hidePopupOnMouseEvent);
45842 _this.eventService.addEventListener(_events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DRAG_STARTED, hidePopupOnMouseEvent);
45843 eDocument.addEventListener('touchstart', hidePopupOnTouchEvent);
45844 eDocument.addEventListener('contextmenu', hidePopupOnMouseEvent);
45845 }
45846 }, 0);
45847 if (positionCallback) {
45848 positionCallback();
45849 }
45850 if (anchorToElement) {
45851 // keeps popup positioned under created, eg if context menu, if user scrolls
45852 // using touchpad and the cell moves, it moves the popup to keep it with the cell.
45853 destroyPositionTracker = this.keepPopupPositionedRelativeTo({
45854 element: anchorToElement,
45855 ePopup: eChild,
45856 hidePopup: hidePopup
45857 });
45858 }
45859 this.popupList.push({
45860 element: eChild,
45861 wrapper: eWrapper,
45862 hideFunc: hidePopup,
45863 stopAnchoringPromise: destroyPositionTracker,
45864 instanceId: instanceIdSeq++,
45865 isAnchored: !!anchorToElement
45866 });
45867 return {
45868 hideFunc: hidePopup,
45869 stopAnchoringPromise: destroyPositionTracker
45870 };
45871 };
45872 PopupService.prototype.hasAnchoredPopup = function () {
45873 return this.popupList.some(function (popup) { return popup.isAnchored; });
45874 };
45875 PopupService.prototype.isEventFromCurrentPopup = function (params, target) {
45876 var mouseEvent = params.mouseEvent, touchEvent = params.touchEvent;
45877 var event = mouseEvent ? mouseEvent : touchEvent;
45878 if (!event) {
45879 return false;
45880 }
45881 var indexOfThisChild = this.popupList.findIndex(function (popup) { return popup.element === target; });
45882 if (indexOfThisChild === -1) {
45883 return false;
45884 }
45885 for (var i = indexOfThisChild; i < this.popupList.length; i++) {
45886 var popup = this.popupList[i];
45887 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["isElementInEventPath"])(popup.element, event)) {
45888 return true;
45889 }
45890 }
45891 // if the user did not write their own Custom Element to be rendered as popup
45892 // and this component has an additional popup element, they should have the
45893 // `ag-custom-component-popup` class to be detected as part of the Custom Component
45894 return this.isElementWithinCustomPopup(event.target);
45895 };
45896 PopupService.prototype.isElementWithinCustomPopup = function (el) {
45897 var eDocument = this.gridOptionsWrapper.getDocument();
45898 while (el && el !== eDocument.body) {
45899 if (el.classList.contains('ag-custom-component-popup') || el.parentElement === null) {
45900 return true;
45901 }
45902 el = el.parentElement;
45903 }
45904 return false;
45905 };
45906 // in some browsers, the context menu event can be fired before the click event, which means
45907 // the context menu event could open the popup, but then the click event closes it straight away.
45908 PopupService.prototype.isEventSameChainAsOriginalEvent = function (params) {
45909 var originalMouseEvent = params.originalMouseEvent, mouseEvent = params.mouseEvent, touchEvent = params.touchEvent;
45910 // we check the coordinates of the event, to see if it's the same event. there is a 1 / 1000 chance that
45911 // the event is a different event, however that is an edge case that is not very relevant (the user clicking
45912 // twice on the same location isn't a normal path).
45913 // event could be mouse event or touch event.
45914 var mouseEventOrTouch = null;
45915 if (mouseEvent) {
45916 // mouse event can be used direction, it has coordinates
45917 mouseEventOrTouch = mouseEvent;
45918 }
45919 else if (touchEvent) {
45920 // touch event doesn't have coordinates, need it's touch object
45921 mouseEventOrTouch = touchEvent.touches[0];
45922 }
45923 if (mouseEventOrTouch && originalMouseEvent) {
45924 // for x, allow 4px margin, to cover iPads, where touch (which opens menu) is followed
45925 // by browser click (when you finger up, touch is interrupted as click in browser)
45926 var screenX_1 = mouseEvent ? mouseEvent.screenX : 0;
45927 var screenY_1 = mouseEvent ? mouseEvent.screenY : 0;
45928 var xMatch = Math.abs(originalMouseEvent.screenX - screenX_1) < 5;
45929 var yMatch = Math.abs(originalMouseEvent.screenY - screenY_1) < 5;
45930 if (xMatch && yMatch) {
45931 return true;
45932 }
45933 }
45934 return false;
45935 };
45936 PopupService.prototype.getWrapper = function (ePopup) {
45937 while (!ePopup.classList.contains('ag-popup') && ePopup.parentElement) {
45938 ePopup = ePopup.parentElement;
45939 }
45940 return ePopup.classList.contains('ag-popup') ? ePopup : null;
45941 };
45942 PopupService.prototype.setAlwaysOnTop = function (ePopup, alwaysOnTop) {
45943 var eWrapper = this.getWrapper(ePopup);
45944 if (!eWrapper) {
45945 return;
45946 }
45947 eWrapper.classList.toggle('ag-always-on-top', !!alwaysOnTop);
45948 if (alwaysOnTop) {
45949 this.bringPopupToFront(eWrapper);
45950 }
45951 };
45952 PopupService.prototype.bringPopupToFront = function (ePopup) {
45953 var parent = this.getPopupParent();
45954 var popupList = Array.prototype.slice.call(parent.querySelectorAll('.ag-popup'));
45955 var popupLen = popupList.length;
45956 var alwaysOnTopList = Array.prototype.slice.call(parent.querySelectorAll('.ag-popup.ag-always-on-top'));
45957 var onTopLength = alwaysOnTopList.length;
45958 var eWrapper = this.getWrapper(ePopup);
45959 if (!eWrapper || popupLen <= 1 || !parent.contains(ePopup)) {
45960 return;
45961 }
45962 var pos = popupList.indexOf(eWrapper);
45963 var innerEls = eWrapper.querySelectorAll('div');
45964 var innerElsScrollMap = [];
45965 innerEls.forEach(function (el) {
45966 if (el.scrollTop !== 0) {
45967 innerElsScrollMap.push([el, el.scrollTop]);
45968 }
45969 });
45970 if (onTopLength) {
45971 var isPopupAlwaysOnTop = eWrapper.classList.contains('ag-always-on-top');
45972 if (isPopupAlwaysOnTop) {
45973 if (pos !== popupLen - 1) {
45974 Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(alwaysOnTopList).insertAdjacentElement('afterend', eWrapper);
45975 }
45976 }
45977 else if (pos !== popupLen - onTopLength - 1) {
45978 alwaysOnTopList[0].insertAdjacentElement('beforebegin', eWrapper);
45979 }
45980 }
45981 else if (pos !== popupLen - 1) {
45982 Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(popupList).insertAdjacentElement('afterend', eWrapper);
45983 }
45984 while (innerElsScrollMap.length) {
45985 var currentEl = innerElsScrollMap.pop();
45986 currentEl[0].scrollTop = currentEl[1];
45987 }
45988 var params = {
45989 type: 'popupToFront',
45990 api: this.gridOptionsWrapper.getApi(),
45991 columnApi: this.gridOptionsWrapper.getColumnApi(),
45992 eWrapper: eWrapper
45993 };
45994 this.eventService.dispatchEvent(params);
45995 };
45996 __decorate([
45997 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('environment')
45998 ], PopupService.prototype, "environment", void 0);
45999 __decorate([
46000 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
46001 ], PopupService.prototype, "focusService", void 0);
46002 __decorate([
46003 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
46004 ], PopupService.prototype, "ctrlsService", void 0);
46005 __decorate([
46006 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
46007 ], PopupService.prototype, "postConstruct", null);
46008 PopupService = __decorate([
46009 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('popupService')
46010 ], PopupService);
46011 return PopupService;
46012}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
46013
46014
46015
46016
46017
46018/***/ }),
46019/* 206 */
46020/***/ (function(module, __webpack_exports__, __webpack_require__) {
46021
46022"use strict";
46023__webpack_require__.r(__webpack_exports__);
46024/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FocusService", function() { return FocusService; });
46025/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
46026/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
46027/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
46028/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(64);
46029/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43);
46030/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
46031/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15);
46032/* harmony import */ var _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(120);
46033/* harmony import */ var _headerRendering_cells_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(155);
46034/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(18);
46035/**
46036 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
46037 * @version v27.3.0
46038 * @link https://www.ag-grid.com/
46039 * @license MIT
46040 */
46041var __extends = (undefined && undefined.__extends) || (function () {
46042 var extendStatics = function (d, b) {
46043 extendStatics = Object.setPrototypeOf ||
46044 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
46045 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
46046 return extendStatics(d, b);
46047 };
46048 return function (d, b) {
46049 extendStatics(d, b);
46050 function __() { this.constructor = d; }
46051 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
46052 };
46053})();
46054var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
46055 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
46056 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
46057 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
46058 return c > 3 && r && Object.defineProperty(target, key, r), r;
46059};
46060var __read = (undefined && undefined.__read) || function (o, n) {
46061 var m = typeof Symbol === "function" && o[Symbol.iterator];
46062 if (!m) return o;
46063 var i = m.call(o), r, ar = [], e;
46064 try {
46065 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
46066 }
46067 catch (error) { e = { error: error }; }
46068 finally {
46069 try {
46070 if (r && !r.done && (m = i["return"])) m.call(i);
46071 }
46072 finally { if (e) throw e.error; }
46073 }
46074 return ar;
46075};
46076var __spread = (undefined && undefined.__spread) || function () {
46077 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
46078 return ar;
46079};
46080
46081
46082
46083
46084
46085
46086
46087
46088
46089
46090var FocusService = /** @class */ (function (_super) {
46091 __extends(FocusService, _super);
46092 function FocusService() {
46093 return _super !== null && _super.apply(this, arguments) || this;
46094 }
46095 FocusService_1 = FocusService;
46096 /**
46097 * Adds a gridCore to the list of the gridCores monitoring Keyboard Mode
46098 * in a specific HTMLDocument.
46099 *
46100 * @param doc {Document} - The Document containing the gridCore.
46101 * @param gridCore {GridComp} - The GridCore to be monitored.
46102 */
46103 FocusService.addKeyboardModeEvents = function (doc, controller) {
46104 var docControllers = FocusService_1.instancesMonitored.get(doc);
46105 if (docControllers && docControllers.length > 0) {
46106 if (docControllers.indexOf(controller) === -1) {
46107 docControllers.push(controller);
46108 }
46109 }
46110 else {
46111 FocusService_1.instancesMonitored.set(doc, [controller]);
46112 doc.addEventListener('keydown', FocusService_1.toggleKeyboardMode);
46113 doc.addEventListener('mousedown', FocusService_1.toggleKeyboardMode);
46114 }
46115 };
46116 /**
46117 * Removes a gridCore from the list of the gridCores monitoring Keyboard Mode
46118 * in a specific HTMLDocument.
46119 *
46120 * @param doc {Document} - The Document containing the gridCore.
46121 * @param gridCore {GridComp} - The GridCore to be removed.
46122 */
46123 FocusService.removeKeyboardModeEvents = function (doc, controller) {
46124 var docControllers = FocusService_1.instancesMonitored.get(doc);
46125 var newControllers = [];
46126 if (docControllers && docControllers.length) {
46127 newControllers = __spread(docControllers).filter(function (currentGridCore) { return currentGridCore !== controller; });
46128 FocusService_1.instancesMonitored.set(doc, newControllers);
46129 }
46130 if (newControllers.length === 0) {
46131 doc.removeEventListener('keydown', FocusService_1.toggleKeyboardMode);
46132 doc.removeEventListener('mousedown', FocusService_1.toggleKeyboardMode);
46133 }
46134 };
46135 /**
46136 * This method will be called by `keydown` and `mousedown` events on all Documents monitoring
46137 * KeyboardMode. It will then fire a KEYBOARD_FOCUS, MOUSE_FOCUS on each gridCore present in
46138 * the Document allowing each gridCore to maintain a state for KeyboardMode.
46139 *
46140 * @param event {KeyboardEvent | MouseEvent | TouchEvent} - The event triggered.
46141 */
46142 FocusService.toggleKeyboardMode = function (event) {
46143 var isKeyboardActive = FocusService_1.keyboardModeActive;
46144 var isKeyboardEvent = event.type === 'keydown';
46145 if (isKeyboardEvent) {
46146 // the following keys should not toggle keyboard mode.
46147 if (event.ctrlKey || event.metaKey || event.altKey) {
46148 return;
46149 }
46150 }
46151 if (isKeyboardActive && isKeyboardEvent || !isKeyboardActive && !isKeyboardEvent) {
46152 return;
46153 }
46154 FocusService_1.keyboardModeActive = isKeyboardEvent;
46155 var doc = event.target.ownerDocument;
46156 if (!doc) {
46157 return;
46158 }
46159 var controllersForDoc = FocusService_1.instancesMonitored.get(doc);
46160 if (controllersForDoc) {
46161 controllersForDoc.forEach(function (controller) {
46162 controller.dispatchEvent({ type: isKeyboardEvent ? _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_KEYBOARD_FOCUS : _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_MOUSE_FOCUS });
46163 });
46164 }
46165 };
46166 FocusService.prototype.init = function () {
46167 var _this = this;
46168 var clearFocusedCellListener = this.clearFocusedCell.bind(this);
46169 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED, clearFocusedCellListener);
46170 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_NEW_COLUMNS_LOADED, this.onColumnEverythingChanged.bind(this));
46171 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_GROUP_OPENED, clearFocusedCellListener);
46172 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, clearFocusedCellListener);
46173 this.ctrlsService.whenReady(function (p) {
46174 _this.gridCtrl = p.gridCtrl;
46175 var doc = _this.gridOptionsWrapper.getDocument();
46176 FocusService_1.addKeyboardModeEvents(doc, _this.gridCtrl);
46177 _this.addDestroyFunc(function () { return _this.unregisterGridCompController(_this.gridCtrl); });
46178 });
46179 };
46180 FocusService.prototype.unregisterGridCompController = function (gridCompController) {
46181 var doc = this.gridOptionsWrapper.getDocument();
46182 FocusService_1.removeKeyboardModeEvents(doc, gridCompController);
46183 };
46184 FocusService.prototype.onColumnEverythingChanged = function () {
46185 // if the columns change, check and see if this column still exists. if it does, then
46186 // we can keep the focused cell. if it doesn't, then we need to drop the focused cell.
46187 if (!this.focusedCellPosition) {
46188 return;
46189 }
46190 var col = this.focusedCellPosition.column;
46191 var colFromColumnModel = this.columnModel.getGridColumn(col.getId());
46192 if (col !== colFromColumnModel) {
46193 this.clearFocusedCell();
46194 }
46195 };
46196 FocusService.prototype.isKeyboardMode = function () {
46197 return FocusService_1.keyboardModeActive;
46198 };
46199 // we check if the browser is focusing something, and if it is, and
46200 // it's the cell we think is focused, then return the cell. so this
46201 // methods returns the cell if a) we think it has focus and b) the
46202 // browser thinks it has focus. this then returns nothing if we
46203 // first focus a cell, then second click outside the grid, as then the
46204 // grid cell will still be focused as far as the grid is concerned,
46205 // however the browser focus will have moved somewhere else.
46206 FocusService.prototype.getFocusCellToUseAfterRefresh = function () {
46207 var eDocument = this.gridOptionsWrapper.getDocument();
46208 if (this.gridOptionsWrapper.isSuppressFocusAfterRefresh() || !this.focusedCellPosition) {
46209 return null;
46210 }
46211 // we check that the browser is actually focusing on the grid, if it is not, then
46212 // we have nothing to worry about. we check for ROW data, as this covers both focused Rows (for Full Width Rows)
46213 // and Cells (covers cells as cells live in rows)
46214 if (this.isDomDataMissingInHierarchy(eDocument.activeElement, _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_7__["RowCtrl"].DOM_DATA_KEY_ROW_CTRL)) {
46215 return null;
46216 }
46217 return this.focusedCellPosition;
46218 };
46219 FocusService.prototype.getFocusHeaderToUseAfterRefresh = function () {
46220 var eDocument = this.gridOptionsWrapper.getDocument();
46221 if (this.gridOptionsWrapper.isSuppressFocusAfterRefresh() || !this.focusedHeaderPosition) {
46222 return null;
46223 }
46224 // we check that the browser is actually focusing on the grid, if it is not, then
46225 // we have nothing to worry about
46226 if (this.isDomDataMissingInHierarchy(eDocument.activeElement, _headerRendering_cells_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_8__["AbstractHeaderCellCtrl"].DOM_DATA_KEY_HEADER_CTRL)) {
46227 return null;
46228 }
46229 return this.focusedHeaderPosition;
46230 };
46231 FocusService.prototype.isDomDataMissingInHierarchy = function (eBrowserCell, key) {
46232 var ePointer = eBrowserCell;
46233 while (ePointer) {
46234 var data = this.gridOptionsWrapper.getDomData(ePointer, key);
46235 if (data) {
46236 return false;
46237 }
46238 ePointer = ePointer.parentNode;
46239 }
46240 return true;
46241 };
46242 FocusService.prototype.clearFocusedCell = function () {
46243 this.focusedCellPosition = null;
46244 this.onCellFocused(false);
46245 };
46246 FocusService.prototype.getFocusedCell = function () {
46247 return this.focusedCellPosition;
46248 };
46249 FocusService.prototype.setFocusedCell = function (rowIndex, colKey, floating, forceBrowserFocus) {
46250 if (forceBrowserFocus === void 0) { forceBrowserFocus = false; }
46251 var gridColumn = this.columnModel.getGridColumn(colKey);
46252 // if column doesn't exist, then blank the focused cell and return. this can happen when user sets new columns,
46253 // and the focused cell is in a column that no longer exists. after columns change, the grid refreshes and tries
46254 // to re-focus the focused cell.
46255 if (!gridColumn) {
46256 this.focusedCellPosition = null;
46257 return;
46258 }
46259 this.focusedCellPosition = gridColumn ? { rowIndex: rowIndex, rowPinned: Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["makeNull"])(floating), column: gridColumn } : null;
46260 this.onCellFocused(forceBrowserFocus);
46261 };
46262 FocusService.prototype.isCellFocused = function (cellPosition) {
46263 if (this.focusedCellPosition == null) {
46264 return false;
46265 }
46266 return this.focusedCellPosition.column === cellPosition.column &&
46267 this.isRowFocused(cellPosition.rowIndex, cellPosition.rowPinned);
46268 };
46269 FocusService.prototype.isRowNodeFocused = function (rowNode) {
46270 return this.isRowFocused(rowNode.rowIndex, rowNode.rowPinned);
46271 };
46272 FocusService.prototype.isHeaderWrapperFocused = function (headerCtrl) {
46273 if (this.focusedHeaderPosition == null) {
46274 return false;
46275 }
46276 var column = headerCtrl.getColumnGroupChild();
46277 var headerRowIndex = headerCtrl.getRowIndex();
46278 var pinned = headerCtrl.getPinned();
46279 var _a = this.focusedHeaderPosition, focusedColumn = _a.column, focusedHeaderRowIndex = _a.headerRowIndex;
46280 return column === focusedColumn &&
46281 headerRowIndex === focusedHeaderRowIndex &&
46282 pinned == focusedColumn.getPinned();
46283 };
46284 FocusService.prototype.clearFocusedHeader = function () {
46285 this.focusedHeaderPosition = null;
46286 };
46287 FocusService.prototype.getFocusedHeader = function () {
46288 return this.focusedHeaderPosition;
46289 };
46290 FocusService.prototype.setFocusedHeader = function (headerRowIndex, column) {
46291 this.focusedHeaderPosition = { headerRowIndex: headerRowIndex, column: column };
46292 };
46293 FocusService.prototype.focusHeaderPosition = function (params) {
46294 var direction = params.direction, fromTab = params.fromTab, allowUserOverride = params.allowUserOverride, event = params.event;
46295 var headerPosition = params.headerPosition;
46296 if (allowUserOverride) {
46297 var gridOptionsWrapper = this.gridOptionsWrapper;
46298 var currentPosition = this.getFocusedHeader();
46299 var headerRowCount = this.headerNavigationService.getHeaderRowCount();
46300 if (fromTab) {
46301 var userFunc = gridOptionsWrapper.getTabToNextHeaderFunc();
46302 if (userFunc) {
46303 var params_1 = {
46304 backwards: direction === 'Before',
46305 previousHeaderPosition: currentPosition,
46306 nextHeaderPosition: headerPosition,
46307 headerRowCount: headerRowCount,
46308 };
46309 headerPosition = userFunc(params_1);
46310 }
46311 }
46312 else {
46313 var userFunc = gridOptionsWrapper.getNavigateToNextHeaderFunc();
46314 if (userFunc && event) {
46315 var params_2 = {
46316 key: event.key,
46317 previousHeaderPosition: currentPosition,
46318 nextHeaderPosition: headerPosition,
46319 headerRowCount: headerRowCount,
46320 event: event,
46321 };
46322 headerPosition = userFunc(params_2);
46323 }
46324 }
46325 }
46326 if (!headerPosition) {
46327 return false;
46328 }
46329 if (headerPosition.headerRowIndex === -1) {
46330 return this.focusGridView(headerPosition.column);
46331 }
46332 this.headerNavigationService.scrollToColumn(headerPosition.column, direction);
46333 var headerRowContainerCtrl = this.ctrlsService.getHeaderRowContainerCtrl(headerPosition.column.getPinned());
46334 // this will automatically call the setFocusedHeader method above
46335 var focusSuccess = headerRowContainerCtrl.focusHeader(headerPosition.headerRowIndex, headerPosition.column, event);
46336 return focusSuccess;
46337 };
46338 FocusService.prototype.focusFirstHeader = function () {
46339 var firstColumn = this.columnModel.getAllDisplayedColumns()[0];
46340 if (!firstColumn) {
46341 return false;
46342 }
46343 if (firstColumn.getParent()) {
46344 firstColumn = this.columnModel.getColumnGroupAtLevel(firstColumn, 0);
46345 }
46346 return this.focusHeaderPosition({
46347 headerPosition: { headerRowIndex: 0, column: firstColumn }
46348 });
46349 };
46350 FocusService.prototype.focusLastHeader = function (event) {
46351 var headerRowIndex = this.headerNavigationService.getHeaderRowCount() - 1;
46352 var column = Object(_utils_array__WEBPACK_IMPORTED_MODULE_9__["last"])(this.columnModel.getAllDisplayedColumns());
46353 return this.focusHeaderPosition({
46354 headerPosition: { headerRowIndex: headerRowIndex, column: column },
46355 event: event
46356 });
46357 };
46358 FocusService.prototype.isAnyCellFocused = function () {
46359 return !!this.focusedCellPosition;
46360 };
46361 FocusService.prototype.isRowFocused = function (rowIndex, floating) {
46362 if (this.focusedCellPosition == null) {
46363 return false;
46364 }
46365 return this.focusedCellPosition.rowIndex === rowIndex && this.focusedCellPosition.rowPinned === Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["makeNull"])(floating);
46366 };
46367 FocusService.prototype.findFocusableElements = function (rootNode, exclude, onlyUnmanaged) {
46368 if (onlyUnmanaged === void 0) { onlyUnmanaged = false; }
46369 var focusableString = _constants_constants__WEBPACK_IMPORTED_MODULE_6__["Constants"].FOCUSABLE_SELECTOR;
46370 var excludeString = _constants_constants__WEBPACK_IMPORTED_MODULE_6__["Constants"].FOCUSABLE_EXCLUDE;
46371 if (exclude) {
46372 excludeString += ', ' + exclude;
46373 }
46374 if (onlyUnmanaged) {
46375 excludeString += ', [tabindex="-1"]';
46376 }
46377 var nodes = Array.prototype.slice.apply(rootNode.querySelectorAll(focusableString));
46378 var excludeNodes = Array.prototype.slice.apply(rootNode.querySelectorAll(excludeString));
46379 if (!excludeNodes.length) {
46380 return nodes;
46381 }
46382 var diff = function (a, b) { return a.filter(function (element) { return b.indexOf(element) === -1; }); };
46383 return diff(nodes, excludeNodes);
46384 };
46385 FocusService.prototype.focusInto = function (rootNode, up, onlyUnmanaged) {
46386 if (up === void 0) { up = false; }
46387 if (onlyUnmanaged === void 0) { onlyUnmanaged = false; }
46388 var focusableElements = this.findFocusableElements(rootNode, null, onlyUnmanaged);
46389 var toFocus = up ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_9__["last"])(focusableElements) : focusableElements[0];
46390 if (toFocus) {
46391 toFocus.focus();
46392 return true;
46393 }
46394 return false;
46395 };
46396 FocusService.prototype.findNextFocusableElement = function (rootNode, onlyManaged, backwards) {
46397 if (rootNode === void 0) { rootNode = this.eGridDiv; }
46398 var focusable = this.findFocusableElements(rootNode, onlyManaged ? ':not([tabindex="-1"])' : null);
46399 var eDocument = this.gridOptionsWrapper.getDocument();
46400 var activeEl = eDocument.activeElement;
46401 var currentIndex;
46402 if (onlyManaged) {
46403 currentIndex = focusable.findIndex(function (el) { return el.contains(activeEl); });
46404 }
46405 else {
46406 currentIndex = focusable.indexOf(activeEl);
46407 }
46408 var nextIndex = currentIndex + (backwards ? -1 : 1);
46409 if (nextIndex < 0 || nextIndex >= focusable.length) {
46410 return null;
46411 }
46412 return focusable[nextIndex];
46413 };
46414 FocusService.prototype.isFocusUnderManagedComponent = function (rootNode) {
46415 var eDocument = this.gridOptionsWrapper.getDocument();
46416 var managedContainers = rootNode.querySelectorAll("." + _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_3__["ManagedFocusFeature"].FOCUS_MANAGED_CLASS);
46417 if (!managedContainers.length) {
46418 return false;
46419 }
46420 for (var i = 0; i < managedContainers.length; i++) {
46421 if (managedContainers[i].contains(eDocument.activeElement)) {
46422 return true;
46423 }
46424 }
46425 return false;
46426 };
46427 FocusService.prototype.findTabbableParent = function (node, limit) {
46428 if (limit === void 0) { limit = 5; }
46429 var counter = 0;
46430 while (node && Object(_utils_browser__WEBPACK_IMPORTED_MODULE_4__["getTabIndex"])(node) === null && ++counter <= limit) {
46431 node = node.parentElement;
46432 }
46433 if (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_4__["getTabIndex"])(node) === null) {
46434 return null;
46435 }
46436 return node;
46437 };
46438 FocusService.prototype.onCellFocused = function (forceBrowserFocus) {
46439 var event = {
46440 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_CELL_FOCUSED,
46441 forceBrowserFocus: forceBrowserFocus,
46442 rowIndex: null,
46443 column: null,
46444 floating: null,
46445 api: this.gridApi,
46446 columnApi: this.columnApi,
46447 rowPinned: null,
46448 isFullWidthCell: false
46449 };
46450 if (this.focusedCellPosition) {
46451 var rowIndex = event.rowIndex = this.focusedCellPosition.rowIndex;
46452 var rowPinned = event.rowPinned = this.focusedCellPosition.rowPinned;
46453 event.column = this.focusedCellPosition.column;
46454 var rowCtrl = this.rowRenderer.getRowByPosition({ rowIndex: rowIndex, rowPinned: rowPinned });
46455 if (rowCtrl) {
46456 event.isFullWidthCell = rowCtrl.isFullWidth();
46457 }
46458 }
46459 this.eventService.dispatchEvent(event);
46460 };
46461 FocusService.prototype.focusGridView = function (column, backwards) {
46462 // if suppressCellFocus is `true`, it means the user does not want to
46463 // navigate between the cells using tab. Instead, we put focus on either
46464 // the header or after the grid, depending on whether tab or shift-tab was pressed.
46465 if (this.gridOptionsWrapper.isSuppressCellFocus()) {
46466 if (backwards) {
46467 return this.focusLastHeader();
46468 }
46469 return this.focusNextGridCoreContainer(false);
46470 }
46471 var nextRow = backwards
46472 ? this.rowPositionUtils.getLastRow()
46473 : this.rowPositionUtils.getFirstRow();
46474 if (!nextRow) {
46475 return false;
46476 }
46477 var rowIndex = nextRow.rowIndex, rowPinned = nextRow.rowPinned;
46478 var focusedHeader = this.getFocusedHeader();
46479 if (!column && focusedHeader) {
46480 column = focusedHeader.column;
46481 }
46482 if (rowIndex == null || !column) {
46483 return false;
46484 }
46485 this.navigationService.ensureCellVisible({ rowIndex: rowIndex, column: column, rowPinned: rowPinned });
46486 this.setFocusedCell(rowIndex, column, Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["makeNull"])(rowPinned), true);
46487 if (this.rangeService) {
46488 var cellPosition = { rowIndex: rowIndex, rowPinned: rowPinned, column: column };
46489 this.rangeService.setRangeToCell(cellPosition);
46490 }
46491 return true;
46492 };
46493 FocusService.prototype.focusNextGridCoreContainer = function (backwards) {
46494 if (this.gridCtrl.focusNextInnerContainer(backwards)) {
46495 return true;
46496 }
46497 if (!backwards && !this.gridCtrl.isDetailGrid()) {
46498 this.gridCtrl.forceFocusOutOfContainer();
46499 }
46500 return false;
46501 };
46502 var FocusService_1;
46503 FocusService.AG_KEYBOARD_FOCUS = 'ag-keyboard-focus';
46504 FocusService.keyboardModeActive = false;
46505 FocusService.instancesMonitored = new Map();
46506 __decorate([
46507 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('eGridDiv')
46508 ], FocusService.prototype, "eGridDiv", void 0);
46509 __decorate([
46510 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
46511 ], FocusService.prototype, "columnModel", void 0);
46512 __decorate([
46513 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('headerNavigationService')
46514 ], FocusService.prototype, "headerNavigationService", void 0);
46515 __decorate([
46516 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
46517 ], FocusService.prototype, "columnApi", void 0);
46518 __decorate([
46519 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
46520 ], FocusService.prototype, "gridApi", void 0);
46521 __decorate([
46522 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
46523 ], FocusService.prototype, "rowRenderer", void 0);
46524 __decorate([
46525 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowPositionUtils')
46526 ], FocusService.prototype, "rowPositionUtils", void 0);
46527 __decorate([
46528 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('rangeService')
46529 ], FocusService.prototype, "rangeService", void 0);
46530 __decorate([
46531 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('navigationService')
46532 ], FocusService.prototype, "navigationService", void 0);
46533 __decorate([
46534 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
46535 ], FocusService.prototype, "ctrlsService", void 0);
46536 __decorate([
46537 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
46538 ], FocusService.prototype, "init", null);
46539 FocusService = FocusService_1 = __decorate([
46540 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('focusService')
46541 ], FocusService);
46542 return FocusService;
46543}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
46544
46545
46546
46547
46548
46549/***/ }),
46550/* 207 */
46551/***/ (function(module, __webpack_exports__, __webpack_require__) {
46552
46553"use strict";
46554__webpack_require__.r(__webpack_exports__);
46555/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualList", function() { return VirtualList; });
46556/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
46557/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
46558/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44);
46559/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65);
46560/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
46561/* harmony import */ var _tabGuardComp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(202);
46562/**
46563 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
46564 * @version v27.3.0
46565 * @link https://www.ag-grid.com/
46566 * @license MIT
46567 */
46568var __extends = (undefined && undefined.__extends) || (function () {
46569 var extendStatics = function (d, b) {
46570 extendStatics = Object.setPrototypeOf ||
46571 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
46572 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
46573 return extendStatics(d, b);
46574 };
46575 return function (d, b) {
46576 extendStatics(d, b);
46577 function __() { this.constructor = d; }
46578 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
46579 };
46580})();
46581var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
46582 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
46583 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
46584 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
46585 return c > 3 && r && Object.defineProperty(target, key, r), r;
46586};
46587
46588
46589
46590
46591
46592
46593var VirtualList = /** @class */ (function (_super) {
46594 __extends(VirtualList, _super);
46595 function VirtualList(cssIdentifier, ariaRole, listName) {
46596 if (cssIdentifier === void 0) { cssIdentifier = 'default'; }
46597 if (ariaRole === void 0) { ariaRole = 'listbox'; }
46598 var _this = _super.call(this, VirtualList.getTemplate(cssIdentifier)) || this;
46599 _this.cssIdentifier = cssIdentifier;
46600 _this.ariaRole = ariaRole;
46601 _this.listName = listName;
46602 _this.renderedRows = new Map();
46603 _this.rowHeight = 20;
46604 _this.isDestroyed = false;
46605 return _this;
46606 }
46607 VirtualList.prototype.postConstruct = function () {
46608 var _this = this;
46609 this.addScrollListener();
46610 this.rowHeight = this.getItemHeight();
46611 this.addResizeObserver();
46612 this.initialiseTabGuard({
46613 onFocusIn: function (e) { return _this.onFocusIn(e); },
46614 onFocusOut: function (e) { return _this.onFocusOut(e); },
46615 focusInnerElement: function (fromBottom) { return _this.focusInnerElement(fromBottom); },
46616 onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },
46617 handleKeyDown: function (e) { return _this.handleKeyDown(e); }
46618 });
46619 this.setAriaProperties();
46620 };
46621 VirtualList.prototype.setAriaProperties = function () {
46622 var translate = this.gridOptionsWrapper.getLocaleTextFunc();
46623 var listName = translate('ariaDefaultListName', this.listName || 'List');
46624 var ariaEl = this.eContainer;
46625 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaRole"])(ariaEl, this.ariaRole);
46626 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaLabel"])(ariaEl, listName);
46627 };
46628 VirtualList.prototype.addResizeObserver = function () {
46629 var listener = this.drawVirtualRows.bind(this);
46630 var destroyObserver = this.resizeObserverService.observeResize(this.getGui(), listener);
46631 this.addDestroyFunc(destroyObserver);
46632 };
46633 VirtualList.prototype.focusInnerElement = function (fromBottom) {
46634 this.focusRow(fromBottom ? this.model.getRowCount() - 1 : 0);
46635 };
46636 VirtualList.prototype.onFocusIn = function (e) {
46637 var target = e.target;
46638 if (target.classList.contains('ag-virtual-list-item')) {
46639 this.lastFocusedRowIndex = Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["getAriaPosInSet"])(target) - 1;
46640 }
46641 return false;
46642 };
46643 VirtualList.prototype.onFocusOut = function (e) {
46644 if (!this.getFocusableElement().contains(e.relatedTarget)) {
46645 this.lastFocusedRowIndex = null;
46646 }
46647 return false;
46648 };
46649 VirtualList.prototype.handleKeyDown = function (e) {
46650 switch (e.key) {
46651 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP:
46652 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].DOWN:
46653 if (this.navigate(e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP)) {
46654 e.preventDefault();
46655 }
46656 break;
46657 }
46658 };
46659 VirtualList.prototype.onTabKeyDown = function (e) {
46660 if (this.navigate(e.shiftKey)) {
46661 e.preventDefault();
46662 }
46663 else {
46664 // focus on the first or last focusable element to ensure that any other handlers start from there
46665 this.focusService.focusInto(this.getGui(), !e.shiftKey);
46666 }
46667 };
46668 VirtualList.prototype.navigate = function (up) {
46669 if (this.lastFocusedRowIndex == null) {
46670 return false;
46671 }
46672 var nextRow = this.lastFocusedRowIndex + (up ? -1 : 1);
46673 if (nextRow < 0 || nextRow >= this.model.getRowCount()) {
46674 return false;
46675 }
46676 this.focusRow(nextRow);
46677 return true;
46678 };
46679 VirtualList.prototype.getLastFocusedRow = function () {
46680 return this.lastFocusedRowIndex;
46681 };
46682 VirtualList.prototype.focusRow = function (rowNumber) {
46683 var _this = this;
46684 this.ensureIndexVisible(rowNumber);
46685 window.setTimeout(function () {
46686 var renderedRow = _this.renderedRows.get(rowNumber);
46687 if (renderedRow) {
46688 renderedRow.eDiv.focus();
46689 }
46690 }, 10);
46691 };
46692 VirtualList.prototype.getComponentAt = function (rowIndex) {
46693 var comp = this.renderedRows.get(rowIndex);
46694 return comp && comp.rowComponent;
46695 };
46696 VirtualList.getTemplate = function (cssIdentifier) {
46697 return /* html */ "\n <div class=\"ag-virtual-list-viewport ag-" + cssIdentifier + "-virtual-list-viewport\" role=\"presentation\">\n <div class=\"ag-virtual-list-container ag-" + cssIdentifier + "-virtual-list-container\" ref=\"eContainer\"></div>\n </div>";
46698 };
46699 VirtualList.prototype.getItemHeight = function () {
46700 return this.gridOptionsWrapper.getListItemHeight();
46701 };
46702 VirtualList.prototype.ensureIndexVisible = function (index) {
46703 var lastRow = this.model.getRowCount();
46704 if (typeof index !== 'number' || index < 0 || index >= lastRow) {
46705 console.warn('AG Grid: invalid row index for ensureIndexVisible: ' + index);
46706 return;
46707 }
46708 var rowTopPixel = index * this.rowHeight;
46709 var rowBottomPixel = rowTopPixel + this.rowHeight;
46710 var eGui = this.getGui();
46711 var viewportTopPixel = eGui.scrollTop;
46712 var viewportHeight = eGui.offsetHeight;
46713 var viewportBottomPixel = viewportTopPixel + viewportHeight;
46714 var viewportScrolledPastRow = viewportTopPixel > rowTopPixel;
46715 var viewportScrolledBeforeRow = viewportBottomPixel < rowBottomPixel;
46716 if (viewportScrolledPastRow) {
46717 // if row is before, scroll up with row at top
46718 eGui.scrollTop = rowTopPixel;
46719 }
46720 else if (viewportScrolledBeforeRow) {
46721 // if row is below, scroll down with row at bottom
46722 var newScrollPosition = rowBottomPixel - viewportHeight;
46723 eGui.scrollTop = newScrollPosition;
46724 }
46725 };
46726 VirtualList.prototype.setComponentCreator = function (componentCreator) {
46727 this.componentCreator = componentCreator;
46728 };
46729 VirtualList.prototype.getRowHeight = function () {
46730 return this.rowHeight;
46731 };
46732 VirtualList.prototype.getScrollTop = function () {
46733 return this.getGui().scrollTop;
46734 };
46735 VirtualList.prototype.setRowHeight = function (rowHeight) {
46736 this.rowHeight = rowHeight;
46737 this.refresh();
46738 };
46739 VirtualList.prototype.refresh = function () {
46740 var _this = this;
46741 if (this.model == null || this.isDestroyed) {
46742 return;
46743 }
46744 var rowCount = this.model.getRowCount();
46745 this.eContainer.style.height = rowCount * this.rowHeight + "px";
46746 // ensure height is applied before attempting to redraw rows
46747 Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["waitUntil"])(function () { return _this.eContainer.clientHeight >= rowCount * _this.rowHeight; }, function () {
46748 if (_this.isDestroyed) {
46749 return;
46750 }
46751 _this.clearVirtualRows();
46752 _this.drawVirtualRows();
46753 });
46754 };
46755 VirtualList.prototype.clearVirtualRows = function () {
46756 var _this = this;
46757 this.renderedRows.forEach(function (_, rowIndex) { return _this.removeRow(rowIndex); });
46758 };
46759 VirtualList.prototype.drawVirtualRows = function () {
46760 var gui = this.getGui();
46761 var topPixel = gui.scrollTop;
46762 var bottomPixel = topPixel + gui.offsetHeight;
46763 var firstRow = Math.floor(topPixel / this.rowHeight);
46764 var lastRow = Math.floor(bottomPixel / this.rowHeight);
46765 this.ensureRowsRendered(firstRow, lastRow);
46766 };
46767 VirtualList.prototype.ensureRowsRendered = function (start, finish) {
46768 var _this = this;
46769 // remove any rows that are no longer required
46770 this.renderedRows.forEach(function (_, rowIndex) {
46771 if ((rowIndex < start || rowIndex > finish) && rowIndex !== _this.lastFocusedRowIndex) {
46772 _this.removeRow(rowIndex);
46773 }
46774 });
46775 // insert any required new rows
46776 for (var rowIndex = start; rowIndex <= finish; rowIndex++) {
46777 if (this.renderedRows.has(rowIndex)) {
46778 continue;
46779 }
46780 // check this row actually exists (in case overflow buffer window exceeds real data)
46781 if (rowIndex < this.model.getRowCount()) {
46782 this.insertRow(rowIndex);
46783 }
46784 }
46785 };
46786 VirtualList.prototype.insertRow = function (rowIndex) {
46787 var _this = this;
46788 var value = this.model.getRow(rowIndex);
46789 var eDiv = document.createElement('div');
46790 eDiv.classList.add('ag-virtual-list-item', "ag-" + this.cssIdentifier + "-virtual-list-item");
46791 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaRole"])(eDiv, this.ariaRole === 'tree' ? 'treeitem' : 'option');
46792 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaSetSize"])(eDiv, this.model.getRowCount());
46793 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaPosInSet"])(eDiv, rowIndex + 1);
46794 eDiv.setAttribute('tabindex', '-1');
46795 if (typeof this.model.isRowSelected === 'function') {
46796 var isSelected = this.model.isRowSelected(rowIndex);
46797 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaSelected"])(eDiv, !!isSelected);
46798 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaChecked"])(eDiv, isSelected);
46799 }
46800 eDiv.style.height = this.rowHeight + "px";
46801 eDiv.style.top = this.rowHeight * rowIndex + "px";
46802 var rowComponent = this.componentCreator(value, eDiv);
46803 rowComponent.addGuiEventListener('focusin', function () { return _this.lastFocusedRowIndex = rowIndex; });
46804 eDiv.appendChild(rowComponent.getGui());
46805 // keep the DOM order consistent with the order of the rows
46806 if (this.renderedRows.has(rowIndex - 1)) {
46807 this.renderedRows.get(rowIndex - 1).eDiv.insertAdjacentElement('afterend', eDiv);
46808 }
46809 else if (this.renderedRows.has(rowIndex + 1)) {
46810 this.renderedRows.get(rowIndex + 1).eDiv.insertAdjacentElement('beforebegin', eDiv);
46811 }
46812 else {
46813 this.eContainer.appendChild(eDiv);
46814 }
46815 this.renderedRows.set(rowIndex, { rowComponent: rowComponent, eDiv: eDiv });
46816 };
46817 VirtualList.prototype.removeRow = function (rowIndex) {
46818 var component = this.renderedRows.get(rowIndex);
46819 this.eContainer.removeChild(component.eDiv);
46820 this.destroyBean(component.rowComponent);
46821 this.renderedRows.delete(rowIndex);
46822 };
46823 VirtualList.prototype.addScrollListener = function () {
46824 var _this = this;
46825 this.addGuiEventListener('scroll', function () { return _this.drawVirtualRows(); });
46826 };
46827 VirtualList.prototype.setModel = function (model) {
46828 this.model = model;
46829 };
46830 VirtualList.prototype.destroy = function () {
46831 if (this.isDestroyed) {
46832 return;
46833 }
46834 this.clearVirtualRows();
46835 this.isDestroyed = true;
46836 _super.prototype.destroy.call(this);
46837 };
46838 __decorate([
46839 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('resizeObserverService')
46840 ], VirtualList.prototype, "resizeObserverService", void 0);
46841 __decorate([
46842 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
46843 ], VirtualList.prototype, "focusService", void 0);
46844 __decorate([
46845 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eContainer')
46846 ], VirtualList.prototype, "eContainer", void 0);
46847 __decorate([
46848 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
46849 ], VirtualList.prototype, "postConstruct", null);
46850 return VirtualList;
46851}(_tabGuardComp__WEBPACK_IMPORTED_MODULE_5__["TabGuardComp"]));
46852
46853
46854
46855
46856
46857/***/ }),
46858/* 208 */
46859/***/ (function(module, __webpack_exports__, __webpack_require__) {
46860
46861"use strict";
46862__webpack_require__.r(__webpack_exports__);
46863/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VanillaFrameworkOverrides", function() { return VanillaFrameworkOverrides; });
46864/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
46865/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37);
46866/**
46867 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
46868 * @version v27.3.0
46869 * @link https://www.ag-grid.com/
46870 * @license MIT
46871 */
46872
46873
46874var OUTSIDE_ANGULAR_EVENTS = ['mouseover', 'mouseout', 'mouseenter', 'mouseleave'];
46875var PASSIVE_EVENTS = ['touchstart', 'touchend', 'touchmove', 'touchcancel'];
46876/** The base frameworks, eg React & Angular, override this bean with implementations specific to their requirement. */
46877var VanillaFrameworkOverrides = /** @class */ (function () {
46878 function VanillaFrameworkOverrides() {
46879 this.isOutsideAngular = function (eventType) { return Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["includes"])(OUTSIDE_ANGULAR_EVENTS, eventType); };
46880 }
46881 // for Vanilla JS, we use simple timeout
46882 VanillaFrameworkOverrides.prototype.setTimeout = function (action, timeout) {
46883 window.setTimeout(action, timeout);
46884 };
46885 VanillaFrameworkOverrides.prototype.setInterval = function (action, timeout) {
46886 return new _utils__WEBPACK_IMPORTED_MODULE_1__["AgPromise"](function (resolve) {
46887 resolve(window.setInterval(action, timeout));
46888 });
46889 };
46890 // for Vanilla JS, we just add the event to the element
46891 VanillaFrameworkOverrides.prototype.addEventListener = function (element, type, listener, useCapture) {
46892 var isPassive = Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["includes"])(PASSIVE_EVENTS, type);
46893 element.addEventListener(type, listener, { capture: !!useCapture, passive: isPassive });
46894 };
46895 // for Vanilla JS, we just execute the listener
46896 VanillaFrameworkOverrides.prototype.dispatchEvent = function (eventType, listener, global) {
46897 if (global === void 0) { global = false; }
46898 listener();
46899 };
46900 VanillaFrameworkOverrides.prototype.frameworkComponent = function (name) {
46901 return null;
46902 };
46903 VanillaFrameworkOverrides.prototype.isFrameworkComponent = function (comp) {
46904 return false;
46905 };
46906 return VanillaFrameworkOverrides;
46907}());
46908
46909
46910
46911
46912
46913/***/ }),
46914/* 209 */
46915/***/ (function(module, __webpack_exports__, __webpack_require__) {
46916
46917"use strict";
46918__webpack_require__.r(__webpack_exports__);
46919/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellNavigationService", function() { return CellNavigationService; });
46920/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
46921/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
46922/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
46923/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
46924/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18);
46925/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65);
46926/**
46927 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
46928 * @version v27.3.0
46929 * @link https://www.ag-grid.com/
46930 * @license MIT
46931 */
46932var __extends = (undefined && undefined.__extends) || (function () {
46933 var extendStatics = function (d, b) {
46934 extendStatics = Object.setPrototypeOf ||
46935 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
46936 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
46937 return extendStatics(d, b);
46938 };
46939 return function (d, b) {
46940 extendStatics(d, b);
46941 function __() { this.constructor = d; }
46942 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
46943 };
46944})();
46945var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
46946 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
46947 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
46948 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
46949 return c > 3 && r && Object.defineProperty(target, key, r), r;
46950};
46951
46952
46953
46954
46955
46956
46957var CellNavigationService = /** @class */ (function (_super) {
46958 __extends(CellNavigationService, _super);
46959 function CellNavigationService() {
46960 return _super !== null && _super.apply(this, arguments) || this;
46961 }
46962 // returns null if no cell to focus on, ie at the end of the grid
46963 CellNavigationService.prototype.getNextCellToFocus = function (key, focusedCell, ctrlPressed) {
46964 if (ctrlPressed === void 0) { ctrlPressed = false; }
46965 if (ctrlPressed) {
46966 return this.getNextCellToFocusWithCtrlPressed(key, focusedCell);
46967 }
46968 return this.getNextCellToFocusWithoutCtrlPressed(key, focusedCell);
46969 };
46970 CellNavigationService.prototype.getNextCellToFocusWithCtrlPressed = function (key, focusedCell) {
46971 var upKey = key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].UP;
46972 var downKey = key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].DOWN;
46973 var leftKey = key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].LEFT;
46974 var column;
46975 var rowIndex;
46976 if (upKey || downKey) {
46977 rowIndex = upKey ? this.paginationProxy.getPageFirstRow() : this.paginationProxy.getPageLastRow();
46978 column = focusedCell.column;
46979 }
46980 else {
46981 var allColumns = this.columnModel.getAllDisplayedColumns();
46982 var isRtl = this.gridOptionsWrapper.isEnableRtl();
46983 rowIndex = focusedCell.rowIndex;
46984 column = leftKey !== isRtl ? allColumns[0] : Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(allColumns);
46985 }
46986 return {
46987 rowIndex: rowIndex,
46988 rowPinned: null,
46989 column: column
46990 };
46991 };
46992 CellNavigationService.prototype.getNextCellToFocusWithoutCtrlPressed = function (key, focusedCell) {
46993 // starting with the provided cell, we keep moving until we find a cell we can
46994 // focus on.
46995 var pointer = focusedCell;
46996 var finished = false;
46997 // finished will be true when either:
46998 // a) cell found that we can focus on
46999 // b) run out of cells (ie the method returns null)
47000 while (!finished) {
47001 switch (key) {
47002 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].UP:
47003 pointer = this.getCellAbove(pointer);
47004 break;
47005 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].DOWN:
47006 pointer = this.getCellBelow(pointer);
47007 break;
47008 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].RIGHT:
47009 if (this.gridOptionsWrapper.isEnableRtl()) {
47010 pointer = this.getCellToLeft(pointer);
47011 }
47012 else {
47013 pointer = this.getCellToRight(pointer);
47014 }
47015 break;
47016 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].LEFT:
47017 if (this.gridOptionsWrapper.isEnableRtl()) {
47018 pointer = this.getCellToRight(pointer);
47019 }
47020 else {
47021 pointer = this.getCellToLeft(pointer);
47022 }
47023 break;
47024 default:
47025 pointer = null;
47026 console.warn('AG Grid: unknown key for navigation ' + key);
47027 break;
47028 }
47029 if (pointer) {
47030 finished = this.isCellGoodToFocusOn(pointer);
47031 }
47032 else {
47033 finished = true;
47034 }
47035 }
47036 return pointer;
47037 };
47038 CellNavigationService.prototype.isCellGoodToFocusOn = function (gridCell) {
47039 var column = gridCell.column;
47040 var rowNode;
47041 switch (gridCell.rowPinned) {
47042 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP:
47043 rowNode = this.pinnedRowModel.getPinnedTopRow(gridCell.rowIndex);
47044 break;
47045 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM:
47046 rowNode = this.pinnedRowModel.getPinnedBottomRow(gridCell.rowIndex);
47047 break;
47048 default:
47049 rowNode = this.rowModel.getRow(gridCell.rowIndex);
47050 break;
47051 }
47052 if (!rowNode) {
47053 return false;
47054 }
47055 var suppressNavigable = column.isSuppressNavigable(rowNode);
47056 return !suppressNavigable;
47057 };
47058 CellNavigationService.prototype.getCellToLeft = function (lastCell) {
47059 if (!lastCell) {
47060 return null;
47061 }
47062 var colToLeft = this.columnModel.getDisplayedColBefore(lastCell.column);
47063 if (!colToLeft) {
47064 return null;
47065 }
47066 return {
47067 rowIndex: lastCell.rowIndex,
47068 column: colToLeft,
47069 rowPinned: lastCell.rowPinned
47070 };
47071 };
47072 CellNavigationService.prototype.getCellToRight = function (lastCell) {
47073 if (!lastCell) {
47074 return null;
47075 }
47076 var colToRight = this.columnModel.getDisplayedColAfter(lastCell.column);
47077 // if already on right, do nothing
47078 if (!colToRight) {
47079 return null;
47080 }
47081 return {
47082 rowIndex: lastCell.rowIndex,
47083 column: colToRight,
47084 rowPinned: lastCell.rowPinned
47085 };
47086 };
47087 CellNavigationService.prototype.getRowBelow = function (rowPosition) {
47088 // if already on top row, do nothing
47089 var index = rowPosition.rowIndex;
47090 var pinned = rowPosition.rowPinned;
47091 if (this.isLastRowInContainer(rowPosition)) {
47092 switch (pinned) {
47093 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM:
47094 // never any rows after pinned bottom
47095 return null;
47096 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP:
47097 // if on last row of pinned top, then next row is main body (if rows exist),
47098 // otherwise it's the pinned bottom
47099 if (this.rowModel.isRowsToRender()) {
47100 return { rowIndex: this.paginationProxy.getPageFirstRow(), rowPinned: null };
47101 }
47102 if (this.pinnedRowModel.isRowsToRender(_constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM)) {
47103 return { rowIndex: 0, rowPinned: _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM };
47104 }
47105 return null;
47106 default:
47107 // if in the main body, then try pinned bottom, otherwise return nothing
47108 if (this.pinnedRowModel.isRowsToRender(_constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM)) {
47109 return { rowIndex: 0, rowPinned: _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM };
47110 }
47111 return null;
47112 }
47113 }
47114 return { rowIndex: index + 1, rowPinned: pinned };
47115 };
47116 CellNavigationService.prototype.getCellBelow = function (lastCell) {
47117 if (!lastCell) {
47118 return null;
47119 }
47120 var rowBelow = this.getRowBelow(lastCell);
47121 if (rowBelow) {
47122 return {
47123 rowIndex: rowBelow.rowIndex,
47124 column: lastCell.column,
47125 rowPinned: rowBelow.rowPinned
47126 };
47127 }
47128 return null;
47129 };
47130 CellNavigationService.prototype.isLastRowInContainer = function (rowPosition) {
47131 var pinned = rowPosition.rowPinned;
47132 var index = rowPosition.rowIndex;
47133 if (pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP) {
47134 var lastTopIndex = this.pinnedRowModel.getPinnedTopRowData().length - 1;
47135 return lastTopIndex <= index;
47136 }
47137 if (pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM) {
47138 var lastBottomIndex = this.pinnedRowModel.getPinnedBottomRowData().length - 1;
47139 return lastBottomIndex <= index;
47140 }
47141 var lastBodyIndex = this.paginationProxy.getPageLastRow();
47142 return lastBodyIndex <= index;
47143 };
47144 CellNavigationService.prototype.getRowAbove = function (rowPosition) {
47145 // if already on top row, do nothing
47146 var index = rowPosition.rowIndex;
47147 var pinned = rowPosition.rowPinned;
47148 var isFirstRow = pinned ? index === 0 : index === this.paginationProxy.getPageFirstRow();
47149 // if already on top row, do nothing
47150 if (isFirstRow) {
47151 if (pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP) {
47152 return null;
47153 }
47154 if (!pinned) {
47155 if (this.pinnedRowModel.isRowsToRender(_constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP)) {
47156 return this.getLastFloatingTopRow();
47157 }
47158 return null;
47159 }
47160 // last floating bottom
47161 if (this.rowModel.isRowsToRender()) {
47162 return this.getLastBodyCell();
47163 }
47164 if (this.pinnedRowModel.isRowsToRender(_constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP)) {
47165 return this.getLastFloatingTopRow();
47166 }
47167 return null;
47168 }
47169 return { rowIndex: index - 1, rowPinned: pinned };
47170 };
47171 CellNavigationService.prototype.getCellAbove = function (lastCell) {
47172 if (!lastCell) {
47173 return null;
47174 }
47175 var rowAbove = this.getRowAbove({ rowIndex: lastCell.rowIndex, rowPinned: lastCell.rowPinned });
47176 if (rowAbove) {
47177 return {
47178 rowIndex: rowAbove.rowIndex,
47179 column: lastCell.column,
47180 rowPinned: rowAbove.rowPinned
47181 };
47182 }
47183 return null;
47184 };
47185 CellNavigationService.prototype.getLastBodyCell = function () {
47186 var lastBodyRow = this.paginationProxy.getPageLastRow();
47187 return { rowIndex: lastBodyRow, rowPinned: null };
47188 };
47189 CellNavigationService.prototype.getLastFloatingTopRow = function () {
47190 var lastFloatingRow = this.pinnedRowModel.getPinnedTopRowData().length - 1;
47191 return { rowIndex: lastFloatingRow, rowPinned: _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP };
47192 };
47193 CellNavigationService.prototype.getNextTabbedCell = function (gridCell, backwards) {
47194 if (backwards) {
47195 return this.getNextTabbedCellBackwards(gridCell);
47196 }
47197 return this.getNextTabbedCellForwards(gridCell);
47198 };
47199 CellNavigationService.prototype.getNextTabbedCellForwards = function (gridCell) {
47200 var displayedColumns = this.columnModel.getAllDisplayedColumns();
47201 var newRowIndex = gridCell.rowIndex;
47202 var newFloating = gridCell.rowPinned;
47203 // move along to the next cell
47204 var newColumn = this.columnModel.getDisplayedColAfter(gridCell.column);
47205 // check if end of the row, and if so, go forward a row
47206 if (!newColumn) {
47207 newColumn = displayedColumns[0];
47208 var rowBelow = this.getRowBelow(gridCell);
47209 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(rowBelow)) {
47210 return null;
47211 }
47212 // If we are tabbing and there is a paging panel present, tabbing should go
47213 // to the paging panel instead of loading the next page.
47214 if (!rowBelow.rowPinned && !this.paginationProxy.isRowInPage(rowBelow)) {
47215 return null;
47216 }
47217 newRowIndex = rowBelow ? rowBelow.rowIndex : null;
47218 newFloating = rowBelow ? rowBelow.rowPinned : null;
47219 }
47220 return { rowIndex: newRowIndex, column: newColumn, rowPinned: newFloating };
47221 };
47222 CellNavigationService.prototype.getNextTabbedCellBackwards = function (gridCell) {
47223 var displayedColumns = this.columnModel.getAllDisplayedColumns();
47224 var newRowIndex = gridCell.rowIndex;
47225 var newFloating = gridCell.rowPinned;
47226 // move along to the next cell
47227 var newColumn = this.columnModel.getDisplayedColBefore(gridCell.column);
47228 // check if end of the row, and if so, go forward a row
47229 if (!newColumn) {
47230 newColumn = Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(displayedColumns);
47231 var rowAbove = this.getRowAbove({ rowIndex: gridCell.rowIndex, rowPinned: gridCell.rowPinned });
47232 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(rowAbove)) {
47233 return null;
47234 }
47235 // If we are tabbing and there is a paging panel present, tabbing should go
47236 // to the paging panel instead of loading the next page.
47237 if (!rowAbove.rowPinned && !this.paginationProxy.isRowInPage(rowAbove)) {
47238 return null;
47239 }
47240 newRowIndex = rowAbove ? rowAbove.rowIndex : null;
47241 newFloating = rowAbove ? rowAbove.rowPinned : null;
47242 }
47243 return { rowIndex: newRowIndex, column: newColumn, rowPinned: newFloating };
47244 };
47245 __decorate([
47246 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
47247 ], CellNavigationService.prototype, "columnModel", void 0);
47248 __decorate([
47249 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
47250 ], CellNavigationService.prototype, "rowModel", void 0);
47251 __decorate([
47252 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedRowModel')
47253 ], CellNavigationService.prototype, "pinnedRowModel", void 0);
47254 __decorate([
47255 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
47256 ], CellNavigationService.prototype, "paginationProxy", void 0);
47257 CellNavigationService = __decorate([
47258 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('cellNavigationService')
47259 ], CellNavigationService);
47260 return CellNavigationService;
47261}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
47262
47263
47264
47265
47266
47267/***/ }),
47268/* 210 */
47269/***/ (function(module, __webpack_exports__, __webpack_require__) {
47270
47271"use strict";
47272__webpack_require__.r(__webpack_exports__);
47273/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AlignedGridsService", function() { return AlignedGridsService; });
47274/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
47275/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
47276/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
47277/**
47278 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
47279 * @version v27.3.0
47280 * @link https://www.ag-grid.com/
47281 * @license MIT
47282 */
47283var __extends = (undefined && undefined.__extends) || (function () {
47284 var extendStatics = function (d, b) {
47285 extendStatics = Object.setPrototypeOf ||
47286 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
47287 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
47288 return extendStatics(d, b);
47289 };
47290 return function (d, b) {
47291 extendStatics(d, b);
47292 function __() { this.constructor = d; }
47293 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
47294 };
47295})();
47296var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
47297 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
47298 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
47299 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
47300 return c > 3 && r && Object.defineProperty(target, key, r), r;
47301};
47302var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
47303 return function (target, key) { decorator(target, key, paramIndex); }
47304};
47305
47306
47307
47308
47309
47310
47311var AlignedGridsService = /** @class */ (function (_super) {
47312 __extends(AlignedGridsService, _super);
47313 function AlignedGridsService() {
47314 var _this = _super !== null && _super.apply(this, arguments) || this;
47315 // flag to mark if we are consuming. to avoid cyclic events (ie other grid firing back to master
47316 // while processing a master event) we mark this if consuming an event, and if we are, then
47317 // we don't fire back any events.
47318 _this.consuming = false;
47319 return _this;
47320 }
47321 AlignedGridsService.prototype.setBeans = function (loggerFactory) {
47322 this.logger = loggerFactory.create('AlignedGridsService');
47323 };
47324 AlignedGridsService.prototype.init = function () {
47325 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_MOVED, this.fireColumnEvent.bind(this));
47326 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_VISIBLE, this.fireColumnEvent.bind(this));
47327 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PINNED, this.fireColumnEvent.bind(this));
47328 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_GROUP_OPENED, this.fireColumnEvent.bind(this));
47329 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_RESIZED, this.fireColumnEvent.bind(this));
47330 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_BODY_SCROLL, this.fireScrollEvent.bind(this));
47331 };
47332 // common logic across all the fire methods
47333 AlignedGridsService.prototype.fireEvent = function (callback) {
47334 // if we are already consuming, then we are acting on an event from a master,
47335 // so we don't cause a cyclic firing of events
47336 if (this.consuming) {
47337 return;
47338 }
47339 // iterate through the aligned grids, and pass each aligned grid service to the callback
47340 var otherGrids = this.gridOptionsWrapper.getAlignedGrids();
47341 if (otherGrids) {
47342 otherGrids.forEach(function (otherGridOptions) {
47343 if (otherGridOptions.api) {
47344 var alignedGridService = otherGridOptions.api.__getAlignedGridService();
47345 callback(alignedGridService);
47346 }
47347 });
47348 }
47349 };
47350 // common logic across all consume methods. very little common logic, however extracting
47351 // guarantees consistency across the methods.
47352 AlignedGridsService.prototype.onEvent = function (callback) {
47353 this.consuming = true;
47354 callback();
47355 this.consuming = false;
47356 };
47357 AlignedGridsService.prototype.fireColumnEvent = function (event) {
47358 this.fireEvent(function (alignedGridsService) {
47359 alignedGridsService.onColumnEvent(event);
47360 });
47361 };
47362 AlignedGridsService.prototype.fireScrollEvent = function (event) {
47363 if (event.direction !== 'horizontal') {
47364 return;
47365 }
47366 this.fireEvent(function (alignedGridsService) {
47367 alignedGridsService.onScrollEvent(event);
47368 });
47369 };
47370 AlignedGridsService.prototype.onScrollEvent = function (event) {
47371 var _this = this;
47372 this.onEvent(function () {
47373 var gridBodyCon = _this.ctrlsService.getGridBodyCtrl();
47374 gridBodyCon.getScrollFeature().setHorizontalScrollPosition(event.left);
47375 });
47376 };
47377 AlignedGridsService.prototype.getMasterColumns = function (event) {
47378 var result = [];
47379 if (event.columns) {
47380 event.columns.forEach(function (column) {
47381 result.push(column);
47382 });
47383 }
47384 else if (event.column) {
47385 result.push(event.column);
47386 }
47387 return result;
47388 };
47389 AlignedGridsService.prototype.getColumnIds = function (event) {
47390 var result = [];
47391 if (event.columns) {
47392 event.columns.forEach(function (column) {
47393 result.push(column.getColId());
47394 });
47395 }
47396 else if (event.column) {
47397 result.push(event.column.getColId());
47398 }
47399 return result;
47400 };
47401 AlignedGridsService.prototype.onColumnEvent = function (event) {
47402 var _this = this;
47403 this.onEvent(function () {
47404 switch (event.type) {
47405 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_MOVED:
47406 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_VISIBLE:
47407 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PINNED:
47408 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_RESIZED:
47409 var colEvent = event;
47410 _this.processColumnEvent(colEvent);
47411 break;
47412 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_GROUP_OPENED:
47413 var groupOpenedEvent = event;
47414 _this.processGroupOpenedEvent(groupOpenedEvent);
47415 break;
47416 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PIVOT_CHANGED:
47417 // we cannot support pivoting with aligned grids as the columns will be out of sync as the
47418 // grids will have columns created based on the row data of the grid.
47419 console.warn('AG Grid: pivoting is not supported with aligned grids. ' +
47420 'You can only use one of these features at a time in a grid.');
47421 break;
47422 }
47423 });
47424 };
47425 AlignedGridsService.prototype.processGroupOpenedEvent = function (groupOpenedEvent) {
47426 // likewise for column group
47427 var masterColumnGroup = groupOpenedEvent.columnGroup;
47428 var otherColumnGroup = null;
47429 if (masterColumnGroup) {
47430 var groupId = masterColumnGroup.getGroupId();
47431 otherColumnGroup = this.columnModel.getProvidedColumnGroup(groupId);
47432 }
47433 if (masterColumnGroup && !otherColumnGroup) {
47434 return;
47435 }
47436 this.logger.log('onColumnEvent-> processing ' + groupOpenedEvent + ' expanded = ' + masterColumnGroup.isExpanded());
47437 this.columnModel.setColumnGroupOpened(otherColumnGroup, masterColumnGroup.isExpanded(), "alignedGridChanged");
47438 };
47439 AlignedGridsService.prototype.processColumnEvent = function (colEvent) {
47440 var _this = this;
47441 // the column in the event is from the master grid. need to
47442 // look up the equivalent from this (other) grid
47443 var masterColumn = colEvent.column;
47444 var otherColumn = null;
47445 if (masterColumn) {
47446 otherColumn = this.columnModel.getPrimaryColumn(masterColumn.getColId());
47447 }
47448 // if event was with respect to a master column, that is not present in this
47449 // grid, then we ignore the event
47450 if (masterColumn && !otherColumn) {
47451 return;
47452 }
47453 // in time, all the methods below should use the column ids, it's a more generic way
47454 // of handling columns, and also allows for single or multi column events
47455 var masterColumns = this.getMasterColumns(colEvent);
47456 switch (colEvent.type) {
47457 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_MOVED:
47458 // when the user moves columns via setColumnState, we can't depend on moving specific columns
47459 // to an index, as there maybe be many indexes columns moved to (as wasn't result of a mouse drag).
47460 // so only way to be sure is match the order of all columns using Column State.
47461 {
47462 var movedEvent = colEvent;
47463 var srcColState = colEvent.columnApi.getColumnState();
47464 var destColState = srcColState.map(function (s) { return ({ colId: s.colId }); });
47465 this.columnModel.applyColumnState({ state: destColState, applyOrder: true }, "alignedGridChanged");
47466 this.logger.log("onColumnEvent-> processing " + colEvent.type + " toIndex = " + movedEvent.toIndex);
47467 }
47468 break;
47469 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_VISIBLE:
47470 // when the user changes visibility via setColumnState, we can't depend on visibility flag in event
47471 // as there maybe be mix of true/false (as wasn't result of a mouse click to set visiblity).
47472 // so only way to be sure is match the visibility of all columns using Column State.
47473 {
47474 var visibleEvent = colEvent;
47475 var srcColState = colEvent.columnApi.getColumnState();
47476 var destColState = srcColState.map(function (s) { return ({ colId: s.colId, hide: s.hide }); });
47477 this.columnModel.applyColumnState({ state: destColState }, "alignedGridChanged");
47478 this.logger.log("onColumnEvent-> processing " + colEvent.type + " visible = " + visibleEvent.visible);
47479 }
47480 break;
47481 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PINNED:
47482 {
47483 var pinnedEvent = colEvent;
47484 var srcColState = colEvent.columnApi.getColumnState();
47485 var destColState = srcColState.map(function (s) { return ({ colId: s.colId, pinned: s.pinned }); });
47486 this.columnModel.applyColumnState({ state: destColState }, "alignedGridChanged");
47487 this.logger.log("onColumnEvent-> processing " + colEvent.type + " pinned = " + pinnedEvent.pinned);
47488 }
47489 break;
47490 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_RESIZED:
47491 var resizedEvent_1 = colEvent;
47492 masterColumns.forEach(function (column) {
47493 _this.logger.log("onColumnEvent-> processing " + colEvent.type + " actualWidth = " + column.getActualWidth());
47494 var columnWidths = [{ key: column.getColId(), newWidth: column.getActualWidth() }];
47495 _this.columnModel.setColumnWidths(columnWidths, false, resizedEvent_1.finished, "alignedGridChanged");
47496 });
47497 break;
47498 }
47499 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
47500 var isVerticalScrollShowing = gridBodyCon.isVerticalScrollShowing();
47501 var alignedGrids = this.gridOptionsWrapper.getAlignedGrids();
47502 if (alignedGrids) {
47503 alignedGrids.forEach(function (grid) {
47504 if (grid.api) {
47505 grid.api.setAlwaysShowVerticalScroll(isVerticalScrollShowing);
47506 }
47507 });
47508 }
47509 };
47510 __decorate([
47511 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
47512 ], AlignedGridsService.prototype, "columnModel", void 0);
47513 __decorate([
47514 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
47515 ], AlignedGridsService.prototype, "ctrlsService", void 0);
47516 __decorate([
47517 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Qualifier"])('loggerFactory'))
47518 ], AlignedGridsService.prototype, "setBeans", null);
47519 __decorate([
47520 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
47521 ], AlignedGridsService.prototype, "init", null);
47522 AlignedGridsService = __decorate([
47523 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('alignedGridsService')
47524 ], AlignedGridsService);
47525 return AlignedGridsService;
47526}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
47527
47528
47529
47530
47531
47532/***/ }),
47533/* 211 */
47534/***/ (function(module, __webpack_exports__, __webpack_require__) {
47535
47536"use strict";
47537__webpack_require__.r(__webpack_exports__);
47538/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return Grid; });
47539/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridCoreCreator", function() { return GridCoreCreator; });
47540/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(112);
47541/* harmony import */ var _selectionService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
47542/* harmony import */ var _columns_columnApi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
47543/* harmony import */ var _columns_columnModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22);
47544/* harmony import */ var _rendering_rowRenderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(178);
47545/* harmony import */ var _headerRendering_gridHeaderComp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(167);
47546/* harmony import */ var _filter_filterManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(107);
47547/* harmony import */ var _valueService_valueService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(214);
47548/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(11);
47549/* harmony import */ var _gridBodyComp_gridBodyComp__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(110);
47550/* harmony import */ var _gridApi__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(156);
47551/* harmony import */ var _columns_columnFactory__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(5);
47552/* harmony import */ var _columns_displayedGroupCreator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(29);
47553/* harmony import */ var _valueService_expressionService__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(215);
47554/* harmony import */ var _templateService__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(216);
47555/* harmony import */ var _widgets_popupService__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(205);
47556/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(217);
47557/* harmony import */ var _columns_columnUtils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(28);
47558/* harmony import */ var _rendering_autoWidthCalculator__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(177);
47559/* harmony import */ var _headerRendering_common_horizontalResizeService__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(170);
47560/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(12);
47561/* harmony import */ var _gridComp_gridComp__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(218);
47562/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(97);
47563/* harmony import */ var _dragAndDrop_dragService__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(106);
47564/* harmony import */ var _sortController__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(220);
47565/* harmony import */ var _focusService__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(206);
47566/* harmony import */ var _gridBodyComp_mouseEventService__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(138);
47567/* harmony import */ var _cellNavigationService__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(209);
47568/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(23);
47569/* harmony import */ var _rendering_valueFormatterService__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(179);
47570/* harmony import */ var _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(163);
47571/* harmony import */ var _widgets_agRadioButton__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(187);
47572/* harmony import */ var _vanillaFrameworkOverrides__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(208);
47573/* harmony import */ var _gridBodyComp_scrollVisibleService__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(137);
47574/* harmony import */ var _styling_stylingService__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(186);
47575/* harmony import */ var _rendering_columnHoverService__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(221);
47576/* harmony import */ var _rendering_columnAnimationService__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(222);
47577/* harmony import */ var _columns_autoGroupColService__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(223);
47578/* harmony import */ var _pagination_paginationProxy__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(185);
47579/* harmony import */ var _pagination_paginationAutoPageSizeService__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(224);
47580/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(15);
47581/* harmony import */ var _valueService_valueCache__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(225);
47582/* harmony import */ var _valueService_changeDetectionService__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(226);
47583/* harmony import */ var _alignedGridsService__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(210);
47584/* harmony import */ var _components_framework_userComponentFactory__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(102);
47585/* harmony import */ var _components_framework_userComponentRegistry__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(34);
47586/* harmony import */ var _components_framework_agComponentUtils__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(227);
47587/* harmony import */ var _components_framework_componentMetadataProvider__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(228);
47588/* harmony import */ var _rendering_beans__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(128);
47589/* harmony import */ var _environment__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(229);
47590/* harmony import */ var _misc_animationFrameService__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(175);
47591/* harmony import */ var _gridBodyComp_navigationService__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(139);
47592/* harmony import */ var _rendering_rowContainerHeightService__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(230);
47593/* harmony import */ var _rowNodes_selectableService__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(231);
47594/* harmony import */ var _pagination_paginationComp__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(232);
47595/* harmony import */ var _misc_resizeObserverService__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(174);
47596/* harmony import */ var _rendering_overlays_overlayWrapperComponent__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(233);
47597/* harmony import */ var _widgets_agGroupComponent__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(199);
47598/* harmony import */ var _widgets_agDialog__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(197);
47599/* harmony import */ var _widgets_agPanel__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(198);
47600/* harmony import */ var _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(189);
47601/* harmony import */ var _widgets_agInputTextArea__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(190);
47602/* harmony import */ var _widgets_agSlider__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(193);
47603/* harmony import */ var _widgets_agColorPicker__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(195);
47604/* harmony import */ var _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(191);
47605/* harmony import */ var _widgets_agInputRange__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(192);
47606/* harmony import */ var _widgets_agSelect__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(66);
47607/* harmony import */ var _widgets_agAngleSelect__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(194);
47608/* harmony import */ var _widgets_agToggleButton__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(188);
47609/* harmony import */ var _entities_rowPosition__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(234);
47610/* harmony import */ var _entities_cellPosition__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(235);
47611/* harmony import */ var _pinnedRowModel_pinnedRowModel__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(180);
47612/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(17);
47613/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(16);
47614/* harmony import */ var _undoRedo_undoRedoService__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(236);
47615/* harmony import */ var _components_agStackComponentsRegistry__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(32);
47616/* harmony import */ var _headerRendering_common_headerPosition__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(238);
47617/* harmony import */ var _headerRendering_common_headerNavigationService__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(169);
47618/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(7);
47619/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(13);
47620/* harmony import */ var _columns_columnDefFactory__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(239);
47621/* harmony import */ var _rendering_row_rowCssClassCalculator__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(240);
47622/* harmony import */ var _rowNodeCache_rowNodeBlockLoader__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(184);
47623/* harmony import */ var _rowNodes_rowNodeSorter__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(241);
47624/* harmony import */ var _ctrlsService__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(242);
47625/* harmony import */ var _ctrlsFactory__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(243);
47626/* harmony import */ var _gridBodyComp_fakeHScrollComp__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(244);
47627/* harmony import */ var _gridBodyComp_pinnedWidthService__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(246);
47628/* harmony import */ var _gridBodyComp_rowContainer_rowContainerComp__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(140);
47629/* harmony import */ var _entities_rowNodeEventThrottle__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(247);
47630/* harmony import */ var _headerRendering_cells_column_standardMenu__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(171);
47631/**
47632 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
47633 * @version v27.3.0
47634 * @link https://www.ag-grid.com/
47635 * @license MIT
47636 */
47637var __read = (undefined && undefined.__read) || function (o, n) {
47638 var m = typeof Symbol === "function" && o[Symbol.iterator];
47639 if (!m) return o;
47640 var i = m.call(o), r, ar = [], e;
47641 try {
47642 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
47643 }
47644 catch (error) { e = { error: error }; }
47645 finally {
47646 try {
47647 if (r && !r.done && (m = i["return"])) m.call(i);
47648 }
47649 finally { if (e) throw e.error; }
47650 }
47651 return ar;
47652};
47653var __spread = (undefined && undefined.__spread) || function () {
47654 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
47655 return ar;
47656};
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748// creates JavaScript vanilla Grid, including JavaScript (ag-stack) components, which can
47749// be wrapped by the framework wrappers
47750var Grid = /** @class */ (function () {
47751 function Grid(eGridDiv, gridOptions, params) {
47752 if (!gridOptions) {
47753 console.error('AG Grid: no gridOptions provided to the grid');
47754 return;
47755 }
47756 this.gridOptions = gridOptions;
47757 new GridCoreCreator().create(eGridDiv, gridOptions, function (context) {
47758 var gridComp = new _gridComp_gridComp__WEBPACK_IMPORTED_MODULE_21__["GridComp"](eGridDiv);
47759 context.createBean(gridComp);
47760 }, undefined, params);
47761 }
47762 Grid.prototype.destroy = function () {
47763 if (this.gridOptions && this.gridOptions.api) {
47764 this.gridOptions.api.destroy();
47765 }
47766 };
47767 return Grid;
47768}());
47769
47770// created services of grid only, no UI, so frameworks can use this if providing
47771// their own UI
47772var GridCoreCreator = /** @class */ (function () {
47773 function GridCoreCreator() {
47774 }
47775 GridCoreCreator.prototype.create = function (eGridDiv, gridOptions, createUi, acceptChanges, params) {
47776 var _this = this;
47777 var debug = !!gridOptions.debug;
47778 var registeredModules = this.getRegisteredModules(params);
47779 var beanClasses = this.createBeansList(gridOptions.rowModelType, registeredModules);
47780 var providedBeanInstances = this.createProvidedBeans(eGridDiv, gridOptions, params);
47781 if (!beanClasses) {
47782 return;
47783 } // happens when no row model found
47784 var contextParams = {
47785 providedBeanInstances: providedBeanInstances,
47786 beanClasses: beanClasses,
47787 debug: debug
47788 };
47789 var logger = new _logger__WEBPACK_IMPORTED_MODULE_16__["Logger"]('AG Grid', function () { return gridOptions.debug; });
47790 var contextLogger = new _logger__WEBPACK_IMPORTED_MODULE_16__["Logger"]('Context', function () { return contextParams.debug; });
47791 var context = new _context_context__WEBPACK_IMPORTED_MODULE_20__["Context"](contextParams, contextLogger);
47792 var beans = context.getBean('beans');
47793 this.registerModuleUserComponents(beans, registeredModules);
47794 this.registerStackComponents(beans, registeredModules);
47795 this.registerControllers(beans, registeredModules);
47796 createUi(context);
47797 // we wait until the UI has finished initialising before setting in columns and rows
47798 beans.ctrlsService.whenReady(function () {
47799 _this.setColumnsAndData(beans);
47800 _this.dispatchGridReadyEvent(beans, gridOptions);
47801 var isEnterprise = _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_72__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_73__["ModuleNames"].EnterpriseCoreModule);
47802 logger.log("initialised successfully, enterprise = " + isEnterprise);
47803 });
47804 if (acceptChanges) {
47805 acceptChanges(context);
47806 }
47807 };
47808 GridCoreCreator.prototype.registerControllers = function (beans, registeredModules) {
47809 registeredModules.forEach(function (module) {
47810 if (module.controllers) {
47811 module.controllers.forEach(function (meta) { return beans.ctrlsFactory.register(meta); });
47812 }
47813 });
47814 };
47815 GridCoreCreator.prototype.registerStackComponents = function (beans, registeredModules) {
47816 var agStackComponents = this.createAgStackComponentsList(registeredModules);
47817 beans.agStackComponentsRegistry.setupComponents(agStackComponents);
47818 };
47819 GridCoreCreator.prototype.getRegisteredModules = function (params) {
47820 var passedViaConstructor = params ? params.modules : null;
47821 var registered = _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_72__["ModuleRegistry"].getRegisteredModules();
47822 var allModules = [];
47823 var mapNames = {};
47824 // adds to list and removes duplicates
47825 function addModule(moduleBased, mod) {
47826 function addIndividualModule(currentModule) {
47827 if (!mapNames[currentModule.moduleName]) {
47828 mapNames[currentModule.moduleName] = true;
47829 allModules.push(currentModule);
47830 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_72__["ModuleRegistry"].register(currentModule, moduleBased);
47831 }
47832 }
47833 addIndividualModule(mod);
47834 if (mod.dependantModules) {
47835 mod.dependantModules.forEach(addModule.bind(null, moduleBased));
47836 }
47837 }
47838 if (passedViaConstructor) {
47839 passedViaConstructor.forEach(addModule.bind(null, true));
47840 }
47841 if (registered) {
47842 registered.forEach(addModule.bind(null, !_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_72__["ModuleRegistry"].isPackageBased()));
47843 }
47844 return allModules;
47845 };
47846 GridCoreCreator.prototype.registerModuleUserComponents = function (beans, registeredModules) {
47847 var moduleUserComps = this.extractModuleEntity(registeredModules, function (module) { return module.userComponents ? module.userComponents : []; });
47848 moduleUserComps.forEach(function (compMeta) {
47849 beans.userComponentRegistry.registerDefaultComponent(compMeta.componentName, compMeta.componentClass);
47850 });
47851 };
47852 GridCoreCreator.prototype.createProvidedBeans = function (eGridDiv, gridOptions, params) {
47853 var frameworkOverrides = params ? params.frameworkOverrides : null;
47854 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_78__["missing"])(frameworkOverrides)) {
47855 frameworkOverrides = new _vanillaFrameworkOverrides__WEBPACK_IMPORTED_MODULE_32__["VanillaFrameworkOverrides"]();
47856 }
47857 var seed = {
47858 gridOptions: gridOptions,
47859 eGridDiv: eGridDiv,
47860 globalEventListener: params ? params.globalEventListener : null,
47861 frameworkOverrides: frameworkOverrides
47862 };
47863 if (params && params.providedBeanInstances) {
47864 Object.assign(seed, params.providedBeanInstances);
47865 }
47866 return seed;
47867 };
47868 GridCoreCreator.prototype.createAgStackComponentsList = function (registeredModules) {
47869 var components = [
47870 { componentName: 'AgCheckbox', componentClass: _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_30__["AgCheckbox"] },
47871 { componentName: 'AgRadioButton', componentClass: _widgets_agRadioButton__WEBPACK_IMPORTED_MODULE_31__["AgRadioButton"] },
47872 { componentName: 'AgToggleButton', componentClass: _widgets_agToggleButton__WEBPACK_IMPORTED_MODULE_68__["AgToggleButton"] },
47873 { componentName: 'AgInputTextField', componentClass: _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_60__["AgInputTextField"] },
47874 { componentName: 'AgInputTextArea', componentClass: _widgets_agInputTextArea__WEBPACK_IMPORTED_MODULE_61__["AgInputTextArea"] },
47875 { componentName: 'AgInputNumberField', componentClass: _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_64__["AgInputNumberField"] },
47876 { componentName: 'AgInputRange', componentClass: _widgets_agInputRange__WEBPACK_IMPORTED_MODULE_65__["AgInputRange"] },
47877 { componentName: 'AgSelect', componentClass: _widgets_agSelect__WEBPACK_IMPORTED_MODULE_66__["AgSelect"] },
47878 { componentName: 'AgSlider', componentClass: _widgets_agSlider__WEBPACK_IMPORTED_MODULE_62__["AgSlider"] },
47879 { componentName: 'AgAngleSelect', componentClass: _widgets_agAngleSelect__WEBPACK_IMPORTED_MODULE_67__["AgAngleSelect"] },
47880 { componentName: 'AgColorPicker', componentClass: _widgets_agColorPicker__WEBPACK_IMPORTED_MODULE_63__["AgColorPicker"] },
47881 { componentName: 'AgGridBody', componentClass: _gridBodyComp_gridBodyComp__WEBPACK_IMPORTED_MODULE_9__["GridBodyComp"] },
47882 { componentName: 'AgHeaderRoot', componentClass: _headerRendering_gridHeaderComp__WEBPACK_IMPORTED_MODULE_5__["GridHeaderComp"] },
47883 { componentName: 'AgPagination', componentClass: _pagination_paginationComp__WEBPACK_IMPORTED_MODULE_54__["PaginationComp"] },
47884 { componentName: 'AgOverlayWrapper', componentClass: _rendering_overlays_overlayWrapperComponent__WEBPACK_IMPORTED_MODULE_56__["OverlayWrapperComponent"] },
47885 { componentName: 'AgGroupComponent', componentClass: _widgets_agGroupComponent__WEBPACK_IMPORTED_MODULE_57__["AgGroupComponent"] },
47886 { componentName: 'AgPanel', componentClass: _widgets_agPanel__WEBPACK_IMPORTED_MODULE_59__["AgPanel"] },
47887 { componentName: 'AgDialog', componentClass: _widgets_agDialog__WEBPACK_IMPORTED_MODULE_58__["AgDialog"] },
47888 { componentName: 'AgRowContainer', componentClass: _gridBodyComp_rowContainer_rowContainerComp__WEBPACK_IMPORTED_MODULE_88__["RowContainerComp"] },
47889 { componentName: 'AgFakeHorizontalScroll', componentClass: _gridBodyComp_fakeHScrollComp__WEBPACK_IMPORTED_MODULE_86__["FakeHScrollComp"] }
47890 ];
47891 var moduleAgStackComps = this.extractModuleEntity(registeredModules, function (module) { return module.agStackComponents ? module.agStackComponents : []; });
47892 components = components.concat(moduleAgStackComps);
47893 return components;
47894 };
47895 GridCoreCreator.prototype.createBeansList = function (rowModelType, registeredModules) {
47896 var rowModelClass = this.getRowModelClass(rowModelType, registeredModules);
47897 if (!rowModelClass) {
47898 return;
47899 }
47900 // beans should only contain SERVICES, it should NEVER contain COMPONENTS
47901 var beans = [
47902 rowModelClass, _rendering_beans__WEBPACK_IMPORTED_MODULE_48__["Beans"], _entities_rowPosition__WEBPACK_IMPORTED_MODULE_69__["RowPositionUtils"], _entities_cellPosition__WEBPACK_IMPORTED_MODULE_70__["CellPositionUtils"], _headerRendering_common_headerPosition__WEBPACK_IMPORTED_MODULE_76__["HeaderPositionUtils"],
47903 _pagination_paginationAutoPageSizeService__WEBPACK_IMPORTED_MODULE_39__["PaginationAutoPageSizeService"], _gridApi__WEBPACK_IMPORTED_MODULE_10__["GridApi"], _components_framework_userComponentRegistry__WEBPACK_IMPORTED_MODULE_45__["UserComponentRegistry"], _components_framework_agComponentUtils__WEBPACK_IMPORTED_MODULE_46__["AgComponentUtils"],
47904 _components_framework_componentMetadataProvider__WEBPACK_IMPORTED_MODULE_47__["ComponentMetadataProvider"], _misc_resizeObserverService__WEBPACK_IMPORTED_MODULE_55__["ResizeObserverService"], _components_framework_userComponentFactory__WEBPACK_IMPORTED_MODULE_44__["UserComponentFactory"],
47905 _rendering_rowContainerHeightService__WEBPACK_IMPORTED_MODULE_52__["RowContainerHeightService"], _headerRendering_common_horizontalResizeService__WEBPACK_IMPORTED_MODULE_19__["HorizontalResizeService"],
47906 _pinnedRowModel_pinnedRowModel__WEBPACK_IMPORTED_MODULE_71__["PinnedRowModel"], _dragAndDrop_dragService__WEBPACK_IMPORTED_MODULE_23__["DragService"], _columns_displayedGroupCreator__WEBPACK_IMPORTED_MODULE_12__["DisplayedGroupCreator"], _eventService__WEBPACK_IMPORTED_MODULE_8__["EventService"], _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_0__["GridOptionsWrapper"],
47907 _widgets_popupService__WEBPACK_IMPORTED_MODULE_15__["PopupService"], _selectionService__WEBPACK_IMPORTED_MODULE_1__["SelectionService"], _filter_filterManager__WEBPACK_IMPORTED_MODULE_6__["FilterManager"], _columns_columnModel__WEBPACK_IMPORTED_MODULE_3__["ColumnModel"], _headerRendering_common_headerNavigationService__WEBPACK_IMPORTED_MODULE_77__["HeaderNavigationService"],
47908 _pagination_paginationProxy__WEBPACK_IMPORTED_MODULE_38__["PaginationProxy"], _rendering_rowRenderer__WEBPACK_IMPORTED_MODULE_4__["RowRenderer"], _valueService_expressionService__WEBPACK_IMPORTED_MODULE_13__["ExpressionService"], _columns_columnFactory__WEBPACK_IMPORTED_MODULE_11__["ColumnFactory"], _templateService__WEBPACK_IMPORTED_MODULE_14__["TemplateService"],
47909 _alignedGridsService__WEBPACK_IMPORTED_MODULE_43__["AlignedGridsService"], _gridBodyComp_navigationService__WEBPACK_IMPORTED_MODULE_51__["NavigationService"], _valueService_valueCache__WEBPACK_IMPORTED_MODULE_41__["ValueCache"], _valueService_valueService__WEBPACK_IMPORTED_MODULE_7__["ValueService"], _logger__WEBPACK_IMPORTED_MODULE_16__["LoggerFactory"],
47910 _columns_columnUtils__WEBPACK_IMPORTED_MODULE_17__["ColumnUtils"], _rendering_autoWidthCalculator__WEBPACK_IMPORTED_MODULE_18__["AutoWidthCalculator"], _headerRendering_cells_column_standardMenu__WEBPACK_IMPORTED_MODULE_90__["StandardMenuFactory"], _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_22__["DragAndDropService"], _columns_columnApi__WEBPACK_IMPORTED_MODULE_2__["ColumnApi"],
47911 _focusService__WEBPACK_IMPORTED_MODULE_25__["FocusService"], _gridBodyComp_mouseEventService__WEBPACK_IMPORTED_MODULE_26__["MouseEventService"], _environment__WEBPACK_IMPORTED_MODULE_49__["Environment"], _cellNavigationService__WEBPACK_IMPORTED_MODULE_27__["CellNavigationService"], _rendering_valueFormatterService__WEBPACK_IMPORTED_MODULE_29__["ValueFormatterService"],
47912 _styling_stylingService__WEBPACK_IMPORTED_MODULE_34__["StylingService"], _gridBodyComp_scrollVisibleService__WEBPACK_IMPORTED_MODULE_33__["ScrollVisibleService"], _sortController__WEBPACK_IMPORTED_MODULE_24__["SortController"], _rendering_columnHoverService__WEBPACK_IMPORTED_MODULE_35__["ColumnHoverService"], _rendering_columnAnimationService__WEBPACK_IMPORTED_MODULE_36__["ColumnAnimationService"],
47913 _rowNodes_selectableService__WEBPACK_IMPORTED_MODULE_53__["SelectableService"], _columns_autoGroupColService__WEBPACK_IMPORTED_MODULE_37__["AutoGroupColService"], _valueService_changeDetectionService__WEBPACK_IMPORTED_MODULE_42__["ChangeDetectionService"], _misc_animationFrameService__WEBPACK_IMPORTED_MODULE_50__["AnimationFrameService"],
47914 _undoRedo_undoRedoService__WEBPACK_IMPORTED_MODULE_74__["UndoRedoService"], _components_agStackComponentsRegistry__WEBPACK_IMPORTED_MODULE_75__["AgStackComponentsRegistry"], _columns_columnDefFactory__WEBPACK_IMPORTED_MODULE_80__["ColumnDefFactory"],
47915 _rendering_row_rowCssClassCalculator__WEBPACK_IMPORTED_MODULE_81__["RowCssClassCalculator"], _rowNodeCache_rowNodeBlockLoader__WEBPACK_IMPORTED_MODULE_82__["RowNodeBlockLoader"], _rowNodes_rowNodeSorter__WEBPACK_IMPORTED_MODULE_83__["RowNodeSorter"], _ctrlsService__WEBPACK_IMPORTED_MODULE_84__["CtrlsService"],
47916 _gridBodyComp_pinnedWidthService__WEBPACK_IMPORTED_MODULE_87__["PinnedWidthService"], _entities_rowNodeEventThrottle__WEBPACK_IMPORTED_MODULE_89__["RowNodeEventThrottle"], _ctrlsFactory__WEBPACK_IMPORTED_MODULE_85__["CtrlsFactory"]
47917 ];
47918 var moduleBeans = this.extractModuleEntity(registeredModules, function (module) { return module.beans ? module.beans : []; });
47919 beans.push.apply(beans, __spread(moduleBeans));
47920 // check for duplicates, as different modules could include the same beans that
47921 // they depend on, eg ClientSideRowModel in enterprise, and ClientSideRowModel in community
47922 var beansNoDuplicates = [];
47923 beans.forEach(function (bean) {
47924 if (beansNoDuplicates.indexOf(bean) < 0) {
47925 beansNoDuplicates.push(bean);
47926 }
47927 });
47928 return beansNoDuplicates;
47929 };
47930 GridCoreCreator.prototype.extractModuleEntity = function (moduleEntities, extractor) {
47931 return [].concat.apply([], __spread(moduleEntities.map(extractor)));
47932 };
47933 GridCoreCreator.prototype.setColumnsAndData = function (beans) {
47934 var columnDefs = beans.gridOptionsWrapper.getColumnDefs();
47935 beans.columnModel.setColumnDefs(columnDefs || [], "gridInitializing");
47936 beans.rowModel.start();
47937 };
47938 GridCoreCreator.prototype.dispatchGridReadyEvent = function (beans, gridOptions) {
47939 var readyEvent = {
47940 type: _events__WEBPACK_IMPORTED_MODULE_28__["Events"].EVENT_GRID_READY,
47941 api: gridOptions.api,
47942 columnApi: gridOptions.columnApi
47943 };
47944 beans.eventService.dispatchEvent(readyEvent);
47945 };
47946 GridCoreCreator.prototype.getRowModelClass = function (rowModelType, registeredModules) {
47947 // default to client side
47948 if (!rowModelType) {
47949 rowModelType = _constants_constants__WEBPACK_IMPORTED_MODULE_40__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE;
47950 }
47951 var rowModelClasses = {};
47952 registeredModules.forEach(function (module) {
47953 Object(_utils_object__WEBPACK_IMPORTED_MODULE_79__["iterateObject"])(module.rowModels, function (key, value) {
47954 rowModelClasses[key] = value;
47955 });
47956 });
47957 var rowModelClass = rowModelClasses[rowModelType];
47958 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_78__["exists"])(rowModelClass)) {
47959 return rowModelClass;
47960 }
47961 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_72__["ModuleRegistry"].isPackageBased()) {
47962 if ([_constants_constants__WEBPACK_IMPORTED_MODULE_40__["Constants"].ROW_MODEL_TYPE_VIEWPORT, _constants_constants__WEBPACK_IMPORTED_MODULE_40__["Constants"].ROW_MODEL_TYPE_SERVER_SIDE].includes(rowModelType))
47963 // If package based only the enterprise row models could be missing.
47964 console.error("AG Grid: Row Model \"" + rowModelType + "\" not found. Please ensure the package 'ag-grid-enterprise' is imported. Please see: https://www.ag-grid.com/javascript-grid/packages/");
47965 else {
47966 console.error('AG Grid: could not find row model for rowModelType ' + rowModelType);
47967 }
47968 }
47969 else {
47970 if (rowModelType === _constants_constants__WEBPACK_IMPORTED_MODULE_40__["Constants"].ROW_MODEL_TYPE_INFINITE) {
47971 console.error("AG Grid: Row Model \"Infinite\" not found. Please ensure the " + _modules_moduleNames__WEBPACK_IMPORTED_MODULE_73__["ModuleNames"].InfiniteRowModelModule + " module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/");
47972 }
47973 else if (rowModelType === _constants_constants__WEBPACK_IMPORTED_MODULE_40__["Constants"].ROW_MODEL_TYPE_VIEWPORT) {
47974 console.error("AG Grid: Row Model \"Viewport\" not found. Please ensure the AG Grid Enterprise Module " + _modules_moduleNames__WEBPACK_IMPORTED_MODULE_73__["ModuleNames"].ViewportRowModelModule + " module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/");
47975 }
47976 else if (rowModelType === _constants_constants__WEBPACK_IMPORTED_MODULE_40__["Constants"].ROW_MODEL_TYPE_SERVER_SIDE) {
47977 console.error("AG Grid: Row Model \"Server Side\" not found. Please ensure the AG Grid Enterprise Module " + _modules_moduleNames__WEBPACK_IMPORTED_MODULE_73__["ModuleNames"].ServerSideRowModelModule + " module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/");
47978 }
47979 else if (rowModelType === _constants_constants__WEBPACK_IMPORTED_MODULE_40__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE) {
47980 console.error("AG Grid: Row Model \"Client Side\" not found. Please ensure the " + _modules_moduleNames__WEBPACK_IMPORTED_MODULE_73__["ModuleNames"].ClientSideRowModelModule + " module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/");
47981 }
47982 else {
47983 console.error('AG Grid: could not find row model for rowModelType ' + rowModelType);
47984 }
47985 }
47986 };
47987 return GridCoreCreator;
47988}());
47989
47990
47991
47992
47993
47994/***/ }),
47995/* 212 */
47996/***/ (function(module, __webpack_exports__, __webpack_require__) {
47997
47998"use strict";
47999__webpack_require__.r(__webpack_exports__);
48000/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionService", function() { return SelectionService; });
48001/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
48002/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
48003/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
48004/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
48005/* harmony import */ var _utils_changedPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(182);
48006/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(13);
48007/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7);
48008/**
48009 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
48010 * @version v27.3.0
48011 * @link https://www.ag-grid.com/
48012 * @license MIT
48013 */
48014var __extends = (undefined && undefined.__extends) || (function () {
48015 var extendStatics = function (d, b) {
48016 extendStatics = Object.setPrototypeOf ||
48017 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
48018 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
48019 return extendStatics(d, b);
48020 };
48021 return function (d, b) {
48022 extendStatics(d, b);
48023 function __() { this.constructor = d; }
48024 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48025 };
48026})();
48027var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
48028 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
48029 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
48030 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
48031 return c > 3 && r && Object.defineProperty(target, key, r), r;
48032};
48033var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
48034 return function (target, key) { decorator(target, key, paramIndex); }
48035};
48036
48037
48038
48039
48040
48041
48042
48043
48044
48045
48046var SelectionService = /** @class */ (function (_super) {
48047 __extends(SelectionService, _super);
48048 function SelectionService() {
48049 return _super !== null && _super.apply(this, arguments) || this;
48050 }
48051 SelectionService.prototype.setBeans = function (loggerFactory) {
48052 this.logger = loggerFactory.create('selectionService');
48053 this.reset();
48054 };
48055 SelectionService.prototype.init = function () {
48056 this.groupSelectsChildren = this.gridOptionsWrapper.isGroupSelectsChildren();
48057 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_SELECTED, this.onRowSelected.bind(this));
48058 };
48059 SelectionService.prototype.setLastSelectedNode = function (rowNode) {
48060 this.lastSelectedNode = rowNode;
48061 };
48062 SelectionService.prototype.getLastSelectedNode = function () {
48063 return this.lastSelectedNode;
48064 };
48065 SelectionService.prototype.getSelectedNodes = function () {
48066 var selectedNodes = [];
48067 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(this.selectedNodes, function (key, rowNode) {
48068 if (rowNode) {
48069 selectedNodes.push(rowNode);
48070 }
48071 });
48072 return selectedNodes;
48073 };
48074 SelectionService.prototype.getSelectedRows = function () {
48075 var selectedRows = [];
48076 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(this.selectedNodes, function (key, rowNode) {
48077 if (rowNode && rowNode.data) {
48078 selectedRows.push(rowNode.data);
48079 }
48080 });
48081 return selectedRows;
48082 };
48083 SelectionService.prototype.removeGroupsFromSelection = function () {
48084 var _this = this;
48085 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(this.selectedNodes, function (key, rowNode) {
48086 if (rowNode && rowNode.group) {
48087 _this.selectedNodes[rowNode.id] = undefined;
48088 }
48089 });
48090 };
48091 // should only be called if groupSelectsChildren=true
48092 SelectionService.prototype.updateGroupsFromChildrenSelections = function (changedPath) {
48093 // we only do this when group selection state depends on selected children
48094 if (!this.gridOptionsWrapper.isGroupSelectsChildren()) {
48095 return;
48096 }
48097 // also only do it if CSRM (code should never allow this anyway)
48098 if (this.rowModel.getType() !== _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE) {
48099 return;
48100 }
48101 var clientSideRowModel = this.rowModel;
48102 var rootNode = clientSideRowModel.getRootNode();
48103 if (!changedPath) {
48104 changedPath = new _utils_changedPath__WEBPACK_IMPORTED_MODULE_4__["ChangedPath"](true, rootNode);
48105 changedPath.setInactive();
48106 }
48107 changedPath.forEachChangedNodeDepthFirst(function (rowNode) {
48108 if (rowNode !== rootNode) {
48109 rowNode.calculateSelectedFromChildren();
48110 }
48111 });
48112 // clientSideRowModel.getTopLevelNodes()!.forEach((rowNode: RowNode) => {
48113 // rowNode.depthFirstSearch((node) => {
48114 // if (node.group) {
48115 // }
48116 // });
48117 // });
48118 };
48119 SelectionService.prototype.getNodeForIdIfSelected = function (id) {
48120 return this.selectedNodes[id];
48121 };
48122 SelectionService.prototype.clearOtherNodes = function (rowNodeToKeepSelected) {
48123 var _this = this;
48124 var groupsToRefresh = {};
48125 var updatedCount = 0;
48126 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(this.selectedNodes, function (key, otherRowNode) {
48127 if (otherRowNode && otherRowNode.id !== rowNodeToKeepSelected.id) {
48128 var rowNode = _this.selectedNodes[otherRowNode.id];
48129 updatedCount += rowNode.setSelectedParams({
48130 newValue: false,
48131 clearSelection: false,
48132 suppressFinishActions: true
48133 });
48134 if (_this.groupSelectsChildren && otherRowNode.parent) {
48135 groupsToRefresh[otherRowNode.parent.id] = otherRowNode.parent;
48136 }
48137 }
48138 });
48139 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(groupsToRefresh, function (key, group) {
48140 group.calculateSelectedFromChildren();
48141 });
48142 return updatedCount;
48143 };
48144 SelectionService.prototype.onRowSelected = function (event) {
48145 var rowNode = event.node;
48146 // we do not store the group rows when the groups select children
48147 if (this.groupSelectsChildren && rowNode.group) {
48148 return;
48149 }
48150 if (rowNode.isSelected()) {
48151 this.selectedNodes[rowNode.id] = rowNode;
48152 }
48153 else {
48154 this.selectedNodes[rowNode.id] = undefined;
48155 }
48156 };
48157 SelectionService.prototype.syncInRowNode = function (rowNode, oldNode) {
48158 this.syncInOldRowNode(rowNode, oldNode);
48159 this.syncInNewRowNode(rowNode);
48160 };
48161 // if the id has changed for the node, then this means the rowNode
48162 // is getting used for a different data item, which breaks
48163 // our selectedNodes, as the node now is mapped by the old id
48164 // which is inconsistent. so to keep the old node as selected,
48165 // we swap in the clone (with the old id and old data). this means
48166 // the oldNode is effectively a daemon we keep a reference to,
48167 // so if client calls api.getSelectedNodes(), it gets the daemon
48168 // in the result. when the client un-selects, the reference to the
48169 // daemon is removed. the daemon, because it's an oldNode, is not
48170 // used by the grid for rendering, it's a copy of what the node used
48171 // to be like before the id was changed.
48172 SelectionService.prototype.syncInOldRowNode = function (rowNode, oldNode) {
48173 var oldNodeHasDifferentId = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["exists"])(oldNode) && (rowNode.id !== oldNode.id);
48174 if (oldNodeHasDifferentId && oldNode) {
48175 var id = oldNode.id;
48176 var oldNodeSelected = this.selectedNodes[id] == rowNode;
48177 if (oldNodeSelected) {
48178 this.selectedNodes[oldNode.id] = oldNode;
48179 }
48180 }
48181 };
48182 SelectionService.prototype.syncInNewRowNode = function (rowNode) {
48183 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["exists"])(this.selectedNodes[rowNode.id])) {
48184 rowNode.setSelectedInitialValue(true);
48185 this.selectedNodes[rowNode.id] = rowNode;
48186 }
48187 else {
48188 rowNode.setSelectedInitialValue(false);
48189 }
48190 };
48191 SelectionService.prototype.reset = function () {
48192 this.logger.log('reset');
48193 this.selectedNodes = {};
48194 this.lastSelectedNode = null;
48195 };
48196 // returns a list of all nodes at 'best cost' - a feature to be used
48197 // with groups / trees. if a group has all it's children selected,
48198 // then the group appears in the result, but not the children.
48199 // Designed for use with 'children' as the group selection type,
48200 // where groups don't actually appear in the selection normally.
48201 SelectionService.prototype.getBestCostNodeSelection = function () {
48202 if (this.rowModel.getType() !== _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE) {
48203 console.warn('AG Grid: `getBestCostNodeSelection` is only available when using normal row model');
48204 return;
48205 }
48206 var clientSideRowModel = this.rowModel;
48207 var topLevelNodes = clientSideRowModel.getTopLevelNodes();
48208 if (topLevelNodes === null) {
48209 console.warn('AG Grid: `selectAll` not available doing `rowModel=virtual`');
48210 return;
48211 }
48212 var result = [];
48213 // recursive function, to find the selected nodes
48214 function traverse(nodes) {
48215 for (var i = 0, l = nodes.length; i < l; i++) {
48216 var node = nodes[i];
48217 if (node.isSelected()) {
48218 result.push(node);
48219 }
48220 else {
48221 // if not selected, then if it's a group, and the group
48222 // has children, continue to search for selections
48223 var maybeGroup = node;
48224 if (maybeGroup.group && maybeGroup.children) {
48225 traverse(maybeGroup.children);
48226 }
48227 }
48228 }
48229 }
48230 traverse(topLevelNodes);
48231 return result;
48232 };
48233 SelectionService.prototype.setRowModel = function (rowModel) {
48234 this.rowModel = rowModel;
48235 };
48236 SelectionService.prototype.isEmpty = function () {
48237 var count = 0;
48238 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(this.selectedNodes, function (nodeId, rowNode) {
48239 if (rowNode) {
48240 count++;
48241 }
48242 });
48243 return count === 0;
48244 };
48245 SelectionService.prototype.deselectAllRowNodes = function (justFiltered) {
48246 if (justFiltered === void 0) { justFiltered = false; }
48247 var callback = function (rowNode) { return rowNode.selectThisNode(false); };
48248 var rowModelClientSide = this.rowModel.getType() === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE;
48249 if (justFiltered) {
48250 if (!rowModelClientSide) {
48251 console.error('AG Grid: selecting just filtered only works with In Memory Row Model');
48252 return;
48253 }
48254 var clientSideRowModel = this.rowModel;
48255 clientSideRowModel.forEachNodeAfterFilter(callback);
48256 }
48257 else {
48258 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(this.selectedNodes, function (id, rowNode) {
48259 // remember the reference can be to null, as we never 'delete' from the map
48260 if (rowNode) {
48261 callback(rowNode);
48262 }
48263 });
48264 // this clears down the map (whereas above only sets the items in map to 'undefined')
48265 this.reset();
48266 }
48267 // the above does not clean up the parent rows if they are selected
48268 if (rowModelClientSide && this.groupSelectsChildren) {
48269 this.updateGroupsFromChildrenSelections();
48270 }
48271 var event = {
48272 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SELECTION_CHANGED,
48273 api: this.gridApi,
48274 columnApi: this.columnApi
48275 };
48276 this.eventService.dispatchEvent(event);
48277 };
48278 SelectionService.prototype.selectAllRowNodes = function (justFiltered) {
48279 if (justFiltered === void 0) { justFiltered = false; }
48280 if (this.rowModel.getType() !== _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE) {
48281 throw new Error("selectAll only available with normal row model, ie not " + this.rowModel.getType());
48282 }
48283 var clientSideRowModel = this.rowModel;
48284 var callback = function (rowNode) { return rowNode.selectThisNode(true); };
48285 if (justFiltered) {
48286 clientSideRowModel.forEachNodeAfterFilter(callback);
48287 }
48288 else {
48289 clientSideRowModel.forEachNode(callback);
48290 }
48291 // the above does not clean up the parent rows if they are selected
48292 if (this.rowModel.getType() === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE && this.groupSelectsChildren) {
48293 this.updateGroupsFromChildrenSelections();
48294 }
48295 var event = {
48296 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SELECTION_CHANGED,
48297 api: this.gridApi,
48298 columnApi: this.columnApi
48299 };
48300 this.eventService.dispatchEvent(event);
48301 };
48302 /**
48303 * @method
48304 * @deprecated
48305 */
48306 SelectionService.prototype.selectNode = function (rowNode, tryMulti) {
48307 if (rowNode) {
48308 rowNode.setSelectedParams({ newValue: true, clearSelection: !tryMulti });
48309 }
48310 };
48311 /**
48312 * @method
48313 * @deprecated
48314 */
48315 SelectionService.prototype.deselectIndex = function (rowIndex) {
48316 var node = this.rowModel.getRow(rowIndex);
48317 this.deselectNode(node);
48318 };
48319 /**
48320 * @method
48321 * @deprecated
48322 */
48323 SelectionService.prototype.deselectNode = function (rowNode) {
48324 if (rowNode) {
48325 rowNode.setSelectedParams({ newValue: false, clearSelection: false });
48326 }
48327 };
48328 /**
48329 * @method
48330 * @deprecated
48331 */
48332 SelectionService.prototype.selectIndex = function (index, tryMulti) {
48333 var node = this.rowModel.getRow(index);
48334 this.selectNode(node, tryMulti);
48335 };
48336 __decorate([
48337 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
48338 ], SelectionService.prototype, "rowModel", void 0);
48339 __decorate([
48340 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
48341 ], SelectionService.prototype, "columnApi", void 0);
48342 __decorate([
48343 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
48344 ], SelectionService.prototype, "gridApi", void 0);
48345 __decorate([
48346 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('loggerFactory'))
48347 ], SelectionService.prototype, "setBeans", null);
48348 __decorate([
48349 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
48350 ], SelectionService.prototype, "init", null);
48351 SelectionService = __decorate([
48352 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('selectionService')
48353 ], SelectionService);
48354 return SelectionService;
48355}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
48356
48357
48358
48359
48360
48361/***/ }),
48362/* 213 */
48363/***/ (function(module, __webpack_exports__, __webpack_require__) {
48364
48365"use strict";
48366__webpack_require__.r(__webpack_exports__);
48367/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnApi", function() { return ColumnApi; });
48368/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
48369/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37);
48370/**
48371 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
48372 * @version v27.3.0
48373 * @link https://www.ag-grid.com/
48374 * @license MIT
48375 */
48376var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
48377 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
48378 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
48379 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
48380 return c > 3 && r && Object.defineProperty(target, key, r), r;
48381};
48382
48383
48384var ColumnApi = /** @class */ (function () {
48385 function ColumnApi() {
48386 }
48387 /** Gets the grid to size the columns to the specified width in pixels, e.g. `sizeColumnsToFit(900)`. To have the grid fit the columns to the grid's width, use the Grid API `gridApi.sizeColumnsToFit()` instead. */
48388 ColumnApi.prototype.sizeColumnsToFit = function (gridWidth) {
48389 // AG-3403 validate that gridWidth is provided because this method has the same name as
48390 // a method on the grid API that takes no arguments, and it's easy to confuse the two
48391 if (typeof gridWidth === "undefined") {
48392 console.error('AG Grid: missing parameter to columnApi.sizeColumnsToFit(gridWidth)');
48393 }
48394 this.columnModel.sizeColumnsToFit(gridWidth, 'api');
48395 };
48396 /** Call this if you want to open or close a column group. */
48397 ColumnApi.prototype.setColumnGroupOpened = function (group, newValue) { this.columnModel.setColumnGroupOpened(group, newValue, 'api'); };
48398 /** Returns the column group with the given name. */
48399 ColumnApi.prototype.getColumnGroup = function (name, instanceId) { return this.columnModel.getColumnGroup(name, instanceId); };
48400 /** Returns the provided column group with the given name. */
48401 ColumnApi.prototype.getProvidedColumnGroup = function (name) { return this.columnModel.getProvidedColumnGroup(name); };
48402 /** Returns the display name for a column. Useful if you are doing your own header rendering and want the grid to work out if `headerValueGetter` is used, or if you are doing your own column management GUI, to know what to show as the column name. */
48403 ColumnApi.prototype.getDisplayNameForColumn = function (column, location) { return this.columnModel.getDisplayNameForColumn(column, location) || ''; };
48404 /** Returns the display name for a column group (when grouping columns). */
48405 ColumnApi.prototype.getDisplayNameForColumnGroup = function (columnGroup, location) { return this.columnModel.getDisplayNameForColumnGroup(columnGroup, location) || ''; };
48406 /** Returns the column with the given `colKey`, which can either be the `colId` (a string) or the `colDef` (an object). */
48407 ColumnApi.prototype.getColumn = function (key) { return this.columnModel.getPrimaryColumn(key); };
48408 /** Applies the state of the columns from a previous state. Returns `false` if one or more columns could not be found. */
48409 ColumnApi.prototype.applyColumnState = function (params) { return this.columnModel.applyColumnState(params, 'api'); };
48410 /** Gets the state of the columns. Typically used when saving column state. */
48411 ColumnApi.prototype.getColumnState = function () { return this.columnModel.getColumnState(); };
48412 /** Sets the state back to match the originally provided column definitions. */
48413 ColumnApi.prototype.resetColumnState = function () { this.columnModel.resetColumnState('api'); };
48414 /** Gets the state of the column groups. Typically used when saving column group state. */
48415 ColumnApi.prototype.getColumnGroupState = function () { return this.columnModel.getColumnGroupState(); };
48416 /** Sets the state of the column group state from a previous state. */
48417 ColumnApi.prototype.setColumnGroupState = function (stateItems) { this.columnModel.setColumnGroupState(stateItems, 'api'); };
48418 /** Sets the state back to match the originally provided column definitions. */
48419 ColumnApi.prototype.resetColumnGroupState = function () { this.columnModel.resetColumnGroupState('api'); };
48420 /** Returns `true` if pinning left or right, otherwise `false`. */
48421 ColumnApi.prototype.isPinning = function () { return this.columnModel.isPinningLeft() || this.columnModel.isPinningRight(); };
48422 /** Returns `true` if pinning left, otherwise `false`. */
48423 ColumnApi.prototype.isPinningLeft = function () { return this.columnModel.isPinningLeft(); };
48424 /** Returns `true` if pinning right, otherwise `false`. */
48425 ColumnApi.prototype.isPinningRight = function () { return this.columnModel.isPinningRight(); };
48426 /** Returns the column to the right of the provided column, taking into consideration open / closed column groups and visible columns. This is useful if you need to know what column is beside yours e.g. if implementing your own cell navigation. */
48427 ColumnApi.prototype.getDisplayedColAfter = function (col) { return this.columnModel.getDisplayedColAfter(col); };
48428 /** Same as `getVisibleColAfter` except gives column to the left. */
48429 ColumnApi.prototype.getDisplayedColBefore = function (col) { return this.columnModel.getDisplayedColBefore(col); };
48430 /** Sets the visibility of a column. Key can be the column ID or `Column` object. */
48431 ColumnApi.prototype.setColumnVisible = function (key, visible) { this.columnModel.setColumnVisible(key, visible, 'api'); };
48432 /** Same as `setColumnVisible`, but provide a list of column keys. */
48433 ColumnApi.prototype.setColumnsVisible = function (keys, visible) { this.columnModel.setColumnsVisible(keys, visible, 'api'); };
48434 /** Sets the column pinned / unpinned. Key can be the column ID, field, `ColDef` object or `Column` object. */
48435 ColumnApi.prototype.setColumnPinned = function (key, pinned) { this.columnModel.setColumnPinned(key, pinned, 'api'); };
48436 /** Same as `setColumnPinned`, but provide a list of column keys. */
48437 ColumnApi.prototype.setColumnsPinned = function (keys, pinned) { this.columnModel.setColumnsPinned(keys, pinned, 'api'); };
48438 /** Returns all the columns, regardless of visible or not. */
48439 ColumnApi.prototype.getAllColumns = function () { return this.columnModel.getAllPrimaryColumns(); };
48440 /**
48441 * Returns all the grid columns, same as `getAllColumns()`, except
48442 *
48443 * a) it has the order of the columns that are presented in the grid
48444 *
48445 * b) it's after the 'pivot' step, so if pivoting, has the value columns for the pivot.
48446 */
48447 ColumnApi.prototype.getAllGridColumns = function () { return this.columnModel.getAllGridColumns(); };
48448 /** Same as `getAllDisplayedColumns` but just for the pinned left portion of the grid. */
48449 ColumnApi.prototype.getDisplayedLeftColumns = function () { return this.columnModel.getDisplayedLeftColumns(); };
48450 /** Same as `getAllDisplayedColumns` but just for the center portion of the grid. */
48451 ColumnApi.prototype.getDisplayedCenterColumns = function () { return this.columnModel.getDisplayedCenterColumns(); };
48452 /** Same as `getAllDisplayedColumns` but just for the pinned right portion of the grid. */
48453 ColumnApi.prototype.getDisplayedRightColumns = function () { return this.columnModel.getDisplayedRightColumns(); };
48454 /** Returns all columns currently displayed (e.g. are visible and if in a group, the group is showing the columns) for the pinned left, centre and pinned right portions of the grid. */
48455 ColumnApi.prototype.getAllDisplayedColumns = function () { return this.columnModel.getAllDisplayedColumns(); };
48456 /** Same as `getAllGridColumns()`, except only returns rendered columns, i.e. columns that are not within the viewport and therefore not rendered, due to column virtualisation, are not displayed. */
48457 ColumnApi.prototype.getAllDisplayedVirtualColumns = function () { return this.columnModel.getViewportColumns(); };
48458 /** Moves a column to `toIndex`. The column is first removed, then added at the `toIndex` location, thus index locations will change to the right of the column after the removal. */
48459 ColumnApi.prototype.moveColumn = function (key, toIndex) {
48460 if (typeof key === 'number') {
48461 // moveColumn used to take indexes, so this is advising user who hasn't moved to new method name
48462 console.warn('AG Grid: you are using moveColumn(fromIndex, toIndex) - moveColumn takes a column key and a destination index, not two indexes, to move with indexes use moveColumnByIndex(from,to) instead');
48463 this.columnModel.moveColumnByIndex(key, toIndex, 'api');
48464 }
48465 else {
48466 this.columnModel.moveColumn(key, toIndex, 'api');
48467 }
48468 };
48469 /** Same as `moveColumn` but works on index locations. */
48470 ColumnApi.prototype.moveColumnByIndex = function (fromIndex, toIndex) { this.columnModel.moveColumnByIndex(fromIndex, toIndex, 'api'); };
48471 /** Same as `moveColumn` but works on list. */
48472 ColumnApi.prototype.moveColumns = function (columnsToMoveKeys, toIndex) { this.columnModel.moveColumns(columnsToMoveKeys, toIndex, 'api'); };
48473 /** Move the column to a new position in the row grouping order. */
48474 ColumnApi.prototype.moveRowGroupColumn = function (fromIndex, toIndex) { this.columnModel.moveRowGroupColumn(fromIndex, toIndex); };
48475 /** Sets the agg function for a column. `aggFunc` can be one of `'min' | 'max' | 'sum'`. */
48476 ColumnApi.prototype.setColumnAggFunc = function (key, aggFunc) { this.columnModel.setColumnAggFunc(key, aggFunc); };
48477 /** Sets the column width on a single column. The finished flag gets included in the resulting event and not used internally by the grid. The finished flag is intended for dragging, where a dragging action will produce many `columnWidth` events, so the consumer of events knows when it receives the last event in a stream. The finished parameter is optional, and defaults to `true`. */
48478 ColumnApi.prototype.setColumnWidth = function (key, newWidth, finished, source) {
48479 if (finished === void 0) { finished = true; }
48480 this.columnModel.setColumnWidths([{ key: key, newWidth: newWidth }], false, finished, source);
48481 };
48482 /** Sets the column widths on multiple columns. This method offers better performance than calling `setColumnWidth` multiple times. The finished flag gets included in the resulting event and not used internally by the grid. The finished flag is intended for dragging, where a dragging action will produce many `columnWidth` events, so the consumer of events knows when it receives the last event in a stream. The finished parameter is optional, and defaults to `true`. */
48483 ColumnApi.prototype.setColumnWidths = function (columnWidths, finished, source) {
48484 if (finished === void 0) { finished = true; }
48485 this.columnModel.setColumnWidths(columnWidths, false, finished, source);
48486 };
48487 /** Set the pivot mode. */
48488 ColumnApi.prototype.setPivotMode = function (pivotMode) { this.columnModel.setPivotMode(pivotMode); };
48489 /** Get the pivot mode. */
48490 ColumnApi.prototype.isPivotMode = function () { return this.columnModel.isPivotMode(); };
48491 /** Returns the pivot column for the given `pivotKeys` and `valueColId`. Useful to then call operations on the pivot column. */
48492 ColumnApi.prototype.getSecondaryPivotColumn = function (pivotKeys, valueColKey) { return this.columnModel.getSecondaryPivotColumn(pivotKeys, valueColKey); };
48493 /** Set the value columns. */
48494 ColumnApi.prototype.setValueColumns = function (colKeys) { this.columnModel.setValueColumns(colKeys, 'api'); };
48495 /** Get value columns. */
48496 ColumnApi.prototype.getValueColumns = function () { return this.columnModel.getValueColumns(); };
48497 /** Remove a value column. */
48498 ColumnApi.prototype.removeValueColumn = function (colKey) { this.columnModel.removeValueColumn(colKey, 'api'); };
48499 /** Same as `removeValueColumns` but provide a list. */
48500 ColumnApi.prototype.removeValueColumns = function (colKeys) { this.columnModel.removeValueColumns(colKeys, 'api'); };
48501 /** Add a value column. */
48502 ColumnApi.prototype.addValueColumn = function (colKey) { this.columnModel.addValueColumn(colKey, 'api'); };
48503 /** Same as `addValueColumn` but provide a list. */
48504 ColumnApi.prototype.addValueColumns = function (colKeys) { this.columnModel.addValueColumns(colKeys, 'api'); };
48505 /** Set the row group columns. */
48506 ColumnApi.prototype.setRowGroupColumns = function (colKeys) { this.columnModel.setRowGroupColumns(colKeys, 'api'); };
48507 /** Remove a column from the row groups. */
48508 ColumnApi.prototype.removeRowGroupColumn = function (colKey) { this.columnModel.removeRowGroupColumn(colKey, 'api'); };
48509 /** Same as `removeRowGroupColumn` but provide a list of columns. */
48510 ColumnApi.prototype.removeRowGroupColumns = function (colKeys) { this.columnModel.removeRowGroupColumns(colKeys, 'api'); };
48511 /** Add a column to the row groups. */
48512 ColumnApi.prototype.addRowGroupColumn = function (colKey) { this.columnModel.addRowGroupColumn(colKey, 'api'); };
48513 /** Same as `addRowGroupColumn` but provide a list of columns. */
48514 ColumnApi.prototype.addRowGroupColumns = function (colKeys) { this.columnModel.addRowGroupColumns(colKeys, 'api'); };
48515 /** Get row group columns. */
48516 ColumnApi.prototype.getRowGroupColumns = function () { return this.columnModel.getRowGroupColumns(); };
48517 /** Set the pivot columns. */
48518 ColumnApi.prototype.setPivotColumns = function (colKeys) { this.columnModel.setPivotColumns(colKeys, 'api'); };
48519 /** Remove a pivot column. */
48520 ColumnApi.prototype.removePivotColumn = function (colKey) { this.columnModel.removePivotColumn(colKey, 'api'); };
48521 /** Same as `removePivotColumn` but provide a list of columns. */
48522 ColumnApi.prototype.removePivotColumns = function (colKeys) { this.columnModel.removePivotColumns(colKeys, 'api'); };
48523 /** Add a pivot column. */
48524 ColumnApi.prototype.addPivotColumn = function (colKey) { this.columnModel.addPivotColumn(colKey, 'api'); };
48525 /** Same as `addPivotColumn` but provide a list of columns. */
48526 ColumnApi.prototype.addPivotColumns = function (colKeys) { this.columnModel.addPivotColumns(colKeys, 'api'); };
48527 /** Get the pivot columns. */
48528 ColumnApi.prototype.getPivotColumns = function () { return this.columnModel.getPivotColumns(); };
48529 /** Same as `getAllDisplayedColumnGroups` but just for the pinned left portion of the grid. */
48530 ColumnApi.prototype.getLeftDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeLeft(); };
48531 /** Same as `getAllDisplayedColumnGroups` but just for the center portion of the grid. */
48532 ColumnApi.prototype.getCenterDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeCentre(); };
48533 /** Same as `getAllDisplayedColumnGroups` but just for the pinned right portion of the grid. */
48534 ColumnApi.prototype.getRightDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeRight(); };
48535 /** Returns all 'root' column headers. If you are not grouping columns, these return the columns. If you are grouping, these return the top level groups - you can navigate down through each one to get the other lower level headers and finally the columns at the bottom. */
48536 ColumnApi.prototype.getAllDisplayedColumnGroups = function () { return this.columnModel.getAllDisplayedTrees(); };
48537 /** Auto-sizes a column based on its contents. */
48538 ColumnApi.prototype.autoSizeColumn = function (key, skipHeader) { return this.columnModel.autoSizeColumn(key, skipHeader, 'api'); };
48539 /** Same as `autoSizeColumn`, but provide a list of column keys. */
48540 ColumnApi.prototype.autoSizeColumns = function (keys, skipHeader) {
48541 this.columnModel.autoSizeColumns({ columns: keys, skipHeader: skipHeader });
48542 };
48543 /** Calls `autoSizeColumns` on all displayed columns. */
48544 ColumnApi.prototype.autoSizeAllColumns = function (skipHeader) { this.columnModel.autoSizeAllColumns(skipHeader, 'api'); };
48545 /** Set the secondary pivot columns. */
48546 ColumnApi.prototype.setSecondaryColumns = function (colDefs) { this.columnModel.setSecondaryColumns(colDefs, 'api'); };
48547 /** Returns the grid's secondary columns. */
48548 ColumnApi.prototype.getSecondaryColumns = function () { return this.columnModel.getSecondaryColumns(); };
48549 /** Returns the grid's primary columns. */
48550 ColumnApi.prototype.getPrimaryColumns = function () { return this.columnModel.getAllPrimaryColumns(); };
48551 ColumnApi.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid = function () {
48552 // some users were raising support issues with regards memory leaks. the problem was the customers applications
48553 // were keeping references to the API. trying to educate them all would be difficult, easier to just remove
48554 // all references in the API so at least the core grid can be garbage collected.
48555 //
48556 // wait about 100ms before clearing down the references, in case user has some cleanup to do,
48557 // and needs to deference the API first
48558 setTimeout(_utils__WEBPACK_IMPORTED_MODULE_1__["_"].removeAllReferences.bind(window, this, 'Column API'), 100);
48559 };
48560 // below goes through deprecated items, prints message to user, then calls the new version of the same method
48561 // public getColumnDefs(): (ColDef | ColGroupDef)[] {
48562 // this.setColumnGroupOpened(group, newValue);
48563 // return null;
48564 // }
48565 /** @deprecated columnGroupOpened no longer exists, use setColumnGroupOpened */
48566 ColumnApi.prototype.columnGroupOpened = function (group, newValue) {
48567 console.error('AG Grid: columnGroupOpened no longer exists, use setColumnGroupOpened');
48568 this.setColumnGroupOpened(group, newValue);
48569 };
48570 /** @deprecated hideColumns is deprecated, use setColumnsVisible */
48571 ColumnApi.prototype.hideColumns = function (colIds, hide) {
48572 console.error('AG Grid: hideColumns is deprecated, use setColumnsVisible');
48573 this.columnModel.setColumnsVisible(colIds, !hide, 'api');
48574 };
48575 /** @deprecated hideColumn is deprecated, use setColumnVisible */
48576 ColumnApi.prototype.hideColumn = function (colId, hide) {
48577 console.error('AG Grid: hideColumn is deprecated, use setColumnVisible');
48578 this.columnModel.setColumnVisible(colId, !hide, 'api');
48579 };
48580 /** @deprecated setState is deprecated, use setColumnState */
48581 ColumnApi.prototype.setState = function (columnState) {
48582 console.error('AG Grid: setState is deprecated, use setColumnState');
48583 return this.setColumnState(columnState);
48584 };
48585 /** @deprecated getState is deprecated, use getColumnState */
48586 ColumnApi.prototype.getState = function () {
48587 console.error('AG Grid: getState is deprecated, use getColumnState');
48588 return this.getColumnState();
48589 };
48590 /** @deprecated resetState is deprecated, use resetColumnState */
48591 ColumnApi.prototype.resetState = function () {
48592 console.error('AG Grid: resetState is deprecated, use resetColumnState');
48593 this.resetColumnState();
48594 };
48595 /** @deprecated getAggregationColumns is deprecated, use getValueColumns */
48596 ColumnApi.prototype.getAggregationColumns = function () {
48597 console.error('AG Grid: getAggregationColumns is deprecated, use getValueColumns');
48598 return this.columnModel.getValueColumns();
48599 };
48600 /** @deprecated removeAggregationColumn is deprecated, use removeValueColumn */
48601 ColumnApi.prototype.removeAggregationColumn = function (colKey) {
48602 console.error('AG Grid: removeAggregationColumn is deprecated, use removeValueColumn');
48603 this.columnModel.removeValueColumn(colKey, 'api');
48604 };
48605 /** @deprecated removeAggregationColumns is deprecated, use removeValueColumns */
48606 ColumnApi.prototype.removeAggregationColumns = function (colKeys) {
48607 console.error('AG Grid: removeAggregationColumns is deprecated, use removeValueColumns');
48608 this.columnModel.removeValueColumns(colKeys, 'api');
48609 };
48610 /** @deprecated addAggregationColumn is deprecated, use addValueColumn */
48611 ColumnApi.prototype.addAggregationColumn = function (colKey) {
48612 console.error('AG Grid: addAggregationColumn is deprecated, use addValueColumn');
48613 this.columnModel.addValueColumn(colKey, 'api');
48614 };
48615 /** @deprecated addAggregationColumns is deprecated, use addValueColumns */
48616 ColumnApi.prototype.addAggregationColumns = function (colKeys) {
48617 console.error('AG Grid: addAggregationColumns is deprecated, use addValueColumns');
48618 this.columnModel.addValueColumns(colKeys, 'api');
48619 };
48620 /** @deprecated setColumnAggFunction is deprecated, use setColumnAggFunc */
48621 ColumnApi.prototype.setColumnAggFunction = function (column, aggFunc) {
48622 console.error('AG Grid: setColumnAggFunction is deprecated, use setColumnAggFunc');
48623 this.columnModel.setColumnAggFunc(column, aggFunc, 'api');
48624 };
48625 /** @deprecated getDisplayNameForCol is deprecated, use getDisplayNameForColumn */
48626 ColumnApi.prototype.getDisplayNameForCol = function (column) {
48627 console.error('AG Grid: getDisplayNameForCol is deprecated, use getDisplayNameForColumn');
48628 return this.getDisplayNameForColumn(column, null);
48629 };
48630 /** @deprecated setColumnState is deprecated, use applyColumnState. */
48631 ColumnApi.prototype.setColumnState = function (columnState) {
48632 console.error('AG Grid: setColumnState is deprecated, use applyColumnState');
48633 return this.columnModel.applyColumnState({ state: columnState, applyOrder: true }, 'api');
48634 };
48635 /** @deprecated getOriginalColumnGroup is deprecated, use getProvidedColumnGroup. */
48636 ColumnApi.prototype.getOriginalColumnGroup = function (name) {
48637 console.error('AG Grid: getOriginalColumnGroup is deprecated, use getProvidedColumnGroup');
48638 return this.columnModel.getProvidedColumnGroup(name);
48639 };
48640 __decorate([
48641 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
48642 ], ColumnApi.prototype, "columnModel", void 0);
48643 __decorate([
48644 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
48645 ], ColumnApi.prototype, "cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid", null);
48646 ColumnApi = __decorate([
48647 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('columnApi')
48648 ], ColumnApi);
48649 return ColumnApi;
48650}());
48651
48652
48653
48654
48655
48656/***/ }),
48657/* 214 */
48658/***/ (function(module, __webpack_exports__, __webpack_require__) {
48659
48660"use strict";
48661__webpack_require__.r(__webpack_exports__);
48662/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValueService", function() { return ValueService; });
48663/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
48664/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
48665/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
48666/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
48667/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
48668/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14);
48669/**
48670 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
48671 * @version v27.3.0
48672 * @link https://www.ag-grid.com/
48673 * @license MIT
48674 */
48675var __extends = (undefined && undefined.__extends) || (function () {
48676 var extendStatics = function (d, b) {
48677 extendStatics = Object.setPrototypeOf ||
48678 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
48679 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
48680 return extendStatics(d, b);
48681 };
48682 return function (d, b) {
48683 extendStatics(d, b);
48684 function __() { this.constructor = d; }
48685 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48686 };
48687})();
48688var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
48689 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
48690 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
48691 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
48692 return c > 3 && r && Object.defineProperty(target, key, r), r;
48693};
48694
48695
48696
48697
48698
48699
48700var ValueService = /** @class */ (function (_super) {
48701 __extends(ValueService, _super);
48702 function ValueService() {
48703 var _this = _super !== null && _super.apply(this, arguments) || this;
48704 _this.initialised = false;
48705 return _this;
48706 }
48707 ValueService.prototype.init = function () {
48708 var _this = this;
48709 this.cellExpressions = this.gridOptionsWrapper.isEnableCellExpressions();
48710 this.initialised = true;
48711 // We listen to our own event and use it to call the columnSpecific callback,
48712 // this way the handler calls are correctly interleaved with other global events
48713 this.eventService.addEventListener(_events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_VALUE_CHANGED, function (event) { return _this.callColumnCellValueChangedHandler(event); }, this.gridOptionsWrapper.useAsyncEvents());
48714 };
48715 ValueService.prototype.getValue = function (column, rowNode, forFilter, ignoreAggData) {
48716 if (forFilter === void 0) { forFilter = false; }
48717 if (ignoreAggData === void 0) { ignoreAggData = false; }
48718 // hack - the grid is getting refreshed before this bean gets initialised, race condition.
48719 // really should have a way so they get initialised in the right order???
48720 if (!this.initialised) {
48721 this.init();
48722 }
48723 if (!rowNode) {
48724 return;
48725 }
48726 // pull these out to make code below easier to read
48727 var colDef = column.getColDef();
48728 var field = colDef.field;
48729 var colId = column.getId();
48730 var data = rowNode.data;
48731 var result;
48732 // if there is a value getter, this gets precedence over a field
48733 var groupDataExists = rowNode.groupData && rowNode.groupData[colId] !== undefined;
48734 var aggDataExists = !ignoreAggData && rowNode.aggData && rowNode.aggData[colId] !== undefined;
48735 if (forFilter && colDef.filterValueGetter) {
48736 result = this.executeFilterValueGetter(colDef.filterValueGetter, data, column, rowNode);
48737 }
48738 else if (this.gridOptionsWrapper.isTreeData() && aggDataExists) {
48739 result = rowNode.aggData[colId];
48740 }
48741 else if (this.gridOptionsWrapper.isTreeData() && colDef.valueGetter) {
48742 result = this.executeValueGetter(colDef.valueGetter, data, column, rowNode);
48743 }
48744 else if (this.gridOptionsWrapper.isTreeData() && (field && data)) {
48745 result = Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["getValueUsingField"])(data, field, column.isFieldContainsDots());
48746 }
48747 else if (groupDataExists) {
48748 result = rowNode.groupData[colId];
48749 }
48750 else if (aggDataExists) {
48751 result = rowNode.aggData[colId];
48752 }
48753 else if (colDef.valueGetter) {
48754 result = this.executeValueGetter(colDef.valueGetter, data, column, rowNode);
48755 }
48756 else if (field && data) {
48757 result = Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["getValueUsingField"])(data, field, column.isFieldContainsDots());
48758 }
48759 // the result could be an expression itself, if we are allowing cell values to be expressions
48760 if (this.cellExpressions && (typeof result === 'string') && result.indexOf('=') === 0) {
48761 var cellValueGetter = result.substring(1);
48762 result = this.executeValueGetter(cellValueGetter, data, column, rowNode);
48763 }
48764 if (result == null) {
48765 var openedGroup = this.getOpenedGroup(rowNode, column);
48766 if (openedGroup != null) {
48767 return openedGroup;
48768 }
48769 }
48770 return result;
48771 };
48772 ValueService.prototype.getOpenedGroup = function (rowNode, column) {
48773 if (!this.gridOptionsWrapper.isShowOpenedGroup()) {
48774 return;
48775 }
48776 var colDef = column.getColDef();
48777 if (!colDef.showRowGroup) {
48778 return;
48779 }
48780 var showRowGroup = column.getColDef().showRowGroup;
48781 var pointer = rowNode.parent;
48782 while (pointer != null) {
48783 if (pointer.rowGroupColumn && (showRowGroup === true || showRowGroup === pointer.rowGroupColumn.getId())) {
48784 return pointer.key;
48785 }
48786 pointer = pointer.parent;
48787 }
48788 return undefined;
48789 };
48790 /**
48791 * Sets the value of a GridCell
48792 * @param rowNode The `RowNode` to be updated
48793 * @param colKey The `Column` to be updated
48794 * @param newValue The new value to be set
48795 * @param eventSource The event source
48796 * @returns `True` if the value has been updated, otherwise`False`.
48797 */
48798 ValueService.prototype.setValue = function (rowNode, colKey, newValue, eventSource) {
48799 var column = this.columnModel.getPrimaryColumn(colKey);
48800 if (!rowNode || !column) {
48801 return false;
48802 }
48803 // this will only happen if user is trying to paste into a group row, which doesn't make sense
48804 // the user should not be trying to paste into group rows
48805 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(rowNode.data)) {
48806 rowNode.data = {};
48807 }
48808 // for backwards compatibility we are also retrieving the newValueHandler as well as the valueSetter
48809 var _a = column.getColDef(), field = _a.field, newValueHandler = _a.newValueHandler, valueSetter = _a.valueSetter;
48810 // need either a field or a newValueHandler for this to work
48811 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(field) && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(newValueHandler) && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(valueSetter)) {
48812 // we don't tell user about newValueHandler, as that is deprecated
48813 console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work");
48814 return false;
48815 }
48816 var params = {
48817 node: rowNode,
48818 data: rowNode.data,
48819 oldValue: this.getValue(column, rowNode),
48820 newValue: newValue,
48821 colDef: column.getColDef(),
48822 column: column,
48823 api: this.gridOptionsWrapper.getApi(),
48824 columnApi: this.gridOptionsWrapper.getColumnApi(),
48825 context: this.gridOptionsWrapper.getContext()
48826 };
48827 params.newValue = newValue;
48828 var valueWasDifferent;
48829 if (newValueHandler && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(newValueHandler)) {
48830 valueWasDifferent = newValueHandler(params);
48831 }
48832 else if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(valueSetter)) {
48833 valueWasDifferent = this.expressionService.evaluate(valueSetter, params);
48834 }
48835 else {
48836 valueWasDifferent = this.setValueUsingField(rowNode.data, field, newValue, column.isFieldContainsDots());
48837 }
48838 // in case user forgot to return something (possible if they are not using TypeScript
48839 // and just forgot, or using an old newValueHandler we didn't always expect a return
48840 // value here), we default the return value to true, so we always refresh.
48841 if (valueWasDifferent === undefined) {
48842 valueWasDifferent = true;
48843 }
48844 // if no change to the value, then no need to do the updating, or notifying via events.
48845 // otherwise the user could be tabbing around the grid, and cellValueChange would get called
48846 // all the time.
48847 if (!valueWasDifferent) {
48848 return false;
48849 }
48850 // reset quick filter on this row
48851 rowNode.resetQuickFilterAggregateText();
48852 this.valueCache.onDataChanged();
48853 params.newValue = this.getValue(column, rowNode);
48854 var event = {
48855 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_VALUE_CHANGED,
48856 event: null,
48857 rowIndex: rowNode.rowIndex,
48858 rowPinned: rowNode.rowPinned,
48859 column: params.column,
48860 api: params.api,
48861 columnApi: params.columnApi,
48862 colDef: params.colDef,
48863 context: params.context,
48864 data: rowNode.data,
48865 node: rowNode,
48866 oldValue: params.oldValue,
48867 newValue: params.newValue,
48868 value: params.newValue,
48869 source: eventSource
48870 };
48871 this.eventService.dispatchEvent(event);
48872 return true;
48873 };
48874 ValueService.prototype.callColumnCellValueChangedHandler = function (event) {
48875 var onCellValueChanged = event.colDef.onCellValueChanged;
48876 if (typeof onCellValueChanged === 'function') {
48877 onCellValueChanged({
48878 node: event.node,
48879 data: event.data,
48880 oldValue: event.oldValue,
48881 newValue: event.newValue,
48882 colDef: event.colDef,
48883 column: event.column,
48884 api: event.api,
48885 columnApi: event.columnApi,
48886 context: event.context
48887 });
48888 }
48889 };
48890 ValueService.prototype.setValueUsingField = function (data, field, newValue, isFieldContainsDots) {
48891 if (!field) {
48892 return false;
48893 }
48894 // if no '.', then it's not a deep value
48895 var valuesAreSame = false;
48896 if (!isFieldContainsDots) {
48897 data[field] = newValue;
48898 }
48899 else {
48900 // otherwise it is a deep value, so need to dig for it
48901 var fieldPieces = field.split('.');
48902 var currentObject = data;
48903 while (fieldPieces.length > 0 && currentObject) {
48904 var fieldPiece = fieldPieces.shift();
48905 if (fieldPieces.length === 0) {
48906 currentObject[fieldPiece] = newValue;
48907 }
48908 else {
48909 currentObject = currentObject[fieldPiece];
48910 }
48911 }
48912 }
48913 return !valuesAreSame;
48914 };
48915 ValueService.prototype.executeFilterValueGetter = function (valueGetter, data, column, rowNode) {
48916 var params = {
48917 data: data,
48918 node: rowNode,
48919 column: column,
48920 colDef: column.getColDef(),
48921 api: this.gridOptionsWrapper.getApi(),
48922 columnApi: this.gridOptionsWrapper.getColumnApi(),
48923 context: this.gridOptionsWrapper.getContext(),
48924 getValue: this.getValueCallback.bind(this, rowNode)
48925 };
48926 return this.expressionService.evaluate(valueGetter, params);
48927 };
48928 ValueService.prototype.executeValueGetter = function (valueGetter, data, column, rowNode) {
48929 var colId = column.getId();
48930 // if inside the same turn, just return back the value we got last time
48931 var valueFromCache = this.valueCache.getValue(rowNode, colId);
48932 if (valueFromCache !== undefined) {
48933 return valueFromCache;
48934 }
48935 var params = {
48936 data: data,
48937 node: rowNode,
48938 column: column,
48939 colDef: column.getColDef(),
48940 api: this.gridOptionsWrapper.getApi(),
48941 columnApi: this.gridOptionsWrapper.getColumnApi(),
48942 context: this.gridOptionsWrapper.getContext(),
48943 getValue: this.getValueCallback.bind(this, rowNode)
48944 };
48945 var result = this.expressionService.evaluate(valueGetter, params);
48946 // if a turn is active, store the value in case the grid asks for it again
48947 this.valueCache.setValue(rowNode, colId, result);
48948 return result;
48949 };
48950 ValueService.prototype.getValueCallback = function (node, field) {
48951 var otherColumn = this.columnModel.getPrimaryColumn(field);
48952 if (otherColumn) {
48953 return this.getValue(otherColumn, node);
48954 }
48955 return null;
48956 };
48957 // used by row grouping and pivot, to get key for a row. col can be a pivot col or a row grouping col
48958 ValueService.prototype.getKeyForNode = function (col, rowNode) {
48959 var value = this.getValue(col, rowNode);
48960 var keyCreator = col.getColDef().keyCreator;
48961 var result = value;
48962 if (keyCreator) {
48963 var keyParams = {
48964 value: value,
48965 colDef: col.getColDef(),
48966 column: col,
48967 node: rowNode,
48968 data: rowNode.data,
48969 api: this.gridOptionsWrapper.getApi(),
48970 columnApi: this.gridOptionsWrapper.getColumnApi(),
48971 context: this.gridOptionsWrapper.getContext()
48972 };
48973 result = keyCreator(keyParams);
48974 }
48975 // if already a string, or missing, just return it
48976 if (typeof result === 'string' || result == null) {
48977 return result;
48978 }
48979 result = String(result);
48980 if (result === '[object Object]') {
48981 Object(_utils_function__WEBPACK_IMPORTED_MODULE_5__["doOnce"])(function () {
48982 console.warn('AG Grid: a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key');
48983 }, 'getKeyForNode - warn about [object,object]');
48984 }
48985 return result;
48986 };
48987 __decorate([
48988 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('expressionService')
48989 ], ValueService.prototype, "expressionService", void 0);
48990 __decorate([
48991 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
48992 ], ValueService.prototype, "columnModel", void 0);
48993 __decorate([
48994 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueCache')
48995 ], ValueService.prototype, "valueCache", void 0);
48996 __decorate([
48997 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
48998 ], ValueService.prototype, "init", null);
48999 ValueService = __decorate([
49000 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('valueService')
49001 ], ValueService);
49002 return ValueService;
49003}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
49004
49005
49006
49007
49008
49009/***/ }),
49010/* 215 */
49011/***/ (function(module, __webpack_exports__, __webpack_require__) {
49012
49013"use strict";
49014__webpack_require__.r(__webpack_exports__);
49015/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpressionService", function() { return ExpressionService; });
49016/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
49017/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
49018/**
49019 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49020 * @version v27.3.0
49021 * @link https://www.ag-grid.com/
49022 * @license MIT
49023 */
49024var __extends = (undefined && undefined.__extends) || (function () {
49025 var extendStatics = function (d, b) {
49026 extendStatics = Object.setPrototypeOf ||
49027 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49028 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
49029 return extendStatics(d, b);
49030 };
49031 return function (d, b) {
49032 extendStatics(d, b);
49033 function __() { this.constructor = d; }
49034 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49035 };
49036})();
49037var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49038 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49039 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49040 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
49041 return c > 3 && r && Object.defineProperty(target, key, r), r;
49042};
49043var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
49044 return function (target, key) { decorator(target, key, paramIndex); }
49045};
49046
49047
49048
49049var ExpressionService = /** @class */ (function (_super) {
49050 __extends(ExpressionService, _super);
49051 function ExpressionService() {
49052 var _this = _super !== null && _super.apply(this, arguments) || this;
49053 _this.expressionToFunctionCache = {};
49054 return _this;
49055 }
49056 ExpressionService.prototype.setBeans = function (loggerFactory) {
49057 this.logger = loggerFactory.create('ExpressionService');
49058 };
49059 ExpressionService.prototype.evaluate = function (expressionOrFunc, params) {
49060 if (typeof expressionOrFunc === 'function') {
49061 // valueGetter is a function, so just call it
49062 var func = expressionOrFunc;
49063 return func(params);
49064 }
49065 else if (typeof expressionOrFunc === 'string') {
49066 // valueGetter is an expression, so execute the expression
49067 var expression = expressionOrFunc;
49068 return this.evaluateExpression(expression, params);
49069 }
49070 else {
49071 console.error('AG Grid: value should be either a string or a function', expressionOrFunc);
49072 }
49073 };
49074 ExpressionService.prototype.evaluateExpression = function (expression, params) {
49075 try {
49076 var javaScriptFunction = this.createExpressionFunction(expression);
49077 // the params don't have all these values, rather we add every possible
49078 // value a params can have, which makes whatever is in the params available.
49079 var result = javaScriptFunction(params.value, params.context, params.oldValue, params.newValue, params.value, params.node, params.data, params.colDef, params.rowIndex, params.api, params.columnApi, params.getValue, params.column, params.columnGroup);
49080 return result;
49081 }
49082 catch (e) {
49083 // the expression failed, which can happen, as it's the client that
49084 // provides the expression. so print a nice message
49085 // tslint:disable-next-line
49086 console.log('Processing of the expression failed');
49087 // tslint:disable-next-line
49088 console.log('Expression = ' + expression);
49089 // tslint:disable-next-line
49090 console.log('Params =', params);
49091 // tslint:disable-next-line
49092 console.log('Exception = ' + e);
49093 return null;
49094 }
49095 };
49096 ExpressionService.prototype.createExpressionFunction = function (expression) {
49097 // check cache first
49098 if (this.expressionToFunctionCache[expression]) {
49099 return this.expressionToFunctionCache[expression];
49100 }
49101 // if not found in cache, return the function
49102 var functionBody = this.createFunctionBody(expression);
49103 var theFunction = new Function('x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup', functionBody);
49104 // store in cache
49105 this.expressionToFunctionCache[expression] = theFunction;
49106 return theFunction;
49107 };
49108 ExpressionService.prototype.createFunctionBody = function (expression) {
49109 // if the expression has the 'return' word in it, then use as is,
49110 // if not, then wrap it with return and ';' to make a function
49111 if (expression.indexOf('return') >= 0) {
49112 return expression;
49113 }
49114 else {
49115 return 'return ' + expression + ';';
49116 }
49117 };
49118 __decorate([
49119 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('loggerFactory'))
49120 ], ExpressionService.prototype, "setBeans", null);
49121 ExpressionService = __decorate([
49122 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('expressionService')
49123 ], ExpressionService);
49124 return ExpressionService;
49125}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
49126
49127
49128
49129
49130
49131/***/ }),
49132/* 216 */
49133/***/ (function(module, __webpack_exports__, __webpack_require__) {
49134
49135"use strict";
49136__webpack_require__.r(__webpack_exports__);
49137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateService", function() { return TemplateService; });
49138/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
49139/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
49140/**
49141 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49142 * @version v27.3.0
49143 * @link https://www.ag-grid.com/
49144 * @license MIT
49145 */
49146var __extends = (undefined && undefined.__extends) || (function () {
49147 var extendStatics = function (d, b) {
49148 extendStatics = Object.setPrototypeOf ||
49149 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49150 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
49151 return extendStatics(d, b);
49152 };
49153 return function (d, b) {
49154 extendStatics(d, b);
49155 function __() { this.constructor = d; }
49156 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49157 };
49158})();
49159var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49160 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49161 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49162 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
49163 return c > 3 && r && Object.defineProperty(target, key, r), r;
49164};
49165
49166
49167var TemplateService = /** @class */ (function (_super) {
49168 __extends(TemplateService, _super);
49169 function TemplateService() {
49170 var _this = _super !== null && _super.apply(this, arguments) || this;
49171 _this.templateCache = {};
49172 _this.waitingCallbacks = {};
49173 return _this;
49174 }
49175 // returns the template if it is loaded, or null if it is not loaded
49176 // but will call the callback when it is loaded
49177 TemplateService.prototype.getTemplate = function (url, callback) {
49178 var templateFromCache = this.templateCache[url];
49179 if (templateFromCache) {
49180 return templateFromCache;
49181 }
49182 var callbackList = this.waitingCallbacks[url];
49183 var that = this;
49184 if (!callbackList) {
49185 // first time this was called, so need a new list for callbacks
49186 callbackList = [];
49187 this.waitingCallbacks[url] = callbackList;
49188 // and also need to do the http request
49189 var client = new XMLHttpRequest();
49190 client.onload = function () {
49191 that.handleHttpResult(this, url);
49192 };
49193 client.open("GET", url);
49194 client.send();
49195 }
49196 // add this callback
49197 if (callback) {
49198 callbackList.push(callback);
49199 }
49200 // caller needs to wait for template to load, so return null
49201 return null;
49202 };
49203 TemplateService.prototype.handleHttpResult = function (httpResult, url) {
49204 if (httpResult.status !== 200 || httpResult.response === null) {
49205 console.warn("AG Grid: Unable to get template error " + httpResult.status + " - " + url);
49206 return;
49207 }
49208 // response success, so process it
49209 // in IE9 the response is in - responseText
49210 this.templateCache[url] = httpResult.response || httpResult.responseText;
49211 // inform all listeners that this is now in the cache
49212 var callbacks = this.waitingCallbacks[url];
49213 for (var i = 0; i < callbacks.length; i++) {
49214 var callback = callbacks[i];
49215 // we could pass the callback the response, however we know the client of this code
49216 // is the cell renderer, and it passes the 'cellRefresh' method in as the callback
49217 // which doesn't take any parameters.
49218 callback();
49219 }
49220 };
49221 TemplateService = __decorate([
49222 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('templateService')
49223 ], TemplateService);
49224 return TemplateService;
49225}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
49226
49227
49228
49229
49230
49231/***/ }),
49232/* 217 */
49233/***/ (function(module, __webpack_exports__, __webpack_require__) {
49234
49235"use strict";
49236__webpack_require__.r(__webpack_exports__);
49237/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoggerFactory", function() { return LoggerFactory; });
49238/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return Logger; });
49239/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
49240/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
49241/**
49242 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49243 * @version v27.3.0
49244 * @link https://www.ag-grid.com/
49245 * @license MIT
49246 */
49247var __extends = (undefined && undefined.__extends) || (function () {
49248 var extendStatics = function (d, b) {
49249 extendStatics = Object.setPrototypeOf ||
49250 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49251 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
49252 return extendStatics(d, b);
49253 };
49254 return function (d, b) {
49255 extendStatics(d, b);
49256 function __() { this.constructor = d; }
49257 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49258 };
49259})();
49260var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49261 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49262 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49263 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
49264 return c > 3 && r && Object.defineProperty(target, key, r), r;
49265};
49266var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
49267 return function (target, key) { decorator(target, key, paramIndex); }
49268};
49269
49270
49271
49272var LoggerFactory = /** @class */ (function (_super) {
49273 __extends(LoggerFactory, _super);
49274 function LoggerFactory() {
49275 return _super !== null && _super.apply(this, arguments) || this;
49276 }
49277 LoggerFactory.prototype.setBeans = function (gridOptionsWrapper) {
49278 this.logging = gridOptionsWrapper.isDebug();
49279 };
49280 LoggerFactory.prototype.create = function (name) {
49281 return new Logger(name, this.isLogging.bind(this));
49282 };
49283 LoggerFactory.prototype.isLogging = function () {
49284 return this.logging;
49285 };
49286 __decorate([
49287 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('gridOptionsWrapper'))
49288 ], LoggerFactory.prototype, "setBeans", null);
49289 LoggerFactory = __decorate([
49290 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('loggerFactory')
49291 ], LoggerFactory);
49292 return LoggerFactory;
49293}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
49294
49295var Logger = /** @class */ (function () {
49296 function Logger(name, isLoggingFunc) {
49297 this.name = name;
49298 this.isLoggingFunc = isLoggingFunc;
49299 }
49300 Logger.prototype.isLogging = function () {
49301 return this.isLoggingFunc();
49302 };
49303 Logger.prototype.log = function (message) {
49304 if (this.isLoggingFunc()) {
49305 // tslint:disable-next-line
49306 console.log('AG Grid.' + this.name + ': ' + message);
49307 }
49308 };
49309 return Logger;
49310}());
49311
49312
49313
49314
49315
49316/***/ }),
49317/* 218 */
49318/***/ (function(module, __webpack_exports__, __webpack_require__) {
49319
49320"use strict";
49321__webpack_require__.r(__webpack_exports__);
49322/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridComp", function() { return GridComp; });
49323/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
49324/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
49325/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
49326/* harmony import */ var _focusService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(206);
49327/* harmony import */ var _gridCtrl__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(219);
49328/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(111);
49329/* harmony import */ var _widgets_tabGuardComp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(202);
49330/**
49331 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49332 * @version v27.3.0
49333 * @link https://www.ag-grid.com/
49334 * @license MIT
49335 */
49336var __extends = (undefined && undefined.__extends) || (function () {
49337 var extendStatics = function (d, b) {
49338 extendStatics = Object.setPrototypeOf ||
49339 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49340 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
49341 return extendStatics(d, b);
49342 };
49343 return function (d, b) {
49344 extendStatics(d, b);
49345 function __() { this.constructor = d; }
49346 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49347 };
49348})();
49349var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49350 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49351 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49352 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
49353 return c > 3 && r && Object.defineProperty(target, key, r), r;
49354};
49355
49356
49357
49358
49359
49360
49361
49362var GridComp = /** @class */ (function (_super) {
49363 __extends(GridComp, _super);
49364 function GridComp(eGridDiv) {
49365 var _this = _super.call(this, undefined) || this;
49366 _this.eGridDiv = eGridDiv;
49367 return _this;
49368 }
49369 GridComp.prototype.postConstruct = function () {
49370 var _this = this;
49371 this.logger = this.loggerFactory.create('GridComp');
49372 var compProxy = {
49373 destroyGridUi: function () { return _this.destroyBean(_this); },
49374 setRtlClass: function (cssClass) { return _this.addCssClass(cssClass); },
49375 addOrRemoveKeyboardFocusClass: function (addOrRemove) { return _this.addOrRemoveCssClass(_focusService__WEBPACK_IMPORTED_MODULE_3__["FocusService"].AG_KEYBOARD_FOCUS, addOrRemove); },
49376 forceFocusOutOfContainer: this.forceFocusOutOfContainer.bind(this),
49377 updateLayoutClasses: this.updateLayoutClasses.bind(this),
49378 getFocusableContainers: this.getFocusableContainers.bind(this),
49379 setUserSelect: function (value) {
49380 _this.getGui().style.userSelect = value != null ? value : '';
49381 _this.getGui().style.webkitUserSelect = value != null ? value : '';
49382 },
49383 setCursor: function (value) {
49384 _this.getGui().style.cursor = value != null ? value : '';
49385 }
49386 };
49387 this.ctrl = this.createManagedBean(new _gridCtrl__WEBPACK_IMPORTED_MODULE_4__["GridCtrl"]());
49388 var template = this.createTemplate();
49389 this.setTemplate(template);
49390 this.ctrl.setComp(compProxy, this.eGridDiv, this.getGui());
49391 this.insertGridIntoDom();
49392 this.initialiseTabGuard({
49393 // we want to override the default behaviour to do nothing for onTabKeyDown
49394 onTabKeyDown: function () { return undefined; },
49395 focusInnerElement: function (fromBottom) { return _this.ctrl.focusInnerElement(fromBottom); }
49396 });
49397 };
49398 GridComp.prototype.insertGridIntoDom = function () {
49399 var _this = this;
49400 var eGui = this.getGui();
49401 this.eGridDiv.appendChild(eGui);
49402 this.addDestroyFunc(function () {
49403 _this.eGridDiv.removeChild(eGui);
49404 _this.logger.log('Grid removed from DOM');
49405 });
49406 };
49407 GridComp.prototype.updateLayoutClasses = function (cssClass, params) {
49408 var eRootWrapperBodyClassList = this.eRootWrapperBody.classList;
49409 eRootWrapperBodyClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].AUTO_HEIGHT, params.autoHeight);
49410 eRootWrapperBodyClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].NORMAL, params.normal);
49411 eRootWrapperBodyClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].PRINT, params.print);
49412 this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].AUTO_HEIGHT, params.autoHeight);
49413 this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].NORMAL, params.normal);
49414 this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].PRINT, params.print);
49415 };
49416 GridComp.prototype.createTemplate = function () {
49417 var dropZones = this.ctrl.showDropZones() ? '<ag-grid-header-drop-zones></ag-grid-header-drop-zones>' : '';
49418 var sideBar = this.ctrl.showSideBar() ? '<ag-side-bar ref="sideBar"></ag-side-bar>' : '';
49419 var statusBar = this.ctrl.showStatusBar() ? '<ag-status-bar ref="statusBar"></ag-status-bar>' : '';
49420 var watermark = this.ctrl.showWatermark() ? '<ag-watermark></ag-watermark>' : '';
49421 var template = /* html */ "<div class=\"ag-root-wrapper\">\n " + dropZones + "\n <div class=\"ag-root-wrapper-body\" ref=\"rootWrapperBody\">\n <ag-grid-body ref=\"gridBody\"></ag-grid-body>\n " + sideBar + "\n </div>\n " + statusBar + "\n <ag-pagination></ag-pagination>\n " + watermark + "\n </div>";
49422 return template;
49423 };
49424 GridComp.prototype.getFocusableElement = function () {
49425 return this.eRootWrapperBody;
49426 };
49427 GridComp.prototype.getFocusableContainers = function () {
49428 var focusableContainers = [
49429 this.gridBodyComp.getGui()
49430 ];
49431 if (this.sideBarComp) {
49432 focusableContainers.push(this.sideBarComp.getGui());
49433 }
49434 return focusableContainers.filter(function (el) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isVisible"])(el); });
49435 };
49436 __decorate([
49437 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('loggerFactory')
49438 ], GridComp.prototype, "loggerFactory", void 0);
49439 __decorate([
49440 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('gridBody')
49441 ], GridComp.prototype, "gridBodyComp", void 0);
49442 __decorate([
49443 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('sideBar')
49444 ], GridComp.prototype, "sideBarComp", void 0);
49445 __decorate([
49446 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('rootWrapperBody')
49447 ], GridComp.prototype, "eRootWrapperBody", void 0);
49448 __decorate([
49449 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
49450 ], GridComp.prototype, "postConstruct", null);
49451 return GridComp;
49452}(_widgets_tabGuardComp__WEBPACK_IMPORTED_MODULE_6__["TabGuardComp"]));
49453
49454
49455
49456
49457
49458/***/ }),
49459/* 219 */
49460/***/ (function(module, __webpack_exports__, __webpack_require__) {
49461
49462"use strict";
49463__webpack_require__.r(__webpack_exports__);
49464/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridCtrl", function() { return GridCtrl; });
49465/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
49466/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
49467/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
49468/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
49469/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(111);
49470/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24);
49471/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18);
49472/**
49473 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49474 * @version v27.3.0
49475 * @link https://www.ag-grid.com/
49476 * @license MIT
49477 */
49478var __extends = (undefined && undefined.__extends) || (function () {
49479 var extendStatics = function (d, b) {
49480 extendStatics = Object.setPrototypeOf ||
49481 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49482 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
49483 return extendStatics(d, b);
49484 };
49485 return function (d, b) {
49486 extendStatics(d, b);
49487 function __() { this.constructor = d; }
49488 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49489 };
49490})();
49491var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49492 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49493 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49494 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
49495 return c > 3 && r && Object.defineProperty(target, key, r), r;
49496};
49497
49498
49499
49500
49501
49502
49503
49504var GridCtrl = /** @class */ (function (_super) {
49505 __extends(GridCtrl, _super);
49506 function GridCtrl() {
49507 return _super !== null && _super.apply(this, arguments) || this;
49508 }
49509 GridCtrl.prototype.setComp = function (view, eGridDiv, eGui) {
49510 var _this = this;
49511 this.view = view;
49512 this.eGridHostDiv = eGridDiv;
49513 this.eGui = eGui;
49514 this.mouseEventService.stampTopLevelGridCompWithGridInstance(eGridDiv);
49515 this.createManagedBean(new _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__["LayoutFeature"](this.view));
49516 // important to set rtl before doLayout, as setting the RTL class impacts the scroll position,
49517 // which doLayout indirectly depends on
49518 this.addRtlSupport();
49519 this.addManagedListener(this, _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_KEYBOARD_FOCUS, function () {
49520 _this.view.addOrRemoveKeyboardFocusClass(true);
49521 });
49522 this.addManagedListener(this, _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_MOUSE_FOCUS, function () {
49523 _this.view.addOrRemoveKeyboardFocusClass(false);
49524 });
49525 var unsubscribeFromResize = this.resizeObserverService.observeResize(this.eGridHostDiv, this.onGridSizeChanged.bind(this));
49526 this.addDestroyFunc(function () { return unsubscribeFromResize(); });
49527 this.ctrlsService.registerGridCtrl(this);
49528 };
49529 GridCtrl.prototype.isDetailGrid = function () {
49530 var _a, _b;
49531 var el = this.focusService.findTabbableParent(this.getGui());
49532 return ((_b = (_a = el) === null || _a === void 0 ? void 0 : _a.getAttribute('row-id')) === null || _b === void 0 ? void 0 : _b.startsWith('detail')) || false;
49533 };
49534 GridCtrl.prototype.showDropZones = function () {
49535 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_2__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].RowGroupingModule);
49536 };
49537 GridCtrl.prototype.showSideBar = function () {
49538 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_2__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].SideBarModule);
49539 };
49540 GridCtrl.prototype.showStatusBar = function () {
49541 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_2__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].StatusBarModule);
49542 };
49543 GridCtrl.prototype.showWatermark = function () {
49544 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_2__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].EnterpriseCoreModule);
49545 };
49546 GridCtrl.prototype.onGridSizeChanged = function () {
49547 var event = {
49548 type: _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_GRID_SIZE_CHANGED,
49549 api: this.gridApi,
49550 columnApi: this.columnApi,
49551 clientWidth: this.eGridHostDiv.clientWidth,
49552 clientHeight: this.eGridHostDiv.clientHeight
49553 };
49554 this.eventService.dispatchEvent(event);
49555 };
49556 GridCtrl.prototype.addRtlSupport = function () {
49557 var cssClass = this.gridOptionsWrapper.isEnableRtl() ? 'ag-rtl' : 'ag-ltr';
49558 this.view.setRtlClass(cssClass);
49559 };
49560 GridCtrl.prototype.destroyGridUi = function () {
49561 this.view.destroyGridUi();
49562 };
49563 GridCtrl.prototype.getGui = function () {
49564 return this.eGui;
49565 };
49566 GridCtrl.prototype.setResizeCursor = function (on) {
49567 this.view.setCursor(on ? 'ew-resize' : null);
49568 };
49569 GridCtrl.prototype.disableUserSelect = function (on) {
49570 this.view.setUserSelect(on ? 'none' : null);
49571 };
49572 GridCtrl.prototype.focusNextInnerContainer = function (backwards) {
49573 var eDocument = this.gridOptionsWrapper.getDocument();
49574 var focusableContainers = this.view.getFocusableContainers();
49575 var idxWithFocus = focusableContainers.findIndex(function (container) { return container.contains(eDocument.activeElement); });
49576 var nextIdx = idxWithFocus + (backwards ? -1 : 1);
49577 if (nextIdx <= 0 || nextIdx >= focusableContainers.length) {
49578 return false;
49579 }
49580 return this.focusService.focusInto(focusableContainers[nextIdx]);
49581 };
49582 GridCtrl.prototype.focusInnerElement = function (fromBottom) {
49583 var focusableContainers = this.view.getFocusableContainers();
49584 if (fromBottom) {
49585 if (focusableContainers.length > 1) {
49586 return this.focusService.focusInto(Object(_utils_array__WEBPACK_IMPORTED_MODULE_6__["last"])(focusableContainers), true);
49587 }
49588 var lastColumn = Object(_utils_array__WEBPACK_IMPORTED_MODULE_6__["last"])(this.columnModel.getAllDisplayedColumns());
49589 if (this.focusService.focusGridView(lastColumn, true)) {
49590 return true;
49591 }
49592 }
49593 return this.focusService.focusFirstHeader();
49594 };
49595 GridCtrl.prototype.forceFocusOutOfContainer = function (up) {
49596 if (up === void 0) { up = false; }
49597 this.view.forceFocusOutOfContainer(up);
49598 };
49599 __decorate([
49600 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
49601 ], GridCtrl.prototype, "columnApi", void 0);
49602 __decorate([
49603 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
49604 ], GridCtrl.prototype, "gridApi", void 0);
49605 __decorate([
49606 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
49607 ], GridCtrl.prototype, "focusService", void 0);
49608 __decorate([
49609 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('resizeObserverService')
49610 ], GridCtrl.prototype, "resizeObserverService", void 0);
49611 __decorate([
49612 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
49613 ], GridCtrl.prototype, "columnModel", void 0);
49614 __decorate([
49615 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
49616 ], GridCtrl.prototype, "ctrlsService", void 0);
49617 __decorate([
49618 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('mouseEventService')
49619 ], GridCtrl.prototype, "mouseEventService", void 0);
49620 return GridCtrl;
49621}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
49622
49623
49624
49625
49626
49627/***/ }),
49628/* 220 */
49629/***/ (function(module, __webpack_exports__, __webpack_require__) {
49630
49631"use strict";
49632__webpack_require__.r(__webpack_exports__);
49633/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortController", function() { return SortController; });
49634/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
49635/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
49636/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
49637/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
49638/**
49639 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49640 * @version v27.3.0
49641 * @link https://www.ag-grid.com/
49642 * @license MIT
49643 */
49644var __extends = (undefined && undefined.__extends) || (function () {
49645 var extendStatics = function (d, b) {
49646 extendStatics = Object.setPrototypeOf ||
49647 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49648 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
49649 return extendStatics(d, b);
49650 };
49651 return function (d, b) {
49652 extendStatics(d, b);
49653 function __() { this.constructor = d; }
49654 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49655 };
49656})();
49657var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49658 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49659 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49660 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
49661 return c > 3 && r && Object.defineProperty(target, key, r), r;
49662};
49663
49664
49665
49666
49667var SortController = /** @class */ (function (_super) {
49668 __extends(SortController, _super);
49669 function SortController() {
49670 return _super !== null && _super.apply(this, arguments) || this;
49671 }
49672 SortController_1 = SortController;
49673 SortController.prototype.progressSort = function (column, multiSort, source) {
49674 var nextDirection = this.getNextSortDirection(column);
49675 this.setSortForColumn(column, nextDirection, multiSort, source);
49676 };
49677 SortController.prototype.setSortForColumn = function (column, sort, multiSort, source) {
49678 // auto correct - if sort not legal value, then set it to 'no sort' (which is null)
49679 if (sort !== _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_ASC && sort !== _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_DESC) {
49680 sort = null;
49681 }
49682 // update sort on current col
49683 column.setSort(sort, source);
49684 var doingMultiSort = (multiSort || this.gridOptionsWrapper.isAlwaysMultiSort()) && !this.gridOptionsWrapper.isSuppressMultiSort();
49685 // clear sort on all columns except this one, and update the icons
49686 if (!doingMultiSort) {
49687 this.clearSortBarThisColumn(column, source);
49688 }
49689 // sortIndex used for knowing order of cols when multi-col sort
49690 this.updateSortIndex(column);
49691 this.dispatchSortChangedEvents(source);
49692 };
49693 SortController.prototype.updateSortIndex = function (lastColToChange) {
49694 // update sortIndex on all sorting cols
49695 var allSortedCols = this.getColumnsWithSortingOrdered();
49696 var sortIndex = 0;
49697 allSortedCols.forEach(function (col) {
49698 if (col !== lastColToChange) {
49699 col.setSortIndex(sortIndex);
49700 sortIndex++;
49701 }
49702 });
49703 // last col to change always gets the last sort index, it's added to the end
49704 if (lastColToChange.getSort()) {
49705 lastColToChange.setSortIndex(sortIndex);
49706 }
49707 // clear sort index on all cols not sorting
49708 var allCols = this.columnModel.getPrimaryAndSecondaryAndAutoColumns();
49709 allCols.filter(function (col) { return col.getSort() == null; }).forEach(function (col) { return col.setSortIndex(); });
49710 };
49711 // gets called by API, so if data changes, use can call this, which will end up
49712 // working out the sort order again of the rows.
49713 SortController.prototype.onSortChanged = function (source) {
49714 this.dispatchSortChangedEvents(source);
49715 };
49716 SortController.prototype.isSortActive = function () {
49717 // pull out all the columns that have sorting set
49718 var allCols = this.columnModel.getPrimaryAndSecondaryAndAutoColumns();
49719 var sortedCols = allCols.filter(function (column) { return !!column.getSort(); });
49720 return sortedCols && sortedCols.length > 0;
49721 };
49722 SortController.prototype.dispatchSortChangedEvents = function (source) {
49723 var event = {
49724 type: _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_SORT_CHANGED,
49725 api: this.gridApi,
49726 columnApi: this.columnApi,
49727 source: source
49728 };
49729 this.eventService.dispatchEvent(event);
49730 };
49731 SortController.prototype.clearSortBarThisColumn = function (columnToSkip, source) {
49732 this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(function (columnToClear) {
49733 // Do not clear if either holding shift, or if column in question was clicked
49734 if (columnToClear !== columnToSkip) {
49735 // setting to 'undefined' as null means 'none' rather than cleared, otherwise issue will arise
49736 // if sort order is: ['desc', null , 'asc'], as it will start at null rather than 'desc'.
49737 columnToClear.setSort(undefined, source);
49738 }
49739 });
49740 };
49741 SortController.prototype.getNextSortDirection = function (column) {
49742 var sortingOrder;
49743 if (column.getColDef().sortingOrder) {
49744 sortingOrder = column.getColDef().sortingOrder;
49745 }
49746 else if (this.gridOptionsWrapper.getSortingOrder()) {
49747 sortingOrder = this.gridOptionsWrapper.getSortingOrder();
49748 }
49749 else {
49750 sortingOrder = SortController_1.DEFAULT_SORTING_ORDER;
49751 }
49752 if (!Array.isArray(sortingOrder) || sortingOrder.length <= 0) {
49753 console.warn("AG Grid: sortingOrder must be an array with at least one element, currently it's " + sortingOrder);
49754 return null;
49755 }
49756 var currentIndex = sortingOrder.indexOf(column.getSort());
49757 var notInArray = currentIndex < 0;
49758 var lastItemInArray = currentIndex == sortingOrder.length - 1;
49759 var result;
49760 if (notInArray || lastItemInArray) {
49761 result = sortingOrder[0];
49762 }
49763 else {
49764 result = sortingOrder[currentIndex + 1];
49765 }
49766 // verify the sort type exists, as the user could provide the sortingOrder, need to make sure it's valid
49767 if (SortController_1.DEFAULT_SORTING_ORDER.indexOf(result) < 0) {
49768 console.warn('AG Grid: invalid sort type ' + result);
49769 return null;
49770 }
49771 return result;
49772 };
49773 SortController.prototype.getColumnsWithSortingOrdered = function () {
49774 // pull out all the columns that have sorting set
49775 var allColumnsIncludingAuto = this.columnModel.getPrimaryAndSecondaryAndAutoColumns();
49776 var columnsWithSorting = allColumnsIncludingAuto.filter(function (column) { return !!column.getSort(); });
49777 // when both cols are missing sortIndex, we use the position of the col in all cols list.
49778 // this means if colDefs only have sort, but no sortIndex, we deterministically pick which
49779 // cols is sorted by first.
49780 var allColsIndexes = {};
49781 allColumnsIncludingAuto.forEach(function (col, index) { return allColsIndexes[col.getId()] = index; });
49782 // put the columns in order of which one got sorted first
49783 columnsWithSorting.sort(function (a, b) {
49784 var iA = a.getSortIndex();
49785 var iB = b.getSortIndex();
49786 if (iA != null && iB != null) {
49787 return iA - iB; // both present, normal comparison
49788 }
49789 else if (iA == null && iB == null) {
49790 // both missing, compare using column positions
49791 var posA = allColsIndexes[a.getId()];
49792 var posB = allColsIndexes[b.getId()];
49793 return posA > posB ? 1 : -1;
49794 }
49795 else if (iB == null) {
49796 return -1; // iB missing
49797 }
49798 else {
49799 return 1; // iA missing
49800 }
49801 });
49802 return columnsWithSorting;
49803 };
49804 // used by server side row models, to sent sort to server
49805 SortController.prototype.getSortModel = function () {
49806 return this.getColumnsWithSortingOrdered().map(function (column) { return ({
49807 sort: column.getSort(),
49808 colId: column.getId()
49809 }); });
49810 };
49811 SortController.prototype.getSortOptions = function () {
49812 return this.getColumnsWithSortingOrdered().map(function (column) { return ({
49813 sort: column.getSort(),
49814 column: column
49815 }); });
49816 };
49817 var SortController_1;
49818 SortController.DEFAULT_SORTING_ORDER = [_constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_ASC, _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_DESC, null];
49819 __decorate([
49820 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
49821 ], SortController.prototype, "columnModel", void 0);
49822 __decorate([
49823 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
49824 ], SortController.prototype, "columnApi", void 0);
49825 __decorate([
49826 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
49827 ], SortController.prototype, "gridApi", void 0);
49828 SortController = SortController_1 = __decorate([
49829 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('sortController')
49830 ], SortController);
49831 return SortController;
49832}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
49833
49834
49835
49836
49837
49838/***/ }),
49839/* 221 */
49840/***/ (function(module, __webpack_exports__, __webpack_require__) {
49841
49842"use strict";
49843__webpack_require__.r(__webpack_exports__);
49844/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnHoverService", function() { return ColumnHoverService; });
49845/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
49846/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
49847/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
49848/**
49849 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49850 * @version v27.3.0
49851 * @link https://www.ag-grid.com/
49852 * @license MIT
49853 */
49854var __extends = (undefined && undefined.__extends) || (function () {
49855 var extendStatics = function (d, b) {
49856 extendStatics = Object.setPrototypeOf ||
49857 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49858 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
49859 return extendStatics(d, b);
49860 };
49861 return function (d, b) {
49862 extendStatics(d, b);
49863 function __() { this.constructor = d; }
49864 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49865 };
49866})();
49867var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49868 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49869 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49870 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
49871 return c > 3 && r && Object.defineProperty(target, key, r), r;
49872};
49873
49874
49875
49876var ColumnHoverService = /** @class */ (function (_super) {
49877 __extends(ColumnHoverService, _super);
49878 function ColumnHoverService() {
49879 return _super !== null && _super.apply(this, arguments) || this;
49880 }
49881 ColumnHoverService.prototype.setMouseOver = function (columns) {
49882 this.selectedColumns = columns;
49883 var event = {
49884 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_HOVER_CHANGED,
49885 api: this.gridApi,
49886 columnApi: this.columnApi
49887 };
49888 this.eventService.dispatchEvent(event);
49889 };
49890 ColumnHoverService.prototype.clearMouseOver = function () {
49891 this.selectedColumns = null;
49892 var event = {
49893 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_HOVER_CHANGED,
49894 api: this.gridApi,
49895 columnApi: this.columnApi
49896 };
49897 this.eventService.dispatchEvent(event);
49898 };
49899 ColumnHoverService.prototype.isHovered = function (column) {
49900 return !!this.selectedColumns && this.selectedColumns.indexOf(column) >= 0;
49901 };
49902 __decorate([
49903 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
49904 ], ColumnHoverService.prototype, "columnApi", void 0);
49905 __decorate([
49906 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
49907 ], ColumnHoverService.prototype, "gridApi", void 0);
49908 ColumnHoverService = __decorate([
49909 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('columnHoverService')
49910 ], ColumnHoverService);
49911 return ColumnHoverService;
49912}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
49913
49914
49915
49916
49917
49918/***/ }),
49919/* 222 */
49920/***/ (function(module, __webpack_exports__, __webpack_require__) {
49921
49922"use strict";
49923__webpack_require__.r(__webpack_exports__);
49924/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnAnimationService", function() { return ColumnAnimationService; });
49925/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
49926/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
49927/**
49928 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49929 * @version v27.3.0
49930 * @link https://www.ag-grid.com/
49931 * @license MIT
49932 */
49933var __extends = (undefined && undefined.__extends) || (function () {
49934 var extendStatics = function (d, b) {
49935 extendStatics = Object.setPrototypeOf ||
49936 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49937 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
49938 return extendStatics(d, b);
49939 };
49940 return function (d, b) {
49941 extendStatics(d, b);
49942 function __() { this.constructor = d; }
49943 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49944 };
49945})();
49946var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49947 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49948 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49949 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
49950 return c > 3 && r && Object.defineProperty(target, key, r), r;
49951};
49952
49953
49954var ColumnAnimationService = /** @class */ (function (_super) {
49955 __extends(ColumnAnimationService, _super);
49956 function ColumnAnimationService() {
49957 var _this = _super !== null && _super.apply(this, arguments) || this;
49958 _this.executeNextFuncs = [];
49959 _this.executeLaterFuncs = [];
49960 _this.active = false;
49961 _this.animationThreadCount = 0;
49962 return _this;
49963 }
49964 ColumnAnimationService.prototype.postConstruct = function () {
49965 var _this = this;
49966 this.ctrlsService.whenReady(function (p) { return _this.gridBodyCtrl = p.gridBodyCtrl; });
49967 };
49968 ColumnAnimationService.prototype.isActive = function () {
49969 return this.active;
49970 };
49971 ColumnAnimationService.prototype.start = function () {
49972 if (this.active) {
49973 return;
49974 }
49975 if (this.gridOptionsWrapper.isSuppressColumnMoveAnimation()) {
49976 return;
49977 }
49978 // if doing RTL, we don't animate open / close as due to how the pixels are inverted,
49979 // the animation moves all the row the the right rather than to the left (ie it's the static
49980 // columns that actually get their coordinates updated)
49981 if (this.gridOptionsWrapper.isEnableRtl()) {
49982 return;
49983 }
49984 this.ensureAnimationCssClassPresent();
49985 this.active = true;
49986 };
49987 ColumnAnimationService.prototype.finish = function () {
49988 if (!this.active) {
49989 return;
49990 }
49991 this.flush();
49992 this.active = false;
49993 };
49994 ColumnAnimationService.prototype.executeNextVMTurn = function (func) {
49995 if (this.active) {
49996 this.executeNextFuncs.push(func);
49997 }
49998 else {
49999 func();
50000 }
50001 };
50002 ColumnAnimationService.prototype.executeLaterVMTurn = function (func) {
50003 if (this.active) {
50004 this.executeLaterFuncs.push(func);
50005 }
50006 else {
50007 func();
50008 }
50009 };
50010 ColumnAnimationService.prototype.ensureAnimationCssClassPresent = function () {
50011 var _this = this;
50012 // up the count, so we can tell if someone else has updated the count
50013 // by the time the 'wait' func executes
50014 this.animationThreadCount++;
50015 var animationThreadCountCopy = this.animationThreadCount;
50016 this.gridBodyCtrl.setColumnMovingCss(true);
50017 this.executeLaterFuncs.push(function () {
50018 // only remove the class if this thread was the last one to update it
50019 if (_this.animationThreadCount === animationThreadCountCopy) {
50020 _this.gridBodyCtrl.setColumnMovingCss(false);
50021 }
50022 });
50023 };
50024 ColumnAnimationService.prototype.flush = function () {
50025 var nowFuncs = this.executeNextFuncs;
50026 this.executeNextFuncs = [];
50027 var waitFuncs = this.executeLaterFuncs;
50028 this.executeLaterFuncs = [];
50029 if (nowFuncs.length === 0 && waitFuncs.length === 0) {
50030 return;
50031 }
50032 window.setTimeout(function () { return nowFuncs.forEach(function (func) { return func(); }); }, 0);
50033 window.setTimeout(function () { return waitFuncs.forEach(function (func) { return func(); }); }, 300);
50034 };
50035 __decorate([
50036 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
50037 ], ColumnAnimationService.prototype, "ctrlsService", void 0);
50038 __decorate([
50039 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
50040 ], ColumnAnimationService.prototype, "postConstruct", null);
50041 ColumnAnimationService = __decorate([
50042 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('columnAnimationService')
50043 ], ColumnAnimationService);
50044 return ColumnAnimationService;
50045}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
50046
50047
50048
50049
50050
50051/***/ }),
50052/* 223 */
50053/***/ (function(module, __webpack_exports__, __webpack_require__) {
50054
50055"use strict";
50056__webpack_require__.r(__webpack_exports__);
50057/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutoGroupColService", function() { return AutoGroupColService; });
50058/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
50059/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
50060/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
50061/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
50062/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
50063/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
50064/**
50065 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50066 * @version v27.3.0
50067 * @link https://www.ag-grid.com/
50068 * @license MIT
50069 */
50070var __extends = (undefined && undefined.__extends) || (function () {
50071 var extendStatics = function (d, b) {
50072 extendStatics = Object.setPrototypeOf ||
50073 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50074 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
50075 return extendStatics(d, b);
50076 };
50077 return function (d, b) {
50078 extendStatics(d, b);
50079 function __() { this.constructor = d; }
50080 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50081 };
50082})();
50083var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50084 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50085 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50086 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
50087 return c > 3 && r && Object.defineProperty(target, key, r), r;
50088};
50089
50090
50091
50092
50093
50094
50095var AutoGroupColService = /** @class */ (function (_super) {
50096 __extends(AutoGroupColService, _super);
50097 function AutoGroupColService() {
50098 return _super !== null && _super.apply(this, arguments) || this;
50099 }
50100 AutoGroupColService_1 = AutoGroupColService;
50101 AutoGroupColService.prototype.createAutoGroupColumns = function (existingCols, rowGroupColumns) {
50102 var _this = this;
50103 var groupAutoColumns = [];
50104 var doingTreeData = this.gridOptionsWrapper.isTreeData();
50105 var doingMultiAutoColumn = this.gridOptionsWrapper.isGroupMultiAutoColumn();
50106 if (doingTreeData && doingMultiAutoColumn) {
50107 console.warn('AG Grid: you cannot mix groupMultiAutoColumn with treeData, only one column can be used to display groups when doing tree data');
50108 doingMultiAutoColumn = false;
50109 }
50110 // if doing groupMultiAutoColumn, then we call the method multiple times, once
50111 // for each column we are grouping by
50112 if (doingMultiAutoColumn) {
50113 rowGroupColumns.forEach(function (rowGroupCol, index) {
50114 groupAutoColumns.push(_this.createOneAutoGroupColumn(existingCols, rowGroupCol, index));
50115 });
50116 }
50117 else {
50118 groupAutoColumns.push(this.createOneAutoGroupColumn(existingCols));
50119 }
50120 return groupAutoColumns;
50121 };
50122 // rowGroupCol and index are missing if groupMultiAutoColumn=false
50123 AutoGroupColService.prototype.createOneAutoGroupColumn = function (existingCols, rowGroupCol, index) {
50124 // if one provided by user, use it, otherwise create one
50125 var defaultAutoColDef = this.generateDefaultColDef(rowGroupCol);
50126 // if doing multi, set the field
50127 var colId;
50128 if (rowGroupCol) {
50129 colId = _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].GROUP_AUTO_COLUMN_ID + "-" + rowGroupCol.getId();
50130 }
50131 else {
50132 colId = AutoGroupColService_1.GROUP_AUTO_COLUMN_BUNDLE_ID;
50133 }
50134 var userAutoColDef = this.gridOptionsWrapper.getAutoGroupColumnDef();
50135 Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["mergeDeep"])(defaultAutoColDef, userAutoColDef);
50136 defaultAutoColDef = this.columnFactory.mergeColDefs(defaultAutoColDef);
50137 defaultAutoColDef.colId = colId;
50138 // For tree data the filter is always allowed
50139 if (!this.gridOptionsWrapper.isTreeData()) {
50140 // we would only allow filter if the user has provided field or value getter. otherwise the filter
50141 // would not be able to work.
50142 var noFieldOrValueGetter = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missing"])(defaultAutoColDef.field) && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missing"])(defaultAutoColDef.valueGetter) && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missing"])(defaultAutoColDef.filterValueGetter);
50143 if (noFieldOrValueGetter) {
50144 defaultAutoColDef.filter = false;
50145 }
50146 }
50147 // if showing many cols, we don't want to show more than one with a checkbox for selection
50148 if (index && index > 0) {
50149 defaultAutoColDef.headerCheckboxSelection = false;
50150 }
50151 var existingCol = existingCols.find(function (col) { return col.getId() == colId; });
50152 if (existingCol) {
50153 existingCol.setColDef(defaultAutoColDef, null);
50154 this.columnFactory.applyColumnState(existingCol, defaultAutoColDef);
50155 return existingCol;
50156 }
50157 var newCol = new _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"](defaultAutoColDef, null, colId, true);
50158 this.context.createBean(newCol);
50159 return newCol;
50160 };
50161 AutoGroupColService.prototype.generateDefaultColDef = function (rowGroupCol) {
50162 var userDef = this.gridOptionsWrapper.getAutoGroupColumnDef();
50163 var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
50164 var res = {
50165 headerName: localeTextFunc('group', 'Group')
50166 };
50167 var userHasProvidedGroupCellRenderer = userDef &&
50168 (userDef.cellRenderer || userDef.cellRendererFramework || userDef.cellRendererSelector);
50169 // only add the default group cell renderer if user hasn't provided one
50170 if (!userHasProvidedGroupCellRenderer) {
50171 res.cellRenderer = 'agGroupCellRenderer';
50172 }
50173 // we never allow moving the group column
50174 // defaultAutoColDef.suppressMovable = true;
50175 if (rowGroupCol) {
50176 var colDef = rowGroupCol.getColDef();
50177 Object.assign(res, {
50178 // cellRendererParams.groupKey: colDefToCopy.field;
50179 headerName: this.columnModel.getDisplayNameForColumn(rowGroupCol, 'header'),
50180 headerValueGetter: colDef.headerValueGetter
50181 });
50182 if (colDef.cellRenderer || colDef.cellRendererFramework) {
50183 Object.assign(res, {
50184 cellRendererParams: {
50185 innerRenderer: colDef.cellRenderer,
50186 innerRendererFramework: colDef.cellRendererFramework,
50187 innerRendererParams: colDef.cellRendererParams
50188 }
50189 });
50190 }
50191 res.showRowGroup = rowGroupCol.getColId();
50192 }
50193 else {
50194 res.showRowGroup = true;
50195 }
50196 return res;
50197 };
50198 var AutoGroupColService_1;
50199 AutoGroupColService.GROUP_AUTO_COLUMN_BUNDLE_ID = _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].GROUP_AUTO_COLUMN_ID;
50200 __decorate([
50201 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
50202 ], AutoGroupColService.prototype, "columnModel", void 0);
50203 __decorate([
50204 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnFactory')
50205 ], AutoGroupColService.prototype, "columnFactory", void 0);
50206 AutoGroupColService = AutoGroupColService_1 = __decorate([
50207 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('autoGroupColService')
50208 ], AutoGroupColService);
50209 return AutoGroupColService;
50210}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
50211
50212
50213
50214
50215
50216/***/ }),
50217/* 224 */
50218/***/ (function(module, __webpack_exports__, __webpack_require__) {
50219
50220"use strict";
50221__webpack_require__.r(__webpack_exports__);
50222/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PaginationAutoPageSizeService", function() { return PaginationAutoPageSizeService; });
50223/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
50224/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
50225/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
50226/**
50227 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50228 * @version v27.3.0
50229 * @link https://www.ag-grid.com/
50230 * @license MIT
50231 */
50232var __extends = (undefined && undefined.__extends) || (function () {
50233 var extendStatics = function (d, b) {
50234 extendStatics = Object.setPrototypeOf ||
50235 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50236 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
50237 return extendStatics(d, b);
50238 };
50239 return function (d, b) {
50240 extendStatics(d, b);
50241 function __() { this.constructor = d; }
50242 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50243 };
50244})();
50245var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50246 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50247 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50248 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
50249 return c > 3 && r && Object.defineProperty(target, key, r), r;
50250};
50251
50252
50253
50254var PaginationAutoPageSizeService = /** @class */ (function (_super) {
50255 __extends(PaginationAutoPageSizeService, _super);
50256 function PaginationAutoPageSizeService() {
50257 return _super !== null && _super.apply(this, arguments) || this;
50258 }
50259 PaginationAutoPageSizeService.prototype.postConstruct = function () {
50260 var _this = this;
50261 this.ctrlsService.whenReady(function (p) {
50262 _this.centerRowContainerCon = p.centerRowContainerCtrl;
50263 _this.addManagedListener(_this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_BODY_HEIGHT_CHANGED, _this.onBodyHeightChanged.bind(_this));
50264 _this.addManagedListener(_this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED, _this.onScrollVisibilityChanged.bind(_this));
50265 _this.checkPageSize();
50266 });
50267 };
50268 PaginationAutoPageSizeService.prototype.notActive = function () {
50269 return !this.gridOptionsWrapper.isPaginationAutoPageSize();
50270 };
50271 PaginationAutoPageSizeService.prototype.onScrollVisibilityChanged = function () {
50272 this.checkPageSize();
50273 };
50274 PaginationAutoPageSizeService.prototype.onBodyHeightChanged = function () {
50275 this.checkPageSize();
50276 };
50277 PaginationAutoPageSizeService.prototype.checkPageSize = function () {
50278 if (this.notActive()) {
50279 return;
50280 }
50281 var rowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();
50282 var bodyHeight = this.centerRowContainerCon.getViewportSizeFeature().getBodyHeight();
50283 if (bodyHeight > 0) {
50284 var newPageSize = Math.floor(bodyHeight / rowHeight);
50285 this.gridOptionsWrapper.setProperty('paginationPageSize', newPageSize);
50286 }
50287 };
50288 __decorate([
50289 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('ctrlsService')
50290 ], PaginationAutoPageSizeService.prototype, "ctrlsService", void 0);
50291 __decorate([
50292 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
50293 ], PaginationAutoPageSizeService.prototype, "postConstruct", null);
50294 PaginationAutoPageSizeService = __decorate([
50295 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('paginationAutoPageSizeService')
50296 ], PaginationAutoPageSizeService);
50297 return PaginationAutoPageSizeService;
50298}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
50299
50300
50301
50302
50303
50304/***/ }),
50305/* 225 */
50306/***/ (function(module, __webpack_exports__, __webpack_require__) {
50307
50308"use strict";
50309__webpack_require__.r(__webpack_exports__);
50310/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValueCache", function() { return ValueCache; });
50311/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
50312/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
50313/**
50314 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50315 * @version v27.3.0
50316 * @link https://www.ag-grid.com/
50317 * @license MIT
50318 */
50319var __extends = (undefined && undefined.__extends) || (function () {
50320 var extendStatics = function (d, b) {
50321 extendStatics = Object.setPrototypeOf ||
50322 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50323 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
50324 return extendStatics(d, b);
50325 };
50326 return function (d, b) {
50327 extendStatics(d, b);
50328 function __() { this.constructor = d; }
50329 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50330 };
50331})();
50332var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50333 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50334 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50335 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
50336 return c > 3 && r && Object.defineProperty(target, key, r), r;
50337};
50338
50339
50340var ValueCache = /** @class */ (function (_super) {
50341 __extends(ValueCache, _super);
50342 function ValueCache() {
50343 var _this = _super !== null && _super.apply(this, arguments) || this;
50344 _this.cacheVersion = 0;
50345 return _this;
50346 }
50347 ValueCache.prototype.init = function () {
50348 this.active = this.gridOptionsWrapper.isValueCache();
50349 this.neverExpires = this.gridOptionsWrapper.isValueCacheNeverExpires();
50350 };
50351 ValueCache.prototype.onDataChanged = function () {
50352 if (this.neverExpires) {
50353 return;
50354 }
50355 this.expire();
50356 };
50357 ValueCache.prototype.expire = function () {
50358 this.cacheVersion++;
50359 };
50360 ValueCache.prototype.setValue = function (rowNode, colId, value) {
50361 if (this.active) {
50362 if (rowNode.__cacheVersion !== this.cacheVersion) {
50363 rowNode.__cacheVersion = this.cacheVersion;
50364 rowNode.__cacheData = {};
50365 }
50366 rowNode.__cacheData[colId] = value;
50367 }
50368 };
50369 ValueCache.prototype.getValue = function (rowNode, colId) {
50370 if (!this.active || rowNode.__cacheVersion !== this.cacheVersion) {
50371 return undefined;
50372 }
50373 return rowNode.__cacheData[colId];
50374 };
50375 __decorate([
50376 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
50377 ], ValueCache.prototype, "init", null);
50378 ValueCache = __decorate([
50379 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('valueCache')
50380 ], ValueCache);
50381 return ValueCache;
50382}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
50383
50384
50385
50386
50387
50388/***/ }),
50389/* 226 */
50390/***/ (function(module, __webpack_exports__, __webpack_require__) {
50391
50392"use strict";
50393__webpack_require__.r(__webpack_exports__);
50394/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangeDetectionService", function() { return ChangeDetectionService; });
50395/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
50396/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
50397/* harmony import */ var _utils_changedPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
50398/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
50399/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23);
50400/**
50401 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50402 * @version v27.3.0
50403 * @link https://www.ag-grid.com/
50404 * @license MIT
50405 */
50406var __extends = (undefined && undefined.__extends) || (function () {
50407 var extendStatics = function (d, b) {
50408 extendStatics = Object.setPrototypeOf ||
50409 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50410 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
50411 return extendStatics(d, b);
50412 };
50413 return function (d, b) {
50414 extendStatics(d, b);
50415 function __() { this.constructor = d; }
50416 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50417 };
50418})();
50419var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50420 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50421 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50422 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
50423 return c > 3 && r && Object.defineProperty(target, key, r), r;
50424};
50425
50426
50427
50428
50429
50430var ChangeDetectionService = /** @class */ (function (_super) {
50431 __extends(ChangeDetectionService, _super);
50432 function ChangeDetectionService() {
50433 return _super !== null && _super.apply(this, arguments) || this;
50434 }
50435 ChangeDetectionService.prototype.init = function () {
50436 if (this.rowModel.getType() === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE) {
50437 this.clientSideRowModel = this.rowModel;
50438 }
50439 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_CELL_VALUE_CHANGED, this.onCellValueChanged.bind(this));
50440 };
50441 ChangeDetectionService.prototype.onCellValueChanged = function (event) {
50442 // Clipboard service manages its own change detection, so no need to do it here.
50443 // The clipboard manages its own as otherwise this would happen once for every cell
50444 // that got updated as part of a paste operation, so e.g. if 100 cells in a paste operation,
50445 // this doChangeDetection would get called 100 times (once for each cell), instead clipboard
50446 // service executes the logic we have here once (in essence batching up all cell changes
50447 // into one change detection).
50448 if (event.source === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].SOURCE_PASTE) {
50449 return;
50450 }
50451 this.doChangeDetection(event.node, event.column);
50452 };
50453 ChangeDetectionService.prototype.doChangeDetection = function (rowNode, column) {
50454 if (this.gridOptionsWrapper.isSuppressChangeDetection()) {
50455 return;
50456 }
50457 // step 1 of change detection is to update the aggregated values
50458 if (this.clientSideRowModel && !rowNode.isRowPinned()) {
50459 var onlyChangedColumns = this.gridOptionsWrapper.isAggregateOnlyChangedColumns();
50460 var changedPath = new _utils_changedPath__WEBPACK_IMPORTED_MODULE_2__["ChangedPath"](onlyChangedColumns, this.clientSideRowModel.getRootNode());
50461 changedPath.addParentNode(rowNode.parent, [column]);
50462 this.clientSideRowModel.doAggregate(changedPath);
50463 }
50464 // step 2 of change detection is to refresh the cells
50465 this.rowRenderer.refreshCells();
50466 };
50467 __decorate([
50468 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowModel')
50469 ], ChangeDetectionService.prototype, "rowModel", void 0);
50470 __decorate([
50471 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowRenderer')
50472 ], ChangeDetectionService.prototype, "rowRenderer", void 0);
50473 __decorate([
50474 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
50475 ], ChangeDetectionService.prototype, "init", null);
50476 ChangeDetectionService = __decorate([
50477 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('changeDetectionService')
50478 ], ChangeDetectionService);
50479 return ChangeDetectionService;
50480}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
50481
50482
50483
50484
50485
50486/***/ }),
50487/* 227 */
50488/***/ (function(module, __webpack_exports__, __webpack_require__) {
50489
50490"use strict";
50491__webpack_require__.r(__webpack_exports__);
50492/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgComponentUtils", function() { return AgComponentUtils; });
50493/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
50494/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
50495/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
50496/**
50497 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50498 * @version v27.3.0
50499 * @link https://www.ag-grid.com/
50500 * @license MIT
50501 */
50502var __extends = (undefined && undefined.__extends) || (function () {
50503 var extendStatics = function (d, b) {
50504 extendStatics = Object.setPrototypeOf ||
50505 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50506 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
50507 return extendStatics(d, b);
50508 };
50509 return function (d, b) {
50510 extendStatics(d, b);
50511 function __() { this.constructor = d; }
50512 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50513 };
50514})();
50515var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50516 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50517 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50518 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
50519 return c > 3 && r && Object.defineProperty(target, key, r), r;
50520};
50521
50522
50523
50524var AgComponentUtils = /** @class */ (function (_super) {
50525 __extends(AgComponentUtils, _super);
50526 function AgComponentUtils() {
50527 return _super !== null && _super.apply(this, arguments) || this;
50528 }
50529 AgComponentUtils.prototype.adaptFunction = function (propertyName, jsCompFunc) {
50530 var metadata = this.componentMetadataProvider.retrieve(propertyName);
50531 if (metadata && metadata.functionAdapter) {
50532 return metadata.functionAdapter(jsCompFunc);
50533 }
50534 return null;
50535 };
50536 AgComponentUtils.prototype.adaptCellRendererFunction = function (callback) {
50537 var Adapter = /** @class */ (function () {
50538 function Adapter() {
50539 }
50540 Adapter.prototype.refresh = function (params) {
50541 return false;
50542 };
50543 Adapter.prototype.getGui = function () {
50544 return this.eGui;
50545 };
50546 Adapter.prototype.init = function (params) {
50547 var callbackResult = callback(params);
50548 var type = typeof callbackResult;
50549 if (type === 'string' || type === 'number' || type === 'boolean') {
50550 this.eGui = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["loadTemplate"])('<span>' + callbackResult + '</span>');
50551 return;
50552 }
50553 if (callbackResult == null) {
50554 this.eGui = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["loadTemplate"])('<span></span>');
50555 return;
50556 }
50557 this.eGui = callbackResult;
50558 };
50559 return Adapter;
50560 }());
50561 return Adapter;
50562 };
50563 AgComponentUtils.prototype.doesImplementIComponent = function (candidate) {
50564 if (!candidate) {
50565 return false;
50566 }
50567 return candidate.prototype && 'getGui' in candidate.prototype;
50568 };
50569 __decorate([
50570 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("componentMetadataProvider")
50571 ], AgComponentUtils.prototype, "componentMetadataProvider", void 0);
50572 AgComponentUtils = __decorate([
50573 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])("agComponentUtils")
50574 ], AgComponentUtils);
50575 return AgComponentUtils;
50576}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
50577
50578
50579
50580
50581
50582/***/ }),
50583/* 228 */
50584/***/ (function(module, __webpack_exports__, __webpack_require__) {
50585
50586"use strict";
50587__webpack_require__.r(__webpack_exports__);
50588/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentMetadataProvider", function() { return ComponentMetadataProvider; });
50589/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
50590/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
50591/**
50592 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50593 * @version v27.3.0
50594 * @link https://www.ag-grid.com/
50595 * @license MIT
50596 */
50597var __extends = (undefined && undefined.__extends) || (function () {
50598 var extendStatics = function (d, b) {
50599 extendStatics = Object.setPrototypeOf ||
50600 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50601 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
50602 return extendStatics(d, b);
50603 };
50604 return function (d, b) {
50605 extendStatics(d, b);
50606 function __() { this.constructor = d; }
50607 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50608 };
50609})();
50610var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50611 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50612 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50613 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
50614 return c > 3 && r && Object.defineProperty(target, key, r), r;
50615};
50616
50617
50618var ComponentMetadataProvider = /** @class */ (function (_super) {
50619 __extends(ComponentMetadataProvider, _super);
50620 function ComponentMetadataProvider() {
50621 return _super !== null && _super.apply(this, arguments) || this;
50622 }
50623 ComponentMetadataProvider.prototype.postConstruct = function () {
50624 this.componentMetaData = {
50625 dateComponent: {
50626 mandatoryMethodList: ['getDate', 'setDate'],
50627 optionalMethodList: ['afterGuiAttached', 'setInputPlaceholder', 'setInputAriaLabel']
50628 },
50629 detailCellRenderer: {
50630 mandatoryMethodList: [],
50631 optionalMethodList: ['refresh'],
50632 functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)
50633 },
50634 headerComponent: {
50635 mandatoryMethodList: [],
50636 optionalMethodList: ['refresh']
50637 },
50638 headerGroupComponent: {
50639 mandatoryMethodList: [],
50640 optionalMethodList: []
50641 },
50642 loadingCellRenderer: {
50643 mandatoryMethodList: [],
50644 optionalMethodList: []
50645 },
50646 loadingOverlayComponent: {
50647 mandatoryMethodList: [],
50648 optionalMethodList: []
50649 },
50650 noRowsOverlayComponent: {
50651 mandatoryMethodList: [],
50652 optionalMethodList: []
50653 },
50654 floatingFilterComponent: {
50655 mandatoryMethodList: ['onParentModelChanged'],
50656 optionalMethodList: ['afterGuiAttached']
50657 },
50658 floatingFilterWrapperComponent: {
50659 mandatoryMethodList: [],
50660 optionalMethodList: []
50661 },
50662 cellRenderer: {
50663 mandatoryMethodList: [],
50664 optionalMethodList: ['refresh', 'afterGuiAttached'],
50665 functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)
50666 },
50667 cellEditor: {
50668 mandatoryMethodList: ['getValue'],
50669 optionalMethodList: ['isPopup', 'isCancelBeforeStart', 'isCancelAfterEnd', 'getPopupPosition', 'focusIn', 'focusOut', 'afterGuiAttached']
50670 },
50671 innerRenderer: {
50672 mandatoryMethodList: [],
50673 optionalMethodList: ['afterGuiAttached'],
50674 functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)
50675 },
50676 fullWidthCellRenderer: {
50677 mandatoryMethodList: [],
50678 optionalMethodList: ['refresh', 'afterGuiAttached'],
50679 functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)
50680 },
50681 pinnedRowCellRenderer: {
50682 mandatoryMethodList: [],
50683 optionalMethodList: ['refresh', 'afterGuiAttached'],
50684 functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)
50685 },
50686 groupRowRenderer: {
50687 mandatoryMethodList: [],
50688 optionalMethodList: ['afterGuiAttached'],
50689 functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)
50690 },
50691 filter: {
50692 mandatoryMethodList: ['isFilterActive', 'doesFilterPass', 'getModel', 'setModel'],
50693 optionalMethodList: ['afterGuiAttached', 'onNewRowsLoaded', 'getModelAsString', 'onFloatingFilterChanged']
50694 },
50695 filterComponent: {
50696 mandatoryMethodList: ['isFilterActive', 'doesFilterPass', 'getModel', 'setModel'],
50697 optionalMethodList: ['afterGuiAttached', 'onNewRowsLoaded', 'getModelAsString', 'onFloatingFilterChanged']
50698 },
50699 statusPanel: {
50700 mandatoryMethodList: [],
50701 optionalMethodList: ['afterGuiAttached'],
50702 },
50703 toolPanel: {
50704 mandatoryMethodList: [],
50705 optionalMethodList: ['refresh', 'afterGuiAttached']
50706 },
50707 tooltipComponent: {
50708 mandatoryMethodList: [],
50709 optionalMethodList: []
50710 }
50711 };
50712 };
50713 ComponentMetadataProvider.prototype.retrieve = function (name) {
50714 return this.componentMetaData[name];
50715 };
50716 __decorate([
50717 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("agComponentUtils")
50718 ], ComponentMetadataProvider.prototype, "agComponentUtils", void 0);
50719 __decorate([
50720 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
50721 ], ComponentMetadataProvider.prototype, "postConstruct", null);
50722 ComponentMetadataProvider = __decorate([
50723 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])("componentMetadataProvider")
50724 ], ComponentMetadataProvider);
50725 return ComponentMetadataProvider;
50726}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
50727
50728
50729
50730
50731
50732/***/ }),
50733/* 229 */
50734/***/ (function(module, __webpack_exports__, __webpack_require__) {
50735
50736"use strict";
50737__webpack_require__.r(__webpack_exports__);
50738/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Environment", function() { return Environment; });
50739/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
50740/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
50741/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
50742/**
50743 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50744 * @version v27.3.0
50745 * @link https://www.ag-grid.com/
50746 * @license MIT
50747 */
50748var __extends = (undefined && undefined.__extends) || (function () {
50749 var extendStatics = function (d, b) {
50750 extendStatics = Object.setPrototypeOf ||
50751 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50752 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
50753 return extendStatics(d, b);
50754 };
50755 return function (d, b) {
50756 extendStatics(d, b);
50757 function __() { this.constructor = d; }
50758 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50759 };
50760})();
50761var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50762 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50763 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50764 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
50765 return c > 3 && r && Object.defineProperty(target, key, r), r;
50766};
50767
50768
50769
50770var MAT_GRID_SIZE = 8;
50771var BASE_GRID_SIZE = 4;
50772var BALHAM_GRID_SIZE = 4;
50773var ALPINE_GRID_SIZE = 6;
50774var HARD_CODED_SIZES = {
50775 // this item is required for custom themes
50776 'ag-theme-custom': {
50777 headerHeight: 25,
50778 headerCellMinWidth: 24,
50779 listItemHeight: BASE_GRID_SIZE * 5,
50780 rowHeight: 25,
50781 chartMenuPanelWidth: 220
50782 },
50783 'ag-theme-material': {
50784 headerHeight: MAT_GRID_SIZE * 7,
50785 headerCellMinWidth: 48,
50786 listItemHeight: MAT_GRID_SIZE * 4,
50787 rowHeight: MAT_GRID_SIZE * 6,
50788 chartMenuPanelWidth: 240
50789 },
50790 'ag-theme-balham': {
50791 headerHeight: BALHAM_GRID_SIZE * 8,
50792 headerCellMinWidth: 24,
50793 listItemHeight: BALHAM_GRID_SIZE * 6,
50794 rowHeight: BALHAM_GRID_SIZE * 7,
50795 chartMenuPanelWidth: 220
50796 },
50797 'ag-theme-alpine': {
50798 headerHeight: ALPINE_GRID_SIZE * 8,
50799 headerCellMinWidth: 36,
50800 listItemHeight: ALPINE_GRID_SIZE * 4,
50801 rowHeight: ALPINE_GRID_SIZE * 7,
50802 chartMenuPanelWidth: 240
50803 }
50804};
50805/**
50806 * this object contains a list of Sass variables and an array
50807 * of CSS styles required to get the correct value.
50808 * eg. $virtual-item-height requires a structure, so we can get its height.
50809 * <div class="ag-theme-balham">
50810 * <div class="ag-virtual-list-container">
50811 * <div class="ag-virtual-list-item"></div>
50812 * </div>
50813 * </div>
50814 */
50815var SASS_PROPERTY_BUILDER = {
50816 headerHeight: ['ag-header-row'],
50817 headerCellMinWidth: ['ag-header-cell'],
50818 listItemHeight: ['ag-virtual-list-item'],
50819 rowHeight: ['ag-row'],
50820 chartMenuPanelWidth: ['ag-chart-docked-container']
50821};
50822var CALCULATED_SIZES = {};
50823var Environment = /** @class */ (function (_super) {
50824 __extends(Environment, _super);
50825 function Environment() {
50826 return _super !== null && _super.apply(this, arguments) || this;
50827 }
50828 Environment.prototype.getSassVariable = function (theme, key) {
50829 var useTheme = 'ag-theme-' + (theme.match('material') ? 'material' : theme.match('balham') ? 'balham' : theme.match('alpine') ? 'alpine' : 'custom');
50830 var defaultValue = HARD_CODED_SIZES[useTheme][key];
50831 var calculatedValue = 0;
50832 if (!CALCULATED_SIZES[theme]) {
50833 CALCULATED_SIZES[theme] = {};
50834 }
50835 var size = CALCULATED_SIZES[theme][key];
50836 if (size != null) {
50837 return size;
50838 }
50839 if (SASS_PROPERTY_BUILDER[key]) {
50840 var classList = SASS_PROPERTY_BUILDER[key];
50841 var div = document.createElement('div');
50842 div.classList.add(theme);
50843 div.style.position = 'absolute';
50844 var el = classList.reduce(function (prevEl, currentClass) {
50845 var currentDiv = document.createElement('div');
50846 currentDiv.style.position = 'static';
50847 currentDiv.classList.add(currentClass);
50848 prevEl.appendChild(currentDiv);
50849 return currentDiv;
50850 }, div);
50851 if (document.body) {
50852 document.body.appendChild(div);
50853 var sizeName = key.toLowerCase().indexOf('height') !== -1 ? 'height' : 'width';
50854 calculatedValue = parseInt(window.getComputedStyle(el)[sizeName], 10);
50855 document.body.removeChild(div);
50856 }
50857 }
50858 CALCULATED_SIZES[theme][key] = calculatedValue || defaultValue;
50859 return CALCULATED_SIZES[theme][key];
50860 };
50861 Environment.prototype.isThemeDark = function () {
50862 var theme = this.getTheme().theme;
50863 return !!theme && theme.indexOf('dark') >= 0;
50864 };
50865 Environment.prototype.chartMenuPanelWidth = function () {
50866 var theme = this.getTheme().themeFamily;
50867 return this.getSassVariable(theme, 'chartMenuPanelWidth');
50868 };
50869 Environment.prototype.getTheme = function () {
50870 var reg = /\bag-(material|(?:theme-([\w\-]*)))\b/;
50871 var el = this.eGridDiv;
50872 var themeMatch = null;
50873 while (el) {
50874 themeMatch = reg.exec(el.className);
50875 if (!themeMatch) {
50876 el = el.parentElement || undefined;
50877 }
50878 else {
50879 break;
50880 }
50881 }
50882 if (!themeMatch) {
50883 return {};
50884 }
50885 var theme = themeMatch[0];
50886 var usingOldTheme = themeMatch[2] === undefined;
50887 if (usingOldTheme) {
50888 var newTheme_1 = theme.replace('ag-', 'ag-theme-');
50889 Object(_utils_function__WEBPACK_IMPORTED_MODULE_2__["doOnce"])(function () { return console.warn("AG Grid: As of v19 old theme are no longer provided. Please replace " + theme + " with " + newTheme_1 + "."); }, 'using-old-theme');
50890 }
50891 return { theme: theme, el: el, themeFamily: theme.replace(/-dark$/, '') };
50892 };
50893 __decorate([
50894 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('eGridDiv')
50895 ], Environment.prototype, "eGridDiv", void 0);
50896 Environment = __decorate([
50897 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('environment')
50898 ], Environment);
50899 return Environment;
50900}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
50901
50902
50903
50904
50905
50906/***/ }),
50907/* 230 */
50908/***/ (function(module, __webpack_exports__, __webpack_require__) {
50909
50910"use strict";
50911__webpack_require__.r(__webpack_exports__);
50912/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerHeightService", function() { return RowContainerHeightService; });
50913/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
50914/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
50915/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24);
50916/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43);
50917/**
50918 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50919 * @version v27.3.0
50920 * @link https://www.ag-grid.com/
50921 * @license MIT
50922 */
50923var __extends = (undefined && undefined.__extends) || (function () {
50924 var extendStatics = function (d, b) {
50925 extendStatics = Object.setPrototypeOf ||
50926 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50927 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
50928 return extendStatics(d, b);
50929 };
50930 return function (d, b) {
50931 extendStatics(d, b);
50932 function __() { this.constructor = d; }
50933 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50934 };
50935})();
50936var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50937 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50938 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50939 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
50940 return c > 3 && r && Object.defineProperty(target, key, r), r;
50941};
50942var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
50943 return function (target, key) { decorator(target, key, paramIndex); }
50944};
50945
50946
50947
50948
50949/**
50950 * This class solves the 'max height' problem, where the user might want to show more data than
50951 * the max div height actually allows.
50952 */
50953var RowContainerHeightService = /** @class */ (function (_super) {
50954 __extends(RowContainerHeightService, _super);
50955 function RowContainerHeightService() {
50956 var _this = _super !== null && _super.apply(this, arguments) || this;
50957 // the scrollY position
50958 _this.scrollY = 0;
50959 // how tall the body is
50960 _this.uiBodyHeight = 0;
50961 return _this;
50962 }
50963 RowContainerHeightService.prototype.agWire = function (loggerFactory) {
50964 this.logger = loggerFactory.create("RowContainerHeightService");
50965 };
50966 RowContainerHeightService.prototype.postConstruct = function () {
50967 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_BODY_HEIGHT_CHANGED, this.updateOffset.bind(this));
50968 this.maxDivHeight = Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["getMaxDivHeight"])();
50969 this.logger.log('maxDivHeight = ' + this.maxDivHeight);
50970 };
50971 RowContainerHeightService.prototype.isStretching = function () {
50972 return this.stretching;
50973 };
50974 RowContainerHeightService.prototype.getDivStretchOffset = function () {
50975 return this.divStretchOffset;
50976 };
50977 RowContainerHeightService.prototype.updateOffset = function () {
50978 if (!this.stretching) {
50979 return;
50980 }
50981 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
50982 var newScrollY = gridBodyCon.getScrollFeature().getVScrollPosition().top;
50983 var newBodyHeight = this.getUiBodyHeight();
50984 var atLeastOneChanged = newScrollY !== this.scrollY || newBodyHeight !== this.uiBodyHeight;
50985 if (atLeastOneChanged) {
50986 this.scrollY = newScrollY;
50987 this.uiBodyHeight = newBodyHeight;
50988 this.calculateOffset();
50989 }
50990 };
50991 RowContainerHeightService.prototype.calculateOffset = function () {
50992 this.setUiContainerHeight(this.maxDivHeight);
50993 this.pixelsToShave = this.modelHeight - this.uiContainerHeight;
50994 this.maxScrollY = this.uiContainerHeight - this.uiBodyHeight;
50995 var scrollPercent = this.scrollY / this.maxScrollY;
50996 var divStretchOffset = scrollPercent * this.pixelsToShave;
50997 this.logger.log("Div Stretch Offset = " + divStretchOffset + " (" + this.pixelsToShave + " * " + scrollPercent + ")");
50998 this.setDivStretchOffset(divStretchOffset);
50999 };
51000 RowContainerHeightService.prototype.setUiContainerHeight = function (height) {
51001 if (height !== this.uiContainerHeight) {
51002 this.uiContainerHeight = height;
51003 this.eventService.dispatchEvent({ type: _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_CONTAINER_HEIGHT_CHANGED });
51004 }
51005 };
51006 RowContainerHeightService.prototype.clearOffset = function () {
51007 this.setUiContainerHeight(this.modelHeight);
51008 this.pixelsToShave = 0;
51009 this.setDivStretchOffset(0);
51010 };
51011 RowContainerHeightService.prototype.setDivStretchOffset = function (newOffset) {
51012 // because we are talking pixels, no point in confusing things with half numbers
51013 var newOffsetFloor = typeof newOffset === 'number' ? Math.floor(newOffset) : null;
51014 if (this.divStretchOffset === newOffsetFloor) {
51015 return;
51016 }
51017 this.divStretchOffset = newOffsetFloor;
51018 this.eventService.dispatchEvent({ type: _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_HEIGHT_SCALE_CHANGED });
51019 };
51020 RowContainerHeightService.prototype.setModelHeight = function (modelHeight) {
51021 this.modelHeight = modelHeight;
51022 this.stretching = modelHeight != null // null happens when in print layout
51023 && this.maxDivHeight > 0
51024 && modelHeight > this.maxDivHeight;
51025 if (this.stretching) {
51026 this.calculateOffset();
51027 }
51028 else {
51029 this.clearOffset();
51030 }
51031 };
51032 RowContainerHeightService.prototype.getUiContainerHeight = function () {
51033 return this.uiContainerHeight;
51034 };
51035 RowContainerHeightService.prototype.getRealPixelPosition = function (modelPixel) {
51036 return modelPixel - this.divStretchOffset;
51037 };
51038 RowContainerHeightService.prototype.getUiBodyHeight = function () {
51039 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
51040 var pos = gridBodyCon.getScrollFeature().getVScrollPosition();
51041 return pos.bottom - pos.top;
51042 };
51043 RowContainerHeightService.prototype.getScrollPositionForPixel = function (rowTop) {
51044 if (this.pixelsToShave <= 0) {
51045 return rowTop;
51046 }
51047 var modelMaxScroll = this.modelHeight - this.getUiBodyHeight();
51048 var scrollPercent = rowTop / modelMaxScroll;
51049 var scrollPixel = this.maxScrollY * scrollPercent;
51050 return scrollPixel;
51051 };
51052 __decorate([
51053 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
51054 ], RowContainerHeightService.prototype, "ctrlsService", void 0);
51055 __decorate([
51056 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Qualifier"])("loggerFactory"))
51057 ], RowContainerHeightService.prototype, "agWire", null);
51058 __decorate([
51059 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
51060 ], RowContainerHeightService.prototype, "postConstruct", null);
51061 RowContainerHeightService = __decorate([
51062 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('rowContainerHeightService')
51063 ], RowContainerHeightService);
51064 return RowContainerHeightService;
51065}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
51066
51067
51068
51069
51070
51071/***/ }),
51072/* 231 */
51073/***/ (function(module, __webpack_exports__, __webpack_require__) {
51074
51075"use strict";
51076__webpack_require__.r(__webpack_exports__);
51077/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectableService", function() { return SelectableService; });
51078/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
51079/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
51080/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
51081/**
51082 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
51083 * @version v27.3.0
51084 * @link https://www.ag-grid.com/
51085 * @license MIT
51086 */
51087var __extends = (undefined && undefined.__extends) || (function () {
51088 var extendStatics = function (d, b) {
51089 extendStatics = Object.setPrototypeOf ||
51090 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51091 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
51092 return extendStatics(d, b);
51093 };
51094 return function (d, b) {
51095 extendStatics(d, b);
51096 function __() { this.constructor = d; }
51097 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51098 };
51099})();
51100var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
51101 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
51102 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51103 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
51104 return c > 3 && r && Object.defineProperty(target, key, r), r;
51105};
51106
51107
51108
51109var SelectableService = /** @class */ (function (_super) {
51110 __extends(SelectableService, _super);
51111 function SelectableService() {
51112 return _super !== null && _super.apply(this, arguments) || this;
51113 }
51114 SelectableService.prototype.init = function () {
51115 this.groupSelectsChildren = this.gridOptionsWrapper.isGroupSelectsChildren();
51116 this.isRowSelectableFunc = this.gridOptionsWrapper.getIsRowSelectableFunc();
51117 };
51118 SelectableService.prototype.updateSelectableAfterGrouping = function (rowNode) {
51119 if (this.isRowSelectableFunc) {
51120 var nextChildrenFunc = function (node) { return node.childrenAfterGroup; };
51121 this.recurseDown(rowNode.childrenAfterGroup, nextChildrenFunc);
51122 }
51123 };
51124 SelectableService.prototype.recurseDown = function (children, nextChildrenFunc) {
51125 var _this = this;
51126 if (!children) {
51127 return;
51128 }
51129 children.forEach(function (child) {
51130 if (!child.group) {
51131 return;
51132 } // only interested in groups
51133 if (child.hasChildren()) {
51134 _this.recurseDown(nextChildrenFunc(child), nextChildrenFunc);
51135 }
51136 var rowSelectable;
51137 if (_this.groupSelectsChildren) {
51138 // have this group selectable if at least one direct child is selectable
51139 var firstSelectable = (nextChildrenFunc(child) || []).find(function (rowNode) { return rowNode.selectable === true; });
51140 rowSelectable = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(firstSelectable);
51141 }
51142 else {
51143 // directly retrieve selectable value from user callback
51144 rowSelectable = _this.isRowSelectableFunc ? _this.isRowSelectableFunc(child) : false;
51145 }
51146 child.setRowSelectable(rowSelectable);
51147 });
51148 };
51149 __decorate([
51150 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
51151 ], SelectableService.prototype, "init", null);
51152 SelectableService = __decorate([
51153 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('selectableService')
51154 ], SelectableService);
51155 return SelectableService;
51156}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
51157
51158
51159
51160
51161
51162/***/ }),
51163/* 232 */
51164/***/ (function(module, __webpack_exports__, __webpack_require__) {
51165
51166"use strict";
51167__webpack_require__.r(__webpack_exports__);
51168/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PaginationComp", function() { return PaginationComp; });
51169/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
51170/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
51171/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
51172/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
51173/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48);
51174/* harmony import */ var _utils_number__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(46);
51175/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44);
51176/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(65);
51177/**
51178 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
51179 * @version v27.3.0
51180 * @link https://www.ag-grid.com/
51181 * @license MIT
51182 */
51183var __extends = (undefined && undefined.__extends) || (function () {
51184 var extendStatics = function (d, b) {
51185 extendStatics = Object.setPrototypeOf ||
51186 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51187 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
51188 return extendStatics(d, b);
51189 };
51190 return function (d, b) {
51191 extendStatics(d, b);
51192 function __() { this.constructor = d; }
51193 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51194 };
51195})();
51196var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
51197 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
51198 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51199 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
51200 return c > 3 && r && Object.defineProperty(target, key, r), r;
51201};
51202
51203
51204
51205
51206
51207
51208
51209
51210var PaginationComp = /** @class */ (function (_super) {
51211 __extends(PaginationComp, _super);
51212 function PaginationComp() {
51213 var _this = _super.call(this) || this;
51214 _this.previousAndFirstButtonsDisabled = false;
51215 _this.nextButtonDisabled = false;
51216 _this.lastButtonDisabled = false;
51217 return _this;
51218 }
51219 PaginationComp.prototype.postConstruct = function () {
51220 var _this = this;
51221 var isRtl = this.gridOptionsWrapper.isEnableRtl();
51222 this.setTemplate(this.getTemplate());
51223 this.btFirst.insertAdjacentElement('afterbegin', Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])(isRtl ? 'last' : 'first', this.gridOptionsWrapper));
51224 this.btPrevious.insertAdjacentElement('afterbegin', Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])(isRtl ? 'next' : 'previous', this.gridOptionsWrapper));
51225 this.btNext.insertAdjacentElement('afterbegin', Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])(isRtl ? 'previous' : 'next', this.gridOptionsWrapper));
51226 this.btLast.insertAdjacentElement('afterbegin', Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])(isRtl ? 'first' : 'last', this.gridOptionsWrapper));
51227 var isPaging = this.gridOptionsWrapper.isPagination();
51228 var paginationPanelEnabled = isPaging && !this.gridOptionsWrapper.isSuppressPaginationPanel();
51229 if (!paginationPanelEnabled) {
51230 this.setDisplayed(false);
51231 return;
51232 }
51233 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_PAGINATION_CHANGED, this.onPaginationChanged.bind(this));
51234 [
51235 { el: this.btFirst, fn: this.onBtFirst.bind(this) },
51236 { el: this.btPrevious, fn: this.onBtPrevious.bind(this) },
51237 { el: this.btNext, fn: this.onBtNext.bind(this) },
51238 { el: this.btLast, fn: this.onBtLast.bind(this) }
51239 ].forEach(function (item) {
51240 var el = item.el, fn = item.fn;
51241 _this.addManagedListener(el, 'click', fn);
51242 _this.addManagedListener(el, 'keydown', function (e) {
51243 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_7__["KeyCode"].ENTER || e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_7__["KeyCode"].SPACE) {
51244 e.preventDefault();
51245 fn();
51246 }
51247 });
51248 });
51249 this.onPaginationChanged();
51250 };
51251 PaginationComp.prototype.onPaginationChanged = function () {
51252 this.enableOrDisableButtons();
51253 this.updateRowLabels();
51254 this.setCurrentPageLabel();
51255 this.setTotalLabels();
51256 };
51257 PaginationComp.prototype.onBtFirst = function () {
51258 if (!this.previousAndFirstButtonsDisabled) {
51259 this.paginationProxy.goToFirstPage();
51260 }
51261 };
51262 PaginationComp.prototype.setCurrentPageLabel = function () {
51263 var pagesExist = this.paginationProxy.getTotalPages() > 0;
51264 var currentPage = this.paginationProxy.getCurrentPage();
51265 var toDisplay = pagesExist ? currentPage + 1 : 0;
51266 this.lbCurrent.innerHTML = this.formatNumber(toDisplay);
51267 };
51268 PaginationComp.prototype.formatNumber = function (value) {
51269 var userFunc = this.gridOptionsWrapper.getPaginationNumberFormatterFunc();
51270 if (userFunc) {
51271 var params = { value: value };
51272 return userFunc(params);
51273 }
51274 var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
51275 var thousandSeparator = localeTextFunc('thousandSeparator', ',');
51276 var decimalSeparator = localeTextFunc('decimalSeparator', '.');
51277 return Object(_utils_number__WEBPACK_IMPORTED_MODULE_5__["formatNumberCommas"])(value, thousandSeparator, decimalSeparator);
51278 };
51279 PaginationComp.prototype.getTemplate = function () {
51280 var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
51281 var strPage = localeTextFunc('page', 'Page');
51282 var strTo = localeTextFunc('to', 'to');
51283 var strOf = localeTextFunc('of', 'of');
51284 var strFirst = localeTextFunc('firstPage', 'First Page');
51285 var strPrevious = localeTextFunc('previousPage', 'Previous Page');
51286 var strNext = localeTextFunc('nextPage', 'Next Page');
51287 var strLast = localeTextFunc('lastPage', 'Last Page');
51288 var compId = this.getCompId();
51289 return /* html */ "<div class=\"ag-paging-panel ag-unselectable\" id=\"ag-" + compId + "\">\n <span class=\"ag-paging-row-summary-panel\" role=\"status\">\n <span id=\"ag-" + compId + "-first-row\" ref=\"lbFirstRowOnPage\" class=\"ag-paging-row-summary-panel-number\"></span>\n <span id=\"ag-" + compId + "-to\">" + strTo + "</span>\n <span id=\"ag-" + compId + "-last-row\" ref=\"lbLastRowOnPage\" class=\"ag-paging-row-summary-panel-number\"></span>\n <span id=\"ag-" + compId + "-of\">" + strOf + "</span>\n <span id=\"ag-" + compId + "-row-count\" ref=\"lbRecordCount\" class=\"ag-paging-row-summary-panel-number\"></span>\n </span>\n <span class=\"ag-paging-page-summary-panel\" role=\"presentation\">\n <div ref=\"btFirst\" class=\"ag-paging-button\" role=\"button\" aria-label=\"" + strFirst + "\"></div>\n <div ref=\"btPrevious\" class=\"ag-paging-button\" role=\"button\" aria-label=\"" + strPrevious + "\"></div>\n <span class=\"ag-paging-description\" role=\"status\">\n <span id=\"ag-" + compId + "-start-page\">" + strPage + "</span>\n <span id=\"ag-" + compId + "-start-page-number\" ref=\"lbCurrent\" class=\"ag-paging-number\"></span>\n <span id=\"ag-" + compId + "-of-page\">" + strOf + "</span>\n <span id=\"ag-" + compId + "-of-page-number\" ref=\"lbTotal\" class=\"ag-paging-number\"></span>\n </span>\n <div ref=\"btNext\" class=\"ag-paging-button\" role=\"button\" aria-label=\"" + strNext + "\"></div>\n <div ref=\"btLast\" class=\"ag-paging-button\" role=\"button\" aria-label=\"" + strLast + "\"></div>\n </span>\n </div>";
51290 };
51291 PaginationComp.prototype.onBtNext = function () {
51292 if (!this.nextButtonDisabled) {
51293 this.paginationProxy.goToNextPage();
51294 }
51295 };
51296 PaginationComp.prototype.onBtPrevious = function () {
51297 if (!this.previousAndFirstButtonsDisabled) {
51298 this.paginationProxy.goToPreviousPage();
51299 }
51300 };
51301 PaginationComp.prototype.onBtLast = function () {
51302 if (!this.lastButtonDisabled) {
51303 this.paginationProxy.goToLastPage();
51304 }
51305 };
51306 PaginationComp.prototype.enableOrDisableButtons = function () {
51307 var currentPage = this.paginationProxy.getCurrentPage();
51308 var maxRowFound = this.paginationProxy.isLastPageFound();
51309 var totalPages = this.paginationProxy.getTotalPages();
51310 this.previousAndFirstButtonsDisabled = currentPage === 0;
51311 this.toggleButtonDisabled(this.btFirst, this.previousAndFirstButtonsDisabled);
51312 this.toggleButtonDisabled(this.btPrevious, this.previousAndFirstButtonsDisabled);
51313 var zeroPagesToDisplay = this.isZeroPagesToDisplay();
51314 var onLastPage = maxRowFound && currentPage === (totalPages - 1);
51315 this.nextButtonDisabled = onLastPage || zeroPagesToDisplay;
51316 this.lastButtonDisabled = !maxRowFound || zeroPagesToDisplay || currentPage === (totalPages - 1);
51317 this.toggleButtonDisabled(this.btNext, this.nextButtonDisabled);
51318 this.toggleButtonDisabled(this.btLast, this.lastButtonDisabled);
51319 };
51320 PaginationComp.prototype.toggleButtonDisabled = function (button, disabled) {
51321 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_6__["setAriaDisabled"])(button, disabled);
51322 button.classList.toggle('ag-disabled', disabled);
51323 if (disabled) {
51324 button.removeAttribute('tabindex');
51325 }
51326 else {
51327 button.setAttribute('tabindex', '0');
51328 }
51329 };
51330 PaginationComp.prototype.updateRowLabels = function () {
51331 var currentPage = this.paginationProxy.getCurrentPage();
51332 var pageSize = this.paginationProxy.getPageSize();
51333 var maxRowFound = this.paginationProxy.isLastPageFound();
51334 var rowCount = this.paginationProxy.isLastPageFound() ?
51335 this.paginationProxy.getMasterRowCount() : null;
51336 var startRow;
51337 var endRow;
51338 if (this.isZeroPagesToDisplay()) {
51339 startRow = endRow = 0;
51340 }
51341 else {
51342 startRow = (pageSize * currentPage) + 1;
51343 endRow = startRow + pageSize - 1;
51344 if (maxRowFound && endRow > rowCount) {
51345 endRow = rowCount;
51346 }
51347 }
51348 this.lbFirstRowOnPage.innerHTML = this.formatNumber(startRow);
51349 if (this.rowNodeBlockLoader.isLoading()) {
51350 this.lbLastRowOnPage.innerHTML = '?';
51351 }
51352 else {
51353 this.lbLastRowOnPage.innerHTML = this.formatNumber(endRow);
51354 }
51355 };
51356 PaginationComp.prototype.isZeroPagesToDisplay = function () {
51357 var maxRowFound = this.paginationProxy.isLastPageFound();
51358 var totalPages = this.paginationProxy.getTotalPages();
51359 return maxRowFound && totalPages === 0;
51360 };
51361 PaginationComp.prototype.setTotalLabels = function () {
51362 var lastPageFound = this.paginationProxy.isLastPageFound();
51363 var totalPages = this.paginationProxy.getTotalPages();
51364 var rowCount = lastPageFound ? this.paginationProxy.getMasterRowCount() : null;
51365 // When `pivotMode=true` and no grouping or value columns exist, a single 'hidden' group row (root node) is in
51366 // the grid and the pagination totals will correctly display total = 1. However this is confusing to users as
51367 // they can't see it. To address this UX issue we simply set the totals to zero in the pagination panel.
51368 if (rowCount === 1) {
51369 var firstRow = this.paginationProxy.getRow(0);
51370 // a group node with no group or agg data will not be visible to users
51371 var hiddenGroupRow = firstRow && firstRow.group && !(firstRow.groupData || firstRow.aggData);
51372 if (hiddenGroupRow) {
51373 this.setTotalLabelsToZero();
51374 return;
51375 }
51376 }
51377 if (lastPageFound) {
51378 this.lbTotal.innerHTML = this.formatNumber(totalPages);
51379 this.lbRecordCount.innerHTML = this.formatNumber(rowCount);
51380 }
51381 else {
51382 var moreText = this.gridOptionsWrapper.getLocaleTextFunc()('more', 'more');
51383 this.lbTotal.innerHTML = moreText;
51384 this.lbRecordCount.innerHTML = moreText;
51385 }
51386 };
51387 PaginationComp.prototype.setTotalLabelsToZero = function () {
51388 this.lbFirstRowOnPage.innerHTML = this.formatNumber(0);
51389 this.lbCurrent.innerHTML = this.formatNumber(0);
51390 this.lbLastRowOnPage.innerHTML = this.formatNumber(0);
51391 this.lbTotal.innerHTML = this.formatNumber(0);
51392 this.lbRecordCount.innerHTML = this.formatNumber(0);
51393 };
51394 __decorate([
51395 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('paginationProxy')
51396 ], PaginationComp.prototype, "paginationProxy", void 0);
51397 __decorate([
51398 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowNodeBlockLoader')
51399 ], PaginationComp.prototype, "rowNodeBlockLoader", void 0);
51400 __decorate([
51401 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('btFirst')
51402 ], PaginationComp.prototype, "btFirst", void 0);
51403 __decorate([
51404 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('btPrevious')
51405 ], PaginationComp.prototype, "btPrevious", void 0);
51406 __decorate([
51407 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('btNext')
51408 ], PaginationComp.prototype, "btNext", void 0);
51409 __decorate([
51410 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('btLast')
51411 ], PaginationComp.prototype, "btLast", void 0);
51412 __decorate([
51413 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('lbRecordCount')
51414 ], PaginationComp.prototype, "lbRecordCount", void 0);
51415 __decorate([
51416 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('lbFirstRowOnPage')
51417 ], PaginationComp.prototype, "lbFirstRowOnPage", void 0);
51418 __decorate([
51419 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('lbLastRowOnPage')
51420 ], PaginationComp.prototype, "lbLastRowOnPage", void 0);
51421 __decorate([
51422 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('lbCurrent')
51423 ], PaginationComp.prototype, "lbCurrent", void 0);
51424 __decorate([
51425 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('lbTotal')
51426 ], PaginationComp.prototype, "lbTotal", void 0);
51427 __decorate([
51428 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
51429 ], PaginationComp.prototype, "postConstruct", null);
51430 return PaginationComp;
51431}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
51432
51433
51434
51435
51436
51437/***/ }),
51438/* 233 */
51439/***/ (function(module, __webpack_exports__, __webpack_require__) {
51440
51441"use strict";
51442__webpack_require__.r(__webpack_exports__);
51443/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayWrapperComponent", function() { return OverlayWrapperComponent; });
51444/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
51445/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36);
51446/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
51447/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
51448/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(111);
51449/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24);
51450/**
51451 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
51452 * @version v27.3.0
51453 * @link https://www.ag-grid.com/
51454 * @license MIT
51455 */
51456var __extends = (undefined && undefined.__extends) || (function () {
51457 var extendStatics = function (d, b) {
51458 extendStatics = Object.setPrototypeOf ||
51459 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51460 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
51461 return extendStatics(d, b);
51462 };
51463 return function (d, b) {
51464 extendStatics(d, b);
51465 function __() { this.constructor = d; }
51466 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51467 };
51468})();
51469var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
51470 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
51471 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51472 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
51473 return c > 3 && r && Object.defineProperty(target, key, r), r;
51474};
51475
51476
51477
51478
51479
51480
51481var LoadingType;
51482(function (LoadingType) {
51483 LoadingType[LoadingType["Loading"] = 0] = "Loading";
51484 LoadingType[LoadingType["NoRows"] = 1] = "NoRows";
51485})(LoadingType || (LoadingType = {}));
51486var OverlayWrapperComponent = /** @class */ (function (_super) {
51487 __extends(OverlayWrapperComponent, _super);
51488 function OverlayWrapperComponent() {
51489 var _this = _super.call(this, OverlayWrapperComponent.TEMPLATE) || this;
51490 _this.inProgress = false;
51491 _this.destroyRequested = false;
51492 _this.manuallyDisplayed = false;
51493 return _this;
51494 }
51495 OverlayWrapperComponent.prototype.updateLayoutClasses = function (cssClass, params) {
51496 var overlayWrapperClassList = this.eOverlayWrapper.classList;
51497 overlayWrapperClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__["LayoutCssClasses"].AUTO_HEIGHT, params.autoHeight);
51498 overlayWrapperClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__["LayoutCssClasses"].NORMAL, params.normal);
51499 overlayWrapperClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__["LayoutCssClasses"].PRINT, params.print);
51500 };
51501 OverlayWrapperComponent.prototype.postConstruct = function () {
51502 this.createManagedBean(new _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__["LayoutFeature"](this));
51503 this.setDisplayed(false);
51504 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_ROW_DATA_CHANGED, this.onRowDataChanged.bind(this));
51505 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_ROW_DATA_UPDATED, this.onRowDataChanged.bind(this));
51506 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));
51507 if (this.gridOptionsWrapper.isRowModelDefault() && !this.gridOptionsWrapper.getRowData()) {
51508 this.showLoadingOverlay();
51509 }
51510 this.gridApi.registerOverlayWrapperComp(this);
51511 };
51512 OverlayWrapperComponent.prototype.setWrapperTypeClass = function (loadingType) {
51513 var overlayWrapperClassList = this.eOverlayWrapper.classList;
51514 overlayWrapperClassList.toggle('ag-overlay-loading-wrapper', loadingType === LoadingType.Loading);
51515 overlayWrapperClassList.toggle('ag-overlay-no-rows-wrapper', loadingType === LoadingType.NoRows);
51516 };
51517 OverlayWrapperComponent.prototype.showLoadingOverlay = function () {
51518 if (this.gridOptionsWrapper.isSuppressLoadingOverlay()) {
51519 return;
51520 }
51521 var params = {};
51522 var compDetails = this.userComponentFactory.getLoadingOverlayCompDetails(params);
51523 var promise = compDetails.newAgStackInstance();
51524 this.showOverlay(promise, LoadingType.Loading);
51525 };
51526 OverlayWrapperComponent.prototype.showNoRowsOverlay = function () {
51527 if (this.gridOptionsWrapper.isSuppressNoRowsOverlay()) {
51528 return;
51529 }
51530 var params = {};
51531 var compDetails = this.userComponentFactory.getNoRowsOverlayCompDetails(params);
51532 var promise = compDetails.newAgStackInstance();
51533 this.showOverlay(promise, LoadingType.NoRows);
51534 };
51535 OverlayWrapperComponent.prototype.showOverlay = function (workItem, type) {
51536 var _this = this;
51537 if (this.inProgress) {
51538 return;
51539 }
51540 this.setWrapperTypeClass(type);
51541 this.destroyActiveOverlay();
51542 this.inProgress = true;
51543 if (workItem) {
51544 workItem.then(function (comp) {
51545 _this.inProgress = false;
51546 _this.eOverlayWrapper.appendChild(comp.getGui());
51547 _this.activeOverlay = comp;
51548 if (_this.destroyRequested) {
51549 _this.destroyRequested = false;
51550 _this.destroyActiveOverlay();
51551 }
51552 });
51553 }
51554 this.manuallyDisplayed = this.columnModel.isReady() && !this.paginationProxy.isEmpty();
51555 this.setDisplayed(true);
51556 };
51557 OverlayWrapperComponent.prototype.destroyActiveOverlay = function () {
51558 if (this.inProgress) {
51559 this.destroyRequested = true;
51560 return;
51561 }
51562 if (!this.activeOverlay) {
51563 return;
51564 }
51565 this.activeOverlay = this.getContext().destroyBean(this.activeOverlay);
51566 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["clearElement"])(this.eOverlayWrapper);
51567 };
51568 OverlayWrapperComponent.prototype.hideOverlay = function () {
51569 this.manuallyDisplayed = false;
51570 this.destroyActiveOverlay();
51571 this.setDisplayed(false);
51572 };
51573 OverlayWrapperComponent.prototype.destroy = function () {
51574 this.destroyActiveOverlay();
51575 _super.prototype.destroy.call(this);
51576 };
51577 OverlayWrapperComponent.prototype.showOrHideOverlay = function () {
51578 var isEmpty = this.paginationProxy.isEmpty();
51579 var isSuppressNoRowsOverlay = this.gridOptionsWrapper.isSuppressNoRowsOverlay();
51580 if (isEmpty && !isSuppressNoRowsOverlay) {
51581 this.showNoRowsOverlay();
51582 }
51583 else {
51584 this.hideOverlay();
51585 }
51586 };
51587 OverlayWrapperComponent.prototype.onRowDataChanged = function () {
51588 this.showOrHideOverlay();
51589 };
51590 OverlayWrapperComponent.prototype.onNewColumnsLoaded = function () {
51591 // hide overlay if columns and rows exist, this can happen if columns are loaded after data.
51592 // this problem exists before of the race condition between the services (column controller in this case)
51593 // and the view (grid panel). if the model beans were all initialised first, and then the view beans second,
51594 // this race condition would not happen.
51595 if (this.columnModel.isReady() && !this.paginationProxy.isEmpty() && !this.manuallyDisplayed) {
51596 this.hideOverlay();
51597 }
51598 };
51599 // wrapping in outer div, and wrapper, is needed to center the loading icon
51600 // The idea for centering came from here: http://www.vanseodesign.com/css/vertical-centering/
51601 OverlayWrapperComponent.TEMPLATE = "\n <div class=\"ag-overlay\" aria-hidden=\"true\">\n <div class=\"ag-overlay-panel\">\n <div class=\"ag-overlay-wrapper\" ref=\"eOverlayWrapper\"></div>\n </div>\n </div>";
51602 __decorate([
51603 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('userComponentFactory')
51604 ], OverlayWrapperComponent.prototype, "userComponentFactory", void 0);
51605 __decorate([
51606 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
51607 ], OverlayWrapperComponent.prototype, "paginationProxy", void 0);
51608 __decorate([
51609 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
51610 ], OverlayWrapperComponent.prototype, "gridApi", void 0);
51611 __decorate([
51612 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
51613 ], OverlayWrapperComponent.prototype, "columnModel", void 0);
51614 __decorate([
51615 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('eOverlayWrapper')
51616 ], OverlayWrapperComponent.prototype, "eOverlayWrapper", void 0);
51617 __decorate([
51618 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
51619 ], OverlayWrapperComponent.prototype, "postConstruct", null);
51620 return OverlayWrapperComponent;
51621}(_widgets_component__WEBPACK_IMPORTED_MODULE_1__["Component"]));
51622
51623
51624
51625
51626
51627/***/ }),
51628/* 234 */
51629/***/ (function(module, __webpack_exports__, __webpack_require__) {
51630
51631"use strict";
51632__webpack_require__.r(__webpack_exports__);
51633/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowPositionUtils", function() { return RowPositionUtils; });
51634/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
51635/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
51636/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
51637/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
51638/**
51639 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
51640 * @version v27.3.0
51641 * @link https://www.ag-grid.com/
51642 * @license MIT
51643 */
51644var __extends = (undefined && undefined.__extends) || (function () {
51645 var extendStatics = function (d, b) {
51646 extendStatics = Object.setPrototypeOf ||
51647 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51648 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
51649 return extendStatics(d, b);
51650 };
51651 return function (d, b) {
51652 extendStatics(d, b);
51653 function __() { this.constructor = d; }
51654 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51655 };
51656})();
51657var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
51658 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
51659 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51660 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
51661 return c > 3 && r && Object.defineProperty(target, key, r), r;
51662};
51663
51664
51665
51666
51667var RowPositionUtils = /** @class */ (function (_super) {
51668 __extends(RowPositionUtils, _super);
51669 function RowPositionUtils() {
51670 return _super !== null && _super.apply(this, arguments) || this;
51671 }
51672 RowPositionUtils.prototype.getFirstRow = function () {
51673 var rowIndex = 0;
51674 var rowPinned;
51675 if (this.pinnedRowModel.getPinnedTopRowCount()) {
51676 rowPinned = _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP;
51677 }
51678 else if (this.rowModel.getRowCount()) {
51679 rowPinned = null;
51680 rowIndex = this.paginationProxy.getPageFirstRow();
51681 }
51682 else if (this.pinnedRowModel.getPinnedBottomRowCount()) {
51683 rowPinned = _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM;
51684 }
51685 return rowPinned === undefined ? null : { rowIndex: rowIndex, rowPinned: rowPinned };
51686 };
51687 RowPositionUtils.prototype.getLastRow = function () {
51688 var rowIndex;
51689 var rowPinned = null;
51690 var pinnedBottomCount = this.pinnedRowModel.getPinnedBottomRowCount();
51691 var pinnedTopCount = this.pinnedRowModel.getPinnedTopRowCount();
51692 if (pinnedBottomCount) {
51693 rowPinned = _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM;
51694 rowIndex = pinnedBottomCount - 1;
51695 }
51696 else if (this.rowModel.getRowCount()) {
51697 rowPinned = null;
51698 rowIndex = this.paginationProxy.getPageLastRow();
51699 }
51700 else if (pinnedTopCount) {
51701 rowPinned = _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP;
51702 rowIndex = pinnedTopCount - 1;
51703 }
51704 return rowIndex === undefined ? null : { rowIndex: rowIndex, rowPinned: rowPinned };
51705 };
51706 RowPositionUtils.prototype.getRowNode = function (gridRow) {
51707 switch (gridRow.rowPinned) {
51708 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP:
51709 return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];
51710 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM:
51711 return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];
51712 default:
51713 return this.rowModel.getRow(gridRow.rowIndex);
51714 }
51715 };
51716 RowPositionUtils.prototype.sameRow = function (rowA, rowB) {
51717 // if both missing
51718 if (!rowA && !rowB) {
51719 return true;
51720 }
51721 // if only one missing
51722 if ((rowA && !rowB) || (!rowA && rowB)) {
51723 return false;
51724 }
51725 // otherwise compare (use == to compare rowPinned because it can be null or undefined)
51726 return rowA.rowIndex === rowB.rowIndex && rowA.rowPinned == rowB.rowPinned;
51727 };
51728 // tests if this row selection is before the other row selection
51729 RowPositionUtils.prototype.before = function (rowA, rowB) {
51730 switch (rowA.rowPinned) {
51731 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP:
51732 // we we are floating top, and other isn't, then we are always before
51733 if (rowB.rowPinned !== _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP) {
51734 return true;
51735 }
51736 break;
51737 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM:
51738 // if we are floating bottom, and the other isn't, then we are never before
51739 if (rowB.rowPinned !== _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_BOTTOM) {
51740 return false;
51741 }
51742 break;
51743 default:
51744 // if we are not floating, but the other one is floating...
51745 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(rowB.rowPinned)) {
51746 return rowB.rowPinned !== _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_TOP;
51747 }
51748 break;
51749 }
51750 return rowA.rowIndex < rowB.rowIndex;
51751 };
51752 __decorate([
51753 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
51754 ], RowPositionUtils.prototype, "rowModel", void 0);
51755 __decorate([
51756 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedRowModel')
51757 ], RowPositionUtils.prototype, "pinnedRowModel", void 0);
51758 __decorate([
51759 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
51760 ], RowPositionUtils.prototype, "paginationProxy", void 0);
51761 RowPositionUtils = __decorate([
51762 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('rowPositionUtils')
51763 ], RowPositionUtils);
51764 return RowPositionUtils;
51765}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
51766
51767
51768
51769
51770
51771/***/ }),
51772/* 235 */
51773/***/ (function(module, __webpack_exports__, __webpack_require__) {
51774
51775"use strict";
51776__webpack_require__.r(__webpack_exports__);
51777/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellPositionUtils", function() { return CellPositionUtils; });
51778/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
51779/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
51780/**
51781 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
51782 * @version v27.3.0
51783 * @link https://www.ag-grid.com/
51784 * @license MIT
51785 */
51786var __extends = (undefined && undefined.__extends) || (function () {
51787 var extendStatics = function (d, b) {
51788 extendStatics = Object.setPrototypeOf ||
51789 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51790 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
51791 return extendStatics(d, b);
51792 };
51793 return function (d, b) {
51794 extendStatics(d, b);
51795 function __() { this.constructor = d; }
51796 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51797 };
51798})();
51799var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
51800 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
51801 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51802 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
51803 return c > 3 && r && Object.defineProperty(target, key, r), r;
51804};
51805
51806
51807var CellPositionUtils = /** @class */ (function (_super) {
51808 __extends(CellPositionUtils, _super);
51809 function CellPositionUtils() {
51810 return _super !== null && _super.apply(this, arguments) || this;
51811 }
51812 CellPositionUtils.prototype.createId = function (cellPosition) {
51813 var rowIndex = cellPosition.rowIndex, rowPinned = cellPosition.rowPinned, column = cellPosition.column;
51814 return this.createIdFromValues(rowIndex, column, rowPinned);
51815 };
51816 CellPositionUtils.prototype.createIdFromValues = function (rowIndex, column, rowPinned) {
51817 return rowIndex + "." + (rowPinned == null ? 'null' : rowPinned) + "." + column.getId();
51818 };
51819 CellPositionUtils.prototype.equals = function (cellA, cellB) {
51820 var colsMatch = cellA.column === cellB.column;
51821 var floatingMatch = cellA.rowPinned === cellB.rowPinned;
51822 var indexMatch = cellA.rowIndex === cellB.rowIndex;
51823 return colsMatch && floatingMatch && indexMatch;
51824 };
51825 CellPositionUtils = __decorate([
51826 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('cellPositionUtils')
51827 ], CellPositionUtils);
51828 return CellPositionUtils;
51829}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
51830
51831
51832
51833
51834
51835/***/ }),
51836/* 236 */
51837/***/ (function(module, __webpack_exports__, __webpack_require__) {
51838
51839"use strict";
51840__webpack_require__.r(__webpack_exports__);
51841/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UndoRedoService", function() { return UndoRedoService; });
51842/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
51843/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24);
51844/* harmony import */ var _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(237);
51845/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
51846/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16);
51847/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
51848/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20);
51849/**
51850 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
51851 * @version v27.3.0
51852 * @link https://www.ag-grid.com/
51853 * @license MIT
51854 */
51855var __extends = (undefined && undefined.__extends) || (function () {
51856 var extendStatics = function (d, b) {
51857 extendStatics = Object.setPrototypeOf ||
51858 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51859 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
51860 return extendStatics(d, b);
51861 };
51862 return function (d, b) {
51863 extendStatics(d, b);
51864 function __() { this.constructor = d; }
51865 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51866 };
51867})();
51868var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
51869 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
51870 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51871 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
51872 return c > 3 && r && Object.defineProperty(target, key, r), r;
51873};
51874
51875
51876
51877
51878
51879
51880
51881var UndoRedoService = /** @class */ (function (_super) {
51882 __extends(UndoRedoService, _super);
51883 function UndoRedoService() {
51884 var _this = _super !== null && _super.apply(this, arguments) || this;
51885 _this.cellValueChanges = [];
51886 _this.activeCellEdit = null;
51887 _this.activeRowEdit = null;
51888 _this.isPasting = false;
51889 _this.isFilling = false;
51890 _this.onCellValueChanged = function (event) {
51891 var eventCell = { column: event.column, rowIndex: event.rowIndex, rowPinned: event.rowPinned };
51892 var isCellEditing = _this.activeCellEdit !== null && _this.cellPositionUtils.equals(_this.activeCellEdit, eventCell);
51893 var isRowEditing = _this.activeRowEdit !== null && _this.rowPositionUtils.sameRow(_this.activeRowEdit, eventCell);
51894 var shouldCaptureAction = isCellEditing || isRowEditing || _this.isPasting || _this.isFilling;
51895 if (!shouldCaptureAction) {
51896 return;
51897 }
51898 var rowPinned = event.rowPinned, rowIndex = event.rowIndex, column = event.column, oldValue = event.oldValue, value = event.value;
51899 var cellValueChange = {
51900 rowPinned: rowPinned,
51901 rowIndex: rowIndex,
51902 columnId: column.getColId(),
51903 newValue: value,
51904 oldValue: oldValue
51905 };
51906 _this.cellValueChanges.push(cellValueChange);
51907 };
51908 _this.clearStacks = function () {
51909 _this.undoStack.clear();
51910 _this.redoStack.clear();
51911 };
51912 return _this;
51913 }
51914 UndoRedoService.prototype.init = function () {
51915 if (!this.gridOptionsWrapper.isUndoRedoCellEditing()) {
51916 return;
51917 }
51918 var undoRedoLimit = this.gridOptionsWrapper.getUndoRedoCellEditingLimit();
51919 if (undoRedoLimit <= 0) {
51920 return;
51921 }
51922 this.undoStack = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["UndoRedoStack"](undoRedoLimit);
51923 this.redoStack = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["UndoRedoStack"](undoRedoLimit);
51924 this.addRowEditingListeners();
51925 this.addCellEditingListeners();
51926 this.addPasteListeners();
51927 this.addFillListeners();
51928 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_VALUE_CHANGED, this.onCellValueChanged);
51929 // undo / redo is restricted to actual editing so we clear the stacks when other operations are
51930 // performed that change the order of the row / cols.
51931 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_MODEL_UPDATED, this.clearStacks);
51932 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED, this.clearStacks);
51933 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_NEW_COLUMNS_LOADED, this.clearStacks);
51934 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_GROUP_OPENED, this.clearStacks);
51935 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, this.clearStacks);
51936 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_MOVED, this.clearStacks);
51937 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_PINNED, this.clearStacks);
51938 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_VISIBLE, this.clearStacks);
51939 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_ROW_DRAG_END, this.clearStacks);
51940 };
51941 UndoRedoService.prototype.getCurrentUndoStackSize = function () {
51942 return this.undoStack ? this.undoStack.getCurrentStackSize() : 0;
51943 };
51944 UndoRedoService.prototype.getCurrentRedoStackSize = function () {
51945 return this.redoStack ? this.redoStack.getCurrentStackSize() : 0;
51946 };
51947 UndoRedoService.prototype.undo = function () {
51948 if (!this.undoStack) {
51949 return;
51950 }
51951 var undoAction = this.undoStack.pop();
51952 if (!undoAction || !undoAction.cellValueChanges) {
51953 return;
51954 }
51955 this.processAction(undoAction, function (cellValueChange) { return cellValueChange.oldValue; });
51956 if (undoAction instanceof _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["FillUndoRedoAction"]) {
51957 this.processRangeAndCellFocus(undoAction.cellValueChanges, undoAction.initialRange);
51958 }
51959 else {
51960 this.processRangeAndCellFocus(undoAction.cellValueChanges);
51961 }
51962 this.redoStack.push(undoAction);
51963 };
51964 UndoRedoService.prototype.redo = function () {
51965 if (!this.redoStack) {
51966 return;
51967 }
51968 var redoAction = this.redoStack.pop();
51969 if (!redoAction || !redoAction.cellValueChanges) {
51970 return;
51971 }
51972 this.processAction(redoAction, function (cellValueChange) { return cellValueChange.newValue; });
51973 if (redoAction instanceof _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["FillUndoRedoAction"]) {
51974 this.processRangeAndCellFocus(redoAction.cellValueChanges, redoAction.finalRange);
51975 }
51976 else {
51977 this.processRangeAndCellFocus(redoAction.cellValueChanges);
51978 }
51979 this.undoStack.push(redoAction);
51980 };
51981 UndoRedoService.prototype.processAction = function (action, valueExtractor) {
51982 var _this = this;
51983 action.cellValueChanges.forEach(function (cellValueChange) {
51984 var rowIndex = cellValueChange.rowIndex, rowPinned = cellValueChange.rowPinned, columnId = cellValueChange.columnId;
51985 var rowPosition = { rowIndex: rowIndex, rowPinned: rowPinned };
51986 var currentRow = _this.getRowNode(rowPosition);
51987 // checks if the row has been filtered out
51988 if (!currentRow.displayed) {
51989 return;
51990 }
51991 currentRow.setDataValue(columnId, valueExtractor(cellValueChange));
51992 });
51993 };
51994 UndoRedoService.prototype.processRangeAndCellFocus = function (cellValueChanges, range) {
51995 var lastFocusedCell;
51996 if (range) {
51997 var startRow = range.startRow;
51998 var endRow = range.endRow;
51999 lastFocusedCell = {
52000 rowPinned: startRow.rowPinned,
52001 rowIndex: startRow.rowIndex,
52002 columnId: range.startColumn.getColId()
52003 };
52004 this.setLastFocusedCell(lastFocusedCell);
52005 var cellRangeParams = {
52006 rowStartIndex: startRow.rowIndex,
52007 rowStartPinned: startRow.rowPinned,
52008 rowEndIndex: endRow.rowIndex,
52009 rowEndPinned: endRow.rowPinned,
52010 columnStart: range.startColumn,
52011 columns: range.columns
52012 };
52013 this.gridApi.addCellRange(cellRangeParams);
52014 return;
52015 }
52016 var cellValueChange = cellValueChanges[0];
52017 var rowIndex = cellValueChange.rowIndex, rowPinned = cellValueChange.rowPinned;
52018 var rowPosition = { rowIndex: rowIndex, rowPinned: rowPinned };
52019 var row = this.getRowNode(rowPosition);
52020 lastFocusedCell = {
52021 rowPinned: cellValueChange.rowPinned,
52022 rowIndex: row.rowIndex,
52023 columnId: cellValueChange.columnId
52024 };
52025 this.setLastFocusedCell(lastFocusedCell);
52026 };
52027 UndoRedoService.prototype.setLastFocusedCell = function (lastFocusedCell) {
52028 var rowIndex = lastFocusedCell.rowIndex, columnId = lastFocusedCell.columnId, rowPinned = lastFocusedCell.rowPinned;
52029 this.gridApi.ensureIndexVisible(rowIndex);
52030 this.gridApi.ensureColumnVisible(columnId);
52031 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].RangeSelectionModule)) {
52032 this.gridApi.clearRangeSelection();
52033 }
52034 this.focusService.setFocusedCell(rowIndex, columnId, rowPinned, true);
52035 };
52036 UndoRedoService.prototype.addRowEditingListeners = function () {
52037 var _this = this;
52038 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_ROW_EDITING_STARTED, function (e) {
52039 _this.activeRowEdit = { rowIndex: e.rowIndex, rowPinned: e.rowPinned };
52040 });
52041 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_ROW_EDITING_STOPPED, function () {
52042 var action = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["UndoRedoAction"](_this.cellValueChanges);
52043 _this.pushActionsToUndoStack(action);
52044 _this.activeRowEdit = null;
52045 });
52046 };
52047 UndoRedoService.prototype.addCellEditingListeners = function () {
52048 var _this = this;
52049 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_EDITING_STARTED, function (e) {
52050 _this.activeCellEdit = { column: e.column, rowIndex: e.rowIndex, rowPinned: e.rowPinned };
52051 });
52052 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_EDITING_STOPPED, function () {
52053 _this.activeCellEdit = null;
52054 var shouldPushAction = !_this.activeRowEdit && !_this.isPasting && !_this.isFilling;
52055 if (shouldPushAction) {
52056 var action = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["UndoRedoAction"](_this.cellValueChanges);
52057 _this.pushActionsToUndoStack(action);
52058 }
52059 });
52060 };
52061 UndoRedoService.prototype.addPasteListeners = function () {
52062 var _this = this;
52063 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PASTE_START, function () {
52064 _this.isPasting = true;
52065 });
52066 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PASTE_END, function () {
52067 var action = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["UndoRedoAction"](_this.cellValueChanges);
52068 _this.pushActionsToUndoStack(action);
52069 _this.isPasting = false;
52070 });
52071 };
52072 UndoRedoService.prototype.addFillListeners = function () {
52073 var _this = this;
52074 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_FILL_START, function () {
52075 _this.isFilling = true;
52076 });
52077 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_FILL_END, function (event) {
52078 var action = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["FillUndoRedoAction"](_this.cellValueChanges, event.initialRange, event.finalRange);
52079 _this.pushActionsToUndoStack(action);
52080 _this.isFilling = false;
52081 });
52082 };
52083 UndoRedoService.prototype.pushActionsToUndoStack = function (action) {
52084 this.undoStack.push(action);
52085 this.cellValueChanges = [];
52086 this.redoStack.clear();
52087 };
52088 UndoRedoService.prototype.getRowNode = function (gridRow) {
52089 switch (gridRow.rowPinned) {
52090 case _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].PINNED_TOP:
52091 return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];
52092 case _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].PINNED_BOTTOM:
52093 return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];
52094 default:
52095 return this.rowModel.getRow(gridRow.rowIndex);
52096 }
52097 };
52098 __decorate([
52099 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
52100 ], UndoRedoService.prototype, "focusService", void 0);
52101 __decorate([
52102 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
52103 ], UndoRedoService.prototype, "gridApi", void 0);
52104 __decorate([
52105 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
52106 ], UndoRedoService.prototype, "rowModel", void 0);
52107 __decorate([
52108 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedRowModel')
52109 ], UndoRedoService.prototype, "pinnedRowModel", void 0);
52110 __decorate([
52111 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('cellPositionUtils')
52112 ], UndoRedoService.prototype, "cellPositionUtils", void 0);
52113 __decorate([
52114 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowPositionUtils')
52115 ], UndoRedoService.prototype, "rowPositionUtils", void 0);
52116 __decorate([
52117 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
52118 ], UndoRedoService.prototype, "init", null);
52119 UndoRedoService = __decorate([
52120 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('undoRedoService')
52121 ], UndoRedoService);
52122 return UndoRedoService;
52123}(_context_beanStub__WEBPACK_IMPORTED_MODULE_6__["BeanStub"]));
52124
52125
52126
52127
52128
52129/***/ }),
52130/* 237 */
52131/***/ (function(module, __webpack_exports__, __webpack_require__) {
52132
52133"use strict";
52134__webpack_require__.r(__webpack_exports__);
52135/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UndoRedoAction", function() { return UndoRedoAction; });
52136/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FillUndoRedoAction", function() { return FillUndoRedoAction; });
52137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UndoRedoStack", function() { return UndoRedoStack; });
52138/**
52139 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52140 * @version v27.3.0
52141 * @link https://www.ag-grid.com/
52142 * @license MIT
52143 */
52144var __extends = (undefined && undefined.__extends) || (function () {
52145 var extendStatics = function (d, b) {
52146 extendStatics = Object.setPrototypeOf ||
52147 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52148 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
52149 return extendStatics(d, b);
52150 };
52151 return function (d, b) {
52152 extendStatics(d, b);
52153 function __() { this.constructor = d; }
52154 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52155 };
52156})();
52157var UndoRedoAction = /** @class */ (function () {
52158 function UndoRedoAction(cellValueChanges) {
52159 this.cellValueChanges = cellValueChanges;
52160 }
52161 return UndoRedoAction;
52162}());
52163
52164var FillUndoRedoAction = /** @class */ (function (_super) {
52165 __extends(FillUndoRedoAction, _super);
52166 function FillUndoRedoAction(cellValueChanges, initialRange, finalRange) {
52167 var _this = _super.call(this, cellValueChanges) || this;
52168 _this.initialRange = initialRange;
52169 _this.finalRange = finalRange;
52170 return _this;
52171 }
52172 return FillUndoRedoAction;
52173}(UndoRedoAction));
52174
52175var UndoRedoStack = /** @class */ (function () {
52176 function UndoRedoStack(maxStackSize) {
52177 this.actionStack = [];
52178 this.maxStackSize = maxStackSize ? maxStackSize : UndoRedoStack.DEFAULT_STACK_SIZE;
52179 this.actionStack = new Array(this.maxStackSize);
52180 }
52181 UndoRedoStack.prototype.pop = function () {
52182 return this.actionStack.pop();
52183 };
52184 UndoRedoStack.prototype.push = function (item) {
52185 var shouldAddActions = item.cellValueChanges && item.cellValueChanges.length > 0;
52186 if (!shouldAddActions) {
52187 return;
52188 }
52189 if (this.actionStack.length === this.maxStackSize) {
52190 this.actionStack.shift();
52191 }
52192 this.actionStack.push(item);
52193 };
52194 UndoRedoStack.prototype.clear = function () {
52195 this.actionStack = [];
52196 };
52197 UndoRedoStack.prototype.getCurrentStackSize = function () {
52198 return this.actionStack.length;
52199 };
52200 UndoRedoStack.DEFAULT_STACK_SIZE = 10;
52201 return UndoRedoStack;
52202}());
52203
52204
52205
52206
52207
52208/***/ }),
52209/* 238 */
52210/***/ (function(module, __webpack_exports__, __webpack_require__) {
52211
52212"use strict";
52213__webpack_require__.r(__webpack_exports__);
52214/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderPositionUtils", function() { return HeaderPositionUtils; });
52215/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
52216/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
52217/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
52218/* harmony import */ var _row_headerRowComp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(149);
52219/**
52220 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52221 * @version v27.3.0
52222 * @link https://www.ag-grid.com/
52223 * @license MIT
52224 */
52225var __extends = (undefined && undefined.__extends) || (function () {
52226 var extendStatics = function (d, b) {
52227 extendStatics = Object.setPrototypeOf ||
52228 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52229 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
52230 return extendStatics(d, b);
52231 };
52232 return function (d, b) {
52233 extendStatics(d, b);
52234 function __() { this.constructor = d; }
52235 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52236 };
52237})();
52238var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52239 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52240 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52241 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
52242 return c > 3 && r && Object.defineProperty(target, key, r), r;
52243};
52244
52245
52246
52247
52248var HeaderPositionUtils = /** @class */ (function (_super) {
52249 __extends(HeaderPositionUtils, _super);
52250 function HeaderPositionUtils() {
52251 return _super !== null && _super.apply(this, arguments) || this;
52252 }
52253 HeaderPositionUtils.prototype.findHeader = function (focusedHeader, direction) {
52254 var nextColumn;
52255 var getGroupMethod;
52256 var getColMethod;
52257 if (focusedHeader.column instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_2__["ColumnGroup"]) {
52258 getGroupMethod = "getDisplayedGroup" + direction;
52259 nextColumn = this.columnModel[getGroupMethod](focusedHeader.column);
52260 }
52261 else {
52262 getColMethod = "getDisplayedCol" + direction;
52263 nextColumn = this.columnModel[getColMethod](focusedHeader.column);
52264 }
52265 if (nextColumn) {
52266 return {
52267 column: nextColumn,
52268 headerRowIndex: focusedHeader.headerRowIndex
52269 };
52270 }
52271 };
52272 HeaderPositionUtils.prototype.findColAtEdgeForHeaderRow = function (level, position) {
52273 var displayedColumns = this.columnModel.getAllDisplayedColumns();
52274 var column = displayedColumns[position === 'start' ? 0 : displayedColumns.length - 1];
52275 if (!column) {
52276 return;
52277 }
52278 var childContainer = this.ctrlsService.getHeaderRowContainerCtrl(column.getPinned());
52279 var type = childContainer.getRowType(level);
52280 if (type == _row_headerRowComp__WEBPACK_IMPORTED_MODULE_3__["HeaderRowType"].COLUMN_GROUP) {
52281 var columnGroup = this.columnModel.getColumnGroupAtLevel(column, level);
52282 return {
52283 headerRowIndex: level,
52284 column: columnGroup
52285 };
52286 }
52287 return {
52288 // if type==null, means the header level didn't exist
52289 headerRowIndex: type == null ? -1 : level,
52290 column: column
52291 };
52292 };
52293 __decorate([
52294 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
52295 ], HeaderPositionUtils.prototype, "columnModel", void 0);
52296 __decorate([
52297 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
52298 ], HeaderPositionUtils.prototype, "ctrlsService", void 0);
52299 HeaderPositionUtils = __decorate([
52300 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('headerPositionUtils')
52301 ], HeaderPositionUtils);
52302 return HeaderPositionUtils;
52303}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
52304
52305
52306
52307
52308
52309/***/ }),
52310/* 239 */
52311/***/ (function(module, __webpack_exports__, __webpack_require__) {
52312
52313"use strict";
52314__webpack_require__.r(__webpack_exports__);
52315/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnDefFactory", function() { return ColumnDefFactory; });
52316/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
52317/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
52318/**
52319 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52320 * @version v27.3.0
52321 * @link https://www.ag-grid.com/
52322 * @license MIT
52323 */
52324var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52325 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52326 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52327 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
52328 return c > 3 && r && Object.defineProperty(target, key, r), r;
52329};
52330
52331
52332var ColumnDefFactory = /** @class */ (function () {
52333 function ColumnDefFactory() {
52334 }
52335 ColumnDefFactory.prototype.buildColumnDefs = function (cols, rowGroupColumns, pivotColumns) {
52336 var _this = this;
52337 var res = [];
52338 var colGroupDefs = {};
52339 cols.forEach(function (col) {
52340 var colDef = _this.createDefFromColumn(col, rowGroupColumns, pivotColumns);
52341 var addToResult = true;
52342 var childDef = colDef;
52343 var pointer = col.getOriginalParent();
52344 while (pointer) {
52345 var parentDef = null;
52346 // we don't include padding groups, as the column groups provided
52347 // by application didn't have these. the whole point of padding groups
52348 // is to balance the column tree that the user provided.
52349 if (pointer.isPadding()) {
52350 pointer = pointer.getOriginalParent();
52351 continue;
52352 }
52353 // if colDef for this group already exists, use it
52354 var existingParentDef = colGroupDefs[pointer.getGroupId()];
52355 if (existingParentDef) {
52356 existingParentDef.children.push(childDef);
52357 // if we added to result, it would be the second time we did it
52358 addToResult = false;
52359 // we don't want to continue up the tree, as it has already been
52360 // done for this group
52361 break;
52362 }
52363 parentDef = _this.createDefFromGroup(pointer);
52364 if (parentDef) {
52365 parentDef.children = [childDef];
52366 colGroupDefs[parentDef.groupId] = parentDef;
52367 childDef = parentDef;
52368 pointer = pointer.getOriginalParent();
52369 }
52370 }
52371 if (addToResult) {
52372 res.push(childDef);
52373 }
52374 });
52375 return res;
52376 };
52377 ColumnDefFactory.prototype.createDefFromGroup = function (group) {
52378 var defCloned = Object(_utils_object__WEBPACK_IMPORTED_MODULE_1__["deepCloneDefinition"])(group.getColGroupDef(), ['children']);
52379 if (defCloned) {
52380 defCloned.groupId = group.getGroupId();
52381 }
52382 return defCloned;
52383 };
52384 ColumnDefFactory.prototype.createDefFromColumn = function (col, rowGroupColumns, pivotColumns) {
52385 var colDefCloned = Object(_utils_object__WEBPACK_IMPORTED_MODULE_1__["deepCloneDefinition"])(col.getColDef());
52386 colDefCloned.colId = col.getColId();
52387 colDefCloned.width = col.getActualWidth();
52388 colDefCloned.rowGroup = col.isRowGroupActive();
52389 colDefCloned.rowGroupIndex = col.isRowGroupActive() ? rowGroupColumns.indexOf(col) : null;
52390 colDefCloned.pivot = col.isPivotActive();
52391 colDefCloned.pivotIndex = col.isPivotActive() ? pivotColumns.indexOf(col) : null;
52392 colDefCloned.aggFunc = col.isValueActive() ? col.getAggFunc() : null;
52393 colDefCloned.hide = col.isVisible() ? undefined : true;
52394 colDefCloned.pinned = col.isPinned() ? col.getPinned() : null;
52395 colDefCloned.sort = col.getSort() ? col.getSort() : null;
52396 colDefCloned.sortIndex = col.getSortIndex() != null ? col.getSortIndex() : null;
52397 return colDefCloned;
52398 };
52399 ColumnDefFactory = __decorate([
52400 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('columnDefFactory')
52401 ], ColumnDefFactory);
52402 return ColumnDefFactory;
52403}());
52404
52405
52406
52407
52408
52409/***/ }),
52410/* 240 */
52411/***/ (function(module, __webpack_exports__, __webpack_require__) {
52412
52413"use strict";
52414__webpack_require__.r(__webpack_exports__);
52415/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowCssClassCalculator", function() { return RowCssClassCalculator; });
52416/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
52417/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
52418/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
52419/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
52420/**
52421 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52422 * @version v27.3.0
52423 * @link https://www.ag-grid.com/
52424 * @license MIT
52425 */
52426var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52427 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52428 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52429 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
52430 return c > 3 && r && Object.defineProperty(target, key, r), r;
52431};
52432
52433
52434
52435
52436var RowCssClassCalculator = /** @class */ (function () {
52437 function RowCssClassCalculator() {
52438 }
52439 RowCssClassCalculator.prototype.getInitialRowClasses = function (params) {
52440 var classes = [];
52441 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["exists"])(params.extraCssClass)) {
52442 classes.push(params.extraCssClass);
52443 }
52444 classes.push('ag-row');
52445 classes.push(params.rowFocused ? 'ag-row-focus' : 'ag-row-no-focus');
52446 if (params.fadeRowIn) {
52447 classes.push('ag-opacity-zero');
52448 }
52449 classes.push(params.rowIsEven ? 'ag-row-even' : 'ag-row-odd');
52450 if (params.rowNode.isRowPinned()) {
52451 classes.push('ag-row-pinned');
52452 }
52453 if (params.rowNode.isSelected()) {
52454 classes.push('ag-row-selected');
52455 }
52456 if (params.rowNode.footer) {
52457 classes.push('ag-row-footer');
52458 }
52459 classes.push('ag-row-level-' + params.rowLevel);
52460 if (params.rowNode.stub) {
52461 classes.push('ag-row-loading');
52462 }
52463 if (params.fullWidthRow) {
52464 classes.push('ag-full-width-row');
52465 }
52466 if (params.expandable) {
52467 classes.push('ag-row-group');
52468 classes.push(params.rowNode.expanded ? 'ag-row-group-expanded' : 'ag-row-group-contracted');
52469 }
52470 if (params.rowNode.dragging) {
52471 classes.push('ag-row-dragging');
52472 }
52473 Object(_utils_array__WEBPACK_IMPORTED_MODULE_1__["pushAll"])(classes, this.processClassesFromGridOptions(params.rowNode));
52474 Object(_utils_array__WEBPACK_IMPORTED_MODULE_1__["pushAll"])(classes, this.preProcessRowClassRules(params.rowNode));
52475 // we use absolute position unless we are doing print layout
52476 classes.push(params.printLayout ? 'ag-row-position-relative' : 'ag-row-position-absolute');
52477 if (params.firstRowOnPage) {
52478 classes.push('ag-row-first');
52479 }
52480 if (params.lastRowOnPage) {
52481 classes.push('ag-row-last');
52482 }
52483 if (params.fullWidthRow) {
52484 if (params.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].PINNED_LEFT) {
52485 classes.push('ag-cell-last-left-pinned');
52486 }
52487 if (params.pinned === _constants_constants__WEBPACK_IMPORTED_MODULE_3__["Constants"].PINNED_RIGHT) {
52488 classes.push('ag-cell-first-right-pinned');
52489 }
52490 }
52491 return classes;
52492 };
52493 RowCssClassCalculator.prototype.processClassesFromGridOptions = function (rowNode) {
52494 var res = [];
52495 var process = function (rowCls) {
52496 if (typeof rowCls === 'string') {
52497 res.push(rowCls);
52498 }
52499 else if (Array.isArray(rowCls)) {
52500 rowCls.forEach(function (e) { return res.push(e); });
52501 }
52502 };
52503 // part 1 - rowClass
52504 var rowClass = this.gridOptionsWrapper.getRowClass();
52505 if (rowClass) {
52506 if (typeof rowClass === 'function') {
52507 console.warn('AG Grid: rowClass should not be a function, please use getRowClass instead');
52508 return [];
52509 }
52510 process(rowClass);
52511 }
52512 // part 2 - rowClassFunc
52513 var rowClassFunc = this.gridOptionsWrapper.getRowClassFunc();
52514 if (rowClassFunc) {
52515 var params = {
52516 data: rowNode.data,
52517 node: rowNode,
52518 rowIndex: rowNode.rowIndex
52519 };
52520 var rowClassFuncResult = rowClassFunc(params);
52521 process(rowClassFuncResult);
52522 }
52523 return res;
52524 };
52525 RowCssClassCalculator.prototype.preProcessRowClassRules = function (rowNode) {
52526 var res = [];
52527 this.processRowClassRules(rowNode, function (className) {
52528 res.push(className);
52529 }, function (className) {
52530 // not catered for, if creating, no need
52531 // to remove class as it was never there
52532 });
52533 return res;
52534 };
52535 RowCssClassCalculator.prototype.processRowClassRules = function (rowNode, onApplicableClass, onNotApplicableClass) {
52536 var rowClassParams = {
52537 data: rowNode.data,
52538 node: rowNode,
52539 rowIndex: rowNode.rowIndex,
52540 api: this.gridOptionsWrapper.getApi(),
52541 columnApi: this.gridOptionsWrapper.getColumnApi(),
52542 context: this.gridOptionsWrapper.getContext()
52543 };
52544 this.stylingService.processClassRules(this.gridOptionsWrapper.rowClassRules(), rowClassParams, onApplicableClass, onNotApplicableClass);
52545 };
52546 RowCssClassCalculator.prototype.calculateRowLevel = function (rowNode) {
52547 if (rowNode.group) {
52548 return rowNode.level;
52549 }
52550 // if a leaf, and a parent exists, put a level of the parent, else put level of 0 for top level item
52551 return rowNode.parent ? (rowNode.parent.level + 1) : 0;
52552 };
52553 __decorate([
52554 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('stylingService')
52555 ], RowCssClassCalculator.prototype, "stylingService", void 0);
52556 __decorate([
52557 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('gridOptionsWrapper')
52558 ], RowCssClassCalculator.prototype, "gridOptionsWrapper", void 0);
52559 RowCssClassCalculator = __decorate([
52560 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('rowCssClassCalculator')
52561 ], RowCssClassCalculator);
52562 return RowCssClassCalculator;
52563}());
52564
52565
52566
52567
52568
52569/***/ }),
52570/* 241 */
52571/***/ (function(module, __webpack_exports__, __webpack_require__) {
52572
52573"use strict";
52574__webpack_require__.r(__webpack_exports__);
52575/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowNodeSorter", function() { return RowNodeSorter; });
52576/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
52577/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37);
52578/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
52579/**
52580 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52581 * @version v27.3.0
52582 * @link https://www.ag-grid.com/
52583 * @license MIT
52584 */
52585var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52586 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52587 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52588 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
52589 return c > 3 && r && Object.defineProperty(target, key, r), r;
52590};
52591
52592
52593
52594// this logic is used by both SSRM and CSRM
52595var RowNodeSorter = /** @class */ (function () {
52596 function RowNodeSorter() {
52597 }
52598 RowNodeSorter.prototype.doFullSort = function (rowNodes, sortOptions) {
52599 var mapper = function (rowNode, pos) { return ({ currentPos: pos, rowNode: rowNode }); };
52600 var sortedRowNodes = rowNodes.map(mapper);
52601 sortedRowNodes.sort(this.compareRowNodes.bind(this, sortOptions));
52602 return sortedRowNodes.map(function (item) { return item.rowNode; });
52603 };
52604 RowNodeSorter.prototype.compareRowNodes = function (sortOptions, sortedNodeA, sortedNodeB) {
52605 var nodeA = sortedNodeA.rowNode;
52606 var nodeB = sortedNodeB.rowNode;
52607 // Iterate columns, return the first that doesn't match
52608 for (var i = 0, len = sortOptions.length; i < len; i++) {
52609 var sortOption = sortOptions[i];
52610 var isInverted = sortOption.sort === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_DESC;
52611 var valueA = this.getValue(nodeA, sortOption.column);
52612 var valueB = this.getValue(nodeB, sortOption.column);
52613 var comparatorResult = void 0;
52614 var providedComparator = this.getComparator(sortOption, nodeA);
52615 if (providedComparator) {
52616 //if comparator provided, use it
52617 comparatorResult = providedComparator(valueA, valueB, nodeA, nodeB, isInverted);
52618 }
52619 else {
52620 //otherwise do our own comparison
52621 comparatorResult = _utils__WEBPACK_IMPORTED_MODULE_1__["_"].defaultComparator(valueA, valueB, this.gridOptionsWrapper.isAccentedSort());
52622 }
52623 // user provided comparators can return 'NaN' if they don't correctly handle 'undefined' values, this
52624 // typically occurs when the comparator is used on a group row
52625 var validResult = !isNaN(comparatorResult);
52626 if (validResult && comparatorResult !== 0) {
52627 return sortOption.sort === _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].SORT_ASC ? comparatorResult : comparatorResult * -1;
52628 }
52629 }
52630 // All matched, we make is so that the original sort order is kept:
52631 return sortedNodeA.currentPos - sortedNodeB.currentPos;
52632 };
52633 RowNodeSorter.prototype.getComparator = function (sortOption, rowNode) {
52634 var column = sortOption.column;
52635 // comparator on col get preference over everything else
52636 var comparatorOnCol = column.getColDef().comparator;
52637 if (comparatorOnCol != null) {
52638 return comparatorOnCol;
52639 }
52640 // if no comparator on col, see if we are showing a group, and if we are, get comparator from row group col
52641 if (rowNode.rowGroupColumn) {
52642 return rowNode.rowGroupColumn.getColDef().comparator;
52643 }
52644 if (!column.getColDef().showRowGroup) {
52645 return;
52646 }
52647 // if a 'field' is supplied on the autoGroupColumnDef we need to use the associated column comparator
52648 var groupLeafField = !rowNode.group && column.getColDef().field;
52649 if (!groupLeafField) {
52650 return;
52651 }
52652 var primaryColumn = this.columnModel.getPrimaryColumn(groupLeafField);
52653 if (!primaryColumn) {
52654 return;
52655 }
52656 return primaryColumn.getColDef().comparator;
52657 };
52658 RowNodeSorter.prototype.getValue = function (nodeA, column) {
52659 return this.valueService.getValue(column, nodeA, false, false);
52660 };
52661 __decorate([
52662 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridOptionsWrapper')
52663 ], RowNodeSorter.prototype, "gridOptionsWrapper", void 0);
52664 __decorate([
52665 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueService')
52666 ], RowNodeSorter.prototype, "valueService", void 0);
52667 __decorate([
52668 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
52669 ], RowNodeSorter.prototype, "columnModel", void 0);
52670 RowNodeSorter = __decorate([
52671 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('rowNodeSorter')
52672 ], RowNodeSorter);
52673 return RowNodeSorter;
52674}());
52675
52676
52677
52678
52679
52680/***/ }),
52681/* 242 */
52682/***/ (function(module, __webpack_exports__, __webpack_require__) {
52683
52684"use strict";
52685__webpack_require__.r(__webpack_exports__);
52686/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CtrlsService", function() { return CtrlsService; });
52687/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
52688/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
52689/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
52690/**
52691 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52692 * @version v27.3.0
52693 * @link https://www.ag-grid.com/
52694 * @license MIT
52695 */
52696var __extends = (undefined && undefined.__extends) || (function () {
52697 var extendStatics = function (d, b) {
52698 extendStatics = Object.setPrototypeOf ||
52699 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52700 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
52701 return extendStatics(d, b);
52702 };
52703 return function (d, b) {
52704 extendStatics(d, b);
52705 function __() { this.constructor = d; }
52706 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52707 };
52708})();
52709var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52710 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52711 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52712 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
52713 return c > 3 && r && Object.defineProperty(target, key, r), r;
52714};
52715
52716
52717
52718var CtrlsService = /** @class */ (function (_super) {
52719 __extends(CtrlsService, _super);
52720 function CtrlsService() {
52721 var _this = _super !== null && _super.apply(this, arguments) || this;
52722 _this.ready = false;
52723 _this.readyCallbacks = [];
52724 return _this;
52725 }
52726 CtrlsService_1 = CtrlsService;
52727 CtrlsService.prototype.checkReady = function () {
52728 this.ready =
52729 this.gridCtrl != null
52730 && this.gridBodyCtrl != null
52731 && this.centerRowContainerCtrl != null
52732 && this.leftRowContainerCtrl != null
52733 && this.rightRowContainerCtrl != null
52734 && this.bottomCenterRowContainerCtrl != null
52735 && this.bottomLeftRowContainerCtrl != null
52736 && this.bottomRightRowContainerCtrl != null
52737 && this.topCenterRowContainerCtrl != null
52738 && this.topLeftRowContainerCtrl != null
52739 && this.topRightRowContainerCtrl != null
52740 && this.centerHeaderRowContainerCtrl != null
52741 && this.leftHeaderRowContainerCtrl != null
52742 && this.rightHeaderRowContainerCtrl != null
52743 && this.fakeHScrollCtrl != null
52744 && this.gridHeaderCtrl != null;
52745 if (this.ready) {
52746 var p_1 = this.createReadyParams();
52747 this.readyCallbacks.forEach(function (c) { return c(p_1); });
52748 this.readyCallbacks.length = 0;
52749 }
52750 };
52751 CtrlsService.prototype.whenReady = function (callback) {
52752 if (this.ready) {
52753 callback(this.createReadyParams());
52754 }
52755 else {
52756 this.readyCallbacks.push(callback);
52757 }
52758 };
52759 CtrlsService.prototype.createReadyParams = function () {
52760 return {
52761 centerRowContainerCtrl: this.centerRowContainerCtrl,
52762 leftRowContainerCtrl: this.leftRowContainerCtrl,
52763 rightRowContainerCtrl: this.rightRowContainerCtrl,
52764 bottomCenterRowContainerCtrl: this.bottomCenterRowContainerCtrl,
52765 bottomLeftRowContainerCtrl: this.bottomLeftRowContainerCtrl,
52766 bottomRightRowContainerCtrl: this.bottomRightRowContainerCtrl,
52767 topCenterRowContainerCtrl: this.topCenterRowContainerCtrl,
52768 topLeftRowContainerCtrl: this.topLeftRowContainerCtrl,
52769 topRightRowContainerCtrl: this.topRightRowContainerCtrl,
52770 centerHeaderRowContainerCtrl: this.centerHeaderRowContainerCtrl,
52771 leftHeaderRowContainerCtrl: this.leftHeaderRowContainerCtrl,
52772 rightHeaderRowContainerCtrl: this.rightHeaderRowContainerCtrl,
52773 fakeHScrollCtrl: this.fakeHScrollCtrl,
52774 gridBodyCtrl: this.gridBodyCtrl,
52775 gridCtrl: this.gridCtrl,
52776 gridHeaderCtrl: this.gridHeaderCtrl,
52777 };
52778 };
52779 CtrlsService.prototype.registerFakeHScrollCtrl = function (ctrl) {
52780 this.fakeHScrollCtrl = ctrl;
52781 this.checkReady();
52782 };
52783 CtrlsService.prototype.registerGridHeaderCtrl = function (gridHeaderCtrl) {
52784 this.gridHeaderCtrl = gridHeaderCtrl;
52785 this.checkReady();
52786 };
52787 CtrlsService.prototype.registerCenterRowContainerCtrl = function (ctrl) {
52788 this.centerRowContainerCtrl = ctrl;
52789 this.checkReady();
52790 };
52791 CtrlsService.prototype.registerLeftRowContainerCtrl = function (ctrl) {
52792 this.leftRowContainerCtrl = ctrl;
52793 this.checkReady();
52794 };
52795 CtrlsService.prototype.registerRightRowContainerCtrl = function (ctrl) {
52796 this.rightRowContainerCtrl = ctrl;
52797 this.checkReady();
52798 };
52799 CtrlsService.prototype.registerTopCenterRowContainerCtrl = function (ctrl) {
52800 this.topCenterRowContainerCtrl = ctrl;
52801 this.checkReady();
52802 };
52803 CtrlsService.prototype.registerTopLeftRowContainerCon = function (ctrl) {
52804 this.topLeftRowContainerCtrl = ctrl;
52805 this.checkReady();
52806 };
52807 CtrlsService.prototype.registerTopRightRowContainerCtrl = function (ctrl) {
52808 this.topRightRowContainerCtrl = ctrl;
52809 this.checkReady();
52810 };
52811 CtrlsService.prototype.registerBottomCenterRowContainerCtrl = function (ctrl) {
52812 this.bottomCenterRowContainerCtrl = ctrl;
52813 this.checkReady();
52814 };
52815 CtrlsService.prototype.registerBottomLeftRowContainerCtrl = function (ctrl) {
52816 this.bottomLeftRowContainerCtrl = ctrl;
52817 this.checkReady();
52818 };
52819 CtrlsService.prototype.registerBottomRightRowContainerCtrl = function (ctrl) {
52820 this.bottomRightRowContainerCtrl = ctrl;
52821 this.checkReady();
52822 };
52823 CtrlsService.prototype.registerHeaderContainer = function (ctrl, pinned) {
52824 switch (pinned) {
52825 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_LEFT:
52826 this.leftHeaderRowContainerCtrl = ctrl;
52827 break;
52828 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_RIGHT:
52829 this.rightHeaderRowContainerCtrl = ctrl;
52830 break;
52831 default:
52832 this.centerHeaderRowContainerCtrl = ctrl;
52833 break;
52834 }
52835 this.checkReady();
52836 };
52837 CtrlsService.prototype.registerGridBodyCtrl = function (ctrl) {
52838 this.gridBodyCtrl = ctrl;
52839 this.checkReady();
52840 };
52841 CtrlsService.prototype.registerGridCtrl = function (ctrl) {
52842 this.gridCtrl = ctrl;
52843 this.checkReady();
52844 };
52845 CtrlsService.prototype.getFakeHScrollCtrl = function () {
52846 return this.fakeHScrollCtrl;
52847 };
52848 CtrlsService.prototype.getGridHeaderCtrl = function () {
52849 return this.gridHeaderCtrl;
52850 };
52851 CtrlsService.prototype.getGridCtrl = function () {
52852 return this.gridCtrl;
52853 };
52854 CtrlsService.prototype.getCenterRowContainerCtrl = function () {
52855 return this.centerRowContainerCtrl;
52856 };
52857 CtrlsService.prototype.getTopCenterRowContainerCtrl = function () {
52858 return this.topCenterRowContainerCtrl;
52859 };
52860 CtrlsService.prototype.getBottomCenterRowContainerCtrl = function () {
52861 return this.bottomCenterRowContainerCtrl;
52862 };
52863 CtrlsService.prototype.getGridBodyCtrl = function () {
52864 return this.gridBodyCtrl;
52865 };
52866 CtrlsService.prototype.getHeaderRowContainerCtrls = function () {
52867 return [this.leftHeaderRowContainerCtrl, this.rightHeaderRowContainerCtrl, this.centerHeaderRowContainerCtrl];
52868 };
52869 CtrlsService.prototype.getHeaderRowContainerCtrl = function (pinned) {
52870 switch (pinned) {
52871 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_LEFT: return this.leftHeaderRowContainerCtrl;
52872 case _constants_constants__WEBPACK_IMPORTED_MODULE_2__["Constants"].PINNED_RIGHT: return this.rightHeaderRowContainerCtrl;
52873 default: return this.centerHeaderRowContainerCtrl;
52874 }
52875 };
52876 var CtrlsService_1;
52877 CtrlsService.NAME = 'ctrlsService';
52878 CtrlsService = CtrlsService_1 = __decorate([
52879 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])(CtrlsService_1.NAME)
52880 ], CtrlsService);
52881 return CtrlsService;
52882}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
52883
52884
52885
52886
52887
52888/***/ }),
52889/* 243 */
52890/***/ (function(module, __webpack_exports__, __webpack_require__) {
52891
52892"use strict";
52893__webpack_require__.r(__webpack_exports__);
52894/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CtrlsFactory", function() { return CtrlsFactory; });
52895/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
52896/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
52897/**
52898 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52899 * @version v27.3.0
52900 * @link https://www.ag-grid.com/
52901 * @license MIT
52902 */
52903var __extends = (undefined && undefined.__extends) || (function () {
52904 var extendStatics = function (d, b) {
52905 extendStatics = Object.setPrototypeOf ||
52906 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52907 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
52908 return extendStatics(d, b);
52909 };
52910 return function (d, b) {
52911 extendStatics(d, b);
52912 function __() { this.constructor = d; }
52913 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52914 };
52915})();
52916var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52917 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52918 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52919 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
52920 return c > 3 && r && Object.defineProperty(target, key, r), r;
52921};
52922
52923
52924var CtrlsFactory = /** @class */ (function (_super) {
52925 __extends(CtrlsFactory, _super);
52926 function CtrlsFactory() {
52927 var _this = _super !== null && _super.apply(this, arguments) || this;
52928 _this.registry = {};
52929 return _this;
52930 }
52931 CtrlsFactory.prototype.register = function (meta) {
52932 this.registry[meta.controllerName] = meta.controllerClass;
52933 };
52934 CtrlsFactory.prototype.getInstance = function (name) {
52935 var ControllerClass = this.registry[name];
52936 if (ControllerClass == null) {
52937 return undefined;
52938 }
52939 return new ControllerClass();
52940 };
52941 CtrlsFactory = __decorate([
52942 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('ctrlsFactory')
52943 ], CtrlsFactory);
52944 return CtrlsFactory;
52945}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
52946
52947
52948
52949
52950
52951/***/ }),
52952/* 244 */
52953/***/ (function(module, __webpack_exports__, __webpack_require__) {
52954
52955"use strict";
52956__webpack_require__.r(__webpack_exports__);
52957/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FakeHScrollComp", function() { return FakeHScrollComp; });
52958/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
52959/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
52960/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
52961/* harmony import */ var _fakeHScrollCtrl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(245);
52962/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
52963/* harmony import */ var _centerWidthFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(136);
52964/**
52965 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52966 * @version v27.3.0
52967 * @link https://www.ag-grid.com/
52968 * @license MIT
52969 */
52970var __extends = (undefined && undefined.__extends) || (function () {
52971 var extendStatics = function (d, b) {
52972 extendStatics = Object.setPrototypeOf ||
52973 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52974 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
52975 return extendStatics(d, b);
52976 };
52977 return function (d, b) {
52978 extendStatics(d, b);
52979 function __() { this.constructor = d; }
52980 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52981 };
52982})();
52983var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52984 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52985 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52986 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
52987 return c > 3 && r && Object.defineProperty(target, key, r), r;
52988};
52989
52990
52991
52992
52993
52994
52995var FakeHScrollComp = /** @class */ (function (_super) {
52996 __extends(FakeHScrollComp, _super);
52997 function FakeHScrollComp() {
52998 return _super.call(this, FakeHScrollComp.TEMPLATE) || this;
52999 }
53000 FakeHScrollComp.prototype.postConstruct = function () {
53001 var _this = this;
53002 var compProxy = {
53003 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
53004 setHeight: function (height) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setFixedHeight"])(_this.getGui(), height); },
53005 setContainerHeight: function (height) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setFixedHeight"])(_this.eContainer, height); },
53006 setViewportHeight: function (height) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setFixedHeight"])(_this.eViewport, height); },
53007 setRightSpacerFixedWidth: function (width) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setFixedWidth"])(_this.eRightSpacer, width); },
53008 setLeftSpacerFixedWidth: function (width) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setFixedWidth"])(_this.eLeftSpacer, width); },
53009 includeLeftSpacerScrollerCss: function (cssClass, include) {
53010 return _this.eLeftSpacer.classList.toggle(cssClass, include);
53011 },
53012 includeRightSpacerScrollerCss: function (cssClass, include) {
53013 return _this.eRightSpacer.classList.toggle(cssClass, include);
53014 },
53015 };
53016 var ctrl = this.createManagedBean(new _fakeHScrollCtrl__WEBPACK_IMPORTED_MODULE_3__["FakeHScrollCtrl"]());
53017 ctrl.setComp(compProxy, this.getGui(), this.eViewport, this.eContainer);
53018 this.createManagedBean(new _centerWidthFeature__WEBPACK_IMPORTED_MODULE_5__["CenterWidthFeature"](function (width) { return _this.eContainer.style.width = width + "px"; }));
53019 };
53020 FakeHScrollComp.TEMPLATE = "<div class=\"ag-body-horizontal-scroll\" aria-hidden=\"true\">\n <div class=\"ag-horizontal-left-spacer\" ref=\"eLeftSpacer\"></div>\n <div class=\"ag-body-horizontal-scroll-viewport\" ref=\"eViewport\">\n <div class=\"ag-body-horizontal-scroll-container\" ref=\"eContainer\"></div>\n </div>\n <div class=\"ag-horizontal-right-spacer\" ref=\"eRightSpacer\"></div>\n </div>";
53021 __decorate([
53022 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eLeftSpacer')
53023 ], FakeHScrollComp.prototype, "eLeftSpacer", void 0);
53024 __decorate([
53025 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eRightSpacer')
53026 ], FakeHScrollComp.prototype, "eRightSpacer", void 0);
53027 __decorate([
53028 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eViewport')
53029 ], FakeHScrollComp.prototype, "eViewport", void 0);
53030 __decorate([
53031 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eContainer')
53032 ], FakeHScrollComp.prototype, "eContainer", void 0);
53033 __decorate([
53034 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
53035 ], FakeHScrollComp.prototype, "postConstruct", null);
53036 return FakeHScrollComp;
53037}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
53038
53039
53040
53041
53042
53043/***/ }),
53044/* 245 */
53045/***/ (function(module, __webpack_exports__, __webpack_require__) {
53046
53047"use strict";
53048__webpack_require__.r(__webpack_exports__);
53049/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FakeHScrollCtrl", function() { return FakeHScrollCtrl; });
53050/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
53051/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43);
53052/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
53053/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24);
53054/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(112);
53055/**
53056 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
53057 * @version v27.3.0
53058 * @link https://www.ag-grid.com/
53059 * @license MIT
53060 */
53061var __extends = (undefined && undefined.__extends) || (function () {
53062 var extendStatics = function (d, b) {
53063 extendStatics = Object.setPrototypeOf ||
53064 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
53065 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
53066 return extendStatics(d, b);
53067 };
53068 return function (d, b) {
53069 extendStatics(d, b);
53070 function __() { this.constructor = d; }
53071 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
53072 };
53073})();
53074var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
53075 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
53076 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
53077 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
53078 return c > 3 && r && Object.defineProperty(target, key, r), r;
53079};
53080
53081
53082
53083
53084
53085var FakeHScrollCtrl = /** @class */ (function (_super) {
53086 __extends(FakeHScrollCtrl, _super);
53087 function FakeHScrollCtrl() {
53088 return _super.call(this) || this;
53089 }
53090 FakeHScrollCtrl.prototype.setComp = function (view, eGui, eViewport, eContainer) {
53091 this.view = view;
53092 this.eViewport = eViewport;
53093 this.eContainer = eContainer;
53094 this.eGui = eGui;
53095 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED, this.onScrollVisibilityChanged.bind(this));
53096 this.onScrollVisibilityChanged();
53097 // When doing printing, this changes whether cols are pinned or not
53098 var spacerWidthsListener = this.setFakeHScrollSpacerWidths.bind(this);
53099 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, spacerWidthsListener);
53100 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, spacerWidthsListener);
53101 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_4__["GridOptionsWrapper"].PROP_DOM_LAYOUT, spacerWidthsListener);
53102 this.setFakeHScrollSpacerWidths();
53103 if (this.invisibleScrollbar) {
53104 this.hideAndShowInvisibleScrollAsNeeded();
53105 this.addActiveListenerToggles();
53106 }
53107 this.ctrlsService.registerFakeHScrollCtrl(this);
53108 };
53109 FakeHScrollCtrl.prototype.addActiveListenerToggles = function () {
53110 var _this = this;
53111 var activateEvents = ['mouseenter', 'mousedown', 'touchstart'];
53112 var deactivateEvents = ['mouseleave', 'mouseup', 'touchend'];
53113 activateEvents.forEach(function (eventName) { return _this.addManagedListener(_this.eGui, eventName, function () { return _this.view.addOrRemoveCssClass('ag-scrollbar-active', true); }); });
53114 deactivateEvents.forEach(function (eventName) { return _this.addManagedListener(_this.eGui, eventName, function () { return _this.view.addOrRemoveCssClass('ag-scrollbar-active', false); }); });
53115 };
53116 FakeHScrollCtrl.prototype.postConstruct = function () {
53117 this.enableRtl = this.gridOptionsWrapper.isEnableRtl();
53118 this.invisibleScrollbar = Object(_utils_browser__WEBPACK_IMPORTED_MODULE_1__["isInvisibleScrollbar"])();
53119 };
53120 FakeHScrollCtrl.prototype.onScrollVisibilityChanged = function () {
53121 this.setScrollVisible();
53122 this.setFakeHScrollSpacerWidths();
53123 };
53124 FakeHScrollCtrl.prototype.hideAndShowInvisibleScrollAsNeeded = function () {
53125 var _this = this;
53126 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_BODY_SCROLL, function (params) {
53127 if (params.direction === 'horizontal') {
53128 _this.view.addOrRemoveCssClass('ag-scrollbar-scrolling', true);
53129 }
53130 });
53131 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_BODY_SCROLL_END, function () { return _this.view.addOrRemoveCssClass('ag-scrollbar-scrolling', false); });
53132 };
53133 FakeHScrollCtrl.prototype.setFakeHScrollSpacerWidths = function () {
53134 var vScrollShowing = this.scrollVisibleService.isVerticalScrollShowing();
53135 // we pad the right based on a) if cols are pinned to the right and
53136 // b) if v scroll is showing on the right (normal position of scroll)
53137 var rightSpacing = this.columnModel.getDisplayedColumnsRightWidth();
53138 var scrollOnRight = !this.enableRtl && vScrollShowing;
53139 var scrollbarWidth = this.gridOptionsWrapper.getScrollbarWidth();
53140 if (scrollOnRight) {
53141 rightSpacing += scrollbarWidth;
53142 }
53143 this.view.setRightSpacerFixedWidth(rightSpacing);
53144 this.view.includeRightSpacerScrollerCss('ag-scroller-corner', rightSpacing <= scrollbarWidth);
53145 // we pad the left based on a) if cols are pinned to the left and
53146 // b) if v scroll is showing on the left (happens in LTR layout only)
53147 var leftSpacing = this.columnModel.getDisplayedColumnsLeftWidth();
53148 var scrollOnLeft = this.enableRtl && vScrollShowing;
53149 if (scrollOnLeft) {
53150 leftSpacing += scrollbarWidth;
53151 }
53152 this.view.setLeftSpacerFixedWidth(leftSpacing);
53153 this.view.includeLeftSpacerScrollerCss('ag-scroller-corner', leftSpacing <= scrollbarWidth);
53154 };
53155 FakeHScrollCtrl.prototype.setScrollVisible = function () {
53156 var hScrollShowing = this.scrollVisibleService.isHorizontalScrollShowing();
53157 var invisibleScrollbar = this.invisibleScrollbar;
53158 var isSuppressHorizontalScroll = this.gridOptionsWrapper.isSuppressHorizontalScroll();
53159 var scrollbarWidth = hScrollShowing ? (this.gridOptionsWrapper.getScrollbarWidth() || 0) : 0;
53160 var adjustedScrollbarWidth = (scrollbarWidth === 0 && invisibleScrollbar) ? 15 : scrollbarWidth;
53161 var scrollContainerSize = !isSuppressHorizontalScroll ? adjustedScrollbarWidth : 0;
53162 this.view.addOrRemoveCssClass('ag-scrollbar-invisible', invisibleScrollbar);
53163 this.view.setHeight(scrollContainerSize);
53164 this.view.setViewportHeight(scrollContainerSize);
53165 this.view.setContainerHeight(scrollContainerSize);
53166 };
53167 FakeHScrollCtrl.prototype.getViewport = function () {
53168 return this.eViewport;
53169 };
53170 FakeHScrollCtrl.prototype.getContainer = function () {
53171 return this.eContainer;
53172 };
53173 __decorate([
53174 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('scrollVisibleService')
53175 ], FakeHScrollCtrl.prototype, "scrollVisibleService", void 0);
53176 __decorate([
53177 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
53178 ], FakeHScrollCtrl.prototype, "columnModel", void 0);
53179 __decorate([
53180 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('ctrlsService')
53181 ], FakeHScrollCtrl.prototype, "ctrlsService", void 0);
53182 __decorate([
53183 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
53184 ], FakeHScrollCtrl.prototype, "postConstruct", null);
53185 return FakeHScrollCtrl;
53186}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
53187
53188
53189
53190
53191
53192/***/ }),
53193/* 246 */
53194/***/ (function(module, __webpack_exports__, __webpack_require__) {
53195
53196"use strict";
53197__webpack_require__.r(__webpack_exports__);
53198/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PinnedWidthService", function() { return PinnedWidthService; });
53199/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
53200/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
53201/* harmony import */ var _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(112);
53202/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24);
53203/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15);
53204/**
53205 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
53206 * @version v27.3.0
53207 * @link https://www.ag-grid.com/
53208 * @license MIT
53209 */
53210var __extends = (undefined && undefined.__extends) || (function () {
53211 var extendStatics = function (d, b) {
53212 extendStatics = Object.setPrototypeOf ||
53213 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
53214 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
53215 return extendStatics(d, b);
53216 };
53217 return function (d, b) {
53218 extendStatics(d, b);
53219 function __() { this.constructor = d; }
53220 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
53221 };
53222})();
53223var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
53224 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
53225 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
53226 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
53227 return c > 3 && r && Object.defineProperty(target, key, r), r;
53228};
53229
53230
53231
53232
53233
53234var PinnedWidthService = /** @class */ (function (_super) {
53235 __extends(PinnedWidthService, _super);
53236 function PinnedWidthService() {
53237 return _super !== null && _super.apply(this, arguments) || this;
53238 }
53239 PinnedWidthService.prototype.postConstruct = function () {
53240 var listener = this.checkContainerWidths.bind(this);
53241 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, listener);
53242 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, listener);
53243 this.addManagedListener(this.gridOptionsWrapper, _gridOptionsWrapper__WEBPACK_IMPORTED_MODULE_2__["GridOptionsWrapper"].PROP_DOM_LAYOUT, listener);
53244 };
53245 PinnedWidthService.prototype.checkContainerWidths = function () {
53246 var printLayout = this.gridOptionsWrapper.getDomLayout() === _constants_constants__WEBPACK_IMPORTED_MODULE_4__["Constants"].DOM_LAYOUT_PRINT;
53247 var newLeftWidth = printLayout ? 0 : this.columnModel.getDisplayedColumnsLeftWidth();
53248 var newRightWidth = printLayout ? 0 : this.columnModel.getDisplayedColumnsRightWidth();
53249 if (newLeftWidth != this.leftWidth) {
53250 this.leftWidth = newLeftWidth;
53251 this.eventService.dispatchEvent({ type: _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_LEFT_PINNED_WIDTH_CHANGED });
53252 }
53253 if (newRightWidth != this.rightWidth) {
53254 this.rightWidth = newRightWidth;
53255 this.eventService.dispatchEvent({ type: _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_RIGHT_PINNED_WIDTH_CHANGED });
53256 }
53257 };
53258 PinnedWidthService.prototype.getPinnedRightWidth = function () {
53259 return this.rightWidth;
53260 };
53261 PinnedWidthService.prototype.getPinnedLeftWidth = function () {
53262 return this.leftWidth;
53263 };
53264 __decorate([
53265 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
53266 ], PinnedWidthService.prototype, "columnModel", void 0);
53267 __decorate([
53268 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
53269 ], PinnedWidthService.prototype, "postConstruct", null);
53270 PinnedWidthService = __decorate([
53271 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('pinnedWidthService')
53272 ], PinnedWidthService);
53273 return PinnedWidthService;
53274}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
53275
53276
53277
53278
53279
53280/***/ }),
53281/* 247 */
53282/***/ (function(module, __webpack_exports__, __webpack_require__) {
53283
53284"use strict";
53285__webpack_require__.r(__webpack_exports__);
53286/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowNodeEventThrottle", function() { return RowNodeEventThrottle; });
53287/* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
53288/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
53289/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
53290/**
53291 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
53292 * @version v27.3.0
53293 * @link https://www.ag-grid.com/
53294 * @license MIT
53295 */
53296var __extends = (undefined && undefined.__extends) || (function () {
53297 var extendStatics = function (d, b) {
53298 extendStatics = Object.setPrototypeOf ||
53299 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
53300 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
53301 return extendStatics(d, b);
53302 };
53303 return function (d, b) {
53304 extendStatics(d, b);
53305 function __() { this.constructor = d; }
53306 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
53307 };
53308})();
53309var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
53310 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
53311 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
53312 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
53313 return c > 3 && r && Object.defineProperty(target, key, r), r;
53314};
53315
53316
53317
53318var RowNodeEventThrottle = /** @class */ (function (_super) {
53319 __extends(RowNodeEventThrottle, _super);
53320 function RowNodeEventThrottle() {
53321 var _this = _super !== null && _super.apply(this, arguments) || this;
53322 _this.events = [];
53323 return _this;
53324 }
53325 RowNodeEventThrottle.prototype.postConstruct = function () {
53326 if (this.rowModel.getType() == _constants_constants__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE) {
53327 this.clientSideRowModel = this.rowModel;
53328 }
53329 };
53330 // because the user can call rowNode.setExpanded() many times in one VM turn,
53331 // we throttle the calls to ClientSideRowModel using animationFrameService. this means for 100
53332 // row nodes getting expanded, we only update the CSRM once, and then we fire all events after
53333 // CSRM has updated.
53334 //
53335 // if we did not do this, then the user could call setExpanded on 100+ rows, causing the grid
53336 // to re-render 100+ times, which would be a performance lag.
53337 //
53338 // we use animationFrameService
53339 // rather than _.debounce() so this will get done if anyone flushes the animationFrameService
53340 // (eg user calls api.ensureRowVisible(), which in turn flushes ).
53341 RowNodeEventThrottle.prototype.dispatchExpanded = function (event) {
53342 var _this = this;
53343 // if not using CSRM, we don't debounce. otherwise this breaks the SSRM.
53344 if (this.clientSideRowModel == null) {
53345 this.eventService.dispatchEvent(event);
53346 return;
53347 }
53348 this.events.push(event);
53349 var func = function () {
53350 if (_this.clientSideRowModel) {
53351 _this.clientSideRowModel.onRowGroupOpened();
53352 }
53353 _this.events.forEach(function (e) { return _this.eventService.dispatchEvent(e); });
53354 _this.events = [];
53355 };
53356 if (this.dispatchExpandedDebounced == null) {
53357 this.dispatchExpandedDebounced = this.animationFrameService.debounce(func);
53358 }
53359 this.dispatchExpandedDebounced();
53360 };
53361 __decorate([
53362 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('animationFrameService')
53363 ], RowNodeEventThrottle.prototype, "animationFrameService", void 0);
53364 __decorate([
53365 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('rowModel')
53366 ], RowNodeEventThrottle.prototype, "rowModel", void 0);
53367 __decorate([
53368 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
53369 ], RowNodeEventThrottle.prototype, "postConstruct", null);
53370 RowNodeEventThrottle = __decorate([
53371 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('rowNodeEventThrottle')
53372 ], RowNodeEventThrottle);
53373 return RowNodeEventThrottle;
53374}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
53375
53376
53377
53378
53379
53380/***/ }),
53381/* 248 */
53382/***/ (function(module, __webpack_exports__, __webpack_require__) {
53383
53384"use strict";
53385__webpack_require__.r(__webpack_exports__);
53386/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultGroupComparator", function() { return defaultGroupComparator; });
53387/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
53388/**
53389 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
53390 * @version v27.3.0
53391 * @link https://www.ag-grid.com/
53392 * @license MIT
53393 */
53394
53395function defaultGroupComparator(valueA, valueB, nodeA, nodeB, accentedCompare) {
53396 if (accentedCompare === void 0) { accentedCompare = false; }
53397 console.warn('AG Grid: Since ag-grid 11.0.0 defaultGroupComparator is not necessary. You can remove this from your colDef');
53398 var nodeAIsGroup = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["exists"])(nodeA) && nodeA.group;
53399 var nodeBIsGroup = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["exists"])(nodeB) && nodeB.group;
53400 var bothAreGroups = nodeAIsGroup && nodeBIsGroup;
53401 var bothAreNormal = !nodeAIsGroup && !nodeBIsGroup;
53402 if (bothAreGroups) {
53403 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["defaultComparator"])(nodeA.key, nodeB.key, accentedCompare);
53404 }
53405 if (bothAreNormal) {
53406 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["defaultComparator"])(valueA, valueB, accentedCompare);
53407 }
53408 if (nodeAIsGroup) {
53409 return 1;
53410 }
53411 return -1;
53412}
53413
53414
53415
53416
53417/***/ }),
53418/* 249 */
53419/***/ (function(module, __webpack_exports__, __webpack_require__) {
53420
53421"use strict";
53422__webpack_require__.r(__webpack_exports__);
53423/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseComponentWrapper", function() { return BaseComponentWrapper; });
53424/**
53425 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
53426 * @version v27.3.0
53427 * @link https://www.ag-grid.com/
53428 * @license MIT
53429 */
53430var BaseComponentWrapper = /** @class */ (function () {
53431 function BaseComponentWrapper() {
53432 }
53433 BaseComponentWrapper.prototype.wrap = function (OriginalConstructor, mandatoryMethodList, optionalMethodList, componentType) {
53434 var _this = this;
53435 if (optionalMethodList === void 0) { optionalMethodList = []; }
53436 var wrapper = this.createWrapper(OriginalConstructor, componentType);
53437 mandatoryMethodList.forEach((function (methodName) {
53438 _this.createMethod(wrapper, methodName, true);
53439 }));
53440 optionalMethodList.forEach((function (methodName) {
53441 _this.createMethod(wrapper, methodName, false);
53442 }));
53443 return wrapper;
53444 };
53445 BaseComponentWrapper.prototype.unwrap = function (comp) {
53446 return comp;
53447 };
53448 BaseComponentWrapper.prototype.createMethod = function (wrapper, methodName, mandatory) {
53449 wrapper.addMethod(methodName, this.createMethodProxy(wrapper, methodName, mandatory));
53450 };
53451 BaseComponentWrapper.prototype.createMethodProxy = function (wrapper, methodName, mandatory) {
53452 return function () {
53453 if (wrapper.hasMethod(methodName)) {
53454 return wrapper.callMethod(methodName, arguments);
53455 }
53456 if (mandatory) {
53457 console.warn('AG Grid: Framework component is missing the method ' + methodName + '()');
53458 }
53459 return null;
53460 };
53461 };
53462 return BaseComponentWrapper;
53463}());
53464
53465
53466
53467
53468
53469/***/ }),
53470/* 250 */
53471/***/ (function(module, __webpack_exports__, __webpack_require__) {
53472
53473"use strict";
53474__webpack_require__.r(__webpack_exports__);
53475/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarColumnLabelPlacement", function() { return BarColumnLabelPlacement; });
53476/**
53477 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
53478 * @version v27.3.0
53479 * @link https://www.ag-grid.com/
53480 * @license MIT
53481 */
53482var BarColumnLabelPlacement;
53483(function (BarColumnLabelPlacement) {
53484 BarColumnLabelPlacement["InsideBase"] = "insideBase";
53485 BarColumnLabelPlacement["InsideEnd"] = "insideEnd";
53486 BarColumnLabelPlacement["Center"] = "center";
53487 BarColumnLabelPlacement["OutsideEnd"] = "outsideEnd";
53488})(BarColumnLabelPlacement || (BarColumnLabelPlacement = {}));
53489
53490
53491
53492
53493/***/ }),
53494/* 251 */
53495/***/ (function(module, __webpack_exports__, __webpack_require__) {
53496
53497"use strict";
53498__webpack_require__.r(__webpack_exports__);
53499/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModel", function() { return ClientSideRowModel; });
53500/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
53501/* harmony import */ var _clientSideNodeManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(252);
53502var __extends = (undefined && undefined.__extends) || (function () {
53503 var extendStatics = function (d, b) {
53504 extendStatics = Object.setPrototypeOf ||
53505 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
53506 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
53507 return extendStatics(d, b);
53508 };
53509 return function (d, b) {
53510 extendStatics(d, b);
53511 function __() { this.constructor = d; }
53512 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
53513 };
53514})();
53515var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
53516 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
53517 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
53518 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
53519 return c > 3 && r && Object.defineProperty(target, key, r), r;
53520};
53521
53522
53523var RecursionType;
53524(function (RecursionType) {
53525 RecursionType[RecursionType["Normal"] = 0] = "Normal";
53526 RecursionType[RecursionType["AfterFilter"] = 1] = "AfterFilter";
53527 RecursionType[RecursionType["AfterFilterAndSort"] = 2] = "AfterFilterAndSort";
53528 RecursionType[RecursionType["PivotNodes"] = 3] = "PivotNodes";
53529})(RecursionType || (RecursionType = {}));
53530var ClientSideRowModel = /** @class */ (function (_super) {
53531 __extends(ClientSideRowModel, _super);
53532 function ClientSideRowModel() {
53533 return _super !== null && _super.apply(this, arguments) || this;
53534 }
53535 ClientSideRowModel.prototype.init = function () {
53536 var refreshEverythingFunc = this.refreshModel.bind(this, { step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING });
53537 var animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();
53538 var refreshEverythingAfterColsChangedFunc = this.refreshModel.bind(this, {
53539 step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING,
53540 afterColumnsChanged: true,
53541 keepRenderedRows: true,
53542 animate: animate
53543 });
53544 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_NEW_COLUMNS_LOADED, refreshEverythingAfterColsChangedFunc);
53545 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, refreshEverythingFunc);
53546 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_VALUE_CHANGED, this.onValueChanged.bind(this));
53547 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PIVOT_CHANGED, this.refreshModel.bind(this, { step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].PIVOT }));
53548 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));
53549 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SORT_CHANGED, this.onSortChanged.bind(this));
53550 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED, refreshEverythingFunc);
53551 var refreshMapListener = this.refreshModel.bind(this, {
53552 step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].MAP,
53553 keepRenderedRows: true,
53554 animate: animate
53555 });
53556 this.addManagedListener(this.gridOptionsWrapper, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["GridOptionsWrapper"].PROP_GROUP_REMOVE_SINGLE_CHILDREN, refreshMapListener);
53557 this.addManagedListener(this.gridOptionsWrapper, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["GridOptionsWrapper"].PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN, refreshMapListener);
53558 this.rootNode = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNode"](this.beans);
53559 this.nodeManager = new _clientSideNodeManager__WEBPACK_IMPORTED_MODULE_1__["ClientSideNodeManager"](this.rootNode, this.gridOptionsWrapper, this.eventService, this.columnModel, this.gridApi, this.columnApi, this.selectionService, this.beans);
53560 };
53561 ClientSideRowModel.prototype.start = function () {
53562 var rowData = this.gridOptionsWrapper.getRowData();
53563 if (rowData) {
53564 this.setRowData(rowData);
53565 }
53566 };
53567 ClientSideRowModel.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) {
53568 var atLeastOneChange;
53569 var res = false;
53570 // we do this multiple times as changing the row heights can also change the first and last rows,
53571 // so the first pass can make lots of rows smaller, which means the second pass we end up changing
53572 // more rows.
53573 do {
53574 atLeastOneChange = false;
53575 var rowAtStartPixel = this.getRowIndexAtPixel(startPixel);
53576 var rowAtEndPixel = this.getRowIndexAtPixel(endPixel);
53577 // keep check to current page if doing pagination
53578 var firstRow = Math.max(rowAtStartPixel, startLimitIndex);
53579 var lastRow = Math.min(rowAtEndPixel, endLimitIndex);
53580 for (var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++) {
53581 var rowNode = this.getRow(rowIndex);
53582 if (rowNode.rowHeightEstimated) {
53583 var rowHeight = this.gridOptionsWrapper.getRowHeightForNode(rowNode);
53584 rowNode.setRowHeight(rowHeight.height);
53585 atLeastOneChange = true;
53586 res = true;
53587 }
53588 }
53589 if (atLeastOneChange) {
53590 this.setRowTopAndRowIndex();
53591 }
53592 } while (atLeastOneChange);
53593 return res;
53594 };
53595 ClientSideRowModel.prototype.setRowTopAndRowIndex = function () {
53596 var defaultRowHeight = this.gridOptionsWrapper.getDefaultRowHeight();
53597 var nextRowTop = 0;
53598 // mapping displayed rows is not needed for this method, however it's used in
53599 // clearRowTopAndRowIndex(), and given we are looping through this.rowsToDisplay here,
53600 // we create the map here for performance reasons, so we don't loop a second time
53601 // in clearRowTopAndRowIndex()
53602 var displayedRowsMapped = new Set();
53603 // we don't estimate if doing fullHeight or autoHeight, as all rows get rendered all the time
53604 // with these two layouts.
53605 var allowEstimate = this.gridOptionsWrapper.getDomLayout() === _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Constants"].DOM_LAYOUT_NORMAL;
53606 for (var i = 0; i < this.rowsToDisplay.length; i++) {
53607 var rowNode = this.rowsToDisplay[i];
53608 if (rowNode.id != null) {
53609 displayedRowsMapped.add(rowNode.id);
53610 }
53611 if (rowNode.rowHeight == null) {
53612 var rowHeight = this.gridOptionsWrapper.getRowHeightForNode(rowNode, allowEstimate, defaultRowHeight);
53613 rowNode.setRowHeight(rowHeight.height, rowHeight.estimated);
53614 }
53615 rowNode.setRowTop(nextRowTop);
53616 rowNode.setRowIndex(i);
53617 nextRowTop += rowNode.rowHeight;
53618 }
53619 return displayedRowsMapped;
53620 };
53621 ClientSideRowModel.prototype.clearRowTopAndRowIndex = function (changedPath, displayedRowsMapped) {
53622 var changedPathActive = changedPath.isActive();
53623 var clearIfNotDisplayed = function (rowNode) {
53624 if (rowNode && rowNode.id != null && !displayedRowsMapped.has(rowNode.id)) {
53625 rowNode.clearRowTopAndRowIndex();
53626 }
53627 };
53628 var recurse = function (rowNode) {
53629 clearIfNotDisplayed(rowNode);
53630 clearIfNotDisplayed(rowNode.detailNode);
53631 clearIfNotDisplayed(rowNode.sibling);
53632 if (rowNode.hasChildren()) {
53633 if (rowNode.childrenAfterGroup) {
53634 // if a changedPath is active, it means we are here because of a transaction update or
53635 // a change detection. neither of these impacts the open/closed state of groups. so if
53636 // a group is not open this time, it was not open last time. so we know all closed groups
53637 // already have their top positions cleared. so there is no need to traverse all the way
53638 // when changedPath is active and the rowNode is not expanded.
53639 var isRootNode = rowNode.level == -1; // we need to give special consideration for root node,
53640 // as expanded=undefined for root node
53641 var skipChildren = changedPathActive && !isRootNode && !rowNode.expanded;
53642 if (!skipChildren) {
53643 rowNode.childrenAfterGroup.forEach(recurse);
53644 }
53645 }
53646 }
53647 };
53648 recurse(this.rootNode);
53649 };
53650 // returns false if row was moved, otherwise true
53651 ClientSideRowModel.prototype.ensureRowsAtPixel = function (rowNodes, pixel, increment) {
53652 var _this = this;
53653 if (increment === void 0) { increment = 0; }
53654 var indexAtPixelNow = this.getRowIndexAtPixel(pixel);
53655 var rowNodeAtPixelNow = this.getRow(indexAtPixelNow);
53656 var animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();
53657 if (rowNodeAtPixelNow === rowNodes[0]) {
53658 return false;
53659 }
53660 rowNodes.forEach(function (rowNode) {
53661 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].removeFromArray(_this.rootNode.allLeafChildren, rowNode);
53662 });
53663 rowNodes.forEach(function (rowNode, idx) {
53664 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].insertIntoArray(_this.rootNode.allLeafChildren, rowNode, Math.max(indexAtPixelNow + increment, 0) + idx);
53665 });
53666 this.refreshModel({
53667 step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING,
53668 keepRenderedRows: true,
53669 keepEditingRows: true,
53670 animate: animate
53671 });
53672 return true;
53673 };
53674 ClientSideRowModel.prototype.highlightRowAtPixel = function (rowNode, pixel) {
53675 var indexAtPixelNow = pixel != null ? this.getRowIndexAtPixel(pixel) : null;
53676 var rowNodeAtPixelNow = indexAtPixelNow != null ? this.getRow(indexAtPixelNow) : null;
53677 if (!rowNodeAtPixelNow || !rowNode || rowNodeAtPixelNow === rowNode || pixel == null) {
53678 if (this.lastHighlightedRow) {
53679 this.lastHighlightedRow.setHighlighted(null);
53680 this.lastHighlightedRow = null;
53681 }
53682 return;
53683 }
53684 var highlight = this.getHighlightPosition(pixel, rowNodeAtPixelNow);
53685 if (this.lastHighlightedRow && this.lastHighlightedRow !== rowNodeAtPixelNow) {
53686 this.lastHighlightedRow.setHighlighted(null);
53687 this.lastHighlightedRow = null;
53688 }
53689 rowNodeAtPixelNow.setHighlighted(highlight);
53690 this.lastHighlightedRow = rowNodeAtPixelNow;
53691 };
53692 ClientSideRowModel.prototype.getHighlightPosition = function (pixel, rowNode) {
53693 if (!rowNode) {
53694 var index = this.getRowIndexAtPixel(pixel);
53695 rowNode = this.getRow(index || 0);
53696 if (!rowNode) {
53697 return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowHighlightPosition"].Below;
53698 }
53699 }
53700 var rowTop = rowNode.rowTop, rowHeight = rowNode.rowHeight;
53701 return pixel - rowTop < rowHeight / 2 ? _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowHighlightPosition"].Above : _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowHighlightPosition"].Below;
53702 };
53703 ClientSideRowModel.prototype.getLastHighlightedRowNode = function () {
53704 return this.lastHighlightedRow;
53705 };
53706 ClientSideRowModel.prototype.isLastRowIndexKnown = function () {
53707 return true;
53708 };
53709 ClientSideRowModel.prototype.getRowCount = function () {
53710 if (this.rowsToDisplay) {
53711 return this.rowsToDisplay.length;
53712 }
53713 return 0;
53714 };
53715 ClientSideRowModel.prototype.getTopLevelRowCount = function () {
53716 var showingRootNode = this.rowsToDisplay && this.rowsToDisplay[0] === this.rootNode;
53717 if (showingRootNode) {
53718 return 1;
53719 }
53720 var filteredChildren = this.rootNode.childrenAfterAggFilter;
53721 return filteredChildren ? filteredChildren.length : 0;
53722 };
53723 ClientSideRowModel.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {
53724 var showingRootNode = this.rowsToDisplay && this.rowsToDisplay[0] === this.rootNode;
53725 if (showingRootNode) {
53726 return topLevelIndex;
53727 }
53728 var rowNode = this.rootNode.childrenAfterSort[topLevelIndex];
53729 if (this.gridOptionsWrapper.isGroupHideOpenParents()) {
53730 // if hideOpenParents, and this row open, then this row is now displayed at this index, first child is
53731 while (rowNode.expanded && rowNode.childrenAfterSort && rowNode.childrenAfterSort.length > 0) {
53732 rowNode = rowNode.childrenAfterSort[0];
53733 }
53734 }
53735 return rowNode.rowIndex;
53736 };
53737 ClientSideRowModel.prototype.getRowBounds = function (index) {
53738 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(this.rowsToDisplay)) {
53739 return null;
53740 }
53741 var rowNode = this.rowsToDisplay[index];
53742 if (rowNode) {
53743 return {
53744 rowTop: rowNode.rowTop,
53745 rowHeight: rowNode.rowHeight
53746 };
53747 }
53748 return null;
53749 };
53750 ClientSideRowModel.prototype.onRowGroupOpened = function () {
53751 var animate = this.gridOptionsWrapper.isAnimateRows();
53752 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].MAP, keepRenderedRows: true, animate: animate });
53753 };
53754 ClientSideRowModel.prototype.onFilterChanged = function (event) {
53755 if (event.afterDataChange) {
53756 return;
53757 }
53758 var animate = this.gridOptionsWrapper.isAnimateRows();
53759 var primaryOrQuickFilterChanged = event.columns.length === 0 || event.columns.some(function (col) { return col.isPrimary(); });
53760 var step = primaryOrQuickFilterChanged ? _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].FILTER : _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].FILTER_AGGREGATES;
53761 this.refreshModel({ step: step, keepRenderedRows: true, animate: animate });
53762 };
53763 ClientSideRowModel.prototype.onSortChanged = function () {
53764 var animate = this.gridOptionsWrapper.isAnimateRows();
53765 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].SORT, keepRenderedRows: true, animate: animate, keepEditingRows: true });
53766 };
53767 ClientSideRowModel.prototype.getType = function () {
53768 return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE;
53769 };
53770 ClientSideRowModel.prototype.onValueChanged = function () {
53771 if (this.columnModel.isPivotActive()) {
53772 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].PIVOT });
53773 }
53774 else {
53775 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].AGGREGATE });
53776 }
53777 };
53778 ClientSideRowModel.prototype.createChangePath = function (rowNodeTransactions) {
53779 // for updates, if the row is updated at all, then we re-calc all the values
53780 // in that row. we could compare each value to each old value, however if we
53781 // did this, we would be calling the valueService twice, once on the old value
53782 // and once on the new value. so it's less valueGetter calls if we just assume
53783 // each column is different. that way the changedPath is used so that only
53784 // the impacted parent rows are recalculated, parents who's children have
53785 // not changed are not impacted.
53786 var noTransactions = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missingOrEmpty(rowNodeTransactions);
53787 var changedPath = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ChangedPath"](false, this.rootNode);
53788 if (noTransactions || this.gridOptionsWrapper.isTreeData()) {
53789 changedPath.setInactive();
53790 }
53791 return changedPath;
53792 };
53793 ClientSideRowModel.prototype.isSuppressModelUpdateAfterUpdateTransaction = function (params) {
53794 if (!this.gridOptionsWrapper.isSuppressModelUpdateAfterUpdateTransaction()) {
53795 return false;
53796 }
53797 // return true if we are only doing update transactions
53798 if (params.rowNodeTransactions == null) {
53799 return false;
53800 }
53801 var transWithAddsOrDeletes = params.rowNodeTransactions.filter(function (tx) {
53802 return (tx.add != null && tx.add.length > 0) || (tx.remove != null && tx.remove.length > 0);
53803 });
53804 var transactionsContainUpdatesOnly = transWithAddsOrDeletes == null || transWithAddsOrDeletes.length == 0;
53805 return transactionsContainUpdatesOnly;
53806 };
53807 ClientSideRowModel.prototype.refreshModel = function (params) {
53808 if (this.isSuppressModelUpdateAfterUpdateTransaction(params)) {
53809 return;
53810 }
53811 // this goes through the pipeline of stages. what's in my head is similar
53812 // to the diagram on this page:
53813 // http://commons.apache.org/sandbox/commons-pipeline/pipeline_basics.html
53814 // however we want to keep the results of each stage, hence we manually call
53815 // each step rather than have them chain each other.
53816 // fallthrough in below switch is on purpose,
53817 // eg if STEP_FILTER, then all steps below this
53818 // step get done
53819 // let start: number;
53820 // console.log('======= start =======');
53821 var changedPath = this.createChangePath(params.rowNodeTransactions);
53822 switch (params.step) {
53823 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING:
53824 this.doRowGrouping(params.groupState, params.rowNodeTransactions, params.rowNodeOrder, changedPath, !!params.afterColumnsChanged);
53825 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].FILTER:
53826 this.doFilter(changedPath);
53827 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].PIVOT:
53828 this.doPivot(changedPath);
53829 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].AGGREGATE: // depends on agg fields
53830 this.doAggregate(changedPath);
53831 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].FILTER_AGGREGATES:
53832 this.doFilterAggregates(changedPath);
53833 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].SORT:
53834 this.doSort(params.rowNodeTransactions, changedPath);
53835 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].MAP:
53836 this.doRowsToDisplay();
53837 }
53838 // set all row tops to null, then set row tops on all visible rows. if we don't
53839 // do this, then the algorithm below only sets row tops, old row tops from old rows
53840 // will still lie around
53841 var displayedNodesMapped = this.setRowTopAndRowIndex();
53842 this.clearRowTopAndRowIndex(changedPath, displayedNodesMapped);
53843 var event = {
53844 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_MODEL_UPDATED,
53845 api: this.gridApi,
53846 columnApi: this.columnApi,
53847 animate: params.animate,
53848 keepRenderedRows: params.keepRenderedRows,
53849 newData: params.newData,
53850 newPage: false
53851 };
53852 this.eventService.dispatchEvent(event);
53853 };
53854 ClientSideRowModel.prototype.isEmpty = function () {
53855 var rowsMissing = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(this.rootNode.allLeafChildren) || this.rootNode.allLeafChildren.length === 0;
53856 return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(this.rootNode) || rowsMissing || !this.columnModel.isReady();
53857 };
53858 ClientSideRowModel.prototype.isRowsToRender = function () {
53859 return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(this.rowsToDisplay) && this.rowsToDisplay.length > 0;
53860 };
53861 ClientSideRowModel.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {
53862 // if lastSelectedNode is missing, we start at the first row
53863 var firstRowHit = !lastInRange;
53864 var lastRowHit = false;
53865 var lastRow;
53866 var result = [];
53867 var groupsSelectChildren = this.gridOptionsWrapper.isGroupSelectsChildren();
53868 this.forEachNodeAfterFilterAndSort(function (rowNode) {
53869 var lookingForLastRow = firstRowHit && !lastRowHit;
53870 // check if we need to flip the select switch
53871 if (!firstRowHit) {
53872 if (rowNode === lastInRange || rowNode === firstInRange) {
53873 firstRowHit = true;
53874 }
53875 }
53876 var skipThisGroupNode = rowNode.group && groupsSelectChildren;
53877 if (!skipThisGroupNode) {
53878 var inRange = firstRowHit && !lastRowHit;
53879 var childOfLastRow = rowNode.isParentOfNode(lastRow);
53880 if (inRange || childOfLastRow) {
53881 result.push(rowNode);
53882 }
53883 }
53884 if (lookingForLastRow) {
53885 if (rowNode === lastInRange || rowNode === firstInRange) {
53886 lastRowHit = true;
53887 if (rowNode === lastInRange) {
53888 lastRow = lastInRange;
53889 }
53890 else {
53891 lastRow = firstInRange;
53892 }
53893 }
53894 }
53895 });
53896 return result;
53897 };
53898 ClientSideRowModel.prototype.setDatasource = function (datasource) {
53899 console.error('AG Grid: should never call setDatasource on clientSideRowController');
53900 };
53901 ClientSideRowModel.prototype.getTopLevelNodes = function () {
53902 return this.rootNode ? this.rootNode.childrenAfterGroup : null;
53903 };
53904 ClientSideRowModel.prototype.getRootNode = function () {
53905 return this.rootNode;
53906 };
53907 ClientSideRowModel.prototype.getRow = function (index) {
53908 return this.rowsToDisplay[index];
53909 };
53910 ClientSideRowModel.prototype.isRowPresent = function (rowNode) {
53911 return this.rowsToDisplay.indexOf(rowNode) >= 0;
53912 };
53913 ClientSideRowModel.prototype.getRowIndexAtPixel = function (pixelToMatch) {
53914 if (this.isEmpty()) {
53915 return -1;
53916 }
53917 // do binary search of tree
53918 // http://oli.me.uk/2013/06/08/searching-javascript-arrays-with-a-binary-search/
53919 var bottomPointer = 0;
53920 var topPointer = this.rowsToDisplay.length - 1;
53921 // quick check, if the pixel is out of bounds, then return last row
53922 if (pixelToMatch <= 0) {
53923 // if pixel is less than or equal zero, it's always the first row
53924 return 0;
53925 }
53926 var lastNode = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].last(this.rowsToDisplay);
53927 if (lastNode.rowTop <= pixelToMatch) {
53928 return this.rowsToDisplay.length - 1;
53929 }
53930 while (true) {
53931 var midPointer = Math.floor((bottomPointer + topPointer) / 2);
53932 var currentRowNode = this.rowsToDisplay[midPointer];
53933 if (this.isRowInPixel(currentRowNode, pixelToMatch)) {
53934 return midPointer;
53935 }
53936 if (currentRowNode.rowTop < pixelToMatch) {
53937 bottomPointer = midPointer + 1;
53938 }
53939 else if (currentRowNode.rowTop > pixelToMatch) {
53940 topPointer = midPointer - 1;
53941 }
53942 }
53943 };
53944 ClientSideRowModel.prototype.isRowInPixel = function (rowNode, pixelToMatch) {
53945 var topPixel = rowNode.rowTop;
53946 var bottomPixel = rowNode.rowTop + rowNode.rowHeight;
53947 var pixelInRow = topPixel <= pixelToMatch && bottomPixel > pixelToMatch;
53948 return pixelInRow;
53949 };
53950 ClientSideRowModel.prototype.forEachLeafNode = function (callback) {
53951 if (this.rootNode.allLeafChildren) {
53952 this.rootNode.allLeafChildren.forEach(function (rowNode, index) { return callback(rowNode, index); });
53953 }
53954 };
53955 ClientSideRowModel.prototype.forEachNode = function (callback) {
53956 this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterGroup, callback, RecursionType.Normal, 0);
53957 };
53958 ClientSideRowModel.prototype.forEachNodeAfterFilter = function (callback) {
53959 this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterAggFilter, callback, RecursionType.AfterFilter, 0);
53960 };
53961 ClientSideRowModel.prototype.forEachNodeAfterFilterAndSort = function (callback) {
53962 this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterSort, callback, RecursionType.AfterFilterAndSort, 0);
53963 };
53964 ClientSideRowModel.prototype.forEachPivotNode = function (callback) {
53965 this.recursivelyWalkNodesAndCallback([this.rootNode], callback, RecursionType.PivotNodes, 0);
53966 };
53967 // iterates through each item in memory, and calls the callback function
53968 // nodes - the rowNodes to traverse
53969 // callback - the user provided callback
53970 // recursion type - need this to know what child nodes to recurse, eg if looking at all nodes, or filtered notes etc
53971 // index - works similar to the index in forEach in javascript's array function
53972 ClientSideRowModel.prototype.recursivelyWalkNodesAndCallback = function (nodes, callback, recursionType, index) {
53973 if (!nodes) {
53974 return index;
53975 }
53976 for (var i = 0; i < nodes.length; i++) {
53977 var node = nodes[i];
53978 callback(node, index++);
53979 // go to the next level if it is a group
53980 if (node.hasChildren()) {
53981 // depending on the recursion type, we pick a difference set of children
53982 var nodeChildren = null;
53983 switch (recursionType) {
53984 case RecursionType.Normal:
53985 nodeChildren = node.childrenAfterGroup;
53986 break;
53987 case RecursionType.AfterFilter:
53988 nodeChildren = node.childrenAfterAggFilter;
53989 break;
53990 case RecursionType.AfterFilterAndSort:
53991 nodeChildren = node.childrenAfterSort;
53992 break;
53993 case RecursionType.PivotNodes:
53994 // for pivot, we don't go below leafGroup levels
53995 nodeChildren = !node.leafGroup ? node.childrenAfterSort : null;
53996 break;
53997 }
53998 if (nodeChildren) {
53999 index = this.recursivelyWalkNodesAndCallback(nodeChildren, callback, recursionType, index);
54000 }
54001 }
54002 }
54003 return index;
54004 };
54005 // it's possible to recompute the aggregate without doing the other parts
54006 // + gridApi.recomputeAggregates()
54007 ClientSideRowModel.prototype.doAggregate = function (changedPath) {
54008 if (this.aggregationStage) {
54009 this.aggregationStage.execute({ rowNode: this.rootNode, changedPath: changedPath });
54010 }
54011 };
54012 ClientSideRowModel.prototype.doFilterAggregates = function (changedPath) {
54013 if (this.filterAggregatesStage) {
54014 this.filterAggregatesStage.execute({ rowNode: this.rootNode, changedPath: changedPath });
54015 }
54016 else {
54017 // If filterAggregatesStage is undefined, then so is the grouping stage, so all children should be on the rootNode.
54018 this.rootNode.childrenAfterAggFilter = this.rootNode.childrenAfterFilter;
54019 }
54020 };
54021 // + gridApi.expandAll()
54022 // + gridApi.collapseAll()
54023 ClientSideRowModel.prototype.expandOrCollapseAll = function (expand) {
54024 var usingTreeData = this.gridOptionsWrapper.isTreeData();
54025 var usingPivotMode = this.columnModel.isPivotActive();
54026 var recursiveExpandOrCollapse = function (rowNodes) {
54027 if (!rowNodes) {
54028 return;
54029 }
54030 rowNodes.forEach(function (rowNode) {
54031 var actionRow = function () {
54032 rowNode.expanded = expand;
54033 recursiveExpandOrCollapse(rowNode.childrenAfterGroup);
54034 };
54035 if (usingTreeData) {
54036 var hasChildren = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(rowNode.childrenAfterGroup);
54037 if (hasChildren) {
54038 actionRow();
54039 }
54040 return;
54041 }
54042 if (usingPivotMode) {
54043 var notLeafGroup = !rowNode.leafGroup;
54044 if (notLeafGroup) {
54045 actionRow();
54046 }
54047 return;
54048 }
54049 var isRowGroup = rowNode.group;
54050 if (isRowGroup) {
54051 actionRow();
54052 }
54053 });
54054 };
54055 if (this.rootNode) {
54056 recursiveExpandOrCollapse(this.rootNode.childrenAfterGroup);
54057 }
54058 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].MAP });
54059 var eventSource = expand ? 'expandAll' : 'collapseAll';
54060 var event = {
54061 api: this.gridApi,
54062 columnApi: this.columnApi,
54063 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_EXPAND_COLLAPSE_ALL,
54064 source: eventSource
54065 };
54066 this.eventService.dispatchEvent(event);
54067 };
54068 ClientSideRowModel.prototype.doSort = function (rowNodeTransactions, changedPath) {
54069 this.sortStage.execute({
54070 rowNode: this.rootNode,
54071 rowNodeTransactions: rowNodeTransactions,
54072 changedPath: changedPath
54073 });
54074 };
54075 ClientSideRowModel.prototype.doRowGrouping = function (groupState, rowNodeTransactions, rowNodeOrder, changedPath, afterColumnsChanged) {
54076 if (this.groupStage) {
54077 if (rowNodeTransactions) {
54078 this.groupStage.execute({
54079 rowNode: this.rootNode,
54080 rowNodeTransactions: rowNodeTransactions,
54081 rowNodeOrder: rowNodeOrder,
54082 changedPath: changedPath
54083 });
54084 }
54085 else {
54086 this.groupStage.execute({
54087 rowNode: this.rootNode,
54088 changedPath: changedPath,
54089 afterColumnsChanged: afterColumnsChanged
54090 });
54091 // set open/closed state on groups
54092 this.restoreGroupState(groupState);
54093 }
54094 if (this.gridOptionsWrapper.isGroupSelectsChildren()) {
54095 this.selectionService.updateGroupsFromChildrenSelections(changedPath);
54096 }
54097 }
54098 else {
54099 this.rootNode.childrenAfterGroup = this.rootNode.allLeafChildren;
54100 if (this.rootNode.sibling) {
54101 this.rootNode.sibling.childrenAfterGroup = this.rootNode.childrenAfterGroup;
54102 }
54103 this.rootNode.updateHasChildren();
54104 }
54105 };
54106 ClientSideRowModel.prototype.restoreGroupState = function (groupState) {
54107 if (!groupState) {
54108 return;
54109 }
54110 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].traverseNodesWithKey(this.rootNode.childrenAfterGroup, function (node, key) {
54111 // if the group was open last time, then open it this time. however
54112 // if was not open last time, then don't touch the group, so the 'groupDefaultExpanded'
54113 // setting will take effect.
54114 if (typeof groupState[key] === 'boolean') {
54115 node.expanded = groupState[key];
54116 }
54117 });
54118 };
54119 ClientSideRowModel.prototype.doFilter = function (changedPath) {
54120 this.filterStage.execute({ rowNode: this.rootNode, changedPath: changedPath });
54121 };
54122 ClientSideRowModel.prototype.doPivot = function (changedPath) {
54123 if (this.pivotStage) {
54124 this.pivotStage.execute({ rowNode: this.rootNode, changedPath: changedPath });
54125 }
54126 };
54127 ClientSideRowModel.prototype.getGroupState = function () {
54128 if (!this.rootNode.childrenAfterGroup || !this.gridOptionsWrapper.isRememberGroupStateWhenNewData()) {
54129 return null;
54130 }
54131 var result = {};
54132 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].traverseNodesWithKey(this.rootNode.childrenAfterGroup, function (node, key) { return result[key] = node.expanded; });
54133 return result;
54134 };
54135 ClientSideRowModel.prototype.getCopyOfNodesMap = function () {
54136 return this.nodeManager.getCopyOfNodesMap();
54137 };
54138 ClientSideRowModel.prototype.getRowNode = function (id) {
54139 // although id is typed a string, this could be called by the user, and they could have passed a number
54140 var idIsGroup = typeof id == 'string' && id.indexOf(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNode"].ID_PREFIX_ROW_GROUP) == 0;
54141 if (idIsGroup) {
54142 // only one users complained about getRowNode not working for groups, after years of
54143 // this working for normal rows. so have done quick implementation. if users complain
54144 // about performance, then GroupStage should store / manage created groups in a map,
54145 // which is a chunk of work.
54146 var res_1 = undefined;
54147 this.forEachNode(function (node) {
54148 if (node.id === id) {
54149 res_1 = node;
54150 }
54151 });
54152 return res_1;
54153 }
54154 return this.nodeManager.getRowNode(id);
54155 };
54156 // rows: the rows to put into the model
54157 ClientSideRowModel.prototype.setRowData = function (rowData) {
54158 // no need to invalidate cache, as the cache is stored on the rowNode,
54159 // so new rowNodes means the cache is wiped anyway.
54160 // remember group state, so we can expand groups that should be expanded
54161 var groupState = this.getGroupState();
54162 this.nodeManager.setRowData(rowData);
54163 // - clears selection
54164 this.selectionService.reset();
54165 // - updates filters
54166 this.filterManager.onNewRowsLoaded('rowDataUpdated');
54167 // this event kicks off:
54168 // - shows 'no rows' overlay if needed
54169 var rowDataChangedEvent = {
54170 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_ROW_DATA_CHANGED,
54171 api: this.gridApi,
54172 columnApi: this.columnApi
54173 };
54174 this.eventService.dispatchEvent(rowDataChangedEvent);
54175 this.refreshModel({
54176 step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING,
54177 groupState: groupState,
54178 newData: true
54179 });
54180 };
54181 ClientSideRowModel.prototype.batchUpdateRowData = function (rowDataTransaction, callback) {
54182 var _this = this;
54183 if (this.applyAsyncTransactionsTimeout == null) {
54184 this.rowDataTransactionBatch = [];
54185 var waitMillis = this.gridOptionsWrapper.getAsyncTransactionWaitMillis();
54186 this.applyAsyncTransactionsTimeout = window.setTimeout(function () {
54187 _this.executeBatchUpdateRowData();
54188 }, waitMillis);
54189 }
54190 this.rowDataTransactionBatch.push({ rowDataTransaction: rowDataTransaction, callback: callback });
54191 };
54192 ClientSideRowModel.prototype.flushAsyncTransactions = function () {
54193 if (this.applyAsyncTransactionsTimeout != null) {
54194 clearTimeout(this.applyAsyncTransactionsTimeout);
54195 this.executeBatchUpdateRowData();
54196 }
54197 };
54198 ClientSideRowModel.prototype.executeBatchUpdateRowData = function () {
54199 var _this = this;
54200 this.valueCache.onDataChanged();
54201 var callbackFuncsBound = [];
54202 var rowNodeTrans = [];
54203 // The rowGroup stage uses rowNodeOrder if order was provided. if we didn't pass 'true' to
54204 // commonUpdateRowData, using addIndex would have no effect when grouping.
54205 var forceRowNodeOrder = false;
54206 if (this.rowDataTransactionBatch) {
54207 this.rowDataTransactionBatch.forEach(function (tranItem) {
54208 var rowNodeTran = _this.nodeManager.updateRowData(tranItem.rowDataTransaction, undefined);
54209 rowNodeTrans.push(rowNodeTran);
54210 if (tranItem.callback) {
54211 callbackFuncsBound.push(tranItem.callback.bind(null, rowNodeTran));
54212 }
54213 if (typeof tranItem.rowDataTransaction.addIndex === 'number') {
54214 forceRowNodeOrder = true;
54215 }
54216 });
54217 }
54218 this.commonUpdateRowData(rowNodeTrans, undefined, forceRowNodeOrder);
54219 // do callbacks in next VM turn so it's async
54220 if (callbackFuncsBound.length > 0) {
54221 window.setTimeout(function () {
54222 callbackFuncsBound.forEach(function (func) { return func(); });
54223 }, 0);
54224 }
54225 if (rowNodeTrans.length > 0) {
54226 var event_1 = {
54227 api: this.gridOptionsWrapper.getApi(),
54228 columnApi: this.gridOptionsWrapper.getColumnApi(),
54229 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_ASYNC_TRANSACTIONS_FLUSHED,
54230 results: rowNodeTrans
54231 };
54232 this.eventService.dispatchEvent(event_1);
54233 }
54234 this.rowDataTransactionBatch = null;
54235 this.applyAsyncTransactionsTimeout = undefined;
54236 };
54237 ClientSideRowModel.prototype.updateRowData = function (rowDataTran, rowNodeOrder) {
54238 this.valueCache.onDataChanged();
54239 var rowNodeTran = this.nodeManager.updateRowData(rowDataTran, rowNodeOrder);
54240 // if doing immutableData, addIndex is never present. however if doing standard transaction, and user
54241 // provided addIndex, then this is used in updateRowData. However if doing Enterprise, then the rowGroup
54242 // stage also uses the
54243 var forceRowNodeOrder = typeof rowDataTran.addIndex === 'number';
54244 this.commonUpdateRowData([rowNodeTran], rowNodeOrder, forceRowNodeOrder);
54245 return rowNodeTran;
54246 };
54247 ClientSideRowModel.prototype.createRowNodeOrder = function () {
54248 var suppressSortOrder = this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder();
54249 if (suppressSortOrder) {
54250 return;
54251 }
54252 var orderMap = {};
54253 if (this.rootNode && this.rootNode.allLeafChildren) {
54254 for (var index = 0; index < this.rootNode.allLeafChildren.length; index++) {
54255 var node = this.rootNode.allLeafChildren[index];
54256 orderMap[node.id] = index;
54257 }
54258 }
54259 return orderMap;
54260 };
54261 // common to updateRowData and batchUpdateRowData
54262 ClientSideRowModel.prototype.commonUpdateRowData = function (rowNodeTrans, rowNodeOrder, forceRowNodeOrder) {
54263 var animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();
54264 if (forceRowNodeOrder) {
54265 rowNodeOrder = this.createRowNodeOrder();
54266 }
54267 this.refreshModel({
54268 step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING,
54269 rowNodeTransactions: rowNodeTrans,
54270 rowNodeOrder: rowNodeOrder,
54271 keepRenderedRows: true,
54272 keepEditingRows: true,
54273 animate: animate
54274 });
54275 var event = {
54276 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_ROW_DATA_UPDATED,
54277 api: this.gridApi,
54278 columnApi: this.columnApi
54279 };
54280 this.eventService.dispatchEvent(event);
54281 };
54282 ClientSideRowModel.prototype.doRowsToDisplay = function () {
54283 this.rowsToDisplay = this.flattenStage.execute({ rowNode: this.rootNode });
54284 };
54285 ClientSideRowModel.prototype.onRowHeightChanged = function () {
54286 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].MAP, keepRenderedRows: true, keepEditingRows: true });
54287 };
54288 ClientSideRowModel.prototype.resetRowHeights = function () {
54289 var atLeastOne = false;
54290 this.forEachNode(function (rowNode) {
54291 rowNode.setRowHeight(rowNode.rowHeight, true);
54292 // we keep the height each row is at, however we set estimated=true rather than clear the height.
54293 // this means the grid will not reset the row heights back to defaults, rather it will re-calc
54294 // the height for each row as the row is displayed. otherwise the scroll will jump when heights are reset.
54295 var detailNode = rowNode.detailNode;
54296 if (detailNode) {
54297 detailNode.setRowHeight(detailNode.rowHeight, true);
54298 }
54299 atLeastOne = true;
54300 });
54301 if (atLeastOne) {
54302 this.onRowHeightChanged();
54303 }
54304 };
54305 __decorate([
54306 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
54307 ], ClientSideRowModel.prototype, "columnModel", void 0);
54308 __decorate([
54309 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('selectionService')
54310 ], ClientSideRowModel.prototype, "selectionService", void 0);
54311 __decorate([
54312 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
54313 ], ClientSideRowModel.prototype, "filterManager", void 0);
54314 __decorate([
54315 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueCache')
54316 ], ClientSideRowModel.prototype, "valueCache", void 0);
54317 __decorate([
54318 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
54319 ], ClientSideRowModel.prototype, "columnApi", void 0);
54320 __decorate([
54321 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
54322 ], ClientSideRowModel.prototype, "gridApi", void 0);
54323 __decorate([
54324 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('animationFrameService')
54325 ], ClientSideRowModel.prototype, "animationFrameService", void 0);
54326 __decorate([
54327 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('beans')
54328 ], ClientSideRowModel.prototype, "beans", void 0);
54329 __decorate([
54330 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterStage')
54331 ], ClientSideRowModel.prototype, "filterStage", void 0);
54332 __decorate([
54333 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortStage')
54334 ], ClientSideRowModel.prototype, "sortStage", void 0);
54335 __decorate([
54336 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('flattenStage')
54337 ], ClientSideRowModel.prototype, "flattenStage", void 0);
54338 __decorate([
54339 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])('groupStage')
54340 ], ClientSideRowModel.prototype, "groupStage", void 0);
54341 __decorate([
54342 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])('aggregationStage')
54343 ], ClientSideRowModel.prototype, "aggregationStage", void 0);
54344 __decorate([
54345 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])('pivotStage')
54346 ], ClientSideRowModel.prototype, "pivotStage", void 0);
54347 __decorate([
54348 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])('filterAggregatesStage')
54349 ], ClientSideRowModel.prototype, "filterAggregatesStage", void 0);
54350 __decorate([
54351 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
54352 ], ClientSideRowModel.prototype, "init", null);
54353 ClientSideRowModel = __decorate([
54354 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('rowModel')
54355 ], ClientSideRowModel);
54356 return ClientSideRowModel;
54357}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
54358
54359
54360
54361/***/ }),
54362/* 252 */
54363/***/ (function(module, __webpack_exports__, __webpack_require__) {
54364
54365"use strict";
54366__webpack_require__.r(__webpack_exports__);
54367/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientSideNodeManager", function() { return ClientSideNodeManager; });
54368/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
54369var __read = (undefined && undefined.__read) || function (o, n) {
54370 var m = typeof Symbol === "function" && o[Symbol.iterator];
54371 if (!m) return o;
54372 var i = m.call(o), r, ar = [], e;
54373 try {
54374 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
54375 }
54376 catch (error) { e = { error: error }; }
54377 finally {
54378 try {
54379 if (r && !r.done && (m = i["return"])) m.call(i);
54380 }
54381 finally { if (e) throw e.error; }
54382 }
54383 return ar;
54384};
54385var __spread = (undefined && undefined.__spread) || function () {
54386 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
54387 return ar;
54388};
54389
54390var ClientSideNodeManager = /** @class */ (function () {
54391 function ClientSideNodeManager(rootNode, gridOptionsWrapper, eventService, columnModel, gridApi, columnApi, selectionService, beans) {
54392 this.nextId = 0;
54393 // when user is provide the id's, we also keep a map of ids to row nodes for convenience
54394 this.allNodesMap = {};
54395 this.rootNode = rootNode;
54396 this.gridOptionsWrapper = gridOptionsWrapper;
54397 this.eventService = eventService;
54398 this.columnModel = columnModel;
54399 this.gridApi = gridApi;
54400 this.columnApi = columnApi;
54401 this.beans = beans;
54402 this.selectionService = selectionService;
54403 this.rootNode.group = true;
54404 this.rootNode.level = -1;
54405 this.rootNode.id = ClientSideNodeManager.ROOT_NODE_ID;
54406 this.rootNode.allLeafChildren = [];
54407 this.rootNode.childrenAfterGroup = [];
54408 this.rootNode.childrenAfterSort = [];
54409 this.rootNode.childrenAfterAggFilter = [];
54410 this.rootNode.childrenAfterFilter = [];
54411 // if we make this class a bean, then can annotate postConstruct
54412 this.postConstruct();
54413 }
54414 // @PostConstruct - this is not a bean, so postConstruct called by constructor
54415 ClientSideNodeManager.prototype.postConstruct = function () {
54416 // func below doesn't have 'this' pointer, so need to pull out these bits
54417 this.suppressParentsInRowNodes = this.gridOptionsWrapper.isSuppressParentsInRowNodes();
54418 this.isRowMasterFunc = this.gridOptionsWrapper.getIsRowMasterFunc();
54419 this.doingTreeData = this.gridOptionsWrapper.isTreeData();
54420 this.doingMasterDetail = this.gridOptionsWrapper.isMasterDetail();
54421 };
54422 ClientSideNodeManager.prototype.getCopyOfNodesMap = function () {
54423 return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].cloneObject(this.allNodesMap);
54424 };
54425 ClientSideNodeManager.prototype.getRowNode = function (id) {
54426 return this.allNodesMap[id];
54427 };
54428 ClientSideNodeManager.prototype.setRowData = function (rowData) {
54429 var _this = this;
54430 if (typeof rowData === 'string') {
54431 console.warn('AG Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first');
54432 return;
54433 }
54434 var rootNode = this.rootNode;
54435 var sibling = this.rootNode.sibling;
54436 rootNode.childrenAfterFilter = null;
54437 rootNode.childrenAfterGroup = null;
54438 rootNode.childrenAfterAggFilter = null;
54439 rootNode.childrenAfterSort = null;
54440 rootNode.childrenMapped = null;
54441 rootNode.updateHasChildren();
54442 this.nextId = 0;
54443 this.allNodesMap = {};
54444 if (rowData) {
54445 // we use rootNode as the parent, however if using ag-grid-enterprise, the grouping stage
54446 // sets the parent node on each row (even if we are not grouping). so setting parent node
54447 // here is for benefit of ag-grid-community users
54448 rootNode.allLeafChildren = rowData.map(function (dataItem) { return _this.createNode(dataItem, _this.rootNode, ClientSideNodeManager.TOP_LEVEL); });
54449 }
54450 else {
54451 rootNode.allLeafChildren = [];
54452 rootNode.childrenAfterGroup = [];
54453 }
54454 if (sibling) {
54455 sibling.childrenAfterFilter = rootNode.childrenAfterFilter;
54456 sibling.childrenAfterGroup = rootNode.childrenAfterGroup;
54457 sibling.childrenAfterAggFilter = rootNode.childrenAfterAggFilter;
54458 sibling.childrenAfterSort = rootNode.childrenAfterSort;
54459 sibling.childrenMapped = rootNode.childrenMapped;
54460 sibling.allLeafChildren = rootNode.allLeafChildren;
54461 }
54462 };
54463 ClientSideNodeManager.prototype.updateRowData = function (rowDataTran, rowNodeOrder) {
54464 var rowNodeTransaction = {
54465 remove: [],
54466 update: [],
54467 add: []
54468 };
54469 var nodesToUnselect = [];
54470 this.executeRemove(rowDataTran, rowNodeTransaction, nodesToUnselect);
54471 this.executeUpdate(rowDataTran, rowNodeTransaction, nodesToUnselect);
54472 this.executeAdd(rowDataTran, rowNodeTransaction);
54473 this.updateSelection(nodesToUnselect);
54474 if (rowNodeOrder) {
54475 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].sortRowNodesByOrder(this.rootNode.allLeafChildren, rowNodeOrder);
54476 }
54477 return rowNodeTransaction;
54478 };
54479 ClientSideNodeManager.prototype.updateSelection = function (nodesToUnselect) {
54480 var selectionChanged = nodesToUnselect.length > 0;
54481 if (selectionChanged) {
54482 nodesToUnselect.forEach(function (rowNode) {
54483 rowNode.setSelected(false, false, true);
54484 });
54485 }
54486 // we do this regardless of nodes to unselect or not, as it's possible
54487 // a new node was inserted, so a parent that was previously selected (as all
54488 // children were selected) should not be tri-state (as new one unselected against
54489 // all other selected children).
54490 this.selectionService.updateGroupsFromChildrenSelections();
54491 if (selectionChanged) {
54492 var event_1 = {
54493 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SELECTION_CHANGED,
54494 api: this.gridApi,
54495 columnApi: this.columnApi
54496 };
54497 this.eventService.dispatchEvent(event_1);
54498 }
54499 };
54500 ClientSideNodeManager.prototype.executeAdd = function (rowDataTran, rowNodeTransaction) {
54501 var _this = this;
54502 var add = rowDataTran.add, addIndex = rowDataTran.addIndex;
54503 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missingOrEmpty(add)) {
54504 return;
54505 }
54506 // create new row nodes for each data item
54507 var newNodes = add.map(function (item) { return _this.createNode(item, _this.rootNode, ClientSideNodeManager.TOP_LEVEL); });
54508 // add new row nodes to the root nodes 'allLeafChildren'
54509 var useIndex = typeof addIndex === 'number' && addIndex >= 0;
54510 var nodesBeforeIndex;
54511 var nodesAfterIndex;
54512 if (useIndex) {
54513 // new rows are inserted in one go by concatenating them in between the existing rows at the desired index.
54514 // this is much faster than splicing them individually into 'allLeafChildren' when there are large inserts.
54515 // allLeafChildren can be out of order, so we loop over all the Nodes to find the correct index that
54516 // represents the position `addIndex` intended to be.
54517 var allLeafChildren_1 = this.rootNode.allLeafChildren;
54518 // if addIndex is 0, it should always be added at the start of the array
54519 // there is no need to verify the order of node by nodeIndex.
54520 var normalizedAddIndex = addIndex === 0 ? 0 : (allLeafChildren_1.reduce(function (prevIdx, currNode, currIdx) {
54521 var _a;
54522 var rowIndex = currNode.rowIndex;
54523 var prevValueAtIndex = (_a = allLeafChildren_1[prevIdx]) === null || _a === void 0 ? void 0 : _a.rowIndex;
54524 var shouldUpdateIndex = rowIndex != null && prevValueAtIndex != null && rowIndex < addIndex && rowIndex > prevValueAtIndex;
54525 return shouldUpdateIndex ? currIdx : prevIdx;
54526 }, 0) + 1);
54527 nodesBeforeIndex = allLeafChildren_1.slice(0, normalizedAddIndex);
54528 nodesAfterIndex = allLeafChildren_1.slice(normalizedAddIndex, allLeafChildren_1.length);
54529 }
54530 else {
54531 nodesBeforeIndex = this.rootNode.allLeafChildren;
54532 nodesAfterIndex = [];
54533 }
54534 this.rootNode.allLeafChildren = __spread(nodesBeforeIndex, newNodes, nodesAfterIndex);
54535 if (this.rootNode.sibling) {
54536 this.rootNode.sibling.allLeafChildren = this.rootNode.allLeafChildren;
54537 }
54538 // add new row nodes to the transaction add items
54539 rowNodeTransaction.add = newNodes;
54540 };
54541 ClientSideNodeManager.prototype.executeRemove = function (rowDataTran, rowNodeTransaction, nodesToUnselect) {
54542 var _this = this;
54543 var remove = rowDataTran.remove;
54544 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missingOrEmpty(remove)) {
54545 return;
54546 }
54547 var rowIdsRemoved = {};
54548 remove.forEach(function (item) {
54549 var rowNode = _this.lookupRowNode(item);
54550 if (!rowNode) {
54551 return;
54552 }
54553 // do delete - setting 'suppressFinishActions = true' to ensure EVENT_SELECTION_CHANGED is not raised for
54554 // each row node updated, instead it is raised once by the calling code if any selected nodes exist.
54555 if (rowNode.isSelected()) {
54556 nodesToUnselect.push(rowNode);
54557 }
54558 // so row renderer knows to fade row out (and not reposition it)
54559 rowNode.clearRowTopAndRowIndex();
54560 // NOTE: were we could remove from allLeaveChildren, however _.removeFromArray() is expensive, especially
54561 // if called multiple times (eg deleting lots of rows) and if allLeafChildren is a large list
54562 rowIdsRemoved[rowNode.id] = true;
54563 // _.removeFromArray(this.rootNode.allLeafChildren, rowNode);
54564 delete _this.allNodesMap[rowNode.id];
54565 rowNodeTransaction.remove.push(rowNode);
54566 });
54567 this.rootNode.allLeafChildren = this.rootNode.allLeafChildren.filter(function (rowNode) { return !rowIdsRemoved[rowNode.id]; });
54568 if (this.rootNode.sibling) {
54569 this.rootNode.sibling.allLeafChildren = this.rootNode.allLeafChildren;
54570 }
54571 };
54572 ClientSideNodeManager.prototype.executeUpdate = function (rowDataTran, rowNodeTransaction, nodesToUnselect) {
54573 var _this = this;
54574 var update = rowDataTran.update;
54575 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missingOrEmpty(update)) {
54576 return;
54577 }
54578 update.forEach(function (item) {
54579 var rowNode = _this.lookupRowNode(item);
54580 if (!rowNode) {
54581 return;
54582 }
54583 rowNode.updateData(item);
54584 if (!rowNode.selectable && rowNode.isSelected()) {
54585 nodesToUnselect.push(rowNode);
54586 }
54587 _this.setMasterForRow(rowNode, item, ClientSideNodeManager.TOP_LEVEL, false);
54588 rowNodeTransaction.update.push(rowNode);
54589 });
54590 };
54591 ClientSideNodeManager.prototype.lookupRowNode = function (data) {
54592 var getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();
54593 var rowNode;
54594 if (getRowIdFunc) {
54595 // find rowNode using id
54596 var id = getRowIdFunc({ data: data, level: 0 });
54597 rowNode = this.allNodesMap[id];
54598 if (!rowNode) {
54599 console.error("AG Grid: could not find row id=" + id + ", data item was not found for this id");
54600 return null;
54601 }
54602 }
54603 else {
54604 // find rowNode using object references
54605 rowNode = this.rootNode.allLeafChildren.find(function (node) { return node.data === data; });
54606 if (!rowNode) {
54607 console.error("AG Grid: could not find data item as object was not found", data);
54608 console.error("Consider using getRowId to help the Grid find matching row data");
54609 return null;
54610 }
54611 }
54612 return rowNode || null;
54613 };
54614 ClientSideNodeManager.prototype.createNode = function (dataItem, parent, level) {
54615 var node = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNode"](this.beans);
54616 node.group = false;
54617 this.setMasterForRow(node, dataItem, level, true);
54618 if (parent && !this.suppressParentsInRowNodes) {
54619 node.parent = parent;
54620 }
54621 node.level = level;
54622 node.setDataAndId(dataItem, this.nextId.toString());
54623 if (this.allNodesMap[node.id]) {
54624 console.warn("AG Grid: duplicate node id '" + node.id + "' detected from getRowId callback, this could cause issues in your grid.");
54625 }
54626 this.allNodesMap[node.id] = node;
54627 this.nextId++;
54628 return node;
54629 };
54630 ClientSideNodeManager.prototype.setMasterForRow = function (rowNode, data, level, setExpanded) {
54631 if (this.doingTreeData) {
54632 rowNode.setMaster(false);
54633 if (setExpanded) {
54634 rowNode.expanded = false;
54635 }
54636 }
54637 else {
54638 // this is the default, for when doing grid data
54639 if (this.doingMasterDetail) {
54640 // if we are doing master detail, then the
54641 // default is that everything can be a Master Row.
54642 if (this.isRowMasterFunc) {
54643 rowNode.setMaster(this.isRowMasterFunc(data));
54644 }
54645 else {
54646 rowNode.setMaster(true);
54647 }
54648 }
54649 else {
54650 rowNode.setMaster(false);
54651 }
54652 if (setExpanded) {
54653 var rowGroupColumns = this.columnModel.getRowGroupColumns();
54654 var numRowGroupColumns = rowGroupColumns ? rowGroupColumns.length : 0;
54655 // need to take row group into account when determining level
54656 var masterRowLevel = level + numRowGroupColumns;
54657 rowNode.expanded = rowNode.master ? this.isExpanded(masterRowLevel) : false;
54658 }
54659 }
54660 };
54661 ClientSideNodeManager.prototype.isExpanded = function (level) {
54662 var expandByDefault = this.gridOptionsWrapper.getGroupDefaultExpanded();
54663 if (expandByDefault === -1) {
54664 return true;
54665 }
54666 return level < expandByDefault;
54667 };
54668 ClientSideNodeManager.TOP_LEVEL = 0;
54669 ClientSideNodeManager.ROOT_NODE_ID = 'ROOT_NODE_ID';
54670 return ClientSideNodeManager;
54671}());
54672
54673
54674
54675/***/ }),
54676/* 253 */
54677/***/ (function(module, __webpack_exports__, __webpack_require__) {
54678
54679"use strict";
54680__webpack_require__.r(__webpack_exports__);
54681/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterStage", function() { return FilterStage; });
54682/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
54683var __extends = (undefined && undefined.__extends) || (function () {
54684 var extendStatics = function (d, b) {
54685 extendStatics = Object.setPrototypeOf ||
54686 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
54687 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
54688 return extendStatics(d, b);
54689 };
54690 return function (d, b) {
54691 extendStatics(d, b);
54692 function __() { this.constructor = d; }
54693 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54694 };
54695})();
54696var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
54697 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
54698 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
54699 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
54700 return c > 3 && r && Object.defineProperty(target, key, r), r;
54701};
54702
54703var FilterStage = /** @class */ (function (_super) {
54704 __extends(FilterStage, _super);
54705 function FilterStage() {
54706 return _super !== null && _super.apply(this, arguments) || this;
54707 }
54708 FilterStage.prototype.execute = function (params) {
54709 var changedPath = params.changedPath;
54710 this.filterService.filter(changedPath);
54711 };
54712 __decorate([
54713 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterService')
54714 ], FilterStage.prototype, "filterService", void 0);
54715 FilterStage = __decorate([
54716 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('filterStage')
54717 ], FilterStage);
54718 return FilterStage;
54719}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
54720
54721
54722
54723/***/ }),
54724/* 254 */
54725/***/ (function(module, __webpack_exports__, __webpack_require__) {
54726
54727"use strict";
54728__webpack_require__.r(__webpack_exports__);
54729/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortStage", function() { return SortStage; });
54730/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
54731var __extends = (undefined && undefined.__extends) || (function () {
54732 var extendStatics = function (d, b) {
54733 extendStatics = Object.setPrototypeOf ||
54734 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
54735 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
54736 return extendStatics(d, b);
54737 };
54738 return function (d, b) {
54739 extendStatics(d, b);
54740 function __() { this.constructor = d; }
54741 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54742 };
54743})();
54744var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
54745 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
54746 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
54747 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
54748 return c > 3 && r && Object.defineProperty(target, key, r), r;
54749};
54750
54751var SortStage = /** @class */ (function (_super) {
54752 __extends(SortStage, _super);
54753 function SortStage() {
54754 return _super !== null && _super.apply(this, arguments) || this;
54755 }
54756 SortStage.prototype.execute = function (params) {
54757 var sortOptions = this.sortController.getSortOptions();
54758 var sortActive = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(sortOptions) && sortOptions.length > 0;
54759 var deltaSort = sortActive
54760 && _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(params.rowNodeTransactions)
54761 // in time we can remove this check, so that delta sort is always
54762 // on if transactions are present. it's off for now so that we can
54763 // selectively turn it on and test it with some select users before
54764 // rolling out to everyone.
54765 && this.gridOptionsWrapper.isDeltaSort();
54766 var sortContainsGroupColumns = sortOptions.some(function (opt) { return !!opt.column.getColDef().showRowGroup; });
54767 this.sortService.sort(sortOptions, sortActive, deltaSort, params.rowNodeTransactions, params.changedPath, sortContainsGroupColumns);
54768 };
54769 __decorate([
54770 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortService')
54771 ], SortStage.prototype, "sortService", void 0);
54772 __decorate([
54773 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortController')
54774 ], SortStage.prototype, "sortController", void 0);
54775 __decorate([
54776 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
54777 ], SortStage.prototype, "columnModel", void 0);
54778 SortStage = __decorate([
54779 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('sortStage')
54780 ], SortStage);
54781 return SortStage;
54782}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
54783
54784
54785
54786/***/ }),
54787/* 255 */
54788/***/ (function(module, __webpack_exports__, __webpack_require__) {
54789
54790"use strict";
54791__webpack_require__.r(__webpack_exports__);
54792/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FlattenStage", function() { return FlattenStage; });
54793/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
54794var __extends = (undefined && undefined.__extends) || (function () {
54795 var extendStatics = function (d, b) {
54796 extendStatics = Object.setPrototypeOf ||
54797 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
54798 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
54799 return extendStatics(d, b);
54800 };
54801 return function (d, b) {
54802 extendStatics(d, b);
54803 function __() { this.constructor = d; }
54804 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54805 };
54806})();
54807var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
54808 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
54809 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
54810 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
54811 return c > 3 && r && Object.defineProperty(target, key, r), r;
54812};
54813
54814var FlattenStage = /** @class */ (function (_super) {
54815 __extends(FlattenStage, _super);
54816 function FlattenStage() {
54817 return _super !== null && _super.apply(this, arguments) || this;
54818 }
54819 FlattenStage.prototype.execute = function (params) {
54820 var rootNode = params.rowNode;
54821 // even if not doing grouping, we do the mapping, as the client might
54822 // of passed in data that already has a grouping in it somewhere
54823 var result = [];
54824 // putting value into a wrapper so it's passed by reference
54825 var nextRowTop = { value: 0 };
54826 var skipLeafNodes = this.columnModel.isPivotMode();
54827 // if we are reducing, and not grouping, then we want to show the root node, as that
54828 // is where the pivot values are
54829 var showRootNode = skipLeafNodes && rootNode.leafGroup;
54830 var topList = showRootNode ? [rootNode] : rootNode.childrenAfterSort;
54831 this.recursivelyAddToRowsToDisplay(topList, result, nextRowTop, skipLeafNodes, 0);
54832 // we do not want the footer total if the gris is empty
54833 var atLeastOneRowPresent = result.length > 0;
54834 var includeGroupTotalFooter = !showRootNode
54835 // don't show total footer when showRootNode is true (i.e. in pivot mode and no groups)
54836 && atLeastOneRowPresent
54837 && this.gridOptionsWrapper.isGroupIncludeTotalFooter();
54838 if (includeGroupTotalFooter) {
54839 this.ensureFooterNodeExists(rootNode);
54840 this.addRowNodeToRowsToDisplay(rootNode.sibling, result, nextRowTop, 0);
54841 }
54842 return result;
54843 };
54844 FlattenStage.prototype.recursivelyAddToRowsToDisplay = function (rowsToFlatten, result, nextRowTop, skipLeafNodes, uiLevel) {
54845 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missingOrEmpty(rowsToFlatten)) {
54846 return;
54847 }
54848 var hideOpenParents = this.gridOptionsWrapper.isGroupHideOpenParents();
54849 // these two are mutually exclusive, so if first set, we don't set the second
54850 var groupRemoveSingleChildren = this.gridOptionsWrapper.isGroupRemoveSingleChildren();
54851 var groupRemoveLowestSingleChildren = !groupRemoveSingleChildren && this.gridOptionsWrapper.isGroupRemoveLowestSingleChildren();
54852 for (var i = 0; i < rowsToFlatten.length; i++) {
54853 var rowNode = rowsToFlatten[i];
54854 // check all these cases, for working out if this row should be included in the final mapped list
54855 var isParent = rowNode.hasChildren();
54856 var isSkippedLeafNode = skipLeafNodes && !isParent;
54857 var isRemovedSingleChildrenGroup = groupRemoveSingleChildren &&
54858 isParent &&
54859 rowNode.childrenAfterGroup.length === 1;
54860 var isRemovedLowestSingleChildrenGroup = groupRemoveLowestSingleChildren &&
54861 isParent &&
54862 rowNode.leafGroup &&
54863 rowNode.childrenAfterGroup.length === 1;
54864 // hide open parents means when group is open, we don't show it. we also need to make sure the
54865 // group is expandable in the first place (as leaf groups are not expandable if pivot mode is on).
54866 // the UI will never allow expanding leaf groups, however the user might via the API (or menu option 'expand all')
54867 var neverAllowToExpand = skipLeafNodes && rowNode.leafGroup;
54868 var isHiddenOpenParent = hideOpenParents && rowNode.expanded && !rowNode.master && (!neverAllowToExpand);
54869 var thisRowShouldBeRendered = !isSkippedLeafNode && !isHiddenOpenParent &&
54870 !isRemovedSingleChildrenGroup && !isRemovedLowestSingleChildrenGroup;
54871 if (thisRowShouldBeRendered) {
54872 this.addRowNodeToRowsToDisplay(rowNode, result, nextRowTop, uiLevel);
54873 }
54874 // if we are pivoting, we never map below the leaf group
54875 if (skipLeafNodes && rowNode.leafGroup) {
54876 continue;
54877 }
54878 if (isParent) {
54879 var excludedParent = isRemovedSingleChildrenGroup || isRemovedLowestSingleChildrenGroup;
54880 // we traverse the group if it is expended, however we always traverse if the parent node
54881 // was removed (as the group will never be opened if it is not displayed, we show the children instead)
54882 if (rowNode.expanded || excludedParent) {
54883 // if the parent was excluded, then ui level is that of the parent
54884 var uiLevelForChildren = excludedParent ? uiLevel : uiLevel + 1;
54885 this.recursivelyAddToRowsToDisplay(rowNode.childrenAfterSort, result, nextRowTop, skipLeafNodes, uiLevelForChildren);
54886 // put a footer in if user is looking for it
54887 if (this.gridOptionsWrapper.isGroupIncludeFooter()) {
54888 this.ensureFooterNodeExists(rowNode);
54889 this.addRowNodeToRowsToDisplay(rowNode.sibling, result, nextRowTop, uiLevel);
54890 }
54891 }
54892 }
54893 else if (rowNode.master && rowNode.expanded) {
54894 var detailNode = this.createDetailNode(rowNode);
54895 this.addRowNodeToRowsToDisplay(detailNode, result, nextRowTop, uiLevel);
54896 }
54897 }
54898 };
54899 // duplicated method, it's also in floatingRowModel
54900 FlattenStage.prototype.addRowNodeToRowsToDisplay = function (rowNode, result, nextRowTop, uiLevel) {
54901 var isGroupMultiAutoColumn = this.gridOptionsWrapper.isGroupMultiAutoColumn();
54902 result.push(rowNode);
54903 rowNode.setUiLevel(isGroupMultiAutoColumn ? 0 : uiLevel);
54904 };
54905 FlattenStage.prototype.ensureFooterNodeExists = function (groupNode) {
54906 // only create footer node once, otherwise we have daemons and
54907 // the animate screws up with the daemons hanging around
54908 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(groupNode.sibling)) {
54909 return;
54910 }
54911 var footerNode = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNode"](this.beans);
54912 Object.keys(groupNode).forEach(function (key) {
54913 footerNode[key] = groupNode[key];
54914 });
54915 footerNode.footer = true;
54916 footerNode.setRowTop(null);
54917 footerNode.setRowIndex(null);
54918 // manually set oldRowTop to null so we discard any
54919 // previous information about its position.
54920 footerNode.oldRowTop = null;
54921 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(footerNode.id)) {
54922 footerNode.id = 'rowGroupFooter_' + footerNode.id;
54923 }
54924 // get both header and footer to reference each other as siblings. this is never undone,
54925 // only overwritten. so if a group is expanded, then contracted, it will have a ghost
54926 // sibling - but that's fine, as we can ignore this if the header is contracted.
54927 footerNode.sibling = groupNode;
54928 groupNode.sibling = footerNode;
54929 };
54930 FlattenStage.prototype.createDetailNode = function (masterNode) {
54931 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(masterNode.detailNode)) {
54932 return masterNode.detailNode;
54933 }
54934 var detailNode = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNode"](this.beans);
54935 detailNode.detail = true;
54936 detailNode.selectable = false;
54937 detailNode.parent = masterNode;
54938 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(masterNode.id)) {
54939 detailNode.id = 'detail_' + masterNode.id;
54940 }
54941 detailNode.data = masterNode.data;
54942 detailNode.level = masterNode.level + 1;
54943 masterNode.detailNode = detailNode;
54944 return detailNode;
54945 };
54946 __decorate([
54947 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
54948 ], FlattenStage.prototype, "columnModel", void 0);
54949 __decorate([
54950 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('beans')
54951 ], FlattenStage.prototype, "beans", void 0);
54952 FlattenStage = __decorate([
54953 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('flattenStage')
54954 ], FlattenStage);
54955 return FlattenStage;
54956}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
54957
54958
54959
54960/***/ }),
54961/* 256 */
54962/***/ (function(module, __webpack_exports__, __webpack_require__) {
54963
54964"use strict";
54965__webpack_require__.r(__webpack_exports__);
54966/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortService", function() { return SortService; });
54967/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
54968var __extends = (undefined && undefined.__extends) || (function () {
54969 var extendStatics = function (d, b) {
54970 extendStatics = Object.setPrototypeOf ||
54971 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
54972 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
54973 return extendStatics(d, b);
54974 };
54975 return function (d, b) {
54976 extendStatics(d, b);
54977 function __() { this.constructor = d; }
54978 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54979 };
54980})();
54981var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
54982 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
54983 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
54984 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
54985 return c > 3 && r && Object.defineProperty(target, key, r), r;
54986};
54987
54988var SortService = /** @class */ (function (_super) {
54989 __extends(SortService, _super);
54990 function SortService() {
54991 return _super !== null && _super.apply(this, arguments) || this;
54992 }
54993 SortService.prototype.init = function () {
54994 this.postSortFunc = this.gridOptionsWrapper.getPostSortFunc();
54995 };
54996 SortService.prototype.sort = function (sortOptions, sortActive, useDeltaSort, rowNodeTransactions, changedPath, sortContainsGroupColumns) {
54997 var _this = this;
54998 var groupMaintainOrder = this.gridOptionsWrapper.isGroupMaintainOrder();
54999 var groupColumnsPresent = this.columnModel.getAllGridColumns().some(function (c) { return c.isRowGroupActive(); });
55000 var allDirtyNodes = {};
55001 if (useDeltaSort && rowNodeTransactions) {
55002 allDirtyNodes = this.calculateDirtyNodes(rowNodeTransactions);
55003 }
55004 var isPivotMode = this.columnModel.isPivotMode();
55005 var callback = function (rowNode) {
55006 // we clear out the 'pull down open parents' first, as the values mix up the sorting
55007 _this.pullDownGroupDataForHideOpenParents(rowNode.childrenAfterAggFilter, true);
55008 // It's pointless to sort rows which aren't being displayed. in pivot mode we don't need to sort the leaf group children.
55009 var skipSortingPivotLeafs = isPivotMode && rowNode.leafGroup;
55010 // Javascript sort is non deterministic when all the array items are equals, ie Comparator always returns 0,
55011 // so to ensure the array keeps its order, add an additional sorting condition manually, in this case we
55012 // are going to inspect the original array position. This is what sortedRowNodes is for.
55013 var skipSortingGroups = groupMaintainOrder && groupColumnsPresent && !rowNode.leafGroup && !sortContainsGroupColumns;
55014 if (!sortActive || skipSortingGroups || skipSortingPivotLeafs) {
55015 // when 'groupMaintainOrder' is enabled we skip sorting groups unless we are sorting on group columns
55016 var childrenToBeSorted = rowNode.childrenAfterAggFilter.slice(0);
55017 if (groupMaintainOrder && rowNode.childrenAfterSort) {
55018 var indexedOrders_1 = rowNode.childrenAfterSort.reduce(function (acc, row, idx) {
55019 acc[row.id] = idx;
55020 return acc;
55021 }, {});
55022 childrenToBeSorted.sort(function (row1, row2) { return (indexedOrders_1[row1.id] || 0) - (indexedOrders_1[row2.id] || 0); });
55023 }
55024 rowNode.childrenAfterSort = childrenToBeSorted;
55025 }
55026 else if (useDeltaSort) {
55027 rowNode.childrenAfterSort = _this.doDeltaSort(rowNode, allDirtyNodes, changedPath, sortOptions);
55028 }
55029 else {
55030 rowNode.childrenAfterSort = _this.rowNodeSorter.doFullSort(rowNode.childrenAfterAggFilter, sortOptions);
55031 }
55032 if (rowNode.sibling) {
55033 rowNode.sibling.childrenAfterSort = rowNode.childrenAfterSort;
55034 }
55035 _this.updateChildIndexes(rowNode);
55036 if (_this.postSortFunc) {
55037 var params = { nodes: rowNode.childrenAfterSort };
55038 _this.postSortFunc(params);
55039 }
55040 };
55041 if (changedPath) {
55042 changedPath.forEachChangedNodeDepthFirst(callback);
55043 }
55044 this.updateGroupDataForHideOpenParents(changedPath);
55045 };
55046 SortService.prototype.calculateDirtyNodes = function (rowNodeTransactions) {
55047 var dirtyNodes = {};
55048 var addNodesFunc = function (rowNodes) {
55049 if (rowNodes) {
55050 rowNodes.forEach(function (rowNode) { return dirtyNodes[rowNode.id] = true; });
55051 }
55052 };
55053 // all leaf level nodes in the transaction were impacted
55054 if (rowNodeTransactions) {
55055 rowNodeTransactions.forEach(function (tran) {
55056 addNodesFunc(tran.add);
55057 addNodesFunc(tran.update);
55058 addNodesFunc(tran.remove);
55059 });
55060 }
55061 return dirtyNodes;
55062 };
55063 SortService.prototype.doDeltaSort = function (rowNode, allTouchedNodes, changedPath, sortOptions) {
55064 var _this = this;
55065 var unsortedRows = rowNode.childrenAfterAggFilter;
55066 var oldSortedRows = rowNode.childrenAfterSort;
55067 if (!oldSortedRows) {
55068 return this.rowNodeSorter.doFullSort(unsortedRows, sortOptions);
55069 }
55070 var untouchedRowsMap = {};
55071 var touchedRows = [];
55072 unsortedRows.forEach(function (row) {
55073 if (allTouchedNodes[row.id] || !changedPath.canSkip(row)) {
55074 touchedRows.push(row);
55075 }
55076 else {
55077 untouchedRowsMap[row.id] = true;
55078 }
55079 });
55080 var sortedUntouchedRows = oldSortedRows.filter(function (child) { return untouchedRowsMap[child.id]; });
55081 var mapNodeToSortedNode = function (rowNode, pos) { return ({ currentPos: pos, rowNode: rowNode }); };
55082 var sortedChangedRows = touchedRows
55083 .map(mapNodeToSortedNode)
55084 .sort(function (a, b) { return _this.rowNodeSorter.compareRowNodes(sortOptions, a, b); });
55085 return this.mergeSortedArrays(sortOptions, sortedChangedRows, sortedUntouchedRows.map(mapNodeToSortedNode)).map(function (_a) {
55086 var rowNode = _a.rowNode;
55087 return rowNode;
55088 });
55089 };
55090 // Merge two sorted arrays into each other
55091 SortService.prototype.mergeSortedArrays = function (sortOptions, arr1, arr2) {
55092 var res = [];
55093 var i = 0;
55094 var j = 0;
55095 // Traverse both array, adding them in order
55096 while (i < arr1.length && j < arr2.length) {
55097 // Check if current element of first
55098 // array is smaller than current element
55099 // of second array. If yes, store first
55100 // array element and increment first array
55101 // index. Otherwise do same with second array
55102 var compareResult = this.rowNodeSorter.compareRowNodes(sortOptions, arr1[i], arr2[j]);
55103 if (compareResult < 0) {
55104 res.push(arr1[i++]);
55105 }
55106 else {
55107 res.push(arr2[j++]);
55108 }
55109 }
55110 // add remaining from arr1
55111 while (i < arr1.length) {
55112 res.push(arr1[i++]);
55113 }
55114 // add remaining from arr2
55115 while (j < arr2.length) {
55116 res.push(arr2[j++]);
55117 }
55118 return res;
55119 };
55120 SortService.prototype.updateChildIndexes = function (rowNode) {
55121 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(rowNode.childrenAfterSort)) {
55122 return;
55123 }
55124 var listToSort = rowNode.childrenAfterSort;
55125 for (var i = 0; i < listToSort.length; i++) {
55126 var child = listToSort[i];
55127 var firstChild = i === 0;
55128 var lastChild = i === rowNode.childrenAfterSort.length - 1;
55129 child.setFirstChild(firstChild);
55130 child.setLastChild(lastChild);
55131 child.setChildIndex(i);
55132 }
55133 };
55134 SortService.prototype.updateGroupDataForHideOpenParents = function (changedPath) {
55135 var _this = this;
55136 if (!this.gridOptionsWrapper.isGroupHideOpenParents()) {
55137 return;
55138 }
55139 if (this.gridOptionsWrapper.isTreeData()) {
55140 var msg_1 = "AG Grid: The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them (as opposed to Row Grouping, which only has Aggregated Values at the group level).";
55141 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].doOnce(function () { return console.warn(msg_1); }, 'sortService.hideOpenParentsWithTreeData');
55142 return false;
55143 }
55144 // recurse breadth first over group nodes after sort to 'pull down' group data to child groups
55145 var callback = function (rowNode) {
55146 _this.pullDownGroupDataForHideOpenParents(rowNode.childrenAfterSort, false);
55147 rowNode.childrenAfterSort.forEach(function (child) {
55148 if (child.hasChildren()) {
55149 callback(child);
55150 }
55151 });
55152 };
55153 if (changedPath) {
55154 changedPath.executeFromRootNode(function (rowNode) { return callback(rowNode); });
55155 }
55156 };
55157 SortService.prototype.pullDownGroupDataForHideOpenParents = function (rowNodes, clearOperation) {
55158 var _this = this;
55159 if (!this.gridOptionsWrapper.isGroupHideOpenParents() || _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(rowNodes)) {
55160 return;
55161 }
55162 rowNodes.forEach(function (childRowNode) {
55163 var groupDisplayCols = _this.columnModel.getGroupDisplayColumns();
55164 groupDisplayCols.forEach(function (groupDisplayCol) {
55165 var showRowGroup = groupDisplayCol.getColDef().showRowGroup;
55166 if (typeof showRowGroup !== 'string') {
55167 console.error('AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup');
55168 return;
55169 }
55170 var displayingGroupKey = showRowGroup;
55171 var rowGroupColumn = _this.columnModel.getPrimaryColumn(displayingGroupKey);
55172 var thisRowNodeMatches = rowGroupColumn === childRowNode.rowGroupColumn;
55173 if (thisRowNodeMatches) {
55174 return;
55175 }
55176 if (clearOperation) {
55177 // if doing a clear operation, we clear down the value for every possible group column
55178 childRowNode.setGroupValue(groupDisplayCol.getId(), undefined);
55179 }
55180 else {
55181 // if doing a set operation, we set only where the pull down is to occur
55182 var parentToStealFrom = childRowNode.getFirstChildOfFirstChild(rowGroupColumn);
55183 if (parentToStealFrom) {
55184 childRowNode.setGroupValue(groupDisplayCol.getId(), parentToStealFrom.key);
55185 }
55186 }
55187 });
55188 });
55189 };
55190 __decorate([
55191 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
55192 ], SortService.prototype, "columnModel", void 0);
55193 __decorate([
55194 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowNodeSorter')
55195 ], SortService.prototype, "rowNodeSorter", void 0);
55196 __decorate([
55197 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
55198 ], SortService.prototype, "init", null);
55199 SortService = __decorate([
55200 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('sortService')
55201 ], SortService);
55202 return SortService;
55203}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
55204
55205
55206
55207/***/ }),
55208/* 257 */
55209/***/ (function(module, __webpack_exports__, __webpack_require__) {
55210
55211"use strict";
55212__webpack_require__.r(__webpack_exports__);
55213/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterService", function() { return FilterService; });
55214/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
55215var __extends = (undefined && undefined.__extends) || (function () {
55216 var extendStatics = function (d, b) {
55217 extendStatics = Object.setPrototypeOf ||
55218 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55219 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
55220 return extendStatics(d, b);
55221 };
55222 return function (d, b) {
55223 extendStatics(d, b);
55224 function __() { this.constructor = d; }
55225 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55226 };
55227})();
55228var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55229 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55230 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55231 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
55232 return c > 3 && r && Object.defineProperty(target, key, r), r;
55233};
55234
55235var FilterService = /** @class */ (function (_super) {
55236 __extends(FilterService, _super);
55237 function FilterService() {
55238 return _super !== null && _super.apply(this, arguments) || this;
55239 }
55240 FilterService.prototype.filter = function (changedPath) {
55241 var filterActive = this.filterManager.isColumnFilterPresent()
55242 || this.filterManager.isQuickFilterPresent()
55243 || this.gridOptionsWrapper.isExternalFilterPresent();
55244 this.filterNodes(filterActive, changedPath);
55245 };
55246 FilterService.prototype.filterNodes = function (filterActive, changedPath) {
55247 var _this = this;
55248 var filterCallback = function (rowNode, includeChildNodes) {
55249 // recursively get all children that are groups to also filter
55250 if (rowNode.hasChildren()) {
55251 // result of filter for this node. when filtering tree data, includeChildNodes = true when parent passes
55252 if (filterActive && !includeChildNodes) {
55253 rowNode.childrenAfterFilter = rowNode.childrenAfterGroup.filter(function (childNode) {
55254 // a group is included in the result if it has any children of it's own.
55255 // by this stage, the child groups are already filtered
55256 var passBecauseChildren = childNode.childrenAfterFilter && childNode.childrenAfterFilter.length > 0;
55257 // both leaf level nodes and tree data nodes have data. these get added if
55258 // the data passes the filter
55259 var passBecauseDataPasses = childNode.data
55260 && _this.filterManager.doesRowPassFilter({ rowNode: childNode });
55261 // note - tree data nodes pass either if a) they pass themselves or b) any children of that node pass
55262 return passBecauseChildren || passBecauseDataPasses;
55263 });
55264 }
55265 else {
55266 // if not filtering, the result is the original list
55267 rowNode.childrenAfterFilter = rowNode.childrenAfterGroup;
55268 }
55269 }
55270 else {
55271 rowNode.childrenAfterFilter = rowNode.childrenAfterGroup;
55272 }
55273 if (rowNode.sibling) {
55274 rowNode.sibling.childrenAfterFilter = rowNode.childrenAfterFilter;
55275 }
55276 };
55277 if (this.doingTreeDataFiltering()) {
55278 var treeDataDepthFirstFilter_1 = function (rowNode, alreadyFoundInParent) {
55279 // tree data filter traverses the hierarchy depth first and includes child nodes if parent passes
55280 // filter, and parent nodes will be include if any children exist.
55281 if (rowNode.childrenAfterGroup) {
55282 for (var i = 0; i < rowNode.childrenAfterGroup.length; i++) {
55283 var childNode = rowNode.childrenAfterGroup[i];
55284 // first check if current node passes filter before invoking child nodes
55285 var foundInParent = alreadyFoundInParent
55286 || _this.filterManager.doesRowPassFilter({ rowNode: childNode });
55287 if (childNode.childrenAfterGroup) {
55288 treeDataDepthFirstFilter_1(rowNode.childrenAfterGroup[i], foundInParent);
55289 }
55290 else {
55291 filterCallback(childNode, foundInParent);
55292 }
55293 }
55294 }
55295 filterCallback(rowNode, alreadyFoundInParent);
55296 };
55297 var treeDataFilterCallback = function (rowNode) { return treeDataDepthFirstFilter_1(rowNode, false); };
55298 changedPath.executeFromRootNode(treeDataFilterCallback);
55299 }
55300 else {
55301 var defaultFilterCallback = function (rowNode) { return filterCallback(rowNode, false); };
55302 changedPath.forEachChangedNodeDepthFirst(defaultFilterCallback, true);
55303 }
55304 };
55305 FilterService.prototype.doingTreeDataFiltering = function () {
55306 return this.gridOptionsWrapper.isTreeData() && !this.gridOptionsWrapper.isExcludeChildrenWhenTreeDataFiltering();
55307 };
55308 __decorate([
55309 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
55310 ], FilterService.prototype, "filterManager", void 0);
55311 FilterService = __decorate([
55312 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])("filterService")
55313 ], FilterService);
55314 return FilterService;
55315}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
55316
55317
55318
55319/***/ }),
55320/* 258 */
55321/***/ (function(module, __webpack_exports__, __webpack_require__) {
55322
55323"use strict";
55324__webpack_require__.r(__webpack_exports__);
55325/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImmutableService", function() { return ImmutableService; });
55326/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
55327var __extends = (undefined && undefined.__extends) || (function () {
55328 var extendStatics = function (d, b) {
55329 extendStatics = Object.setPrototypeOf ||
55330 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55331 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
55332 return extendStatics(d, b);
55333 };
55334 return function (d, b) {
55335 extendStatics(d, b);
55336 function __() { this.constructor = d; }
55337 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55338 };
55339})();
55340var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55341 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55342 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55343 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
55344 return c > 3 && r && Object.defineProperty(target, key, r), r;
55345};
55346var __read = (undefined && undefined.__read) || function (o, n) {
55347 var m = typeof Symbol === "function" && o[Symbol.iterator];
55348 if (!m) return o;
55349 var i = m.call(o), r, ar = [], e;
55350 try {
55351 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
55352 }
55353 catch (error) { e = { error: error }; }
55354 finally {
55355 try {
55356 if (r && !r.done && (m = i["return"])) m.call(i);
55357 }
55358 finally { if (e) throw e.error; }
55359 }
55360 return ar;
55361};
55362
55363var ImmutableService = /** @class */ (function (_super) {
55364 __extends(ImmutableService, _super);
55365 function ImmutableService() {
55366 return _super !== null && _super.apply(this, arguments) || this;
55367 }
55368 ImmutableService.prototype.postConstruct = function () {
55369 if (this.rowModel.getType() === _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE) {
55370 this.clientSideRowModel = this.rowModel;
55371 }
55372 };
55373 ImmutableService.prototype.isActive = function () {
55374 return this.gridOptionsWrapper.isImmutableData();
55375 };
55376 ImmutableService.prototype.setRowData = function (rowData) {
55377 var transactionAndMap = this.createTransactionForRowData(rowData);
55378 if (!transactionAndMap) {
55379 return;
55380 }
55381 var _a = __read(transactionAndMap, 2), transaction = _a[0], orderIdMap = _a[1];
55382 var nodeTransaction = this.clientSideRowModel.updateRowData(transaction, orderIdMap);
55383 // need to force updating of full width rows - note this wouldn't be necessary the full width cell comp listened
55384 // to the data change event on the row node and refreshed itself.
55385 if (nodeTransaction) {
55386 this.rowRenderer.refreshFullWidthRows(nodeTransaction.update);
55387 }
55388 // - shows 'no rows' overlay if needed
55389 var rowDataChangedEvent = {
55390 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_ROW_DATA_CHANGED,
55391 api: this.gridApi,
55392 columnApi: this.columnApi
55393 };
55394 this.eventService.dispatchEvent(rowDataChangedEvent);
55395 };
55396 // converts the setRowData() command to a transaction
55397 ImmutableService.prototype.createTransactionForRowData = function (rowData) {
55398 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(this.clientSideRowModel)) {
55399 console.error('AG Grid: ImmutableService only works with ClientSideRowModel');
55400 return;
55401 }
55402 var getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();
55403 if (getRowIdFunc == null) {
55404 console.error('AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!');
55405 return;
55406 }
55407 // convert the data into a transaction object by working out adds, removes and updates
55408 var transaction = {
55409 remove: [],
55410 update: [],
55411 add: []
55412 };
55413 var existingNodesMap = this.clientSideRowModel.getCopyOfNodesMap();
55414 var suppressSortOrder = this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder();
55415 var orderMap = suppressSortOrder ? undefined : {};
55416 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(rowData)) {
55417 // split all the new data in the following:
55418 // if new, push to 'add'
55419 // if update, push to 'update'
55420 // if not changed, do not include in the transaction
55421 rowData.forEach(function (data, index) {
55422 var id = getRowIdFunc({ data: data, level: 0 });
55423 var existingNode = existingNodesMap[id];
55424 if (orderMap) {
55425 orderMap[id] = index;
55426 }
55427 if (existingNode) {
55428 var dataHasChanged = existingNode.data !== data;
55429 if (dataHasChanged) {
55430 transaction.update.push(data);
55431 }
55432 // otherwise, if data not changed, we just don't include it anywhere, as it's not a delta
55433 // remove from list, so we know the item is not to be removed
55434 existingNodesMap[id] = undefined;
55435 }
55436 else {
55437 transaction.add.push(data);
55438 }
55439 });
55440 }
55441 // at this point, all rows that are left, should be removed
55442 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].iterateObject(existingNodesMap, function (id, rowNode) {
55443 if (rowNode) {
55444 transaction.remove.push(rowNode.data);
55445 }
55446 });
55447 return [transaction, orderMap];
55448 };
55449 __decorate([
55450 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
55451 ], ImmutableService.prototype, "rowModel", void 0);
55452 __decorate([
55453 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
55454 ], ImmutableService.prototype, "rowRenderer", void 0);
55455 __decorate([
55456 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
55457 ], ImmutableService.prototype, "columnApi", void 0);
55458 __decorate([
55459 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
55460 ], ImmutableService.prototype, "gridApi", void 0);
55461 __decorate([
55462 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
55463 ], ImmutableService.prototype, "postConstruct", null);
55464 ImmutableService = __decorate([
55465 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('immutableService')
55466 ], ImmutableService);
55467 return ImmutableService;
55468}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
55469
55470
55471
55472/***/ }),
55473/* 259 */
55474/***/ (function(module, __webpack_exports__, __webpack_require__) {
55475
55476"use strict";
55477__webpack_require__.r(__webpack_exports__);
55478/* harmony import */ var _csvExport_baseCreator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(260);
55479/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseCreator", function() { return _csvExport_baseCreator__WEBPACK_IMPORTED_MODULE_0__["BaseCreator"]; });
55480
55481/* harmony import */ var _csvExport_sessions_baseGridSerializingSession__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(261);
55482/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseGridSerializingSession", function() { return _csvExport_sessions_baseGridSerializingSession__WEBPACK_IMPORTED_MODULE_1__["BaseGridSerializingSession"]; });
55483
55484/* harmony import */ var _csvExport_csvCreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(262);
55485/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CsvCreator", function() { return _csvExport_csvCreator__WEBPACK_IMPORTED_MODULE_2__["CsvCreator"]; });
55486
55487/* harmony import */ var _csvExportModule__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(265);
55488/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CsvExportModule", function() { return _csvExportModule__WEBPACK_IMPORTED_MODULE_3__["CsvExportModule"]; });
55489
55490/* harmony import */ var _csvExport_downloader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(263);
55491/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Downloader", function() { return _csvExport_downloader__WEBPACK_IMPORTED_MODULE_4__["Downloader"]; });
55492
55493/* harmony import */ var _csvExport_gridSerializer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(266);
55494/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridSerializer", function() { return _csvExport_gridSerializer__WEBPACK_IMPORTED_MODULE_5__["GridSerializer"]; });
55495
55496/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowType", function() { return _csvExport_gridSerializer__WEBPACK_IMPORTED_MODULE_5__["RowType"]; });
55497
55498/* harmony import */ var _csvExport_xmlFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(267);
55499/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "XmlFactory", function() { return _csvExport_xmlFactory__WEBPACK_IMPORTED_MODULE_6__["XmlFactory"]; });
55500
55501/* harmony import */ var _csvExport_zipContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(268);
55502/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ZipContainer", function() { return _csvExport_zipContainer__WEBPACK_IMPORTED_MODULE_7__["ZipContainer"]; });
55503
55504
55505
55506
55507
55508
55509
55510
55511
55512
55513
55514/***/ }),
55515/* 260 */
55516/***/ (function(module, __webpack_exports__, __webpack_require__) {
55517
55518"use strict";
55519__webpack_require__.r(__webpack_exports__);
55520/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseCreator", function() { return BaseCreator; });
55521var BaseCreator = /** @class */ (function () {
55522 function BaseCreator() {
55523 }
55524 BaseCreator.prototype.setBeans = function (beans) {
55525 this.beans = beans;
55526 };
55527 BaseCreator.prototype.getFileName = function (fileName) {
55528 var extension = this.getDefaultFileExtension();
55529 if (fileName == null || !fileName.length) {
55530 fileName = this.getDefaultFileName();
55531 }
55532 return fileName.indexOf('.') === -1 ? fileName + "." + extension : fileName;
55533 };
55534 BaseCreator.prototype.getData = function (params) {
55535 var serializingSession = this.createSerializingSession(params);
55536 var data = this.beans.gridSerializer.serialize(serializingSession, params);
55537 return data;
55538 };
55539 return BaseCreator;
55540}());
55541
55542
55543
55544/***/ }),
55545/* 261 */
55546/***/ (function(module, __webpack_exports__, __webpack_require__) {
55547
55548"use strict";
55549__webpack_require__.r(__webpack_exports__);
55550/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseGridSerializingSession", function() { return BaseGridSerializingSession; });
55551var BaseGridSerializingSession = /** @class */ (function () {
55552 function BaseGridSerializingSession(config) {
55553 this.groupColumns = [];
55554 var columnModel = config.columnModel, valueService = config.valueService, gridOptionsWrapper = config.gridOptionsWrapper, processCellCallback = config.processCellCallback, processHeaderCallback = config.processHeaderCallback, processGroupHeaderCallback = config.processGroupHeaderCallback, processRowGroupCallback = config.processRowGroupCallback;
55555 this.columnModel = columnModel;
55556 this.valueService = valueService;
55557 this.gridOptionsWrapper = gridOptionsWrapper;
55558 this.processCellCallback = processCellCallback;
55559 this.processHeaderCallback = processHeaderCallback;
55560 this.processGroupHeaderCallback = processGroupHeaderCallback;
55561 this.processRowGroupCallback = processRowGroupCallback;
55562 }
55563 BaseGridSerializingSession.prototype.prepare = function (columnsToExport) {
55564 this.groupColumns = columnsToExport.filter(function (col) { return !!col.getColDef().showRowGroup; });
55565 };
55566 BaseGridSerializingSession.prototype.extractHeaderValue = function (column) {
55567 var value = this.getHeaderName(this.processHeaderCallback, column);
55568 return value != null ? value : '';
55569 };
55570 BaseGridSerializingSession.prototype.extractRowCellValue = function (column, index, accumulatedRowIndex, type, node) {
55571 // we render the group summary text e.g. "-> Parent -> Child"...
55572 var groupIndex = this.gridOptionsWrapper.isGroupMultiAutoColumn() ? node.rowGroupIndex : 0;
55573 var renderGroupSummaryCell =
55574 // on group rows
55575 node && node.group
55576 && (
55577 // in the group column if groups appear in regular grid cells
55578 index === groupIndex && this.groupColumns.indexOf(column) !== -1
55579 // or the first cell in the row, if we're doing full width rows
55580 || (index === 0 && this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotMode())));
55581 var valueForCell;
55582 if (renderGroupSummaryCell) {
55583 valueForCell = this.createValueForGroupNode(node);
55584 }
55585 else {
55586 valueForCell = this.valueService.getValue(column, node);
55587 }
55588 var value = this.processCell(accumulatedRowIndex, node, column, valueForCell, this.processCellCallback, type);
55589 return value != null ? value : '';
55590 };
55591 BaseGridSerializingSession.prototype.getHeaderName = function (callback, column) {
55592 if (callback) {
55593 return callback({
55594 column: column,
55595 api: this.gridOptionsWrapper.getApi(),
55596 columnApi: this.gridOptionsWrapper.getColumnApi(),
55597 context: this.gridOptionsWrapper.getContext()
55598 });
55599 }
55600 return this.columnModel.getDisplayNameForColumn(column, 'csv', true);
55601 };
55602 BaseGridSerializingSession.prototype.createValueForGroupNode = function (node) {
55603 if (this.processRowGroupCallback) {
55604 return this.processRowGroupCallback({
55605 node: node,
55606 api: this.gridOptionsWrapper.getApi(),
55607 columnApi: this.gridOptionsWrapper.getColumnApi(),
55608 context: this.gridOptionsWrapper.getContext(),
55609 });
55610 }
55611 var keys = [node.key];
55612 if (!this.gridOptionsWrapper.isGroupMultiAutoColumn()) {
55613 while (node.parent) {
55614 node = node.parent;
55615 keys.push(node.key);
55616 }
55617 }
55618 return keys.reverse().join(' -> ');
55619 };
55620 BaseGridSerializingSession.prototype.processCell = function (accumulatedRowIndex, rowNode, column, value, processCellCallback, type) {
55621 if (processCellCallback) {
55622 return processCellCallback({
55623 accumulatedRowIndex: accumulatedRowIndex,
55624 column: column,
55625 node: rowNode,
55626 value: value,
55627 api: this.gridOptionsWrapper.getApi(),
55628 columnApi: this.gridOptionsWrapper.getColumnApi(),
55629 context: this.gridOptionsWrapper.getContext(),
55630 type: type
55631 });
55632 }
55633 return value != null ? value : '';
55634 };
55635 return BaseGridSerializingSession;
55636}());
55637
55638
55639
55640/***/ }),
55641/* 262 */
55642/***/ (function(module, __webpack_exports__, __webpack_require__) {
55643
55644"use strict";
55645__webpack_require__.r(__webpack_exports__);
55646/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CsvCreator", function() { return CsvCreator; });
55647/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
55648/* harmony import */ var _baseCreator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(260);
55649/* harmony import */ var _downloader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(263);
55650/* harmony import */ var _sessions_csvSerializingSession__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(264);
55651var __extends = (undefined && undefined.__extends) || (function () {
55652 var extendStatics = function (d, b) {
55653 extendStatics = Object.setPrototypeOf ||
55654 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55655 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
55656 return extendStatics(d, b);
55657 };
55658 return function (d, b) {
55659 extendStatics(d, b);
55660 function __() { this.constructor = d; }
55661 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55662 };
55663})();
55664var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55665 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55666 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55667 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
55668 return c > 3 && r && Object.defineProperty(target, key, r), r;
55669};
55670
55671
55672
55673
55674var CsvCreator = /** @class */ (function (_super) {
55675 __extends(CsvCreator, _super);
55676 function CsvCreator() {
55677 return _super !== null && _super.apply(this, arguments) || this;
55678 }
55679 CsvCreator.prototype.postConstruct = function () {
55680 this.setBeans({
55681 gridSerializer: this.gridSerializer,
55682 gridOptionsWrapper: this.gridOptionsWrapper
55683 });
55684 };
55685 CsvCreator.prototype.getMergedParams = function (params) {
55686 var baseParams = this.gridOptionsWrapper.getDefaultExportParams('csv');
55687 return Object.assign({}, baseParams, params);
55688 };
55689 CsvCreator.prototype.export = function (userParams) {
55690 if (this.isExportSuppressed()) {
55691 console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");
55692 return '';
55693 }
55694 var mergedParams = this.getMergedParams(userParams);
55695 var data = this.getData(mergedParams);
55696 var packagedFile = new Blob(["\ufeff", data], { type: 'text/plain' });
55697 _downloader__WEBPACK_IMPORTED_MODULE_2__["Downloader"].download(this.getFileName(mergedParams.fileName), packagedFile);
55698 return data;
55699 };
55700 CsvCreator.prototype.exportDataAsCsv = function (params) {
55701 return this.export(params);
55702 };
55703 CsvCreator.prototype.getDataAsCsv = function (params) {
55704 var mergedParams = this.getMergedParams(params);
55705 return this.getData(mergedParams);
55706 };
55707 CsvCreator.prototype.getDefaultFileName = function () {
55708 return 'export.csv';
55709 };
55710 CsvCreator.prototype.getDefaultFileExtension = function () {
55711 return 'csv';
55712 };
55713 CsvCreator.prototype.createSerializingSession = function (params) {
55714 var _a = this, columnModel = _a.columnModel, valueService = _a.valueService, gridOptionsWrapper = _a.gridOptionsWrapper;
55715 var _b = params, processCellCallback = _b.processCellCallback, processHeaderCallback = _b.processHeaderCallback, processGroupHeaderCallback = _b.processGroupHeaderCallback, processRowGroupCallback = _b.processRowGroupCallback, suppressQuotes = _b.suppressQuotes, columnSeparator = _b.columnSeparator;
55716 return new _sessions_csvSerializingSession__WEBPACK_IMPORTED_MODULE_3__["CsvSerializingSession"]({
55717 columnModel: columnModel,
55718 valueService: valueService,
55719 gridOptionsWrapper: gridOptionsWrapper,
55720 processCellCallback: processCellCallback || undefined,
55721 processHeaderCallback: processHeaderCallback || undefined,
55722 processGroupHeaderCallback: processGroupHeaderCallback || undefined,
55723 processRowGroupCallback: processRowGroupCallback || undefined,
55724 suppressQuotes: suppressQuotes || false,
55725 columnSeparator: columnSeparator || ','
55726 });
55727 };
55728 CsvCreator.prototype.isExportSuppressed = function () {
55729 return this.gridOptionsWrapper.isSuppressCsvExport();
55730 };
55731 __decorate([
55732 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
55733 ], CsvCreator.prototype, "columnModel", void 0);
55734 __decorate([
55735 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueService')
55736 ], CsvCreator.prototype, "valueService", void 0);
55737 __decorate([
55738 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridSerializer')
55739 ], CsvCreator.prototype, "gridSerializer", void 0);
55740 __decorate([
55741 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridOptionsWrapper')
55742 ], CsvCreator.prototype, "gridOptionsWrapper", void 0);
55743 __decorate([
55744 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
55745 ], CsvCreator.prototype, "postConstruct", null);
55746 CsvCreator = __decorate([
55747 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('csvCreator')
55748 ], CsvCreator);
55749 return CsvCreator;
55750}(_baseCreator__WEBPACK_IMPORTED_MODULE_1__["BaseCreator"]));
55751
55752
55753
55754/***/ }),
55755/* 263 */
55756/***/ (function(module, __webpack_exports__, __webpack_require__) {
55757
55758"use strict";
55759__webpack_require__.r(__webpack_exports__);
55760/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Downloader", function() { return Downloader; });
55761var Downloader = /** @class */ (function () {
55762 function Downloader() {
55763 }
55764 Downloader.download = function (fileName, content) {
55765 var win = document.defaultView || window;
55766 if (!win) {
55767 console.warn('AG Grid: There is no `window` associated with the current `document`');
55768 return;
55769 }
55770 var element = document.createElement('a');
55771 // @ts-ignore
55772 var url = win.URL.createObjectURL(content);
55773 element.setAttribute('href', url);
55774 element.setAttribute('download', fileName);
55775 element.style.display = 'none';
55776 document.body.appendChild(element);
55777 element.dispatchEvent(new MouseEvent('click', {
55778 bubbles: false,
55779 cancelable: true,
55780 view: win
55781 }));
55782 document.body.removeChild(element);
55783 win.setTimeout(function () {
55784 // @ts-ignore
55785 win.URL.revokeObjectURL(url);
55786 }, 0);
55787 };
55788 return Downloader;
55789}());
55790
55791
55792
55793/***/ }),
55794/* 264 */
55795/***/ (function(module, __webpack_exports__, __webpack_require__) {
55796
55797"use strict";
55798__webpack_require__.r(__webpack_exports__);
55799/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CsvSerializingSession", function() { return CsvSerializingSession; });
55800/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
55801/* harmony import */ var _baseGridSerializingSession__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(261);
55802var __extends = (undefined && undefined.__extends) || (function () {
55803 var extendStatics = function (d, b) {
55804 extendStatics = Object.setPrototypeOf ||
55805 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55806 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
55807 return extendStatics(d, b);
55808 };
55809 return function (d, b) {
55810 extendStatics(d, b);
55811 function __() { this.constructor = d; }
55812 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55813 };
55814})();
55815
55816
55817var LINE_SEPARATOR = '\r\n';
55818var CsvSerializingSession = /** @class */ (function (_super) {
55819 __extends(CsvSerializingSession, _super);
55820 function CsvSerializingSession(config) {
55821 var _this = _super.call(this, config) || this;
55822 _this.isFirstLine = true;
55823 _this.result = '';
55824 var suppressQuotes = config.suppressQuotes, columnSeparator = config.columnSeparator;
55825 _this.suppressQuotes = suppressQuotes;
55826 _this.columnSeparator = columnSeparator;
55827 return _this;
55828 }
55829 CsvSerializingSession.prototype.addCustomContent = function (content) {
55830 var _this = this;
55831 if (!content) {
55832 return;
55833 }
55834 if (typeof content === 'string') {
55835 if (!/^\s*\n/.test(content)) {
55836 this.beginNewLine();
55837 }
55838 // replace whatever newlines are supplied with the style we're using
55839 content = content.replace(/\r?\n/g, LINE_SEPARATOR);
55840 this.result += content;
55841 }
55842 else {
55843 content.forEach(function (row) {
55844 _this.beginNewLine();
55845 row.forEach(function (cell, index) {
55846 if (index !== 0) {
55847 _this.result += _this.columnSeparator;
55848 }
55849 _this.result += _this.putInQuotes(cell.data.value || '');
55850 if (cell.mergeAcross) {
55851 _this.appendEmptyCells(cell.mergeAcross);
55852 }
55853 });
55854 });
55855 }
55856 };
55857 CsvSerializingSession.prototype.onNewHeaderGroupingRow = function () {
55858 this.beginNewLine();
55859 return {
55860 onColumn: this.onNewHeaderGroupingRowColumn.bind(this)
55861 };
55862 };
55863 CsvSerializingSession.prototype.onNewHeaderGroupingRowColumn = function (header, index, span) {
55864 if (index != 0) {
55865 this.result += this.columnSeparator;
55866 }
55867 this.result += this.putInQuotes(header);
55868 this.appendEmptyCells(span);
55869 };
55870 CsvSerializingSession.prototype.appendEmptyCells = function (count) {
55871 for (var i = 1; i <= count; i++) {
55872 this.result += this.columnSeparator + this.putInQuotes("");
55873 }
55874 };
55875 CsvSerializingSession.prototype.onNewHeaderRow = function () {
55876 this.beginNewLine();
55877 return {
55878 onColumn: this.onNewHeaderRowColumn.bind(this)
55879 };
55880 };
55881 CsvSerializingSession.prototype.onNewHeaderRowColumn = function (column, index) {
55882 if (index != 0) {
55883 this.result += this.columnSeparator;
55884 }
55885 this.result += this.putInQuotes(this.extractHeaderValue(column));
55886 };
55887 CsvSerializingSession.prototype.onNewBodyRow = function () {
55888 this.beginNewLine();
55889 return {
55890 onColumn: this.onNewBodyRowColumn.bind(this)
55891 };
55892 };
55893 CsvSerializingSession.prototype.onNewBodyRowColumn = function (column, index, node) {
55894 if (index != 0) {
55895 this.result += this.columnSeparator;
55896 }
55897 this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Constants"].EXPORT_TYPE_CSV, node));
55898 };
55899 CsvSerializingSession.prototype.putInQuotes = function (value) {
55900 if (this.suppressQuotes) {
55901 return value;
55902 }
55903 if (value === null || value === undefined) {
55904 return '""';
55905 }
55906 var stringValue;
55907 if (typeof value === 'string') {
55908 stringValue = value;
55909 }
55910 else if (typeof value.toString === 'function') {
55911 stringValue = value.toString();
55912 }
55913 else {
55914 console.warn('AG Grid: unknown value type during csv conversion');
55915 stringValue = '';
55916 }
55917 // replace each " with "" (ie two sets of double quotes is how to do double quotes in csv)
55918 var valueEscaped = stringValue.replace(/"/g, "\"\"");
55919 return '"' + valueEscaped + '"';
55920 };
55921 CsvSerializingSession.prototype.parse = function () {
55922 return this.result;
55923 };
55924 CsvSerializingSession.prototype.beginNewLine = function () {
55925 if (!this.isFirstLine) {
55926 this.result += LINE_SEPARATOR;
55927 }
55928 this.isFirstLine = false;
55929 };
55930 return CsvSerializingSession;
55931}(_baseGridSerializingSession__WEBPACK_IMPORTED_MODULE_1__["BaseGridSerializingSession"]));
55932
55933
55934
55935/***/ }),
55936/* 265 */
55937/***/ (function(module, __webpack_exports__, __webpack_require__) {
55938
55939"use strict";
55940__webpack_require__.r(__webpack_exports__);
55941/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CsvExportModule", function() { return CsvExportModule; });
55942/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
55943/* harmony import */ var _csvExport_csvCreator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
55944/* harmony import */ var _csvExport_gridSerializer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
55945
55946
55947
55948var CsvExportModule = {
55949 moduleName: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ModuleNames"].CsvExportModule,
55950 beans: [_csvExport_csvCreator__WEBPACK_IMPORTED_MODULE_1__["CsvCreator"], _csvExport_gridSerializer__WEBPACK_IMPORTED_MODULE_2__["GridSerializer"]]
55951};
55952
55953
55954/***/ }),
55955/* 266 */
55956/***/ (function(module, __webpack_exports__, __webpack_require__) {
55957
55958"use strict";
55959__webpack_require__.r(__webpack_exports__);
55960/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowType", function() { return RowType; });
55961/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridSerializer", function() { return GridSerializer; });
55962/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
55963var __extends = (undefined && undefined.__extends) || (function () {
55964 var extendStatics = function (d, b) {
55965 extendStatics = Object.setPrototypeOf ||
55966 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55967 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
55968 return extendStatics(d, b);
55969 };
55970 return function (d, b) {
55971 extendStatics(d, b);
55972 function __() { this.constructor = d; }
55973 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55974 };
55975})();
55976var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55977 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55978 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55979 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
55980 return c > 3 && r && Object.defineProperty(target, key, r), r;
55981};
55982
55983var RowType;
55984(function (RowType) {
55985 RowType[RowType["HEADER_GROUPING"] = 0] = "HEADER_GROUPING";
55986 RowType[RowType["HEADER"] = 1] = "HEADER";
55987 RowType[RowType["BODY"] = 2] = "BODY";
55988})(RowType || (RowType = {}));
55989var GridSerializer = /** @class */ (function (_super) {
55990 __extends(GridSerializer, _super);
55991 function GridSerializer() {
55992 return _super !== null && _super.apply(this, arguments) || this;
55993 }
55994 GridSerializer.prototype.serialize = function (gridSerializingSession, params) {
55995 if (params === void 0) { params = {}; }
55996 var columnsToExport = this.getColumnsToExport(params.allColumns, params.columnKeys);
55997 var serializeChain = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].compose(
55998 // first pass, put in the header names of the cols
55999 this.prepareSession(columnsToExport), this.prependContent(params), this.exportColumnGroups(params, columnsToExport), this.exportHeaders(params, columnsToExport), this.processPinnedTopRows(params, columnsToExport), this.processRows(params, columnsToExport), this.processPinnedBottomRows(params, columnsToExport), this.appendContent(params));
56000 return serializeChain(gridSerializingSession).parse();
56001 };
56002 GridSerializer.prototype.processRow = function (gridSerializingSession, params, columnsToExport, node) {
56003 var _this = this;
56004 var rowSkipper = params.shouldRowBeSkipped || (function () { return false; });
56005 var gridOptionsWrapper = this.gridOptionsWrapper;
56006 var context = gridOptionsWrapper.getContext();
56007 var api = gridOptionsWrapper.getApi();
56008 var columnApi = gridOptionsWrapper.getColumnApi();
56009 var skipSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveSingleChildren();
56010 var hideOpenParents = gridOptionsWrapper.isGroupHideOpenParents();
56011 var skipLowestSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveLowestSingleChildren();
56012 var isLeafNode = this.columnModel.isPivotMode() ? node.leafGroup : !node.group;
56013 var skipRowGroups = params.skipGroups || params.skipRowGroups;
56014 var shouldSkipLowestGroup = skipLowestSingleChildrenGroup && node.leafGroup;
56015 var shouldSkipCurrentGroup = node.allChildrenCount === 1 && (skipSingleChildrenGroup || shouldSkipLowestGroup);
56016 if (skipRowGroups && params.skipGroups) {
56017 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].doOnce(function () { return console.warn('AG Grid: Since v25.2 `skipGroups` has been renamed to `skipRowGroups`.'); }, 'gridSerializer-skipGroups');
56018 }
56019 var rowPosition = { rowIndex: node.rowIndex, rowPinned: node.rowPinned };
56020 if ((!isLeafNode && (params.skipRowGroups || shouldSkipCurrentGroup || hideOpenParents)) ||
56021 (params.onlySelected && !node.isSelected()) ||
56022 (params.rowNodes && !params.rowNodes.some(function (position) { return _this.rowPositionUtils.sameRow(position, rowPosition); })) ||
56023 (params.skipPinnedTop && node.rowPinned === 'top') ||
56024 (params.skipPinnedBottom && node.rowPinned === 'bottom')) {
56025 return;
56026 }
56027 // if we are in pivotMode, then the grid will show the root node only
56028 // if it's not a leaf group
56029 var nodeIsRootNode = node.level === -1;
56030 if (nodeIsRootNode && !node.leafGroup) {
56031 return;
56032 }
56033 var shouldRowBeSkipped = rowSkipper({ node: node, api: api, columnApi: columnApi, context: context });
56034 if (shouldRowBeSkipped) {
56035 return;
56036 }
56037 var rowAccumulator = gridSerializingSession.onNewBodyRow();
56038 columnsToExport.forEach(function (column, index) {
56039 rowAccumulator.onColumn(column, index, node);
56040 });
56041 if (params.getCustomContentBelowRow) {
56042 var content = params.getCustomContentBelowRow({ node: node, api: api, columnApi: columnApi, context: context });
56043 if (content) {
56044 gridSerializingSession.addCustomContent(content);
56045 }
56046 }
56047 };
56048 GridSerializer.prototype.appendContent = function (params) {
56049 return function (gridSerializingSession) {
56050 var appendContent = params.customFooter || params.appendContent;
56051 if (appendContent) {
56052 if (params.customFooter) {
56053 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].doOnce(function () { return console.warn('AG Grid: Since version 25.2.0 the `customFooter` param has been deprecated. Use `appendContent` instead.'); }, 'gridSerializer-customFooter');
56054 }
56055 gridSerializingSession.addCustomContent(appendContent);
56056 }
56057 return gridSerializingSession;
56058 };
56059 };
56060 GridSerializer.prototype.prependContent = function (params) {
56061 return function (gridSerializingSession) {
56062 var prependContent = params.customHeader || params.prependContent;
56063 if (prependContent) {
56064 if (params.customHeader) {
56065 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].doOnce(function () { return console.warn('AG Grid: Since version 25.2.0 the `customHeader` param has been deprecated. Use `prependContent` instead.'); }, 'gridSerializer-customHeader');
56066 }
56067 gridSerializingSession.addCustomContent(prependContent);
56068 }
56069 return gridSerializingSession;
56070 };
56071 };
56072 GridSerializer.prototype.prepareSession = function (columnsToExport) {
56073 return function (gridSerializingSession) {
56074 gridSerializingSession.prepare(columnsToExport);
56075 return gridSerializingSession;
56076 };
56077 };
56078 GridSerializer.prototype.exportColumnGroups = function (params, columnsToExport) {
56079 var _this = this;
56080 return function (gridSerializingSession) {
56081 if (!params.skipColumnGroupHeaders) {
56082 var groupInstanceIdCreator = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["GroupInstanceIdCreator"]();
56083 var displayedGroups = _this.displayedGroupCreator.createDisplayedGroups(columnsToExport, _this.columnModel.getGridBalancedTree(), groupInstanceIdCreator, null);
56084 _this.recursivelyAddHeaderGroups(displayedGroups, gridSerializingSession, params.processGroupHeaderCallback);
56085 }
56086 else if (params.columnGroups) {
56087 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].doOnce(function () { return console.warn('AG Grid: Since v25.2 the `columnGroups` param has deprecated, and groups are exported by default.'); }, 'gridSerializer-columnGroups');
56088 }
56089 return gridSerializingSession;
56090 };
56091 };
56092 GridSerializer.prototype.exportHeaders = function (params, columnsToExport) {
56093 return function (gridSerializingSession) {
56094 if (!params.skipHeader && !params.skipColumnHeaders) {
56095 var gridRowIterator_1 = gridSerializingSession.onNewHeaderRow();
56096 columnsToExport.forEach(function (column, index) {
56097 gridRowIterator_1.onColumn(column, index, undefined);
56098 });
56099 }
56100 else if (params.skipHeader) {
56101 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].doOnce(function () { return console.warn('AG Grid: Since v25.2 the `skipHeader` param has been renamed to `skipColumnHeaders`.'); }, 'gridSerializer-skipHeader');
56102 }
56103 return gridSerializingSession;
56104 };
56105 };
56106 GridSerializer.prototype.processPinnedTopRows = function (params, columnsToExport) {
56107 var _this = this;
56108 return function (gridSerializingSession) {
56109 var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);
56110 _this.pinnedRowModel.forEachPinnedTopRow(processRow);
56111 return gridSerializingSession;
56112 };
56113 };
56114 GridSerializer.prototype.processRows = function (params, columnsToExport) {
56115 var _this = this;
56116 return function (gridSerializingSession) {
56117 // when in pivot mode, we always render cols on screen, never 'all columns'
56118 var rowModel = _this.rowModel;
56119 var rowModelType = rowModel.getType();
56120 var usingCsrm = rowModelType === _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_CLIENT_SIDE;
56121 var usingSsrm = rowModelType === _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_SERVER_SIDE;
56122 var onlySelectedNonStandardModel = !usingCsrm && params.onlySelected;
56123 var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);
56124 if (_this.columnModel.isPivotMode()) {
56125 if (usingCsrm) {
56126 rowModel.forEachPivotNode(processRow);
56127 }
56128 else {
56129 // must be enterprise, so we can just loop through all the nodes
56130 rowModel.forEachNode(processRow);
56131 }
56132 }
56133 else {
56134 // onlySelectedAllPages: user doing pagination and wants selected items from
56135 // other pages, so cannot use the standard row model as it won't have rows from
56136 // other pages.
56137 // onlySelectedNonStandardModel: if user wants selected in non standard row model
56138 // (eg viewport) then again RowModel cannot be used, so need to use selected instead.
56139 if (params.onlySelectedAllPages || onlySelectedNonStandardModel) {
56140 var selectedNodes = _this.selectionService.getSelectedNodes();
56141 selectedNodes.forEach(processRow);
56142 }
56143 else {
56144 // here is everything else - including standard row model and selected. we don't use
56145 // the selection model even when just using selected, so that the result is the order
56146 // of the rows appearing on the screen.
56147 if (usingCsrm) {
56148 rowModel.forEachNodeAfterFilterAndSort(processRow);
56149 }
56150 else if (usingSsrm) {
56151 rowModel.forEachNodeAfterFilterAndSort(processRow);
56152 }
56153 else {
56154 rowModel.forEachNode(processRow);
56155 }
56156 }
56157 }
56158 return gridSerializingSession;
56159 };
56160 };
56161 GridSerializer.prototype.processPinnedBottomRows = function (params, columnsToExport) {
56162 var _this = this;
56163 return function (gridSerializingSession) {
56164 var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);
56165 _this.pinnedRowModel.forEachPinnedBottomRow(processRow);
56166 return gridSerializingSession;
56167 };
56168 };
56169 GridSerializer.prototype.getColumnsToExport = function (allColumns, columnKeys) {
56170 if (allColumns === void 0) { allColumns = false; }
56171 var isPivotMode = this.columnModel.isPivotMode();
56172 if (columnKeys && columnKeys.length) {
56173 return this.columnModel.getGridColumns(columnKeys);
56174 }
56175 if (allColumns && !isPivotMode) {
56176 // add auto group column for tree data
56177 var columns = this.gridOptionsWrapper.isTreeData()
56178 ? this.columnModel.getGridColumns([_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Constants"].GROUP_AUTO_COLUMN_ID])
56179 : [];
56180 return columns.concat(this.columnModel.getAllPrimaryColumns() || []);
56181 }
56182 return this.columnModel.getAllDisplayedColumns();
56183 };
56184 GridSerializer.prototype.recursivelyAddHeaderGroups = function (displayedGroups, gridSerializingSession, processGroupHeaderCallback) {
56185 var directChildrenHeaderGroups = [];
56186 displayedGroups.forEach(function (columnGroupChild) {
56187 var columnGroup = columnGroupChild;
56188 if (!columnGroup.getChildren) {
56189 return;
56190 }
56191 columnGroup.getChildren().forEach(function (it) { return directChildrenHeaderGroups.push(it); });
56192 });
56193 if (displayedGroups.length > 0 && displayedGroups[0] instanceof _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
56194 this.doAddHeaderHeader(gridSerializingSession, displayedGroups, processGroupHeaderCallback);
56195 }
56196 if (directChildrenHeaderGroups && directChildrenHeaderGroups.length > 0) {
56197 this.recursivelyAddHeaderGroups(directChildrenHeaderGroups, gridSerializingSession, processGroupHeaderCallback);
56198 }
56199 };
56200 GridSerializer.prototype.doAddHeaderHeader = function (gridSerializingSession, displayedGroups, processGroupHeaderCallback) {
56201 var _this = this;
56202 var gridRowIterator = gridSerializingSession.onNewHeaderGroupingRow();
56203 var columnIndex = 0;
56204 displayedGroups.forEach(function (columnGroupChild) {
56205 var columnGroup = columnGroupChild;
56206 var name;
56207 if (processGroupHeaderCallback) {
56208 name = processGroupHeaderCallback({
56209 columnGroup: columnGroup,
56210 api: _this.gridOptionsWrapper.getApi(),
56211 columnApi: _this.gridOptionsWrapper.getColumnApi(),
56212 context: _this.gridOptionsWrapper.getContext()
56213 });
56214 }
56215 else {
56216 name = _this.columnModel.getDisplayNameForColumnGroup(columnGroup, 'header');
56217 }
56218 var collapsibleGroupRanges = columnGroup.getLeafColumns().reduce(function (collapsibleGroups, currentColumn, currentIdx, arr) {
56219 var lastGroup = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].last(collapsibleGroups);
56220 var groupShow = currentColumn.getColumnGroupShow() === 'open';
56221 if (!groupShow) {
56222 if (lastGroup && lastGroup[1] == null) {
56223 lastGroup[1] = currentIdx - 1;
56224 }
56225 }
56226 else if (!lastGroup || lastGroup[1] != null) {
56227 lastGroup = [currentIdx];
56228 collapsibleGroups.push(lastGroup);
56229 }
56230 if (currentIdx === arr.length - 1 && lastGroup && lastGroup[1] == null) {
56231 lastGroup[1] = currentIdx;
56232 }
56233 return collapsibleGroups;
56234 }, []);
56235 gridRowIterator.onColumn(name || '', columnIndex++, columnGroup.getLeafColumns().length - 1, collapsibleGroupRanges);
56236 });
56237 };
56238 __decorate([
56239 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('displayedGroupCreator')
56240 ], GridSerializer.prototype, "displayedGroupCreator", void 0);
56241 __decorate([
56242 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
56243 ], GridSerializer.prototype, "columnModel", void 0);
56244 __decorate([
56245 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
56246 ], GridSerializer.prototype, "rowModel", void 0);
56247 __decorate([
56248 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedRowModel')
56249 ], GridSerializer.prototype, "pinnedRowModel", void 0);
56250 __decorate([
56251 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('selectionService')
56252 ], GridSerializer.prototype, "selectionService", void 0);
56253 __decorate([
56254 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowPositionUtils')
56255 ], GridSerializer.prototype, "rowPositionUtils", void 0);
56256 GridSerializer = __decorate([
56257 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])("gridSerializer")
56258 ], GridSerializer);
56259 return GridSerializer;
56260}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
56261
56262
56263
56264/***/ }),
56265/* 267 */
56266/***/ (function(module, __webpack_exports__, __webpack_require__) {
56267
56268"use strict";
56269__webpack_require__.r(__webpack_exports__);
56270/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "XmlFactory", function() { return XmlFactory; });
56271var LINE_SEPARATOR = '\r\n';
56272var XmlFactory = /** @class */ (function () {
56273 function XmlFactory() {
56274 }
56275 XmlFactory.createHeader = function (headerElement) {
56276 if (headerElement === void 0) { headerElement = {}; }
56277 var headerStart = '<?';
56278 var headerEnd = '?>';
56279 var keys = ['version'];
56280 if (!headerElement.version) {
56281 headerElement.version = "1.0";
56282 }
56283 if (headerElement.encoding) {
56284 keys.push('encoding');
56285 }
56286 if (headerElement.standalone) {
56287 keys.push('standalone');
56288 }
56289 var att = keys.map(function (key) { return key + "=\"" + headerElement[key] + "\""; }).join(' ');
56290 return headerStart + "xml " + att + " " + headerEnd;
56291 };
56292 XmlFactory.createXml = function (xmlElement, booleanTransformer) {
56293 var _this = this;
56294 var props = '';
56295 if (xmlElement.properties) {
56296 if (xmlElement.properties.prefixedAttributes) {
56297 xmlElement.properties.prefixedAttributes.forEach(function (prefixedSet) {
56298 Object.keys(prefixedSet.map).forEach(function (key) {
56299 props += _this.returnAttributeIfPopulated(prefixedSet.prefix + key, prefixedSet.map[key], booleanTransformer);
56300 });
56301 });
56302 }
56303 if (xmlElement.properties.rawMap) {
56304 Object.keys(xmlElement.properties.rawMap).forEach(function (key) {
56305 props += _this.returnAttributeIfPopulated(key, xmlElement.properties.rawMap[key], booleanTransformer);
56306 });
56307 }
56308 }
56309 var result = '<' + xmlElement.name + props;
56310 if (!xmlElement.children && xmlElement.textNode == null) {
56311 return result + '/>' + LINE_SEPARATOR;
56312 }
56313 if (xmlElement.textNode != null) {
56314 return result + '>' + xmlElement.textNode + '</' + xmlElement.name + '>' + LINE_SEPARATOR;
56315 }
56316 result += '>' + LINE_SEPARATOR;
56317 if (xmlElement.children) {
56318 xmlElement.children.forEach(function (it) {
56319 result += _this.createXml(it, booleanTransformer);
56320 });
56321 }
56322 return result + '</' + xmlElement.name + '>' + LINE_SEPARATOR;
56323 };
56324 XmlFactory.returnAttributeIfPopulated = function (key, value, booleanTransformer) {
56325 if (!value && value !== '' && value !== 0) {
56326 return '';
56327 }
56328 var xmlValue = value;
56329 if ((typeof (value) === 'boolean')) {
56330 if (booleanTransformer) {
56331 xmlValue = booleanTransformer(value);
56332 }
56333 }
56334 return " " + key + "=\"" + xmlValue + "\"";
56335 };
56336 return XmlFactory;
56337}());
56338
56339
56340
56341/***/ }),
56342/* 268 */
56343/***/ (function(module, __webpack_exports__, __webpack_require__) {
56344
56345"use strict";
56346__webpack_require__.r(__webpack_exports__);
56347/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipContainer", function() { return ZipContainer; });
56348/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
56349var __values = (undefined && undefined.__values) || function(o) {
56350 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
56351 if (m) return m.call(o);
56352 if (o && typeof o.length === "number") return {
56353 next: function () {
56354 if (o && i >= o.length) o = void 0;
56355 return { value: o && o[i++], done: !o };
56356 }
56357 };
56358 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
56359};
56360
56361// table for crc calculation
56362// from: https://referencesource.microsoft.com/#System/sys/System/IO/compression/Crc32Helper.cs,3b31978c7d7f7246,references
56363var crcTable = new Uint32Array([
56364 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
56365 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
56366 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
56367 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
56368 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
56369 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
56370 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
56371 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
56372 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
56373 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
56374 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
56375 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
56376 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
56377 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
56378 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
56379 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
56380 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
56381 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
56382 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
56383 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
56384 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
56385 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
56386 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
56387 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
56388 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
56389 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
56390 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
56391 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
56392 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
56393 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
56394 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
56395 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
56396 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
56397 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
56398 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
56399 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
56400 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
56401 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
56402 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
56403 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
56404 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
56405 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
56406 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
56407]);
56408var ZipContainer = /** @class */ (function () {
56409 function ZipContainer() {
56410 }
56411 ZipContainer.addFolders = function (paths) {
56412 paths.forEach(this.addFolder.bind(this));
56413 };
56414 ZipContainer.addFolder = function (path) {
56415 this.folders.push({
56416 path: path,
56417 created: new Date(),
56418 isBase64: false
56419 });
56420 };
56421 ZipContainer.addFile = function (path, content, isBase64) {
56422 if (isBase64 === void 0) { isBase64 = false; }
56423 this.files.push({
56424 path: path,
56425 created: new Date(),
56426 content: content,
56427 isBase64: isBase64
56428 });
56429 };
56430 ZipContainer.getContent = function (mimeType) {
56431 if (mimeType === void 0) { mimeType = 'application/zip'; }
56432 var textOutput = this.buildFileStream();
56433 var uInt8Output = this.buildUint8Array(textOutput);
56434 this.clearStream();
56435 return new Blob([uInt8Output], { type: mimeType });
56436 };
56437 ZipContainer.clearStream = function () {
56438 this.folders = [];
56439 this.files = [];
56440 };
56441 ZipContainer.buildFileStream = function (fData) {
56442 var e_1, _a;
56443 if (fData === void 0) { fData = ''; }
56444 var totalFiles = this.folders.concat(this.files);
56445 var len = totalFiles.length;
56446 var foData = '';
56447 var lL = 0;
56448 var cL = 0;
56449 try {
56450 for (var totalFiles_1 = __values(totalFiles), totalFiles_1_1 = totalFiles_1.next(); !totalFiles_1_1.done; totalFiles_1_1 = totalFiles_1.next()) {
56451 var currentFile = totalFiles_1_1.value;
56452 var _b = this.getHeader(currentFile, lL), fileHeader = _b.fileHeader, folderHeader = _b.folderHeader, content = _b.content;
56453 lL += fileHeader.length + content.length;
56454 cL += folderHeader.length;
56455 fData += fileHeader + content;
56456 foData += folderHeader;
56457 }
56458 }
56459 catch (e_1_1) { e_1 = { error: e_1_1 }; }
56460 finally {
56461 try {
56462 if (totalFiles_1_1 && !totalFiles_1_1.done && (_a = totalFiles_1.return)) _a.call(totalFiles_1);
56463 }
56464 finally { if (e_1) throw e_1.error; }
56465 }
56466 var foEnd = this.buildFolderEnd(len, cL, lL);
56467 return fData + foData + foEnd;
56468 };
56469 ZipContainer.getHeader = function (currentFile, offset) {
56470 var content = currentFile.content, path = currentFile.path, created = currentFile.created, isBase64 = currentFile.isBase64;
56471 var utf8_encode = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].utf8_encode, decToHex = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].decToHex;
56472 var utfPath = utf8_encode(path);
56473 var isUTF8 = utfPath !== path;
56474 var time = this.convertTime(created);
56475 var dt = this.convertDate(created);
56476 var extraFields = '';
56477 if (isUTF8) {
56478 var uExtraFieldPath = decToHex(1, 1) + decToHex(this.getFromCrc32Table(utfPath), 4) + utfPath;
56479 extraFields = "\x75\x70" + decToHex(uExtraFieldPath.length, 2) + uExtraFieldPath;
56480 }
56481 var _a = !content ? { size: 0, content: '' } : this.getConvertedContent(content, isBase64), size = _a.size, convertedContent = _a.content;
56482 var header = '\x0A\x00' +
56483 (isUTF8 ? '\x00\x08' : '\x00\x00') +
56484 '\x00\x00' +
56485 decToHex(time, 2) + // last modified time
56486 decToHex(dt, 2) + // last modified date
56487 decToHex(size ? this.getFromCrc32Table(convertedContent) : 0, 4) +
56488 decToHex(size, 4) + // compressed size
56489 decToHex(size, 4) + // uncompressed size
56490 decToHex(utfPath.length, 2) + // file name length
56491 decToHex(extraFields.length, 2); // extra field length
56492 var fileHeader = 'PK\x03\x04' + header + utfPath + extraFields;
56493 var folderHeader = 'PK\x01\x02' + // central header
56494 '\x14\x00' +
56495 header + // file header
56496 '\x00\x00' +
56497 '\x00\x00' +
56498 '\x00\x00' +
56499 (content ? '\x00\x00\x00\x00' : '\x10\x00\x00\x00') + // external file attributes
56500 decToHex(offset, 4) + // relative offset of local header
56501 utfPath + // file name
56502 extraFields; // extra field
56503 return { fileHeader: fileHeader, folderHeader: folderHeader, content: convertedContent || '' };
56504 };
56505 ZipContainer.getConvertedContent = function (content, isBase64) {
56506 if (isBase64 === void 0) { isBase64 = false; }
56507 if (isBase64) {
56508 content = content.split(';base64,')[1];
56509 }
56510 content = isBase64 ? atob(content) : content;
56511 return {
56512 size: content.length,
56513 content: content
56514 };
56515 };
56516 ZipContainer.buildFolderEnd = function (tLen, cLen, lLen) {
56517 var decToHex = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].decToHex;
56518 return 'PK\x05\x06' + // central folder end
56519 '\x00\x00' +
56520 '\x00\x00' +
56521 decToHex(tLen, 2) + // total number of entries in the central folder
56522 decToHex(tLen, 2) + // total number of entries in the central folder
56523 decToHex(cLen, 4) + // size of the central folder
56524 decToHex(lLen, 4) + // central folder start offset
56525 '\x00\x00';
56526 };
56527 ZipContainer.buildUint8Array = function (content) {
56528 var uint8 = new Uint8Array(content.length);
56529 for (var i = 0; i < uint8.length; i++) {
56530 uint8[i] = content.charCodeAt(i);
56531 }
56532 return uint8;
56533 };
56534 ZipContainer.getFromCrc32Table = function (content) {
56535 if (!content.length) {
56536 return 0;
56537 }
56538 var size = content.length;
56539 var iterable = new Uint8Array(size);
56540 for (var i = 0; i < size; i++) {
56541 iterable[i] = content.charCodeAt(i);
56542 }
56543 var crc = 0 ^ (-1);
56544 var j = 0;
56545 var k = 0;
56546 var l = 0;
56547 for (var i = 0; i < size; i++) {
56548 j = iterable[i];
56549 k = (crc ^ j) & 0xFF;
56550 l = crcTable[k];
56551 crc = (crc >>> 8) ^ l;
56552 }
56553 return crc ^ (-1);
56554 };
56555 ZipContainer.convertTime = function (date) {
56556 var time = date.getHours();
56557 time <<= 6;
56558 time = time | date.getMinutes();
56559 time <<= 5;
56560 time = time | date.getSeconds() / 2;
56561 return time;
56562 };
56563 ZipContainer.convertDate = function (date) {
56564 var dt = date.getFullYear() - 1980;
56565 dt <<= 4;
56566 dt = dt | (date.getMonth() + 1);
56567 dt <<= 5;
56568 dt = dt | date.getDate();
56569 return dt;
56570 };
56571 ZipContainer.folders = [];
56572 ZipContainer.files = [];
56573 return ZipContainer;
56574}());
56575
56576
56577
56578/***/ }),
56579/* 269 */
56580/***/ (function(module, __webpack_exports__, __webpack_require__) {
56581
56582"use strict";
56583__webpack_require__.r(__webpack_exports__);
56584/* harmony import */ var _infiniteRowModelModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(270);
56585/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InfiniteRowModelModule", function() { return _infiniteRowModelModule__WEBPACK_IMPORTED_MODULE_0__["InfiniteRowModelModule"]; });
56586
56587
56588
56589
56590/***/ }),
56591/* 270 */
56592/***/ (function(module, __webpack_exports__, __webpack_require__) {
56593
56594"use strict";
56595__webpack_require__.r(__webpack_exports__);
56596/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InfiniteRowModelModule", function() { return InfiniteRowModelModule; });
56597/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
56598/* harmony import */ var _infiniteRowModel_infiniteRowModel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(271);
56599
56600
56601var InfiniteRowModelModule = {
56602 moduleName: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ModuleNames"].InfiniteRowModelModule,
56603 rowModels: { infinite: _infiniteRowModel_infiniteRowModel__WEBPACK_IMPORTED_MODULE_1__["InfiniteRowModel"] }
56604};
56605
56606
56607/***/ }),
56608/* 271 */
56609/***/ (function(module, __webpack_exports__, __webpack_require__) {
56610
56611"use strict";
56612__webpack_require__.r(__webpack_exports__);
56613/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InfiniteRowModel", function() { return InfiniteRowModel; });
56614/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
56615/* harmony import */ var _infiniteCache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(272);
56616var __extends = (undefined && undefined.__extends) || (function () {
56617 var extendStatics = function (d, b) {
56618 extendStatics = Object.setPrototypeOf ||
56619 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56620 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
56621 return extendStatics(d, b);
56622 };
56623 return function (d, b) {
56624 extendStatics(d, b);
56625 function __() { this.constructor = d; }
56626 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
56627 };
56628})();
56629var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
56630 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
56631 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
56632 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
56633 return c > 3 && r && Object.defineProperty(target, key, r), r;
56634};
56635
56636
56637var InfiniteRowModel = /** @class */ (function (_super) {
56638 __extends(InfiniteRowModel, _super);
56639 function InfiniteRowModel() {
56640 return _super !== null && _super.apply(this, arguments) || this;
56641 }
56642 InfiniteRowModel.prototype.getRowBounds = function (index) {
56643 return {
56644 rowHeight: this.rowHeight,
56645 rowTop: this.rowHeight * index
56646 };
56647 };
56648 // we don't implement as lazy row heights is not supported in this row model
56649 InfiniteRowModel.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) {
56650 return false;
56651 };
56652 InfiniteRowModel.prototype.init = function () {
56653 var _this = this;
56654 if (!this.gridOptionsWrapper.isRowModelInfinite()) {
56655 return;
56656 }
56657 this.rowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();
56658 this.addEventListeners();
56659 this.addDestroyFunc(function () { return _this.destroyCache(); });
56660 this.verifyProps();
56661 };
56662 InfiniteRowModel.prototype.verifyProps = function () {
56663 if (this.gridOptionsWrapper.getInitialGroupOrderComparator() != null) {
56664 var message_1 = "AG Grid: initialGroupOrderComparator cannot be used with Infinite Row Model. If using Infinite Row Model, then sorting is done on the server side, nothing to do with the client.";
56665 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].doOnce(function () { return console.warn(message_1); }, 'IRM.InitialGroupOrderComparator');
56666 }
56667 };
56668 InfiniteRowModel.prototype.start = function () {
56669 this.setDatasource(this.gridOptionsWrapper.getDatasource());
56670 };
56671 InfiniteRowModel.prototype.destroyDatasource = function () {
56672 if (this.datasource) {
56673 this.getContext().destroyBean(this.datasource);
56674 this.rowRenderer.datasourceChanged();
56675 this.datasource = null;
56676 }
56677 };
56678 InfiniteRowModel.prototype.addEventListeners = function () {
56679 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));
56680 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SORT_CHANGED, this.onSortChanged.bind(this));
56681 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_NEW_COLUMNS_LOADED, this.onColumnEverything.bind(this));
56682 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_STORE_UPDATED, this.onCacheUpdated.bind(this));
56683 };
56684 InfiniteRowModel.prototype.onFilterChanged = function () {
56685 this.reset();
56686 };
56687 InfiniteRowModel.prototype.onSortChanged = function () {
56688 this.reset();
56689 };
56690 InfiniteRowModel.prototype.onColumnEverything = function () {
56691 var resetRequired;
56692 // if cache params, we require reset only if sort model has changed. we don't need to check
56693 // for filter model, as the filter manager will fire an event when columns change that result
56694 // in the filter changing.
56695 if (this.cacheParams) {
56696 resetRequired = this.isSortModelDifferent();
56697 }
56698 else {
56699 // if no cacheParams, means first time creating the cache, so always create one
56700 resetRequired = true;
56701 }
56702 if (resetRequired) {
56703 this.reset();
56704 }
56705 };
56706 InfiniteRowModel.prototype.isSortModelDifferent = function () {
56707 return !_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].jsonEquals(this.cacheParams.sortModel, this.sortController.getSortModel());
56708 };
56709 InfiniteRowModel.prototype.getType = function () {
56710 return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Constants"].ROW_MODEL_TYPE_INFINITE;
56711 };
56712 InfiniteRowModel.prototype.setDatasource = function (datasource) {
56713 this.destroyDatasource();
56714 this.datasource = datasource;
56715 // only reset if we have a valid datasource to working with
56716 if (datasource) {
56717 this.reset();
56718 }
56719 };
56720 InfiniteRowModel.prototype.isEmpty = function () {
56721 return !this.infiniteCache;
56722 };
56723 InfiniteRowModel.prototype.isRowsToRender = function () {
56724 return !!this.infiniteCache;
56725 };
56726 InfiniteRowModel.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {
56727 return this.infiniteCache ? this.infiniteCache.getRowNodesInRange(firstInRange, lastInRange) : [];
56728 };
56729 InfiniteRowModel.prototype.reset = function () {
56730 // important to return here, as the user could be setting filter or sort before
56731 // data-source is set
56732 if (!this.datasource) {
56733 return;
56734 }
56735 // if user is providing id's, then this means we can keep the selection between datasource hits,
56736 // as the rows will keep their unique id's even if, for example, server side sorting or filtering
56737 // is done.
56738 var getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();
56739 var userGeneratingIds = getRowIdFunc != null;
56740 if (!userGeneratingIds) {
56741 this.selectionService.reset();
56742 }
56743 this.resetCache();
56744 var event = this.createModelUpdatedEvent();
56745 this.eventService.dispatchEvent(event);
56746 };
56747 InfiniteRowModel.prototype.createModelUpdatedEvent = function () {
56748 return {
56749 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_MODEL_UPDATED,
56750 api: this.gridApi,
56751 columnApi: this.columnApi,
56752 // not sure if these should all be false - noticed if after implementing,
56753 // maybe they should be true?
56754 newPage: false,
56755 newData: false,
56756 keepRenderedRows: true,
56757 animate: false
56758 };
56759 };
56760 InfiniteRowModel.prototype.resetCache = function () {
56761 // if not first time creating a cache, need to destroy the old one
56762 this.destroyCache();
56763 this.cacheParams = {
56764 // the user provided datasource
56765 datasource: this.datasource,
56766 // sort and filter model
56767 filterModel: this.filterManager.getFilterModel(),
56768 sortModel: this.sortController.getSortModel(),
56769 rowNodeBlockLoader: this.rowNodeBlockLoader,
56770 // properties - this way we take a snapshot of them, so if user changes any, they will be
56771 // used next time we create a new cache, which is generally after a filter or sort change,
56772 // or a new datasource is set
56773 initialRowCount: this.defaultIfInvalid(this.gridOptionsWrapper.getInfiniteInitialRowCount(), 1),
56774 maxBlocksInCache: this.gridOptionsWrapper.getMaxBlocksInCache(),
56775 rowHeight: this.gridOptionsWrapper.getRowHeightAsNumber(),
56776 // if user doesn't provide overflow, we use default overflow of 1, so user can scroll past
56777 // the current page and request first row of next page
56778 overflowSize: this.defaultIfInvalid(this.gridOptionsWrapper.getCacheOverflowSize(), 1),
56779 // page size needs to be 1 or greater. having it at 1 would be silly, as you would be hitting the
56780 // server for one page at a time. so the default if not specified is 100.
56781 blockSize: this.defaultIfInvalid(this.gridOptionsWrapper.getCacheBlockSize(), 100),
56782 // the cache could create this, however it is also used by the pages, so handy to create it
56783 // here as the settings are also passed to the pages
56784 lastAccessedSequence: new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["NumberSequence"]()
56785 };
56786 this.infiniteCache = this.createBean(new _infiniteCache__WEBPACK_IMPORTED_MODULE_1__["InfiniteCache"](this.cacheParams));
56787 };
56788 InfiniteRowModel.prototype.defaultIfInvalid = function (value, defaultValue) {
56789 return value > 0 ? value : defaultValue;
56790 };
56791 InfiniteRowModel.prototype.destroyCache = function () {
56792 if (this.infiniteCache) {
56793 this.infiniteCache = this.destroyBean(this.infiniteCache);
56794 }
56795 };
56796 InfiniteRowModel.prototype.onCacheUpdated = function () {
56797 var event = this.createModelUpdatedEvent();
56798 this.eventService.dispatchEvent(event);
56799 };
56800 InfiniteRowModel.prototype.getRow = function (rowIndex) {
56801 if (!this.infiniteCache) {
56802 return undefined;
56803 }
56804 if (rowIndex >= this.infiniteCache.getRowCount()) {
56805 return undefined;
56806 }
56807 return this.infiniteCache.getRow(rowIndex);
56808 };
56809 InfiniteRowModel.prototype.getRowNode = function (id) {
56810 var result;
56811 this.forEachNode(function (rowNode) {
56812 if (rowNode.id === id) {
56813 result = rowNode;
56814 }
56815 });
56816 return result;
56817 };
56818 InfiniteRowModel.prototype.forEachNode = function (callback) {
56819 if (this.infiniteCache) {
56820 this.infiniteCache.forEachNodeDeep(callback);
56821 }
56822 };
56823 InfiniteRowModel.prototype.getTopLevelRowCount = function () {
56824 return this.getRowCount();
56825 };
56826 InfiniteRowModel.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {
56827 return topLevelIndex;
56828 };
56829 InfiniteRowModel.prototype.getRowIndexAtPixel = function (pixel) {
56830 if (this.rowHeight !== 0) { // avoid divide by zero error
56831 var rowIndexForPixel = Math.floor(pixel / this.rowHeight);
56832 var lastRowIndex = this.getRowCount() - 1;
56833 if (rowIndexForPixel > lastRowIndex) {
56834 return lastRowIndex;
56835 }
56836 return rowIndexForPixel;
56837 }
56838 return 0;
56839 };
56840 InfiniteRowModel.prototype.getRowCount = function () {
56841 return this.infiniteCache ? this.infiniteCache.getRowCount() : 0;
56842 };
56843 InfiniteRowModel.prototype.isRowPresent = function (rowNode) {
56844 var foundRowNode = this.getRowNode(rowNode.id);
56845 return !!foundRowNode;
56846 };
56847 InfiniteRowModel.prototype.refreshCache = function () {
56848 if (this.infiniteCache) {
56849 this.infiniteCache.refreshCache();
56850 }
56851 };
56852 InfiniteRowModel.prototype.purgeCache = function () {
56853 if (this.infiniteCache) {
56854 this.infiniteCache.purgeCache();
56855 }
56856 };
56857 // for iRowModel
56858 InfiniteRowModel.prototype.isLastRowIndexKnown = function () {
56859 if (this.infiniteCache) {
56860 return this.infiniteCache.isLastRowIndexKnown();
56861 }
56862 return false;
56863 };
56864 InfiniteRowModel.prototype.setRowCount = function (rowCount, lastRowIndexKnown) {
56865 if (this.infiniteCache) {
56866 this.infiniteCache.setRowCount(rowCount, lastRowIndexKnown);
56867 }
56868 };
56869 __decorate([
56870 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
56871 ], InfiniteRowModel.prototype, "filterManager", void 0);
56872 __decorate([
56873 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortController')
56874 ], InfiniteRowModel.prototype, "sortController", void 0);
56875 __decorate([
56876 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('selectionService')
56877 ], InfiniteRowModel.prototype, "selectionService", void 0);
56878 __decorate([
56879 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
56880 ], InfiniteRowModel.prototype, "gridApi", void 0);
56881 __decorate([
56882 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
56883 ], InfiniteRowModel.prototype, "columnApi", void 0);
56884 __decorate([
56885 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
56886 ], InfiniteRowModel.prototype, "rowRenderer", void 0);
56887 __decorate([
56888 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowNodeBlockLoader')
56889 ], InfiniteRowModel.prototype, "rowNodeBlockLoader", void 0);
56890 __decorate([
56891 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
56892 ], InfiniteRowModel.prototype, "init", null);
56893 __decorate([
56894 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
56895 ], InfiniteRowModel.prototype, "destroyDatasource", null);
56896 InfiniteRowModel = __decorate([
56897 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('rowModel')
56898 ], InfiniteRowModel);
56899 return InfiniteRowModel;
56900}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
56901
56902
56903
56904/***/ }),
56905/* 272 */
56906/***/ (function(module, __webpack_exports__, __webpack_require__) {
56907
56908"use strict";
56909__webpack_require__.r(__webpack_exports__);
56910/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InfiniteCache", function() { return InfiniteCache; });
56911/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
56912/* harmony import */ var _infiniteBlock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(273);
56913var __extends = (undefined && undefined.__extends) || (function () {
56914 var extendStatics = function (d, b) {
56915 extendStatics = Object.setPrototypeOf ||
56916 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56917 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
56918 return extendStatics(d, b);
56919 };
56920 return function (d, b) {
56921 extendStatics(d, b);
56922 function __() { this.constructor = d; }
56923 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
56924 };
56925})();
56926var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
56927 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
56928 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
56929 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
56930 return c > 3 && r && Object.defineProperty(target, key, r), r;
56931};
56932var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
56933 return function (target, key) { decorator(target, key, paramIndex); }
56934};
56935
56936
56937var InfiniteCache = /** @class */ (function (_super) {
56938 __extends(InfiniteCache, _super);
56939 function InfiniteCache(params) {
56940 var _this = _super.call(this) || this;
56941 _this.lastRowIndexKnown = false;
56942 _this.blocks = {};
56943 _this.blockCount = 0;
56944 _this.rowCount = params.initialRowCount;
56945 _this.params = params;
56946 return _this;
56947 }
56948 InfiniteCache.prototype.setBeans = function (loggerFactory) {
56949 this.logger = loggerFactory.create('InfiniteCache');
56950 };
56951 // the rowRenderer will not pass dontCreatePage, meaning when rendering the grid,
56952 // it will want new pages in the cache as it asks for rows. only when we are inserting /
56953 // removing rows via the api is dontCreatePage set, where we move rows between the pages.
56954 InfiniteCache.prototype.getRow = function (rowIndex, dontCreatePage) {
56955 if (dontCreatePage === void 0) { dontCreatePage = false; }
56956 var blockId = Math.floor(rowIndex / this.params.blockSize);
56957 var block = this.blocks[blockId];
56958 if (!block) {
56959 if (dontCreatePage) {
56960 return undefined;
56961 }
56962 block = this.createBlock(blockId);
56963 }
56964 return block.getRow(rowIndex);
56965 };
56966 InfiniteCache.prototype.createBlock = function (blockNumber) {
56967 var newBlock = this.createBean(new _infiniteBlock__WEBPACK_IMPORTED_MODULE_1__["InfiniteBlock"](blockNumber, this, this.params));
56968 this.blocks[newBlock.getId()] = newBlock;
56969 this.blockCount++;
56970 this.purgeBlocksIfNeeded(newBlock);
56971 this.params.rowNodeBlockLoader.addBlock(newBlock);
56972 return newBlock;
56973 };
56974 // we have this on infinite row model only, not server side row model,
56975 // because for server side, it would leave the children in inconsistent
56976 // state - eg if a node had children, but after the refresh it had data
56977 // for a different row, then the children would be with the wrong row node.
56978 InfiniteCache.prototype.refreshCache = function () {
56979 var nothingToRefresh = this.blockCount == 0;
56980 if (nothingToRefresh) {
56981 this.purgeCache();
56982 return;
56983 }
56984 this.getBlocksInOrder().forEach(function (block) { return block.setStateWaitingToLoad(); });
56985 this.params.rowNodeBlockLoader.checkBlockToLoad();
56986 };
56987 InfiniteCache.prototype.destroyAllBlocks = function () {
56988 var _this = this;
56989 this.getBlocksInOrder().forEach(function (block) { return _this.destroyBlock(block); });
56990 };
56991 InfiniteCache.prototype.getRowCount = function () {
56992 return this.rowCount;
56993 };
56994 InfiniteCache.prototype.isLastRowIndexKnown = function () {
56995 return this.lastRowIndexKnown;
56996 };
56997 // block calls this, when page loaded
56998 InfiniteCache.prototype.pageLoaded = function (block, lastRow) {
56999 // if we are not active, then we ignore all events, otherwise we could end up getting the
57000 // grid to refresh even though we are no longer the active cache
57001 if (!this.isAlive()) {
57002 return;
57003 }
57004 this.logger.log("onPageLoaded: page = " + block.getId() + ", lastRow = " + lastRow);
57005 this.checkRowCount(block, lastRow);
57006 // we fire cacheUpdated even if the row count has not changed, as some items need updating even
57007 // if no new rows to render. for example the pagination panel has '?' as the total rows when loading
57008 // is underway, which would need to get updated when loading finishes.
57009 this.onCacheUpdated();
57010 };
57011 InfiniteCache.prototype.purgeBlocksIfNeeded = function (blockToExclude) {
57012 var _this = this;
57013 // we exclude checking for the page just created, as this has yet to be accessed and hence
57014 // the lastAccessed stamp will not be updated for the first time yet
57015 var blocksForPurging = this.getBlocksInOrder().filter(function (b) { return b != blockToExclude; });
57016 var lastAccessedComparator = function (a, b) { return b.getLastAccessed() - a.getLastAccessed(); };
57017 blocksForPurging.sort(lastAccessedComparator);
57018 // we remove (maxBlocksInCache - 1) as we already excluded the 'just created' page.
57019 // in other words, after the splice operation below, we have taken out the blocks
57020 // we want to keep, which means we are left with blocks that we can potentially purge
57021 var maxBlocksProvided = this.params.maxBlocksInCache > 0;
57022 var blocksToKeep = maxBlocksProvided ? this.params.maxBlocksInCache - 1 : null;
57023 var emptyBlocksToKeep = InfiniteCache.MAX_EMPTY_BLOCKS_TO_KEEP - 1;
57024 blocksForPurging.forEach(function (block, index) {
57025 var purgeBecauseBlockEmpty = block.getState() === _infiniteBlock__WEBPACK_IMPORTED_MODULE_1__["InfiniteBlock"].STATE_WAITING_TO_LOAD && index >= emptyBlocksToKeep;
57026 var purgeBecauseCacheFull = maxBlocksProvided ? index >= blocksToKeep : false;
57027 if (purgeBecauseBlockEmpty || purgeBecauseCacheFull) {
57028 // if the block currently has rows been displayed, then don't remove it either.
57029 // this can happen if user has maxBlocks=2, and blockSize=5 (thus 10 max rows in cache)
57030 // but the screen is showing 20 rows, so at least 4 blocks are needed.
57031 if (_this.isBlockCurrentlyDisplayed(block)) {
57032 return;
57033 }
57034 // don't want to loose keyboard focus, so keyboard navigation can continue. so keep focused blocks.
57035 if (_this.isBlockFocused(block)) {
57036 return;
57037 }
57038 // at this point, block is not needed, so burn baby burn
57039 _this.removeBlockFromCache(block);
57040 }
57041 });
57042 };
57043 InfiniteCache.prototype.isBlockFocused = function (block) {
57044 var focusedCell = this.focusService.getFocusCellToUseAfterRefresh();
57045 if (!focusedCell) {
57046 return false;
57047 }
57048 if (focusedCell.rowPinned != null) {
57049 return false;
57050 }
57051 var blockIndexStart = block.getStartRow();
57052 var blockIndexEnd = block.getEndRow();
57053 var hasFocus = focusedCell.rowIndex >= blockIndexStart && focusedCell.rowIndex < blockIndexEnd;
57054 return hasFocus;
57055 };
57056 InfiniteCache.prototype.isBlockCurrentlyDisplayed = function (block) {
57057 var startIndex = block.getStartRow();
57058 var endIndex = block.getEndRow() - 1;
57059 return this.rowRenderer.isRangeInRenderedViewport(startIndex, endIndex);
57060 };
57061 InfiniteCache.prototype.removeBlockFromCache = function (blockToRemove) {
57062 if (!blockToRemove) {
57063 return;
57064 }
57065 this.destroyBlock(blockToRemove);
57066 // we do not want to remove the 'loaded' event listener, as the
57067 // concurrent loads count needs to be updated when the load is complete
57068 // if the purged page is in loading state
57069 };
57070 InfiniteCache.prototype.checkRowCount = function (block, lastRow) {
57071 // if client provided a last row, we always use it, as it could change between server calls
57072 // if user deleted data and then called refresh on the grid.
57073 if (typeof lastRow === 'number' && lastRow >= 0) {
57074 this.rowCount = lastRow;
57075 this.lastRowIndexKnown = true;
57076 }
57077 else if (!this.lastRowIndexKnown) {
57078 // otherwise, see if we need to add some virtual rows
57079 var lastRowIndex = (block.getId() + 1) * this.params.blockSize;
57080 var lastRowIndexPlusOverflow = lastRowIndex + this.params.overflowSize;
57081 if (this.rowCount < lastRowIndexPlusOverflow) {
57082 this.rowCount = lastRowIndexPlusOverflow;
57083 }
57084 }
57085 };
57086 InfiniteCache.prototype.setRowCount = function (rowCount, lastRowIndexKnown) {
57087 this.rowCount = rowCount;
57088 // if undefined is passed, we do not set this value, if one of {true,false}
57089 // is passed, we do set the value.
57090 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(lastRowIndexKnown)) {
57091 this.lastRowIndexKnown = lastRowIndexKnown;
57092 }
57093 // if we are still searching, then the row count must not end at the end
57094 // of a particular page, otherwise the searching will not pop into the
57095 // next page
57096 if (!this.lastRowIndexKnown) {
57097 if (this.rowCount % this.params.blockSize === 0) {
57098 this.rowCount++;
57099 }
57100 }
57101 this.onCacheUpdated();
57102 };
57103 InfiniteCache.prototype.forEachNodeDeep = function (callback) {
57104 var _this = this;
57105 var sequence = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["NumberSequence"]();
57106 this.getBlocksInOrder().forEach(function (block) { return block.forEachNode(callback, sequence, _this.rowCount); });
57107 };
57108 InfiniteCache.prototype.getBlocksInOrder = function () {
57109 // get all page id's as NUMBERS (not strings, as we need to sort as numbers) and in descending order
57110 var blockComparator = function (a, b) { return a.getId() - b.getId(); };
57111 var blocks = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].getAllValuesInObject(this.blocks).sort(blockComparator);
57112 return blocks;
57113 };
57114 InfiniteCache.prototype.destroyBlock = function (block) {
57115 delete this.blocks[block.getId()];
57116 this.destroyBean(block);
57117 this.blockCount--;
57118 this.params.rowNodeBlockLoader.removeBlock(block);
57119 };
57120 // gets called 1) row count changed 2) cache purged 3) items inserted
57121 InfiniteCache.prototype.onCacheUpdated = function () {
57122 if (this.isAlive()) {
57123 // if the virtualRowCount is shortened, then it's possible blocks exist that are no longer
57124 // in the valid range. so we must remove these. this can happen if user explicitly sets
57125 // the virtual row count, or the datasource returns a result and sets lastRow to something
57126 // less than virtualRowCount (can happen if user scrolls down, server reduces dataset size).
57127 this.destroyAllBlocksPastVirtualRowCount();
57128 // this results in both row models (infinite and server side) firing ModelUpdated,
57129 // however server side row model also updates the row indexes first
57130 var event_1 = {
57131 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_STORE_UPDATED
57132 };
57133 this.eventService.dispatchEvent(event_1);
57134 }
57135 };
57136 InfiniteCache.prototype.destroyAllBlocksPastVirtualRowCount = function () {
57137 var _this = this;
57138 var blocksToDestroy = [];
57139 this.getBlocksInOrder().forEach(function (block) {
57140 var startRow = block.getId() * _this.params.blockSize;
57141 if (startRow >= _this.rowCount) {
57142 blocksToDestroy.push(block);
57143 }
57144 });
57145 if (blocksToDestroy.length > 0) {
57146 blocksToDestroy.forEach(function (block) { return _this.destroyBlock(block); });
57147 }
57148 };
57149 InfiniteCache.prototype.purgeCache = function () {
57150 var _this = this;
57151 this.getBlocksInOrder().forEach(function (block) { return _this.removeBlockFromCache(block); });
57152 this.lastRowIndexKnown = false;
57153 // if zero rows in the cache, we need to get the SSRM to start asking for rows again.
57154 // otherwise if set to zero rows last time, and we don't update the row count, then after
57155 // the purge there will still be zero rows, meaning the SSRM won't request any rows.
57156 // to kick things off, at least one row needs to be asked for.
57157 if (this.rowCount === 0) {
57158 this.rowCount = this.params.initialRowCount;
57159 }
57160 this.onCacheUpdated();
57161 };
57162 InfiniteCache.prototype.getRowNodesInRange = function (firstInRange, lastInRange) {
57163 var _this = this;
57164 var result = [];
57165 var lastBlockId = -1;
57166 var inActiveRange = false;
57167 var numberSequence = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["NumberSequence"]();
57168 // if only one node passed, we start the selection at the top
57169 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(firstInRange)) {
57170 inActiveRange = true;
57171 }
57172 var foundGapInSelection = false;
57173 this.getBlocksInOrder().forEach(function (block) {
57174 if (foundGapInSelection) {
57175 return;
57176 }
57177 if (inActiveRange && (lastBlockId + 1 !== block.getId())) {
57178 foundGapInSelection = true;
57179 return;
57180 }
57181 lastBlockId = block.getId();
57182 block.forEachNode(function (rowNode) {
57183 var hitFirstOrLast = rowNode === firstInRange || rowNode === lastInRange;
57184 if (inActiveRange || hitFirstOrLast) {
57185 result.push(rowNode);
57186 }
57187 if (hitFirstOrLast) {
57188 inActiveRange = !inActiveRange;
57189 }
57190 }, numberSequence, _this.rowCount);
57191 });
57192 // inActiveRange will be still true if we never hit the second rowNode
57193 var invalidRange = foundGapInSelection || inActiveRange;
57194 return invalidRange ? [] : result;
57195 };
57196 // this property says how many empty blocks should be in a cache, eg if scrolls down fast and creates 10
57197 // blocks all for loading, the grid will only load the last 2 - it will assume the blocks the user quickly
57198 // scrolled over are not needed to be loaded.
57199 InfiniteCache.MAX_EMPTY_BLOCKS_TO_KEEP = 2;
57200 __decorate([
57201 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
57202 ], InfiniteCache.prototype, "rowRenderer", void 0);
57203 __decorate([
57204 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("focusService")
57205 ], InfiniteCache.prototype, "focusService", void 0);
57206 __decorate([
57207 __param(0, Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('loggerFactory'))
57208 ], InfiniteCache.prototype, "setBeans", null);
57209 __decorate([
57210 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
57211 ], InfiniteCache.prototype, "destroyAllBlocks", null);
57212 return InfiniteCache;
57213}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
57214
57215
57216
57217/***/ }),
57218/* 273 */
57219/***/ (function(module, __webpack_exports__, __webpack_require__) {
57220
57221"use strict";
57222__webpack_require__.r(__webpack_exports__);
57223/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InfiniteBlock", function() { return InfiniteBlock; });
57224/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
57225var __extends = (undefined && undefined.__extends) || (function () {
57226 var extendStatics = function (d, b) {
57227 extendStatics = Object.setPrototypeOf ||
57228 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
57229 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
57230 return extendStatics(d, b);
57231 };
57232 return function (d, b) {
57233 extendStatics(d, b);
57234 function __() { this.constructor = d; }
57235 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57236 };
57237})();
57238var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
57239 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
57240 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
57241 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
57242 return c > 3 && r && Object.defineProperty(target, key, r), r;
57243};
57244
57245var InfiniteBlock = /** @class */ (function (_super) {
57246 __extends(InfiniteBlock, _super);
57247 function InfiniteBlock(id, parentCache, params) {
57248 var _this = _super.call(this, id) || this;
57249 _this.parentCache = parentCache;
57250 _this.params = params;
57251 // we don't need to calculate these now, as the inputs don't change,
57252 // however it makes the code easier to read if we work them out up front
57253 _this.startRow = id * params.blockSize;
57254 _this.endRow = _this.startRow + params.blockSize;
57255 return _this;
57256 }
57257 InfiniteBlock.prototype.postConstruct = function () {
57258 this.createRowNodes();
57259 };
57260 InfiniteBlock.prototype.getBlockStateJson = function () {
57261 return {
57262 id: '' + this.getId(),
57263 state: {
57264 blockNumber: this.getId(),
57265 startRow: this.getStartRow(),
57266 endRow: this.getEndRow(),
57267 pageStatus: this.getState()
57268 }
57269 };
57270 };
57271 InfiniteBlock.prototype.setDataAndId = function (rowNode, data, index) {
57272 // if there's no id and the rowNode was rendered before, it means this
57273 // was a placeholder rowNode and should not be recycled. Setting
57274 // `alreadyRendered` to `false` forces the rowRenderer to flush it.
57275 if (!rowNode.id && rowNode.alreadyRendered) {
57276 rowNode.alreadyRendered = false;
57277 }
57278 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(data)) {
57279 // this means if the user is not providing id's we just use the
57280 // index for the row. this will allow selection to work (that is based
57281 // on index) as long user is not inserting or deleting rows,
57282 // or wanting to keep selection between server side sorting or filtering
57283 rowNode.setDataAndId(data, index.toString());
57284 }
57285 else {
57286 rowNode.setDataAndId(undefined, undefined);
57287 }
57288 };
57289 InfiniteBlock.prototype.loadFromDatasource = function () {
57290 var _this = this;
57291 var params = this.createLoadParams();
57292 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(this.params.datasource.getRows)) {
57293 console.warn("AG Grid: datasource is missing getRows method");
57294 return;
57295 }
57296 // put in timeout, to force result to be async
57297 window.setTimeout(function () {
57298 _this.params.datasource.getRows(params);
57299 }, 0);
57300 };
57301 InfiniteBlock.prototype.processServerFail = function () {
57302 // todo - this method has better handling in SSRM
57303 };
57304 InfiniteBlock.prototype.createLoadParams = function () {
57305 // PROBLEM . . . . when the user sets sort via colDef.sort, then this code
57306 // is executing before the sort is set up, so server is not getting the sort
57307 // model. need to change with regards order - so the server side request is
57308 // AFTER thus it gets the right sort model.
57309 var params = {
57310 startRow: this.getStartRow(),
57311 endRow: this.getEndRow(),
57312 successCallback: this.pageLoaded.bind(this, this.getVersion()),
57313 failCallback: this.pageLoadFailed.bind(this, this.getVersion()),
57314 sortModel: this.params.sortModel,
57315 filterModel: this.params.filterModel,
57316 context: this.gridOptionsWrapper.getContext()
57317 };
57318 return params;
57319 };
57320 InfiniteBlock.prototype.forEachNode = function (callback, sequence, rowCount) {
57321 var _this = this;
57322 this.rowNodes.forEach(function (rowNode, index) {
57323 var rowIndex = _this.startRow + index;
57324 if (rowIndex < rowCount) {
57325 callback(rowNode, sequence.next());
57326 }
57327 });
57328 };
57329 InfiniteBlock.prototype.getLastAccessed = function () {
57330 return this.lastAccessed;
57331 };
57332 InfiniteBlock.prototype.getRow = function (rowIndex, dontTouchLastAccessed) {
57333 if (dontTouchLastAccessed === void 0) { dontTouchLastAccessed = false; }
57334 if (!dontTouchLastAccessed) {
57335 this.lastAccessed = this.params.lastAccessedSequence.next();
57336 }
57337 var localIndex = rowIndex - this.startRow;
57338 return this.rowNodes[localIndex];
57339 };
57340 InfiniteBlock.prototype.getStartRow = function () {
57341 return this.startRow;
57342 };
57343 InfiniteBlock.prototype.getEndRow = function () {
57344 return this.endRow;
57345 };
57346 // creates empty row nodes, data is missing as not loaded yet
57347 InfiniteBlock.prototype.createRowNodes = function () {
57348 this.rowNodes = [];
57349 for (var i = 0; i < this.params.blockSize; i++) {
57350 var rowIndex = this.startRow + i;
57351 var rowNode = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNode"](this.beans);
57352 rowNode.setRowHeight(this.params.rowHeight);
57353 rowNode.uiLevel = 0;
57354 rowNode.setRowIndex(rowIndex);
57355 rowNode.setRowTop(this.params.rowHeight * rowIndex);
57356 this.rowNodes.push(rowNode);
57357 }
57358 };
57359 InfiniteBlock.prototype.processServerResult = function (params) {
57360 var _this = this;
57361 this.rowNodes.forEach(function (rowNode, index) {
57362 var data = params.rowData ? params.rowData[index] : undefined;
57363 _this.setDataAndId(rowNode, data, _this.startRow + index);
57364 });
57365 var finalRowCount = params.rowCount != null && params.rowCount >= 0 ? params.rowCount : undefined;
57366 this.parentCache.pageLoaded(this, finalRowCount);
57367 };
57368 InfiniteBlock.prototype.destroyRowNodes = function () {
57369 this.rowNodes.forEach(function (rowNode) {
57370 // this is needed, so row render knows to fade out the row, otherwise it
57371 // sees row top is present, and thinks the row should be shown.
57372 rowNode.clearRowTopAndRowIndex();
57373 });
57374 };
57375 __decorate([
57376 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('beans')
57377 ], InfiniteBlock.prototype, "beans", void 0);
57378 __decorate([
57379 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
57380 ], InfiniteBlock.prototype, "postConstruct", null);
57381 __decorate([
57382 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
57383 ], InfiniteBlock.prototype, "destroyRowNodes", null);
57384 return InfiniteBlock;
57385}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNodeBlock"]));
57386
57387
57388
57389/***/ }),
57390/* 274 */
57391/***/ (function(module, __webpack_exports__, __webpack_require__) {
57392
57393"use strict";
57394__webpack_require__.r(__webpack_exports__);
57395/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AllCommunityModules", function() { return AllCommunityModules; });
57396/* harmony import */ var _ag_grid_community_client_side_row_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
57397/* harmony import */ var _ag_grid_community_infinite_row_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(269);
57398/* harmony import */ var _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(259);
57399/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelModule", function() { return _ag_grid_community_client_side_row_model__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelModule"]; });
57400
57401/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseCreator", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["BaseCreator"]; });
57402
57403/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseGridSerializingSession", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["BaseGridSerializingSession"]; });
57404
57405/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CsvCreator", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["CsvCreator"]; });
57406
57407/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CsvExportModule", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["CsvExportModule"]; });
57408
57409/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Downloader", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["Downloader"]; });
57410
57411/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridSerializer", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["GridSerializer"]; });
57412
57413/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowType", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["RowType"]; });
57414
57415/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "XmlFactory", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["XmlFactory"]; });
57416
57417/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ZipContainer", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["ZipContainer"]; });
57418
57419/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InfiniteRowModelModule", function() { return _ag_grid_community_infinite_row_model__WEBPACK_IMPORTED_MODULE_1__["InfiniteRowModelModule"]; });
57420
57421/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
57422/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnFactory", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnFactory"]; });
57423
57424/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnModel", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnModel"]; });
57425
57426/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnKeyCreator", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnKeyCreator"]; });
57427
57428/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnUtils", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnUtils"]; });
57429
57430/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DisplayedGroupCreator", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["DisplayedGroupCreator"]; });
57431
57432/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupInstanceIdCreator", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GroupInstanceIdCreator"]; });
57433
57434/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentUtil", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ComponentUtil"]; });
57435
57436/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgStackComponentsRegistry", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgStackComponentsRegistry"]; });
57437
57438/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColDefUtil", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColDefUtil"]; });
57439
57440/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UserComponentRegistry", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["UserComponentRegistry"]; });
57441
57442/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UserComponentFactory", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["UserComponentFactory"]; });
57443
57444/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BeanStub", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]; });
57445
57446/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Context", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Context"]; });
57447
57448/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Autowired", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Autowired"]; });
57449
57450/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostConstruct", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PostConstruct"]; });
57451
57452/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PreConstruct", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PreConstruct"]; });
57453
57454/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Optional", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Optional"]; });
57455
57456/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bean", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Bean"]; });
57457
57458/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Qualifier", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Qualifier"]; });
57459
57460/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PreDestroy", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PreDestroy"]; });
57461
57462/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuerySelector", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["QuerySelector"]; });
57463
57464/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RefSelector", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RefSelector"]; });
57465
57466/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelFactoryMode", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ExcelFactoryMode"]; });
57467
57468/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragAndDropService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["DragAndDropService"]; });
57469
57470/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragSourceType", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["DragSourceType"]; });
57471
57472/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HorizontalDirection", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HorizontalDirection"]; });
57473
57474/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VerticalDirection", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["VerticalDirection"]; });
57475
57476/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["DragService"]; });
57477
57478/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Column"]; });
57479
57480/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnGroup", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnGroup"]; });
57481
57482/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProvidedColumnGroup", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ProvidedColumnGroup"]; });
57483
57484/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNode", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowNode"]; });
57485
57486/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowHighlightPosition", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowHighlightPosition"]; });
57487
57488/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterManager", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["FilterManager"]; });
57489
57490/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProvidedFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ProvidedFilter"]; });
57491
57492/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SimpleFilter"]; });
57493
57494/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScalarFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ScalarFilter"]; });
57495
57496/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["NumberFilter"]; });
57497
57498/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TextFilter"]; });
57499
57500/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["DateFilter"]; });
57501
57502/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextFloatingFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TextFloatingFilter"]; });
57503
57504/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderFilterCellComp"]; });
57505
57506/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FloatingFilterMapper", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["FloatingFilterMapper"]; });
57507
57508/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridBodyComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridBodyComp"]; });
57509
57510/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridBodyCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridBodyCtrl"]; });
57511
57512/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowAnimationCssClasses", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowAnimationCssClasses"]; });
57513
57514/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollVisibleService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ScrollVisibleService"]; });
57515
57516/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MouseEventService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["MouseEventService"]; });
57517
57518/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NavigationService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["NavigationService"]; });
57519
57520/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowContainerComp"]; });
57521
57522/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerName", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowContainerName"]; });
57523
57524/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowContainerCtrl"]; });
57525
57526/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerType", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowContainerType"]; });
57527
57528/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRowContainerTypeForName", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["getRowContainerTypeForName"]; });
57529
57530/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BodyDropPivotTarget", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["BodyDropPivotTarget"]; });
57531
57532/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BodyDropTarget", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["BodyDropTarget"]; });
57533
57534/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassApplier", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CssClassApplier"]; });
57535
57536/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderRowContainerComp"]; });
57537
57538/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridHeaderComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridHeaderComp"]; });
57539
57540/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridHeaderCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridHeaderCtrl"]; });
57541
57542/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderRowComp"]; });
57543
57544/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowType", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderRowType"]; });
57545
57546/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderRowCtrl"]; });
57547
57548/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderCellCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderCellCtrl"]; });
57549
57550/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderFilterCellCtrl"]; });
57551
57552/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupCellCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderGroupCellCtrl"]; });
57553
57554/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AbstractHeaderCellCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AbstractHeaderCellCtrl"]; });
57555
57556/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderRowContainerCtrl"]; });
57557
57558/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HorizontalResizeService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HorizontalResizeService"]; });
57559
57560/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MoveColumnFeature", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["MoveColumnFeature"]; });
57561
57562/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StandardMenuFactory", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["StandardMenuFactory"]; });
57563
57564/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabbedLayout", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TabbedLayout"]; });
57565
57566/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "simpleHttpRequest", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["simpleHttpRequest"]; });
57567
57568/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ResizeObserverService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ResizeObserverService"]; });
57569
57570/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AnimationFrameService"]; });
57571
57572/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LargeTextCellEditor", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["LargeTextCellEditor"]; });
57573
57574/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupEditorWrapper", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PopupEditorWrapper"]; });
57575
57576/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupSelectCellEditor", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PopupSelectCellEditor"]; });
57577
57578/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupTextCellEditor", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PopupTextCellEditor"]; });
57579
57580/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectCellEditor", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SelectCellEditor"]; });
57581
57582/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextCellEditor", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TextCellEditor"]; });
57583
57584/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Beans", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Beans"]; });
57585
57586/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimateShowChangeCellRenderer", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AnimateShowChangeCellRenderer"]; });
57587
57588/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimateSlideCellRenderer", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AnimateSlideCellRenderer"]; });
57589
57590/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCellRenderer", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GroupCellRenderer"]; });
57591
57592/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCellRendererCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GroupCellRendererCtrl"]; });
57593
57594/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SetLeftFeature", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SetLeftFeature"]; });
57595
57596/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PositionableFeature", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PositionableFeature"]; });
57597
57598/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoWidthCalculator", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AutoWidthCalculator"]; });
57599
57600/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxSelectionComponent", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CheckboxSelectionComponent"]; });
57601
57602/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CellComp"]; });
57603
57604/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CellCtrl"]; });
57605
57606/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowCtrl"]; });
57607
57608/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowRenderer", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowRenderer"]; });
57609
57610/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueFormatterService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ValueFormatterService"]; });
57611
57612/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PinnedRowModel", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PinnedRowModel"]; });
57613
57614/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServerSideTransactionResultStatus", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ServerSideTransactionResultStatus"]; });
57615
57616/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChangedPath", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ChangedPath"]; });
57617
57618/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlock", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowNodeBlock"]; });
57619
57620/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlockLoader", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowNodeBlockLoader"]; });
57621
57622/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PaginationProxy", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PaginationProxy"]; });
57623
57624/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelSteps", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ClientSideRowModelSteps"]; });
57625
57626/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylingService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["StylingService"]; });
57627
57628/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LayoutCssClasses", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["LayoutCssClasses"]; });
57629
57630/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgAbstractField", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgAbstractField"]; });
57631
57632/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgCheckbox", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgCheckbox"]; });
57633
57634/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgRadioButton", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgRadioButton"]; });
57635
57636/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgToggleButton", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgToggleButton"]; });
57637
57638/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputTextField", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgInputTextField"]; });
57639
57640/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputTextArea", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgInputTextArea"]; });
57641
57642/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputNumberField", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgInputNumberField"]; });
57643
57644/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputRange", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgInputRange"]; });
57645
57646/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgSelect", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgSelect"]; });
57647
57648/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgSlider", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgSlider"]; });
57649
57650/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgAngleSelect", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgAngleSelect"]; });
57651
57652/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgColorPicker", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgColorPicker"]; });
57653
57654/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgGroupComponent", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgGroupComponent"]; });
57655
57656/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuItemComponent", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgMenuItemComponent"]; });
57657
57658/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuList", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgMenuList"]; });
57659
57660/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuPanel", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgMenuPanel"]; });
57661
57662/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgDialog", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgDialog"]; });
57663
57664/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPanel", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgPanel"]; });
57665
57666/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Component"]; });
57667
57668/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassManager", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CssClassManager"]; });
57669
57670/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ManagedFocusFeature", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ManagedFocusFeature"]; });
57671
57672/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabGuardComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TabGuardComp"]; });
57673
57674/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabGuardCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TabGuardCtrl"]; });
57675
57676/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupComponent", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PopupComponent"]; });
57677
57678/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PopupService"]; });
57679
57680/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TouchListener", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TouchListener"]; });
57681
57682/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualList", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["VirtualList"]; });
57683
57684/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRangeType", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CellRangeType"]; });
57685
57686/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionHandleType", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SelectionHandleType"]; });
57687
57688/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoScrollService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AutoScrollService"]; });
57689
57690/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VanillaFrameworkOverrides", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["VanillaFrameworkOverrides"]; });
57691
57692/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellNavigationService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CellNavigationService"]; });
57693
57694/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AlignedGridsService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AlignedGridsService"]; });
57695
57696/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Constants", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Constants"]; });
57697
57698/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "KeyCode", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["KeyCode"]; });
57699
57700/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Grid"]; });
57701
57702/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridCoreCreator", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridCoreCreator"]; });
57703
57704/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridApi", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridApi"]; });
57705
57706/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Events"]; });
57707
57708/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FocusService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["FocusService"]; });
57709
57710/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultGroupComparator", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["defaultGroupComparator"]; });
57711
57712/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridOptionsWrapper", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridOptionsWrapper"]; });
57713
57714/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EventService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["EventService"]; });
57715
57716/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectableService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SelectableService"]; });
57717
57718/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeSorter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowNodeSorter"]; });
57719
57720/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CtrlsService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CtrlsService"]; });
57721
57722/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridComp"]; });
57723
57724/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridCtrl"]; });
57725
57726/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Logger"]; });
57727
57728/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoggerFactory", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["LoggerFactory"]; });
57729
57730/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SelectionService"]; });
57731
57732/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortController", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SortController"]; });
57733
57734/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TemplateService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TemplateService"]; });
57735
57736/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Color"]; });
57737
57738/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stringToArray", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["stringToArray"]; });
57739
57740/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["_"]; });
57741
57742/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberSequence", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["NumberSequence"]; });
57743
57744/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromiseStatus", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgPromiseStatus"]; });
57745
57746/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromise", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgPromise"]; });
57747
57748/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Timer"]; });
57749
57750/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ValueService"]; });
57751
57752/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueCache", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ValueCache"]; });
57753
57754/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ExpressionService"]; });
57755
57756/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellPositionUtils", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CellPositionUtils"]; });
57757
57758/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowPositionUtils", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowPositionUtils"]; });
57759
57760/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderPositionUtils", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderPositionUtils"]; });
57761
57762/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderNavigationService"]; });
57763
57764/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationDirection", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderNavigationDirection"]; });
57765
57766/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PropertyKeys", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PropertyKeys"]; });
57767
57768/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnApi", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnApi"]; });
57769
57770/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseComponentWrapper", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["BaseComponentWrapper"]; });
57771
57772/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Environment", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Environment"]; });
57773
57774/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomTooltipFeature", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CustomTooltipFeature"]; });
57775
57776/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BarColumnLabelPlacement", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["BarColumnLabelPlacement"]; });
57777
57778/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModuleNames", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"]; });
57779
57780/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModuleRegistry", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ModuleRegistry"]; });
57781
57782
57783
57784
57785var AllCommunityModules = [_ag_grid_community_client_side_row_model__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelModule"], _ag_grid_community_infinite_row_model__WEBPACK_IMPORTED_MODULE_1__["InfiniteRowModelModule"], _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["CsvExportModule"]];
57786
57787
57788
57789
57790
57791
57792/***/ })
57793/******/ ]);
57794});
\No newline at end of file