UNPKG

2.9 MBJavaScriptView Raw
1/**
2 * @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3 * @version v29.2.0
4 * @link https://www.ag-grid.com/
5 * @license MIT
6 */
7// @ag-grid-community/all-modules v29.2.0
8define("agGrid", [], function() { return /******/ (function(modules) { // webpackBootstrap
9/******/ // The module cache
10/******/ var installedModules = {};
11/******/
12/******/ // The require function
13/******/ function __webpack_require__(moduleId) {
14/******/
15/******/ // Check if module is in cache
16/******/ if(installedModules[moduleId]) {
17/******/ return installedModules[moduleId].exports;
18/******/ }
19/******/ // Create a new module (and put it into the cache)
20/******/ var module = installedModules[moduleId] = {
21/******/ i: moduleId,
22/******/ l: false,
23/******/ exports: {}
24/******/ };
25/******/
26/******/ // Execute the module function
27/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
28/******/
29/******/ // Flag the module as loaded
30/******/ module.l = true;
31/******/
32/******/ // Return the exports of the module
33/******/ return module.exports;
34/******/ }
35/******/
36/******/
37/******/ // expose the modules object (__webpack_modules__)
38/******/ __webpack_require__.m = modules;
39/******/
40/******/ // expose the module cache
41/******/ __webpack_require__.c = installedModules;
42/******/
43/******/ // define getter function for harmony exports
44/******/ __webpack_require__.d = function(exports, name, getter) {
45/******/ if(!__webpack_require__.o(exports, name)) {
46/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
47/******/ }
48/******/ };
49/******/
50/******/ // define __esModule on exports
51/******/ __webpack_require__.r = function(exports) {
52/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
53/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
54/******/ }
55/******/ Object.defineProperty(exports, '__esModule', { value: true });
56/******/ };
57/******/
58/******/ // create a fake namespace object
59/******/ // mode & 1: value is a module id, require it
60/******/ // mode & 2: merge all properties of value into the ns
61/******/ // mode & 4: return value when already ns object
62/******/ // mode & 8|1: behave like require
63/******/ __webpack_require__.t = function(value, mode) {
64/******/ if(mode & 1) value = __webpack_require__(value);
65/******/ if(mode & 8) return value;
66/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
67/******/ var ns = Object.create(null);
68/******/ __webpack_require__.r(ns);
69/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
70/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
71/******/ return ns;
72/******/ };
73/******/
74/******/ // getDefaultExport function for compatibility with non-harmony modules
75/******/ __webpack_require__.n = function(module) {
76/******/ var getter = module && module.__esModule ?
77/******/ function getDefault() { return module['default']; } :
78/******/ function getModuleExports() { return module; };
79/******/ __webpack_require__.d(getter, 'a', getter);
80/******/ return getter;
81/******/ };
82/******/
83/******/ // Object.prototype.hasOwnProperty.call
84/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
85/******/
86/******/ // __webpack_public_path__
87/******/ __webpack_require__.p = "";
88/******/
89/******/
90/******/ // Load entry module and return exports
91/******/ return __webpack_require__(__webpack_require__.s = 0);
92/******/ })
93/************************************************************************/
94/******/ ([
95/* 0 */
96/***/ (function(module, exports, __webpack_require__) {
97
98/**
99 * AUTOMATICALLY GENERATED FILE, DO NOT EDIT MANUALLY!
100 * Update this file by running `lerna run webpack-updater` in the monorepo root folder.
101 */
102var ClientSideRowModelModule = __webpack_require__(1);
103var GridCoreModule = __webpack_require__(3);
104var CsvExportModule = __webpack_require__(258);
105var InfiniteRowModelModule = __webpack_require__(269);
106var agGrid = __webpack_require__(275);
107Object.keys(agGrid).forEach(function(key) {
108 exports[key] = agGrid[key];
109});
110agGrid.ModuleRegistry.register(ClientSideRowModelModule.ClientSideRowModelModule);
111agGrid.ModuleRegistry.register(CsvExportModule.CsvExportModule);
112agGrid.ModuleRegistry.register(InfiniteRowModelModule.InfiniteRowModelModule);
113agGrid.ModuleRegistry.setIsBundled();
114
115
116/***/ }),
117/* 1 */
118/***/ (function(module, __webpack_exports__, __webpack_require__) {
119
120"use strict";
121__webpack_require__.r(__webpack_exports__);
122/* harmony import */ var _clientSideRowModelModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
123/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelModule", function() { return _clientSideRowModelModule__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelModule"]; });
124
125
126
127
128/***/ }),
129/* 2 */
130/***/ (function(module, __webpack_exports__, __webpack_require__) {
131
132"use strict";
133__webpack_require__.r(__webpack_exports__);
134/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelModule", function() { return ClientSideRowModelModule; });
135/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
136/* harmony import */ var _clientSideRowModel_clientSideRowModel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(249);
137/* harmony import */ var _clientSideRowModel_filterStage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(251);
138/* harmony import */ var _clientSideRowModel_sortStage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(252);
139/* harmony import */ var _clientSideRowModel_flattenStage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(253);
140/* harmony import */ var _clientSideRowModel_sortService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(254);
141/* harmony import */ var _clientSideRowModel_filterService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(255);
142/* harmony import */ var _clientSideRowModel_immutableService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(256);
143/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(257);
144
145
146
147
148
149
150
151
152
153var ClientSideRowModelModule = {
154 version: _version__WEBPACK_IMPORTED_MODULE_8__["VERSION"],
155 moduleName: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ModuleNames"].ClientSideRowModelModule,
156 rowModel: 'clientSide',
157 beans: [_clientSideRowModel_clientSideRowModel__WEBPACK_IMPORTED_MODULE_1__["ClientSideRowModel"], _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"]],
158};
159
160
161/***/ }),
162/* 3 */
163/***/ (function(module, __webpack_exports__, __webpack_require__) {
164
165"use strict";
166__webpack_require__.r(__webpack_exports__);
167/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _columns_columnFactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
168/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnFactory", function() { return _columns_columnFactory__WEBPACK_IMPORTED_MODULE_0__["ColumnFactory"]; });
169
170/* harmony import */ var _columns_columnModel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
171/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnModel", function() { return _columns_columnModel__WEBPACK_IMPORTED_MODULE_1__["ColumnModel"]; });
172
173/* harmony import */ var _columns_columnKeyCreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
174/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnKeyCreator", function() { return _columns_columnKeyCreator__WEBPACK_IMPORTED_MODULE_2__["ColumnKeyCreator"]; });
175
176/* harmony import */ var _columns_columnUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(33);
177/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnUtils", function() { return _columns_columnUtils__WEBPACK_IMPORTED_MODULE_3__["ColumnUtils"]; });
178
179/* harmony import */ var _columns_displayedGroupCreator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34);
180/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DisplayedGroupCreator", function() { return _columns_displayedGroupCreator__WEBPACK_IMPORTED_MODULE_4__["DisplayedGroupCreator"]; });
181
182/* harmony import */ var _columns_groupInstanceIdCreator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29);
183/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupInstanceIdCreator", function() { return _columns_groupInstanceIdCreator__WEBPACK_IMPORTED_MODULE_5__["GroupInstanceIdCreator"]; });
184
185/* harmony import */ var _columns_autoGroupColService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30);
186/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GROUP_AUTO_COLUMN_ID", function() { return _columns_autoGroupColService__WEBPACK_IMPORTED_MODULE_6__["GROUP_AUTO_COLUMN_ID"]; });
187
188/* harmony import */ var _components_componentUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(24);
189/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentUtil", function() { return _components_componentUtil__WEBPACK_IMPORTED_MODULE_7__["ComponentUtil"]; });
190
191/* harmony import */ var _components_agStackComponentsRegistry__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(35);
192/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgStackComponentsRegistry", function() { return _components_agStackComponentsRegistry__WEBPACK_IMPORTED_MODULE_8__["AgStackComponentsRegistry"]; });
193
194/* harmony import */ var _components_framework_userComponentRegistry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(36);
195/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UserComponentRegistry", function() { return _components_framework_userComponentRegistry__WEBPACK_IMPORTED_MODULE_9__["UserComponentRegistry"]; });
196
197/* harmony import */ var _components_framework_userComponentFactory__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(105);
198/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UserComponentFactory", function() { return _components_framework_userComponentFactory__WEBPACK_IMPORTED_MODULE_10__["UserComponentFactory"]; });
199
200/* harmony import */ var _components_colDefUtil__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(23);
201/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColDefUtil", function() { return _components_colDefUtil__WEBPACK_IMPORTED_MODULE_11__["ColDefUtil"]; });
202
203/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(17);
204/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BeanStub", function() { return _context_beanStub__WEBPACK_IMPORTED_MODULE_12__["BeanStub"]; });
205
206/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(11);
207/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Context", function() { return _context_context__WEBPACK_IMPORTED_MODULE_13__["Context"]; });
208
209/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Autowired", function() { return _context_context__WEBPACK_IMPORTED_MODULE_13__["Autowired"]; });
210
211/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostConstruct", function() { return _context_context__WEBPACK_IMPORTED_MODULE_13__["PostConstruct"]; });
212
213/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PreConstruct", function() { return _context_context__WEBPACK_IMPORTED_MODULE_13__["PreConstruct"]; });
214
215/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Optional", function() { return _context_context__WEBPACK_IMPORTED_MODULE_13__["Optional"]; });
216
217/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bean", function() { return _context_context__WEBPACK_IMPORTED_MODULE_13__["Bean"]; });
218
219/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Qualifier", function() { return _context_context__WEBPACK_IMPORTED_MODULE_13__["Qualifier"]; });
220
221/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PreDestroy", function() { return _context_context__WEBPACK_IMPORTED_MODULE_13__["PreDestroy"]; });
222
223/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(57);
224/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuerySelector", function() { return _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_14__["QuerySelector"]; });
225
226/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RefSelector", function() { return _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_14__["RefSelector"]; });
227
228/* harmony import */ var _interfaces_iExcelCreator__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(108);
229/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelFactoryMode", function() { return _interfaces_iExcelCreator__WEBPACK_IMPORTED_MODULE_15__["ExcelFactoryMode"]; });
230
231/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(100);
232/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragAndDropService", function() { return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_16__["DragAndDropService"]; });
233
234/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragSourceType", function() { return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_16__["DragSourceType"]; });
235
236/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HorizontalDirection", function() { return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_16__["HorizontalDirection"]; });
237
238/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VerticalDirection", function() { return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_16__["VerticalDirection"]; });
239
240/* harmony import */ var _dragAndDrop_dragService__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(109);
241/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragService", function() { return _dragAndDrop_dragService__WEBPACK_IMPORTED_MODULE_17__["DragService"]; });
242
243/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(9);
244/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _entities_column__WEBPACK_IMPORTED_MODULE_18__["Column"]; });
245
246/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(21);
247/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnGroup", function() { return _entities_columnGroup__WEBPACK_IMPORTED_MODULE_19__["ColumnGroup"]; });
248
249/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(8);
250/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProvidedColumnGroup", function() { return _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_20__["ProvidedColumnGroup"]; });
251
252/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(97);
253/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNode", function() { return _entities_rowNode__WEBPACK_IMPORTED_MODULE_21__["RowNode"]; });
254
255/* harmony import */ var _interfaces_iRowNode__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(110);
256/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowHighlightPosition", function() { return _interfaces_iRowNode__WEBPACK_IMPORTED_MODULE_22__["RowHighlightPosition"]; });
257
258/* harmony import */ var _filter_filterManager__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(111);
259/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterManager", function() { return _filter_filterManager__WEBPACK_IMPORTED_MODULE_23__["FilterManager"]; });
260
261/* harmony import */ var _filter_provided_providedFilter__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(62);
262/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProvidedFilter", function() { return _filter_provided_providedFilter__WEBPACK_IMPORTED_MODULE_24__["ProvidedFilter"]; });
263
264/* harmony import */ var _filter_provided_simpleFilter__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(60);
265/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleFilter", function() { return _filter_provided_simpleFilter__WEBPACK_IMPORTED_MODULE_25__["SimpleFilter"]; });
266
267/* harmony import */ var _filter_provided_scalarFilter__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(74);
268/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScalarFilter", function() { return _filter_provided_scalarFilter__WEBPACK_IMPORTED_MODULE_26__["ScalarFilter"]; });
269
270/* harmony import */ var _filter_provided_number_numberFilter__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(78);
271/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberFilter", function() { return _filter_provided_number_numberFilter__WEBPACK_IMPORTED_MODULE_27__["NumberFilter"]; });
272
273/* harmony import */ var _filter_provided_text_textFilter__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(83);
274/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextFilter", function() { return _filter_provided_text_textFilter__WEBPACK_IMPORTED_MODULE_28__["TextFilter"]; });
275
276/* harmony import */ var _filter_provided_date_dateFilter__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(58);
277/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateFilter", function() { return _filter_provided_date_dateFilter__WEBPACK_IMPORTED_MODULE_29__["DateFilter"]; });
278
279/* harmony import */ var _filter_provided_text_textFloatingFilter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(84);
280/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextFloatingFilter", function() { return _filter_provided_text_textFloatingFilter__WEBPACK_IMPORTED_MODULE_30__["TextFloatingFilter"]; });
281
282/* harmony import */ var _headerRendering_cells_floatingFilter_headerFilterCellComp__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(114);
283/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellComp", function() { return _headerRendering_cells_floatingFilter_headerFilterCellComp__WEBPACK_IMPORTED_MODULE_31__["HeaderFilterCellComp"]; });
284
285/* harmony import */ var _filter_floating_floatingFilterMapper__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(107);
286/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FloatingFilterMapper", function() { return _filter_floating_floatingFilterMapper__WEBPACK_IMPORTED_MODULE_32__["FloatingFilterMapper"]; });
287
288/* harmony import */ var _gridBodyComp_gridBodyComp__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(116);
289/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridBodyComp", function() { return _gridBodyComp_gridBodyComp__WEBPACK_IMPORTED_MODULE_33__["GridBodyComp"]; });
290
291/* harmony import */ var _gridBodyComp_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(118);
292/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridBodyCtrl", function() { return _gridBodyComp_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_34__["GridBodyCtrl"]; });
293
294/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowAnimationCssClasses", function() { return _gridBodyComp_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_34__["RowAnimationCssClasses"]; });
295
296/* harmony import */ var _gridBodyComp_scrollVisibleService__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(141);
297/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollVisibleService", function() { return _gridBodyComp_scrollVisibleService__WEBPACK_IMPORTED_MODULE_35__["ScrollVisibleService"]; });
298
299/* harmony import */ var _gridBodyComp_mouseEventService__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(142);
300/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MouseEventService", function() { return _gridBodyComp_mouseEventService__WEBPACK_IMPORTED_MODULE_36__["MouseEventService"]; });
301
302/* harmony import */ var _gridBodyComp_navigationService__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(143);
303/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NavigationService", function() { return _gridBodyComp_navigationService__WEBPACK_IMPORTED_MODULE_37__["NavigationService"]; });
304
305/* harmony import */ var _gridBodyComp_rowContainer_rowContainerComp__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(144);
306/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerComp", function() { return _gridBodyComp_rowContainer_rowContainerComp__WEBPACK_IMPORTED_MODULE_38__["RowContainerComp"]; });
307
308/* harmony import */ var _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(122);
309/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerName", function() { return _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_39__["RowContainerName"]; });
310
311/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerCtrl", function() { return _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_39__["RowContainerCtrl"]; });
312
313/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerType", function() { return _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_39__["RowContainerType"]; });
314
315/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRowContainerTypeForName", function() { return _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_39__["getRowContainerTypeForName"]; });
316
317/* harmony import */ var _headerRendering_columnDrag_bodyDropPivotTarget__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(148);
318/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BodyDropPivotTarget", function() { return _headerRendering_columnDrag_bodyDropPivotTarget__WEBPACK_IMPORTED_MODULE_40__["BodyDropPivotTarget"]; });
319
320/* harmony import */ var _headerRendering_columnDrag_bodyDropTarget__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(149);
321/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BodyDropTarget", function() { return _headerRendering_columnDrag_bodyDropTarget__WEBPACK_IMPORTED_MODULE_41__["BodyDropTarget"]; });
322
323/* harmony import */ var _headerRendering_cells_cssClassApplier__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(151);
324/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassApplier", function() { return _headerRendering_cells_cssClassApplier__WEBPACK_IMPORTED_MODULE_42__["CssClassApplier"]; });
325
326/* harmony import */ var _headerRendering_rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(152);
327/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerComp", function() { return _headerRendering_rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_43__["HeaderRowContainerComp"]; });
328
329/* harmony import */ var _headerRendering_gridHeaderComp__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(168);
330/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridHeaderComp", function() { return _headerRendering_gridHeaderComp__WEBPACK_IMPORTED_MODULE_44__["GridHeaderComp"]; });
331
332/* harmony import */ var _headerRendering_gridHeaderCtrl__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(169);
333/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridHeaderCtrl", function() { return _headerRendering_gridHeaderCtrl__WEBPACK_IMPORTED_MODULE_45__["GridHeaderCtrl"]; });
334
335/* harmony import */ var _headerRendering_row_headerRowComp__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(153);
336/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowComp", function() { return _headerRendering_row_headerRowComp__WEBPACK_IMPORTED_MODULE_46__["HeaderRowComp"]; });
337
338/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowType", function() { return _headerRendering_row_headerRowComp__WEBPACK_IMPORTED_MODULE_46__["HeaderRowType"]; });
339
340/* harmony import */ var _headerRendering_row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(157);
341/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowCtrl", function() { return _headerRendering_row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_47__["HeaderRowCtrl"]; });
342
343/* harmony import */ var _headerRendering_cells_column_headerCellCtrl__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(162);
344/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderCellCtrl", function() { return _headerRendering_cells_column_headerCellCtrl__WEBPACK_IMPORTED_MODULE_48__["HeaderCellCtrl"]; });
345
346/* harmony import */ var _headerRendering_cells_column_sortIndicatorComp__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(87);
347/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortIndicatorComp", function() { return _headerRendering_cells_column_sortIndicatorComp__WEBPACK_IMPORTED_MODULE_49__["SortIndicatorComp"]; });
348
349/* harmony import */ var _headerRendering_cells_floatingFilter_headerFilterCellCtrl__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(158);
350/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellCtrl", function() { return _headerRendering_cells_floatingFilter_headerFilterCellCtrl__WEBPACK_IMPORTED_MODULE_50__["HeaderFilterCellCtrl"]; });
351
352/* harmony import */ var _headerRendering_cells_columnGroup_headerGroupCellCtrl__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(165);
353/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupCellCtrl", function() { return _headerRendering_cells_columnGroup_headerGroupCellCtrl__WEBPACK_IMPORTED_MODULE_51__["HeaderGroupCellCtrl"]; });
354
355/* harmony import */ var _headerRendering_cells_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(159);
356/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AbstractHeaderCellCtrl", function() { return _headerRendering_cells_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_52__["AbstractHeaderCellCtrl"]; });
357
358/* harmony import */ var _headerRendering_rowContainer_headerRowContainerCtrl__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(156);
359/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerCtrl", function() { return _headerRendering_rowContainer_headerRowContainerCtrl__WEBPACK_IMPORTED_MODULE_53__["HeaderRowContainerCtrl"]; });
360
361/* harmony import */ var _headerRendering_common_horizontalResizeService__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(171);
362/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HorizontalResizeService", function() { return _headerRendering_common_horizontalResizeService__WEBPACK_IMPORTED_MODULE_54__["HorizontalResizeService"]; });
363
364/* harmony import */ var _headerRendering_columnDrag_moveColumnFeature__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(150);
365/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MoveColumnFeature", function() { return _headerRendering_columnDrag_moveColumnFeature__WEBPACK_IMPORTED_MODULE_55__["MoveColumnFeature"]; });
366
367/* harmony import */ var _headerRendering_cells_column_standardMenu__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(172);
368/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StandardMenuFactory", function() { return _headerRendering_cells_column_standardMenu__WEBPACK_IMPORTED_MODULE_56__["StandardMenuFactory"]; });
369
370/* harmony import */ var _layout_tabbedLayout__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(173);
371/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabbedLayout", function() { return _layout_tabbedLayout__WEBPACK_IMPORTED_MODULE_57__["TabbedLayout"]; });
372
373/* harmony import */ var _misc_simpleHttpRequest__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(174);
374/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "simpleHttpRequest", function() { return _misc_simpleHttpRequest__WEBPACK_IMPORTED_MODULE_58__["simpleHttpRequest"]; });
375
376/* harmony import */ var _misc_resizeObserverService__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(175);
377/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ResizeObserverService", function() { return _misc_resizeObserverService__WEBPACK_IMPORTED_MODULE_59__["ResizeObserverService"]; });
378
379/* harmony import */ var _misc_animationFrameService__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(176);
380/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameService", function() { return _misc_animationFrameService__WEBPACK_IMPORTED_MODULE_60__["AnimationFrameService"]; });
381
382/* harmony import */ var _rendering_cellEditors_largeTextCellEditor__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(89);
383/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LargeTextCellEditor", function() { return _rendering_cellEditors_largeTextCellEditor__WEBPACK_IMPORTED_MODULE_61__["LargeTextCellEditor"]; });
384
385/* harmony import */ var _rendering_cellEditors_popupEditorWrapper__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(147);
386/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupEditorWrapper", function() { return _rendering_cellEditors_popupEditorWrapper__WEBPACK_IMPORTED_MODULE_62__["PopupEditorWrapper"]; });
387
388/* harmony import */ var _rendering_cellEditors_selectCellEditor__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(91);
389/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectCellEditor", function() { return _rendering_cellEditors_selectCellEditor__WEBPACK_IMPORTED_MODULE_63__["SelectCellEditor"]; });
390
391/* harmony import */ var _rendering_cellEditors_textCellEditor__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(92);
392/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextCellEditor", function() { return _rendering_cellEditors_textCellEditor__WEBPACK_IMPORTED_MODULE_64__["TextCellEditor"]; });
393
394/* harmony import */ var _rendering_beans__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(132);
395/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Beans", function() { return _rendering_beans__WEBPACK_IMPORTED_MODULE_65__["Beans"]; });
396
397/* harmony import */ var _rendering_cellRenderers_animateShowChangeCellRenderer__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(93);
398/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimateShowChangeCellRenderer", function() { return _rendering_cellRenderers_animateShowChangeCellRenderer__WEBPACK_IMPORTED_MODULE_66__["AnimateShowChangeCellRenderer"]; });
399
400/* harmony import */ var _rendering_cellRenderers_animateSlideCellRenderer__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(94);
401/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimateSlideCellRenderer", function() { return _rendering_cellRenderers_animateSlideCellRenderer__WEBPACK_IMPORTED_MODULE_67__["AnimateSlideCellRenderer"]; });
402
403/* harmony import */ var _rendering_cellRenderers_groupCellRenderer__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(95);
404/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCellRenderer", function() { return _rendering_cellRenderers_groupCellRenderer__WEBPACK_IMPORTED_MODULE_68__["GroupCellRenderer"]; });
405
406/* harmony import */ var _rendering_cellRenderers_groupCellRendererCtrl__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(96);
407/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCellRendererCtrl", function() { return _rendering_cellRenderers_groupCellRendererCtrl__WEBPACK_IMPORTED_MODULE_69__["GroupCellRendererCtrl"]; });
408
409/* harmony import */ var _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(160);
410/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SetLeftFeature", function() { return _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_70__["SetLeftFeature"]; });
411
412/* harmony import */ var _rendering_features_positionableFeature__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(65);
413/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PositionableFeature", function() { return _rendering_features_positionableFeature__WEBPACK_IMPORTED_MODULE_71__["PositionableFeature"]; });
414
415/* harmony import */ var _rendering_autoWidthCalculator__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(177);
416/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoWidthCalculator", function() { return _rendering_autoWidthCalculator__WEBPACK_IMPORTED_MODULE_72__["AutoWidthCalculator"]; });
417
418/* harmony import */ var _rendering_checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(98);
419/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxSelectionComponent", function() { return _rendering_checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_73__["CheckboxSelectionComponent"]; });
420
421/* harmony import */ var _rendering_cell_cellComp__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(146);
422/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellComp", function() { return _rendering_cell_cellComp__WEBPACK_IMPORTED_MODULE_74__["CellComp"]; });
423
424/* harmony import */ var _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(125);
425/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellCtrl", function() { return _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_75__["CellCtrl"]; });
426
427/* harmony import */ var _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(124);
428/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowCtrl", function() { return _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_76__["RowCtrl"]; });
429
430/* harmony import */ var _rendering_rowRenderer__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(178);
431/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowRenderer", function() { return _rendering_rowRenderer__WEBPACK_IMPORTED_MODULE_77__["RowRenderer"]; });
432
433/* harmony import */ var _rendering_valueFormatterService__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(180);
434/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueFormatterService", function() { return _rendering_valueFormatterService__WEBPACK_IMPORTED_MODULE_78__["ValueFormatterService"]; });
435
436/* harmony import */ var _rendering_cssClassManager__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(56);
437/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassManager", function() { return _rendering_cssClassManager__WEBPACK_IMPORTED_MODULE_79__["CssClassManager"]; });
438
439/* harmony import */ var _pinnedRowModel_pinnedRowModel__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(181);
440/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PinnedRowModel", function() { return _pinnedRowModel_pinnedRowModel__WEBPACK_IMPORTED_MODULE_80__["PinnedRowModel"]; });
441
442/* harmony import */ var _interfaces_serverSideTransaction__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(182);
443/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServerSideTransactionResultStatus", function() { return _interfaces_serverSideTransaction__WEBPACK_IMPORTED_MODULE_81__["ServerSideTransactionResultStatus"]; });
444
445/* harmony import */ var _utils_changedPath__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(183);
446/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChangedPath", function() { return _utils_changedPath__WEBPACK_IMPORTED_MODULE_82__["ChangedPath"]; });
447
448/* harmony import */ var _rowNodeCache_rowNodeBlock__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(184);
449/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlock", function() { return _rowNodeCache_rowNodeBlock__WEBPACK_IMPORTED_MODULE_83__["RowNodeBlock"]; });
450
451/* harmony import */ var _rowNodeCache_rowNodeBlockLoader__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(185);
452/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlockLoader", function() { return _rowNodeCache_rowNodeBlockLoader__WEBPACK_IMPORTED_MODULE_84__["RowNodeBlockLoader"]; });
453
454/* harmony import */ var _pagination_paginationProxy__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(186);
455/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PaginationProxy", function() { return _pagination_paginationProxy__WEBPACK_IMPORTED_MODULE_85__["PaginationProxy"]; });
456
457/* harmony import */ var _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(113);
458/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelSteps", function() { return _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_86__["ClientSideRowModelSteps"]; });
459
460/* harmony import */ var _styling_stylingService__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(187);
461/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylingService", function() { return _styling_stylingService__WEBPACK_IMPORTED_MODULE_87__["StylingService"]; });
462
463/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(117);
464/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LayoutCssClasses", function() { return _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_88__["LayoutCssClasses"]; });
465
466/* harmony import */ var _widgets_agAbstractField__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(67);
467/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgAbstractField", function() { return _widgets_agAbstractField__WEBPACK_IMPORTED_MODULE_89__["AgAbstractField"]; });
468
469/* harmony import */ var _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(72);
470/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgCheckbox", function() { return _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_90__["AgCheckbox"]; });
471
472/* harmony import */ var _widgets_agRadioButton__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(71);
473/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgRadioButton", function() { return _widgets_agRadioButton__WEBPACK_IMPORTED_MODULE_91__["AgRadioButton"]; });
474
475/* harmony import */ var _widgets_agToggleButton__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(188);
476/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgToggleButton", function() { return _widgets_agToggleButton__WEBPACK_IMPORTED_MODULE_92__["AgToggleButton"]; });
477
478/* harmony import */ var _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(79);
479/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputTextField", function() { return _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_93__["AgInputTextField"]; });
480
481/* harmony import */ var _widgets_agInputTextArea__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(189);
482/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputTextArea", function() { return _widgets_agInputTextArea__WEBPACK_IMPORTED_MODULE_94__["AgInputTextArea"]; });
483
484/* harmony import */ var _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(80);
485/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputNumberField", function() { return _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_95__["AgInputNumberField"]; });
486
487/* harmony import */ var _widgets_agInputRange__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(190);
488/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputRange", function() { return _widgets_agInputRange__WEBPACK_IMPORTED_MODULE_96__["AgInputRange"]; });
489
490/* harmony import */ var _widgets_agSelect__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(66);
491/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgSelect", function() { return _widgets_agSelect__WEBPACK_IMPORTED_MODULE_97__["AgSelect"]; });
492
493/* harmony import */ var _widgets_agSlider__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(191);
494/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgSlider", function() { return _widgets_agSlider__WEBPACK_IMPORTED_MODULE_98__["AgSlider"]; });
495
496/* harmony import */ var _widgets_agGroupComponent__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(192);
497/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgGroupComponent", function() { return _widgets_agGroupComponent__WEBPACK_IMPORTED_MODULE_99__["AgGroupComponent"]; });
498
499/* harmony import */ var _widgets_agMenuItemComponent__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(193);
500/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuItemComponent", function() { return _widgets_agMenuItemComponent__WEBPACK_IMPORTED_MODULE_100__["AgMenuItemComponent"]; });
501
502/* harmony import */ var _widgets_agMenuList__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(194);
503/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuList", function() { return _widgets_agMenuList__WEBPACK_IMPORTED_MODULE_101__["AgMenuList"]; });
504
505/* harmony import */ var _widgets_agMenuPanel__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(197);
506/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuPanel", function() { return _widgets_agMenuPanel__WEBPACK_IMPORTED_MODULE_102__["AgMenuPanel"]; });
507
508/* harmony import */ var _widgets_agDialog__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(198);
509/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgDialog", function() { return _widgets_agDialog__WEBPACK_IMPORTED_MODULE_103__["AgDialog"]; });
510
511/* harmony import */ var _widgets_agPanel__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(199);
512/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPanel", function() { return _widgets_agPanel__WEBPACK_IMPORTED_MODULE_104__["AgPanel"]; });
513
514/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(38);
515/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return _widgets_component__WEBPACK_IMPORTED_MODULE_105__["Component"]; });
516
517/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(64);
518/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ManagedFocusFeature", function() { return _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_106__["ManagedFocusFeature"]; });
519
520/* harmony import */ var _widgets_tabGuardComp__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(195);
521/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabGuardComp", function() { return _widgets_tabGuardComp__WEBPACK_IMPORTED_MODULE_107__["TabGuardComp"]; });
522
523/* harmony import */ var _widgets_tabGuardCtrl__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(196);
524/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabGuardCtrl", function() { return _widgets_tabGuardCtrl__WEBPACK_IMPORTED_MODULE_108__["TabGuardCtrl"]; });
525
526/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabGuardClassNames", function() { return _widgets_tabGuardCtrl__WEBPACK_IMPORTED_MODULE_108__["TabGuardClassNames"]; });
527
528/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(90);
529/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupComponent", function() { return _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_109__["PopupComponent"]; });
530
531/* harmony import */ var _widgets_popupService__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(200);
532/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupService", function() { return _widgets_popupService__WEBPACK_IMPORTED_MODULE_110__["PopupService"]; });
533
534/* harmony import */ var _widgets_touchListener__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(86);
535/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TouchListener", function() { return _widgets_touchListener__WEBPACK_IMPORTED_MODULE_111__["TouchListener"]; });
536
537/* harmony import */ var _widgets_virtualList__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(202);
538/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualList", function() { return _widgets_virtualList__WEBPACK_IMPORTED_MODULE_112__["VirtualList"]; });
539
540/* harmony import */ var _widgets_agAbstractLabel__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(68);
541/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgAbstractLabel", function() { return _widgets_agAbstractLabel__WEBPACK_IMPORTED_MODULE_113__["AgAbstractLabel"]; });
542
543/* harmony import */ var _widgets_agPickerField__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(69);
544/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPickerField", function() { return _widgets_agPickerField__WEBPACK_IMPORTED_MODULE_114__["AgPickerField"]; });
545
546/* harmony import */ var _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(127);
547/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRangeType", function() { return _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_115__["CellRangeType"]; });
548
549/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionHandleType", function() { return _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_115__["SelectionHandleType"]; });
550
551/* harmony import */ var _autoScrollService__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(121);
552/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoScrollService", function() { return _autoScrollService__WEBPACK_IMPORTED_MODULE_116__["AutoScrollService"]; });
553
554/* harmony import */ var _vanillaFrameworkOverrides__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(203);
555/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VanillaFrameworkOverrides", function() { return _vanillaFrameworkOverrides__WEBPACK_IMPORTED_MODULE_117__["VanillaFrameworkOverrides"]; });
556
557/* harmony import */ var _cellNavigationService__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(204);
558/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellNavigationService", function() { return _cellNavigationService__WEBPACK_IMPORTED_MODULE_118__["CellNavigationService"]; });
559
560/* harmony import */ var _alignedGridsService__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(205);
561/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AlignedGridsService", function() { return _alignedGridsService__WEBPACK_IMPORTED_MODULE_119__["AlignedGridsService"]; });
562
563/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(48);
564/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "KeyCode", function() { return _constants_keyCode__WEBPACK_IMPORTED_MODULE_120__["KeyCode"]; });
565
566/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(206);
567/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _grid__WEBPACK_IMPORTED_MODULE_121__["Grid"]; });
568
569/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridCoreCreator", function() { return _grid__WEBPACK_IMPORTED_MODULE_121__["GridCoreCreator"]; });
570
571/* harmony import */ var _gridApi__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(112);
572/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridApi", function() { return _gridApi__WEBPACK_IMPORTED_MODULE_122__["GridApi"]; });
573
574/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(26);
575/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return _eventKeys__WEBPACK_IMPORTED_MODULE_123__["Events"]; });
576
577/* harmony import */ var _focusService__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(201);
578/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FocusService", function() { return _focusService__WEBPACK_IMPORTED_MODULE_124__["FocusService"]; });
579
580/* harmony import */ var _gridOptionsService__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(242);
581/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridOptionsService", function() { return _gridOptionsService__WEBPACK_IMPORTED_MODULE_125__["GridOptionsService"]; });
582
583/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(10);
584/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EventService", function() { return _eventService__WEBPACK_IMPORTED_MODULE_126__["EventService"]; });
585
586/* harmony import */ var _rowNodes_selectableService__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(225);
587/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectableService", function() { return _rowNodes_selectableService__WEBPACK_IMPORTED_MODULE_127__["SelectableService"]; });
588
589/* harmony import */ var _rowNodes_rowNodeSorter__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(235);
590/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeSorter", function() { return _rowNodes_rowNodeSorter__WEBPACK_IMPORTED_MODULE_128__["RowNodeSorter"]; });
591
592/* harmony import */ var _ctrlsService__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(236);
593/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CtrlsService", function() { return _ctrlsService__WEBPACK_IMPORTED_MODULE_129__["CtrlsService"]; });
594
595/* harmony import */ var _gridComp_gridComp__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(213);
596/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridComp", function() { return _gridComp_gridComp__WEBPACK_IMPORTED_MODULE_130__["GridComp"]; });
597
598/* harmony import */ var _gridComp_gridCtrl__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(214);
599/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridCtrl", function() { return _gridComp_gridCtrl__WEBPACK_IMPORTED_MODULE_131__["GridCtrl"]; });
600
601/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(212);
602/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return _logger__WEBPACK_IMPORTED_MODULE_132__["Logger"]; });
603
604/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoggerFactory", function() { return _logger__WEBPACK_IMPORTED_MODULE_132__["LoggerFactory"]; });
605
606/* harmony import */ var _sortController__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(215);
607/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortController", function() { return _sortController__WEBPACK_IMPORTED_MODULE_133__["SortController"]; });
608
609/* harmony import */ var _templateService__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(211);
610/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TemplateService", function() { return _templateService__WEBPACK_IMPORTED_MODULE_134__["TemplateService"]; });
611
612/* harmony import */ var _localeService__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(243);
613/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocaleService", function() { return _localeService__WEBPACK_IMPORTED_MODULE_135__["LocaleService"]; });
614
615/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(39);
616/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["_"]; });
617
618/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberSequence", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["NumberSequence"]; });
619
620/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromiseStatus", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["AgPromiseStatus"]; });
621
622/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromise", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["AgPromise"]; });
623
624/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return _utils__WEBPACK_IMPORTED_MODULE_136__["Timer"]; });
625
626/* harmony import */ var _valueService_valueService__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(209);
627/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueService", function() { return _valueService_valueService__WEBPACK_IMPORTED_MODULE_137__["ValueService"]; });
628
629/* harmony import */ var _valueService_valueCache__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(219);
630/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueCache", function() { return _valueService_valueCache__WEBPACK_IMPORTED_MODULE_138__["ValueCache"]; });
631
632/* harmony import */ var _valueService_expressionService__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(210);
633/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionService", function() { return _valueService_expressionService__WEBPACK_IMPORTED_MODULE_139__["ExpressionService"]; });
634
635/* harmony import */ var _entities_cellPositionUtils__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(229);
636/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellPositionUtils", function() { return _entities_cellPositionUtils__WEBPACK_IMPORTED_MODULE_140__["CellPositionUtils"]; });
637
638/* harmony import */ var _entities_rowPositionUtils__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(228);
639/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowPositionUtils", function() { return _entities_rowPositionUtils__WEBPACK_IMPORTED_MODULE_141__["RowPositionUtils"]; });
640
641/* harmony import */ var _headerRendering_common_headerPosition__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(232);
642/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderPositionUtils", function() { return _headerRendering_common_headerPosition__WEBPACK_IMPORTED_MODULE_142__["HeaderPositionUtils"]; });
643
644/* harmony import */ var _headerRendering_common_headerNavigationService__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(170);
645/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationService", function() { return _headerRendering_common_headerNavigationService__WEBPACK_IMPORTED_MODULE_143__["HeaderNavigationService"]; });
646
647/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationDirection", function() { return _headerRendering_common_headerNavigationService__WEBPACK_IMPORTED_MODULE_143__["HeaderNavigationDirection"]; });
648
649/* harmony import */ var _propertyKeys__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(27);
650/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PropertyKeys", function() { return _propertyKeys__WEBPACK_IMPORTED_MODULE_144__["PropertyKeys"]; });
651
652/* harmony import */ var _columns_columnApi__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(208);
653/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnApi", function() { return _columns_columnApi__WEBPACK_IMPORTED_MODULE_145__["ColumnApi"]; });
654
655/* harmony import */ var _components_framework_frameworkComponentWrapper__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(245);
656/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseComponentWrapper", function() { return _components_framework_frameworkComponentWrapper__WEBPACK_IMPORTED_MODULE_146__["BaseComponentWrapper"]; });
657
658/* harmony import */ var _environment__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(223);
659/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Environment", function() { return _environment__WEBPACK_IMPORTED_MODULE_147__["Environment"]; });
660
661/* harmony import */ var _widgets_customTooltipFeature__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(55);
662/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomTooltipFeature", function() { return _widgets_customTooltipFeature__WEBPACK_IMPORTED_MODULE_148__["CustomTooltipFeature"]; });
663
664/* harmony import */ var _interfaces_iChartOptions__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(246);
665/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_CHART_GROUPS", function() { return _interfaces_iChartOptions__WEBPACK_IMPORTED_MODULE_149__["DEFAULT_CHART_GROUPS"]; });
666
667/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CHART_TOOL_PANEL_ALLOW_LIST", function() { return _interfaces_iChartOptions__WEBPACK_IMPORTED_MODULE_149__["CHART_TOOL_PANEL_ALLOW_LIST"]; });
668
669/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CHART_TOOLBAR_ALLOW_LIST", function() { return _interfaces_iChartOptions__WEBPACK_IMPORTED_MODULE_149__["CHART_TOOLBAR_ALLOW_LIST"]; });
670
671/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CHART_TOOL_PANEL_MENU_OPTIONS", function() { return _interfaces_iChartOptions__WEBPACK_IMPORTED_MODULE_149__["CHART_TOOL_PANEL_MENU_OPTIONS"]; });
672
673/* harmony import */ var _interfaces_iAgChartOptions__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(247);
674/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "__FORCE_MODULE_DETECTION", function() { return _interfaces_iAgChartOptions__WEBPACK_IMPORTED_MODULE_150__["__FORCE_MODULE_DETECTION"]; });
675
676/* harmony import */ var _interfaces_iSparklineCellRendererParams__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(248);
677/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BarColumnLabelPlacement", function() { return _interfaces_iSparklineCellRendererParams__WEBPACK_IMPORTED_MODULE_151__["BarColumnLabelPlacement"]; });
678
679/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(14);
680/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModuleNames", function() { return _modules_moduleNames__WEBPACK_IMPORTED_MODULE_152__["ModuleNames"]; });
681
682/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(15);
683/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModuleRegistry", function() { return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_153__["ModuleRegistry"]; });
684
685/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(25);
686/* empty/unused harmony star reexport *//**
687 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
688 * @version v29.2.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
707// components
708
709
710
711
712
713// context
714
715
716
717// excel
718
719// dragAndDrop
720
721
722// entities
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738// gridPanel
739
740
741
742
743
744// rowContainer
745
746
747// headerRendering
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765// layout
766
767// misc
768
769
770
771
772
773
774
775// rendering / cellRenderers
776
777
778
779
780
781// features
782
783
784// rendering
785
786
787
788
789
790
791
792
793// row models
794
795
796
797
798
799
800
801//styling
802
803
804// widgets
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
830
831// range
832
833// root
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// charts
868
869
870// sparklines
871
872
873
874// events
875
876
877/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
878
879/***/ }),
880/* 4 */
881/***/ (function(module, exports) {
882
883var g;
884
885// This works in non-strict mode
886g = (function() {
887 return this;
888})();
889
890try {
891 // This works if eval is allowed (see CSP)
892 g = g || new Function("return this")();
893} catch (e) {
894 // This works if the window reference is available
895 if (typeof window === "object") g = window;
896}
897
898// g can still be undefined, but nothing to do about it...
899// We return undefined, instead of nothing here, so it's
900// easier to handle this case. if(!global) { ...}
901
902module.exports = g;
903
904
905/***/ }),
906/* 5 */
907/***/ (function(module, __webpack_exports__, __webpack_require__) {
908
909"use strict";
910__webpack_require__.r(__webpack_exports__);
911/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnFactory", function() { return ColumnFactory; });
912/* harmony import */ var _columnKeyCreator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
913/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
914/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
915/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11);
916/* harmony import */ var _entities_defaultColumnTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16);
917/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
918/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(12);
919/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
920/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(19);
921/**
922 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
923 * @version v29.2.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 (Object.prototype.hasOwnProperty.call(b, 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// takes ColDefs and ColGroupDefs and turns them into Columns and OriginalGroups
959var ColumnFactory = /** @class */ (function (_super) {
960 __extends(ColumnFactory, _super);
961 function ColumnFactory() {
962 return _super !== null && _super.apply(this, arguments) || this;
963 }
964 ColumnFactory.prototype.setBeans = function (loggerFactory) {
965 this.logger = loggerFactory.create('ColumnFactory');
966 };
967 ColumnFactory.prototype.createColumnTree = function (defs, primaryColumns, existingTree) {
968 // column key creator dishes out unique column id's in a deterministic way,
969 // so if we have two grids (that could be master/slave) with same column definitions,
970 // then this ensures the two grids use identical id's.
971 var columnKeyCreator = new _columnKeyCreator__WEBPACK_IMPORTED_MODULE_0__["ColumnKeyCreator"]();
972 var _a = this.extractExistingTreeData(existingTree), existingCols = _a.existingCols, existingGroups = _a.existingGroups, existingColKeys = _a.existingColKeys;
973 columnKeyCreator.addExistingKeys(existingColKeys);
974 // create am unbalanced tree that maps the provided definitions
975 var unbalancedTree = this.recursivelyCreateColumns(defs, 0, primaryColumns, existingCols, columnKeyCreator, existingGroups);
976 var treeDept = this.findMaxDept(unbalancedTree, 0);
977 this.logger.log('Number of levels for grouped columns is ' + treeDept);
978 var columnTree = this.balanceColumnTree(unbalancedTree, 0, treeDept, columnKeyCreator);
979 var deptFirstCallback = function (child, parent) {
980 if (child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
981 child.setupExpandable();
982 }
983 // we set the original parents at the end, rather than when we go along, as balancing the tree
984 // adds extra levels into the tree. so we can only set parents when balancing is done.
985 child.setOriginalParent(parent);
986 };
987 this.columnUtils.depthFirstOriginalTreeSearch(null, columnTree, deptFirstCallback);
988 return {
989 columnTree: columnTree,
990 treeDept: treeDept
991 };
992 };
993 ColumnFactory.prototype.extractExistingTreeData = function (existingTree) {
994 var existingCols = [];
995 var existingGroups = [];
996 var existingColKeys = [];
997 if (existingTree) {
998 this.columnUtils.depthFirstOriginalTreeSearch(null, existingTree, function (item) {
999 if (item instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
1000 var group = item;
1001 existingGroups.push(group);
1002 }
1003 else {
1004 var col = item;
1005 existingColKeys.push(col.getId());
1006 existingCols.push(col);
1007 }
1008 });
1009 }
1010 return { existingCols: existingCols, existingGroups: existingGroups, existingColKeys: existingColKeys };
1011 };
1012 ColumnFactory.prototype.createForAutoGroups = function (autoGroupCols, gridBalancedTree) {
1013 var _this = this;
1014 return autoGroupCols.map(function (col) { return _this.createAutoGroupTreeItem(gridBalancedTree, col); });
1015 };
1016 ColumnFactory.prototype.createAutoGroupTreeItem = function (balancedColumnTree, column) {
1017 var dept = this.findDepth(balancedColumnTree);
1018 // at the end, this will be the top of the tree item.
1019 var nextChild = column;
1020 for (var i = dept - 1; i >= 0; i--) {
1021 var autoGroup = new _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"](null, "FAKE_PATH_" + column.getId() + "}_" + i, true, i);
1022 this.createBean(autoGroup);
1023 autoGroup.setChildren([nextChild]);
1024 nextChild.setOriginalParent(autoGroup);
1025 nextChild = autoGroup;
1026 }
1027 // at this point, the nextChild is the top most item in the tree
1028 return nextChild;
1029 };
1030 ColumnFactory.prototype.findDepth = function (balancedColumnTree) {
1031 var dept = 0;
1032 var pointer = balancedColumnTree;
1033 while (pointer && pointer[0] && pointer[0] instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
1034 dept++;
1035 pointer = pointer[0].getChildren();
1036 }
1037 return dept;
1038 };
1039 ColumnFactory.prototype.balanceColumnTree = function (unbalancedTree, currentDept, columnDept, columnKeyCreator) {
1040 var result = [];
1041 // go through each child, for groups, recurse a level deeper,
1042 // for columns we need to pad
1043 for (var i = 0; i < unbalancedTree.length; i++) {
1044 var child = unbalancedTree[i];
1045 if (child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
1046 // child is a group, all we do is go to the next level of recursion
1047 var originalGroup = child;
1048 var newChildren = this.balanceColumnTree(originalGroup.getChildren(), currentDept + 1, columnDept, columnKeyCreator);
1049 originalGroup.setChildren(newChildren);
1050 result.push(originalGroup);
1051 }
1052 else {
1053 // child is a column - so here we add in the padded column groups if needed
1054 var firstPaddedGroup = void 0;
1055 var currentPaddedGroup = void 0;
1056 // this for loop will NOT run any loops if no padded column groups are needed
1057 for (var j = columnDept - 1; j >= currentDept; j--) {
1058 var newColId = columnKeyCreator.getUniqueKey(null, null);
1059 var colGroupDefMerged = this.createMergedColGroupDef(null);
1060 var paddedGroup = new _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"](colGroupDefMerged, newColId, true, currentDept);
1061 this.createBean(paddedGroup);
1062 if (currentPaddedGroup) {
1063 currentPaddedGroup.setChildren([paddedGroup]);
1064 }
1065 currentPaddedGroup = paddedGroup;
1066 if (!firstPaddedGroup) {
1067 firstPaddedGroup = currentPaddedGroup;
1068 }
1069 }
1070 // likewise this if statement will not run if no padded groups
1071 if (firstPaddedGroup && currentPaddedGroup) {
1072 result.push(firstPaddedGroup);
1073 var hasGroups = unbalancedTree.some(function (leaf) { return leaf instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]; });
1074 if (hasGroups) {
1075 currentPaddedGroup.setChildren([child]);
1076 continue;
1077 }
1078 else {
1079 currentPaddedGroup.setChildren(unbalancedTree);
1080 break;
1081 }
1082 }
1083 result.push(child);
1084 }
1085 }
1086 return result;
1087 };
1088 ColumnFactory.prototype.findMaxDept = function (treeChildren, dept) {
1089 var maxDeptThisLevel = dept;
1090 for (var i = 0; i < treeChildren.length; i++) {
1091 var abstractColumn = treeChildren[i];
1092 if (abstractColumn instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
1093 var originalGroup = abstractColumn;
1094 var newDept = this.findMaxDept(originalGroup.getChildren(), dept + 1);
1095 if (maxDeptThisLevel < newDept) {
1096 maxDeptThisLevel = newDept;
1097 }
1098 }
1099 }
1100 return maxDeptThisLevel;
1101 };
1102 ColumnFactory.prototype.recursivelyCreateColumns = function (defs, level, primaryColumns, existingColsCopy, columnKeyCreator, existingGroups) {
1103 var _this = this;
1104 return (defs || []).map(function (def) {
1105 if (_this.isColumnGroup(def)) {
1106 return _this.createColumnGroup(primaryColumns, def, level, existingColsCopy, columnKeyCreator, existingGroups);
1107 }
1108 else {
1109 return _this.createColumn(primaryColumns, def, existingColsCopy, columnKeyCreator);
1110 }
1111 });
1112 };
1113 ColumnFactory.prototype.createColumnGroup = function (primaryColumns, colGroupDef, level, existingColumns, columnKeyCreator, existingGroups) {
1114 var colGroupDefMerged = this.createMergedColGroupDef(colGroupDef);
1115 var groupId = columnKeyCreator.getUniqueKey(colGroupDefMerged.groupId || null, null);
1116 var existingGroup = this.findExistingGroup(colGroupDef, existingGroups);
1117 var providedGroup;
1118 if (existingGroup) {
1119 providedGroup = existingGroup;
1120 providedGroup.reset(colGroupDefMerged, level);
1121 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(existingGroups, existingGroup);
1122 }
1123 else {
1124 providedGroup = new _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"](colGroupDefMerged, groupId, false, level);
1125 this.createBean(providedGroup);
1126 }
1127 var children = this.recursivelyCreateColumns(colGroupDefMerged.children, level + 1, primaryColumns, existingColumns, columnKeyCreator, existingGroups);
1128 providedGroup.setChildren(children);
1129 return providedGroup;
1130 };
1131 ColumnFactory.prototype.createMergedColGroupDef = function (colGroupDef) {
1132 var colGroupDefMerged = {};
1133 Object.assign(colGroupDefMerged, this.gridOptionsService.get('defaultColGroupDef'));
1134 Object.assign(colGroupDefMerged, colGroupDef);
1135 return colGroupDefMerged;
1136 };
1137 ColumnFactory.prototype.createColumn = function (primaryColumns, colDef, existingColsCopy, columnKeyCreator) {
1138 var colDefMerged = this.mergeColDefs(colDef);
1139 // see if column already exists
1140 var column = this.findExistingColumn(colDef, existingColsCopy);
1141 // make sure we remove, so if user provided duplicate id, then we don't have more than
1142 // one column instance for colDef with common id
1143 if (existingColsCopy && column) {
1144 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(existingColsCopy, column);
1145 }
1146 if (!column) {
1147 // no existing column, need to create one
1148 var colId = columnKeyCreator.getUniqueKey(colDefMerged.colId, colDefMerged.field);
1149 column = new _entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"](colDefMerged, colDef, colId, primaryColumns);
1150 this.context.createBean(column);
1151 }
1152 else {
1153 column.setColDef(colDefMerged, colDef);
1154 this.applyColumnState(column, colDefMerged);
1155 }
1156 return column;
1157 };
1158 ColumnFactory.prototype.applyColumnState = function (column, colDef) {
1159 // flex
1160 var flex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["attrToNumber"])(colDef.flex);
1161 if (flex !== undefined) {
1162 column.setFlex(flex);
1163 }
1164 // width - we only set width if column is not flexing
1165 var noFlexThisCol = column.getFlex() <= 0;
1166 if (noFlexThisCol) {
1167 // both null and undefined means we skip, as it's not possible to 'clear' width (a column must have a width)
1168 var width = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["attrToNumber"])(colDef.width);
1169 if (width != null) {
1170 column.setActualWidth(width);
1171 }
1172 else {
1173 // otherwise set the width again, in case min or max width has changed,
1174 // and width needs to be adjusted.
1175 var widthBeforeUpdate = column.getActualWidth();
1176 column.setActualWidth(widthBeforeUpdate);
1177 }
1178 }
1179 // sort - anything but undefined will set sort, thus null or empty string will clear the sort
1180 if (colDef.sort !== undefined) {
1181 if (colDef.sort == 'asc' || colDef.sort == 'desc') {
1182 column.setSort(colDef.sort);
1183 }
1184 else {
1185 column.setSort(undefined);
1186 }
1187 }
1188 // sorted at - anything but undefined, thus null will clear the sortIndex
1189 var sortIndex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["attrToNumber"])(colDef.sortIndex);
1190 if (sortIndex !== undefined) {
1191 column.setSortIndex(sortIndex);
1192 }
1193 // hide - anything but undefined, thus null will clear the hide
1194 var hide = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["attrToBoolean"])(colDef.hide);
1195 if (hide !== undefined) {
1196 column.setVisible(!hide);
1197 }
1198 // pinned - anything but undefined, thus null or empty string will remove pinned
1199 if (colDef.pinned !== undefined) {
1200 column.setPinned(colDef.pinned);
1201 }
1202 };
1203 ColumnFactory.prototype.findExistingColumn = function (newColDef, existingColsCopy) {
1204 return (existingColsCopy || []).find(function (existingCol) {
1205 var existingColDef = existingCol.getUserProvidedColDef();
1206 if (!existingColDef) {
1207 return false;
1208 }
1209 var newHasId = newColDef.colId != null;
1210 var newHasField = newColDef.field != null;
1211 if (newHasId) {
1212 return existingCol.getId() === newColDef.colId;
1213 }
1214 if (newHasField) {
1215 return existingColDef.field === newColDef.field;
1216 }
1217 // if no id or field present, then try object equivalence.
1218 if (existingColDef === newColDef) {
1219 return true;
1220 }
1221 return false;
1222 });
1223 };
1224 ColumnFactory.prototype.findExistingGroup = function (newGroupDef, existingGroups) {
1225 return existingGroups.find(function (existingGroup) {
1226 var existingDef = existingGroup.getColGroupDef();
1227 if (!existingDef) {
1228 return false;
1229 }
1230 var newHasId = newGroupDef.groupId != null;
1231 if (newHasId) {
1232 return existingGroup.getId() === newGroupDef.groupId;
1233 }
1234 return false;
1235 });
1236 };
1237 ColumnFactory.prototype.mergeColDefs = function (colDef) {
1238 // start with empty merged definition
1239 var colDefMerged = {};
1240 // merge properties from default column definitions
1241 var defaultColDef = this.gridOptionsService.get('defaultColDef');
1242 Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["mergeDeep"])(colDefMerged, defaultColDef, false, true);
1243 // merge properties from column type properties
1244 var columnType = colDef.type;
1245 if (!columnType) {
1246 columnType = defaultColDef && defaultColDef.type;
1247 }
1248 // if type of both colDef and defaultColDef, then colDef gets preference
1249 if (columnType) {
1250 this.assignColumnTypes(columnType, colDefMerged);
1251 }
1252 // merge properties from column definitions
1253 Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["mergeDeep"])(colDefMerged, colDef, false, true);
1254 var autoGroupColDef = this.gridOptionsService.get('autoGroupColumnDef');
1255 var isSortingCoupled = this.gridOptionsService.isColumnsSortingCoupledToGroup();
1256 if (colDef.rowGroup && autoGroupColDef && isSortingCoupled) {
1257 // override the sort for row group columns where the autoGroupColDef defines these values.
1258 Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["mergeDeep"])(colDefMerged, { sort: autoGroupColDef.sort, initialSort: autoGroupColDef.initialSort }, false, true);
1259 }
1260 return colDefMerged;
1261 };
1262 ColumnFactory.prototype.assignColumnTypes = function (type, colDefMerged) {
1263 var typeKeys = [];
1264 if (type instanceof Array) {
1265 var invalidArray = type.some(function (a) { return typeof a !== 'string'; });
1266 if (invalidArray) {
1267 console.warn("AG Grid: if colDef.type is supplied an array it should be of type 'string[]'");
1268 }
1269 else {
1270 typeKeys = type;
1271 }
1272 }
1273 else if (typeof type === 'string') {
1274 typeKeys = type.split(',');
1275 }
1276 else {
1277 console.warn("AG Grid: colDef.type should be of type 'string' | 'string[]'");
1278 return;
1279 }
1280 // merge user defined with default column types
1281 var allColumnTypes = Object.assign({}, _entities_defaultColumnTypes__WEBPACK_IMPORTED_MODULE_4__["DefaultColumnTypes"]);
1282 var userTypes = this.gridOptionsService.get('columnTypes') || {};
1283 Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["iterateObject"])(userTypes, function (key, value) {
1284 if (key in allColumnTypes) {
1285 console.warn("AG Grid: the column type '" + key + "' is a default column type and cannot be overridden.");
1286 }
1287 else {
1288 allColumnTypes[key] = value;
1289 }
1290 });
1291 typeKeys.forEach(function (t) {
1292 var typeColDef = allColumnTypes[t.trim()];
1293 if (typeColDef) {
1294 Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["mergeDeep"])(colDefMerged, typeColDef, false, true);
1295 }
1296 else {
1297 console.warn("AG Grid: colDef.type '" + t + "' does not correspond to defined gridOptions.columnTypes");
1298 }
1299 });
1300 };
1301 // if object has children, we assume it's a group
1302 ColumnFactory.prototype.isColumnGroup = function (abstractColDef) {
1303 return abstractColDef.children !== undefined;
1304 };
1305 __decorate([
1306 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('columnUtils')
1307 ], ColumnFactory.prototype, "columnUtils", void 0);
1308 __decorate([
1309 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Qualifier"])('loggerFactory'))
1310 ], ColumnFactory.prototype, "setBeans", null);
1311 ColumnFactory = __decorate([
1312 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Bean"])('columnFactory')
1313 ], ColumnFactory);
1314 return ColumnFactory;
1315}(_context_beanStub__WEBPACK_IMPORTED_MODULE_5__["BeanStub"]));
1316
1317
1318
1319/***/ }),
1320/* 6 */
1321/***/ (function(module, __webpack_exports__, __webpack_require__) {
1322
1323"use strict";
1324__webpack_require__.r(__webpack_exports__);
1325/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnKeyCreator", function() { return ColumnKeyCreator; });
1326/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
1327/**
1328 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1329 * @version v29.2.0
1330 * @link https://www.ag-grid.com/
1331 * @license MIT
1332 */
1333// class returns a unique id to use for the column. it checks the existing columns, and if the requested
1334// id is already taken, it will start appending numbers until it gets a unique id.
1335// eg, if the col field is 'name', it will try ids: {name, name_1, name_2...}
1336// if no field or id provided in the col, it will try the ids of natural numbers
1337
1338var ColumnKeyCreator = /** @class */ (function () {
1339 function ColumnKeyCreator() {
1340 this.existingKeys = {};
1341 }
1342 ColumnKeyCreator.prototype.addExistingKeys = function (keys) {
1343 for (var i = 0; i < keys.length; i++) {
1344 this.existingKeys[keys[i]] = true;
1345 }
1346 };
1347 ColumnKeyCreator.prototype.getUniqueKey = function (colId, colField) {
1348 // in case user passed in number for colId, convert to string
1349 colId = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["toStringOrNull"])(colId);
1350 var count = 0;
1351 while (true) {
1352 var idToTry = void 0;
1353 if (colId) {
1354 idToTry = colId;
1355 if (count !== 0) {
1356 idToTry += '_' + count;
1357 }
1358 }
1359 else if (colField) {
1360 idToTry = colField;
1361 if (count !== 0) {
1362 idToTry += '_' + count;
1363 }
1364 }
1365 else {
1366 idToTry = '' + count;
1367 }
1368 if (!this.existingKeys[idToTry]) {
1369 this.existingKeys[idToTry] = true;
1370 return idToTry;
1371 }
1372 count++;
1373 }
1374 };
1375 return ColumnKeyCreator;
1376}());
1377
1378
1379
1380/***/ }),
1381/* 7 */
1382/***/ (function(module, __webpack_exports__, __webpack_require__) {
1383
1384"use strict";
1385__webpack_require__.r(__webpack_exports__);
1386/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeNull", function() { return makeNull; });
1387/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exists", function() { return exists; });
1388/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "missing", function() { return missing; });
1389/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "missingOrEmpty", function() { return missingOrEmpty; });
1390/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toStringOrNull", function() { return toStringOrNull; });
1391/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attrToNumber", function() { return attrToNumber; });
1392/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attrToBoolean", function() { return attrToBoolean; });
1393/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attrToString", function() { return attrToString; });
1394/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "referenceCompare", function() { return referenceCompare; });
1395/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsonEquals", function() { return jsonEquals; });
1396/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultComparator", function() { return defaultComparator; });
1397/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; });
1398/**
1399 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1400 * @version v29.2.0
1401 * @link https://www.ag-grid.com/
1402 * @license MIT
1403 */
1404/**
1405 * If value is undefined, null or blank, returns null, otherwise returns the value
1406 * @param {T} value
1407 * @returns {T | null}
1408 */
1409function makeNull(value) {
1410 if (value == null || value === '') {
1411 return null;
1412 }
1413 return value;
1414}
1415function exists(value, allowEmptyString) {
1416 if (allowEmptyString === void 0) { allowEmptyString = false; }
1417 return value != null && (value !== '' || allowEmptyString);
1418}
1419function missing(value) {
1420 return !exists(value);
1421}
1422function missingOrEmpty(value) {
1423 return value == null || value.length === 0;
1424}
1425function toStringOrNull(value) {
1426 return value != null && typeof value.toString === 'function' ? value.toString() : null;
1427}
1428// for parsing html attributes, where we want empty strings and missing attributes to be undefined
1429function attrToNumber(value) {
1430 if (value === undefined) {
1431 // undefined or empty means ignore the value
1432 return;
1433 }
1434 if (value === null || value === '') {
1435 // null or blank means clear
1436 return null;
1437 }
1438 if (typeof value === 'number') {
1439 return isNaN(value) ? undefined : value;
1440 }
1441 var valueParsed = parseInt(value, 10);
1442 return isNaN(valueParsed) ? undefined : valueParsed;
1443}
1444// for parsing html attributes, where we want empty strings and missing attributes to be undefined
1445function attrToBoolean(value) {
1446 if (value === undefined) {
1447 // undefined or empty means ignore the value
1448 return;
1449 }
1450 if (value === null || value === '') {
1451 // null means clear
1452 return false;
1453 }
1454 if (typeof value === 'boolean') {
1455 // if simple boolean, return the boolean
1456 return value;
1457 }
1458 // if equal to the string 'true' (ignoring case) then return true
1459 return (/true/i).test(value);
1460}
1461// for parsing html attributes, where we want empty strings and missing attributes to be undefined
1462function attrToString(value) {
1463 if (value == null || value === '') {
1464 return;
1465 }
1466 return value;
1467}
1468/** @deprecated */
1469function referenceCompare(left, right) {
1470 if (left == null && right == null) {
1471 return true;
1472 }
1473 if (left == null && right != null) {
1474 return false;
1475 }
1476 if (left != null && right == null) {
1477 return false;
1478 }
1479 return left === right;
1480}
1481function jsonEquals(val1, val2) {
1482 var val1Json = val1 ? JSON.stringify(val1) : null;
1483 var val2Json = val2 ? JSON.stringify(val2) : null;
1484 return val1Json === val2Json;
1485}
1486function defaultComparator(valueA, valueB, accentedCompare) {
1487 if (accentedCompare === void 0) { accentedCompare = false; }
1488 var valueAMissing = valueA == null;
1489 var valueBMissing = valueB == null;
1490 // this is for aggregations sum and avg, where the result can be a number that is wrapped.
1491 // if we didn't do this, then the toString() value would be used, which would result in
1492 // the strings getting used instead of the numbers.
1493 if (valueA && valueA.toNumber) {
1494 valueA = valueA.toNumber();
1495 }
1496 if (valueB && valueB.toNumber) {
1497 valueB = valueB.toNumber();
1498 }
1499 if (valueAMissing && valueBMissing) {
1500 return 0;
1501 }
1502 if (valueAMissing) {
1503 return -1;
1504 }
1505 if (valueBMissing) {
1506 return 1;
1507 }
1508 function doQuickCompare(a, b) {
1509 return (a > b ? 1 : (a < b ? -1 : 0));
1510 }
1511 if (typeof valueA !== 'string') {
1512 return doQuickCompare(valueA, valueB);
1513 }
1514 if (!accentedCompare) {
1515 return doQuickCompare(valueA, valueB);
1516 }
1517 try {
1518 // using local compare also allows chinese comparisons
1519 return valueA.localeCompare(valueB);
1520 }
1521 catch (e) {
1522 // if something wrong with localeCompare, eg not supported
1523 // by browser, then just continue with the quick one
1524 return doQuickCompare(valueA, valueB);
1525 }
1526}
1527function values(object) {
1528 if (object instanceof Set || object instanceof Map) {
1529 var arr_1 = [];
1530 object.forEach(function (value) { return arr_1.push(value); });
1531 return arr_1;
1532 }
1533 return Object.values(object);
1534}
1535
1536
1537/***/ }),
1538/* 8 */
1539/***/ (function(module, __webpack_exports__, __webpack_require__) {
1540
1541"use strict";
1542__webpack_require__.r(__webpack_exports__);
1543/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProvidedColumnGroup", function() { return ProvidedColumnGroup; });
1544/* harmony import */ var _column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
1545/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
1546/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
1547/**
1548 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1549 * @version v29.2.0
1550 * @link https://www.ag-grid.com/
1551 * @license MIT
1552 */
1553var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1554 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1555 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1556 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;
1557 return c > 3 && r && Object.defineProperty(target, key, r), r;
1558};
1559
1560
1561
1562var ProvidedColumnGroup = /** @class */ (function () {
1563 function ProvidedColumnGroup(colGroupDef, groupId, padding, level) {
1564 this.localEventService = new _eventService__WEBPACK_IMPORTED_MODULE_1__["EventService"]();
1565 this.expandable = false;
1566 // used by React (and possibly other frameworks) as key for rendering. also used to
1567 // identify old vs new columns for destroying cols when no longer used.
1568 this.instanceId = Object(_column__WEBPACK_IMPORTED_MODULE_0__["getNextColInstanceId"])();
1569 this.expandableListenerRemoveCallback = null;
1570 this.colGroupDef = colGroupDef;
1571 this.groupId = groupId;
1572 this.expanded = !!colGroupDef && !!colGroupDef.openByDefault;
1573 this.padding = padding;
1574 this.level = level;
1575 }
1576 ProvidedColumnGroup.prototype.destroy = function () {
1577 if (this.expandableListenerRemoveCallback) {
1578 this.reset(null, undefined);
1579 }
1580 };
1581 ProvidedColumnGroup.prototype.reset = function (colGroupDef, level) {
1582 this.colGroupDef = colGroupDef;
1583 this.level = level;
1584 this.originalParent = null;
1585 if (this.expandableListenerRemoveCallback) {
1586 this.expandableListenerRemoveCallback();
1587 }
1588 // we use ! below, as we want to set the object back to the
1589 // way it was when it was first created
1590 this.children = undefined;
1591 this.expandable = undefined;
1592 };
1593 ProvidedColumnGroup.prototype.getInstanceId = function () {
1594 return this.instanceId;
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_0__["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 if (this.expandableListenerRemoveCallback) {
1674 this.expandableListenerRemoveCallback();
1675 }
1676 var listener = this.onColumnVisibilityChanged.bind(this);
1677 this.getLeafColumns().forEach(function (col) { return col.addEventListener('visibleChanged', listener); });
1678 this.expandableListenerRemoveCallback = function () {
1679 _this.getLeafColumns().forEach(function (col) { return col.removeEventListener('visibleChanged', listener); });
1680 _this.expandableListenerRemoveCallback = null;
1681 };
1682 };
1683 ProvidedColumnGroup.prototype.setExpandable = function () {
1684 if (this.isPadding()) {
1685 return;
1686 }
1687 // want to make sure the group doesn't disappear when it's open
1688 var atLeastOneShowingWhenOpen = false;
1689 // want to make sure the group doesn't disappear when it's closed
1690 var atLeastOneShowingWhenClosed = false;
1691 // want to make sure the group has something to show / hide
1692 var atLeastOneChangeable = false;
1693 var children = this.findChildrenRemovingPadding();
1694 for (var i = 0, j = children.length; i < j; i++) {
1695 var abstractColumn = children[i];
1696 if (!abstractColumn.isVisible()) {
1697 continue;
1698 }
1699 // if the abstractColumn is a grid generated group, there will be no colDef
1700 var headerGroupShow = abstractColumn.getColumnGroupShow();
1701 if (headerGroupShow === 'open') {
1702 atLeastOneShowingWhenOpen = true;
1703 atLeastOneChangeable = true;
1704 }
1705 else if (headerGroupShow === 'closed') {
1706 atLeastOneShowingWhenClosed = true;
1707 atLeastOneChangeable = true;
1708 }
1709 else {
1710 atLeastOneShowingWhenOpen = true;
1711 atLeastOneShowingWhenClosed = true;
1712 }
1713 }
1714 var expandable = atLeastOneShowingWhenOpen && atLeastOneShowingWhenClosed && atLeastOneChangeable;
1715 if (this.expandable !== expandable) {
1716 this.expandable = expandable;
1717 var event_1 = {
1718 type: ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED
1719 };
1720 this.localEventService.dispatchEvent(event_1);
1721 }
1722 };
1723 ProvidedColumnGroup.prototype.findChildrenRemovingPadding = function () {
1724 var res = [];
1725 var process = function (items) {
1726 items.forEach(function (item) {
1727 // if padding, we add this children instead of the padding
1728 var skipBecausePadding = item instanceof ProvidedColumnGroup && item.isPadding();
1729 if (skipBecausePadding) {
1730 process(item.children);
1731 }
1732 else {
1733 res.push(item);
1734 }
1735 });
1736 };
1737 process(this.children);
1738 return res;
1739 };
1740 ProvidedColumnGroup.prototype.onColumnVisibilityChanged = function () {
1741 this.setExpandable();
1742 };
1743 ProvidedColumnGroup.prototype.addEventListener = function (eventType, listener) {
1744 this.localEventService.addEventListener(eventType, listener);
1745 };
1746 ProvidedColumnGroup.prototype.removeEventListener = function (eventType, listener) {
1747 this.localEventService.removeEventListener(eventType, listener);
1748 };
1749 ProvidedColumnGroup.EVENT_EXPANDED_CHANGED = 'expandedChanged';
1750 ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED = 'expandableChanged';
1751 __decorate([
1752 _context_context__WEBPACK_IMPORTED_MODULE_2__["PreDestroy"]
1753 ], ProvidedColumnGroup.prototype, "destroy", null);
1754 return ProvidedColumnGroup;
1755}());
1756
1757
1758
1759/***/ }),
1760/* 9 */
1761/***/ (function(module, __webpack_exports__, __webpack_require__) {
1762
1763"use strict";
1764__webpack_require__.r(__webpack_exports__);
1765/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNextColInstanceId", function() { return getNextColInstanceId; });
1766/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return Column; });
1767/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
1768/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
1769/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
1770/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
1771/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
1772/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(13);
1773/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(12);
1774/**
1775 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1776 * @version v29.2.0
1777 * @link https://www.ag-grid.com/
1778 * @license MIT
1779 */
1780var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1781 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1782 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1783 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;
1784 return c > 3 && r && Object.defineProperty(target, key, r), r;
1785};
1786
1787
1788
1789
1790
1791
1792
1793var instanceIdSequence = 0;
1794function getNextColInstanceId() {
1795 return instanceIdSequence++;
1796}
1797// Wrapper around a user provide column definition. The grid treats the column definition as ready only.
1798// This class contains all the runtime information about a column, plus some logic (the definition has no logic).
1799// This class implements both interfaces ColumnGroupChild and ProvidedColumnGroupChild as the class can
1800// appear as a child of either the original tree or the displayed tree. However the relevant group classes
1801// for each type only implements one, as each group can only appear in it's associated tree (eg ProvidedColumnGroup
1802// can only appear in OriginalColumn tree).
1803var Column = /** @class */ (function () {
1804 function Column(colDef, userProvidedColDef, colId, primary) {
1805 // used by React (and possibly other frameworks) as key for rendering. also used to
1806 // identify old vs new columns for destroying cols when no longer used.
1807 this.instanceId = getNextColInstanceId();
1808 // The measured height of this column's header when autoHeaderHeight is enabled
1809 this.autoHeaderHeight = null;
1810 this.moving = false;
1811 this.menuVisible = false;
1812 this.filterActive = false;
1813 this.eventService = new _eventService__WEBPACK_IMPORTED_MODULE_0__["EventService"]();
1814 this.rowGroupActive = false;
1815 this.pivotActive = false;
1816 this.aggregationActive = false;
1817 this.colDef = colDef;
1818 this.userProvidedColDef = userProvidedColDef;
1819 this.colId = colId;
1820 this.primary = primary;
1821 this.setState(colDef);
1822 }
1823 Column.prototype.getInstanceId = function () {
1824 return this.instanceId;
1825 };
1826 Column.prototype.setState = function (colDef) {
1827 // sort
1828 if (colDef.sort !== undefined) {
1829 if (colDef.sort === 'asc' || colDef.sort === 'desc') {
1830 this.sort = colDef.sort;
1831 }
1832 }
1833 else {
1834 if (colDef.initialSort === 'asc' || colDef.initialSort === 'desc') {
1835 this.sort = colDef.initialSort;
1836 }
1837 }
1838 // sortIndex
1839 var sortIndex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToNumber"])(colDef.sortIndex);
1840 var initialSortIndex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToNumber"])(colDef.initialSortIndex);
1841 if (sortIndex !== undefined) {
1842 if (sortIndex !== null) {
1843 this.sortIndex = sortIndex;
1844 }
1845 }
1846 else {
1847 if (initialSortIndex !== null) {
1848 this.sortIndex = initialSortIndex;
1849 }
1850 }
1851 // hide
1852 var hide = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToBoolean"])(colDef.hide);
1853 var initialHide = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToBoolean"])(colDef.initialHide);
1854 if (hide !== undefined) {
1855 this.visible = !hide;
1856 }
1857 else {
1858 this.visible = !initialHide;
1859 }
1860 // pinned
1861 if (colDef.pinned !== undefined) {
1862 this.setPinned(colDef.pinned);
1863 }
1864 else {
1865 this.setPinned(colDef.initialPinned);
1866 }
1867 // flex
1868 var flex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToNumber"])(colDef.flex);
1869 var initialFlex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToNumber"])(colDef.initialFlex);
1870 if (flex !== undefined) {
1871 this.flex = flex;
1872 }
1873 else if (initialFlex !== undefined) {
1874 this.flex = initialFlex;
1875 }
1876 };
1877 // gets called when user provides an alternative colDef, eg
1878 Column.prototype.setColDef = function (colDef, userProvidedColDef) {
1879 this.colDef = colDef;
1880 this.userProvidedColDef = userProvidedColDef;
1881 this.initMinAndMaxWidths();
1882 this.initDotNotation();
1883 this.eventService.dispatchEvent(this.createColumnEvent('colDefChanged', "api"));
1884 };
1885 /**
1886 * Returns the column definition provided by the application.
1887 * This may not be correct, as items can be superseded by default column options.
1888 * However it's useful for comparison, eg to know which application column definition matches that column.
1889 */
1890 Column.prototype.getUserProvidedColDef = function () {
1891 return this.userProvidedColDef;
1892 };
1893 Column.prototype.setParent = function (parent) {
1894 this.parent = parent;
1895 };
1896 /** Returns the parent column group, if column grouping is active. */
1897 Column.prototype.getParent = function () {
1898 return this.parent;
1899 };
1900 Column.prototype.setOriginalParent = function (originalParent) {
1901 this.originalParent = originalParent;
1902 };
1903 Column.prototype.getOriginalParent = function () {
1904 return this.originalParent;
1905 };
1906 // this is done after constructor as it uses gridOptionsService
1907 Column.prototype.initialise = function () {
1908 this.initMinAndMaxWidths();
1909 this.resetActualWidth('gridInitializing');
1910 this.initDotNotation();
1911 this.validate();
1912 };
1913 Column.prototype.initDotNotation = function () {
1914 var suppressDotNotation = this.gridOptionsService.is('suppressFieldDotNotation');
1915 this.fieldContainsDots = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(this.colDef.field) && this.colDef.field.indexOf('.') >= 0 && !suppressDotNotation;
1916 this.tooltipFieldContainsDots = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(this.colDef.tooltipField) && this.colDef.tooltipField.indexOf('.') >= 0 && !suppressDotNotation;
1917 };
1918 Column.prototype.initMinAndMaxWidths = function () {
1919 var colDef = this.colDef;
1920 this.minWidth = this.columnUtils.calculateColMinWidth(colDef);
1921 this.maxWidth = this.columnUtils.calculateColMaxWidth(colDef);
1922 };
1923 Column.prototype.resetActualWidth = function (source) {
1924 if (source === void 0) { source = 'api'; }
1925 var initialWidth = this.columnUtils.calculateColInitialWidth(this.colDef);
1926 this.setActualWidth(initialWidth, source, true);
1927 };
1928 Column.prototype.isEmptyGroup = function () {
1929 return false;
1930 };
1931 Column.prototype.isRowGroupDisplayed = function (colId) {
1932 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(this.colDef) || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(this.colDef.showRowGroup)) {
1933 return false;
1934 }
1935 var showingAllGroups = this.colDef.showRowGroup === true;
1936 var showingThisGroup = this.colDef.showRowGroup === colId;
1937 return showingAllGroups || showingThisGroup;
1938 };
1939 /** Returns `true` if column is a primary column, `false` if secondary. Secondary columns are used for pivoting. */
1940 Column.prototype.isPrimary = function () {
1941 return this.primary;
1942 };
1943 /** Returns `true` if column filtering is allowed. */
1944 Column.prototype.isFilterAllowed = function () {
1945 // filter defined means it's a string, class or true.
1946 // if its false, null or undefined then it's false.
1947 var filterDefined = !!this.colDef.filter || !!this.colDef.filterFramework;
1948 return filterDefined;
1949 };
1950 Column.prototype.isFieldContainsDots = function () {
1951 return this.fieldContainsDots;
1952 };
1953 Column.prototype.isTooltipFieldContainsDots = function () {
1954 return this.tooltipFieldContainsDots;
1955 };
1956 Column.prototype.validate = function () {
1957 var colDefAny = this.colDef;
1958 function warnOnce(msg, key, obj) {
1959 Object(_utils_function__WEBPACK_IMPORTED_MODULE_5__["doOnce"])(function () {
1960 if (obj) {
1961 console.warn(msg, obj);
1962 }
1963 else {
1964 Object(_utils_function__WEBPACK_IMPORTED_MODULE_5__["doOnce"])(function () { return console.warn(msg); }, key);
1965 }
1966 }, key);
1967 }
1968 var usingCSRM = this.gridOptionsService.isRowModelType('clientSide');
1969 if (usingCSRM && !_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_3__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_2__["ModuleNames"].RowGroupingModule)) {
1970 var rowGroupingItems = ['enableRowGroup', 'rowGroup', 'rowGroupIndex', 'enablePivot', 'enableValue', 'pivot', 'pivotIndex', 'aggFunc'];
1971 var itemsUsed = rowGroupingItems.filter(function (x) { return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(colDefAny[x]); });
1972 if (itemsUsed.length > 0) {
1973 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_3__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_2__["ModuleNames"].RowGroupingModule, itemsUsed.map(function (i) { return 'colDef.' + i; }).join(', '));
1974 }
1975 }
1976 if (this.colDef.cellEditor === 'agRichSelect' || this.colDef.cellEditor === 'agRichSelectCellEditor') {
1977 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_3__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_2__["ModuleNames"].RichSelectModule, this.colDef.cellEditor);
1978 }
1979 if (this.gridOptionsService.isTreeData()) {
1980 var itemsNotAllowedWithTreeData = ['rowGroup', 'rowGroupIndex', 'pivot', 'pivotIndex'];
1981 var itemsUsed = itemsNotAllowedWithTreeData.filter(function (x) { return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(colDefAny[x]); });
1982 if (itemsUsed.length > 0) {
1983 warnOnce("AG Grid: " + itemsUsed.join() + " is not possible when doing tree data, your column definition should not have " + itemsUsed.join(), 'TreeDataCannotRowGroup');
1984 }
1985 }
1986 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(colDefAny.menuTabs)) {
1987 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_3__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_2__["ModuleNames"].MenuModule, 'menuTabs');
1988 }
1989 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(colDefAny.columnsMenuParams)) {
1990 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_3__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_2__["ModuleNames"].MenuModule, 'columnsMenuParams');
1991 }
1992 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(colDefAny.columnsMenuParams)) {
1993 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_3__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_2__["ModuleNames"].ColumnsToolPanelModule, 'columnsMenuParams');
1994 }
1995 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(this.colDef.width) && typeof this.colDef.width !== 'number') {
1996 warnOnce('AG Grid: colDef.width should be a number, not ' + typeof this.colDef.width, 'ColumnCheck');
1997 }
1998 if (colDefAny.pinnedRowCellRenderer || colDefAny.pinnedRowCellRendererParams || colDefAny.pinnedRowCellRendererFramework) {
1999 warnOnce('AG Grid: pinnedRowCellRenderer[Params,Framework] no longer exist. Use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned.', 'colDef.pinnedRowCellRenderer-deprecated');
2000 }
2001 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(colDefAny.columnGroupShow) && colDefAny.columnGroupShow !== 'closed' && colDefAny.columnGroupShow !== 'open') {
2002 warnOnce("AG Grid: '" + colDefAny.columnGroupShow + "' is not valid for columnGroupShow. Valid values are 'open', 'closed', undefined, null", 'columnGroupShow_invalid');
2003 }
2004 };
2005 /** Add an event listener to the column. */
2006 Column.prototype.addEventListener = function (eventType, listener) {
2007 this.eventService.addEventListener(eventType, listener);
2008 };
2009 /** Remove event listener from the column. */
2010 Column.prototype.removeEventListener = function (eventType, listener) {
2011 this.eventService.removeEventListener(eventType, listener);
2012 };
2013 Column.prototype.createColumnFunctionCallbackParams = function (rowNode) {
2014 return {
2015 node: rowNode,
2016 data: rowNode.data,
2017 column: this,
2018 colDef: this.colDef,
2019 context: this.gridOptionsService.context,
2020 api: this.gridOptionsService.api,
2021 columnApi: this.gridOptionsService.columnApi
2022 };
2023 };
2024 Column.prototype.isSuppressNavigable = function (rowNode) {
2025 // if boolean set, then just use it
2026 if (typeof this.colDef.suppressNavigable === 'boolean') {
2027 return this.colDef.suppressNavigable;
2028 }
2029 // if function, then call the function to find out
2030 if (typeof this.colDef.suppressNavigable === 'function') {
2031 var params = this.createColumnFunctionCallbackParams(rowNode);
2032 var userFunc = this.colDef.suppressNavigable;
2033 return userFunc(params);
2034 }
2035 return false;
2036 };
2037 Column.prototype.isCellEditable = function (rowNode) {
2038 // only allow editing of groups if the user has this option enabled
2039 if (rowNode.group && !this.gridOptionsService.is('enableGroupEdit')) {
2040 return false;
2041 }
2042 return this.isColumnFunc(rowNode, this.colDef.editable);
2043 };
2044 Column.prototype.isSuppressFillHandle = function () {
2045 return !!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToBoolean"])(this.colDef.suppressFillHandle);
2046 };
2047 Column.prototype.isAutoHeight = function () {
2048 return !!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToBoolean"])(this.colDef.autoHeight);
2049 };
2050 Column.prototype.isAutoHeaderHeight = function () {
2051 return !!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToBoolean"])(this.colDef.autoHeaderHeight);
2052 };
2053 Column.prototype.isRowDrag = function (rowNode) {
2054 return this.isColumnFunc(rowNode, this.colDef.rowDrag);
2055 };
2056 Column.prototype.isDndSource = function (rowNode) {
2057 return this.isColumnFunc(rowNode, this.colDef.dndSource);
2058 };
2059 Column.prototype.isCellCheckboxSelection = function (rowNode) {
2060 return this.isColumnFunc(rowNode, this.colDef.checkboxSelection);
2061 };
2062 Column.prototype.isSuppressPaste = function (rowNode) {
2063 return this.isColumnFunc(rowNode, this.colDef ? this.colDef.suppressPaste : null);
2064 };
2065 Column.prototype.isResizable = function () {
2066 return !!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToBoolean"])(this.colDef.resizable);
2067 };
2068 Column.prototype.isColumnFunc = function (rowNode, value) {
2069 // if boolean set, then just use it
2070 if (typeof value === 'boolean') {
2071 return value;
2072 }
2073 // if function, then call the function to find out
2074 if (typeof value === 'function') {
2075 var params = this.createColumnFunctionCallbackParams(rowNode);
2076 var editableFunc = value;
2077 return editableFunc(params);
2078 }
2079 return false;
2080 };
2081 Column.prototype.setMoving = function (moving, source) {
2082 if (source === void 0) { source = "api"; }
2083 this.moving = moving;
2084 this.eventService.dispatchEvent(this.createColumnEvent('movingChanged', source));
2085 };
2086 Column.prototype.createColumnEvent = function (type, source) {
2087 return {
2088 type: type,
2089 column: this,
2090 columns: [this],
2091 source: source,
2092 api: this.gridOptionsService.api,
2093 columnApi: this.gridOptionsService.columnApi,
2094 context: this.gridOptionsService.context
2095 };
2096 };
2097 Column.prototype.isMoving = function () {
2098 return this.moving;
2099 };
2100 /** If sorting is active, returns the sort direction e.g. `'asc'` or `'desc'`. */
2101 Column.prototype.getSort = function () {
2102 return this.sort;
2103 };
2104 Column.prototype.setSort = function (sort, source) {
2105 if (source === void 0) { source = "api"; }
2106 if (this.sort !== sort) {
2107 this.sort = sort;
2108 this.eventService.dispatchEvent(this.createColumnEvent('sortChanged', source));
2109 }
2110 };
2111 Column.prototype.setMenuVisible = function (visible, source) {
2112 if (source === void 0) { source = "api"; }
2113 if (this.menuVisible !== visible) {
2114 this.menuVisible = visible;
2115 this.eventService.dispatchEvent(this.createColumnEvent('menuVisibleChanged', source));
2116 }
2117 };
2118 Column.prototype.isMenuVisible = function () {
2119 return this.menuVisible;
2120 };
2121 Column.prototype.isSortAscending = function () {
2122 return this.sort === 'asc';
2123 };
2124 Column.prototype.isSortDescending = function () {
2125 return this.sort === 'desc';
2126 };
2127 Column.prototype.isSortNone = function () {
2128 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(this.sort);
2129 };
2130 Column.prototype.isSorting = function () {
2131 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(this.sort);
2132 };
2133 Column.prototype.getSortIndex = function () {
2134 return this.sortIndex;
2135 };
2136 Column.prototype.setSortIndex = function (sortOrder) {
2137 this.sortIndex = sortOrder;
2138 };
2139 Column.prototype.setAggFunc = function (aggFunc) {
2140 this.aggFunc = aggFunc;
2141 };
2142 /** If aggregation is set for the column, returns the aggregation function. */
2143 Column.prototype.getAggFunc = function () {
2144 return this.aggFunc;
2145 };
2146 Column.prototype.getLeft = function () {
2147 return this.left;
2148 };
2149 Column.prototype.getOldLeft = function () {
2150 return this.oldLeft;
2151 };
2152 Column.prototype.getRight = function () {
2153 return this.left + this.actualWidth;
2154 };
2155 Column.prototype.setLeft = function (left, source) {
2156 if (source === void 0) { source = "api"; }
2157 this.oldLeft = this.left;
2158 if (this.left !== left) {
2159 this.left = left;
2160 this.eventService.dispatchEvent(this.createColumnEvent('leftChanged', source));
2161 }
2162 };
2163 /** Returns `true` if filter is active on the column. */
2164 Column.prototype.isFilterActive = function () {
2165 return this.filterActive;
2166 };
2167 // additionalEventAttributes is used by provided simple floating filter, so it can add 'floatingFilter=true' to the event
2168 Column.prototype.setFilterActive = function (active, source, additionalEventAttributes) {
2169 if (source === void 0) { source = "api"; }
2170 if (this.filterActive !== active) {
2171 this.filterActive = active;
2172 this.eventService.dispatchEvent(this.createColumnEvent('filterActiveChanged', source));
2173 }
2174 var filterChangedEvent = this.createColumnEvent('filterChanged', source);
2175 if (additionalEventAttributes) {
2176 Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["mergeDeep"])(filterChangedEvent, additionalEventAttributes);
2177 }
2178 this.eventService.dispatchEvent(filterChangedEvent);
2179 };
2180 Column.prototype.setPinned = function (pinned) {
2181 if (pinned === true || pinned === 'left') {
2182 this.pinned = 'left';
2183 }
2184 else if (pinned === 'right') {
2185 this.pinned = 'right';
2186 }
2187 else {
2188 this.pinned = null;
2189 }
2190 };
2191 Column.prototype.setFirstRightPinned = function (firstRightPinned, source) {
2192 if (source === void 0) { source = "api"; }
2193 if (this.firstRightPinned !== firstRightPinned) {
2194 this.firstRightPinned = firstRightPinned;
2195 this.eventService.dispatchEvent(this.createColumnEvent('firstRightPinnedChanged', source));
2196 }
2197 };
2198 Column.prototype.setLastLeftPinned = function (lastLeftPinned, source) {
2199 if (source === void 0) { source = "api"; }
2200 if (this.lastLeftPinned !== lastLeftPinned) {
2201 this.lastLeftPinned = lastLeftPinned;
2202 this.eventService.dispatchEvent(this.createColumnEvent('lastLeftPinnedChanged', source));
2203 }
2204 };
2205 Column.prototype.isFirstRightPinned = function () {
2206 return this.firstRightPinned;
2207 };
2208 Column.prototype.isLastLeftPinned = function () {
2209 return this.lastLeftPinned;
2210 };
2211 Column.prototype.isPinned = function () {
2212 return this.pinned === 'left' || this.pinned === 'right';
2213 };
2214 Column.prototype.isPinnedLeft = function () {
2215 return this.pinned === 'left';
2216 };
2217 Column.prototype.isPinnedRight = function () {
2218 return this.pinned === 'right';
2219 };
2220 Column.prototype.getPinned = function () {
2221 return this.pinned;
2222 };
2223 Column.prototype.setVisible = function (visible, source) {
2224 if (source === void 0) { source = "api"; }
2225 var newValue = visible === true;
2226 if (this.visible !== newValue) {
2227 this.visible = newValue;
2228 this.eventService.dispatchEvent(this.createColumnEvent('visibleChanged', source));
2229 }
2230 };
2231 Column.prototype.isVisible = function () {
2232 return this.visible;
2233 };
2234 Column.prototype.isSpanHeaderHeight = function () {
2235 return !!this.getColDef().spanHeaderHeight;
2236 };
2237 /** Returns the column definition for this column.
2238 * The column definition will be the result of merging the application provided column definition with any provided defaults
2239 * (e.g. `defaultColDef` grid option, or column types.
2240 *
2241 * Equivalent: `getDefinition` */
2242 Column.prototype.getColDef = function () {
2243 return this.colDef;
2244 };
2245 Column.prototype.getColumnGroupShow = function () {
2246 return this.colDef.columnGroupShow;
2247 };
2248 /**
2249 * Returns the unique ID for the column.
2250 *
2251 * Equivalent: `getId`, `getUniqueId` */
2252 Column.prototype.getColId = function () {
2253 return this.colId;
2254 };
2255 /**
2256 * Returns the unique ID for the column.
2257 *
2258 * Equivalent: `getColId`, `getUniqueId` */
2259 Column.prototype.getId = function () {
2260 return this.getColId();
2261 };
2262 /**
2263 * Returns the unique ID for the column.
2264 *
2265 * Equivalent: `getColId`, `getId` */
2266 Column.prototype.getUniqueId = function () {
2267 return this.getId();
2268 };
2269 Column.prototype.getDefinition = function () {
2270 return this.colDef;
2271 };
2272 /** Returns the current width of the column. If the column is resized, the actual width is the new size. */
2273 Column.prototype.getActualWidth = function () {
2274 return this.actualWidth;
2275 };
2276 Column.prototype.getAutoHeaderHeight = function () {
2277 return this.autoHeaderHeight;
2278 };
2279 /** Returns true if the header height has changed */
2280 Column.prototype.setAutoHeaderHeight = function (height) {
2281 var changed = height !== this.autoHeaderHeight;
2282 this.autoHeaderHeight = height;
2283 return changed;
2284 };
2285 Column.prototype.createBaseColDefParams = function (rowNode) {
2286 var params = {
2287 node: rowNode,
2288 data: rowNode.data,
2289 colDef: this.colDef,
2290 column: this,
2291 api: this.gridOptionsService.api,
2292 columnApi: this.gridOptionsService.columnApi,
2293 context: this.gridOptionsService.context
2294 };
2295 return params;
2296 };
2297 Column.prototype.getColSpan = function (rowNode) {
2298 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(this.colDef.colSpan)) {
2299 return 1;
2300 }
2301 var params = this.createBaseColDefParams(rowNode);
2302 var colSpan = this.colDef.colSpan(params);
2303 // colSpan must be number equal to or greater than 1
2304 return Math.max(colSpan, 1);
2305 };
2306 Column.prototype.getRowSpan = function (rowNode) {
2307 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(this.colDef.rowSpan)) {
2308 return 1;
2309 }
2310 var params = this.createBaseColDefParams(rowNode);
2311 var rowSpan = this.colDef.rowSpan(params);
2312 // rowSpan must be number equal to or greater than 1
2313 return Math.max(rowSpan, 1);
2314 };
2315 Column.prototype.setActualWidth = function (actualWidth, source, silent) {
2316 if (source === void 0) { source = "api"; }
2317 if (silent === void 0) { silent = false; }
2318 if (this.minWidth != null) {
2319 actualWidth = Math.max(actualWidth, this.minWidth);
2320 }
2321 if (this.maxWidth != null) {
2322 actualWidth = Math.min(actualWidth, this.maxWidth);
2323 }
2324 if (this.actualWidth !== actualWidth) {
2325 // disable flex for this column if it was manually resized.
2326 this.actualWidth = actualWidth;
2327 if (this.flex && source !== 'flex' && source !== 'gridInitializing') {
2328 this.flex = null;
2329 }
2330 if (!silent) {
2331 this.fireColumnWidthChangedEvent(source);
2332 }
2333 }
2334 };
2335 Column.prototype.fireColumnWidthChangedEvent = function (source) {
2336 this.eventService.dispatchEvent(this.createColumnEvent('widthChanged', source));
2337 };
2338 Column.prototype.isGreaterThanMax = function (width) {
2339 if (this.maxWidth != null) {
2340 return width > this.maxWidth;
2341 }
2342 return false;
2343 };
2344 Column.prototype.getMinWidth = function () {
2345 return this.minWidth;
2346 };
2347 Column.prototype.getMaxWidth = function () {
2348 return this.maxWidth;
2349 };
2350 Column.prototype.getFlex = function () {
2351 return this.flex || 0;
2352 };
2353 // this method should only be used by the columnModel to
2354 // change flex when required by the applyColumnState method.
2355 Column.prototype.setFlex = function (flex) {
2356 if (this.flex !== flex) {
2357 this.flex = flex;
2358 }
2359 };
2360 Column.prototype.setMinimum = function (source) {
2361 if (source === void 0) { source = "api"; }
2362 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(this.minWidth)) {
2363 this.setActualWidth(this.minWidth, source);
2364 }
2365 };
2366 Column.prototype.setRowGroupActive = function (rowGroup, source) {
2367 if (source === void 0) { source = "api"; }
2368 if (this.rowGroupActive !== rowGroup) {
2369 this.rowGroupActive = rowGroup;
2370 this.eventService.dispatchEvent(this.createColumnEvent('columnRowGroupChanged', source));
2371 }
2372 };
2373 /** Returns `true` if row group is currently active for this column. */
2374 Column.prototype.isRowGroupActive = function () {
2375 return this.rowGroupActive;
2376 };
2377 Column.prototype.setPivotActive = function (pivot, source) {
2378 if (source === void 0) { source = "api"; }
2379 if (this.pivotActive !== pivot) {
2380 this.pivotActive = pivot;
2381 this.eventService.dispatchEvent(this.createColumnEvent('columnPivotChanged', source));
2382 }
2383 };
2384 /** Returns `true` if pivot is currently active for this column. */
2385 Column.prototype.isPivotActive = function () {
2386 return this.pivotActive;
2387 };
2388 Column.prototype.isAnyFunctionActive = function () {
2389 return this.isPivotActive() || this.isRowGroupActive() || this.isValueActive();
2390 };
2391 Column.prototype.isAnyFunctionAllowed = function () {
2392 return this.isAllowPivot() || this.isAllowRowGroup() || this.isAllowValue();
2393 };
2394 Column.prototype.setValueActive = function (value, source) {
2395 if (source === void 0) { source = "api"; }
2396 if (this.aggregationActive !== value) {
2397 this.aggregationActive = value;
2398 this.eventService.dispatchEvent(this.createColumnEvent('columnValueChanged', source));
2399 }
2400 };
2401 /** Returns `true` if value (aggregation) is currently active for this column. */
2402 Column.prototype.isValueActive = function () {
2403 return this.aggregationActive;
2404 };
2405 Column.prototype.isAllowPivot = function () {
2406 return this.colDef.enablePivot === true;
2407 };
2408 Column.prototype.isAllowValue = function () {
2409 return this.colDef.enableValue === true;
2410 };
2411 Column.prototype.isAllowRowGroup = function () {
2412 return this.colDef.enableRowGroup === true;
2413 };
2414 Column.prototype.getMenuTabs = function (defaultValues) {
2415 var menuTabs = this.getColDef().menuTabs;
2416 if (menuTabs == null) {
2417 menuTabs = defaultValues;
2418 }
2419 return menuTabs;
2420 };
2421 // + renderedHeaderCell - for making header cell transparent when moving
2422 Column.EVENT_MOVING_CHANGED = 'movingChanged';
2423 // + renderedCell - changing left position
2424 Column.EVENT_LEFT_CHANGED = 'leftChanged';
2425 // + renderedCell - changing width
2426 Column.EVENT_WIDTH_CHANGED = 'widthChanged';
2427 // + renderedCell - for changing pinned classes
2428 Column.EVENT_LAST_LEFT_PINNED_CHANGED = 'lastLeftPinnedChanged';
2429 Column.EVENT_FIRST_RIGHT_PINNED_CHANGED = 'firstRightPinnedChanged';
2430 // + renderedColumn - for changing visibility icon
2431 Column.EVENT_VISIBLE_CHANGED = 'visibleChanged';
2432 // + every time the filter changes, used in the floating filters
2433 Column.EVENT_FILTER_CHANGED = 'filterChanged';
2434 // + renderedHeaderCell - marks the header with filter icon
2435 Column.EVENT_FILTER_ACTIVE_CHANGED = 'filterActiveChanged';
2436 // + renderedHeaderCell - marks the header with sort icon
2437 Column.EVENT_SORT_CHANGED = 'sortChanged';
2438 // + renderedHeaderCell - marks the header with sort icon
2439 Column.EVENT_COL_DEF_CHANGED = 'colDefChanged';
2440 Column.EVENT_MENU_VISIBLE_CHANGED = 'menuVisibleChanged';
2441 // + toolpanel, for gui updates
2442 Column.EVENT_ROW_GROUP_CHANGED = 'columnRowGroupChanged';
2443 // + toolpanel, for gui updates
2444 Column.EVENT_PIVOT_CHANGED = 'columnPivotChanged';
2445 // + toolpanel, for gui updates
2446 Column.EVENT_VALUE_CHANGED = 'columnValueChanged';
2447 __decorate([
2448 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptionsService')
2449 ], Column.prototype, "gridOptionsService", void 0);
2450 __decorate([
2451 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnUtils')
2452 ], Column.prototype, "columnUtils", void 0);
2453 __decorate([
2454 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
2455 ], Column.prototype, "initialise", null);
2456 return Column;
2457}());
2458
2459
2460
2461/***/ }),
2462/* 10 */
2463/***/ (function(module, __webpack_exports__, __webpack_require__) {
2464
2465"use strict";
2466__webpack_require__.r(__webpack_exports__);
2467/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventService", function() { return EventService; });
2468/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
2469/**
2470 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
2471 * @version v29.2.0
2472 * @link https://www.ag-grid.com/
2473 * @license MIT
2474 */
2475var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2476 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2477 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2478 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;
2479 return c > 3 && r && Object.defineProperty(target, key, r), r;
2480};
2481var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
2482 return function (target, key) { decorator(target, key, paramIndex); }
2483};
2484
2485var EventService = /** @class */ (function () {
2486 function EventService() {
2487 this.allSyncListeners = new Map();
2488 this.allAsyncListeners = new Map();
2489 this.globalSyncListeners = new Set();
2490 this.globalAsyncListeners = new Set();
2491 this.asyncFunctionsQueue = [];
2492 this.scheduled = false;
2493 // using an object performs better than a Set for the number of different events we have
2494 this.firedEvents = {};
2495 }
2496 // because this class is used both inside the context and outside the context, we do not
2497 // use autowired attributes, as that would be confusing, as sometimes the attributes
2498 // would be wired, and sometimes not.
2499 //
2500 // the global event servers used by AG Grid is autowired by the context once, and this
2501 // setBeans method gets called once.
2502 //
2503 // the times when this class is used outside of the context (eg RowNode has an instance of this
2504 // class) then it is not a bean, and this setBeans method is not called.
2505 EventService.prototype.setBeans = function (loggerFactory, gridOptionsService, frameworkOverrides, globalEventListener) {
2506 if (globalEventListener === void 0) { globalEventListener = null; }
2507 this.frameworkOverrides = frameworkOverrides;
2508 this.gridOptionsService = gridOptionsService;
2509 if (globalEventListener) {
2510 var async = gridOptionsService.useAsyncEvents();
2511 this.addGlobalListener(globalEventListener, async);
2512 }
2513 };
2514 EventService.prototype.getListeners = function (eventType, async, autoCreateListenerCollection) {
2515 var listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;
2516 var listeners = listenerMap.get(eventType);
2517 // Note: 'autoCreateListenerCollection' should only be 'true' if a listener is about to be added. For instance
2518 // getListeners() is also called during event dispatch even though no listeners are added. This measure protects
2519 // against 'memory bloat' as empty collections will prevent the RowNode's event service from being removed after
2520 // the RowComp is destroyed, see noRegisteredListenersExist() below.
2521 if (!listeners && autoCreateListenerCollection) {
2522 listeners = new Set();
2523 listenerMap.set(eventType, listeners);
2524 }
2525 return listeners;
2526 };
2527 EventService.prototype.noRegisteredListenersExist = function () {
2528 return this.allSyncListeners.size === 0 && this.allAsyncListeners.size === 0 &&
2529 this.globalSyncListeners.size === 0 && this.globalAsyncListeners.size === 0;
2530 };
2531 EventService.prototype.addEventListener = function (eventType, listener, async) {
2532 if (async === void 0) { async = false; }
2533 this.getListeners(eventType, async, true).add(listener);
2534 };
2535 EventService.prototype.removeEventListener = function (eventType, listener, async) {
2536 if (async === void 0) { async = false; }
2537 var listeners = this.getListeners(eventType, async, false);
2538 if (!listeners) {
2539 return;
2540 }
2541 listeners.delete(listener);
2542 if (listeners.size === 0) {
2543 var listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;
2544 listenerMap.delete(eventType);
2545 }
2546 };
2547 EventService.prototype.addGlobalListener = function (listener, async) {
2548 if (async === void 0) { async = false; }
2549 (async ? this.globalAsyncListeners : this.globalSyncListeners).add(listener);
2550 };
2551 EventService.prototype.removeGlobalListener = function (listener, async) {
2552 if (async === void 0) { async = false; }
2553 (async ? this.globalAsyncListeners : this.globalSyncListeners).delete(listener);
2554 };
2555 EventService.prototype.dispatchEvent = function (event) {
2556 var agEvent = event;
2557 if (this.gridOptionsService) {
2558 // Apply common properties to all dispatched events if this event service has had its beans set with gridOptionsService.
2559 // Note there are multiple instances of EventService that are used local to components which do not set gridOptionsService.
2560 var _a = this.gridOptionsService, api = _a.api, columnApi = _a.columnApi, context = _a.context;
2561 agEvent.api = api;
2562 agEvent.columnApi = columnApi;
2563 agEvent.context = context;
2564 }
2565 this.dispatchToListeners(agEvent, true);
2566 this.dispatchToListeners(agEvent, false);
2567 this.firedEvents[agEvent.type] = true;
2568 };
2569 EventService.prototype.dispatchEventOnce = function (event) {
2570 if (!this.firedEvents[event.type]) {
2571 this.dispatchEvent(event);
2572 }
2573 };
2574 EventService.prototype.dispatchToListeners = function (event, async) {
2575 var _this = this;
2576 var eventType = event.type;
2577 if (async && 'event' in event) {
2578 var browserEvent = event.event;
2579 if (browserEvent instanceof Event) {
2580 // AG-7893 - Persist composedPath() so that its result can still be accessed by the user asynchronously.
2581 // Within an async event handler if they call composedPath() on the event it will always return an empty [].
2582 event.eventPath = browserEvent.composedPath();
2583 }
2584 }
2585 var processEventListeners = function (listeners) { return listeners.forEach(function (listener) {
2586 if (async) {
2587 _this.dispatchAsync(function () { return listener(event); });
2588 }
2589 else {
2590 listener(event);
2591 }
2592 }); };
2593 var listeners = this.getListeners(eventType, async, false);
2594 if (listeners) {
2595 processEventListeners(listeners);
2596 }
2597 var globalListeners = async ? this.globalAsyncListeners : this.globalSyncListeners;
2598 globalListeners.forEach(function (listener) {
2599 if (async) {
2600 _this.dispatchAsync(function () { return _this.frameworkOverrides.dispatchEvent(eventType, function () { return listener(eventType, event); }, true); });
2601 }
2602 else {
2603 _this.frameworkOverrides.dispatchEvent(eventType, function () { return listener(eventType, event); }, true);
2604 }
2605 });
2606 };
2607 // this gets called inside the grid's thread, for each event that it
2608 // wants to set async. the grid then batches the events into one setTimeout()
2609 // because setTimeout() is an expensive operation. ideally we would have
2610 // each event in it's own setTimeout(), but we batch for performance.
2611 EventService.prototype.dispatchAsync = function (func) {
2612 // add to the queue for executing later in the next VM turn
2613 this.asyncFunctionsQueue.push(func);
2614 // check if timeout is already scheduled. the first time the grid calls
2615 // this within it's thread turn, this should be false, so it will schedule
2616 // the 'flush queue' method the first time it comes here. then the flag is
2617 // set to 'true' so it will know it's already scheduled for subsequent calls.
2618 if (!this.scheduled) {
2619 // if not scheduled, schedule one
2620 window.setTimeout(this.flushAsyncQueue.bind(this), 0);
2621 // mark that it is scheduled
2622 this.scheduled = true;
2623 }
2624 };
2625 // this happens in the next VM turn only, and empties the queue of events
2626 EventService.prototype.flushAsyncQueue = function () {
2627 this.scheduled = false;
2628 // we take a copy, because the event listener could be using
2629 // the grid, which would cause more events, which would be potentially
2630 // added to the queue, so safe to take a copy, the new events will
2631 // get executed in a later VM turn rather than risk updating the
2632 // queue as we are flushing it.
2633 var queueCopy = this.asyncFunctionsQueue.slice();
2634 this.asyncFunctionsQueue = [];
2635 // execute the queue
2636 queueCopy.forEach(function (func) { return func(); });
2637 };
2638 __decorate([
2639 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('loggerFactory')),
2640 __param(1, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('gridOptionsService')),
2641 __param(2, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('frameworkOverrides')),
2642 __param(3, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('globalEventListener'))
2643 ], EventService.prototype, "setBeans", null);
2644 EventService = __decorate([
2645 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('eventService')
2646 ], EventService);
2647 return EventService;
2648}());
2649
2650
2651
2652/***/ }),
2653/* 11 */
2654/***/ (function(module, __webpack_exports__, __webpack_require__) {
2655
2656"use strict";
2657__webpack_require__.r(__webpack_exports__);
2658/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Context", function() { return Context; });
2659/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreConstruct", function() { return PreConstruct; });
2660/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostConstruct", function() { return PostConstruct; });
2661/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreDestroy", function() { return PreDestroy; });
2662/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bean", function() { return Bean; });
2663/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Autowired", function() { return Autowired; });
2664/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Optional", function() { return Optional; });
2665/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qualifier", function() { return Qualifier; });
2666/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
2667/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
2668/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
2669/**
2670 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
2671 * @version v29.2.0
2672 * @link https://www.ag-grid.com/
2673 * @license MIT
2674 */
2675var __read = (undefined && undefined.__read) || function (o, n) {
2676 var m = typeof Symbol === "function" && o[Symbol.iterator];
2677 if (!m) return o;
2678 var i = m.call(o), r, ar = [], e;
2679 try {
2680 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
2681 }
2682 catch (error) { e = { error: error }; }
2683 finally {
2684 try {
2685 if (r && !r.done && (m = i["return"])) m.call(i);
2686 }
2687 finally { if (e) throw e.error; }
2688 }
2689 return ar;
2690};
2691var __spread = (undefined && undefined.__spread) || function () {
2692 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
2693 return ar;
2694};
2695
2696
2697
2698var Context = /** @class */ (function () {
2699 function Context(params, logger) {
2700 this.beanWrappers = {};
2701 this.destroyed = false;
2702 if (!params || !params.beanClasses) {
2703 return;
2704 }
2705 this.contextParams = params;
2706 this.logger = logger;
2707 this.logger.log(">> creating ag-Application Context");
2708 this.createBeans();
2709 var beanInstances = this.getBeanInstances();
2710 this.wireBeans(beanInstances);
2711 this.logger.log(">> ag-Application Context ready - component is alive");
2712 }
2713 Context.prototype.getBeanInstances = function () {
2714 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["values"])(this.beanWrappers).map(function (beanEntry) { return beanEntry.beanInstance; });
2715 };
2716 Context.prototype.createBean = function (bean, afterPreCreateCallback) {
2717 if (!bean) {
2718 throw Error("Can't wire to bean since it is null");
2719 }
2720 this.wireBeans([bean], afterPreCreateCallback);
2721 return bean;
2722 };
2723 Context.prototype.wireBeans = function (beanInstances, afterPreCreateCallback) {
2724 this.autoWireBeans(beanInstances);
2725 this.methodWireBeans(beanInstances);
2726 this.callLifeCycleMethods(beanInstances, 'preConstructMethods');
2727 // the callback sets the attributes, so the component has access to attributes
2728 // before postConstruct methods in the component are executed
2729 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["exists"])(afterPreCreateCallback)) {
2730 beanInstances.forEach(afterPreCreateCallback);
2731 }
2732 this.callLifeCycleMethods(beanInstances, 'postConstructMethods');
2733 };
2734 Context.prototype.createBeans = function () {
2735 var _this = this;
2736 // register all normal beans
2737 this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this));
2738 // register override beans, these will overwrite beans above of same name
2739 // instantiate all beans - overridden beans will be left out
2740 Object(_utils_object__WEBPACK_IMPORTED_MODULE_1__["iterateObject"])(this.beanWrappers, function (key, beanEntry) {
2741 var constructorParamsMeta;
2742 if (beanEntry.bean.__agBeanMetaData && beanEntry.bean.__agBeanMetaData.autowireMethods && beanEntry.bean.__agBeanMetaData.autowireMethods.agConstructor) {
2743 constructorParamsMeta = beanEntry.bean.__agBeanMetaData.autowireMethods.agConstructor;
2744 }
2745 var constructorParams = _this.getBeansForParameters(constructorParamsMeta, beanEntry.bean.name);
2746 var newInstance = new (beanEntry.bean.bind.apply(beanEntry.bean, __spread([null], constructorParams)));
2747 beanEntry.beanInstance = newInstance;
2748 });
2749 var createdBeanNames = Object.keys(this.beanWrappers).join(', ');
2750 this.logger.log("created beans: " + createdBeanNames);
2751 };
2752 // tslint:disable-next-line
2753 Context.prototype.createBeanWrapper = function (BeanClass) {
2754 var metaData = BeanClass.__agBeanMetaData;
2755 if (!metaData) {
2756 var beanName = void 0;
2757 if (BeanClass.prototype.constructor) {
2758 beanName = Object(_utils_function__WEBPACK_IMPORTED_MODULE_2__["getFunctionName"])(BeanClass.prototype.constructor);
2759 }
2760 else {
2761 beanName = "" + BeanClass;
2762 }
2763 console.error("Context item " + beanName + " is not a bean");
2764 return;
2765 }
2766 var beanEntry = {
2767 bean: BeanClass,
2768 beanInstance: null,
2769 beanName: metaData.beanName
2770 };
2771 this.beanWrappers[metaData.beanName] = beanEntry;
2772 };
2773 Context.prototype.autoWireBeans = function (beanInstances) {
2774 var _this = this;
2775 beanInstances.forEach(function (beanInstance) {
2776 _this.forEachMetaDataInHierarchy(beanInstance, function (metaData, beanName) {
2777 var attributes = metaData.agClassAttributes;
2778 if (!attributes) {
2779 return;
2780 }
2781 attributes.forEach(function (attribute) {
2782 var otherBean = _this.lookupBeanInstance(beanName, attribute.beanName, attribute.optional);
2783 beanInstance[attribute.attributeName] = otherBean;
2784 });
2785 });
2786 });
2787 };
2788 Context.prototype.methodWireBeans = function (beanInstances) {
2789 var _this = this;
2790 beanInstances.forEach(function (beanInstance) {
2791 _this.forEachMetaDataInHierarchy(beanInstance, function (metaData, beanName) {
2792 Object(_utils_object__WEBPACK_IMPORTED_MODULE_1__["iterateObject"])(metaData.autowireMethods, function (methodName, wireParams) {
2793 // skip constructor, as this is dealt with elsewhere
2794 if (methodName === "agConstructor") {
2795 return;
2796 }
2797 var initParams = _this.getBeansForParameters(wireParams, beanName);
2798 beanInstance[methodName].apply(beanInstance, initParams);
2799 });
2800 });
2801 });
2802 };
2803 Context.prototype.forEachMetaDataInHierarchy = function (beanInstance, callback) {
2804 var prototype = Object.getPrototypeOf(beanInstance);
2805 while (prototype != null) {
2806 var constructor = prototype.constructor;
2807 if (constructor.hasOwnProperty('__agBeanMetaData')) {
2808 var metaData = constructor.__agBeanMetaData;
2809 var beanName = this.getBeanName(constructor);
2810 callback(metaData, beanName);
2811 }
2812 prototype = Object.getPrototypeOf(prototype);
2813 }
2814 };
2815 Context.prototype.getBeanName = function (constructor) {
2816 if (constructor.__agBeanMetaData && constructor.__agBeanMetaData.beanName) {
2817 return constructor.__agBeanMetaData.beanName;
2818 }
2819 var constructorString = constructor.toString();
2820 var beanName = constructorString.substring(9, constructorString.indexOf("("));
2821 return beanName;
2822 };
2823 Context.prototype.getBeansForParameters = function (parameters, beanName) {
2824 var _this = this;
2825 var beansList = [];
2826 if (parameters) {
2827 Object(_utils_object__WEBPACK_IMPORTED_MODULE_1__["iterateObject"])(parameters, function (paramIndex, otherBeanName) {
2828 var otherBean = _this.lookupBeanInstance(beanName, otherBeanName);
2829 beansList[Number(paramIndex)] = otherBean;
2830 });
2831 }
2832 return beansList;
2833 };
2834 Context.prototype.lookupBeanInstance = function (wiringBean, beanName, optional) {
2835 if (optional === void 0) { optional = false; }
2836 if (beanName === "context") {
2837 return this;
2838 }
2839 if (this.contextParams.providedBeanInstances && this.contextParams.providedBeanInstances.hasOwnProperty(beanName)) {
2840 return this.contextParams.providedBeanInstances[beanName];
2841 }
2842 var beanEntry = this.beanWrappers[beanName];
2843 if (beanEntry) {
2844 return beanEntry.beanInstance;
2845 }
2846 if (!optional) {
2847 console.error("AG Grid: unable to find bean reference " + beanName + " while initialising " + wiringBean);
2848 }
2849 return null;
2850 };
2851 Context.prototype.callLifeCycleMethods = function (beanInstances, lifeCycleMethod) {
2852 var _this = this;
2853 beanInstances.forEach(function (beanInstance) { return _this.callLifeCycleMethodsOnBean(beanInstance, lifeCycleMethod); });
2854 };
2855 Context.prototype.callLifeCycleMethodsOnBean = function (beanInstance, lifeCycleMethod, methodToIgnore) {
2856 // putting all methods into a map removes duplicates
2857 var allMethods = {};
2858 // dump methods from each level of the metadata hierarchy
2859 this.forEachMetaDataInHierarchy(beanInstance, function (metaData) {
2860 var methods = metaData[lifeCycleMethod];
2861 if (methods) {
2862 methods.forEach(function (methodName) {
2863 if (methodName != methodToIgnore) {
2864 allMethods[methodName] = true;
2865 }
2866 });
2867 }
2868 });
2869 var allMethodsList = Object.keys(allMethods);
2870 allMethodsList.forEach(function (methodName) { return beanInstance[methodName](); });
2871 };
2872 Context.prototype.getBean = function (name) {
2873 return this.lookupBeanInstance("getBean", name, true);
2874 };
2875 Context.prototype.destroy = function () {
2876 if (this.destroyed) {
2877 return;
2878 }
2879 this.logger.log(">> Shutting down ag-Application Context");
2880 var beanInstances = this.getBeanInstances();
2881 this.destroyBeans(beanInstances);
2882 this.contextParams.providedBeanInstances = null;
2883 this.destroyed = true;
2884 this.logger.log(">> ag-Application Context shut down - component is dead");
2885 };
2886 Context.prototype.destroyBean = function (bean) {
2887 if (!bean) {
2888 return;
2889 }
2890 this.destroyBeans([bean]);
2891 };
2892 Context.prototype.destroyBeans = function (beans) {
2893 var _this = this;
2894 if (!beans) {
2895 return [];
2896 }
2897 beans.forEach(function (bean) {
2898 _this.callLifeCycleMethodsOnBean(bean, 'preDestroyMethods', 'destroy');
2899 // call destroy() explicitly if it exists
2900 var beanAny = bean;
2901 if (typeof beanAny.destroy === 'function') {
2902 beanAny.destroy();
2903 }
2904 });
2905 return [];
2906 };
2907 return Context;
2908}());
2909
2910function PreConstruct(target, methodName, descriptor) {
2911 var props = getOrCreateProps(target.constructor);
2912 if (!props.preConstructMethods) {
2913 props.preConstructMethods = [];
2914 }
2915 props.preConstructMethods.push(methodName);
2916}
2917function PostConstruct(target, methodName, descriptor) {
2918 var props = getOrCreateProps(target.constructor);
2919 if (!props.postConstructMethods) {
2920 props.postConstructMethods = [];
2921 }
2922 props.postConstructMethods.push(methodName);
2923}
2924function PreDestroy(target, methodName, descriptor) {
2925 var props = getOrCreateProps(target.constructor);
2926 if (!props.preDestroyMethods) {
2927 props.preDestroyMethods = [];
2928 }
2929 props.preDestroyMethods.push(methodName);
2930}
2931function Bean(beanName) {
2932 return function (classConstructor) {
2933 var props = getOrCreateProps(classConstructor);
2934 props.beanName = beanName;
2935 };
2936}
2937function Autowired(name) {
2938 return function (target, propertyKey, descriptor) {
2939 autowiredFunc(target, name, false, target, propertyKey, null);
2940 };
2941}
2942function Optional(name) {
2943 return function (target, propertyKey, descriptor) {
2944 autowiredFunc(target, name, true, target, propertyKey, null);
2945 };
2946}
2947function autowiredFunc(target, name, optional, classPrototype, methodOrAttributeName, index) {
2948 if (name === null) {
2949 console.error("AG Grid: Autowired name should not be null");
2950 return;
2951 }
2952 if (typeof index === "number") {
2953 console.error("AG Grid: Autowired should be on an attribute");
2954 return;
2955 }
2956 // it's an attribute on the class
2957 var props = getOrCreateProps(target.constructor);
2958 if (!props.agClassAttributes) {
2959 props.agClassAttributes = [];
2960 }
2961 props.agClassAttributes.push({
2962 attributeName: methodOrAttributeName,
2963 beanName: name,
2964 optional: optional
2965 });
2966}
2967function Qualifier(name) {
2968 return function (classPrototype, methodOrAttributeName, index) {
2969 var constructor = typeof classPrototype == "function" ? classPrototype : classPrototype.constructor;
2970 var props;
2971 if (typeof index === "number") {
2972 // it's a parameter on a method
2973 var methodName = void 0;
2974 if (methodOrAttributeName) {
2975 props = getOrCreateProps(constructor);
2976 methodName = methodOrAttributeName;
2977 }
2978 else {
2979 props = getOrCreateProps(constructor);
2980 methodName = "agConstructor";
2981 }
2982 if (!props.autowireMethods) {
2983 props.autowireMethods = {};
2984 }
2985 if (!props.autowireMethods[methodName]) {
2986 props.autowireMethods[methodName] = {};
2987 }
2988 props.autowireMethods[methodName][index] = name;
2989 }
2990 };
2991}
2992function getOrCreateProps(target) {
2993 if (!target.hasOwnProperty("__agBeanMetaData")) {
2994 target.__agBeanMetaData = {};
2995 }
2996 return target.__agBeanMetaData;
2997}
2998
2999
3000/***/ }),
3001/* 12 */
3002/***/ (function(module, __webpack_exports__, __webpack_require__) {
3003
3004"use strict";
3005__webpack_require__.r(__webpack_exports__);
3006/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterateObject", function() { return iterateObject; });
3007/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneObject", function() { return cloneObject; });
3008/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepCloneObject", function() { return deepCloneObject; });
3009/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepCloneDefinition", function() { return deepCloneDefinition; });
3010/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getProperty", function() { return getProperty; });
3011/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setProperty", function() { return setProperty; });
3012/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copyPropertiesIfPresent", function() { return copyPropertiesIfPresent; });
3013/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copyPropertyIfPresent", function() { return copyPropertyIfPresent; });
3014/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllKeysInObjects", function() { return getAllKeysInObjects; });
3015/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllValuesInObject", function() { return getAllValuesInObject; });
3016/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeDeep", function() { return mergeDeep; });
3017/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "missingOrEmptyObject", function() { return missingOrEmptyObject; });
3018/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; });
3019/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
3020/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getValueUsingField", function() { return getValueUsingField; });
3021/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAllReferences", function() { return removeAllReferences; });
3022/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNonNullObject", function() { return isNonNullObject; });
3023/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
3024/**
3025 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3026 * @version v29.2.0
3027 * @link https://www.ag-grid.com/
3028 * @license MIT
3029 */
3030
3031function iterateObject(object, callback) {
3032 if (object == null) {
3033 return;
3034 }
3035 if (Array.isArray(object)) {
3036 object.forEach(function (value, index) { return callback("" + index, value); });
3037 }
3038 else {
3039 Object.keys(object).forEach(function (key) { return callback(key, object[key]); });
3040 }
3041}
3042function cloneObject(object) {
3043 var copy = {};
3044 var keys = Object.keys(object);
3045 for (var i = 0; i < keys.length; i++) {
3046 var key = keys[i];
3047 var value = object[key];
3048 copy[key] = value;
3049 }
3050 return copy;
3051}
3052function deepCloneObject(object) {
3053 return JSON.parse(JSON.stringify(object));
3054}
3055// returns copy of an object, doing a deep clone of any objects with that object.
3056// this is used for eg creating copies of Column Definitions, where we want to
3057// deep copy all objects, but do not want to deep copy functions (eg when user provides
3058// a function or class for colDef.cellRenderer)
3059function deepCloneDefinition(object, keysToSkip) {
3060 if (!object) {
3061 return;
3062 }
3063 var obj = object;
3064 var res = {};
3065 Object.keys(obj).forEach(function (key) {
3066 if (keysToSkip && keysToSkip.indexOf(key) >= 0) {
3067 return;
3068 }
3069 var value = obj[key];
3070 // 'simple object' means a bunch of key/value pairs, eg {filter: 'myFilter'}. it does
3071 // NOT include the following:
3072 // 1) arrays
3073 // 2) functions or classes (eg ColumnAPI instance)
3074 var sourceIsSimpleObject = isNonNullObject(value) && value.constructor === Object;
3075 if (sourceIsSimpleObject) {
3076 res[key] = deepCloneDefinition(value);
3077 }
3078 else {
3079 res[key] = value;
3080 }
3081 });
3082 return res;
3083}
3084function getProperty(object, key) {
3085 return object[key];
3086}
3087function setProperty(object, key, value) {
3088 object[key] = value;
3089}
3090/**
3091 * Will copy the specified properties from `source` into the equivalent properties on `target`, ignoring properties with
3092 * a value of `undefined`.
3093 */
3094function copyPropertiesIfPresent(source, target) {
3095 var properties = [];
3096 for (var _i = 2; _i < arguments.length; _i++) {
3097 properties[_i - 2] = arguments[_i];
3098 }
3099 properties.forEach(function (p) { return copyPropertyIfPresent(source, target, p); });
3100}
3101/**
3102 * Will copy the specified property from `source` into the equivalent property on `target`, unless the property has a
3103 * value of `undefined`. If a transformation is provided, it will be applied to the value before being set on `target`.
3104 */
3105function copyPropertyIfPresent(source, target, property, transform) {
3106 var value = getProperty(source, property);
3107 if (value !== undefined) {
3108 setProperty(target, property, transform ? transform(value) : value);
3109 }
3110}
3111function getAllKeysInObjects(objects) {
3112 var allValues = {};
3113 objects.filter(function (obj) { return obj != null; }).forEach(function (obj) {
3114 Object.keys(obj).forEach(function (key) { return allValues[key] = null; });
3115 });
3116 return Object.keys(allValues);
3117}
3118function getAllValuesInObject(obj) {
3119 if (!obj) {
3120 return [];
3121 }
3122 var anyObject = Object;
3123 if (typeof anyObject.values === 'function') {
3124 return anyObject.values(obj);
3125 }
3126 var ret = [];
3127 for (var key in obj) {
3128 if (obj.hasOwnProperty(key) && obj.propertyIsEnumerable(key)) {
3129 ret.push(obj[key]);
3130 }
3131 }
3132 return ret;
3133}
3134function mergeDeep(dest, source, copyUndefined, makeCopyOfSimpleObjects) {
3135 if (copyUndefined === void 0) { copyUndefined = true; }
3136 if (makeCopyOfSimpleObjects === void 0) { makeCopyOfSimpleObjects = false; }
3137 if (!Object(_generic__WEBPACK_IMPORTED_MODULE_0__["exists"])(source)) {
3138 return;
3139 }
3140 iterateObject(source, function (key, sourceValue) {
3141 var destValue = dest[key];
3142 if (destValue === sourceValue) {
3143 return;
3144 }
3145 // when creating params, we don't want to just copy objects over. otherwise merging ColDefs (eg DefaultColDef
3146 // and Column Types) would result in params getting shared between objects.
3147 // by putting an empty value into destValue first, it means we end up copying over values from
3148 // the source object, rather than just copying in the source object in it's entirety.
3149 if (makeCopyOfSimpleObjects) {
3150 var objectIsDueToBeCopied = destValue == null && sourceValue != null;
3151 if (objectIsDueToBeCopied) {
3152 // 'simple object' means a bunch of key/value pairs, eg {filter: 'myFilter'}, as opposed
3153 // to a Class instance (such as ColumnAPI instance).
3154 var sourceIsSimpleObject = typeof sourceValue === 'object' && sourceValue.constructor === Object;
3155 var dontCopy = sourceIsSimpleObject;
3156 if (dontCopy) {
3157 destValue = {};
3158 dest[key] = destValue;
3159 }
3160 }
3161 }
3162 if (isNonNullObject(sourceValue) && isNonNullObject(destValue) && !Array.isArray(destValue)) {
3163 mergeDeep(destValue, sourceValue, copyUndefined, makeCopyOfSimpleObjects);
3164 }
3165 else if (copyUndefined || sourceValue !== undefined) {
3166 dest[key] = sourceValue;
3167 }
3168 });
3169}
3170function missingOrEmptyObject(value) {
3171 return Object(_generic__WEBPACK_IMPORTED_MODULE_0__["missing"])(value) || Object.keys(value).length === 0;
3172}
3173function get(source, expression, defaultValue) {
3174 if (source == null) {
3175 return defaultValue;
3176 }
3177 var keys = expression.split('.');
3178 var objectToRead = source;
3179 while (keys.length > 1) {
3180 objectToRead = objectToRead[keys.shift()];
3181 if (objectToRead == null) {
3182 return defaultValue;
3183 }
3184 }
3185 var value = objectToRead[keys[0]];
3186 return value != null ? value : defaultValue;
3187}
3188function set(target, expression, value) {
3189 if (target == null) {
3190 return;
3191 }
3192 var keys = expression.split('.');
3193 var objectToUpdate = target;
3194 // Create empty objects
3195 keys.forEach(function (key, i) {
3196 if (!objectToUpdate[key]) {
3197 objectToUpdate[key] = {};
3198 }
3199 if (i < keys.length - 1) {
3200 objectToUpdate = objectToUpdate[key];
3201 }
3202 });
3203 objectToUpdate[keys[keys.length - 1]] = value;
3204}
3205function getValueUsingField(data, field, fieldContainsDots) {
3206 if (!field || !data) {
3207 return;
3208 }
3209 // if no '.', then it's not a deep value
3210 if (!fieldContainsDots) {
3211 return data[field];
3212 }
3213 // otherwise it is a deep value, so need to dig for it
3214 var fields = field.split('.');
3215 var currentObject = data;
3216 for (var i = 0; i < fields.length; i++) {
3217 if (currentObject == null) {
3218 return undefined;
3219 }
3220 currentObject = currentObject[fields[i]];
3221 }
3222 return currentObject;
3223}
3224// used by ColumnAPI and GridAPI to remove all references, so keeping grid in memory resulting in a
3225// memory leak if user is not disposing of the GridAPI or ColumnApi references
3226function removeAllReferences(obj, objectName) {
3227 Object.keys(obj).forEach(function (key) {
3228 var value = obj[key];
3229 // we want to replace all the @autowired services, which are objects. any simple types (boolean, string etc)
3230 // we don't care about
3231 if (typeof value === 'object') {
3232 obj[key] = undefined;
3233 }
3234 });
3235 var proto = Object.getPrototypeOf(obj);
3236 var properties = {};
3237 Object.keys(proto).forEach(function (key) {
3238 var value = proto[key];
3239 // leave all basic types - this is needed for GridAPI to leave the "destroyed: boolean" attribute alone
3240 if (typeof value === 'function') {
3241 var func = function () {
3242 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.");
3243 };
3244 properties[key] = { value: func, writable: true };
3245 }
3246 });
3247 Object.defineProperties(obj, properties);
3248}
3249function isNonNullObject(value) {
3250 return typeof value === 'object' && value !== null;
3251}
3252
3253
3254/***/ }),
3255/* 13 */
3256/***/ (function(module, __webpack_exports__, __webpack_require__) {
3257
3258"use strict";
3259__webpack_require__.r(__webpack_exports__);
3260/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doOnce", function() { return doOnce; });
3261/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFunctionName", function() { return getFunctionName; });
3262/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; });
3263/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "executeInAWhile", function() { return executeInAWhile; });
3264/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "executeNextVMTurn", function() { return executeNextVMTurn; });
3265/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "executeAfter", function() { return executeAfter; });
3266/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
3267/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
3268/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "waitUntil", function() { return waitUntil; });
3269/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
3270/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "callIfPresent", function() { return callIfPresent; });
3271/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
3272/**
3273 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3274 * @version v29.2.0
3275 * @link https://www.ag-grid.com/
3276 * @license MIT
3277 */
3278var doOnceFlags = {};
3279/**
3280 * If the key was passed before, then doesn't execute the func
3281 * @param {Function} func
3282 * @param {string} key
3283 */
3284function doOnce(func, key) {
3285 if (doOnceFlags[key]) {
3286 return;
3287 }
3288 func();
3289 doOnceFlags[key] = true;
3290}
3291function getFunctionName(funcConstructor) {
3292 // for every other browser in the world
3293 if (funcConstructor.name) {
3294 return funcConstructor.name;
3295 }
3296 // for the pestilence that is ie11
3297 var matches = /function\s+([^\(]+)/.exec(funcConstructor.toString());
3298 return matches && matches.length === 2 ? matches[1].trim() : null;
3299}
3300function isFunction(val) {
3301 return !!(val && val.constructor && val.call && val.apply);
3302}
3303function executeInAWhile(funcs) {
3304 executeAfter(funcs, 400);
3305}
3306var executeNextVMTurnFuncs = [];
3307var executeNextVMTurnPending = false;
3308function executeNextVMTurn(func) {
3309 executeNextVMTurnFuncs.push(func);
3310 if (executeNextVMTurnPending) {
3311 return;
3312 }
3313 executeNextVMTurnPending = true;
3314 window.setTimeout(function () {
3315 var funcsCopy = executeNextVMTurnFuncs.slice();
3316 executeNextVMTurnFuncs.length = 0;
3317 executeNextVMTurnPending = false;
3318 funcsCopy.forEach(function (func) { return func(); });
3319 }, 0);
3320}
3321function executeAfter(funcs, milliseconds) {
3322 if (milliseconds === void 0) { milliseconds = 0; }
3323 if (funcs.length > 0) {
3324 window.setTimeout(function () { return funcs.forEach(function (func) { return func(); }); }, milliseconds);
3325 }
3326}
3327/**
3328 * @param {Function} func The function to be debounced
3329 * @param {number} delay The time in ms to debounce
3330 * @return {Function} The debounced function
3331 */
3332function debounce(func, delay) {
3333 var timeout;
3334 // Calling debounce returns a new anonymous function
3335 return function () {
3336 var args = [];
3337 for (var _i = 0; _i < arguments.length; _i++) {
3338 args[_i] = arguments[_i];
3339 }
3340 var context = this;
3341 window.clearTimeout(timeout);
3342 // Set the new timeout
3343 timeout = window.setTimeout(function () {
3344 func.apply(context, args);
3345 }, delay);
3346 };
3347}
3348/**
3349 * @param {Function} func The function to be throttled
3350 * @param {number} wait The time in ms to throttle
3351 * @return {Function} The throttled function
3352 */
3353function throttle(func, wait) {
3354 var previousCall = 0;
3355 return function () {
3356 var args = [];
3357 for (var _i = 0; _i < arguments.length; _i++) {
3358 args[_i] = arguments[_i];
3359 }
3360 var context = this;
3361 var currentCall = new Date().getTime();
3362 if (currentCall - previousCall < wait) {
3363 return;
3364 }
3365 previousCall = currentCall;
3366 func.apply(context, args);
3367 };
3368}
3369function waitUntil(condition, callback, timeout, timeoutMessage) {
3370 if (timeout === void 0) { timeout = 100; }
3371 var timeStamp = new Date().getTime();
3372 var interval = null;
3373 var executed = false;
3374 var internalCallback = function () {
3375 var reachedTimeout = ((new Date().getTime()) - timeStamp) > timeout;
3376 if (condition() || reachedTimeout) {
3377 callback();
3378 executed = true;
3379 if (interval != null) {
3380 window.clearInterval(interval);
3381 interval = null;
3382 }
3383 if (reachedTimeout && timeoutMessage) {
3384 console.warn(timeoutMessage);
3385 }
3386 }
3387 };
3388 internalCallback();
3389 if (!executed) {
3390 interval = window.setInterval(internalCallback, 10);
3391 }
3392}
3393function compose() {
3394 var fns = [];
3395 for (var _i = 0; _i < arguments.length; _i++) {
3396 fns[_i] = arguments[_i];
3397 }
3398 return function (arg) { return fns.reduce(function (composed, f) { return f(composed); }, arg); };
3399}
3400function callIfPresent(func) {
3401 if (func) {
3402 func();
3403 }
3404}
3405var noop = function () { return; };
3406
3407
3408/***/ }),
3409/* 14 */
3410/***/ (function(module, __webpack_exports__, __webpack_require__) {
3411
3412"use strict";
3413__webpack_require__.r(__webpack_exports__);
3414/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleNames", function() { return ModuleNames; });
3415/**
3416 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3417 * @version v29.2.0
3418 * @link https://www.ag-grid.com/
3419 * @license MIT
3420 */
3421var ModuleNames;
3422(function (ModuleNames) {
3423 ModuleNames["CommunityCoreModule"] = "@ag-grid-community/core";
3424 // community modules
3425 ModuleNames["InfiniteRowModelModule"] = "@ag-grid-community/infinite-row-model";
3426 ModuleNames["ClientSideRowModelModule"] = "@ag-grid-community/client-side-row-model";
3427 ModuleNames["CsvExportModule"] = "@ag-grid-community/csv-export";
3428 // enterprise core - users don't need to import on this, but other enterprise modules do
3429 ModuleNames["EnterpriseCoreModule"] = "@ag-grid-enterprise/core";
3430 // enterprise modules
3431 ModuleNames["RowGroupingModule"] = "@ag-grid-enterprise/row-grouping";
3432 ModuleNames["ColumnsToolPanelModule"] = "@ag-grid-enterprise/column-tool-panel";
3433 ModuleNames["FiltersToolPanelModule"] = "@ag-grid-enterprise/filter-tool-panel";
3434 ModuleNames["MenuModule"] = "@ag-grid-enterprise/menu";
3435 ModuleNames["SetFilterModule"] = "@ag-grid-enterprise/set-filter";
3436 ModuleNames["MultiFilterModule"] = "@ag-grid-enterprise/multi-filter";
3437 ModuleNames["StatusBarModule"] = "@ag-grid-enterprise/status-bar";
3438 ModuleNames["SideBarModule"] = "@ag-grid-enterprise/side-bar";
3439 ModuleNames["RangeSelectionModule"] = "@ag-grid-enterprise/range-selection";
3440 ModuleNames["MasterDetailModule"] = "@ag-grid-enterprise/master-detail";
3441 ModuleNames["RichSelectModule"] = "@ag-grid-enterprise/rich-select";
3442 ModuleNames["GridChartsModule"] = "@ag-grid-enterprise/charts";
3443 ModuleNames["ViewportRowModelModule"] = "@ag-grid-enterprise/viewport-row-model";
3444 ModuleNames["ServerSideRowModelModule"] = "@ag-grid-enterprise/server-side-row-model";
3445 ModuleNames["ExcelExportModule"] = "@ag-grid-enterprise/excel-export";
3446 ModuleNames["ClipboardModule"] = "@ag-grid-enterprise/clipboard";
3447 ModuleNames["SparklinesModule"] = "@ag-grid-enterprise/sparklines";
3448 // framework wrappers currently don't provide beans, comps etc, so no need to be modules,
3449 // however i argue they should be as in theory they 'could' provide beans etc
3450 ModuleNames["AngularModule"] = "@ag-grid-community/angular";
3451 ModuleNames["ReactModule"] = "@ag-grid-community/react";
3452 ModuleNames["VueModule"] = "@ag-grid-community/vue";
3453 // and then this, which is definitely not a grid module, as it should not have any dependency
3454 // on the grid (ie shouldn't even reference the Module interface)
3455 // ChartsModule = "@ag-grid-community/charts-core",
3456})(ModuleNames || (ModuleNames = {}));
3457
3458
3459/***/ }),
3460/* 15 */
3461/***/ (function(module, __webpack_exports__, __webpack_require__) {
3462
3463"use strict";
3464__webpack_require__.r(__webpack_exports__);
3465/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleRegistry", function() { return ModuleRegistry; });
3466/* harmony import */ var _moduleNames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
3467/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
3468/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
3469/**
3470 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3471 * @version v29.2.0
3472 * @link https://www.ag-grid.com/
3473 * @license MIT
3474 */
3475var __read = (undefined && undefined.__read) || function (o, n) {
3476 var m = typeof Symbol === "function" && o[Symbol.iterator];
3477 if (!m) return o;
3478 var i = m.call(o), r, ar = [], e;
3479 try {
3480 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
3481 }
3482 catch (error) { e = { error: error }; }
3483 finally {
3484 try {
3485 if (r && !r.done && (m = i["return"])) m.call(i);
3486 }
3487 finally { if (e) throw e.error; }
3488 }
3489 return ar;
3490};
3491
3492
3493
3494var ModuleRegistry = /** @class */ (function () {
3495 function ModuleRegistry() {
3496 }
3497 ModuleRegistry.register = function (module, moduleBased) {
3498 if (moduleBased === void 0) { moduleBased = true; }
3499 ModuleRegistry.runVersionChecks(module);
3500 ModuleRegistry.modulesMap[module.moduleName] = module;
3501 ModuleRegistry.setModuleBased(moduleBased);
3502 };
3503 ModuleRegistry.runVersionChecks = function (module) {
3504 if (!ModuleRegistry.currentModuleVersion) {
3505 ModuleRegistry.currentModuleVersion = module.version;
3506 }
3507 if (!module.version) {
3508 console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '" + module.moduleName + "' is incompatible. Please update all modules to the same version.");
3509 }
3510 else if (module.version !== ModuleRegistry.currentModuleVersion) {
3511 console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '" + module.moduleName + "' is version " + module.version + " but the other modules are version " + this.currentModuleVersion + ". Please update all modules to the same version.");
3512 }
3513 if (module.validate) {
3514 var result = module.validate();
3515 if (!result.isValid) {
3516 var errorResult = result;
3517 console.error("AG Grid: " + errorResult.message);
3518 }
3519 }
3520 };
3521 ModuleRegistry.setModuleBased = function (moduleBased) {
3522 if (ModuleRegistry.moduleBased === undefined) {
3523 ModuleRegistry.moduleBased = moduleBased;
3524 }
3525 else {
3526 if (ModuleRegistry.moduleBased !== moduleBased) {
3527 Object(_utils_function__WEBPACK_IMPORTED_MODULE_1__["doOnce"])(function () {
3528 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.");
3529 console.warn('Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.');
3530 }, 'ModulePackageCheck');
3531 }
3532 }
3533 };
3534 /**
3535 * INTERNAL - Set if files are being served from a single UMD bundle to provide accurate enterprise upgrade steps.
3536 */
3537 ModuleRegistry.setIsBundled = function () {
3538 ModuleRegistry.isBundled = true;
3539 };
3540 // noinspection JSUnusedGlobalSymbols
3541 ModuleRegistry.registerModules = function (modules, moduleBased) {
3542 if (moduleBased === void 0) { moduleBased = true; }
3543 ModuleRegistry.setModuleBased(moduleBased);
3544 if (!modules) {
3545 return;
3546 }
3547 modules.forEach(function (module) { return ModuleRegistry.register(module, moduleBased); });
3548 };
3549 ModuleRegistry.assertRegistered = function (moduleName, reason) {
3550 var _a;
3551 if (this.isRegistered(moduleName)) {
3552 return true;
3553 }
3554 var warningKey = reason + moduleName;
3555 var warningMessage;
3556 if (ModuleRegistry.isBundled) {
3557 {
3558 warningMessage =
3559 "AG Grid: unable to use " + reason + " as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:\n \n <script src=\"https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js\"></script>\n \nFor more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise";
3560 }
3561 }
3562 else if (ModuleRegistry.moduleBased || ModuleRegistry.moduleBased === undefined) {
3563 var modName = (_a = Object.entries(_moduleNames__WEBPACK_IMPORTED_MODULE_0__["ModuleNames"]).find(function (_a) {
3564 var _b = __read(_a, 2), k = _b[0], v = _b[1];
3565 return v === moduleName;
3566 })) === null || _a === void 0 ? void 0 : _a[0];
3567 warningMessage =
3568 "AG Grid: unable to use " + reason + " as the " + modName + " is not registered. Check if you have registered the module:\n \n import { ModuleRegistry } from '@ag-grid-community/core';\n import { " + modName + " } from '" + moduleName + "';\n \n ModuleRegistry.registerModules([ " + modName + " ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/";
3569 }
3570 else {
3571 warningMessage =
3572 "AG Grid: unable to use " + reason + " as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n \n import 'ag-grid-enterprise';\n \nFor more info see: https://www.ag-grid.com/javascript-grid/packages/";
3573 }
3574 Object(_utils_function__WEBPACK_IMPORTED_MODULE_1__["doOnce"])(function () {
3575 console.warn(warningMessage);
3576 }, warningKey);
3577 return false;
3578 };
3579 ModuleRegistry.isRegistered = function (moduleName) {
3580 return !!ModuleRegistry.modulesMap[moduleName];
3581 };
3582 ModuleRegistry.getRegisteredModules = function () {
3583 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["values"])(ModuleRegistry.modulesMap);
3584 };
3585 ModuleRegistry.isPackageBased = function () {
3586 return !ModuleRegistry.moduleBased;
3587 };
3588 // having in a map a) removes duplicates and b) allows fast lookup
3589 ModuleRegistry.modulesMap = {};
3590 return ModuleRegistry;
3591}());
3592
3593
3594
3595/***/ }),
3596/* 16 */
3597/***/ (function(module, __webpack_exports__, __webpack_require__) {
3598
3599"use strict";
3600__webpack_require__.r(__webpack_exports__);
3601/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultColumnTypes", function() { return DefaultColumnTypes; });
3602/**
3603 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3604 * @version v29.2.0
3605 * @link https://www.ag-grid.com/
3606 * @license MIT
3607 */
3608var DefaultColumnTypes = {
3609 numericColumn: {
3610 headerClass: 'ag-right-aligned-header',
3611 cellClass: 'ag-right-aligned-cell'
3612 },
3613 rightAligned: {
3614 headerClass: 'ag-right-aligned-header',
3615 cellClass: 'ag-right-aligned-cell'
3616 }
3617};
3618
3619
3620/***/ }),
3621/* 17 */
3622/***/ (function(module, __webpack_exports__, __webpack_require__) {
3623
3624"use strict";
3625__webpack_require__.r(__webpack_exports__);
3626/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BeanStub", function() { return BeanStub; });
3627/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
3628/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
3629/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
3630/**
3631 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3632 * @version v29.2.0
3633 * @link https://www.ag-grid.com/
3634 * @license MIT
3635 */
3636var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
3637 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3638 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3639 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;
3640 return c > 3 && r && Object.defineProperty(target, key, r), r;
3641};
3642
3643
3644
3645var BeanStub = /** @class */ (function () {
3646 function BeanStub() {
3647 var _this = this;
3648 this.destroyFunctions = [];
3649 this.destroyed = false;
3650 // for vue 3 - prevents Vue from trying to make this (and obviously any sub classes) from being reactive
3651 // prevents vue from creating proxies for created objects and prevents identity related issues
3652 this.__v_skip = true;
3653 this.isAlive = function () { return !_this.destroyed; };
3654 }
3655 // this was a test constructor niall built, when active, it prints after 5 seconds all beans/components that are
3656 // not destroyed. to use, create a new grid, then api.destroy() before 5 seconds. then anything that gets printed
3657 // points to a bean or component that was not properly disposed of.
3658 // constructor() {
3659 // setTimeout(()=> {
3660 // if (this.isAlive()) {
3661 // let prototype: any = Object.getPrototypeOf(this);
3662 // const constructor: any = prototype.constructor;
3663 // const constructorString = constructor.toString();
3664 // const beanName = constructorString.substring(9, constructorString.indexOf("("));
3665 // console.log('is alive ' + beanName);
3666 // }
3667 // }, 5000);
3668 // }
3669 // CellComp and GridComp and override this because they get the FrameworkOverrides from the Beans bean
3670 BeanStub.prototype.getFrameworkOverrides = function () {
3671 return this.frameworkOverrides;
3672 };
3673 BeanStub.prototype.getContext = function () {
3674 return this.context;
3675 };
3676 BeanStub.prototype.destroy = function () {
3677 // let prototype: any = Object.getPrototypeOf(this);
3678 // const constructor: any = prototype.constructor;
3679 // const constructorString = constructor.toString();
3680 // const beanName = constructorString.substring(9, constructorString.indexOf("("));
3681 this.destroyFunctions.forEach(function (func) { return func(); });
3682 this.destroyFunctions.length = 0;
3683 this.destroyed = true;
3684 this.dispatchEvent({ type: BeanStub.EVENT_DESTROYED });
3685 };
3686 BeanStub.prototype.addEventListener = function (eventType, listener) {
3687 if (!this.localEventService) {
3688 this.localEventService = new _eventService__WEBPACK_IMPORTED_MODULE_0__["EventService"]();
3689 }
3690 this.localEventService.addEventListener(eventType, listener);
3691 };
3692 BeanStub.prototype.removeEventListener = function (eventType, listener) {
3693 if (this.localEventService) {
3694 this.localEventService.removeEventListener(eventType, listener);
3695 }
3696 };
3697 BeanStub.prototype.dispatchEventAsync = function (event) {
3698 var _this = this;
3699 window.setTimeout(function () { return _this.dispatchEvent(event); }, 0);
3700 };
3701 BeanStub.prototype.dispatchEvent = function (event) {
3702 if (this.localEventService) {
3703 this.localEventService.dispatchEvent(event);
3704 }
3705 };
3706 BeanStub.prototype.addManagedListener = function (object, event, listener) {
3707 var _this = this;
3708 if (this.destroyed) {
3709 return;
3710 }
3711 if (object instanceof HTMLElement) {
3712 Object(_utils_event__WEBPACK_IMPORTED_MODULE_2__["addSafePassiveEventListener"])(this.getFrameworkOverrides(), object, event, listener);
3713 }
3714 else {
3715 object.addEventListener(event, listener);
3716 }
3717 var destroyFunc = function () {
3718 object.removeEventListener(event, listener);
3719 _this.destroyFunctions = _this.destroyFunctions.filter(function (fn) { return fn !== destroyFunc; });
3720 return null;
3721 };
3722 this.destroyFunctions.push(destroyFunc);
3723 return destroyFunc;
3724 };
3725 BeanStub.prototype.addManagedPropertyListener = function (event, listener) {
3726 var _this = this;
3727 if (this.destroyed) {
3728 return;
3729 }
3730 this.gridOptionsService.addEventListener(event, listener);
3731 var destroyFunc = function () {
3732 _this.gridOptionsService.removeEventListener(event, listener);
3733 _this.destroyFunctions = _this.destroyFunctions.filter(function (fn) { return fn !== destroyFunc; });
3734 return null;
3735 };
3736 this.destroyFunctions.push(destroyFunc);
3737 return destroyFunc;
3738 };
3739 BeanStub.prototype.addDestroyFunc = function (func) {
3740 // if we are already destroyed, we execute the func now
3741 if (this.isAlive()) {
3742 this.destroyFunctions.push(func);
3743 }
3744 else {
3745 func();
3746 }
3747 };
3748 BeanStub.prototype.createManagedBean = function (bean, context) {
3749 var res = this.createBean(bean, context);
3750 this.addDestroyFunc(this.destroyBean.bind(this, bean, context));
3751 return res;
3752 };
3753 BeanStub.prototype.createBean = function (bean, context, afterPreCreateCallback) {
3754 return (context || this.getContext()).createBean(bean, afterPreCreateCallback);
3755 };
3756 BeanStub.prototype.destroyBean = function (bean, context) {
3757 return (context || this.getContext()).destroyBean(bean);
3758 };
3759 BeanStub.prototype.destroyBeans = function (beans, context) {
3760 var _this = this;
3761 if (beans) {
3762 beans.forEach(function (bean) { return _this.destroyBean(bean, context); });
3763 }
3764 return [];
3765 };
3766 BeanStub.EVENT_DESTROYED = 'destroyed';
3767 __decorate([
3768 Object(_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('frameworkOverrides')
3769 ], BeanStub.prototype, "frameworkOverrides", void 0);
3770 __decorate([
3771 Object(_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('context')
3772 ], BeanStub.prototype, "context", void 0);
3773 __decorate([
3774 Object(_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('eventService')
3775 ], BeanStub.prototype, "eventService", void 0);
3776 __decorate([
3777 Object(_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptionsService')
3778 ], BeanStub.prototype, "gridOptionsService", void 0);
3779 __decorate([
3780 Object(_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('localeService')
3781 ], BeanStub.prototype, "localeService", void 0);
3782 __decorate([
3783 Object(_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('environment')
3784 ], BeanStub.prototype, "environment", void 0);
3785 __decorate([
3786 _context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
3787 ], BeanStub.prototype, "destroy", null);
3788 return BeanStub;
3789}());
3790
3791
3792
3793/***/ }),
3794/* 18 */
3795/***/ (function(module, __webpack_exports__, __webpack_require__) {
3796
3797"use strict";
3798__webpack_require__.r(__webpack_exports__);
3799/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopPropagationForAgGrid", function() { return stopPropagationForAgGrid; });
3800/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isStopPropagationForAgGrid", function() { return isStopPropagationForAgGrid; });
3801/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEventSupported", function() { return isEventSupported; });
3802/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCtrlForEvent", function() { return getCtrlForEvent; });
3803/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isElementInEventPath", function() { return isElementInEventPath; });
3804/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEventPath", function() { return createEventPath; });
3805/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEventPath", function() { return getEventPath; });
3806/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSafePassiveEventListener", function() { return addSafePassiveEventListener; });
3807/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
3808/**
3809 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3810 * @version v29.2.0
3811 * @link https://www.ag-grid.com/
3812 * @license MIT
3813 */
3814
3815var AG_GRID_STOP_PROPAGATION = '__ag_Grid_Stop_Propagation';
3816var PASSIVE_EVENTS = ['touchstart', 'touchend', 'touchmove', 'touchcancel', 'scroll'];
3817var supports = {};
3818/**
3819 * a user once raised an issue - they said that when you opened a popup (eg context menu)
3820 * and then clicked on a selection checkbox, the popup wasn't closed. this is because the
3821 * popup listens for clicks on the body, however ag-grid WAS stopping propagation on the
3822 * checkbox clicks (so the rows didn't pick them up as row selection selection clicks).
3823 * to get around this, we have a pattern to stop propagation for the purposes of AG Grid,
3824 * but we still let the event pass back to the body.
3825 * @param {Event} event
3826 */
3827function stopPropagationForAgGrid(event) {
3828 event[AG_GRID_STOP_PROPAGATION] = true;
3829}
3830function isStopPropagationForAgGrid(event) {
3831 return event[AG_GRID_STOP_PROPAGATION] === true;
3832}
3833var isEventSupported = (function () {
3834 var tags = {
3835 select: 'input',
3836 change: 'input',
3837 submit: 'form',
3838 reset: 'form',
3839 error: 'img',
3840 load: 'img',
3841 abort: 'img'
3842 };
3843 var eventChecker = function (eventName) {
3844 if (typeof supports[eventName] === 'boolean') {
3845 return supports[eventName];
3846 }
3847 var el = document.createElement(tags[eventName] || 'div');
3848 eventName = 'on' + eventName;
3849 return supports[eventName] = (eventName in el);
3850 };
3851 return eventChecker;
3852})();
3853function getCtrlForEvent(gridOptionsService, event, type) {
3854 var sourceElement = event.target;
3855 while (sourceElement) {
3856 var renderedComp = gridOptionsService.getDomData(sourceElement, type);
3857 if (renderedComp) {
3858 return renderedComp;
3859 }
3860 sourceElement = sourceElement.parentElement;
3861 }
3862 return null;
3863}
3864function isElementInEventPath(element, event) {
3865 if (!event || !element) {
3866 return false;
3867 }
3868 return getEventPath(event).indexOf(element) >= 0;
3869}
3870function createEventPath(event) {
3871 var res = [];
3872 var pointer = event.target;
3873 while (pointer) {
3874 res.push(pointer);
3875 pointer = pointer.parentElement;
3876 }
3877 return res;
3878}
3879/**
3880 * Gets the path for a browser Event or from the target on an AG Grid Event
3881 * https://developer.mozilla.org/en-US/docs/Web/API/Event
3882 * @param {Event| { target: EventTarget }} event
3883 * @returns {EventTarget[]}
3884 */
3885function getEventPath(event) {
3886 // This can be called with either a browser event or an AG Grid Event that has a target property.
3887 var eventNoType = event;
3888 if (eventNoType.path) {
3889 return eventNoType.path;
3890 }
3891 if (eventNoType.composedPath) {
3892 return eventNoType.composedPath();
3893 }
3894 // If this is an AG Grid event build the path ourselves
3895 return createEventPath(eventNoType);
3896}
3897function addSafePassiveEventListener(frameworkOverrides, eElement, event, listener) {
3898 var isPassive = Object(_array__WEBPACK_IMPORTED_MODULE_0__["includes"])(PASSIVE_EVENTS, event);
3899 var options = isPassive ? { passive: true } : undefined;
3900 // this check is here for certain scenarios where I believe the user must be destroying
3901 // the grid somehow but continuing for it to be used
3902 if (frameworkOverrides && frameworkOverrides.addEventListener) {
3903 frameworkOverrides.addEventListener(eElement, event, listener, options);
3904 }
3905}
3906
3907
3908/***/ }),
3909/* 19 */
3910/***/ (function(module, __webpack_exports__, __webpack_require__) {
3911
3912"use strict";
3913__webpack_require__.r(__webpack_exports__);
3914/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstExistingValue", function() { return firstExistingValue; });
3915/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "existsAndNotEmpty", function() { return existsAndNotEmpty; });
3916/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; });
3917/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areEqual", function() { return areEqual; });
3918/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shallowCompare", function() { return shallowCompare; });
3919/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortNumerically", function() { return sortNumerically; });
3920/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeRepeatsFromArray", function() { return removeRepeatsFromArray; });
3921/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeFromArray", function() { return removeFromArray; });
3922/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAllFromArray", function() { return removeAllFromArray; });
3923/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertIntoArray", function() { return insertIntoArray; });
3924/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrayIntoArray", function() { return insertArrayIntoArray; });
3925/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "moveInArray", function() { return moveInArray; });
3926/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "includes", function() { return includes; });
3927/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flatten", function() { return flatten; });
3928/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pushAll", function() { return pushAll; });
3929/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toStrings", function() { return toStrings; });
3930/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEachReverse", function() { return forEachReverse; });
3931/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
3932/**
3933 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
3934 * @version v29.2.0
3935 * @link https://www.ag-grid.com/
3936 * @license MIT
3937 */
3938
3939function firstExistingValue() {
3940 var values = [];
3941 for (var _i = 0; _i < arguments.length; _i++) {
3942 values[_i] = arguments[_i];
3943 }
3944 for (var i = 0; i < values.length; i++) {
3945 var value = values[i];
3946 if (Object(_generic__WEBPACK_IMPORTED_MODULE_0__["exists"])(value)) {
3947 return value;
3948 }
3949 }
3950 return null;
3951}
3952function existsAndNotEmpty(value) {
3953 return value != null && value.length > 0;
3954}
3955function last(arr) {
3956 if (!arr || !arr.length) {
3957 return;
3958 }
3959 return arr[arr.length - 1];
3960}
3961function areEqual(a, b, comparator) {
3962 if (a == null && b == null) {
3963 return true;
3964 }
3965 return a != null &&
3966 b != null &&
3967 a.length === b.length &&
3968 a.every(function (value, index) { return comparator ? comparator(value, b[index]) : b[index] === value; });
3969}
3970/** @deprecated */
3971function shallowCompare(arr1, arr2) {
3972 return areEqual(arr1, arr2);
3973}
3974function sortNumerically(array) {
3975 return array.sort(function (a, b) { return a - b; });
3976}
3977function removeRepeatsFromArray(array, object) {
3978 if (!array) {
3979 return;
3980 }
3981 for (var index = array.length - 2; index >= 0; index--) {
3982 var thisOneMatches = array[index] === object;
3983 var nextOneMatches = array[index + 1] === object;
3984 if (thisOneMatches && nextOneMatches) {
3985 array.splice(index + 1, 1);
3986 }
3987 }
3988}
3989function removeFromArray(array, object) {
3990 var index = array.indexOf(object);
3991 if (index >= 0) {
3992 array.splice(index, 1);
3993 }
3994}
3995function removeAllFromArray(array, toRemove) {
3996 toRemove.forEach(function (item) { return removeFromArray(array, item); });
3997}
3998function insertIntoArray(array, object, toIndex) {
3999 array.splice(toIndex, 0, object);
4000}
4001function insertArrayIntoArray(dest, src, toIndex) {
4002 if (dest == null || src == null) {
4003 return;
4004 }
4005 // put items in backwards, otherwise inserted items end up in reverse order
4006 for (var i = src.length - 1; i >= 0; i--) {
4007 var item = src[i];
4008 insertIntoArray(dest, item, toIndex);
4009 }
4010}
4011function moveInArray(array, objectsToMove, toIndex) {
4012 // first take out items from the array
4013 removeAllFromArray(array, objectsToMove);
4014 // now add the objects, in same order as provided to us, that means we start at the end
4015 // as the objects will be pushed to the right as they are inserted
4016 objectsToMove.slice().reverse().forEach(function (obj) { return insertIntoArray(array, obj, toIndex); });
4017}
4018function includes(array, value) {
4019 return array.indexOf(value) > -1;
4020}
4021function flatten(arrayOfArrays) {
4022 return [].concat.apply([], arrayOfArrays);
4023}
4024function pushAll(target, source) {
4025 if (source == null || target == null) {
4026 return;
4027 }
4028 source.forEach(function (value) { return target.push(value); });
4029}
4030function toStrings(array) {
4031 return array.map(_generic__WEBPACK_IMPORTED_MODULE_0__["toStringOrNull"]);
4032}
4033function forEachReverse(list, action) {
4034 if (list == null) {
4035 return;
4036 }
4037 for (var i = list.length - 1; i >= 0; i--) {
4038 action(list[i], i);
4039 }
4040}
4041
4042
4043/***/ }),
4044/* 20 */
4045/***/ (function(module, __webpack_exports__, __webpack_require__) {
4046
4047"use strict";
4048__webpack_require__.r(__webpack_exports__);
4049/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnModel", function() { return ColumnModel; });
4050/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
4051/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
4052/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
4053/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
4054/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
4055/* harmony import */ var _groupInstanceIdCreator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29);
4056/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11);
4057/* harmony import */ var _autoGroupColService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30);
4058/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(19);
4059/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7);
4060/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31);
4061/* harmony import */ var _utils_map__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(32);
4062/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(13);
4063/* harmony import */ var _gridOptionsValidator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(22);
4064/**
4065 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
4066 * @version v29.2.0
4067 * @link https://www.ag-grid.com/
4068 * @license MIT
4069 */
4070var __extends = (undefined && undefined.__extends) || (function () {
4071 var extendStatics = function (d, b) {
4072 extendStatics = Object.setPrototypeOf ||
4073 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
4074 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
4075 return extendStatics(d, b);
4076 };
4077 return function (d, b) {
4078 extendStatics(d, b);
4079 function __() { this.constructor = d; }
4080 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4081 };
4082})();
4083var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
4084 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4085 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4086 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;
4087 return c > 3 && r && Object.defineProperty(target, key, r), r;
4088};
4089var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
4090 return function (target, key) { decorator(target, key, paramIndex); }
4091};
4092var __rest = (undefined && undefined.__rest) || function (s, e) {
4093 var t = {};
4094 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4095 t[p] = s[p];
4096 if (s != null && typeof Object.getOwnPropertySymbols === "function")
4097 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
4098 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
4099 t[p[i]] = s[p[i]];
4100 }
4101 return t;
4102};
4103var __values = (undefined && undefined.__values) || function(o) {
4104 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4105 if (m) return m.call(o);
4106 if (o && typeof o.length === "number") return {
4107 next: function () {
4108 if (o && i >= o.length) o = void 0;
4109 return { value: o && o[i++], done: !o };
4110 }
4111 };
4112 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
4113};
4114var __read = (undefined && undefined.__read) || function (o, n) {
4115 var m = typeof Symbol === "function" && o[Symbol.iterator];
4116 if (!m) return o;
4117 var i = m.call(o), r, ar = [], e;
4118 try {
4119 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
4120 }
4121 catch (error) { e = { error: error }; }
4122 finally {
4123 try {
4124 if (r && !r.done && (m = i["return"])) m.call(i);
4125 }
4126 finally { if (e) throw e.error; }
4127 }
4128 return ar;
4129};
4130var __spread = (undefined && undefined.__spread) || function () {
4131 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
4132 return ar;
4133};
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148var ColumnModel = /** @class */ (function (_super) {
4149 __extends(ColumnModel, _super);
4150 function ColumnModel() {
4151 var _this = _super !== null && _super.apply(this, arguments) || this;
4152 // header row count, based on user provided columns
4153 _this.primaryHeaderRowCount = 0;
4154 _this.secondaryHeaderRowCount = 0;
4155 // header row count, either above, or based on pivoting if we are pivoting
4156 _this.gridHeaderRowCount = 0;
4157 // leave level columns of the displayed trees
4158 _this.displayedColumnsLeft = [];
4159 _this.displayedColumnsRight = [];
4160 _this.displayedColumnsCenter = [];
4161 // all three lists above combined
4162 _this.displayedColumns = [];
4163 // for fast lookup, to see if a column or group is still displayed
4164 _this.displayedColumnsAndGroupsMap = {};
4165 // all columns to be rendered
4166 _this.viewportColumns = [];
4167 // A hash key to keep track of changes in viewport columns
4168 _this.viewportColumnsHash = '';
4169 // same as viewportColumns, except we always include columns with headerAutoHeight
4170 _this.headerViewportColumns = [];
4171 // all columns to be rendered in the centre
4172 _this.viewportColumnsCenter = [];
4173 // same as viewportColumnsCenter, except we always include columns with headerAutoHeight
4174 _this.headerViewportColumnsCenter = [];
4175 _this.autoHeightActiveAtLeastOnce = false;
4176 _this.rowGroupColumns = [];
4177 _this.valueColumns = [];
4178 _this.pivotColumns = [];
4179 _this.ready = false;
4180 _this.autoGroupsNeedBuilding = false;
4181 _this.forceRecreateAutoGroups = false;
4182 _this.pivotMode = false;
4183 _this.bodyWidth = 0;
4184 _this.leftWidth = 0;
4185 _this.rightWidth = 0;
4186 _this.bodyWidthDirty = true;
4187 _this.flexColsCalculatedAtLestOnce = false;
4188 return _this;
4189 }
4190 ColumnModel.prototype.init = function () {
4191 var _this = this;
4192 this.suppressColumnVirtualisation = this.gridOptionsService.is('suppressColumnVirtualisation');
4193 var pivotMode = this.gridOptionsService.is('pivotMode');
4194 if (this.isPivotSettingAllowed(pivotMode)) {
4195 this.pivotMode = pivotMode;
4196 }
4197 this.usingTreeData = this.gridOptionsService.isTreeData();
4198 this.addManagedPropertyListener('groupDisplayType', function () { return _this.onAutoGroupColumnDefChanged(); });
4199 this.addManagedPropertyListener('autoGroupColumnDef', function () { return _this.onAutoGroupColumnDefChanged(); });
4200 this.addManagedPropertyListener('defaultColDef', function (params) { return _this.onSharedColDefChanged(params.source); });
4201 this.addManagedPropertyListener('columnTypes', function (params) { return _this.onSharedColDefChanged(params.source); });
4202 };
4203 ColumnModel.prototype.onAutoGroupColumnDefChanged = function () {
4204 this.autoGroupsNeedBuilding = true;
4205 this.forceRecreateAutoGroups = true;
4206 this.updateGridColumns();
4207 this.updateDisplayedColumns('gridOptionsChanged');
4208 };
4209 ColumnModel.prototype.onSharedColDefChanged = function (source) {
4210 if (source === void 0) { source = 'api'; }
4211 // likewise for autoGroupCol, the default col def impacts this
4212 this.forceRecreateAutoGroups = true;
4213 this.createColumnsFromColumnDefs(true, source);
4214 };
4215 ColumnModel.prototype.setColumnDefs = function (columnDefs, source) {
4216 if (source === void 0) { source = 'api'; }
4217 var colsPreviouslyExisted = !!this.columnDefs;
4218 this.columnDefs = columnDefs;
4219 this.createColumnsFromColumnDefs(colsPreviouslyExisted, source);
4220 };
4221 ColumnModel.prototype.destroyOldColumns = function (oldTree, newTree) {
4222 var oldObjectsById = {};
4223 if (!oldTree) {
4224 return;
4225 }
4226 // add in all old columns to be destroyed
4227 this.columnUtils.depthFirstOriginalTreeSearch(null, oldTree, function (child) {
4228 oldObjectsById[child.getInstanceId()] = child;
4229 });
4230 // however we don't destroy anything in the new tree. if destroying the grid, there is no new tree
4231 if (newTree) {
4232 this.columnUtils.depthFirstOriginalTreeSearch(null, newTree, function (child) {
4233 oldObjectsById[child.getInstanceId()] = null;
4234 });
4235 }
4236 // what's left can be destroyed
4237 var colsToDestroy = Object.values(oldObjectsById).filter(function (item) { return item != null; });
4238 this.destroyBeans(colsToDestroy);
4239 };
4240 ColumnModel.prototype.destroyColumns = function () {
4241 this.destroyOldColumns(this.primaryColumnTree);
4242 this.destroyOldColumns(this.secondaryBalancedTree);
4243 this.destroyOldColumns(this.groupAutoColsBalancedTree);
4244 };
4245 ColumnModel.prototype.createColumnsFromColumnDefs = function (colsPreviouslyExisted, source) {
4246 var _this = this;
4247 if (source === void 0) { source = 'api'; }
4248 // only need to dispatch before/after events if updating columns, never if setting columns for first time
4249 var dispatchEventsFunc = colsPreviouslyExisted ? this.compareColumnStatesAndDispatchEvents(source) : undefined;
4250 // always invalidate cache on changing columns, as the column id's for the new columns
4251 // could overlap with the old id's, so the cache would return old values for new columns.
4252 this.valueCache.expire();
4253 // NOTE ==================
4254 // we should be destroying the existing columns and groups if they exist, for example, the original column
4255 // group adds a listener to the columns, it should be also removing the listeners
4256 this.autoGroupsNeedBuilding = true;
4257 var oldPrimaryColumns = this.primaryColumns;
4258 var oldPrimaryTree = this.primaryColumnTree;
4259 var balancedTreeResult = this.columnFactory.createColumnTree(this.columnDefs, true, oldPrimaryTree);
4260 this.destroyOldColumns(this.primaryColumnTree, balancedTreeResult.columnTree);
4261 this.primaryColumnTree = balancedTreeResult.columnTree;
4262 this.primaryHeaderRowCount = balancedTreeResult.treeDept + 1;
4263 this.primaryColumns = this.getColumnsFromTree(this.primaryColumnTree);
4264 this.primaryColumnsMap = {};
4265 this.primaryColumns.forEach(function (col) { return _this.primaryColumnsMap[col.getId()] = col; });
4266 this.extractRowGroupColumns(source, oldPrimaryColumns);
4267 this.extractPivotColumns(source, oldPrimaryColumns);
4268 this.extractValueColumns(source, oldPrimaryColumns);
4269 this.ready = true;
4270 // if we are showing secondary columns, then no need to update grid columns
4271 // at this point, as it's the pivot service responsibility to change these
4272 // if we are no longer pivoting (ie and need to revert back to primary, otherwise
4273 // we shouldn't be touching the primary).
4274 var gridColsNotProcessed = this.gridColsArePrimary === undefined;
4275 var processGridCols = this.gridColsArePrimary || gridColsNotProcessed;
4276 if (processGridCols) {
4277 this.updateGridColumns();
4278 if (colsPreviouslyExisted && !this.gridOptionsService.is('maintainColumnOrder')) {
4279 this.orderGridColumnsLikePrimary();
4280 }
4281 this.updateDisplayedColumns(source);
4282 this.checkViewportColumns();
4283 }
4284 // this event is not used by AG Grid, but left here for backwards compatibility,
4285 // in case applications use it
4286 this.dispatchEverythingChanged(source);
4287 if (dispatchEventsFunc) {
4288 dispatchEventsFunc();
4289 }
4290 this.dispatchNewColumnsLoaded();
4291 };
4292 ColumnModel.prototype.dispatchNewColumnsLoaded = function () {
4293 var newColumnsLoadedEvent = {
4294 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_NEW_COLUMNS_LOADED
4295 };
4296 this.eventService.dispatchEvent(newColumnsLoadedEvent);
4297 };
4298 // this event is legacy, no grid code listens to it. instead the grid listens to New Columns Loaded
4299 ColumnModel.prototype.dispatchEverythingChanged = function (source) {
4300 if (source === void 0) { source = 'api'; }
4301 var eventEverythingChanged = {
4302 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_EVERYTHING_CHANGED,
4303 source: source
4304 };
4305 this.eventService.dispatchEvent(eventEverythingChanged);
4306 };
4307 ColumnModel.prototype.orderGridColumnsLikePrimary = function () {
4308 var _this = this;
4309 var primaryColumns = this.primaryColumns;
4310 if (!primaryColumns) {
4311 return;
4312 }
4313 this.gridColumns.sort(function (colA, colB) {
4314 var primaryIndexA = primaryColumns.indexOf(colA);
4315 var primaryIndexB = primaryColumns.indexOf(colB);
4316 // if both cols are present in primary, then we just return the position,
4317 // so position is maintained.
4318 var indexAPresent = primaryIndexA >= 0;
4319 var indexBPresent = primaryIndexB >= 0;
4320 if (indexAPresent && indexBPresent) {
4321 return primaryIndexA - primaryIndexB;
4322 }
4323 if (indexAPresent) {
4324 // B is auto group column, so put B first
4325 return 1;
4326 }
4327 if (indexBPresent) {
4328 // A is auto group column, so put A first
4329 return -1;
4330 }
4331 // otherwise both A and B are auto-group columns. so we just keep the order
4332 // as they were already in.
4333 var gridIndexA = _this.gridColumns.indexOf(colA);
4334 var gridIndexB = _this.gridColumns.indexOf(colB);
4335 return gridIndexA - gridIndexB;
4336 });
4337 this.gridColumns = this.placeLockedColumns(this.gridColumns);
4338 };
4339 ColumnModel.prototype.getAllDisplayedAutoHeightCols = function () {
4340 return this.displayedAutoHeightCols;
4341 };
4342 ColumnModel.prototype.setViewport = function () {
4343 if (this.gridOptionsService.is('enableRtl')) {
4344 this.viewportLeft = this.bodyWidth - this.scrollPosition - this.scrollWidth;
4345 this.viewportRight = this.bodyWidth - this.scrollPosition;
4346 }
4347 else {
4348 this.viewportLeft = this.scrollPosition;
4349 this.viewportRight = this.scrollWidth + this.scrollPosition;
4350 }
4351 };
4352 // used by clipboard service, to know what columns to paste into
4353 ColumnModel.prototype.getDisplayedColumnsStartingAt = function (column) {
4354 var currentColumn = column;
4355 var columns = [];
4356 while (currentColumn != null) {
4357 columns.push(currentColumn);
4358 currentColumn = this.getDisplayedColAfter(currentColumn);
4359 }
4360 return columns;
4361 };
4362 // checks what columns are currently displayed due to column virtualisation. dispatches an event
4363 // if the list of columns has changed.
4364 // + setColumnWidth(), setViewportPosition(), setColumnDefs(), sizeColumnsToFit()
4365 ColumnModel.prototype.checkViewportColumns = function () {
4366 // check displayCenterColumnTree exists first, as it won't exist when grid is initialising
4367 if (this.displayedColumnsCenter == null) {
4368 return;
4369 }
4370 var viewportColumnsChanged = this.extractViewport();
4371 if (!viewportColumnsChanged) {
4372 return;
4373 }
4374 var event = {
4375 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_VIRTUAL_COLUMNS_CHANGED
4376 };
4377 this.eventService.dispatchEvent(event);
4378 };
4379 ColumnModel.prototype.setViewportPosition = function (scrollWidth, scrollPosition) {
4380 if (scrollWidth !== this.scrollWidth || scrollPosition !== this.scrollPosition || this.bodyWidthDirty) {
4381 this.scrollWidth = scrollWidth;
4382 this.scrollPosition = scrollPosition;
4383 // we need to call setVirtualViewportLeftAndRight() at least once after the body width changes,
4384 // as the viewport can stay the same, but in RTL, if body width changes, we need to work out the
4385 // virtual columns again
4386 this.bodyWidthDirty = true;
4387 this.setViewport();
4388 if (this.ready) {
4389 this.checkViewportColumns();
4390 }
4391 }
4392 };
4393 ColumnModel.prototype.isPivotMode = function () {
4394 return this.pivotMode;
4395 };
4396 ColumnModel.prototype.isPivotSettingAllowed = function (pivot) {
4397 if (pivot && this.gridOptionsService.isTreeData()) {
4398 console.warn("AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'");
4399 return false;
4400 }
4401 return true;
4402 };
4403 ColumnModel.prototype.setPivotMode = function (pivotMode, source) {
4404 if (source === void 0) { source = 'api'; }
4405 if (pivotMode === this.pivotMode || !this.isPivotSettingAllowed(this.pivotMode)) {
4406 return;
4407 }
4408 this.pivotMode = pivotMode;
4409 // we need to update grid columns to cover the scenario where user has groupDisplayType = 'custom', as
4410 // this means we don't use auto group column UNLESS we are in pivot mode (it's mandatory in pivot mode),
4411 // so need to updateGridColumn() to check it autoGroupCol needs to be added / removed
4412 this.autoGroupsNeedBuilding = true;
4413 this.updateGridColumns();
4414 this.updateDisplayedColumns(source);
4415 var event = {
4416 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED
4417 };
4418 this.eventService.dispatchEvent(event);
4419 };
4420 ColumnModel.prototype.getSecondaryPivotColumn = function (pivotKeys, valueColKey) {
4421 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.secondaryColumns)) {
4422 return null;
4423 }
4424 var valueColumnToFind = this.getPrimaryColumn(valueColKey);
4425 var foundColumn = null;
4426 this.secondaryColumns.forEach(function (column) {
4427 var thisPivotKeys = column.getColDef().pivotKeys;
4428 var pivotValueColumn = column.getColDef().pivotValueColumn;
4429 var pivotKeyMatches = Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["areEqual"])(thisPivotKeys, pivotKeys);
4430 var pivotValueMatches = pivotValueColumn === valueColumnToFind;
4431 if (pivotKeyMatches && pivotValueMatches) {
4432 foundColumn = column;
4433 }
4434 });
4435 return foundColumn;
4436 };
4437 ColumnModel.prototype.setBeans = function (loggerFactory) {
4438 this.logger = loggerFactory.create('columnModel');
4439 };
4440 ColumnModel.prototype.setFirstRightAndLastLeftPinned = function (source) {
4441 var lastLeft;
4442 var firstRight;
4443 if (this.gridOptionsService.is('enableRtl')) {
4444 lastLeft = this.displayedColumnsLeft ? this.displayedColumnsLeft[0] : null;
4445 firstRight = this.displayedColumnsRight ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["last"])(this.displayedColumnsRight) : null;
4446 }
4447 else {
4448 lastLeft = this.displayedColumnsLeft ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["last"])(this.displayedColumnsLeft) : null;
4449 firstRight = this.displayedColumnsRight ? this.displayedColumnsRight[0] : null;
4450 }
4451 this.gridColumns.forEach(function (column) {
4452 column.setLastLeftPinned(column === lastLeft, source);
4453 column.setFirstRightPinned(column === firstRight, source);
4454 });
4455 };
4456 ColumnModel.prototype.autoSizeColumns = function (params) {
4457 var _this = this;
4458 var columns = params.columns, skipHeader = params.skipHeader, skipHeaderGroups = params.skipHeaderGroups, stopAtGroup = params.stopAtGroup, _a = params.source, source = _a === void 0 ? 'api' : _a;
4459 // because of column virtualisation, we can only do this function on columns that are
4460 // actually rendered, as non-rendered columns (outside the viewport and not rendered
4461 // due to column virtualisation) are not present. this can result in all rendered columns
4462 // getting narrowed, which in turn introduces more rendered columns on the RHS which
4463 // did not get autosized in the original run, leaving the visible grid with columns on
4464 // the LHS sized, but RHS no. so we keep looping through the visible columns until
4465 // no more cols are available (rendered) to be resized
4466 // we autosize after animation frames finish in case any cell renderers need to complete first. this can
4467 // happen eg if client code is calling api.autoSizeAllColumns() straight after grid is initialised, but grid
4468 // hasn't fully drawn out all the cells yet (due to cell renderers in animation frames).
4469 this.animationFrameService.flushAllFrames();
4470 // keep track of which cols we have resized in here
4471 var columnsAutosized = [];
4472 // initialise with anything except 0 so that while loop executes at least once
4473 var changesThisTimeAround = -1;
4474 var shouldSkipHeader = skipHeader != null ? skipHeader : this.gridOptionsService.is('skipHeaderOnAutoSize');
4475 var shouldSkipHeaderGroups = skipHeaderGroups != null ? skipHeaderGroups : shouldSkipHeader;
4476 while (changesThisTimeAround !== 0) {
4477 changesThisTimeAround = 0;
4478 this.actionOnGridColumns(columns, function (column) {
4479 // if already autosized, skip it
4480 if (columnsAutosized.indexOf(column) >= 0) {
4481 return false;
4482 }
4483 // get how wide this col should be
4484 var preferredWidth = _this.autoWidthCalculator.getPreferredWidthForColumn(column, shouldSkipHeader);
4485 // preferredWidth = -1 if this col is not on the screen
4486 if (preferredWidth > 0) {
4487 var newWidth = _this.normaliseColumnWidth(column, preferredWidth);
4488 column.setActualWidth(newWidth, source);
4489 columnsAutosized.push(column);
4490 changesThisTimeAround++;
4491 }
4492 return true;
4493 }, source);
4494 }
4495 if (!shouldSkipHeaderGroups) {
4496 this.autoSizeColumnGroupsByColumns(columns, stopAtGroup);
4497 }
4498 this.dispatchColumnResizedEvent(columnsAutosized, true, 'autosizeColumns');
4499 };
4500 ColumnModel.prototype.dispatchColumnResizedEvent = function (columns, finished, source, flexColumns) {
4501 if (flexColumns === void 0) { flexColumns = null; }
4502 if (columns && columns.length) {
4503 var event_1 = {
4504 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_RESIZED,
4505 columns: columns,
4506 column: columns.length === 1 ? columns[0] : null,
4507 flexColumns: flexColumns,
4508 finished: finished,
4509 source: source
4510 };
4511 this.eventService.dispatchEvent(event_1);
4512 }
4513 };
4514 ColumnModel.prototype.dispatchColumnChangedEvent = function (type, columns, source) {
4515 var event = {
4516 type: type,
4517 columns: columns,
4518 column: (columns && columns.length == 1) ? columns[0] : null,
4519 source: source
4520 };
4521 this.eventService.dispatchEvent(event);
4522 };
4523 ColumnModel.prototype.dispatchColumnMovedEvent = function (params) {
4524 var movedColumns = params.movedColumns, source = params.source, toIndex = params.toIndex, finished = params.finished;
4525 var event = {
4526 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_MOVED,
4527 columns: movedColumns,
4528 column: movedColumns && movedColumns.length === 1 ? movedColumns[0] : null,
4529 toIndex: toIndex,
4530 finished: finished,
4531 source: source
4532 };
4533 this.eventService.dispatchEvent(event);
4534 };
4535 ColumnModel.prototype.dispatchColumnPinnedEvent = function (changedColumns, source) {
4536 if (!changedColumns.length) {
4537 return;
4538 }
4539 // if just one column, we use this, otherwise we don't include the col
4540 var column = changedColumns.length === 1 ? changedColumns[0] : null;
4541 // only include visible if it's common in all columns
4542 var pinned = this.getCommonValue(changedColumns, function (col) { return col.getPinned(); });
4543 var event = {
4544 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PINNED,
4545 // mistake in typing, 'undefined' should be allowed, as 'null' means 'not pinned'
4546 pinned: pinned != null ? pinned : null,
4547 columns: changedColumns,
4548 column: column,
4549 source: source
4550 };
4551 this.eventService.dispatchEvent(event);
4552 };
4553 ColumnModel.prototype.dispatchColumnVisibleEvent = function (changedColumns, source) {
4554 if (!changedColumns.length) {
4555 return;
4556 }
4557 // if just one column, we use this, otherwise we don't include the col
4558 var column = changedColumns.length === 1 ? changedColumns[0] : null;
4559 // only include visible if it's common in all columns
4560 var visible = this.getCommonValue(changedColumns, function (col) { return col.isVisible(); });
4561 var event = {
4562 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VISIBLE,
4563 visible: visible,
4564 columns: changedColumns,
4565 column: column,
4566 source: source
4567 };
4568 this.eventService.dispatchEvent(event);
4569 };
4570 ColumnModel.prototype.autoSizeColumn = function (key, skipHeader, source) {
4571 if (source === void 0) { source = "api"; }
4572 if (key) {
4573 this.autoSizeColumns({ columns: [key], skipHeader: skipHeader, skipHeaderGroups: true, source: source });
4574 }
4575 };
4576 ColumnModel.prototype.autoSizeColumnGroupsByColumns = function (keys, stopAtGroup) {
4577 var e_1, _a, e_2, _b;
4578 var columnGroups = new Set();
4579 var columns = this.getGridColumns(keys);
4580 columns.forEach(function (col) {
4581 var parent = col.getParent();
4582 while (parent && parent != stopAtGroup) {
4583 if (!parent.isPadding()) {
4584 columnGroups.add(parent);
4585 }
4586 parent = parent.getParent();
4587 }
4588 });
4589 var headerGroupCtrl;
4590 var resizedColumns = [];
4591 try {
4592 for (var columnGroups_1 = __values(columnGroups), columnGroups_1_1 = columnGroups_1.next(); !columnGroups_1_1.done; columnGroups_1_1 = columnGroups_1.next()) {
4593 var columnGroup = columnGroups_1_1.value;
4594 try {
4595 for (var _c = (e_2 = void 0, __values(this.ctrlsService.getHeaderRowContainerCtrls())), _d = _c.next(); !_d.done; _d = _c.next()) {
4596 var headerContainerCtrl = _d.value;
4597 headerGroupCtrl = headerContainerCtrl.getHeaderCtrlForColumn(columnGroup);
4598 if (headerGroupCtrl) {
4599 break;
4600 }
4601 }
4602 }
4603 catch (e_2_1) { e_2 = { error: e_2_1 }; }
4604 finally {
4605 try {
4606 if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
4607 }
4608 finally { if (e_2) throw e_2.error; }
4609 }
4610 if (headerGroupCtrl) {
4611 headerGroupCtrl.resizeLeafColumnsToFit();
4612 }
4613 }
4614 }
4615 catch (e_1_1) { e_1 = { error: e_1_1 }; }
4616 finally {
4617 try {
4618 if (columnGroups_1_1 && !columnGroups_1_1.done && (_a = columnGroups_1.return)) _a.call(columnGroups_1);
4619 }
4620 finally { if (e_1) throw e_1.error; }
4621 }
4622 return resizedColumns;
4623 };
4624 ColumnModel.prototype.autoSizeAllColumns = function (skipHeader, source) {
4625 if (source === void 0) { source = "api"; }
4626 var allDisplayedColumns = this.getAllDisplayedColumns();
4627 this.autoSizeColumns({ columns: allDisplayedColumns, skipHeader: skipHeader, source: source });
4628 };
4629 // Possible candidate for reuse (alot of recursive traversal duplication)
4630 ColumnModel.prototype.getColumnsFromTree = function (rootColumns) {
4631 var result = [];
4632 var recursiveFindColumns = function (childColumns) {
4633 for (var i = 0; i < childColumns.length; i++) {
4634 var child = childColumns[i];
4635 if (child instanceof _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"]) {
4636 result.push(child);
4637 }
4638 else if (child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"]) {
4639 recursiveFindColumns(child.getChildren());
4640 }
4641 }
4642 };
4643 recursiveFindColumns(rootColumns);
4644 return result;
4645 };
4646 ColumnModel.prototype.getAllDisplayedTrees = function () {
4647 if (this.displayedTreeLeft && this.displayedTreeRight && this.displayedTreeCentre) {
4648 return this.displayedTreeLeft
4649 .concat(this.displayedTreeCentre)
4650 .concat(this.displayedTreeRight);
4651 }
4652 return null;
4653 };
4654 // + columnSelectPanel
4655 ColumnModel.prototype.getPrimaryColumnTree = function () {
4656 return this.primaryColumnTree;
4657 };
4658 // + gridPanel -> for resizing the body and setting top margin
4659 ColumnModel.prototype.getHeaderRowCount = function () {
4660 return this.gridHeaderRowCount;
4661 };
4662 // + headerRenderer -> setting pinned body width
4663 ColumnModel.prototype.getDisplayedTreeLeft = function () {
4664 return this.displayedTreeLeft;
4665 };
4666 // + headerRenderer -> setting pinned body width
4667 ColumnModel.prototype.getDisplayedTreeRight = function () {
4668 return this.displayedTreeRight;
4669 };
4670 // + headerRenderer -> setting pinned body width
4671 ColumnModel.prototype.getDisplayedTreeCentre = function () {
4672 return this.displayedTreeCentre;
4673 };
4674 // gridPanel -> ensureColumnVisible
4675 ColumnModel.prototype.isColumnDisplayed = function (column) {
4676 return this.getAllDisplayedColumns().indexOf(column) >= 0;
4677 };
4678 // + csvCreator
4679 ColumnModel.prototype.getAllDisplayedColumns = function () {
4680 return this.displayedColumns;
4681 };
4682 ColumnModel.prototype.getViewportColumns = function () {
4683 return this.viewportColumns;
4684 };
4685 ColumnModel.prototype.getDisplayedLeftColumnsForRow = function (rowNode) {
4686 if (!this.colSpanActive) {
4687 return this.displayedColumnsLeft;
4688 }
4689 return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsLeft);
4690 };
4691 ColumnModel.prototype.getDisplayedRightColumnsForRow = function (rowNode) {
4692 if (!this.colSpanActive) {
4693 return this.displayedColumnsRight;
4694 }
4695 return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsRight);
4696 };
4697 ColumnModel.prototype.getDisplayedColumnsForRow = function (rowNode, displayedColumns, filterCallback, emptySpaceBeforeColumn) {
4698 var result = [];
4699 var lastConsideredCol = null;
4700 var _loop_1 = function (i) {
4701 var col = displayedColumns[i];
4702 var maxAllowedColSpan = displayedColumns.length - i;
4703 var colSpan = Math.min(col.getColSpan(rowNode), maxAllowedColSpan);
4704 var columnsToCheckFilter = [col];
4705 if (colSpan > 1) {
4706 var colsToRemove = colSpan - 1;
4707 for (var j = 1; j <= colsToRemove; j++) {
4708 columnsToCheckFilter.push(displayedColumns[i + j]);
4709 }
4710 i += colsToRemove;
4711 }
4712 // see which cols we should take out for column virtualisation
4713 var filterPasses;
4714 if (filterCallback) {
4715 // if user provided a callback, means some columns may not be in the viewport.
4716 // the user will NOT provide a callback if we are talking about pinned areas,
4717 // as pinned areas have no horizontal scroll and do not virtualise the columns.
4718 // if lots of columns, that means column spanning, and we set filterPasses = true
4719 // if one or more of the columns spanned pass the filter.
4720 filterPasses = false;
4721 columnsToCheckFilter.forEach(function (colForFilter) {
4722 if (filterCallback(colForFilter)) {
4723 filterPasses = true;
4724 }
4725 });
4726 }
4727 else {
4728 filterPasses = true;
4729 }
4730 if (filterPasses) {
4731 if (result.length === 0 && lastConsideredCol) {
4732 var gapBeforeColumn = emptySpaceBeforeColumn ? emptySpaceBeforeColumn(col) : false;
4733 if (gapBeforeColumn) {
4734 result.push(lastConsideredCol);
4735 }
4736 }
4737 result.push(col);
4738 }
4739 lastConsideredCol = col;
4740 out_i_1 = i;
4741 };
4742 var out_i_1;
4743 for (var i = 0; i < displayedColumns.length; i++) {
4744 _loop_1(i);
4745 i = out_i_1;
4746 }
4747 return result;
4748 };
4749 // + rowRenderer
4750 // if we are not column spanning, this just returns back the virtual centre columns,
4751 // however if we are column spanning, then different rows can have different virtual
4752 // columns, so we have to work out the list for each individual row.
4753 ColumnModel.prototype.getViewportCenterColumnsForRow = function (rowNode) {
4754 var _this = this;
4755 if (!this.colSpanActive) {
4756 return this.viewportColumnsCenter;
4757 }
4758 var emptySpaceBeforeColumn = function (col) {
4759 var left = col.getLeft();
4760 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(left) && left > _this.viewportLeft;
4761 };
4762 // if doing column virtualisation, then we filter based on the viewport.
4763 var filterCallback = this.suppressColumnVirtualisation ? null : this.isColumnInRowViewport.bind(this);
4764 return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsCenter, filterCallback, emptySpaceBeforeColumn);
4765 };
4766 ColumnModel.prototype.getAriaColumnIndex = function (col) {
4767 return this.getAllGridColumns().indexOf(col) + 1;
4768 };
4769 ColumnModel.prototype.isColumnInHeaderViewport = function (col) {
4770 // for headers, we never filter out autoHeaderHeight columns, if calculating
4771 if (col.isAutoHeaderHeight()) {
4772 return true;
4773 }
4774 return this.isColumnInRowViewport(col);
4775 };
4776 ColumnModel.prototype.isColumnInRowViewport = function (col) {
4777 // we never filter out autoHeight columns, as we need them in the DOM for calculating Auto Height
4778 if (col.isAutoHeight()) {
4779 return true;
4780 }
4781 var columnLeft = col.getLeft() || 0;
4782 var columnRight = columnLeft + col.getActualWidth();
4783 // adding 200 for buffer size, so some cols off viewport are rendered.
4784 // this helps horizontal scrolling so user rarely sees white space (unless
4785 // they scroll horizontally fast). however we are conservative, as the more
4786 // buffer the slower the vertical redraw speed
4787 var leftBounds = this.viewportLeft - 200;
4788 var rightBounds = this.viewportRight + 200;
4789 var columnToMuchLeft = columnLeft < leftBounds && columnRight < leftBounds;
4790 var columnToMuchRight = columnLeft > rightBounds && columnRight > rightBounds;
4791 return !columnToMuchLeft && !columnToMuchRight;
4792 };
4793 // used by:
4794 // + angularGrid -> setting pinned body width
4795 // note: this should be cached
4796 ColumnModel.prototype.getDisplayedColumnsLeftWidth = function () {
4797 return this.getWidthOfColsInList(this.displayedColumnsLeft);
4798 };
4799 // note: this should be cached
4800 ColumnModel.prototype.getDisplayedColumnsRightWidth = function () {
4801 return this.getWidthOfColsInList(this.displayedColumnsRight);
4802 };
4803 ColumnModel.prototype.updatePrimaryColumnList = function (keys, masterList, actionIsAdd, columnCallback, eventType, source) {
4804 var _this = this;
4805 if (source === void 0) { source = "api"; }
4806 if (!keys || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missingOrEmpty"])(keys)) {
4807 return;
4808 }
4809 var atLeastOne = false;
4810 keys.forEach(function (key) {
4811 var columnToAdd = _this.getPrimaryColumn(key);
4812 if (!columnToAdd) {
4813 return;
4814 }
4815 if (actionIsAdd) {
4816 if (masterList.indexOf(columnToAdd) >= 0) {
4817 return;
4818 }
4819 masterList.push(columnToAdd);
4820 }
4821 else {
4822 if (masterList.indexOf(columnToAdd) < 0) {
4823 return;
4824 }
4825 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(masterList, columnToAdd);
4826 }
4827 columnCallback(columnToAdd);
4828 atLeastOne = true;
4829 });
4830 if (!atLeastOne) {
4831 return;
4832 }
4833 if (this.autoGroupsNeedBuilding) {
4834 this.updateGridColumns();
4835 }
4836 this.updateDisplayedColumns(source);
4837 var event = {
4838 type: eventType,
4839 columns: masterList,
4840 column: masterList.length === 1 ? masterList[0] : null,
4841 source: source
4842 };
4843 this.eventService.dispatchEvent(event);
4844 };
4845 ColumnModel.prototype.setRowGroupColumns = function (colKeys, source) {
4846 if (source === void 0) { source = "api"; }
4847 this.autoGroupsNeedBuilding = true;
4848 this.setPrimaryColumnList(colKeys, this.rowGroupColumns, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, this.setRowGroupActive.bind(this), source);
4849 };
4850 ColumnModel.prototype.setRowGroupActive = function (active, column, source) {
4851 if (active === column.isRowGroupActive()) {
4852 return;
4853 }
4854 column.setRowGroupActive(active, source);
4855 if (active && !this.gridOptionsService.is('suppressRowGroupHidesColumns')) {
4856 this.setColumnVisible(column, false, source);
4857 }
4858 if (!active && !this.gridOptionsService.is('suppressMakeColumnVisibleAfterUnGroup')) {
4859 this.setColumnVisible(column, true, source);
4860 }
4861 };
4862 ColumnModel.prototype.addRowGroupColumn = function (key, source) {
4863 if (source === void 0) { source = "api"; }
4864 if (key) {
4865 this.addRowGroupColumns([key], source);
4866 }
4867 };
4868 ColumnModel.prototype.addRowGroupColumns = function (keys, source) {
4869 if (source === void 0) { source = "api"; }
4870 this.autoGroupsNeedBuilding = true;
4871 this.updatePrimaryColumnList(keys, this.rowGroupColumns, true, this.setRowGroupActive.bind(this, true), _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, source);
4872 };
4873 ColumnModel.prototype.removeRowGroupColumns = function (keys, source) {
4874 if (source === void 0) { source = "api"; }
4875 this.autoGroupsNeedBuilding = true;
4876 this.updatePrimaryColumnList(keys, this.rowGroupColumns, false, this.setRowGroupActive.bind(this, false), _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, source);
4877 };
4878 ColumnModel.prototype.removeRowGroupColumn = function (key, source) {
4879 if (source === void 0) { source = "api"; }
4880 if (key) {
4881 this.removeRowGroupColumns([key], source);
4882 }
4883 };
4884 ColumnModel.prototype.addPivotColumns = function (keys, source) {
4885 if (source === void 0) { source = "api"; }
4886 this.updatePrimaryColumnList(keys, this.pivotColumns, true, function (column) { return column.setPivotActive(true, source); }, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_CHANGED, source);
4887 };
4888 ColumnModel.prototype.setPivotColumns = function (colKeys, source) {
4889 if (source === void 0) { source = "api"; }
4890 this.setPrimaryColumnList(colKeys, this.pivotColumns, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_CHANGED, function (added, column) {
4891 column.setPivotActive(added, source);
4892 }, source);
4893 };
4894 ColumnModel.prototype.addPivotColumn = function (key, source) {
4895 if (source === void 0) { source = "api"; }
4896 this.addPivotColumns([key], source);
4897 };
4898 ColumnModel.prototype.removePivotColumns = function (keys, source) {
4899 if (source === void 0) { source = "api"; }
4900 this.updatePrimaryColumnList(keys, this.pivotColumns, false, function (column) { return column.setPivotActive(false, source); }, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_CHANGED, source);
4901 };
4902 ColumnModel.prototype.removePivotColumn = function (key, source) {
4903 if (source === void 0) { source = "api"; }
4904 this.removePivotColumns([key], source);
4905 };
4906 ColumnModel.prototype.setPrimaryColumnList = function (colKeys, masterList, eventName, columnCallback, source) {
4907 var _this = this;
4908 masterList.length = 0;
4909 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(colKeys)) {
4910 colKeys.forEach(function (key) {
4911 var column = _this.getPrimaryColumn(key);
4912 if (column) {
4913 masterList.push(column);
4914 }
4915 });
4916 }
4917 (this.primaryColumns || []).forEach(function (column) {
4918 var added = masterList.indexOf(column) >= 0;
4919 columnCallback(added, column);
4920 });
4921 if (this.autoGroupsNeedBuilding) {
4922 this.updateGridColumns();
4923 }
4924 this.updateDisplayedColumns(source);
4925 this.dispatchColumnChangedEvent(eventName, masterList, source);
4926 };
4927 ColumnModel.prototype.setValueColumns = function (colKeys, source) {
4928 if (source === void 0) { source = "api"; }
4929 this.setPrimaryColumnList(colKeys, this.valueColumns, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, this.setValueActive.bind(this), source);
4930 };
4931 ColumnModel.prototype.setValueActive = function (active, column, source) {
4932 if (active === column.isValueActive()) {
4933 return;
4934 }
4935 column.setValueActive(active, source);
4936 if (active && !column.getAggFunc()) {
4937 var initialAggFunc = this.aggFuncService.getDefaultAggFunc(column);
4938 column.setAggFunc(initialAggFunc);
4939 }
4940 };
4941 ColumnModel.prototype.addValueColumns = function (keys, source) {
4942 if (source === void 0) { source = "api"; }
4943 this.updatePrimaryColumnList(keys, this.valueColumns, true, this.setValueActive.bind(this, true), _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, source);
4944 };
4945 ColumnModel.prototype.addValueColumn = function (colKey, source) {
4946 if (source === void 0) { source = "api"; }
4947 if (colKey) {
4948 this.addValueColumns([colKey], source);
4949 }
4950 };
4951 ColumnModel.prototype.removeValueColumn = function (colKey, source) {
4952 if (source === void 0) { source = "api"; }
4953 this.removeValueColumns([colKey], source);
4954 };
4955 ColumnModel.prototype.removeValueColumns = function (keys, source) {
4956 if (source === void 0) { source = "api"; }
4957 this.updatePrimaryColumnList(keys, this.valueColumns, false, this.setValueActive.bind(this, false), _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, source);
4958 };
4959 // returns the width we can set to this col, taking into consideration min and max widths
4960 ColumnModel.prototype.normaliseColumnWidth = function (column, newWidth) {
4961 var minWidth = column.getMinWidth();
4962 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(minWidth) && newWidth < minWidth) {
4963 newWidth = minWidth;
4964 }
4965 var maxWidth = column.getMaxWidth();
4966 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(maxWidth) && column.isGreaterThanMax(newWidth)) {
4967 newWidth = maxWidth;
4968 }
4969 return newWidth;
4970 };
4971 ColumnModel.prototype.getPrimaryOrGridColumn = function (key) {
4972 var column = this.getPrimaryColumn(key);
4973 return column || this.getGridColumn(key);
4974 };
4975 ColumnModel.prototype.setColumnWidths = function (columnWidths, shiftKey, // @takeFromAdjacent - if user has 'shift' pressed, then pixels are taken from adjacent column
4976 finished, // @finished - ends up in the event, tells the user if more events are to come
4977 source) {
4978 var _this = this;
4979 if (source === void 0) { source = "api"; }
4980 var sets = [];
4981 columnWidths.forEach(function (columnWidth) {
4982 var col = _this.getPrimaryOrGridColumn(columnWidth.key);
4983 if (!col) {
4984 return;
4985 }
4986 sets.push({
4987 width: columnWidth.newWidth,
4988 ratios: [1],
4989 columns: [col]
4990 });
4991 // if user wants to do shift resize by default, then we invert the shift operation
4992 var defaultIsShift = _this.gridOptionsService.get('colResizeDefault') === 'shift';
4993 if (defaultIsShift) {
4994 shiftKey = !shiftKey;
4995 }
4996 if (shiftKey) {
4997 var otherCol = _this.getDisplayedColAfter(col);
4998 if (!otherCol) {
4999 return;
5000 }
5001 var widthDiff = col.getActualWidth() - columnWidth.newWidth;
5002 var otherColWidth = otherCol.getActualWidth() + widthDiff;
5003 sets.push({
5004 width: otherColWidth,
5005 ratios: [1],
5006 columns: [otherCol]
5007 });
5008 }
5009 });
5010 if (sets.length === 0) {
5011 return;
5012 }
5013 this.resizeColumnSets({
5014 resizeSets: sets,
5015 finished: finished,
5016 source: source
5017 });
5018 };
5019 ColumnModel.prototype.checkMinAndMaxWidthsForSet = function (columnResizeSet) {
5020 var columns = columnResizeSet.columns, width = columnResizeSet.width;
5021 // every col has a min width, so sum them all up and see if we have enough room
5022 // for all the min widths
5023 var minWidthAccumulated = 0;
5024 var maxWidthAccumulated = 0;
5025 var maxWidthActive = true;
5026 columns.forEach(function (col) {
5027 var minWidth = col.getMinWidth();
5028 minWidthAccumulated += minWidth || 0;
5029 var maxWidth = col.getMaxWidth();
5030 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(maxWidth) && maxWidth > 0) {
5031 maxWidthAccumulated += maxWidth;
5032 }
5033 else {
5034 // if at least one columns has no max width, it means the group of columns
5035 // then has no max width, as at least one column can take as much width as possible
5036 maxWidthActive = false;
5037 }
5038 });
5039 var minWidthPasses = width >= minWidthAccumulated;
5040 var maxWidthPasses = !maxWidthActive || (width <= maxWidthAccumulated);
5041 return minWidthPasses && maxWidthPasses;
5042 };
5043 // method takes sets of columns and resizes them. either all sets will be resized, or nothing
5044 // be resized. this is used for example when user tries to resize a group and holds shift key,
5045 // then both the current group (grows), and the adjacent group (shrinks), will get resized,
5046 // so that's two sets for this method.
5047 ColumnModel.prototype.resizeColumnSets = function (params) {
5048 var _this = this;
5049 var resizeSets = params.resizeSets, finished = params.finished, source = params.source;
5050 var passMinMaxCheck = !resizeSets || resizeSets.every(function (columnResizeSet) { return _this.checkMinAndMaxWidthsForSet(columnResizeSet); });
5051 if (!passMinMaxCheck) {
5052 // even though we are not going to resize beyond min/max size, we still need to dispatch event when finished
5053 if (finished) {
5054 var columns = resizeSets && resizeSets.length > 0 ? resizeSets[0].columns : null;
5055 this.dispatchColumnResizedEvent(columns, finished, source);
5056 }
5057 return; // don't resize!
5058 }
5059 var changedCols = [];
5060 var allResizedCols = [];
5061 resizeSets.forEach(function (set) {
5062 var width = set.width, columns = set.columns, ratios = set.ratios;
5063 // keep track of pixels used, and last column gets the remaining,
5064 // to cater for rounding errors, and min width adjustments
5065 var newWidths = {};
5066 var finishedCols = {};
5067 columns.forEach(function (col) { return allResizedCols.push(col); });
5068 // the loop below goes through each col. if a col exceeds it's min/max width,
5069 // it then gets set to its min/max width and the column is removed marked as 'finished'
5070 // and the calculation is done again leaving this column out. take for example columns
5071 // {A, width: 50, maxWidth: 100}
5072 // {B, width: 50}
5073 // {C, width: 50}
5074 // and then the set is set to width 600 - on the first pass the grid tries to set each column
5075 // to 200. it checks A and sees 200 > 100 and so sets the width to 100. col A is then marked
5076 // as 'finished' and the calculation is done again with the remaining cols B and C, which end up
5077 // splitting the remaining 500 pixels.
5078 var finishedColsGrew = true;
5079 var loopCount = 0;
5080 var _loop_2 = function () {
5081 loopCount++;
5082 if (loopCount > 1000) {
5083 // this should never happen, but in the future, someone might introduce a bug here,
5084 // so we stop the browser from hanging and report bug properly
5085 console.error('AG Grid: infinite loop in resizeColumnSets');
5086 return "break";
5087 }
5088 finishedColsGrew = false;
5089 var subsetCols = [];
5090 var subsetRatioTotal = 0;
5091 var pixelsToDistribute = width;
5092 columns.forEach(function (col, index) {
5093 var thisColFinished = finishedCols[col.getId()];
5094 if (thisColFinished) {
5095 pixelsToDistribute -= newWidths[col.getId()];
5096 }
5097 else {
5098 subsetCols.push(col);
5099 var ratioThisCol = ratios[index];
5100 subsetRatioTotal += ratioThisCol;
5101 }
5102 });
5103 // because we are not using all of the ratios (cols can be missing),
5104 // we scale the ratio. if all columns are included, then subsetRatioTotal=1,
5105 // and so the ratioScale will be 1.
5106 var ratioScale = 1 / subsetRatioTotal;
5107 subsetCols.forEach(function (col, index) {
5108 var lastCol = index === (subsetCols.length - 1);
5109 var colNewWidth;
5110 if (lastCol) {
5111 colNewWidth = pixelsToDistribute;
5112 }
5113 else {
5114 colNewWidth = Math.round(ratios[index] * width * ratioScale);
5115 pixelsToDistribute -= colNewWidth;
5116 }
5117 var minWidth = col.getMinWidth();
5118 var maxWidth = col.getMaxWidth();
5119 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(minWidth) && colNewWidth < minWidth) {
5120 colNewWidth = minWidth;
5121 finishedCols[col.getId()] = true;
5122 finishedColsGrew = true;
5123 }
5124 else if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(maxWidth) && maxWidth > 0 && colNewWidth > maxWidth) {
5125 colNewWidth = maxWidth;
5126 finishedCols[col.getId()] = true;
5127 finishedColsGrew = true;
5128 }
5129 newWidths[col.getId()] = colNewWidth;
5130 });
5131 };
5132 while (finishedColsGrew) {
5133 var state_1 = _loop_2();
5134 if (state_1 === "break")
5135 break;
5136 }
5137 columns.forEach(function (col) {
5138 var newWidth = newWidths[col.getId()];
5139 var actualWidth = col.getActualWidth();
5140 if (actualWidth !== newWidth) {
5141 col.setActualWidth(newWidth, source);
5142 changedCols.push(col);
5143 }
5144 });
5145 });
5146 // if no cols changed, then no need to update more or send event.
5147 var atLeastOneColChanged = changedCols.length > 0;
5148 var flexedCols = [];
5149 if (atLeastOneColChanged) {
5150 flexedCols = this.refreshFlexedColumns({ resizingCols: allResizedCols, skipSetLeft: true });
5151 this.setLeftValues(source);
5152 this.updateBodyWidths();
5153 this.checkViewportColumns();
5154 }
5155 // check for change first, to avoid unnecessary firing of events
5156 // however we always dispatch 'finished' events. this is important
5157 // when groups are resized, as if the group is changing slowly,
5158 // eg 1 pixel at a time, then each change will dispatch change events
5159 // in all the columns in the group, but only one with get the pixel.
5160 var colsForEvent = allResizedCols.concat(flexedCols);
5161 if (atLeastOneColChanged || finished) {
5162 this.dispatchColumnResizedEvent(colsForEvent, finished, source, flexedCols);
5163 }
5164 };
5165 ColumnModel.prototype.setColumnAggFunc = function (key, aggFunc, source) {
5166 if (source === void 0) { source = "api"; }
5167 if (!key) {
5168 return;
5169 }
5170 var column = this.getPrimaryColumn(key);
5171 if (!column) {
5172 return;
5173 }
5174 column.setAggFunc(aggFunc);
5175 this.dispatchColumnChangedEvent(_events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, [column], source);
5176 };
5177 ColumnModel.prototype.moveRowGroupColumn = function (fromIndex, toIndex, source) {
5178 if (source === void 0) { source = "api"; }
5179 var column = this.rowGroupColumns[fromIndex];
5180 this.rowGroupColumns.splice(fromIndex, 1);
5181 this.rowGroupColumns.splice(toIndex, 0, column);
5182 var event = {
5183 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED,
5184 columns: this.rowGroupColumns,
5185 column: this.rowGroupColumns.length === 1 ? this.rowGroupColumns[0] : null,
5186 source: source
5187 };
5188 this.eventService.dispatchEvent(event);
5189 };
5190 ColumnModel.prototype.moveColumns = function (columnsToMoveKeys, toIndex, source, finished) {
5191 if (source === void 0) { source = "api"; }
5192 if (finished === void 0) { finished = true; }
5193 this.columnAnimationService.start();
5194 if (toIndex > this.gridColumns.length - columnsToMoveKeys.length) {
5195 console.warn('AG Grid: tried to insert columns in invalid location, toIndex = ' + toIndex);
5196 console.warn('AG Grid: remember that you should not count the moving columns when calculating the new index');
5197 return;
5198 }
5199 // we want to pull all the columns out first and put them into an ordered list
5200 var movedColumns = this.getGridColumns(columnsToMoveKeys);
5201 var failedRules = !this.doesMovePassRules(movedColumns, toIndex);
5202 if (failedRules) {
5203 return;
5204 }
5205 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["moveInArray"])(this.gridColumns, movedColumns, toIndex);
5206 this.updateDisplayedColumns(source);
5207 this.dispatchColumnMovedEvent({ movedColumns: movedColumns, source: source, toIndex: toIndex, finished: finished });
5208 this.columnAnimationService.finish();
5209 };
5210 ColumnModel.prototype.doesMovePassRules = function (columnsToMove, toIndex) {
5211 // make a copy of what the grid columns would look like after the move
5212 var proposedColumnOrder = this.getProposedColumnOrder(columnsToMove, toIndex);
5213 return this.doesOrderPassRules(proposedColumnOrder);
5214 };
5215 ColumnModel.prototype.doesOrderPassRules = function (gridOrder) {
5216 if (!this.doesMovePassMarryChildren(gridOrder)) {
5217 return false;
5218 }
5219 if (!this.doesMovePassLockedPositions(gridOrder)) {
5220 return false;
5221 }
5222 return true;
5223 };
5224 ColumnModel.prototype.getProposedColumnOrder = function (columnsToMove, toIndex) {
5225 var proposedColumnOrder = this.gridColumns.slice();
5226 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["moveInArray"])(proposedColumnOrder, columnsToMove, toIndex);
5227 return proposedColumnOrder;
5228 };
5229 // returns the provided cols sorted in same order as they appear in grid columns. eg if grid columns
5230 // contains [a,b,c,d,e] and col passed is [e,a] then the passed cols are sorted into [a,e]
5231 ColumnModel.prototype.sortColumnsLikeGridColumns = function (cols) {
5232 var _this = this;
5233 if (!cols || cols.length <= 1) {
5234 return;
5235 }
5236 var notAllColsInGridColumns = cols.filter(function (c) { return _this.gridColumns.indexOf(c) < 0; }).length > 0;
5237 if (notAllColsInGridColumns) {
5238 return;
5239 }
5240 cols.sort(function (a, b) {
5241 var indexA = _this.gridColumns.indexOf(a);
5242 var indexB = _this.gridColumns.indexOf(b);
5243 return indexA - indexB;
5244 });
5245 };
5246 ColumnModel.prototype.doesMovePassLockedPositions = function (proposedColumnOrder) {
5247 // Placement is a number indicating 'left' 'center' or 'right' as 0 1 2
5248 var lastPlacement = 0;
5249 var rulePassed = true;
5250 var lockPositionToPlacement = function (position) {
5251 if (!position) { // false or undefined
5252 return 1;
5253 }
5254 if (position === true) {
5255 return 0;
5256 }
5257 return position === 'left' ? 0 : 2; // Otherwise 'right'
5258 };
5259 proposedColumnOrder.forEach(function (col) {
5260 var placement = lockPositionToPlacement(col.getColDef().lockPosition);
5261 if (placement < lastPlacement) { // If placement goes down, we're not in the correct order
5262 rulePassed = false;
5263 }
5264 lastPlacement = placement;
5265 });
5266 return rulePassed;
5267 };
5268 ColumnModel.prototype.doesMovePassMarryChildren = function (allColumnsCopy) {
5269 var rulePassed = true;
5270 this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (child) {
5271 if (!(child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"])) {
5272 return;
5273 }
5274 var columnGroup = child;
5275 var colGroupDef = columnGroup.getColGroupDef();
5276 var marryChildren = colGroupDef && colGroupDef.marryChildren;
5277 if (!marryChildren) {
5278 return;
5279 }
5280 var newIndexes = [];
5281 columnGroup.getLeafColumns().forEach(function (col) {
5282 var newColIndex = allColumnsCopy.indexOf(col);
5283 newIndexes.push(newColIndex);
5284 });
5285 var maxIndex = Math.max.apply(Math, newIndexes);
5286 var minIndex = Math.min.apply(Math, newIndexes);
5287 // spread is how far the first column in this group is away from the last column
5288 var spread = maxIndex - minIndex;
5289 var maxSpread = columnGroup.getLeafColumns().length - 1;
5290 // if the columns
5291 if (spread > maxSpread) {
5292 rulePassed = false;
5293 }
5294 // console.log(`maxIndex = ${maxIndex}, minIndex = ${minIndex}, spread = ${spread}, maxSpread = ${maxSpread}, fail = ${spread > (count-1)}`)
5295 // console.log(allColumnsCopy.map( col => col.getColDef().field).join(','));
5296 });
5297 return rulePassed;
5298 };
5299 ColumnModel.prototype.moveColumn = function (key, toIndex, source) {
5300 if (source === void 0) { source = "api"; }
5301 this.moveColumns([key], toIndex, source);
5302 };
5303 ColumnModel.prototype.moveColumnByIndex = function (fromIndex, toIndex, source) {
5304 if (source === void 0) { source = "api"; }
5305 var column = this.gridColumns[fromIndex];
5306 this.moveColumn(column, toIndex, source);
5307 };
5308 ColumnModel.prototype.getColumnDefs = function () {
5309 var _this = this;
5310 if (!this.primaryColumns) {
5311 return;
5312 }
5313 var cols = this.primaryColumns.slice();
5314 if (this.gridColsArePrimary) {
5315 cols.sort(function (a, b) { return _this.gridColumns.indexOf(a) - _this.gridColumns.indexOf(b); });
5316 }
5317 else if (this.lastPrimaryOrder) {
5318 cols.sort(function (a, b) { return _this.lastPrimaryOrder.indexOf(a) - _this.lastPrimaryOrder.indexOf(b); });
5319 }
5320 return this.columnDefFactory.buildColumnDefs(cols, this.rowGroupColumns, this.pivotColumns);
5321 };
5322 // used by:
5323 // + angularGrid -> for setting body width
5324 // + rowController -> setting main row widths (when inserting and resizing)
5325 // need to cache this
5326 ColumnModel.prototype.getBodyContainerWidth = function () {
5327 return this.bodyWidth;
5328 };
5329 ColumnModel.prototype.getContainerWidth = function (pinned) {
5330 switch (pinned) {
5331 case 'left':
5332 return this.leftWidth;
5333 case 'right':
5334 return this.rightWidth;
5335 default:
5336 return this.bodyWidth;
5337 }
5338 };
5339 // after setColumnWidth or updateGroupsAndDisplayedColumns
5340 ColumnModel.prototype.updateBodyWidths = function () {
5341 var newBodyWidth = this.getWidthOfColsInList(this.displayedColumnsCenter);
5342 var newLeftWidth = this.getWidthOfColsInList(this.displayedColumnsLeft);
5343 var newRightWidth = this.getWidthOfColsInList(this.displayedColumnsRight);
5344 // this is used by virtual col calculation, for RTL only, as a change to body width can impact displayed
5345 // columns, due to RTL inverting the y coordinates
5346 this.bodyWidthDirty = this.bodyWidth !== newBodyWidth;
5347 var atLeastOneChanged = this.bodyWidth !== newBodyWidth || this.leftWidth !== newLeftWidth || this.rightWidth !== newRightWidth;
5348 if (atLeastOneChanged) {
5349 this.bodyWidth = newBodyWidth;
5350 this.leftWidth = newLeftWidth;
5351 this.rightWidth = newRightWidth;
5352 // when this fires, it is picked up by the gridPanel, which ends up in
5353 // gridPanel calling setWidthAndScrollPosition(), which in turn calls setViewportPosition()
5354 var event_2 = {
5355 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,
5356 };
5357 this.eventService.dispatchEvent(event_2);
5358 }
5359 };
5360 // + rowController
5361 ColumnModel.prototype.getValueColumns = function () {
5362 return this.valueColumns ? this.valueColumns : [];
5363 };
5364 // + rowController
5365 ColumnModel.prototype.getPivotColumns = function () {
5366 return this.pivotColumns ? this.pivotColumns : [];
5367 };
5368 // + clientSideRowModel
5369 ColumnModel.prototype.isPivotActive = function () {
5370 return this.pivotColumns && this.pivotColumns.length > 0 && this.pivotMode;
5371 };
5372 // + toolPanel
5373 ColumnModel.prototype.getRowGroupColumns = function () {
5374 return this.rowGroupColumns ? this.rowGroupColumns : [];
5375 };
5376 // + rowController -> while inserting rows
5377 ColumnModel.prototype.getDisplayedCenterColumns = function () {
5378 return this.displayedColumnsCenter;
5379 };
5380 // + rowController -> while inserting rows
5381 ColumnModel.prototype.getDisplayedLeftColumns = function () {
5382 return this.displayedColumnsLeft;
5383 };
5384 ColumnModel.prototype.getDisplayedRightColumns = function () {
5385 return this.displayedColumnsRight;
5386 };
5387 ColumnModel.prototype.getDisplayedColumns = function (type) {
5388 switch (type) {
5389 case 'left':
5390 return this.getDisplayedLeftColumns();
5391 case 'right':
5392 return this.getDisplayedRightColumns();
5393 default:
5394 return this.getDisplayedCenterColumns();
5395 }
5396 };
5397 // used by:
5398 // + clientSideRowController -> sorting, building quick filter text
5399 // + headerRenderer -> sorting (clearing icon)
5400 ColumnModel.prototype.getAllPrimaryColumns = function () {
5401 return this.primaryColumns ? this.primaryColumns.slice() : null;
5402 };
5403 ColumnModel.prototype.getSecondaryColumns = function () {
5404 return this.secondaryColumns ? this.secondaryColumns.slice() : null;
5405 };
5406 ColumnModel.prototype.getAllColumnsForQuickFilter = function () {
5407 return this.columnsForQuickFilter;
5408 };
5409 // + moveColumnController
5410 ColumnModel.prototype.getAllGridColumns = function () {
5411 return this.gridColumns;
5412 };
5413 ColumnModel.prototype.isEmpty = function () {
5414 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missingOrEmpty"])(this.gridColumns);
5415 };
5416 ColumnModel.prototype.isRowGroupEmpty = function () {
5417 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missingOrEmpty"])(this.rowGroupColumns);
5418 };
5419 ColumnModel.prototype.setColumnVisible = function (key, visible, source) {
5420 if (source === void 0) { source = "api"; }
5421 this.setColumnsVisible([key], visible, source);
5422 };
5423 ColumnModel.prototype.setColumnsVisible = function (keys, visible, source) {
5424 if (visible === void 0) { visible = false; }
5425 if (source === void 0) { source = "api"; }
5426 this.applyColumnState({
5427 state: keys.map(function (key) { return ({
5428 colId: typeof key === 'string' ? key : key.getColId(),
5429 hide: !visible,
5430 }); }),
5431 }, source);
5432 };
5433 ColumnModel.prototype.setColumnPinned = function (key, pinned, source) {
5434 if (source === void 0) { source = "api"; }
5435 if (key) {
5436 this.setColumnsPinned([key], pinned, source);
5437 }
5438 };
5439 ColumnModel.prototype.setColumnsPinned = function (keys, pinned, source) {
5440 if (source === void 0) { source = "api"; }
5441 if (this.gridOptionsService.isDomLayout('print')) {
5442 console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");
5443 return;
5444 }
5445 this.columnAnimationService.start();
5446 var actualPinned;
5447 if (pinned === true || pinned === 'left') {
5448 actualPinned = 'left';
5449 }
5450 else if (pinned === 'right') {
5451 actualPinned = 'right';
5452 }
5453 else {
5454 actualPinned = null;
5455 }
5456 this.actionOnGridColumns(keys, function (col) {
5457 if (col.getPinned() !== actualPinned) {
5458 col.setPinned(actualPinned);
5459 return true;
5460 }
5461 return false;
5462 }, source, function () {
5463 var event = {
5464 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PINNED,
5465 pinned: actualPinned,
5466 column: null,
5467 columns: null,
5468 source: source
5469 };
5470 return event;
5471 });
5472 this.columnAnimationService.finish();
5473 };
5474 // does an action on a set of columns. provides common functionality for looking up the
5475 // columns based on key, getting a list of effected columns, and then updated the event
5476 // with either one column (if it was just one col) or a list of columns
5477 // used by: autoResize, setVisible, setPinned
5478 ColumnModel.prototype.actionOnGridColumns = function (// the column keys this action will be on
5479 keys,
5480 // the action to do - if this returns false, the column was skipped
5481 // and won't be included in the event
5482 action,
5483 // should return back a column event of the right type
5484 source, createEvent) {
5485 var _this = this;
5486 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missingOrEmpty"])(keys)) {
5487 return;
5488 }
5489 var updatedColumns = [];
5490 keys.forEach(function (key) {
5491 var column = _this.getGridColumn(key);
5492 if (!column) {
5493 return;
5494 }
5495 // need to check for false with type (ie !== instead of !=)
5496 // as not returning anything (undefined) would also be false
5497 var resultOfAction = action(column);
5498 if (resultOfAction !== false) {
5499 updatedColumns.push(column);
5500 }
5501 });
5502 if (!updatedColumns.length) {
5503 return;
5504 }
5505 this.updateDisplayedColumns(source);
5506 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(createEvent) && createEvent) {
5507 var event_3 = createEvent();
5508 event_3.columns = updatedColumns;
5509 event_3.column = updatedColumns.length === 1 ? updatedColumns[0] : null;
5510 this.eventService.dispatchEvent(event_3);
5511 }
5512 };
5513 ColumnModel.prototype.getDisplayedColBefore = function (col) {
5514 var allDisplayedColumns = this.getAllDisplayedColumns();
5515 var oldIndex = allDisplayedColumns.indexOf(col);
5516 if (oldIndex > 0) {
5517 return allDisplayedColumns[oldIndex - 1];
5518 }
5519 return null;
5520 };
5521 // used by:
5522 // + rowRenderer -> for navigation
5523 ColumnModel.prototype.getDisplayedColAfter = function (col) {
5524 var allDisplayedColumns = this.getAllDisplayedColumns();
5525 var oldIndex = allDisplayedColumns.indexOf(col);
5526 if (oldIndex < (allDisplayedColumns.length - 1)) {
5527 return allDisplayedColumns[oldIndex + 1];
5528 }
5529 return null;
5530 };
5531 ColumnModel.prototype.getDisplayedGroupAfter = function (columnGroup) {
5532 return this.getDisplayedGroupAtDirection(columnGroup, 'After');
5533 };
5534 ColumnModel.prototype.getDisplayedGroupBefore = function (columnGroup) {
5535 return this.getDisplayedGroupAtDirection(columnGroup, 'Before');
5536 };
5537 ColumnModel.prototype.getDisplayedGroupAtDirection = function (columnGroup, direction) {
5538 // pick the last displayed column in this group
5539 var requiredLevel = columnGroup.getProvidedColumnGroup().getLevel() + columnGroup.getPaddingLevel();
5540 var colGroupLeafColumns = columnGroup.getDisplayedLeafColumns();
5541 var col = direction === 'After' ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["last"])(colGroupLeafColumns) : colGroupLeafColumns[0];
5542 var getDisplayColMethod = "getDisplayedCol" + direction;
5543 while (true) {
5544 // keep moving to the next col, until we get to another group
5545 var column = this[getDisplayColMethod](col);
5546 if (!column) {
5547 return null;
5548 }
5549 var groupPointer = this.getColumnGroupAtLevel(column, requiredLevel);
5550 if (groupPointer !== columnGroup) {
5551 return groupPointer;
5552 }
5553 }
5554 };
5555 ColumnModel.prototype.getColumnGroupAtLevel = function (column, level) {
5556 // get group at same level as the one we are looking for
5557 var groupPointer = column.getParent();
5558 var originalGroupLevel;
5559 var groupPointerLevel;
5560 while (true) {
5561 var groupPointerProvidedColumnGroup = groupPointer.getProvidedColumnGroup();
5562 originalGroupLevel = groupPointerProvidedColumnGroup.getLevel();
5563 groupPointerLevel = groupPointer.getPaddingLevel();
5564 if (originalGroupLevel + groupPointerLevel <= level) {
5565 break;
5566 }
5567 groupPointer = groupPointer.getParent();
5568 }
5569 return groupPointer;
5570 };
5571 ColumnModel.prototype.isPinningLeft = function () {
5572 return this.displayedColumnsLeft.length > 0;
5573 };
5574 ColumnModel.prototype.isPinningRight = function () {
5575 return this.displayedColumnsRight.length > 0;
5576 };
5577 ColumnModel.prototype.getPrimaryAndSecondaryAndAutoColumns = function () {
5578 var _a;
5579 return (_a = []).concat.apply(_a, __spread([
5580 this.primaryColumns || [],
5581 this.groupAutoColumns || [],
5582 this.secondaryColumns || [],
5583 ]));
5584 };
5585 ColumnModel.prototype.createStateItemFromColumn = function (column) {
5586 var rowGroupIndex = column.isRowGroupActive() ? this.rowGroupColumns.indexOf(column) : null;
5587 var pivotIndex = column.isPivotActive() ? this.pivotColumns.indexOf(column) : null;
5588 var aggFunc = column.isValueActive() ? column.getAggFunc() : null;
5589 var sort = column.getSort() != null ? column.getSort() : null;
5590 var sortIndex = column.getSortIndex() != null ? column.getSortIndex() : null;
5591 var flex = column.getFlex() != null && column.getFlex() > 0 ? column.getFlex() : null;
5592 var res = {
5593 colId: column.getColId(),
5594 width: column.getActualWidth(),
5595 hide: !column.isVisible(),
5596 pinned: column.getPinned(),
5597 sort: sort,
5598 sortIndex: sortIndex,
5599 aggFunc: aggFunc,
5600 rowGroup: column.isRowGroupActive(),
5601 rowGroupIndex: rowGroupIndex,
5602 pivot: column.isPivotActive(),
5603 pivotIndex: pivotIndex,
5604 flex: flex
5605 };
5606 return res;
5607 };
5608 ColumnModel.prototype.getColumnState = function () {
5609 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.primaryColumns) || !this.isAlive()) {
5610 return [];
5611 }
5612 var colsForState = this.getPrimaryAndSecondaryAndAutoColumns();
5613 var res = colsForState.map(this.createStateItemFromColumn.bind(this));
5614 this.orderColumnStateList(res);
5615 return res;
5616 };
5617 ColumnModel.prototype.orderColumnStateList = function (columnStateList) {
5618 // for fast looking, store the index of each column
5619 var colIdToGridIndexMap = Object(_utils_map__WEBPACK_IMPORTED_MODULE_11__["convertToMap"])(this.gridColumns.map(function (col, index) { return [col.getColId(), index]; }));
5620 columnStateList.sort(function (itemA, itemB) {
5621 var posA = colIdToGridIndexMap.has(itemA.colId) ? colIdToGridIndexMap.get(itemA.colId) : -1;
5622 var posB = colIdToGridIndexMap.has(itemB.colId) ? colIdToGridIndexMap.get(itemB.colId) : -1;
5623 return posA - posB;
5624 });
5625 };
5626 ColumnModel.prototype.resetColumnState = function (source) {
5627 // NOTE = there is one bug here that no customer has noticed - if a column has colDef.lockPosition,
5628 // this is ignored below when ordering the cols. to work, we should always put lockPosition cols first.
5629 // As a work around, developers should just put lockPosition columns first in their colDef list.
5630 if (source === void 0) { source = "api"; }
5631 // we can't use 'allColumns' as the order might of messed up, so get the primary ordered list
5632 var primaryColumns = this.getColumnsFromTree(this.primaryColumnTree);
5633 var columnStates = [];
5634 // we start at 1000, so if user has mix of rowGroup and group specified, it will work with both.
5635 // eg IF user has ColA.rowGroupIndex=0, ColB.rowGroupIndex=1, ColC.rowGroup=true,
5636 // THEN result will be ColA.rowGroupIndex=0, ColB.rowGroupIndex=1, ColC.rowGroup=1000
5637 var letRowGroupIndex = 1000;
5638 var letPivotIndex = 1000;
5639 var colsToProcess = [];
5640 if (this.groupAutoColumns) {
5641 colsToProcess = colsToProcess.concat(this.groupAutoColumns);
5642 }
5643 if (primaryColumns) {
5644 colsToProcess = colsToProcess.concat(primaryColumns);
5645 }
5646 colsToProcess.forEach(function (column) {
5647 var getValueOrNull = function (a, b) { return a != null ? a : b != null ? b : null; };
5648 var colDef = column.getColDef();
5649 var sort = getValueOrNull(colDef.sort, colDef.initialSort);
5650 var sortIndex = getValueOrNull(colDef.sortIndex, colDef.initialSortIndex);
5651 var hide = getValueOrNull(colDef.hide, colDef.initialHide);
5652 var pinned = getValueOrNull(colDef.pinned, colDef.initialPinned);
5653 var width = getValueOrNull(colDef.width, colDef.initialWidth);
5654 var flex = getValueOrNull(colDef.flex, colDef.initialFlex);
5655 var rowGroupIndex = getValueOrNull(colDef.rowGroupIndex, colDef.initialRowGroupIndex);
5656 var rowGroup = getValueOrNull(colDef.rowGroup, colDef.initialRowGroup);
5657 if (rowGroupIndex == null && (rowGroup == null || rowGroup == false)) {
5658 rowGroupIndex = null;
5659 rowGroup = null;
5660 }
5661 var pivotIndex = getValueOrNull(colDef.pivotIndex, colDef.initialPivotIndex);
5662 var pivot = getValueOrNull(colDef.pivot, colDef.initialPivot);
5663 if (pivotIndex == null && (pivot == null || pivot == false)) {
5664 pivotIndex = null;
5665 pivot = null;
5666 }
5667 var aggFunc = getValueOrNull(colDef.aggFunc, colDef.initialAggFunc);
5668 var stateItem = {
5669 colId: column.getColId(),
5670 sort: sort,
5671 sortIndex: sortIndex,
5672 hide: hide,
5673 pinned: pinned,
5674 width: width,
5675 flex: flex,
5676 rowGroup: rowGroup,
5677 rowGroupIndex: rowGroupIndex,
5678 pivot: pivot,
5679 pivotIndex: pivotIndex,
5680 aggFunc: aggFunc,
5681 };
5682 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(rowGroupIndex) && rowGroup) {
5683 stateItem.rowGroupIndex = letRowGroupIndex++;
5684 }
5685 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(pivotIndex) && pivot) {
5686 stateItem.pivotIndex = letPivotIndex++;
5687 }
5688 columnStates.push(stateItem);
5689 });
5690 this.applyColumnState({ state: columnStates, applyOrder: true }, source);
5691 };
5692 ColumnModel.prototype.applyColumnState = function (params, source) {
5693 var _this = this;
5694 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missingOrEmpty"])(this.primaryColumns)) {
5695 return false;
5696 }
5697 if (params && params.state && !params.state.forEach) {
5698 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.');
5699 return false;
5700 }
5701 var applyStates = function (states, existingColumns, getById) {
5702 var dispatchEventsFunc = _this.compareColumnStatesAndDispatchEvents(source);
5703 _this.autoGroupsNeedBuilding = true;
5704 // at the end below, this list will have all columns we got no state for
5705 var columnsWithNoState = existingColumns.slice();
5706 var rowGroupIndexes = {};
5707 var pivotIndexes = {};
5708 var autoGroupColumnStates = [];
5709 // If pivoting is modified, these are the states we try to reapply after
5710 // the secondary columns are re-generated
5711 var unmatchedAndAutoStates = [];
5712 var unmatchedCount = 0;
5713 var previousRowGroupCols = _this.rowGroupColumns.slice();
5714 var previousPivotCols = _this.pivotColumns.slice();
5715 states.forEach(function (state) {
5716 var colId = state.colId || '';
5717 // auto group columns are re-created so deferring syncing with ColumnState
5718 var isAutoGroupColumn = colId.startsWith(_autoGroupColService__WEBPACK_IMPORTED_MODULE_7__["GROUP_AUTO_COLUMN_ID"]);
5719 if (isAutoGroupColumn) {
5720 autoGroupColumnStates.push(state);
5721 unmatchedAndAutoStates.push(state);
5722 return;
5723 }
5724 var column = getById(colId);
5725 if (!column) {
5726 unmatchedAndAutoStates.push(state);
5727 unmatchedCount += 1;
5728 }
5729 else {
5730 _this.syncColumnWithStateItem(column, state, params.defaultState, rowGroupIndexes, pivotIndexes, false, source);
5731 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(columnsWithNoState, column);
5732 }
5733 });
5734 // anything left over, we got no data for, so add in the column as non-value, non-rowGroup and hidden
5735 var applyDefaultsFunc = function (col) {
5736 return _this.syncColumnWithStateItem(col, null, params.defaultState, rowGroupIndexes, pivotIndexes, false, source);
5737 };
5738 columnsWithNoState.forEach(applyDefaultsFunc);
5739 // sort the lists according to the indexes that were provided
5740 var comparator = function (indexes, oldList, colA, colB) {
5741 var indexA = indexes[colA.getId()];
5742 var indexB = indexes[colB.getId()];
5743 var aHasIndex = indexA != null;
5744 var bHasIndex = indexB != null;
5745 if (aHasIndex && bHasIndex) {
5746 // both a and b are new cols with index, so sort on index
5747 return indexA - indexB;
5748 }
5749 if (aHasIndex) {
5750 // a has an index, so it should be before a
5751 return -1;
5752 }
5753 if (bHasIndex) {
5754 // b has an index, so it should be before a
5755 return 1;
5756 }
5757 var oldIndexA = oldList.indexOf(colA);
5758 var oldIndexB = oldList.indexOf(colB);
5759 var aHasOldIndex = oldIndexA >= 0;
5760 var bHasOldIndex = oldIndexB >= 0;
5761 if (aHasOldIndex && bHasOldIndex) {
5762 // both a and b are old cols, so sort based on last order
5763 return oldIndexA - oldIndexB;
5764 }
5765 if (aHasOldIndex) {
5766 // a is old, b is new, so b is first
5767 return -1;
5768 }
5769 // this bit does matter, means both are new cols
5770 // but without index or that b is old and a is new
5771 return 1;
5772 };
5773 _this.rowGroupColumns.sort(comparator.bind(_this, rowGroupIndexes, previousRowGroupCols));
5774 _this.pivotColumns.sort(comparator.bind(_this, pivotIndexes, previousPivotCols));
5775 _this.updateGridColumns();
5776 // sync newly created auto group columns with ColumnState
5777 var autoGroupColsCopy = _this.groupAutoColumns ? _this.groupAutoColumns.slice() : [];
5778 autoGroupColumnStates.forEach(function (stateItem) {
5779 var autoCol = _this.getAutoColumn(stateItem.colId);
5780 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(autoGroupColsCopy, autoCol);
5781 _this.syncColumnWithStateItem(autoCol, stateItem, params.defaultState, null, null, true, source);
5782 });
5783 // autogroup cols with nothing else, apply the default
5784 autoGroupColsCopy.forEach(applyDefaultsFunc);
5785 _this.applyOrderAfterApplyState(params);
5786 _this.updateDisplayedColumns(source);
5787 _this.dispatchEverythingChanged(source);
5788 dispatchEventsFunc(); // Will trigger secondary column changes if pivoting modified
5789 return { unmatchedAndAutoStates: unmatchedAndAutoStates, unmatchedCount: unmatchedCount };
5790 };
5791 this.columnAnimationService.start();
5792 var _a = applyStates(params.state || [], this.primaryColumns || [], function (id) { return _this.getPrimaryColumn(id); }), unmatchedAndAutoStates = _a.unmatchedAndAutoStates, unmatchedCount = _a.unmatchedCount;
5793 // If there are still states left over, see if we can apply them to newly generated
5794 // secondary or auto columns. Also if defaults exist, ensure they are applied to secondary cols
5795 if (unmatchedAndAutoStates.length > 0 || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(params.defaultState)) {
5796 unmatchedCount = applyStates(unmatchedAndAutoStates, this.secondaryColumns || [], function (id) { return _this.getSecondaryColumn(id); }).unmatchedCount;
5797 }
5798 this.columnAnimationService.finish();
5799 return unmatchedCount === 0; // Successful if no states unaccounted for
5800 };
5801 ColumnModel.prototype.applyOrderAfterApplyState = function (params) {
5802 var _this = this;
5803 if (!params.applyOrder || !params.state) {
5804 return;
5805 }
5806 var newOrder = [];
5807 var processedColIds = {};
5808 params.state.forEach(function (item) {
5809 if (!item.colId || processedColIds[item.colId]) {
5810 return;
5811 }
5812 var col = _this.gridColumnsMap[item.colId];
5813 if (col) {
5814 newOrder.push(col);
5815 processedColIds[item.colId] = true;
5816 }
5817 });
5818 // add in all other columns
5819 var autoGroupInsertIndex = 0;
5820 this.gridColumns.forEach(function (col) {
5821 var colId = col.getColId();
5822 var alreadyProcessed = processedColIds[colId] != null;
5823 if (alreadyProcessed) {
5824 return;
5825 }
5826 var isAutoGroupCol = colId.startsWith(_autoGroupColService__WEBPACK_IMPORTED_MODULE_7__["GROUP_AUTO_COLUMN_ID"]);
5827 if (isAutoGroupCol) {
5828 // auto group columns, if missing from state list, are added to the start.
5829 // it's common to have autoGroup missing, as grouping could be on by default
5830 // on a column, but the user could of since removed the grouping via the UI.
5831 // if we don't inc the insert index, autoGroups will be inserted in reverse order
5832 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["insertIntoArray"])(newOrder, col, autoGroupInsertIndex++);
5833 }
5834 else {
5835 // normal columns, if missing from state list, are added at the end
5836 newOrder.push(col);
5837 }
5838 });
5839 // this is already done in updateGridColumns, however we changed the order above (to match the order of the state
5840 // columns) so we need to do it again. we could of put logic into the order above to take into account fixed
5841 // columns, however if we did then we would have logic for updating fixed columns twice. reusing the logic here
5842 // is less sexy for the code here, but it keeps consistency.
5843 newOrder = this.placeLockedColumns(newOrder);
5844 if (!this.doesMovePassMarryChildren(newOrder)) {
5845 console.warn('AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.');
5846 return;
5847 }
5848 this.gridColumns = newOrder;
5849 };
5850 ColumnModel.prototype.compareColumnStatesAndDispatchEvents = function (source) {
5851 var _this = this;
5852 var startState = {
5853 rowGroupColumns: this.rowGroupColumns.slice(),
5854 pivotColumns: this.pivotColumns.slice(),
5855 valueColumns: this.valueColumns.slice()
5856 };
5857 var columnStateBefore = this.getColumnState();
5858 var columnStateBeforeMap = {};
5859 columnStateBefore.forEach(function (col) {
5860 columnStateBeforeMap[col.colId] = col;
5861 });
5862 return function () {
5863 var colsForState = _this.getPrimaryAndSecondaryAndAutoColumns();
5864 // dispatches generic ColumnEvents where all columns are returned rather than what has changed
5865 var dispatchWhenListsDifferent = function (eventType, colsBefore, colsAfter, idMapper) {
5866 var beforeList = colsBefore.map(idMapper);
5867 var afterList = colsAfter.map(idMapper);
5868 var unchanged = Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["areEqual"])(beforeList, afterList);
5869 if (unchanged) {
5870 return;
5871 }
5872 // returning all columns rather than what has changed!
5873 var event = {
5874 type: eventType,
5875 columns: colsAfter,
5876 column: colsAfter.length === 1 ? colsAfter[0] : null,
5877 source: source
5878 };
5879 _this.eventService.dispatchEvent(event);
5880 };
5881 // determines which columns have changed according to supplied predicate
5882 var getChangedColumns = function (changedPredicate) {
5883 var changedColumns = [];
5884 colsForState.forEach(function (column) {
5885 var colStateBefore = columnStateBeforeMap[column.getColId()];
5886 if (colStateBefore && changedPredicate(colStateBefore, column)) {
5887 changedColumns.push(column);
5888 }
5889 });
5890 return changedColumns;
5891 };
5892 var columnIdMapper = function (c) { return c.getColId(); };
5893 dispatchWhenListsDifferent(_events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, startState.rowGroupColumns, _this.rowGroupColumns, columnIdMapper);
5894 dispatchWhenListsDifferent(_events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_CHANGED, startState.pivotColumns, _this.pivotColumns, columnIdMapper);
5895 var valueChangePredicate = function (cs, c) {
5896 var oldActive = cs.aggFunc != null;
5897 var activeChanged = oldActive != c.isValueActive();
5898 // we only check aggFunc if the agg is active
5899 var aggFuncChanged = oldActive && cs.aggFunc != c.getAggFunc();
5900 return activeChanged || aggFuncChanged;
5901 };
5902 var changedValues = getChangedColumns(valueChangePredicate);
5903 if (changedValues.length > 0) {
5904 // we pass all value columns, now the ones that changed. this is the same
5905 // as pivot and rowGroup cols, but different to all other properties below.
5906 // this is more for backwards compatibility, as it's always been this way.
5907 // really it should be the other way, as the order of the cols makes no difference
5908 // for valueColumns (apart from displaying them in the tool panel).
5909 _this.dispatchColumnChangedEvent(_events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, _this.valueColumns, source);
5910 }
5911 var resizeChangePredicate = function (cs, c) { return cs.width != c.getActualWidth(); };
5912 _this.dispatchColumnResizedEvent(getChangedColumns(resizeChangePredicate), true, source);
5913 var pinnedChangePredicate = function (cs, c) { return cs.pinned != c.getPinned(); };
5914 _this.dispatchColumnPinnedEvent(getChangedColumns(pinnedChangePredicate), source);
5915 var visibilityChangePredicate = function (cs, c) { return cs.hide == c.isVisible(); };
5916 _this.dispatchColumnVisibleEvent(getChangedColumns(visibilityChangePredicate), source);
5917 var sortChangePredicate = function (cs, c) { return cs.sort != c.getSort() || cs.sortIndex != c.getSortIndex(); };
5918 if (getChangedColumns(sortChangePredicate).length > 0) {
5919 _this.sortController.dispatchSortChangedEvents(source);
5920 }
5921 // special handling for moved column events
5922 _this.normaliseColumnMovedEventForColumnState(columnStateBefore, source);
5923 };
5924 };
5925 ColumnModel.prototype.getCommonValue = function (cols, valueGetter) {
5926 if (!cols || cols.length == 0) {
5927 return undefined;
5928 }
5929 // compare each value to the first value. if nothing differs, then value is common so return it.
5930 var firstValue = valueGetter(cols[0]);
5931 for (var i = 1; i < cols.length; i++) {
5932 if (firstValue !== valueGetter(cols[i])) {
5933 // values differ, no common value
5934 return undefined;
5935 }
5936 }
5937 return firstValue;
5938 };
5939 ColumnModel.prototype.normaliseColumnMovedEventForColumnState = function (colStateBefore, source) {
5940 // we are only interested in columns that were both present and visible before and after
5941 var _this = this;
5942 var colStateAfter = this.getColumnState();
5943 var colStateAfterMapped = {};
5944 colStateAfter.forEach(function (s) { return colStateAfterMapped[s.colId] = s; });
5945 // get id's of cols in both before and after lists
5946 var colsIntersectIds = {};
5947 colStateBefore.forEach(function (s) {
5948 if (colStateAfterMapped[s.colId]) {
5949 colsIntersectIds[s.colId] = true;
5950 }
5951 });
5952 // filter state lists, so we only have cols that were present before and after
5953 var beforeFiltered = colStateBefore.filter(function (c) { return colsIntersectIds[c.colId]; });
5954 var afterFiltered = colStateAfter.filter(function (c) { return colsIntersectIds[c.colId]; });
5955 // see if any cols are in a different location
5956 var movedColumns = [];
5957 afterFiltered.forEach(function (csAfter, index) {
5958 var csBefore = beforeFiltered && beforeFiltered[index];
5959 if (csBefore && csBefore.colId !== csAfter.colId) {
5960 var gridCol = _this.getGridColumn(csBefore.colId);
5961 if (gridCol) {
5962 movedColumns.push(gridCol);
5963 }
5964 }
5965 });
5966 if (!movedColumns.length) {
5967 return;
5968 }
5969 this.dispatchColumnMovedEvent({ movedColumns: movedColumns, source: source, finished: true });
5970 };
5971 ColumnModel.prototype.syncColumnWithStateItem = function (column, stateItem, defaultState, rowGroupIndexes, pivotIndexes, autoCol, source) {
5972 if (!column) {
5973 return;
5974 }
5975 var getValue = function (key1, key2) {
5976 var obj = { value1: undefined, value2: undefined };
5977 var calculated = false;
5978 if (stateItem) {
5979 if (stateItem[key1] !== undefined) {
5980 obj.value1 = stateItem[key1];
5981 calculated = true;
5982 }
5983 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(key2) && stateItem[key2] !== undefined) {
5984 obj.value2 = stateItem[key2];
5985 calculated = true;
5986 }
5987 }
5988 if (!calculated && defaultState) {
5989 if (defaultState[key1] !== undefined) {
5990 obj.value1 = defaultState[key1];
5991 }
5992 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(key2) && defaultState[key2] !== undefined) {
5993 obj.value2 = defaultState[key2];
5994 }
5995 }
5996 return obj;
5997 };
5998 // following ensures we are left with boolean true or false, eg converts (null, undefined, 0) all to true
5999 var hide = getValue('hide').value1;
6000 if (hide !== undefined) {
6001 column.setVisible(!hide, source);
6002 }
6003 // sets pinned to 'left' or 'right'
6004 var pinned = getValue('pinned').value1;
6005 if (pinned !== undefined) {
6006 column.setPinned(pinned);
6007 }
6008 // if width provided and valid, use it, otherwise stick with the old width
6009 var minColWidth = this.columnUtils.calculateColMinWidth(column.getColDef());
6010 // flex
6011 var flex = getValue('flex').value1;
6012 if (flex !== undefined) {
6013 column.setFlex(flex);
6014 }
6015 // width - we only set width if column is not flexing
6016 var noFlexThisCol = column.getFlex() <= 0;
6017 if (noFlexThisCol) {
6018 // both null and undefined means we skip, as it's not possible to 'clear' width (a column must have a width)
6019 var width = getValue('width').value1;
6020 if (width != null) {
6021 if (minColWidth != null && width >= minColWidth) {
6022 column.setActualWidth(width, source);
6023 }
6024 }
6025 }
6026 var sort = getValue('sort').value1;
6027 if (sort !== undefined) {
6028 if (sort === 'desc' || sort === 'asc') {
6029 column.setSort(sort, source);
6030 }
6031 else {
6032 column.setSort(undefined, source);
6033 }
6034 }
6035 var sortIndex = getValue('sortIndex').value1;
6036 if (sortIndex !== undefined) {
6037 column.setSortIndex(sortIndex);
6038 }
6039 // we do not do aggFunc, rowGroup or pivot for auto cols or secondary cols
6040 if (autoCol || !column.isPrimary()) {
6041 return;
6042 }
6043 var aggFunc = getValue('aggFunc').value1;
6044 if (aggFunc !== undefined) {
6045 if (typeof aggFunc === 'string') {
6046 column.setAggFunc(aggFunc);
6047 if (!column.isValueActive()) {
6048 column.setValueActive(true, source);
6049 this.valueColumns.push(column);
6050 }
6051 }
6052 else {
6053 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(aggFunc)) {
6054 console.warn('AG Grid: stateItem.aggFunc must be a string. if using your own aggregation ' +
6055 'functions, register the functions first before using them in get/set state. This is because it is ' +
6056 'intended for the column state to be stored and retrieved as simple JSON.');
6057 }
6058 // Note: we do not call column.setAggFunc(null), so that next time we aggregate
6059 // by this column (eg drag the column to the agg section int he toolpanel) it will
6060 // default to the last aggregation function.
6061 if (column.isValueActive()) {
6062 column.setValueActive(false, source);
6063 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(this.valueColumns, column);
6064 }
6065 }
6066 }
6067 var _a = getValue('rowGroup', 'rowGroupIndex'), rowGroup = _a.value1, rowGroupIndex = _a.value2;
6068 if (rowGroup !== undefined || rowGroupIndex !== undefined) {
6069 if (typeof rowGroupIndex === 'number' || rowGroup) {
6070 if (!column.isRowGroupActive()) {
6071 column.setRowGroupActive(true, source);
6072 this.rowGroupColumns.push(column);
6073 }
6074 if (rowGroupIndexes && typeof rowGroupIndex === 'number') {
6075 rowGroupIndexes[column.getId()] = rowGroupIndex;
6076 }
6077 }
6078 else {
6079 if (column.isRowGroupActive()) {
6080 column.setRowGroupActive(false, source);
6081 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(this.rowGroupColumns, column);
6082 }
6083 }
6084 }
6085 var _b = getValue('pivot', 'pivotIndex'), pivot = _b.value1, pivotIndex = _b.value2;
6086 if (pivot !== undefined || pivotIndex !== undefined) {
6087 if (typeof pivotIndex === 'number' || pivot) {
6088 if (!column.isPivotActive()) {
6089 column.setPivotActive(true, source);
6090 this.pivotColumns.push(column);
6091 }
6092 if (pivotIndexes && typeof pivotIndex === 'number') {
6093 pivotIndexes[column.getId()] = pivotIndex;
6094 }
6095 }
6096 else {
6097 if (column.isPivotActive()) {
6098 column.setPivotActive(false, source);
6099 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(this.pivotColumns, column);
6100 }
6101 }
6102 }
6103 };
6104 ColumnModel.prototype.getGridColumns = function (keys) {
6105 return this.getColumns(keys, this.getGridColumn.bind(this));
6106 };
6107 ColumnModel.prototype.getColumns = function (keys, columnLookupCallback) {
6108 var foundColumns = [];
6109 if (keys) {
6110 keys.forEach(function (key) {
6111 var column = columnLookupCallback(key);
6112 if (column) {
6113 foundColumns.push(column);
6114 }
6115 });
6116 }
6117 return foundColumns;
6118 };
6119 // used by growGroupPanel
6120 ColumnModel.prototype.getColumnWithValidation = function (key) {
6121 if (key == null) {
6122 return null;
6123 }
6124 var column = this.getGridColumn(key);
6125 if (!column) {
6126 console.warn('AG Grid: could not find column ' + key);
6127 }
6128 return column;
6129 };
6130 ColumnModel.prototype.getPrimaryColumn = function (key) {
6131 if (!this.primaryColumns) {
6132 return null;
6133 }
6134 return this.getColumn(key, this.primaryColumns, this.primaryColumnsMap);
6135 };
6136 ColumnModel.prototype.getGridColumn = function (key) {
6137 return this.getColumn(key, this.gridColumns, this.gridColumnsMap);
6138 };
6139 ColumnModel.prototype.getSecondaryColumn = function (key) {
6140 if (!this.secondaryColumns) {
6141 return null;
6142 }
6143 return this.getColumn(key, this.secondaryColumns, this.secondaryColumnsMap);
6144 };
6145 ColumnModel.prototype.getColumn = function (key, columnList, columnMap) {
6146 if (!key) {
6147 return null;
6148 }
6149 // most of the time this method gets called the key is a string, so we put this shortcut in
6150 // for performance reasons, to see if we can match for ID (it doesn't do auto columns, that's done below)
6151 if (typeof key == 'string' && columnMap[key]) {
6152 return columnMap[key];
6153 }
6154 for (var i = 0; i < columnList.length; i++) {
6155 if (this.columnsMatch(columnList[i], key)) {
6156 return columnList[i];
6157 }
6158 }
6159 return this.getAutoColumn(key);
6160 };
6161 ColumnModel.prototype.getSourceColumnsForGroupColumn = function (groupCol) {
6162 var sourceColumnId = groupCol.getColDef().showRowGroup;
6163 if (!sourceColumnId) {
6164 return null;
6165 }
6166 if (sourceColumnId === true) {
6167 return this.rowGroupColumns.slice(0);
6168 }
6169 var column = this.getPrimaryColumn(sourceColumnId);
6170 return column ? [column] : null;
6171 };
6172 ColumnModel.prototype.getAutoColumn = function (key) {
6173 var _this = this;
6174 if (!this.groupAutoColumns ||
6175 !Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(this.groupAutoColumns) ||
6176 Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.groupAutoColumns)) {
6177 return null;
6178 }
6179 return this.groupAutoColumns.find(function (groupCol) { return _this.columnsMatch(groupCol, key); }) || null;
6180 };
6181 ColumnModel.prototype.columnsMatch = function (column, key) {
6182 var columnMatches = column === key;
6183 var colDefMatches = column.getColDef() === key;
6184 var idMatches = column.getColId() == key;
6185 return columnMatches || colDefMatches || idMatches;
6186 };
6187 ColumnModel.prototype.getDisplayNameForColumn = function (column, location, includeAggFunc) {
6188 if (includeAggFunc === void 0) { includeAggFunc = false; }
6189 if (!column) {
6190 return null;
6191 }
6192 var headerName = this.getHeaderName(column.getColDef(), column, null, null, location);
6193 if (includeAggFunc) {
6194 return this.wrapHeaderNameWithAggFunc(column, headerName);
6195 }
6196 return headerName;
6197 };
6198 ColumnModel.prototype.getDisplayNameForProvidedColumnGroup = function (columnGroup, providedColumnGroup, location) {
6199 var colGroupDef = providedColumnGroup ? providedColumnGroup.getColGroupDef() : null;
6200 if (colGroupDef) {
6201 return this.getHeaderName(colGroupDef, null, columnGroup, providedColumnGroup, location);
6202 }
6203 return null;
6204 };
6205 ColumnModel.prototype.getDisplayNameForColumnGroup = function (columnGroup, location) {
6206 return this.getDisplayNameForProvidedColumnGroup(columnGroup, columnGroup.getProvidedColumnGroup(), location);
6207 };
6208 // location is where the column is going to appear, ie who is calling us
6209 ColumnModel.prototype.getHeaderName = function (colDef, column, columnGroup, providedColumnGroup, location) {
6210 var headerValueGetter = colDef.headerValueGetter;
6211 if (headerValueGetter) {
6212 var params = {
6213 colDef: colDef,
6214 column: column,
6215 columnGroup: columnGroup,
6216 providedColumnGroup: providedColumnGroup,
6217 location: location,
6218 api: this.gridOptionsService.api,
6219 columnApi: this.gridOptionsService.columnApi,
6220 context: this.gridOptionsService.context
6221 };
6222 if (typeof headerValueGetter === 'function') {
6223 // valueGetter is a function, so just call it
6224 return headerValueGetter(params);
6225 }
6226 else if (typeof headerValueGetter === 'string') {
6227 // valueGetter is an expression, so execute the expression
6228 return this.expressionService.evaluate(headerValueGetter, params);
6229 }
6230 console.warn('AG Grid: headerValueGetter must be a function or a string');
6231 return '';
6232 }
6233 else if (colDef.headerName != null) {
6234 return colDef.headerName;
6235 }
6236 else if (colDef.field) {
6237 return Object(_utils_string__WEBPACK_IMPORTED_MODULE_10__["camelCaseToHumanText"])(colDef.field);
6238 }
6239 return '';
6240 };
6241 ColumnModel.prototype.wrapHeaderNameWithAggFunc = function (column, headerName) {
6242 if (this.gridOptionsService.is('suppressAggFuncInHeader')) {
6243 return headerName;
6244 }
6245 // only columns with aggregation active can have aggregations
6246 var pivotValueColumn = column.getColDef().pivotValueColumn;
6247 var pivotActiveOnThisColumn = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(pivotValueColumn);
6248 var aggFunc = null;
6249 var aggFuncFound;
6250 // otherwise we have a measure that is active, and we are doing aggregation on it
6251 if (pivotActiveOnThisColumn) {
6252 var isCollapsedHeaderEnabled = this.gridOptionsService.is('removePivotHeaderRowWhenSingleValueColumn') && this.valueColumns.length === 1;
6253 var isTotalColumn = column.getColDef().pivotTotalColumnIds !== undefined;
6254 if (isCollapsedHeaderEnabled && !isTotalColumn) {
6255 return headerName; // Skip decorating the header - in this case the label is the pivot key, not the value col
6256 }
6257 aggFunc = pivotValueColumn ? pivotValueColumn.getAggFunc() : null;
6258 aggFuncFound = true;
6259 }
6260 else {
6261 var measureActive = column.isValueActive();
6262 var aggregationPresent = this.pivotMode || !this.isRowGroupEmpty();
6263 if (measureActive && aggregationPresent) {
6264 aggFunc = column.getAggFunc();
6265 aggFuncFound = true;
6266 }
6267 else {
6268 aggFuncFound = false;
6269 }
6270 }
6271 if (aggFuncFound) {
6272 var aggFuncString = (typeof aggFunc === 'string') ? aggFunc : 'func';
6273 var localeTextFunc = this.localeService.getLocaleTextFunc();
6274 var aggFuncStringTranslated = localeTextFunc(aggFuncString, aggFuncString);
6275 return aggFuncStringTranslated + "(" + headerName + ")";
6276 }
6277 return headerName;
6278 };
6279 // returns the group with matching colId and instanceId. If instanceId is missing,
6280 // matches only on the colId.
6281 ColumnModel.prototype.getColumnGroup = function (colId, partId) {
6282 if (!colId) {
6283 return null;
6284 }
6285 if (colId instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
6286 return colId;
6287 }
6288 var allColumnGroups = this.getAllDisplayedTrees();
6289 var checkPartId = typeof partId === 'number';
6290 var result = null;
6291 this.columnUtils.depthFirstAllColumnTreeSearch(allColumnGroups, function (child) {
6292 if (child instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
6293 var columnGroup = child;
6294 var matched = void 0;
6295 if (checkPartId) {
6296 matched = colId === columnGroup.getGroupId() && partId === columnGroup.getPartId();
6297 }
6298 else {
6299 matched = colId === columnGroup.getGroupId();
6300 }
6301 if (matched) {
6302 result = columnGroup;
6303 }
6304 }
6305 });
6306 return result;
6307 };
6308 ColumnModel.prototype.isReady = function () {
6309 return this.ready;
6310 };
6311 ColumnModel.prototype.extractValueColumns = function (source, oldPrimaryColumns) {
6312 this.valueColumns = this.extractColumns(oldPrimaryColumns, this.valueColumns, function (col, flag) { return col.setValueActive(flag, source); },
6313 // aggFunc doesn't have index variant, cos order of value cols doesn't matter, so always return null
6314 function () { return undefined; }, function () { return undefined; },
6315 // aggFunc is a string, so return it's existence
6316 function (colDef) {
6317 var aggFunc = colDef.aggFunc;
6318 // null or empty string means clear
6319 if (aggFunc === null || aggFunc === '') {
6320 return null;
6321 }
6322 if (aggFunc === undefined) {
6323 return;
6324 }
6325 return !!aggFunc;
6326 }, function (colDef) {
6327 // return false if any of the following: null, undefined, empty string
6328 return colDef.initialAggFunc != null && colDef.initialAggFunc != '';
6329 });
6330 // all new columns added will have aggFunc missing, so set it to what is in the colDef
6331 this.valueColumns.forEach(function (col) {
6332 var colDef = col.getColDef();
6333 // if aggFunc provided, we always override, as reactive property
6334 if (colDef.aggFunc != null && colDef.aggFunc != '') {
6335 col.setAggFunc(colDef.aggFunc);
6336 }
6337 else {
6338 // otherwise we use initialAggFunc only if no agg func set - which happens when new column only
6339 if (!col.getAggFunc()) {
6340 col.setAggFunc(colDef.initialAggFunc);
6341 }
6342 }
6343 });
6344 };
6345 ColumnModel.prototype.extractRowGroupColumns = function (source, oldPrimaryColumns) {
6346 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; });
6347 };
6348 ColumnModel.prototype.extractColumns = function (oldPrimaryColumns, previousCols, setFlagFunc, getIndexFunc, getInitialIndexFunc, getValueFunc, getInitialValueFunc) {
6349 if (oldPrimaryColumns === void 0) { oldPrimaryColumns = []; }
6350 if (previousCols === void 0) { previousCols = []; }
6351 var colsWithIndex = [];
6352 var colsWithValue = [];
6353 // go though all cols.
6354 // if value, change
6355 // if default only, change only if new
6356 (this.primaryColumns || []).forEach(function (col) {
6357 var colIsNew = oldPrimaryColumns.indexOf(col) < 0;
6358 var colDef = col.getColDef();
6359 var value = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["attrToBoolean"])(getValueFunc(colDef));
6360 var initialValue = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["attrToBoolean"])(getInitialValueFunc(colDef));
6361 var index = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["attrToNumber"])(getIndexFunc(colDef));
6362 var initialIndex = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["attrToNumber"])(getInitialIndexFunc(colDef));
6363 var include;
6364 var valuePresent = value !== undefined;
6365 var indexPresent = index !== undefined;
6366 var initialValuePresent = initialValue !== undefined;
6367 var initialIndexPresent = initialIndex !== undefined;
6368 if (valuePresent) {
6369 include = value; // boolean value is guaranteed as attrToBoolean() is used above
6370 }
6371 else if (indexPresent) {
6372 if (index === null) {
6373 // if col is new we don't want to use the default / initial if index is set to null. Similarly,
6374 // we don't want to include the property for existing columns, i.e. we want to 'clear' it.
6375 include = false;
6376 }
6377 else {
6378 // note that 'null >= 0' evaluates to true which means 'rowGroupIndex = null' would enable row
6379 // grouping if the null check didn't exist above.
6380 include = index >= 0;
6381 }
6382 }
6383 else {
6384 if (colIsNew) {
6385 // as no value or index is 'present' we use the default / initial when col is new
6386 if (initialValuePresent) {
6387 include = initialValue;
6388 }
6389 else if (initialIndexPresent) {
6390 include = initialIndex != null && initialIndex >= 0;
6391 }
6392 else {
6393 include = false;
6394 }
6395 }
6396 else {
6397 // otherwise include it if included last time, e.g. if we are extracting row group cols and this col
6398 // is an existing row group col (i.e. it exists in 'previousCols') then we should include it.
6399 include = previousCols.indexOf(col) >= 0;
6400 }
6401 }
6402 if (include) {
6403 var useIndex = colIsNew ? (index != null || initialIndex != null) : index != null;
6404 useIndex ? colsWithIndex.push(col) : colsWithValue.push(col);
6405 }
6406 });
6407 var getIndexForCol = function (col) {
6408 var index = getIndexFunc(col.getColDef());
6409 var defaultIndex = getInitialIndexFunc(col.getColDef());
6410 return index != null ? index : defaultIndex;
6411 };
6412 // sort cols with index, and add these first
6413 colsWithIndex.sort(function (colA, colB) {
6414 var indexA = getIndexForCol(colA);
6415 var indexB = getIndexForCol(colB);
6416 if (indexA === indexB) {
6417 return 0;
6418 }
6419 if (indexA < indexB) {
6420 return -1;
6421 }
6422 return 1;
6423 });
6424 var res = [].concat(colsWithIndex);
6425 // second add columns that were there before and in the same order as they were before,
6426 // so we are preserving order of current grouping of columns that simply have rowGroup=true
6427 previousCols.forEach(function (col) {
6428 if (colsWithValue.indexOf(col) >= 0) {
6429 res.push(col);
6430 }
6431 });
6432 // lastly put in all remaining cols
6433 colsWithValue.forEach(function (col) {
6434 if (res.indexOf(col) < 0) {
6435 res.push(col);
6436 }
6437 });
6438 // set flag=false for removed cols
6439 previousCols.forEach(function (col) {
6440 if (res.indexOf(col) < 0) {
6441 setFlagFunc(col, false);
6442 }
6443 });
6444 // set flag=true for newly added cols
6445 res.forEach(function (col) {
6446 if (previousCols.indexOf(col) < 0) {
6447 setFlagFunc(col, true);
6448 }
6449 });
6450 return res;
6451 };
6452 ColumnModel.prototype.extractPivotColumns = function (source, oldPrimaryColumns) {
6453 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; });
6454 };
6455 ColumnModel.prototype.resetColumnGroupState = function (source) {
6456 if (source === void 0) { source = "api"; }
6457 var stateItems = [];
6458 this.columnUtils.depthFirstOriginalTreeSearch(null, this.primaryColumnTree, function (child) {
6459 if (child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"]) {
6460 var colGroupDef = child.getColGroupDef();
6461 var groupState = {
6462 groupId: child.getGroupId(),
6463 open: !colGroupDef ? undefined : colGroupDef.openByDefault
6464 };
6465 stateItems.push(groupState);
6466 }
6467 });
6468 this.setColumnGroupState(stateItems, source);
6469 };
6470 ColumnModel.prototype.getColumnGroupState = function () {
6471 var columnGroupState = [];
6472 this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (node) {
6473 if (node instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"]) {
6474 columnGroupState.push({
6475 groupId: node.getGroupId(),
6476 open: node.isExpanded()
6477 });
6478 }
6479 });
6480 return columnGroupState;
6481 };
6482 ColumnModel.prototype.setColumnGroupState = function (stateItems, source) {
6483 var _this = this;
6484 if (source === void 0) { source = "api"; }
6485 this.columnAnimationService.start();
6486 var impactedGroups = [];
6487 stateItems.forEach(function (stateItem) {
6488 var groupKey = stateItem.groupId;
6489 var newValue = stateItem.open;
6490 var providedColumnGroup = _this.getProvidedColumnGroup(groupKey);
6491 if (!providedColumnGroup) {
6492 return;
6493 }
6494 if (providedColumnGroup.isExpanded() === newValue) {
6495 return;
6496 }
6497 _this.logger.log('columnGroupOpened(' + providedColumnGroup.getGroupId() + ',' + newValue + ')');
6498 providedColumnGroup.setExpanded(newValue);
6499 impactedGroups.push(providedColumnGroup);
6500 });
6501 this.updateGroupsAndDisplayedColumns(source);
6502 this.setFirstRightAndLastLeftPinned(source);
6503 impactedGroups.forEach(function (providedColumnGroup) {
6504 var event = {
6505 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_GROUP_OPENED,
6506 columnGroup: providedColumnGroup
6507 };
6508 _this.eventService.dispatchEvent(event);
6509 });
6510 this.columnAnimationService.finish();
6511 };
6512 // called by headerRenderer - when a header is opened or closed
6513 ColumnModel.prototype.setColumnGroupOpened = function (key, newValue, source) {
6514 if (source === void 0) { source = "api"; }
6515 var keyAsString;
6516 if (key instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"]) {
6517 keyAsString = key.getId();
6518 }
6519 else {
6520 keyAsString = key || '';
6521 }
6522 this.setColumnGroupState([{ groupId: keyAsString, open: newValue }], source);
6523 };
6524 ColumnModel.prototype.getProvidedColumnGroup = function (key) {
6525 // if (key instanceof ProvidedColumnGroup) { return key; }
6526 if (typeof key !== 'string') {
6527 console.error('AG Grid: group key must be a string');
6528 }
6529 // otherwise, search for the column group by id
6530 var res = null;
6531 this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (node) {
6532 if (node instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"]) {
6533 if (node.getId() === key) {
6534 res = node;
6535 }
6536 }
6537 });
6538 return res;
6539 };
6540 ColumnModel.prototype.calculateColumnsForDisplay = function () {
6541 var _this = this;
6542 var columnsForDisplay;
6543 if (this.pivotMode && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.secondaryColumns)) {
6544 // pivot mode is on, but we are not pivoting, so we only
6545 // show columns we are aggregating on
6546 columnsForDisplay = this.gridColumns.filter(function (column) {
6547 var isAutoGroupCol = _this.groupAutoColumns && Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["includes"])(_this.groupAutoColumns, column);
6548 var isValueCol = _this.valueColumns && Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["includes"])(_this.valueColumns, column);
6549 return isAutoGroupCol || isValueCol;
6550 });
6551 }
6552 else {
6553 // otherwise continue as normal. this can be working on the primary
6554 // or secondary columns, whatever the gridColumns are set to
6555 columnsForDisplay = this.gridColumns.filter(function (column) {
6556 // keep col if a) it's auto-group or b) it's visible
6557 var isAutoGroupCol = _this.groupAutoColumns && Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["includes"])(_this.groupAutoColumns, column);
6558 return isAutoGroupCol || column.isVisible();
6559 });
6560 }
6561 return columnsForDisplay;
6562 };
6563 ColumnModel.prototype.checkColSpanActiveInCols = function (columns) {
6564 var result = false;
6565 columns.forEach(function (col) {
6566 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(col.getColDef().colSpan)) {
6567 result = true;
6568 }
6569 });
6570 return result;
6571 };
6572 ColumnModel.prototype.calculateColumnsForGroupDisplay = function () {
6573 var _this = this;
6574 this.groupDisplayColumns = [];
6575 this.groupDisplayColumnsMap = {};
6576 var checkFunc = function (col) {
6577 var colDef = col.getColDef();
6578 var underlyingColumn = colDef.showRowGroup;
6579 if (colDef && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(underlyingColumn)) {
6580 _this.groupDisplayColumns.push(col);
6581 if (typeof underlyingColumn === 'string') {
6582 _this.groupDisplayColumnsMap[underlyingColumn] = col;
6583 }
6584 else if (underlyingColumn === true) {
6585 _this.getRowGroupColumns().forEach(function (rowGroupCol) {
6586 _this.groupDisplayColumnsMap[rowGroupCol.getId()] = col;
6587 });
6588 }
6589 }
6590 };
6591 this.gridColumns.forEach(checkFunc);
6592 if (this.groupAutoColumns) {
6593 this.groupAutoColumns.forEach(checkFunc);
6594 }
6595 };
6596 ColumnModel.prototype.getGroupDisplayColumns = function () {
6597 return this.groupDisplayColumns;
6598 };
6599 ColumnModel.prototype.getGroupDisplayColumnForGroup = function (rowGroupColumnId) {
6600 return this.groupDisplayColumnsMap[rowGroupColumnId];
6601 };
6602 ColumnModel.prototype.updateDisplayedColumns = function (source) {
6603 var columnsForDisplay = this.calculateColumnsForDisplay();
6604 this.buildDisplayedTrees(columnsForDisplay);
6605 this.calculateColumnsForGroupDisplay();
6606 // also called when group opened/closed
6607 this.updateGroupsAndDisplayedColumns(source);
6608 // also called when group opened/closed
6609 this.setFirstRightAndLastLeftPinned(source);
6610 };
6611 ColumnModel.prototype.isSecondaryColumnsPresent = function () {
6612 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(this.secondaryColumns);
6613 };
6614 ColumnModel.prototype.setSecondaryColumns = function (colDefs, source) {
6615 var _this = this;
6616 if (source === void 0) { source = "api"; }
6617 var newColsPresent = colDefs && colDefs.length > 0;
6618 // if not cols passed, and we had no cols anyway, then do nothing
6619 if (!newColsPresent && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.secondaryColumns)) {
6620 return;
6621 }
6622 if (newColsPresent) {
6623 this.processSecondaryColumnDefinitions(colDefs);
6624 var balancedTreeResult = this.columnFactory.createColumnTree(colDefs, false, this.secondaryBalancedTree || this.previousSecondaryColumns || undefined);
6625 this.destroyOldColumns(this.secondaryBalancedTree, balancedTreeResult.columnTree);
6626 this.secondaryBalancedTree = balancedTreeResult.columnTree;
6627 this.secondaryHeaderRowCount = balancedTreeResult.treeDept + 1;
6628 this.secondaryColumns = this.getColumnsFromTree(this.secondaryBalancedTree);
6629 this.secondaryColumnsMap = {};
6630 this.secondaryColumns.forEach(function (col) { return _this.secondaryColumnsMap[col.getId()] = col; });
6631 this.previousSecondaryColumns = null;
6632 }
6633 else {
6634 this.previousSecondaryColumns = this.secondaryBalancedTree;
6635 this.secondaryBalancedTree = null;
6636 this.secondaryHeaderRowCount = -1;
6637 this.secondaryColumns = null;
6638 this.secondaryColumnsMap = {};
6639 }
6640 this.updateGridColumns();
6641 this.updateDisplayedColumns(source);
6642 };
6643 ColumnModel.prototype.processSecondaryColumnDefinitions = function (colDefs) {
6644 var columnCallback = this.gridOptionsService.get('processPivotResultColDef') || this.gridOptionsService.get('processSecondaryColDef');
6645 var groupCallback = this.gridOptionsService.get('processPivotResultColGroupDef') || this.gridOptionsService.get('processSecondaryColGroupDef');
6646 if (!columnCallback && !groupCallback) {
6647 return undefined;
6648 }
6649 var searchForColDefs = function (colDefs2) {
6650 colDefs2.forEach(function (abstractColDef) {
6651 var isGroup = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(abstractColDef.children);
6652 if (isGroup) {
6653 var colGroupDef = abstractColDef;
6654 if (groupCallback) {
6655 groupCallback(colGroupDef);
6656 }
6657 searchForColDefs(colGroupDef.children);
6658 }
6659 else {
6660 var colDef = abstractColDef;
6661 if (columnCallback) {
6662 columnCallback(colDef);
6663 }
6664 }
6665 });
6666 };
6667 if (colDefs) {
6668 searchForColDefs(colDefs);
6669 }
6670 };
6671 // called from: applyColumnState, setColumnDefs, setSecondaryColumns
6672 ColumnModel.prototype.updateGridColumns = function () {
6673 var _this = this;
6674 var prevGridCols = this.gridBalancedTree;
6675 if (this.gridColsArePrimary) {
6676 this.lastPrimaryOrder = this.gridColumns;
6677 }
6678 else {
6679 this.lastSecondaryOrder = this.gridColumns;
6680 }
6681 var sortOrderToRecover;
6682 if (this.secondaryColumns && this.secondaryBalancedTree) {
6683 var hasSameColumns = this.secondaryColumns.every(function (col) {
6684 return _this.gridColumnsMap[col.getColId()] !== undefined;
6685 });
6686 this.gridBalancedTree = this.secondaryBalancedTree.slice();
6687 this.gridHeaderRowCount = this.secondaryHeaderRowCount;
6688 this.gridColumns = this.secondaryColumns.slice();
6689 this.gridColsArePrimary = false;
6690 // If the current columns are the same or a subset of the previous
6691 // we keep the previous order, otherwise we go back to the order the pivot
6692 // cols are generated in
6693 if (hasSameColumns) {
6694 sortOrderToRecover = this.lastSecondaryOrder;
6695 }
6696 }
6697 else if (this.primaryColumns) {
6698 this.gridBalancedTree = this.primaryColumnTree.slice();
6699 this.gridHeaderRowCount = this.primaryHeaderRowCount;
6700 this.gridColumns = this.primaryColumns.slice();
6701 this.gridColsArePrimary = true;
6702 // updateGridColumns gets called after user adds a row group. we want to maintain the order of the columns
6703 // when this happens (eg if user moved a column) rather than revert back to the original column order.
6704 // likewise if changing in/out of pivot mode, we want to maintain the order of the cols
6705 sortOrderToRecover = this.lastPrimaryOrder;
6706 }
6707 // create the new auto columns
6708 var areAutoColsChanged = this.createGroupAutoColumnsIfNeeded();
6709 // if auto group cols have changed, and we have a sort order, we need to move auto cols to the start
6710 if (areAutoColsChanged && sortOrderToRecover) {
6711 var groupAutoColsMap_1 = Object(_utils_map__WEBPACK_IMPORTED_MODULE_11__["convertToMap"])(this.groupAutoColumns.map(function (col) { return [col, true]; }));
6712 // if group columns has changed, we don't preserve the group column order, so remove them from the old order
6713 sortOrderToRecover = sortOrderToRecover.filter(function (col) { return !groupAutoColsMap_1.has(col); });
6714 // and add them to the start of the order
6715 sortOrderToRecover = __spread(this.groupAutoColumns, sortOrderToRecover);
6716 }
6717 this.addAutoGroupToGridColumns();
6718 this.orderGridColsLike(sortOrderToRecover);
6719 this.gridColumns = this.placeLockedColumns(this.gridColumns);
6720 this.refreshQuickFilterColumns();
6721 this.clearDisplayedAndViewportColumns();
6722 this.colSpanActive = this.checkColSpanActiveInCols(this.gridColumns);
6723 this.gridColumnsMap = {};
6724 this.gridColumns.forEach(function (col) { return _this.gridColumnsMap[col.getId()] = col; });
6725 this.setAutoHeightActive();
6726 if (!Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["areEqual"])(prevGridCols, this.gridBalancedTree)) {
6727 var event_4 = {
6728 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_GRID_COLUMNS_CHANGED
6729 };
6730 this.eventService.dispatchEvent(event_4);
6731 }
6732 };
6733 ColumnModel.prototype.setAutoHeightActive = function () {
6734 this.autoHeightActive = this.gridColumns.filter(function (col) { return col.isAutoHeight(); }).length > 0;
6735 if (this.autoHeightActive) {
6736 this.autoHeightActiveAtLeastOnce = true;
6737 var rowModelType = this.rowModel.getType();
6738 var supportedRowModel = rowModelType === 'clientSide' || rowModelType === 'serverSide';
6739 if (!supportedRowModel) {
6740 var message_1 = 'AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.';
6741 Object(_utils_function__WEBPACK_IMPORTED_MODULE_12__["doOnce"])(function () { return console.warn(message_1); }, 'autoHeightActive.wrongRowModel');
6742 }
6743 }
6744 };
6745 ColumnModel.prototype.orderGridColsLike = function (colsOrder) {
6746 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(colsOrder)) {
6747 return;
6748 }
6749 var lastOrderMapped = Object(_utils_map__WEBPACK_IMPORTED_MODULE_11__["convertToMap"])(colsOrder.map(function (col, index) { return [col, index]; }));
6750 // only do the sort if at least one column is accounted for. columns will be not accounted for
6751 // if changing from secondary to primary columns
6752 var noColsFound = true;
6753 this.gridColumns.forEach(function (col) {
6754 if (lastOrderMapped.has(col)) {
6755 noColsFound = false;
6756 }
6757 });
6758 if (noColsFound) {
6759 return;
6760 }
6761 // order cols in the same order as before. we need to make sure that all
6762 // cols still exists, so filter out any that no longer exist.
6763 var gridColsMap = Object(_utils_map__WEBPACK_IMPORTED_MODULE_11__["convertToMap"])(this.gridColumns.map(function (col) { return [col, true]; }));
6764 var oldColsOrdered = colsOrder.filter(function (col) { return gridColsMap.has(col); });
6765 var oldColsMap = Object(_utils_map__WEBPACK_IMPORTED_MODULE_11__["convertToMap"])(oldColsOrdered.map(function (col) { return [col, true]; }));
6766 var newColsOrdered = this.gridColumns.filter(function (col) { return !oldColsMap.has(col); });
6767 // add in the new columns, at the end (if no group), or at the end of the group (if a group)
6768 var newGridColumns = oldColsOrdered.slice();
6769 newColsOrdered.forEach(function (newCol) {
6770 var parent = newCol.getOriginalParent();
6771 // if no parent, means we are not grouping, so just add the column to the end
6772 if (!parent) {
6773 newGridColumns.push(newCol);
6774 return;
6775 }
6776 // find the group the column belongs to. if no siblings at the current level (eg col in group on it's
6777 // own) then go up one level and look for siblings there.
6778 var siblings = [];
6779 while (!siblings.length && parent) {
6780 var leafCols = parent.getLeafColumns();
6781 leafCols.forEach(function (leafCol) {
6782 var presentInNewGriColumns = newGridColumns.indexOf(leafCol) >= 0;
6783 var noYetInSiblings = siblings.indexOf(leafCol) < 0;
6784 if (presentInNewGriColumns && noYetInSiblings) {
6785 siblings.push(leafCol);
6786 }
6787 });
6788 parent = parent.getOriginalParent();
6789 }
6790 // if no siblings exist at any level, this means the col is in a group (or parent groups) on it's own
6791 if (!siblings.length) {
6792 newGridColumns.push(newCol);
6793 return;
6794 }
6795 // find index of last column in the group
6796 var indexes = siblings.map(function (col) { return newGridColumns.indexOf(col); });
6797 var lastIndex = Math.max.apply(Math, __spread(indexes));
6798 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["insertIntoArray"])(newGridColumns, newCol, lastIndex + 1);
6799 });
6800 this.gridColumns = newGridColumns;
6801 };
6802 ColumnModel.prototype.isPrimaryColumnGroupsPresent = function () {
6803 return this.primaryHeaderRowCount > 1;
6804 };
6805 // if we are using autoGroupCols, then they should be included for quick filter. this covers the
6806 // following scenarios:
6807 // a) user provides 'field' into autoGroupCol of normal grid, so now because a valid col to filter leafs on
6808 // b) using tree data and user depends on autoGroupCol for first col, and we also want to filter on this
6809 // (tree data is a bit different, as parent rows can be filtered on, unlike row grouping)
6810 ColumnModel.prototype.refreshQuickFilterColumns = function () {
6811 var _a;
6812 var columnsForQuickFilter;
6813 if (this.groupAutoColumns) {
6814 columnsForQuickFilter = ((_a = this.primaryColumns) !== null && _a !== void 0 ? _a : []).concat(this.groupAutoColumns);
6815 }
6816 else if (this.primaryColumns) {
6817 columnsForQuickFilter = this.primaryColumns;
6818 }
6819 columnsForQuickFilter = columnsForQuickFilter !== null && columnsForQuickFilter !== void 0 ? columnsForQuickFilter : [];
6820 this.columnsForQuickFilter = this.gridOptionsService.is('excludeHiddenColumnsFromQuickFilter')
6821 ? columnsForQuickFilter.filter(function (col) { return col.isVisible(); })
6822 : columnsForQuickFilter;
6823 };
6824 ColumnModel.prototype.placeLockedColumns = function (cols) {
6825 var left = [];
6826 var normal = [];
6827 var right = [];
6828 cols.forEach(function (col) {
6829 var position = col.getColDef().lockPosition;
6830 if (position === 'right') {
6831 right.push(col);
6832 }
6833 else if (position === 'left' || position === true) {
6834 left.push(col);
6835 }
6836 else {
6837 normal.push(col);
6838 }
6839 });
6840 return __spread(left, normal, right);
6841 };
6842 ColumnModel.prototype.addAutoGroupToGridColumns = function () {
6843 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(this.groupAutoColumns)) {
6844 this.destroyOldColumns(this.groupAutoColsBalancedTree);
6845 this.groupAutoColsBalancedTree = null;
6846 return;
6847 }
6848 this.gridColumns = this.groupAutoColumns ? this.groupAutoColumns.concat(this.gridColumns) : this.gridColumns;
6849 var newAutoColsTree = this.columnFactory.createForAutoGroups(this.groupAutoColumns, this.gridBalancedTree);
6850 this.destroyOldColumns(this.groupAutoColsBalancedTree, newAutoColsTree);
6851 this.groupAutoColsBalancedTree = newAutoColsTree;
6852 this.gridBalancedTree = newAutoColsTree.concat(this.gridBalancedTree);
6853 };
6854 // gets called after we copy down grid columns, to make sure any part of the gui
6855 // that tries to draw, eg the header, it will get empty lists of columns rather
6856 // than stale columns. for example, the header will received gridColumnsChanged
6857 // event, so will try and draw, but it will draw successfully when it acts on the
6858 // virtualColumnsChanged event
6859 ColumnModel.prototype.clearDisplayedAndViewportColumns = function () {
6860 this.viewportRowLeft = {};
6861 this.viewportRowRight = {};
6862 this.viewportRowCenter = {};
6863 this.displayedColumnsLeft = [];
6864 this.displayedColumnsRight = [];
6865 this.displayedColumnsCenter = [];
6866 this.displayedColumns = [];
6867 this.viewportColumns = [];
6868 this.headerViewportColumns = [];
6869 this.viewportColumnsHash = '';
6870 };
6871 ColumnModel.prototype.updateGroupsAndDisplayedColumns = function (source) {
6872 this.updateOpenClosedVisibilityInColumnGroups();
6873 this.deriveDisplayedColumns(source);
6874 this.refreshFlexedColumns();
6875 this.extractViewport();
6876 this.updateBodyWidths();
6877 // this event is picked up by the gui, headerRenderer and rowRenderer, to recalculate what columns to display
6878 var event = {
6879 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED
6880 };
6881 this.eventService.dispatchEvent(event);
6882 };
6883 ColumnModel.prototype.deriveDisplayedColumns = function (source) {
6884 this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft, this.displayedColumnsLeft);
6885 this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre, this.displayedColumnsCenter);
6886 this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight, this.displayedColumnsRight);
6887 this.joinDisplayedColumns();
6888 this.setLeftValues(source);
6889 this.displayedAutoHeightCols = this.displayedColumns.filter(function (col) { return col.isAutoHeight(); });
6890 };
6891 ColumnModel.prototype.isAutoRowHeightActive = function () {
6892 return this.autoHeightActive;
6893 };
6894 ColumnModel.prototype.wasAutoRowHeightEverActive = function () {
6895 return this.autoHeightActiveAtLeastOnce;
6896 };
6897 ColumnModel.prototype.joinDisplayedColumns = function () {
6898 if (this.gridOptionsService.is('enableRtl')) {
6899 this.displayedColumns = this.displayedColumnsRight
6900 .concat(this.displayedColumnsCenter)
6901 .concat(this.displayedColumnsLeft);
6902 }
6903 else {
6904 this.displayedColumns = this.displayedColumnsLeft
6905 .concat(this.displayedColumnsCenter)
6906 .concat(this.displayedColumnsRight);
6907 }
6908 };
6909 // sets the left pixel position of each column
6910 ColumnModel.prototype.setLeftValues = function (source) {
6911 this.setLeftValuesOfColumns(source);
6912 this.setLeftValuesOfGroups();
6913 };
6914 ColumnModel.prototype.setLeftValuesOfColumns = function (source) {
6915 var _this = this;
6916 if (!this.primaryColumns) {
6917 return;
6918 }
6919 // go through each list of displayed columns
6920 var allColumns = this.primaryColumns.slice(0);
6921 // let totalColumnWidth = this.getWidthOfColsInList()
6922 var doingRtl = this.gridOptionsService.is('enableRtl');
6923 [
6924 this.displayedColumnsLeft,
6925 this.displayedColumnsRight,
6926 this.displayedColumnsCenter
6927 ].forEach(function (columns) {
6928 if (doingRtl) {
6929 // when doing RTL, we start at the top most pixel (ie RHS) and work backwards
6930 var left_1 = _this.getWidthOfColsInList(columns);
6931 columns.forEach(function (column) {
6932 left_1 -= column.getActualWidth();
6933 column.setLeft(left_1, source);
6934 });
6935 }
6936 else {
6937 // otherwise normal LTR, we start at zero
6938 var left_2 = 0;
6939 columns.forEach(function (column) {
6940 column.setLeft(left_2, source);
6941 left_2 += column.getActualWidth();
6942 });
6943 }
6944 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeAllFromArray"])(allColumns, columns);
6945 });
6946 // items left in allColumns are columns not displayed, so remove the left position. this is
6947 // important for the rows, as if a col is made visible, then taken out, then made visible again,
6948 // we don't want the animation of the cell floating in from the old position, whatever that was.
6949 allColumns.forEach(function (column) {
6950 column.setLeft(null, source);
6951 });
6952 };
6953 ColumnModel.prototype.setLeftValuesOfGroups = function () {
6954 // a groups left value is the lest left value of it's children
6955 [
6956 this.displayedTreeLeft,
6957 this.displayedTreeRight,
6958 this.displayedTreeCentre
6959 ].forEach(function (columns) {
6960 columns.forEach(function (column) {
6961 if (column instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
6962 var columnGroup = column;
6963 columnGroup.checkLeft();
6964 }
6965 });
6966 });
6967 };
6968 ColumnModel.prototype.derivedDisplayedColumnsFromDisplayedTree = function (tree, columns) {
6969 columns.length = 0;
6970 this.columnUtils.depthFirstDisplayedColumnTreeSearch(tree, function (child) {
6971 if (child instanceof _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"]) {
6972 columns.push(child);
6973 }
6974 });
6975 };
6976 ColumnModel.prototype.extractViewportColumns = function () {
6977 if (this.suppressColumnVirtualisation) {
6978 // no virtualisation, so don't filter
6979 this.viewportColumnsCenter = this.displayedColumnsCenter;
6980 this.headerViewportColumnsCenter = this.displayedColumnsCenter;
6981 }
6982 else {
6983 // filter out what should be visible
6984 this.viewportColumnsCenter = this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this));
6985 this.headerViewportColumnsCenter = this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this));
6986 }
6987 this.viewportColumns = this.viewportColumnsCenter
6988 .concat(this.displayedColumnsLeft)
6989 .concat(this.displayedColumnsRight);
6990 this.headerViewportColumns = this.headerViewportColumnsCenter
6991 .concat(this.displayedColumnsLeft)
6992 .concat(this.displayedColumnsRight);
6993 };
6994 ColumnModel.prototype.getVirtualHeaderGroupRow = function (type, dept) {
6995 var result;
6996 switch (type) {
6997 case 'left':
6998 result = this.viewportRowLeft[dept];
6999 break;
7000 case 'right':
7001 result = this.viewportRowRight[dept];
7002 break;
7003 default:
7004 result = this.viewportRowCenter[dept];
7005 break;
7006 }
7007 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missing"])(result)) {
7008 result = [];
7009 }
7010 return result;
7011 };
7012 ColumnModel.prototype.calculateHeaderRows = function () {
7013 // go through each group, see if any of it's cols are displayed, and if yes,
7014 // then this group is included
7015 this.viewportRowLeft = {};
7016 this.viewportRowRight = {};
7017 this.viewportRowCenter = {};
7018 // for easy lookup when building the groups.
7019 var virtualColIds = {};
7020 this.headerViewportColumns.forEach(function (col) { return virtualColIds[col.getId()] = true; });
7021 var testGroup = function (children, result, dept) {
7022 var returnValue = false;
7023 for (var i = 0; i < children.length; i++) {
7024 // see if this item is within viewport
7025 var child = children[i];
7026 var addThisItem = false;
7027 if (child instanceof _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"]) {
7028 // for column, test if column is included
7029 addThisItem = virtualColIds[child.getId()] === true;
7030 }
7031 else {
7032 // if group, base decision on children
7033 var columnGroup = child;
7034 var displayedChildren = columnGroup.getDisplayedChildren();
7035 if (displayedChildren) {
7036 addThisItem = testGroup(displayedChildren, result, dept + 1);
7037 }
7038 }
7039 if (addThisItem) {
7040 returnValue = true;
7041 if (!result[dept]) {
7042 result[dept] = [];
7043 }
7044 result[dept].push(child);
7045 }
7046 }
7047 return returnValue;
7048 };
7049 testGroup(this.displayedTreeLeft, this.viewportRowLeft, 0);
7050 testGroup(this.displayedTreeRight, this.viewportRowRight, 0);
7051 testGroup(this.displayedTreeCentre, this.viewportRowCenter, 0);
7052 };
7053 ColumnModel.prototype.extractViewport = function () {
7054 var hashColumn = function (c) { return c.getId() + "-" + (c.getPinned() || 'normal'); };
7055 this.extractViewportColumns();
7056 var newHash = this.viewportColumns.map(hashColumn).join('#');
7057 var changed = this.viewportColumnsHash !== newHash;
7058 if (changed) {
7059 this.viewportColumnsHash = newHash;
7060 this.calculateHeaderRows();
7061 }
7062 return changed;
7063 };
7064 ColumnModel.prototype.refreshFlexedColumns = function (params) {
7065 var _this = this;
7066 if (params === void 0) { params = {}; }
7067 var source = params.source ? params.source : 'flex';
7068 if (params.viewportWidth != null) {
7069 this.flexViewportWidth = params.viewportWidth;
7070 }
7071 if (!this.flexViewportWidth) {
7072 return [];
7073 }
7074 // If the grid has left-over space, divide it between flexing columns in proportion to their flex value.
7075 // A "flexing column" is one that has a 'flex' value set and is not currently being constrained by its
7076 // minWidth or maxWidth rules.
7077 var flexAfterDisplayIndex = -1;
7078 if (params.resizingCols) {
7079 params.resizingCols.forEach(function (col) {
7080 var indexOfCol = _this.displayedColumnsCenter.indexOf(col);
7081 if (flexAfterDisplayIndex < indexOfCol) {
7082 flexAfterDisplayIndex = indexOfCol;
7083 }
7084 });
7085 }
7086 var isColFlex = function (col) {
7087 var afterResizingCols = _this.displayedColumnsCenter.indexOf(col) > flexAfterDisplayIndex;
7088 return col.getFlex() && afterResizingCols;
7089 };
7090 var knownWidthColumns = this.displayedColumnsCenter.filter(function (col) { return !isColFlex(col); });
7091 var flexingColumns = this.displayedColumnsCenter.filter(function (col) { return isColFlex(col); });
7092 var changedColumns = [];
7093 if (!flexingColumns.length) {
7094 return [];
7095 }
7096 var flexingColumnSizes = [];
7097 var spaceForFlexingColumns;
7098 outer: while (true) {
7099 var totalFlex = flexingColumns.reduce(function (count, col) { return count + col.getFlex(); }, 0);
7100 spaceForFlexingColumns = this.flexViewportWidth - this.getWidthOfColsInList(knownWidthColumns);
7101 for (var i = 0; i < flexingColumns.length; i++) {
7102 var col = flexingColumns[i];
7103 var widthByFlexRule = spaceForFlexingColumns * col.getFlex() / totalFlex;
7104 var constrainedWidth = 0;
7105 var minWidth = col.getMinWidth();
7106 var maxWidth = col.getMaxWidth();
7107 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(minWidth) && widthByFlexRule < minWidth) {
7108 constrainedWidth = minWidth;
7109 }
7110 else if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(maxWidth) && widthByFlexRule > maxWidth) {
7111 constrainedWidth = maxWidth;
7112 }
7113 if (constrainedWidth) {
7114 // This column is not in fact flexing as it is being constrained to a specific size
7115 // so remove it from the list of flexing columns and start again
7116 col.setActualWidth(constrainedWidth, source);
7117 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(flexingColumns, col);
7118 changedColumns.push(col);
7119 knownWidthColumns.push(col);
7120 continue outer;
7121 }
7122 flexingColumnSizes[i] = Math.round(widthByFlexRule);
7123 }
7124 break;
7125 }
7126 var remainingSpace = spaceForFlexingColumns;
7127 flexingColumns.forEach(function (col, i) {
7128 col.setActualWidth(Math.min(flexingColumnSizes[i], remainingSpace), source);
7129 changedColumns.push(col);
7130 remainingSpace -= flexingColumnSizes[i];
7131 });
7132 if (!params.skipSetLeft) {
7133 this.setLeftValues(source);
7134 }
7135 if (params.updateBodyWidths) {
7136 this.updateBodyWidths();
7137 }
7138 if (params.fireResizedEvent) {
7139 this.dispatchColumnResizedEvent(changedColumns, true, source, flexingColumns);
7140 }
7141 // if the user sets rowData directly into GridOptions, then the row data is set before
7142 // grid is attached to the DOM. this means the columns are not flexed, and then the rows
7143 // have the wrong height (as they depend on column widths). so once the columns have
7144 // been flexed for the first time (only happens once grid is attached to DOM, as dependency
7145 // on getting the grid width, which only happens after attached after ResizeObserver fires)
7146 // we get get rows to re-calc their heights.
7147 if (!this.flexColsCalculatedAtLestOnce) {
7148 if (this.gridOptionsService.isRowModelType('clientSide')) {
7149 this.rowModel.resetRowHeights();
7150 }
7151 this.flexColsCalculatedAtLestOnce = true;
7152 }
7153 return flexingColumns;
7154 };
7155 // called from api
7156 ColumnModel.prototype.sizeColumnsToFit = function (gridWidth, source, silent, params) {
7157 var _a, _b, _c, _d, _e;
7158 if (source === void 0) { source = "sizeColumnsToFit"; }
7159 var limitsMap = {};
7160 if (params) {
7161 (_a = params === null || params === void 0 ? void 0 : params.columnLimits) === null || _a === void 0 ? void 0 : _a.forEach(function (_a) {
7162 var key = _a.key, dimensions = __rest(_a, ["key"]);
7163 limitsMap[typeof key === 'string' ? key : key.getColId()] = dimensions;
7164 });
7165 }
7166 // avoid divide by zero
7167 var allDisplayedColumns = this.getAllDisplayedColumns();
7168 var doColumnsAlreadyFit = gridWidth === this.getWidthOfColsInList(allDisplayedColumns);
7169 if (gridWidth <= 0 || !allDisplayedColumns.length || doColumnsAlreadyFit) {
7170 return;
7171 }
7172 var colsToSpread = [];
7173 var colsToNotSpread = [];
7174 allDisplayedColumns.forEach(function (column) {
7175 if (column.getColDef().suppressSizeToFit === true) {
7176 colsToNotSpread.push(column);
7177 }
7178 else {
7179 colsToSpread.push(column);
7180 }
7181 });
7182 // make a copy of the cols that are going to be resized
7183 var colsToDispatchEventFor = colsToSpread.slice(0);
7184 var finishedResizing = false;
7185 var moveToNotSpread = function (column) {
7186 Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["removeFromArray"])(colsToSpread, column);
7187 colsToNotSpread.push(column);
7188 };
7189 // resetting cols to their original width makes the sizeColumnsToFit more deterministic,
7190 // rather than depending on the current size of the columns. most users call sizeColumnsToFit
7191 // immediately after grid is created, so will make no difference. however if application is calling
7192 // sizeColumnsToFit repeatedly (eg after column group is opened / closed repeatedly) we don't want
7193 // the columns to start shrinking / growing over time.
7194 //
7195 // NOTE: the process below will assign values to `this.actualWidth` of each column without firing events
7196 // for this reason we need to manually dispatch resize events after the resize has been done for each column.
7197 colsToSpread.forEach(function (column) { return column.resetActualWidth(source); });
7198 while (!finishedResizing) {
7199 finishedResizing = true;
7200 var availablePixels = gridWidth - this.getWidthOfColsInList(colsToNotSpread);
7201 if (availablePixels <= 0) {
7202 // no width, set everything to minimum
7203 colsToSpread.forEach(function (column) {
7204 var _a, _b;
7205 var widthOverride = (_b = (_a = limitsMap === null || limitsMap === void 0 ? void 0 : limitsMap[column.getId()]) === null || _a === void 0 ? void 0 : _a.minWidth) !== null && _b !== void 0 ? _b : params === null || params === void 0 ? void 0 : params.defaultMinWidth;
7206 if (typeof widthOverride === 'number') {
7207 column.setActualWidth(widthOverride);
7208 return;
7209 }
7210 column.setMinimum(source);
7211 });
7212 }
7213 else {
7214 var scale = availablePixels / this.getWidthOfColsInList(colsToSpread);
7215 // we set the pixels for the last col based on what's left, as otherwise
7216 // we could be a pixel or two short or extra because of rounding errors.
7217 var pixelsForLastCol = availablePixels;
7218 // backwards through loop, as we are removing items as we go
7219 for (var i = colsToSpread.length - 1; i >= 0; i--) {
7220 var column = colsToSpread[i];
7221 var widthOverride = limitsMap === null || limitsMap === void 0 ? void 0 : limitsMap[column.getId()];
7222 var minOverride = ((_b = widthOverride === null || widthOverride === void 0 ? void 0 : widthOverride.minWidth) !== null && _b !== void 0 ? _b : params === null || params === void 0 ? void 0 : params.defaultMinWidth);
7223 var maxOverride = ((_c = widthOverride === null || widthOverride === void 0 ? void 0 : widthOverride.maxWidth) !== null && _c !== void 0 ? _c : params === null || params === void 0 ? void 0 : params.defaultMaxWidth);
7224 var colMinWidth = (_d = column.getMinWidth()) !== null && _d !== void 0 ? _d : 0;
7225 var colMaxWidth = (_e = column.getMaxWidth()) !== null && _e !== void 0 ? _e : Number.MAX_VALUE;
7226 var minWidth = typeof minOverride === 'number' && minOverride > colMinWidth ? minOverride : column.getMinWidth();
7227 var maxWidth = typeof maxOverride === 'number' && maxOverride < colMaxWidth ? maxOverride : column.getMaxWidth();
7228 var newWidth = Math.round(column.getActualWidth() * scale);
7229 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(minWidth) && newWidth < minWidth) {
7230 newWidth = minWidth;
7231 moveToNotSpread(column);
7232 finishedResizing = false;
7233 }
7234 else if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["exists"])(maxWidth) && newWidth > maxWidth) {
7235 newWidth = maxWidth;
7236 moveToNotSpread(column);
7237 finishedResizing = false;
7238 }
7239 else if (i === 0) { // if this is the last column
7240 newWidth = pixelsForLastCol;
7241 }
7242 column.setActualWidth(newWidth, source, true);
7243 pixelsForLastCol -= newWidth;
7244 }
7245 }
7246 }
7247 // see notes above
7248 colsToDispatchEventFor.forEach(function (col) {
7249 col.fireColumnWidthChangedEvent(source);
7250 });
7251 this.setLeftValues(source);
7252 this.updateBodyWidths();
7253 if (silent) {
7254 return;
7255 }
7256 this.dispatchColumnResizedEvent(colsToDispatchEventFor, true, source);
7257 };
7258 ColumnModel.prototype.buildDisplayedTrees = function (visibleColumns) {
7259 var leftVisibleColumns = [];
7260 var rightVisibleColumns = [];
7261 var centerVisibleColumns = [];
7262 visibleColumns.forEach(function (column) {
7263 switch (column.getPinned()) {
7264 case "left":
7265 leftVisibleColumns.push(column);
7266 break;
7267 case "right":
7268 rightVisibleColumns.push(column);
7269 break;
7270 default:
7271 centerVisibleColumns.push(column);
7272 break;
7273 }
7274 });
7275 var groupInstanceIdCreator = new _groupInstanceIdCreator__WEBPACK_IMPORTED_MODULE_5__["GroupInstanceIdCreator"]();
7276 this.displayedTreeLeft = this.displayedGroupCreator.createDisplayedGroups(leftVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, 'left', this.displayedTreeLeft);
7277 this.displayedTreeRight = this.displayedGroupCreator.createDisplayedGroups(rightVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, 'right', this.displayedTreeRight);
7278 this.displayedTreeCentre = this.displayedGroupCreator.createDisplayedGroups(centerVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, null, this.displayedTreeCentre);
7279 this.updateDisplayedMap();
7280 };
7281 ColumnModel.prototype.updateDisplayedMap = function () {
7282 var _this = this;
7283 this.displayedColumnsAndGroupsMap = {};
7284 var func = function (child) {
7285 _this.displayedColumnsAndGroupsMap[child.getUniqueId()] = child;
7286 };
7287 this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre, func);
7288 this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft, func);
7289 this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight, func);
7290 };
7291 ColumnModel.prototype.isDisplayed = function (item) {
7292 var fromMap = this.displayedColumnsAndGroupsMap[item.getUniqueId()];
7293 // check for reference, in case new column / group with same id is now present
7294 return fromMap === item;
7295 };
7296 ColumnModel.prototype.updateOpenClosedVisibilityInColumnGroups = function () {
7297 var allColumnGroups = this.getAllDisplayedTrees();
7298 this.columnUtils.depthFirstAllColumnTreeSearch(allColumnGroups, function (child) {
7299 if (child instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
7300 var columnGroup = child;
7301 columnGroup.calculateDisplayedColumns();
7302 }
7303 });
7304 };
7305 ColumnModel.prototype.getGroupAutoColumns = function () {
7306 return this.groupAutoColumns;
7307 };
7308 /**
7309 * Creates new auto group columns if required
7310 * @returns whether auto cols have changed
7311 */
7312 ColumnModel.prototype.createGroupAutoColumnsIfNeeded = function () {
7313 if (!this.autoGroupsNeedBuilding) {
7314 return false;
7315 }
7316 this.autoGroupsNeedBuilding = false;
7317 var groupFullWidthRow = this.gridOptionsService.isGroupUseEntireRow(this.pivotMode);
7318 // we need to allow suppressing auto-column separately for group and pivot as the normal situation
7319 // is CSRM and user provides group column themselves for normal view, but when they go into pivot the
7320 // columns are generated by the grid so no opportunity for user to provide group column. so need a way
7321 // to suppress auto-col for grouping only, and not pivot.
7322 // however if using Viewport RM or SSRM and user is providing the columns, the user may wish full control
7323 // of the group column in this instance.
7324 var suppressAutoColumn = this.pivotMode ?
7325 this.gridOptionsService.is('pivotSuppressAutoColumn') : this.isGroupSuppressAutoColumn();
7326 var groupingActive = this.rowGroupColumns.length > 0 || this.usingTreeData;
7327 var needAutoColumns = groupingActive && !suppressAutoColumn && !groupFullWidthRow;
7328 if (needAutoColumns) {
7329 var existingCols = this.groupAutoColumns || [];
7330 var newAutoGroupCols = this.autoGroupColService.createAutoGroupColumns(existingCols, this.rowGroupColumns);
7331 var autoColsDifferent = !this.autoColsEqual(newAutoGroupCols, this.groupAutoColumns);
7332 // we force recreate so new group cols pick up the new
7333 // definitions. otherwise we could ignore the new cols because they appear to be the same.
7334 if (autoColsDifferent || this.forceRecreateAutoGroups) {
7335 this.groupAutoColumns = newAutoGroupCols;
7336 return true;
7337 }
7338 }
7339 else {
7340 this.groupAutoColumns = null;
7341 }
7342 return false;
7343 };
7344 ColumnModel.prototype.isGroupSuppressAutoColumn = function () {
7345 var groupDisplayType = this.gridOptionsService.get('groupDisplayType');
7346 var isCustomRowGroups = groupDisplayType ? Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_13__["matchesGroupDisplayType"])('custom', groupDisplayType) : false;
7347 if (isCustomRowGroups) {
7348 return true;
7349 }
7350 var treeDataDisplayType = this.gridOptionsService.get('treeDataDisplayType');
7351 return treeDataDisplayType ? Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_13__["matchesTreeDataDisplayType"])('custom', treeDataDisplayType) : false;
7352 };
7353 ColumnModel.prototype.autoColsEqual = function (colsA, colsB) {
7354 return Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["areEqual"])(colsA, colsB, function (a, b) { return a.getColId() === b.getColId(); });
7355 };
7356 ColumnModel.prototype.getWidthOfColsInList = function (columnList) {
7357 return columnList.reduce(function (width, col) { return width + col.getActualWidth(); }, 0);
7358 };
7359 ColumnModel.prototype.getGridBalancedTree = function () {
7360 return this.gridBalancedTree;
7361 };
7362 ColumnModel.prototype.hasFloatingFilters = function () {
7363 if (!this.gridColumns) {
7364 return false;
7365 }
7366 var res = this.gridColumns.some(function (col) { return col.getColDef().floatingFilter; });
7367 return res;
7368 };
7369 ColumnModel.prototype.getFirstDisplayedColumn = function () {
7370 var isRtl = this.gridOptionsService.is('enableRtl');
7371 var queryOrder = [
7372 'getDisplayedLeftColumns',
7373 'getDisplayedCenterColumns',
7374 'getDisplayedRightColumns'
7375 ];
7376 if (isRtl) {
7377 queryOrder.reverse();
7378 }
7379 for (var i = 0; i < queryOrder.length; i++) {
7380 var container = this[queryOrder[i]]();
7381 if (container.length) {
7382 return isRtl ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["last"])(container) : container[0];
7383 }
7384 }
7385 return null;
7386 };
7387 ColumnModel.prototype.setColumnHeaderHeight = function (col, height) {
7388 var changed = col.setAutoHeaderHeight(height);
7389 if (changed) {
7390 var event_5 = {
7391 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_HEADER_HEIGHT_CHANGED,
7392 column: col,
7393 columns: [col],
7394 source: 'autosizeColumnHeaderHeight',
7395 };
7396 this.eventService.dispatchEvent(event_5);
7397 }
7398 };
7399 ColumnModel.prototype.getColumnGroupHeaderRowHeight = function () {
7400 if (this.isPivotMode()) {
7401 return this.getPivotGroupHeaderHeight();
7402 }
7403 return this.getGroupHeaderHeight();
7404 };
7405 ColumnModel.prototype.getColumnHeaderRowHeight = function () {
7406 var defaultHeight = (this.isPivotMode() ?
7407 this.getPivotHeaderHeight() :
7408 this.getHeaderHeight());
7409 var displayedHeights = this.getAllDisplayedColumns()
7410 .filter(function (col) { return col.isAutoHeaderHeight(); })
7411 .map(function (col) { return col.getAutoHeaderHeight() || 0; });
7412 return Math.max.apply(Math, __spread([defaultHeight], displayedHeights));
7413 };
7414 ColumnModel.prototype.getHeaderHeight = function () {
7415 var _a;
7416 return (_a = this.gridOptionsService.getNum('headerHeight')) !== null && _a !== void 0 ? _a : this.environment.getFromTheme(25, 'headerHeight');
7417 };
7418 ColumnModel.prototype.getFloatingFiltersHeight = function () {
7419 var _a;
7420 return (_a = this.gridOptionsService.getNum('floatingFiltersHeight')) !== null && _a !== void 0 ? _a : this.getHeaderHeight();
7421 };
7422 ColumnModel.prototype.getGroupHeaderHeight = function () {
7423 var _a;
7424 return (_a = this.gridOptionsService.getNum('groupHeaderHeight')) !== null && _a !== void 0 ? _a : this.getHeaderHeight();
7425 };
7426 ColumnModel.prototype.getPivotHeaderHeight = function () {
7427 var _a;
7428 return (_a = this.gridOptionsService.getNum('pivotHeaderHeight')) !== null && _a !== void 0 ? _a : this.getHeaderHeight();
7429 };
7430 ColumnModel.prototype.getPivotGroupHeaderHeight = function () {
7431 var _a;
7432 return (_a = this.gridOptionsService.getNum('pivotGroupHeaderHeight')) !== null && _a !== void 0 ? _a : this.getGroupHeaderHeight();
7433 };
7434 __decorate([
7435 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('expressionService')
7436 ], ColumnModel.prototype, "expressionService", void 0);
7437 __decorate([
7438 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('columnFactory')
7439 ], ColumnModel.prototype, "columnFactory", void 0);
7440 __decorate([
7441 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('displayedGroupCreator')
7442 ], ColumnModel.prototype, "displayedGroupCreator", void 0);
7443 __decorate([
7444 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('ctrlsService')
7445 ], ColumnModel.prototype, "ctrlsService", void 0);
7446 __decorate([
7447 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('autoWidthCalculator')
7448 ], ColumnModel.prototype, "autoWidthCalculator", void 0);
7449 __decorate([
7450 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('columnUtils')
7451 ], ColumnModel.prototype, "columnUtils", void 0);
7452 __decorate([
7453 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('columnAnimationService')
7454 ], ColumnModel.prototype, "columnAnimationService", void 0);
7455 __decorate([
7456 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('autoGroupColService')
7457 ], ColumnModel.prototype, "autoGroupColService", void 0);
7458 __decorate([
7459 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Optional"])('aggFuncService')
7460 ], ColumnModel.prototype, "aggFuncService", void 0);
7461 __decorate([
7462 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Optional"])('valueCache')
7463 ], ColumnModel.prototype, "valueCache", void 0);
7464 __decorate([
7465 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Optional"])('animationFrameService')
7466 ], ColumnModel.prototype, "animationFrameService", void 0);
7467 __decorate([
7468 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('rowModel')
7469 ], ColumnModel.prototype, "rowModel", void 0);
7470 __decorate([
7471 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('sortController')
7472 ], ColumnModel.prototype, "sortController", void 0);
7473 __decorate([
7474 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Autowired"])('columnDefFactory')
7475 ], ColumnModel.prototype, "columnDefFactory", void 0);
7476 __decorate([
7477 _context_context__WEBPACK_IMPORTED_MODULE_6__["PostConstruct"]
7478 ], ColumnModel.prototype, "init", null);
7479 __decorate([
7480 _context_context__WEBPACK_IMPORTED_MODULE_6__["PreDestroy"]
7481 ], ColumnModel.prototype, "destroyColumns", null);
7482 __decorate([
7483 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Qualifier"])('loggerFactory'))
7484 ], ColumnModel.prototype, "setBeans", null);
7485 ColumnModel = __decorate([
7486 Object(_context_context__WEBPACK_IMPORTED_MODULE_6__["Bean"])('columnModel')
7487 ], ColumnModel);
7488 return ColumnModel;
7489}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
7490
7491
7492
7493/***/ }),
7494/* 21 */
7495/***/ (function(module, __webpack_exports__, __webpack_require__) {
7496
7497"use strict";
7498__webpack_require__.r(__webpack_exports__);
7499/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnGroup", function() { return ColumnGroup; });
7500/* harmony import */ var _column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
7501/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
7502/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
7503/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
7504/* harmony import */ var _gridOptionsValidator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22);
7505/**
7506 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
7507 * @version v29.2.0
7508 * @link https://www.ag-grid.com/
7509 * @license MIT
7510 */
7511var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
7512 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7513 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7514 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;
7515 return c > 3 && r && Object.defineProperty(target, key, r), r;
7516};
7517
7518
7519
7520
7521
7522var ColumnGroup = /** @class */ (function () {
7523 function ColumnGroup(providedColumnGroup, groupId, partId, pinned) {
7524 // depends on the open/closed state of the group, only displaying columns are stored here
7525 this.displayedChildren = [];
7526 this.localEventService = new _eventService__WEBPACK_IMPORTED_MODULE_1__["EventService"]();
7527 this.groupId = groupId;
7528 this.partId = partId;
7529 this.providedColumnGroup = providedColumnGroup;
7530 this.pinned = pinned;
7531 }
7532 // this is static, a it is used outside of this class
7533 ColumnGroup.createUniqueId = function (groupId, instanceId) {
7534 return groupId + '_' + instanceId;
7535 };
7536 // as the user is adding and removing columns, the groups are recalculated.
7537 // this reset clears out all children, ready for children to be added again
7538 ColumnGroup.prototype.reset = function () {
7539 this.parent = null;
7540 this.children = null;
7541 this.displayedChildren = null;
7542 };
7543 ColumnGroup.prototype.getParent = function () {
7544 return this.parent;
7545 };
7546 ColumnGroup.prototype.setParent = function (parent) {
7547 this.parent = parent;
7548 };
7549 ColumnGroup.prototype.getUniqueId = function () {
7550 return ColumnGroup.createUniqueId(this.groupId, this.partId);
7551 };
7552 ColumnGroup.prototype.isEmptyGroup = function () {
7553 return this.displayedChildren.length === 0;
7554 };
7555 ColumnGroup.prototype.isMoving = function () {
7556 var allLeafColumns = this.getProvidedColumnGroup().getLeafColumns();
7557 if (!allLeafColumns || allLeafColumns.length === 0) {
7558 return false;
7559 }
7560 return allLeafColumns.every(function (col) { return col.isMoving(); });
7561 };
7562 ColumnGroup.prototype.checkLeft = function () {
7563 // first get all children to setLeft, as it impacts our decision below
7564 this.displayedChildren.forEach(function (child) {
7565 if (child instanceof ColumnGroup) {
7566 child.checkLeft();
7567 }
7568 });
7569 // set our left based on first displayed column
7570 if (this.displayedChildren.length > 0) {
7571 if (this.gridOptionsService.is('enableRtl')) {
7572 var lastChild = Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(this.displayedChildren);
7573 var lastChildLeft = lastChild.getLeft();
7574 this.setLeft(lastChildLeft);
7575 }
7576 else {
7577 var firstChildLeft = this.displayedChildren[0].getLeft();
7578 this.setLeft(firstChildLeft);
7579 }
7580 }
7581 else {
7582 // this should never happen, as if we have no displayed columns, then
7583 // this groups should not even exist.
7584 this.setLeft(null);
7585 }
7586 };
7587 ColumnGroup.prototype.getLeft = function () {
7588 return this.left;
7589 };
7590 ColumnGroup.prototype.getOldLeft = function () {
7591 return this.oldLeft;
7592 };
7593 ColumnGroup.prototype.setLeft = function (left) {
7594 this.oldLeft = left;
7595 if (this.left !== left) {
7596 this.left = left;
7597 this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_LEFT_CHANGED));
7598 }
7599 };
7600 ColumnGroup.prototype.getPinned = function () {
7601 return this.pinned;
7602 };
7603 ColumnGroup.prototype.createAgEvent = function (type) {
7604 return { type: type };
7605 };
7606 ColumnGroup.prototype.addEventListener = function (eventType, listener) {
7607 this.localEventService.addEventListener(eventType, listener);
7608 };
7609 ColumnGroup.prototype.removeEventListener = function (eventType, listener) {
7610 this.localEventService.removeEventListener(eventType, listener);
7611 };
7612 ColumnGroup.prototype.getGroupId = function () {
7613 return this.groupId;
7614 };
7615 ColumnGroup.prototype.getPartId = function () {
7616 return this.partId;
7617 };
7618 ColumnGroup.prototype.isChildInThisGroupDeepSearch = function (wantedChild) {
7619 var result = false;
7620 this.children.forEach(function (foundChild) {
7621 if (wantedChild === foundChild) {
7622 result = true;
7623 }
7624 if (foundChild instanceof ColumnGroup) {
7625 if (foundChild.isChildInThisGroupDeepSearch(wantedChild)) {
7626 result = true;
7627 }
7628 }
7629 });
7630 return result;
7631 };
7632 ColumnGroup.prototype.getActualWidth = function () {
7633 var groupActualWidth = 0;
7634 if (this.displayedChildren) {
7635 this.displayedChildren.forEach(function (child) {
7636 groupActualWidth += child.getActualWidth();
7637 });
7638 }
7639 return groupActualWidth;
7640 };
7641 ColumnGroup.prototype.isResizable = function () {
7642 if (!this.displayedChildren) {
7643 return false;
7644 }
7645 // if at least one child is resizable, then the group is resizable
7646 var result = false;
7647 this.displayedChildren.forEach(function (child) {
7648 if (child.isResizable()) {
7649 result = true;
7650 }
7651 });
7652 return result;
7653 };
7654 ColumnGroup.prototype.getMinWidth = function () {
7655 var result = 0;
7656 this.displayedChildren.forEach(function (groupChild) {
7657 result += groupChild.getMinWidth() || 0;
7658 });
7659 return result;
7660 };
7661 ColumnGroup.prototype.addChild = function (child) {
7662 if (!this.children) {
7663 this.children = [];
7664 }
7665 this.children.push(child);
7666 };
7667 ColumnGroup.prototype.getDisplayedChildren = function () {
7668 return this.displayedChildren;
7669 };
7670 ColumnGroup.prototype.getLeafColumns = function () {
7671 var result = [];
7672 this.addLeafColumns(result);
7673 return result;
7674 };
7675 ColumnGroup.prototype.getDisplayedLeafColumns = function () {
7676 var result = [];
7677 this.addDisplayedLeafColumns(result);
7678 return result;
7679 };
7680 ColumnGroup.prototype.getDefinition = function () {
7681 return this.providedColumnGroup.getColGroupDef();
7682 };
7683 ColumnGroup.prototype.getColGroupDef = function () {
7684 return this.providedColumnGroup.getColGroupDef();
7685 };
7686 ColumnGroup.prototype.isPadding = function () {
7687 return this.providedColumnGroup.isPadding();
7688 };
7689 ColumnGroup.prototype.isExpandable = function () {
7690 return this.providedColumnGroup.isExpandable();
7691 };
7692 ColumnGroup.prototype.isExpanded = function () {
7693 return this.providedColumnGroup.isExpanded();
7694 };
7695 ColumnGroup.prototype.setExpanded = function (expanded) {
7696 this.providedColumnGroup.setExpanded(expanded);
7697 };
7698 ColumnGroup.prototype.addDisplayedLeafColumns = function (leafColumns) {
7699 this.displayedChildren.forEach(function (child) {
7700 if (child instanceof _column__WEBPACK_IMPORTED_MODULE_0__["Column"]) {
7701 leafColumns.push(child);
7702 }
7703 else if (child instanceof ColumnGroup) {
7704 child.addDisplayedLeafColumns(leafColumns);
7705 }
7706 });
7707 };
7708 ColumnGroup.prototype.addLeafColumns = function (leafColumns) {
7709 this.children.forEach(function (child) {
7710 if (child instanceof _column__WEBPACK_IMPORTED_MODULE_0__["Column"]) {
7711 leafColumns.push(child);
7712 }
7713 else if (child instanceof ColumnGroup) {
7714 child.addLeafColumns(leafColumns);
7715 }
7716 });
7717 };
7718 ColumnGroup.prototype.getChildren = function () {
7719 return this.children;
7720 };
7721 ColumnGroup.prototype.getColumnGroupShow = function () {
7722 return this.providedColumnGroup.getColumnGroupShow();
7723 };
7724 ColumnGroup.prototype.getProvidedColumnGroup = function () {
7725 return this.providedColumnGroup;
7726 };
7727 /** @deprecated v27 getOriginalColumnGroup is deprecated, use getProvidedColumnGroup. */
7728 ColumnGroup.prototype.getOriginalColumnGroup = function () {
7729 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_4__["logDeprecation"])('27', 'getOriginalColumnGroup', 'getProvidedColumnGroup');
7730 return this.getProvidedColumnGroup();
7731 };
7732 ColumnGroup.prototype.getPaddingLevel = function () {
7733 var parent = this.getParent();
7734 if (!this.isPadding() || !parent || !parent.isPadding()) {
7735 return 0;
7736 }
7737 return 1 + parent.getPaddingLevel();
7738 };
7739 ColumnGroup.prototype.calculateDisplayedColumns = function () {
7740 var _this = this;
7741 // clear out last time we calculated
7742 this.displayedChildren = [];
7743 // find the column group that is controlling expandable. this is relevant when we have padding (empty)
7744 // groups, where the expandable is actually the first parent that is not a padding group.
7745 var parentWithExpansion = this;
7746 while (parentWithExpansion != null && parentWithExpansion.isPadding()) {
7747 parentWithExpansion = parentWithExpansion.getParent();
7748 }
7749 var isExpandable = parentWithExpansion ? parentWithExpansion.providedColumnGroup.isExpandable() : false;
7750 // it not expandable, everything is visible
7751 if (!isExpandable) {
7752 this.displayedChildren = this.children;
7753 this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED));
7754 return;
7755 }
7756 // Add cols based on columnGroupShow
7757 // Note - the below also adds padding groups, these are always added because they never have
7758 // colDef.columnGroupShow set.
7759 this.children.forEach(function (child) {
7760 // never add empty groups
7761 var emptyGroup = child instanceof ColumnGroup && (!child.displayedChildren || !child.displayedChildren.length);
7762 if (emptyGroup) {
7763 return;
7764 }
7765 var headerGroupShow = child.getColumnGroupShow();
7766 switch (headerGroupShow) {
7767 case 'open':
7768 // when set to open, only show col if group is open
7769 if (parentWithExpansion.providedColumnGroup.isExpanded()) {
7770 _this.displayedChildren.push(child);
7771 }
7772 break;
7773 case 'closed':
7774 // when set to open, only show col if group is open
7775 if (!parentWithExpansion.providedColumnGroup.isExpanded()) {
7776 _this.displayedChildren.push(child);
7777 }
7778 break;
7779 default:
7780 _this.displayedChildren.push(child);
7781 break;
7782 }
7783 });
7784 this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED));
7785 };
7786 ColumnGroup.EVENT_LEFT_CHANGED = 'leftChanged';
7787 ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED = 'displayedChildrenChanged';
7788 __decorate([
7789 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('gridOptionsService')
7790 ], ColumnGroup.prototype, "gridOptionsService", void 0);
7791 return ColumnGroup;
7792}());
7793
7794
7795
7796/***/ }),
7797/* 22 */
7798/***/ (function(module, __webpack_exports__, __webpack_require__) {
7799
7800"use strict";
7801__webpack_require__.r(__webpack_exports__);
7802/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logDeprecation", function() { return logDeprecation; });
7803/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridOptionsValidator", function() { return GridOptionsValidator; });
7804/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesGroupDisplayType", function() { return matchesGroupDisplayType; });
7805/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesTreeDataDisplayType", function() { return matchesTreeDataDisplayType; });
7806/* harmony import */ var _components_colDefUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
7807/* harmony import */ var _components_componentUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24);
7808/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
7809/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
7810/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15);
7811/* harmony import */ var _propertyKeys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27);
7812/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13);
7813/* harmony import */ var _utils_fuzzyMatch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(28);
7814/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12);
7815/**
7816 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
7817 * @version v29.2.0
7818 * @link https://www.ag-grid.com/
7819 * @license MIT
7820 */
7821var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
7822 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7823 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7824 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;
7825 return c > 3 && r && Object.defineProperty(target, key, r), r;
7826};
7827var __read = (undefined && undefined.__read) || function (o, n) {
7828 var m = typeof Symbol === "function" && o[Symbol.iterator];
7829 if (!m) return o;
7830 var i = m.call(o), r, ar = [], e;
7831 try {
7832 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7833 }
7834 catch (error) { e = { error: error }; }
7835 finally {
7836 try {
7837 if (r && !r.done && (m = i["return"])) m.call(i);
7838 }
7839 finally { if (e) throw e.error; }
7840 }
7841 return ar;
7842};
7843var __spread = (undefined && undefined.__spread) || function () {
7844 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
7845 return ar;
7846};
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856function logDeprecation(version, oldProp, newProp, message) {
7857 var newPropMsg = newProp ? "Please use '" + newProp + "' instead. " : '';
7858 Object(_utils_function__WEBPACK_IMPORTED_MODULE_6__["doOnce"])(function () { return console.warn("AG Grid: since v" + version + ", '" + oldProp + "' is deprecated. " + newPropMsg + (message !== null && message !== void 0 ? message : '')); }, "Deprecated_" + oldProp);
7859}
7860var GridOptionsValidator = /** @class */ (function () {
7861 function GridOptionsValidator() {
7862 this.deprecatedProperties = {
7863 serverSideInfiniteScroll: { version: '29', message: 'Infinite Scrolling is now the default behaviour. This can be suppressed with `suppressServerSideInfiniteScroll`.' },
7864 rememberGroupStateWhenNewData: { version: '24', message: 'Now that transaction updates are possible and they keep group state, this feature is no longer needed.' },
7865 suppressEnterpriseResetOnNewColumns: { version: '25', message: 'Now that it is possible to dynamically change columns in the grid, this is no longer needed.' },
7866 suppressColumnStateEvents: { version: '25', message: 'Events should be ignored based on the `event.source`, which will be "api" if the event was due to setting column state via the API.' },
7867 defaultExportParams: { version: '25.2', message: 'The property `defaultExportParams` has been replaced by `defaultCsvExportParams` and `defaultExcelExportParams`' },
7868 stopEditingWhenGridLosesFocus: { version: '25.2.2', newProp: 'stopEditingWhenCellsLoseFocus', copyToNewProp: true },
7869 applyColumnDefOrder: { version: '26', message: 'The property `applyColumnDefOrder` is no longer needed, as this is the default behaviour. To turn this behaviour off, set maintainColumnOrder=true' },
7870 groupMultiAutoColumn: { version: '26', newProp: 'groupDisplayType', copyToNewProp: true, newPropValue: 'multipleColumns' },
7871 groupUseEntireRow: { version: '26', newProp: 'groupDisplayType', copyToNewProp: true, newPropValue: 'groupRows' },
7872 defaultGroupSortComparator: { version: '26', newProp: 'initialGroupOrderComparator' },
7873 enableMultiRowDragging: { version: '26.1', newProp: 'rowDragMultiRow', copyToNewProp: true },
7874 colWidth: { version: '26.1', newProp: 'defaultColDef.width' },
7875 minColWidth: { version: '26.1', newProp: 'defaultColDef.minWidth' },
7876 maxColWidth: { version: '26.1', newProp: 'defaultColDef.maxWidth' },
7877 reactUi: { version: '26.1', message: 'React UI is on by default, so no need for reactUi=true. To turn it off, set suppressReactUi=true.' },
7878 suppressCellSelection: { version: '27', newProp: 'suppressCellFocus', copyToNewProp: true },
7879 clipboardDeliminator: { version: '27.1', newProp: 'clipboardDelimiter', copyToNewProp: true },
7880 getRowNodeId: { version: '27.1', newProp: 'getRowId', message: 'The difference: if getRowId() is implemented then immutable data is enabled by default.' },
7881 defaultGroupOrderComparator: { version: '27.2', newProp: 'initialGroupOrderComparator' },
7882 groupRowAggNodes: { version: '27.2', newProp: 'getGroupRowAgg' },
7883 postSort: { version: '27.2', newProp: 'postSortRows' },
7884 isFullWidthCell: { version: '27.2', newProp: 'isFullWidthRow' },
7885 localeTextFunc: { version: '27.2', newProp: 'getLocaleText' },
7886 serverSideFilteringAlwaysResets: { version: '28.0', newProp: 'serverSideFilterAllLevels', copyToNewProp: true, },
7887 serverSideSortingAlwaysResets: { version: '28.0', newProp: 'serverSideSortAllLevels', copyToNewProp: true, },
7888 suppressReactUi: { version: '28', message: 'The legacy React rendering engine is deprecated and will be removed in the next major version of the grid.' },
7889 processSecondaryColDef: { version: '28', newProp: 'processPivotResultColDef', copyToNewProp: true },
7890 processSecondaryColGroupDef: { version: '28', newProp: 'processPivotResultColGroupDef', copyToNewProp: true },
7891 getServerSideStoreParams: { version: '28', newProp: 'getServerSideGroupLevelParams', copyToNewProp: true },
7892 enableChartToolPanelsButton: { version: '29', message: 'The Chart Tool Panels button is now enabled by default. To hide the Chart Tool Panels button and display the hamburger button instead, set suppressChartToolPanelsButton=true.' },
7893 functionsPassive: { version: '29.2' },
7894 onColumnRowGroupChangeRequest: { version: '29.2' },
7895 onColumnPivotChangeRequest: { version: '29.2' },
7896 onColumnValueChangeRequest: { version: '29.2' },
7897 onColumnAggFuncChangeRequest: { version: '29.2' },
7898 };
7899 }
7900 GridOptionsValidator.prototype.pickOneWarning = function (prop1, prop2) {
7901 console.warn("AG Grid: " + prop1 + " and " + prop2 + " do not work with each other, you need to pick one.");
7902 };
7903 GridOptionsValidator.prototype.init = function () {
7904 var _this = this;
7905 this.checkForDeprecated();
7906 this.checkForViolations();
7907 if (this.gridOptions.suppressPropertyNamesCheck !== true) {
7908 this.checkGridOptionsProperties();
7909 this.checkColumnDefProperties();
7910 }
7911 this.checkColumnDefViolations();
7912 if (this.gridOptionsService.is('groupSelectsChildren') && this.gridOptionsService.is('suppressParentsInRowNodes')) {
7913 console.warn("AG Grid: 'groupSelectsChildren' does not work with 'suppressParentsInRowNodes', this selection method needs the part in rowNode to work");
7914 }
7915 if (this.gridOptionsService.is('groupSelectsChildren')) {
7916 if (this.gridOptionsService.get('rowSelection') !== 'multiple') {
7917 console.warn("AG Grid: rowSelection must be 'multiple' for groupSelectsChildren to make sense");
7918 }
7919 }
7920 if (this.gridOptionsService.is('groupRemoveSingleChildren') && this.gridOptionsService.is('groupHideOpenParents')) {
7921 this.pickOneWarning('groupRemoveSingleChildren', 'groupHideOpenParents');
7922 }
7923 if (this.gridOptionsService.isRowModelType('serverSide')) {
7924 var msg = function (prop, alt) { return ("AG Grid: '" + prop + "' is not supported on the Server-Side Row Model." + (alt ? " Please use " + alt + " instead." : '')); };
7925 if (this.gridOptionsService.exists('groupDefaultExpanded')) {
7926 console.warn(msg('groupDefaultExpanded', 'isServerSideGroupOpenByDefault callback'));
7927 }
7928 if (this.gridOptionsService.exists('groupIncludeFooter')) {
7929 console.warn(msg('groupIncludeFooter'));
7930 }
7931 if (this.gridOptionsService.exists('groupIncludeTotalFooter')) {
7932 console.warn(msg('groupIncludeTotalFooter'));
7933 }
7934 }
7935 if (this.gridOptionsService.is('enableRangeSelection')) {
7936 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].RangeSelectionModule, 'enableRangeSelection');
7937 }
7938 else if (this.gridOptionsService.is('enableRangeHandle') || this.gridOptionsService.is('enableFillHandle')) {
7939 console.warn("AG Grid: 'enableRangeHandle' or 'enableFillHandle' will not work unless 'enableRangeSelection' is set to true");
7940 }
7941 var validateRegistered = function (prop, module) { return _this.gridOptionsService.exists(prop) && _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__["ModuleRegistry"].assertRegistered(module, prop); };
7942 // Ensure the SideBar is registered which will then lead them to register Column / Filter Tool panels as required by their config.
7943 // It is possible to use the SideBar only with your own custom tool panels.
7944 validateRegistered('sideBar', _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].SideBarModule);
7945 validateRegistered('statusBar', _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].StatusBarModule);
7946 validateRegistered('enableCharts', _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].GridChartsModule);
7947 validateRegistered('getMainMenuItems', _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].MenuModule);
7948 validateRegistered('getContextMenuItems', _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].MenuModule);
7949 validateRegistered('allowContextMenuWithControlKey', _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].MenuModule);
7950 if (this.gridOptionsService.is('groupRowsSticky')) {
7951 if (this.gridOptionsService.is('groupHideOpenParents')) {
7952 this.pickOneWarning('groupRowsSticky', 'groupHideOpenParents');
7953 }
7954 if (this.gridOptionsService.is('masterDetail')) {
7955 this.pickOneWarning('groupRowsSticky', 'masterDetail');
7956 }
7957 if (this.gridOptionsService.is('pagination')) {
7958 this.pickOneWarning('groupRowsSticky', 'pagination');
7959 }
7960 }
7961 };
7962 GridOptionsValidator.prototype.checkColumnDefProperties = function () {
7963 var _this = this;
7964 if (this.gridOptions.columnDefs == null) {
7965 return;
7966 }
7967 this.gridOptions.columnDefs.forEach(function (colDef) {
7968 var userProperties = Object.getOwnPropertyNames(colDef);
7969 var validProperties = __spread(_components_colDefUtil__WEBPACK_IMPORTED_MODULE_0__["ColDefUtil"].ALL_PROPERTIES, _components_colDefUtil__WEBPACK_IMPORTED_MODULE_0__["ColDefUtil"].FRAMEWORK_PROPERTIES);
7970 _this.checkProperties(userProperties, validProperties, validProperties, 'colDef', 'https://www.ag-grid.com/javascript-data-grid/column-properties/');
7971 });
7972 };
7973 GridOptionsValidator.prototype.checkColumnDefViolations = function () {
7974 var _a;
7975 var rowModel = (_a = this.gridOptionsService.get('rowModelType')) !== null && _a !== void 0 ? _a : 'clientSide';
7976 var unsupportedPropertiesMap = {
7977 infinite: ['headerCheckboxSelection', 'headerCheckboxSelectionFilteredOnly', 'headerCheckboxSelectionCurrentPageOnly'],
7978 viewport: ['headerCheckboxSelection', 'headerCheckboxSelectionFilteredOnly', 'headerCheckboxSelectionCurrentPageOnly'],
7979 serverSide: ['headerCheckboxSelectionFilteredOnly', 'headerCheckboxSelectionCurrentPageOnly'],
7980 clientSide: [],
7981 };
7982 var unsupportedProperties = unsupportedPropertiesMap[rowModel];
7983 if (!(unsupportedProperties === null || unsupportedProperties === void 0 ? void 0 : unsupportedProperties.length)) {
7984 return;
7985 }
7986 var validateColDef = function (colDef) {
7987 unsupportedProperties.forEach(function (property) {
7988 if (property in colDef && !!colDef[property]) {
7989 console.warn("AG Grid: Column property " + property + " is not supported with the row model type " + rowModel + ".");
7990 }
7991 });
7992 };
7993 if (this.gridOptions.columnDefs != null) {
7994 this.gridOptions.columnDefs.forEach(function (colDef) { return validateColDef(colDef); });
7995 }
7996 if (this.gridOptions.autoGroupColumnDef != null) {
7997 validateColDef(this.gridOptions.autoGroupColumnDef);
7998 }
7999 if (this.gridOptions.defaultColDef != null) {
8000 validateColDef(this.gridOptions.defaultColDef);
8001 }
8002 };
8003 GridOptionsValidator.prototype.checkGridOptionsProperties = function () {
8004 var userProperties = Object.getOwnPropertyNames(this.gridOptions);
8005 var validProperties = __spread(_propertyKeys__WEBPACK_IMPORTED_MODULE_5__["PropertyKeys"].ALL_PROPERTIES, _propertyKeys__WEBPACK_IMPORTED_MODULE_5__["PropertyKeys"].FRAMEWORK_PROPERTIES, _components_componentUtil__WEBPACK_IMPORTED_MODULE_1__["ComponentUtil"].EVENT_CALLBACKS);
8006 var validPropertiesAndExceptions = __spread(validProperties, ['api', 'columnApi'], Object.keys(this.deprecatedProperties));
8007 this.checkProperties(userProperties, validPropertiesAndExceptions, validProperties, 'gridOptions', 'https://www.ag-grid.com/javascript-data-grid/grid-options/');
8008 };
8009 GridOptionsValidator.prototype.checkProperties = function (userProperties, validPropertiesAndExceptions, validProperties, containerName, docsUrl) {
8010 var invalidProperties = Object(_utils_fuzzyMatch__WEBPACK_IMPORTED_MODULE_7__["fuzzyCheckStrings"])(userProperties, validPropertiesAndExceptions, validProperties);
8011 Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["iterateObject"])(invalidProperties, function (key, value) {
8012 console.warn("AG Grid: invalid " + containerName + " property '" + key + "' did you mean any of these: " + value.slice(0, 8).join(", "));
8013 });
8014 if (Object.keys(invalidProperties).length > 0) {
8015 console.warn("AG Grid: to see all the valid " + containerName + " properties please check: " + docsUrl);
8016 }
8017 };
8018 GridOptionsValidator.prototype.checkForDeprecated = function () {
8019 // casting to generic object, so typescript compiles even though
8020 // we are looking for attributes that don't exist
8021 var options = this.gridOptions;
8022 Object.entries(this.deprecatedProperties).forEach(function (_a) {
8023 var _b;
8024 var _c = __read(_a, 2), oldProp = _c[0], details = _c[1];
8025 var oldPropValue = options[oldProp];
8026 if (oldPropValue) {
8027 logDeprecation(details.version, oldProp, details.newProp, details.message);
8028 if (details.copyToNewProp && details.newProp && options[details.newProp] == null) {
8029 options[details.newProp] = (_b = details.newPropValue) !== null && _b !== void 0 ? _b : oldPropValue;
8030 }
8031 }
8032 });
8033 // Manual messages and deprecation behaviour that don't fit our standard approach above.
8034 if (options.groupSuppressAutoColumn) {
8035 var propName = options.treeData ? 'treeDataDisplayType' : 'groupDisplayType';
8036 console.warn("AG Grid: since v26.0, the grid property `groupSuppressAutoColumn` has been replaced by `" + propName + " = 'custom'`");
8037 options[propName] = 'custom';
8038 }
8039 if (options.immutableData) {
8040 if (options.getRowId) {
8041 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`.');
8042 }
8043 else {
8044 console.warn('AG Grid: since v27.1, `immutableData` is deprecated. To enable immutable data you must implement the `getRowId()` callback.');
8045 }
8046 }
8047 if (options.serverSideStoreType) {
8048 console.warn('AG Grid: since v29.0, `serverSideStoreType` has been replaced by `suppressServerSideInfiniteScroll`. Set to false to use Partial Store, and true to use Full Store.');
8049 options.suppressServerSideInfiniteScroll = options.serverSideStoreType !== 'partial';
8050 }
8051 };
8052 GridOptionsValidator.prototype.checkForViolations = function () {
8053 if (this.gridOptionsService.is('treeData')) {
8054 this.treeDataViolations();
8055 }
8056 };
8057 GridOptionsValidator.prototype.treeDataViolations = function () {
8058 if (this.gridOptionsService.isRowModelType('clientSide')) {
8059 if (!this.gridOptionsService.exists('getDataPath')) {
8060 console.warn('AG Grid: property usingTreeData=true with rowModel=clientSide, but you did not ' +
8061 'provide getDataPath function, please provide getDataPath function if using tree data.');
8062 }
8063 }
8064 if (this.gridOptionsService.isRowModelType('serverSide')) {
8065 if (!this.gridOptionsService.exists('isServerSideGroup')) {
8066 console.warn('AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not ' +
8067 'provide isServerSideGroup function, please provide isServerSideGroup function if using tree data.');
8068 }
8069 if (!this.gridOptionsService.exists('getServerSideGroupKey')) {
8070 console.warn('AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not ' +
8071 'provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data.');
8072 }
8073 }
8074 };
8075 __decorate([
8076 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('gridOptions')
8077 ], GridOptionsValidator.prototype, "gridOptions", void 0);
8078 __decorate([
8079 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('gridOptionsService')
8080 ], GridOptionsValidator.prototype, "gridOptionsService", void 0);
8081 __decorate([
8082 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
8083 ], GridOptionsValidator.prototype, "init", null);
8084 GridOptionsValidator = __decorate([
8085 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('gridOptionsValidator')
8086 ], GridOptionsValidator);
8087 return GridOptionsValidator;
8088}());
8089
8090function matchesGroupDisplayType(toMatch, supplied) {
8091 var groupDisplayTypeValues = ['groupRows', 'multipleColumns', 'custom', 'singleColumn'];
8092 if (groupDisplayTypeValues.indexOf(supplied) < 0) {
8093 console.warn("AG Grid: '" + supplied + "' is not a valid groupDisplayType value - possible values are: '" + groupDisplayTypeValues.join("', '") + "'");
8094 return false;
8095 }
8096 return supplied === toMatch;
8097}
8098function matchesTreeDataDisplayType(toMatch, supplied) {
8099 var treeDataDisplayTypeValues = ['auto', 'custom'];
8100 if (treeDataDisplayTypeValues.indexOf(supplied) < 0) {
8101 console.warn("AG Grid: '" + supplied + "' is not a valid treeDataDisplayType value - possible values are: '" + treeDataDisplayTypeValues.join("', '") + "'");
8102 return false;
8103 }
8104 return supplied === toMatch;
8105}
8106
8107
8108/***/ }),
8109/* 23 */
8110/***/ (function(module, __webpack_exports__, __webpack_require__) {
8111
8112"use strict";
8113__webpack_require__.r(__webpack_exports__);
8114/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColDefUtil", function() { return ColDefUtil; });
8115/**
8116 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8117 * @version v29.2.0
8118 * @link https://www.ag-grid.com/
8119 * @license MIT
8120 */
8121var ColDefUtil = /** @class */ (function () {
8122 function ColDefUtil() {
8123 }
8124 ColDefUtil.ColDefPropertyMap = {
8125 headerName: undefined,
8126 columnGroupShow: undefined,
8127 headerClass: undefined,
8128 toolPanelClass: undefined,
8129 headerValueGetter: undefined,
8130 pivotKeys: undefined,
8131 groupId: undefined,
8132 colId: undefined,
8133 sort: undefined,
8134 initialSort: undefined,
8135 field: undefined,
8136 type: undefined,
8137 tooltipComponent: undefined,
8138 tooltipField: undefined,
8139 headerTooltip: undefined,
8140 cellClass: undefined,
8141 showRowGroup: undefined,
8142 filter: undefined,
8143 initialAggFunc: undefined,
8144 defaultAggFunc: undefined,
8145 aggFunc: undefined,
8146 pinned: undefined,
8147 initialPinned: undefined,
8148 chartDataType: undefined,
8149 cellEditorPopupPosition: undefined,
8150 headerGroupComponent: undefined,
8151 headerGroupComponentFramework: undefined,
8152 headerGroupComponentParams: undefined,
8153 cellStyle: undefined,
8154 cellRenderer: undefined,
8155 cellRendererParams: undefined,
8156 cellRendererFramework: undefined,
8157 cellEditor: undefined,
8158 cellEditorFramework: undefined,
8159 cellEditorParams: undefined,
8160 filterFramework: undefined,
8161 filterParams: undefined,
8162 pivotValueColumn: undefined,
8163 headerComponent: undefined,
8164 headerComponentFramework: undefined,
8165 headerComponentParams: undefined,
8166 floatingFilterComponent: undefined,
8167 floatingFilterComponentParams: undefined,
8168 floatingFilterComponentFramework: undefined,
8169 tooltipComponentParams: undefined,
8170 tooltipComponentFramework: undefined,
8171 refData: undefined,
8172 columnsMenuParams: undefined,
8173 children: undefined,
8174 sortingOrder: undefined,
8175 allowedAggFuncs: undefined,
8176 menuTabs: undefined,
8177 pivotTotalColumnIds: undefined,
8178 cellClassRules: undefined,
8179 icons: undefined,
8180 sortIndex: undefined,
8181 initialSortIndex: undefined,
8182 flex: undefined,
8183 initialFlex: undefined,
8184 width: undefined,
8185 initialWidth: undefined,
8186 minWidth: undefined,
8187 maxWidth: undefined,
8188 rowGroupIndex: undefined,
8189 initialRowGroupIndex: undefined,
8190 pivotIndex: undefined,
8191 initialPivotIndex: undefined,
8192 suppressCellFlash: undefined,
8193 suppressColumnsToolPanel: undefined,
8194 suppressFiltersToolPanel: undefined,
8195 openByDefault: undefined,
8196 marryChildren: undefined,
8197 hide: undefined,
8198 initialHide: undefined,
8199 rowGroup: undefined,
8200 initialRowGroup: undefined,
8201 pivot: undefined,
8202 initialPivot: undefined,
8203 checkboxSelection: undefined,
8204 showDisabledCheckboxes: undefined,
8205 headerCheckboxSelection: undefined,
8206 headerCheckboxSelectionFilteredOnly: undefined,
8207 headerCheckboxSelectionCurrentPageOnly: undefined,
8208 suppressMenu: undefined,
8209 suppressMovable: undefined,
8210 lockPosition: undefined,
8211 lockVisible: undefined,
8212 lockPinned: undefined,
8213 unSortIcon: undefined,
8214 suppressSizeToFit: undefined,
8215 suppressAutoSize: undefined,
8216 enableRowGroup: undefined,
8217 enablePivot: undefined,
8218 enableValue: undefined,
8219 editable: undefined,
8220 suppressPaste: undefined,
8221 suppressNavigable: undefined,
8222 enableCellChangeFlash: undefined,
8223 rowDrag: undefined,
8224 dndSource: undefined,
8225 autoHeight: undefined,
8226 wrapText: undefined,
8227 sortable: undefined,
8228 resizable: undefined,
8229 singleClickEdit: undefined,
8230 floatingFilter: undefined,
8231 cellEditorPopup: undefined,
8232 suppressFillHandle: undefined,
8233 wrapHeaderText: undefined,
8234 autoHeaderHeight: undefined,
8235 dndSourceOnRowDrag: undefined,
8236 valueGetter: undefined,
8237 valueSetter: undefined,
8238 filterValueGetter: undefined,
8239 keyCreator: undefined,
8240 valueFormatter: undefined,
8241 valueParser: undefined,
8242 comparator: undefined,
8243 equals: undefined,
8244 pivotComparator: undefined,
8245 suppressKeyboardEvent: undefined,
8246 suppressHeaderKeyboardEvent: undefined,
8247 colSpan: undefined,
8248 rowSpan: undefined,
8249 getQuickFilterText: undefined,
8250 onCellValueChanged: undefined,
8251 onCellClicked: undefined,
8252 onCellDoubleClicked: undefined,
8253 onCellContextMenu: undefined,
8254 rowDragText: undefined,
8255 tooltipValueGetter: undefined,
8256 cellRendererSelector: undefined,
8257 cellEditorSelector: undefined,
8258 spanHeaderHeight: undefined
8259 };
8260 ColDefUtil.ALL_PROPERTIES = Object.keys(ColDefUtil.ColDefPropertyMap);
8261 // used when doing property checks - this causes noise when using frameworks which can add their own fw specific
8262 // properties to colDefs, gridOptions etc
8263 ColDefUtil.FRAMEWORK_PROPERTIES = [
8264 '__ob__',
8265 '__v_skip',
8266 '__metadata__',
8267 'mappedColumnProperties',
8268 'hasChildColumns',
8269 'toColDef',
8270 'createColDefFromGridColumn'
8271 ];
8272 return ColDefUtil;
8273}());
8274
8275
8276
8277/***/ }),
8278/* 24 */
8279/***/ (function(module, __webpack_exports__, __webpack_require__) {
8280
8281"use strict";
8282__webpack_require__.r(__webpack_exports__);
8283/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentUtil", function() { return ComponentUtil; });
8284/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
8285/* harmony import */ var _propertyKeys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27);
8286/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
8287/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
8288/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
8289/**
8290 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8291 * @version v29.2.0
8292 * @link https://www.ag-grid.com/
8293 * @license MIT
8294 */
8295var __assign = (undefined && undefined.__assign) || function () {
8296 __assign = Object.assign || function(t) {
8297 for (var s, i = 1, n = arguments.length; i < n; i++) {
8298 s = arguments[i];
8299 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8300 t[p] = s[p];
8301 }
8302 return t;
8303 };
8304 return __assign.apply(this, arguments);
8305};
8306var __read = (undefined && undefined.__read) || function (o, n) {
8307 var m = typeof Symbol === "function" && o[Symbol.iterator];
8308 if (!m) return o;
8309 var i = m.call(o), r, ar = [], e;
8310 try {
8311 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8312 }
8313 catch (error) { e = { error: error }; }
8314 finally {
8315 try {
8316 if (r && !r.done && (m = i["return"])) m.call(i);
8317 }
8318 finally { if (e) throw e.error; }
8319 }
8320 return ar;
8321};
8322var __spread = (undefined && undefined.__spread) || function () {
8323 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
8324 return ar;
8325};
8326
8327
8328
8329
8330
8331var ComponentUtil = /** @class */ (function () {
8332 function ComponentUtil() {
8333 }
8334 ComponentUtil.getCallbackForEvent = function (eventName) {
8335 if (!eventName || eventName.length < 2) {
8336 return eventName;
8337 }
8338 return 'on' + eventName[0].toUpperCase() + eventName.substr(1);
8339 };
8340 ComponentUtil.getCoercionLookup = function () {
8341 var coercionLookup = {};
8342 __spread(ComponentUtil.ARRAY_PROPERTIES, ComponentUtil.OBJECT_PROPERTIES, ComponentUtil.STRING_PROPERTIES, ComponentUtil.FUNCTION_PROPERTIES, ComponentUtil.EVENT_CALLBACKS).forEach(function (key) { return coercionLookup[key] = 'none'; });
8343 ComponentUtil.BOOLEAN_PROPERTIES
8344 .forEach(function (key) { return coercionLookup[key] = 'boolean'; });
8345 ComponentUtil.NUMBER_PROPERTIES
8346 .forEach(function (key) { return coercionLookup[key] = 'number'; });
8347 return coercionLookup;
8348 };
8349 ComponentUtil.getValue = function (key, rawValue) {
8350 var coercionStep = ComponentUtil.coercionLookup[key];
8351 if (coercionStep) {
8352 var newValue = rawValue;
8353 switch (coercionStep) {
8354 case 'number': {
8355 newValue = ComponentUtil.toNumber(rawValue);
8356 break;
8357 }
8358 case 'boolean': {
8359 newValue = ComponentUtil.toBoolean(rawValue);
8360 break;
8361 }
8362 case 'none': {
8363 // if groupAggFiltering exists and isn't a function, handle as a boolean.
8364 if (key === 'groupAggFiltering' && typeof rawValue !== 'function') {
8365 newValue = ComponentUtil.toBoolean(rawValue);
8366 }
8367 break;
8368 }
8369 }
8370 return newValue;
8371 }
8372 return undefined;
8373 };
8374 ComponentUtil.getGridOptionKeys = function (component, isVue) {
8375 // Vue does not have keys in prod so instead need to run through all the
8376 // gridOptions checking for presence of a gridOption key.
8377 return isVue
8378 ? Object.keys(ComponentUtil.coercionLookup)
8379 : Object.keys(component);
8380 };
8381 ComponentUtil.copyAttributesToGridOptions = function (gridOptions, component, isVue) {
8382 if (isVue === void 0) { isVue = false; }
8383 // create empty grid options if none were passed
8384 if (typeof gridOptions !== 'object') {
8385 gridOptions = {};
8386 }
8387 // to allow array style lookup in TypeScript, take type away from 'this' and 'gridOptions'
8388 var pGridOptions = gridOptions;
8389 var keys = ComponentUtil.getGridOptionKeys(component, isVue);
8390 // Loop through component props, if they are not undefined and a valid gridOption copy to gridOptions
8391 keys.forEach(function (key) {
8392 var value = component[key];
8393 if (typeof value !== 'undefined') {
8394 var coercedValue = ComponentUtil.getValue(key, value);
8395 if (coercedValue !== undefined) {
8396 pGridOptions[key] = coercedValue;
8397 }
8398 }
8399 });
8400 return gridOptions;
8401 };
8402 ComponentUtil.processOnChange = function (changes, api) {
8403 if (!changes || Object.keys(changes).length === 0) {
8404 return;
8405 }
8406 var changesToApply = __assign({}, changes);
8407 // We manually call these updates so that we can provide a different source of gridOptionsChanged
8408 // We do not call setProperty as this will be called by the grid api methods
8409 if (changesToApply.columnTypes) {
8410 api.setColumnTypes(changesToApply.columnTypes.currentValue, "gridOptionsChanged");
8411 delete changesToApply.columnTypes;
8412 }
8413 if (changesToApply.autoGroupColumnDef) {
8414 api.setAutoGroupColumnDef(changesToApply.autoGroupColumnDef.currentValue, "gridOptionsChanged");
8415 delete changesToApply.autoGroupColumnDef;
8416 }
8417 if (changesToApply.defaultColDef) {
8418 api.setDefaultColDef(changesToApply.defaultColDef.currentValue, "gridOptionsChanged");
8419 delete changesToApply.defaultColDef;
8420 }
8421 if (changesToApply.columnDefs) {
8422 api.setColumnDefs(changesToApply.columnDefs.currentValue, "gridOptionsChanged");
8423 delete changesToApply.columnDefs;
8424 }
8425 Object.keys(changesToApply).forEach(function (key) {
8426 var gridKey = key;
8427 var coercedValue = ComponentUtil.getValue(gridKey, changesToApply[gridKey].currentValue);
8428 api.__setProperty(gridKey, coercedValue);
8429 });
8430 // copy changes into an event for dispatch
8431 var event = {
8432 type: _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COMPONENT_STATE_CHANGED
8433 };
8434 Object(_utils_object__WEBPACK_IMPORTED_MODULE_2__["iterateObject"])(changes, function (key, value) {
8435 event[key] = value;
8436 });
8437 api.dispatchEvent(event);
8438 };
8439 ComponentUtil.toBoolean = function (value) {
8440 if (typeof value === 'boolean') {
8441 return value;
8442 }
8443 if (typeof value === 'string') {
8444 // for boolean, compare to empty String to allow attributes appearing with
8445 // no value to be treated as 'true'
8446 return value.toUpperCase() === 'TRUE' || value == '';
8447 }
8448 return false;
8449 };
8450 ComponentUtil.toNumber = function (value) {
8451 if (typeof value === 'number') {
8452 return value;
8453 }
8454 if (typeof value === 'string') {
8455 return Number(value);
8456 }
8457 };
8458 // all events
8459 ComponentUtil.EVENTS = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["values"])(_events__WEBPACK_IMPORTED_MODULE_0__["Events"]);
8460 // events that are internal to AG Grid and should not be exposed to users via documentation or generated framework components
8461 /** Exclude the following internal events from code generation to prevent exposing these events via framework components */
8462 ComponentUtil.EXCLUDED_INTERNAL_EVENTS = [
8463 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SCROLLBAR_WIDTH_CHANGED,
8464 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CHECKBOX_CHANGED,
8465 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_HEIGHT_SCALE_CHANGED,
8466 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_BODY_HEIGHT_CHANGED,
8467 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,
8468 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED,
8469 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_HOVER_CHANGED,
8470 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FLASH_CELLS,
8471 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,
8472 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_DISPLAYED_ROWS_CHANGED,
8473 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_LEFT_PINNED_WIDTH_CHANGED,
8474 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_RIGHT_PINNED_WIDTH_CHANGED,
8475 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_ROW_CONTAINER_HEIGHT_CHANGED,
8476 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_POPUP_TO_FRONT,
8477 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_KEYBOARD_FOCUS,
8478 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_MOUSE_FOCUS,
8479 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_STORE_UPDATED,
8480 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PANEL_ITEM_DRAG_START,
8481 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PANEL_ITEM_DRAG_END,
8482 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FILL_START,
8483 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FILL_END,
8484 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_KEY_SHORTCUT_CHANGED_CELL_START,
8485 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_KEY_SHORTCUT_CHANGED_CELL_END,
8486 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FULL_WIDTH_ROW_FOCUSED,
8487 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_HEADER_HEIGHT_CHANGED,
8488 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_HEADER_HEIGHT_CHANGED,
8489 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_INTERNAL_TOOL_PANEL_VISIBLE_CHANGED,
8490 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_FOCUS_CLEARED,
8491 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_GRID_STYLES_CHANGED,
8492 _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FILTER_DESTROYED
8493 ];
8494 // events that are available for use by users of AG Grid and so should be documented
8495 /** EVENTS that should be exposed via code generation for the framework components. */
8496 ComponentUtil.PUBLIC_EVENTS = ComponentUtil.EVENTS.filter(function (e) { return !Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["includes"])(ComponentUtil.EXCLUDED_INTERNAL_EVENTS, e); });
8497 // onXXX methods, based on the above events
8498 ComponentUtil.EVENT_CALLBACKS = ComponentUtil.EVENTS.map(function (event) { return ComponentUtil.getCallbackForEvent(event); });
8499 ComponentUtil.STRING_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].STRING_PROPERTIES;
8500 ComponentUtil.OBJECT_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].OBJECT_PROPERTIES;
8501 ComponentUtil.ARRAY_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].ARRAY_PROPERTIES;
8502 ComponentUtil.NUMBER_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].NUMBER_PROPERTIES;
8503 ComponentUtil.BOOLEAN_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].BOOLEAN_PROPERTIES;
8504 ComponentUtil.FUNCTION_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].FUNCTION_PROPERTIES;
8505 ComponentUtil.ALL_PROPERTIES = _propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].ALL_PROPERTIES;
8506 ComponentUtil.ALL_PROPERTIES_SET = new Set(_propertyKeys__WEBPACK_IMPORTED_MODULE_1__["PropertyKeys"].ALL_PROPERTIES);
8507 ComponentUtil.coercionLookup = ComponentUtil.getCoercionLookup();
8508 return ComponentUtil;
8509}());
8510
8511
8512
8513/***/ }),
8514/* 25 */
8515/***/ (function(module, __webpack_exports__, __webpack_require__) {
8516
8517"use strict";
8518__webpack_require__.r(__webpack_exports__);
8519/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26);
8520/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return _eventKeys__WEBPACK_IMPORTED_MODULE_0__["Events"]; });
8521
8522/**
8523 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8524 * @version v29.2.0
8525 * @link https://www.ag-grid.com/
8526 * @license MIT
8527 */
8528
8529
8530
8531/***/ }),
8532/* 26 */
8533/***/ (function(module, __webpack_exports__, __webpack_require__) {
8534
8535"use strict";
8536__webpack_require__.r(__webpack_exports__);
8537/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return Events; });
8538/**
8539 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8540 * @version v29.2.0
8541 * @link https://www.ag-grid.com/
8542 * @license MIT
8543 */
8544var Events = /** @class */ (function () {
8545 function Events() {
8546 }
8547 /** Everything has changed with the columns. Either complete new set of columns set, or user called applyColumnState() */
8548 /** @deprecated - grid no longer uses this, and setSate() also fires individual events */
8549 Events.EVENT_COLUMN_EVERYTHING_CHANGED = 'columnEverythingChanged';
8550 /** User has set in new columns. */
8551 Events.EVENT_NEW_COLUMNS_LOADED = 'newColumnsLoaded';
8552 /** The pivot mode flag was changed */
8553 Events.EVENT_COLUMN_PIVOT_MODE_CHANGED = 'columnPivotModeChanged';
8554 /** A row group column was added, removed or order changed. */
8555 Events.EVENT_COLUMN_ROW_GROUP_CHANGED = 'columnRowGroupChanged';
8556 /** expandAll / collapseAll was called from the api. */
8557 Events.EVENT_EXPAND_COLLAPSE_ALL = 'expandOrCollapseAll';
8558 /** A pivot column was added, removed or order changed. */
8559 Events.EVENT_COLUMN_PIVOT_CHANGED = 'columnPivotChanged';
8560 /** The list of grid columns has changed. */
8561 Events.EVENT_GRID_COLUMNS_CHANGED = 'gridColumnsChanged';
8562 /** A value column was added, removed or agg function was changed. */
8563 Events.EVENT_COLUMN_VALUE_CHANGED = 'columnValueChanged';
8564 /** A column was moved */
8565 Events.EVENT_COLUMN_MOVED = 'columnMoved';
8566 /** One or more columns was shown / hidden */
8567 Events.EVENT_COLUMN_VISIBLE = 'columnVisible';
8568 /** One or more columns was pinned / unpinned*/
8569 Events.EVENT_COLUMN_PINNED = 'columnPinned';
8570 /** A column group was opened / closed */
8571 Events.EVENT_COLUMN_GROUP_OPENED = 'columnGroupOpened';
8572 /** One or more columns was resized. If just one, the column in the event is set. */
8573 Events.EVENT_COLUMN_RESIZED = 'columnResized';
8574 /** The list of displayed columns has changed, can result from columns open / close, column move, pivot, group, etc */
8575 Events.EVENT_DISPLAYED_COLUMNS_CHANGED = 'displayedColumnsChanged';
8576 /** The list of virtual columns has changed, results from viewport changing */
8577 Events.EVENT_VIRTUAL_COLUMNS_CHANGED = 'virtualColumnsChanged';
8578 /** Async Transactions Executed */
8579 Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED = 'asyncTransactionsFlushed';
8580 /** A row group was opened / closed */
8581 Events.EVENT_ROW_GROUP_OPENED = 'rowGroupOpened';
8582 /** @deprecated v28 use EVENT_ROW_DATA_UPDATED instead */
8583 Events.EVENT_ROW_DATA_CHANGED = 'rowDataChanged';
8584 /** The client has updated data for the grid */
8585 Events.EVENT_ROW_DATA_UPDATED = 'rowDataUpdated';
8586 /** The client has set new floating data into the grid */
8587 Events.EVENT_PINNED_ROW_DATA_CHANGED = 'pinnedRowDataChanged';
8588 /** Range selection has changed */
8589 Events.EVENT_RANGE_SELECTION_CHANGED = 'rangeSelectionChanged';
8590 /** Chart was created */
8591 Events.EVENT_CHART_CREATED = 'chartCreated';
8592 /** Chart Range selection has changed */
8593 Events.EVENT_CHART_RANGE_SELECTION_CHANGED = 'chartRangeSelectionChanged';
8594 /** Chart Options have changed */
8595 Events.EVENT_CHART_OPTIONS_CHANGED = 'chartOptionsChanged';
8596 /** Chart was destroyed */
8597 Events.EVENT_CHART_DESTROYED = 'chartDestroyed';
8598 /** For when the tool panel is shown / hidden */
8599 Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED = 'toolPanelVisibleChanged';
8600 Events.EVENT_TOOL_PANEL_SIZE_CHANGED = 'toolPanelSizeChanged';
8601 /**
8602 * This is a replacement event for EVENT_TOOL_PANEL_VISIBLE_CHANGED. In v30, the original event interface will be dropped
8603 * and replaced with the new event (but using the old event type and interface name)
8604 */
8605 Events.EVENT_INTERNAL_TOOL_PANEL_VISIBLE_CHANGED = 'internalToolPanelVisibleChanged';
8606 Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START = 'columnPanelItemDragStart';
8607 Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END = 'columnPanelItemDragEnd';
8608 /** Model was updated - grid updates the drawn rows when this happens */
8609 Events.EVENT_MODEL_UPDATED = 'modelUpdated';
8610 Events.EVENT_PASTE_START = 'pasteStart';
8611 Events.EVENT_PASTE_END = 'pasteEnd';
8612 Events.EVENT_FILL_START = 'fillStart';
8613 Events.EVENT_FILL_END = 'fillEnd';
8614 /** Undo operation has started. */
8615 Events.EVENT_UNDO_STARTED = 'undoStarted';
8616 /** Undo operation has ended. */
8617 Events.EVENT_UNDO_ENDED = 'undoEnded';
8618 /** Redo operation has started. */
8619 Events.EVENT_REDO_STARTED = 'redoStarted';
8620 /** Redo operation has ended. */
8621 Events.EVENT_REDO_ENDED = 'redoEnded';
8622 Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_START = 'keyShortcutChangedCellStart';
8623 Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_END = 'keyShortcutChangedCellEnd';
8624 Events.EVENT_CELL_CLICKED = 'cellClicked';
8625 Events.EVENT_CELL_DOUBLE_CLICKED = 'cellDoubleClicked';
8626 Events.EVENT_CELL_MOUSE_DOWN = 'cellMouseDown';
8627 Events.EVENT_CELL_CONTEXT_MENU = 'cellContextMenu';
8628 Events.EVENT_CELL_VALUE_CHANGED = 'cellValueChanged';
8629 Events.EVENT_CELL_EDIT_REQUEST = 'cellEditRequest';
8630 Events.EVENT_ROW_VALUE_CHANGED = 'rowValueChanged';
8631 Events.EVENT_CELL_FOCUSED = 'cellFocused';
8632 Events.EVENT_CELL_FOCUS_CLEARED = 'cellFocusCleared';
8633 Events.EVENT_FULL_WIDTH_ROW_FOCUSED = 'fullWidthRowFocused';
8634 Events.EVENT_ROW_SELECTED = 'rowSelected';
8635 Events.EVENT_SELECTION_CHANGED = 'selectionChanged';
8636 Events.EVENT_CELL_KEY_DOWN = 'cellKeyDown';
8637 Events.EVENT_CELL_KEY_PRESS = 'cellKeyPress';
8638 Events.EVENT_CELL_MOUSE_OVER = 'cellMouseOver';
8639 Events.EVENT_CELL_MOUSE_OUT = 'cellMouseOut';
8640 /** 2 events for filtering. The grid LISTENS for filterChanged and afterFilterChanged */
8641 Events.EVENT_FILTER_CHANGED = 'filterChanged';
8642 /** Filter was change but not applied. Only useful if apply buttons are used in filters. */
8643 Events.EVENT_FILTER_MODIFIED = 'filterModified';
8644 Events.EVENT_FILTER_OPENED = 'filterOpened';
8645 Events.EVENT_SORT_CHANGED = 'sortChanged';
8646 /** A row was removed from the dom, for any reason. Use to clean up resources (if any) used by the row. */
8647 Events.EVENT_VIRTUAL_ROW_REMOVED = 'virtualRowRemoved';
8648 Events.EVENT_ROW_CLICKED = 'rowClicked';
8649 Events.EVENT_ROW_DOUBLE_CLICKED = 'rowDoubleClicked';
8650 /** Gets called once after the grid has finished initialising. */
8651 Events.EVENT_GRID_READY = 'gridReady';
8652 /** Width of height of the main grid div has changed. Grid listens for this and does layout of grid if it's
8653 * changed, so always filling the space it was given. */
8654 Events.EVENT_GRID_SIZE_CHANGED = 'gridSizeChanged';
8655 /** The indexes of the rows rendered has changed, eg user has scrolled to a new vertical position. */
8656 Events.EVENT_VIEWPORT_CHANGED = 'viewportChanged';
8657 /* The width of the scrollbar has been calculated */
8658 Events.EVENT_SCROLLBAR_WIDTH_CHANGED = 'scrollbarWidthChanged';
8659 /** Rows were rendered for the first time (ie on async data load). */
8660 Events.EVENT_FIRST_DATA_RENDERED = 'firstDataRendered';
8661 /** A column drag has started, either resizing a column or moving a column. */
8662 Events.EVENT_DRAG_STARTED = 'dragStarted';
8663 /** A column drag has stopped */
8664 Events.EVENT_DRAG_STOPPED = 'dragStopped';
8665 Events.EVENT_CHECKBOX_CHANGED = 'checkboxChanged';
8666 Events.EVENT_ROW_EDITING_STARTED = 'rowEditingStarted';
8667 Events.EVENT_ROW_EDITING_STOPPED = 'rowEditingStopped';
8668 Events.EVENT_CELL_EDITING_STARTED = 'cellEditingStarted';
8669 Events.EVENT_CELL_EDITING_STOPPED = 'cellEditingStopped';
8670 /** Main body of grid has scrolled, either horizontally or vertically */
8671 Events.EVENT_BODY_SCROLL = 'bodyScroll';
8672 /** Main body of the grid has stopped scrolling, either horizontally or vertically */
8673 Events.EVENT_BODY_SCROLL_END = 'bodyScrollEnd';
8674 Events.EVENT_HEIGHT_SCALE_CHANGED = 'heightScaleChanged';
8675 /** The displayed page for pagination has changed. For example the data was filtered or sorted,
8676 * or the user has moved to a different page. */
8677 Events.EVENT_PAGINATION_CHANGED = 'paginationChanged';
8678 /** Only used by React, Angular, Web Components and VueJS AG Grid components
8679 * (not used if doing plain JavaScript). If the grid receives changes due
8680 * to bound properties, this event fires after the grid has finished processing the change. */
8681 Events.EVENT_COMPONENT_STATE_CHANGED = 'componentStateChanged';
8682 /***************************** INTERNAL EVENTS: START ******************************************* */
8683 /** Please remember to add to ComponentUtil.EXCLUDED_INTERNAL_EVENTS to not have these events exposed to framework components. */
8684 /** All items from here down are used internally by the grid, not intended for external use. */
8685 // not documented, either experimental, or we just don't want users using an depending on them
8686 Events.EVENT_BODY_HEIGHT_CHANGED = 'bodyHeightChanged';
8687 Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED = 'displayedColumnsWidthChanged';
8688 Events.EVENT_SCROLL_VISIBILITY_CHANGED = 'scrollVisibilityChanged';
8689 Events.EVENT_COLUMN_HOVER_CHANGED = 'columnHoverChanged';
8690 Events.EVENT_FLASH_CELLS = 'flashCells';
8691 Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED = 'paginationPixelOffsetChanged';
8692 Events.EVENT_DISPLAYED_ROWS_CHANGED = 'displayedRowsChanged';
8693 Events.EVENT_LEFT_PINNED_WIDTH_CHANGED = 'leftPinnedWidthChanged';
8694 Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED = 'rightPinnedWidthChanged';
8695 Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED = 'rowContainerHeightChanged';
8696 Events.EVENT_HEADER_HEIGHT_CHANGED = 'headerHeightChanged';
8697 Events.EVENT_COLUMN_HEADER_HEIGHT_CHANGED = 'columnHeaderHeightChanged';
8698 Events.EVENT_ROW_DRAG_ENTER = 'rowDragEnter';
8699 Events.EVENT_ROW_DRAG_MOVE = 'rowDragMove';
8700 Events.EVENT_ROW_DRAG_LEAVE = 'rowDragLeave';
8701 Events.EVENT_ROW_DRAG_END = 'rowDragEnd';
8702 // environment
8703 Events.EVENT_GRID_STYLES_CHANGED = 'gridStylesChanged';
8704 // primarily for charts
8705 Events.EVENT_POPUP_TO_FRONT = 'popupToFront';
8706 // these are used for server side group and agg - only used by CS with Viewport Row Model - intention is
8707 // to design these better around server side functions and then release to general public when fully working with
8708 // all the row models.
8709 Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST = 'columnRowGroupChangeRequest';
8710 Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST = 'columnPivotChangeRequest';
8711 Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST = 'columnValueChangeRequest';
8712 Events.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST = 'columnAggFuncChangeRequest';
8713 Events.EVENT_KEYBOARD_FOCUS = 'keyboardFocus';
8714 Events.EVENT_MOUSE_FOCUS = 'mouseFocus';
8715 Events.EVENT_STORE_UPDATED = 'storeUpdated';
8716 Events.EVENT_FILTER_DESTROYED = 'filterDestroyed';
8717 return Events;
8718}());
8719
8720
8721
8722/***/ }),
8723/* 27 */
8724/***/ (function(module, __webpack_exports__, __webpack_require__) {
8725
8726"use strict";
8727__webpack_require__.r(__webpack_exports__);
8728/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyKeys", function() { return PropertyKeys; });
8729/**
8730 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8731 * @version v29.2.0
8732 * @link https://www.ag-grid.com/
8733 * @license MIT
8734 */
8735var __read = (undefined && undefined.__read) || function (o, n) {
8736 var m = typeof Symbol === "function" && o[Symbol.iterator];
8737 if (!m) return o;
8738 var i = m.call(o), r, ar = [], e;
8739 try {
8740 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8741 }
8742 catch (error) { e = { error: error }; }
8743 finally {
8744 try {
8745 if (r && !r.done && (m = i["return"])) m.call(i);
8746 }
8747 finally { if (e) throw e.error; }
8748 }
8749 return ar;
8750};
8751var __spread = (undefined && undefined.__spread) || function () {
8752 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
8753 return ar;
8754};
8755/**
8756 * These keys are used for validating properties supplied on a gridOptions object, and for code generation.
8757 * If you change the properties on the gridOptions interface, you *must* update this file as well to be consistent.
8758 */
8759var PropertyKeys = /** @class */ (function () {
8760 function PropertyKeys() {
8761 }
8762 PropertyKeys.STRING_PROPERTIES = [
8763 'rowSelection', 'overlayLoadingTemplate', 'overlayNoRowsTemplate',
8764 'quickFilterText', 'rowModelType', 'editType', 'domLayout', 'clipboardDelimiter', 'rowGroupPanelShow',
8765 'multiSortKey', 'pivotColumnGroupTotals', 'pivotRowTotals', 'pivotPanelShow', 'fillHandleDirection',
8766 'serverSideStoreType', 'groupDisplayType', 'treeDataDisplayType', 'colResizeDefault'
8767 ];
8768 PropertyKeys.OBJECT_PROPERTIES = [
8769 'components', 'frameworkComponents', 'rowStyle', 'context', 'autoGroupColumnDef', 'localeText', 'icons',
8770 'datasource', 'serverSideDatasource', 'viewportDatasource', 'groupRowRendererParams', 'aggFuncs', 'fullWidthCellRendererParams',
8771 'defaultColGroupDef', 'defaultColDef', 'defaultCsvExportParams', 'defaultExcelExportParams', 'columnTypes',
8772 'rowClassRules', 'detailCellRendererParams', 'loadingCellRendererParams', 'loadingOverlayComponentParams',
8773 'noRowsOverlayComponentParams', 'popupParent', 'statusBar', 'sideBar', 'chartThemeOverrides',
8774 'customChartThemes', 'chartToolPanelsDef'
8775 ];
8776 PropertyKeys.ARRAY_PROPERTIES = [
8777 'sortingOrder', 'alignedGrids', 'rowData', 'columnDefs', 'excelStyles', 'pinnedTopRowData', 'pinnedBottomRowData', 'chartThemes', 'rowClass'
8778 ];
8779 PropertyKeys.NUMBER_PROPERTIES = [
8780 'rowHeight', 'detailRowHeight', 'rowBuffer', 'headerHeight', 'groupHeaderHeight', 'floatingFiltersHeight',
8781 'pivotHeaderHeight', 'pivotGroupHeaderHeight', 'groupDefaultExpanded', 'viewportRowModelPageSize',
8782 'viewportRowModelBufferSize', 'autoSizePadding', 'maxBlocksInCache', 'maxConcurrentDatasourceRequests', 'tooltipShowDelay',
8783 'tooltipHideDelay', 'cacheOverflowSize', 'paginationPageSize', 'cacheBlockSize', 'infiniteInitialRowCount', 'serverSideInitialRowCount', 'scrollbarWidth',
8784 'asyncTransactionWaitMillis', 'blockLoadDebounceMillis', 'keepDetailRowsCount',
8785 'undoRedoCellEditingLimit', 'cellFlashDelay', 'cellFadeDelay', 'tabIndex'
8786 ];
8787 PropertyKeys.BOOLEAN_PROPERTIES = [
8788 'suppressMakeColumnVisibleAfterUnGroup', 'suppressRowClickSelection', 'suppressCellSelection', 'suppressCellFocus', 'suppressHorizontalScroll',
8789 'alwaysShowHorizontalScroll', 'alwaysShowVerticalScroll', 'debug', 'enableBrowserTooltips', 'enableCellExpressions', 'groupSelectsChildren',
8790 'groupIncludeFooter', 'groupIncludeTotalFooter', 'groupSuppressBlankHeader', 'suppressMenuHide', 'suppressRowDeselection', 'unSortIcon',
8791 'suppressMultiSort', 'alwaysMultiSort', 'singleClickEdit', 'suppressLoadingOverlay', 'suppressNoRowsOverlay', 'suppressAutoSize',
8792 'skipHeaderOnAutoSize', 'suppressParentsInRowNodes', 'suppressColumnMoveAnimation', 'suppressMovableColumns', 'suppressFieldDotNotation',
8793 'enableRangeSelection', 'enableRangeHandle', 'enableFillHandle', 'suppressClearOnFillReduction', 'deltaSort', 'suppressTouch', 'suppressAsyncEvents',
8794 'allowContextMenuWithControlKey', 'suppressContextMenu', 'rememberGroupStateWhenNewData', 'enableCellChangeFlash', 'suppressDragLeaveHidesColumns',
8795 'suppressRowGroupHidesColumns', 'suppressMiddleClickScrolls', 'suppressPreventDefaultOnMouseWheel', 'suppressCopyRowsToClipboard', 'copyHeadersToClipboard',
8796 'copyGroupHeadersToClipboard', 'pivotMode', 'suppressAggFuncInHeader', 'suppressColumnVirtualisation', 'suppressAggAtRootLevel', 'suppressFocusAfterRefresh',
8797 'functionsPassive', 'functionsReadOnly', 'animateRows', 'groupSelectsFiltered', 'groupRemoveSingleChildren', 'groupRemoveLowestSingleChildren', 'enableRtl',
8798 'suppressClickEdit', 'rowDragEntireRow', 'rowDragManaged', 'suppressRowDrag', 'suppressMoveWhenRowDragging', 'rowDragMultiRow', 'enableGroupEdit',
8799 'embedFullWidthRows', 'suppressPaginationPanel', 'groupHideOpenParents', 'groupAllowUnbalanced', 'pagination', 'paginationAutoPageSize', 'suppressScrollOnNewData',
8800 'suppressScrollWhenPopupsAreOpen', 'purgeClosedRowNodes', 'cacheQuickFilter', 'excludeHiddenColumnsFromQuickFilter', 'ensureDomOrder', 'accentedSort', 'suppressChangeDetection',
8801 'valueCache', 'valueCacheNeverExpires', 'aggregateOnlyChangedColumns', 'suppressAnimationFrame', 'suppressExcelExport', 'suppressCsvExport', 'treeData', 'masterDetail',
8802 'suppressMultiRangeSelection', 'enterMovesDownAfterEdit', 'enterMovesDown', 'suppressPropertyNamesCheck', 'rowMultiSelectWithClick', 'suppressRowHoverHighlight',
8803 'suppressRowTransform', 'suppressClipboardPaste', 'suppressLastEmptyLineOnPaste', 'enableCharts', 'enableChartToolPanelsButton', 'suppressChartToolPanelsButton',
8804 'suppressMaintainUnsortedOrder', 'enableCellTextSelection', 'suppressBrowserResizeObserver', 'suppressMaxRenderedRowRestriction', 'excludeChildrenWhenTreeDataFiltering',
8805 'tooltipMouseTrack', 'keepDetailRows', 'paginateChildRows', 'preventDefaultOnContextMenu', 'undoRedoCellEditing', 'allowDragFromColumnsToolPanel', 'immutableData',
8806 'pivotSuppressAutoColumn', 'suppressExpandablePivotGroups', 'debounceVerticalScrollbar', 'detailRowAutoHeight', 'serverSideFilteringAlwaysResets',
8807 'serverSideSortingAlwaysResets', 'serverSideSortAllLevels', 'serverSideFilterAllLevels', 'serverSideSortOnServer', 'serverSideFilterOnServer', 'suppressAggFilteredOnly',
8808 'showOpenedGroup', 'suppressClipboardApi', 'suppressModelUpdateAfterUpdateTransaction', 'stopEditingWhenCellsLoseFocus', 'maintainColumnOrder', 'groupMaintainOrder',
8809 'columnHoverHighlight', 'reactUi', 'suppressReactUi', 'readOnlyEdit', 'suppressRowVirtualisation', 'enableCellEditingOnBackspace', 'resetRowDataOnUpdate',
8810 'removePivotHeaderRowWhenSingleValueColumn', 'suppressCopySingleCellRanges', 'groupRowsSticky', 'suppressServerSideInfiniteScroll', 'rowGroupPanelSuppressSort',
8811 'allowShowChangeAfterFilter', 'suppressCutToClipboard'
8812 ];
8813 /** You do not need to include event callbacks in this list, as they are generated automatically. */
8814 PropertyKeys.FUNCTIONAL_PROPERTIES = [
8815 'localeTextFunc', 'doesExternalFilterPass', 'groupRowAggNodes', 'isFullWidthCell', 'processSecondaryColDef', 'processSecondaryColGroupDef', 'processPivotResultColDef',
8816 'processPivotResultColGroupDef', 'getBusinessKeyForNode', 'isRowSelectable', 'postSort', 'defaultGroupOrderComparator', 'rowDragText',
8817 'groupRowRenderer', 'groupRowRendererFramework', 'fullWidthCellRenderer', 'fullWidthCellRendererFramework',
8818 'loadingCellRenderer', 'loadingCellRendererFramework', 'loadingOverlayComponent', 'loadingOverlayComponentFramework', 'noRowsOverlayComponent', 'noRowsOverlayComponentFramework',
8819 'detailCellRenderer', 'detailCellRendererFramework'
8820 ];
8821 PropertyKeys.CALLBACK_PROPERTIES = [
8822 'getLocaleText', 'isExternalFilterPresent', 'getRowHeight', 'getRowClass', 'getRowStyle', 'getContextMenuItems', 'getMainMenuItems',
8823 'processRowPostCreate', 'processCellForClipboard', 'getGroupRowAgg', 'getRowNodeId', 'isFullWidthRow',
8824 'sendToClipboard', 'navigateToNextHeader', 'tabToNextHeader', 'navigateToNextCell',
8825 'tabToNextCell', 'processCellFromClipboard', 'getDocument', 'postProcessPopup', 'getChildCount', 'getDataPath', 'isRowMaster', 'postSortRows', 'processHeaderForClipboard',
8826 'processGroupHeaderForClipboard', 'paginationNumberFormatter', 'processDataFromClipboard', 'getServerSideGroupKey', 'isServerSideGroup',
8827 'createChartContainer', 'getChartToolbarItems', 'fillOperation', 'isApplyServerSideTransaction', 'getServerSideStoreParams', 'getServerSideGroupLevelParams',
8828 'isServerSideGroupOpenByDefault', 'isGroupOpenByDefault', 'initialGroupOrderComparator',
8829 'loadingCellRendererSelector', 'getRowId', 'groupAggFiltering'
8830 ];
8831 PropertyKeys.FUNCTION_PROPERTIES = __spread(PropertyKeys.FUNCTIONAL_PROPERTIES, PropertyKeys.CALLBACK_PROPERTIES);
8832 PropertyKeys.ALL_PROPERTIES = __spread(PropertyKeys.ARRAY_PROPERTIES, PropertyKeys.OBJECT_PROPERTIES, PropertyKeys.STRING_PROPERTIES, PropertyKeys.NUMBER_PROPERTIES, PropertyKeys.FUNCTION_PROPERTIES, PropertyKeys.BOOLEAN_PROPERTIES);
8833 /**
8834 * Used when performing property checks. This avoids noise caused when using frameworks, which can add their own
8835 * framework-specific properties to colDefs, gridOptions etc.
8836 */
8837 PropertyKeys.FRAMEWORK_PROPERTIES = [
8838 '__ob__', '__v_skip', '__metadata__', 'mappedColumnProperties', 'hasChildColumns', 'toColDef', 'createColDefFromGridColumn'
8839 ];
8840 return PropertyKeys;
8841}());
8842
8843
8844
8845/***/ }),
8846/* 28 */
8847/***/ (function(module, __webpack_exports__, __webpack_require__) {
8848
8849"use strict";
8850__webpack_require__.r(__webpack_exports__);
8851/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fuzzyCheckStrings", function() { return fuzzyCheckStrings; });
8852/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fuzzySuggestions", function() { return fuzzySuggestions; });
8853/**
8854 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8855 * @version v29.2.0
8856 * @link https://www.ag-grid.com/
8857 * @license MIT
8858 */
8859function fuzzyCheckStrings(inputValues, validValues, allSuggestions) {
8860 var fuzzyMatches = {};
8861 var invalidInputs = inputValues.filter(function (inputValue) {
8862 return !validValues.some(function (validValue) { return validValue === inputValue; });
8863 });
8864 if (invalidInputs.length > 0) {
8865 invalidInputs.forEach(function (invalidInput) {
8866 return fuzzyMatches[invalidInput] = fuzzySuggestions(invalidInput, allSuggestions);
8867 });
8868 }
8869 return fuzzyMatches;
8870}
8871/**
8872 *
8873 * @param {String} inputValue The value to be compared against a list of strings
8874 * @param allSuggestions The list of strings to be compared against
8875 */
8876function fuzzySuggestions(inputValue, allSuggestions, hideIrrelevant, filterByPercentageOfBestMatch) {
8877 var thisSuggestions = allSuggestions.map(function (text) { return ({
8878 value: text,
8879 relevance: stringWeightedDistances(inputValue.toLowerCase(), text.toLocaleLowerCase())
8880 }); });
8881 thisSuggestions.sort(function (a, b) { return b.relevance - a.relevance; });
8882 if (hideIrrelevant) {
8883 thisSuggestions = thisSuggestions.filter(function (suggestion) { return suggestion.relevance !== 0; });
8884 }
8885 if (filterByPercentageOfBestMatch && filterByPercentageOfBestMatch > 0) {
8886 var bestMatch = thisSuggestions[0].relevance;
8887 var limit_1 = bestMatch * filterByPercentageOfBestMatch;
8888 thisSuggestions = thisSuggestions.filter(function (suggestion) { return limit_1 - suggestion.relevance < 0; });
8889 }
8890 return thisSuggestions.map(function (suggestion) { return suggestion.value; });
8891}
8892function stringWeightedDistances(str1, str2) {
8893 var a = str1.replace(/\s/g, '');
8894 var b = str2.replace(/\s/g, '');
8895 var weight = 0;
8896 var lastIndex = -1;
8897 for (var i = 0; i < a.length; i++) {
8898 var idx = b.indexOf(a[i], lastIndex + 1);
8899 if (idx === -1) {
8900 continue;
8901 }
8902 lastIndex = idx;
8903 weight += (100 - (lastIndex * 100 / 10000) * 100);
8904 }
8905 return weight;
8906}
8907
8908
8909/***/ }),
8910/* 29 */
8911/***/ (function(module, __webpack_exports__, __webpack_require__) {
8912
8913"use strict";
8914__webpack_require__.r(__webpack_exports__);
8915/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupInstanceIdCreator", function() { return GroupInstanceIdCreator; });
8916/**
8917 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8918 * @version v29.2.0
8919 * @link https://www.ag-grid.com/
8920 * @license MIT
8921 */
8922// class returns unique instance id's for columns.
8923// eg, the following calls (in this order) will result in:
8924//
8925// getInstanceIdForKey('country') => 0
8926// getInstanceIdForKey('country') => 1
8927// getInstanceIdForKey('country') => 2
8928// getInstanceIdForKey('country') => 3
8929// getInstanceIdForKey('age') => 0
8930// getInstanceIdForKey('age') => 1
8931// getInstanceIdForKey('country') => 4
8932var GroupInstanceIdCreator = /** @class */ (function () {
8933 function GroupInstanceIdCreator() {
8934 // this map contains keys to numbers, so we remember what the last call was
8935 this.existingIds = {};
8936 }
8937 GroupInstanceIdCreator.prototype.getInstanceIdForKey = function (key) {
8938 var lastResult = this.existingIds[key];
8939 var result;
8940 if (typeof lastResult !== 'number') {
8941 // first time this key
8942 result = 0;
8943 }
8944 else {
8945 result = lastResult + 1;
8946 }
8947 this.existingIds[key] = result;
8948 return result;
8949 };
8950 return GroupInstanceIdCreator;
8951}());
8952
8953
8954
8955/***/ }),
8956/* 30 */
8957/***/ (function(module, __webpack_exports__, __webpack_require__) {
8958
8959"use strict";
8960__webpack_require__.r(__webpack_exports__);
8961/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GROUP_AUTO_COLUMN_ID", function() { return GROUP_AUTO_COLUMN_ID; });
8962/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutoGroupColService", function() { return AutoGroupColService; });
8963/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
8964/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
8965/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
8966/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
8967/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
8968/**
8969 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
8970 * @version v29.2.0
8971 * @link https://www.ag-grid.com/
8972 * @license MIT
8973 */
8974var __extends = (undefined && undefined.__extends) || (function () {
8975 var extendStatics = function (d, b) {
8976 extendStatics = Object.setPrototypeOf ||
8977 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8978 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
8979 return extendStatics(d, b);
8980 };
8981 return function (d, b) {
8982 extendStatics(d, b);
8983 function __() { this.constructor = d; }
8984 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
8985 };
8986})();
8987var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
8988 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8989 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8990 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;
8991 return c > 3 && r && Object.defineProperty(target, key, r), r;
8992};
8993
8994
8995
8996
8997
8998var GROUP_AUTO_COLUMN_ID = 'ag-Grid-AutoColumn';
8999var AutoGroupColService = /** @class */ (function (_super) {
9000 __extends(AutoGroupColService, _super);
9001 function AutoGroupColService() {
9002 return _super !== null && _super.apply(this, arguments) || this;
9003 }
9004 AutoGroupColService.prototype.createAutoGroupColumns = function (existingCols, rowGroupColumns) {
9005 var _this = this;
9006 var groupAutoColumns = [];
9007 var doingTreeData = this.gridOptionsService.isTreeData();
9008 var doingMultiAutoColumn = this.gridOptionsService.isGroupMultiAutoColumn();
9009 if (doingTreeData && doingMultiAutoColumn) {
9010 console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data');
9011 doingMultiAutoColumn = false;
9012 }
9013 // if doing groupDisplayType = "multipleColumns", then we call the method multiple times, once
9014 // for each column we are grouping by
9015 if (doingMultiAutoColumn) {
9016 rowGroupColumns.forEach(function (rowGroupCol, index) {
9017 groupAutoColumns.push(_this.createOneAutoGroupColumn(existingCols, rowGroupCol, index));
9018 });
9019 }
9020 else {
9021 groupAutoColumns.push(this.createOneAutoGroupColumn(existingCols));
9022 }
9023 return groupAutoColumns;
9024 };
9025 // rowGroupCol and index are missing if groupDisplayType != "multipleColumns"
9026 AutoGroupColService.prototype.createOneAutoGroupColumn = function (existingCols, rowGroupCol, index) {
9027 // if one provided by user, use it, otherwise create one
9028 var defaultAutoColDef = this.generateDefaultColDef(rowGroupCol);
9029 // if doing multi, set the field
9030 var colId;
9031 if (rowGroupCol) {
9032 colId = GROUP_AUTO_COLUMN_ID + "-" + rowGroupCol.getId();
9033 }
9034 else {
9035 colId = GROUP_AUTO_COLUMN_ID;
9036 }
9037 var userAutoColDef = this.gridOptionsService.get('autoGroupColumnDef');
9038 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["mergeDeep"])(defaultAutoColDef, userAutoColDef);
9039 defaultAutoColDef = this.columnFactory.mergeColDefs(defaultAutoColDef);
9040 defaultAutoColDef.colId = colId;
9041 // For tree data the filter is always allowed
9042 if (!this.gridOptionsService.isTreeData()) {
9043 // we would only allow filter if the user has provided field or value getter. otherwise the filter
9044 // would not be able to work.
9045 var noFieldOrValueGetter = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(defaultAutoColDef.field) &&
9046 Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(defaultAutoColDef.valueGetter) &&
9047 Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(defaultAutoColDef.filterValueGetter) &&
9048 defaultAutoColDef.filter !== 'agGroupColumnFilter';
9049 if (noFieldOrValueGetter) {
9050 defaultAutoColDef.filter = false;
9051 }
9052 }
9053 // if showing many cols, we don't want to show more than one with a checkbox for selection
9054 if (index && index > 0) {
9055 defaultAutoColDef.headerCheckboxSelection = false;
9056 }
9057 var existingCol = existingCols.find(function (col) { return col.getId() == colId; });
9058 if (existingCol) {
9059 existingCol.setColDef(defaultAutoColDef, null);
9060 this.columnFactory.applyColumnState(existingCol, defaultAutoColDef);
9061 return existingCol;
9062 }
9063 var isSortingCoupled = this.gridOptionsService.isColumnsSortingCoupledToGroup();
9064 if (isSortingCoupled && (defaultAutoColDef.sort || defaultAutoColDef.initialSort) && !defaultAutoColDef.field) {
9065 // if no field, then this column cannot hold its own sort state
9066 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["mergeDeep"])(defaultAutoColDef, { sort: null, initialSort: null }, true, true);
9067 }
9068 var newCol = new _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"](defaultAutoColDef, null, colId, true);
9069 this.context.createBean(newCol);
9070 return newCol;
9071 };
9072 AutoGroupColService.prototype.generateDefaultColDef = function (rowGroupCol) {
9073 var userDef = this.gridOptionsService.get('autoGroupColumnDef');
9074 var localeTextFunc = this.localeService.getLocaleTextFunc();
9075 var res = {
9076 headerName: localeTextFunc('group', 'Group')
9077 };
9078 var userHasProvidedGroupCellRenderer = userDef &&
9079 (userDef.cellRenderer || userDef.cellRendererFramework || userDef.cellRendererSelector);
9080 // only add the default group cell renderer if user hasn't provided one
9081 if (!userHasProvidedGroupCellRenderer) {
9082 res.cellRenderer = 'agGroupCellRenderer';
9083 }
9084 // we never allow moving the group column
9085 // defaultAutoColDef.suppressMovable = true;
9086 if (rowGroupCol) {
9087 var colDef = rowGroupCol.getColDef();
9088 Object.assign(res, {
9089 // cellRendererParams.groupKey: colDefToCopy.field;
9090 headerName: this.columnModel.getDisplayNameForColumn(rowGroupCol, 'header'),
9091 headerValueGetter: colDef.headerValueGetter
9092 });
9093 if (colDef.cellRenderer || colDef.cellRendererFramework) {
9094 Object.assign(res, {
9095 cellRendererParams: {
9096 innerRenderer: colDef.cellRenderer,
9097 innerRendererFramework: colDef.cellRendererFramework,
9098 innerRendererParams: colDef.cellRendererParams
9099 }
9100 });
9101 }
9102 res.showRowGroup = rowGroupCol.getColId();
9103 }
9104 else {
9105 res.showRowGroup = true;
9106 }
9107 return res;
9108 };
9109 __decorate([
9110 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
9111 ], AutoGroupColService.prototype, "columnModel", void 0);
9112 __decorate([
9113 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnFactory')
9114 ], AutoGroupColService.prototype, "columnFactory", void 0);
9115 AutoGroupColService = __decorate([
9116 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('autoGroupColService')
9117 ], AutoGroupColService);
9118 return AutoGroupColService;
9119}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
9120
9121
9122
9123/***/ }),
9124/* 31 */
9125/***/ (function(module, __webpack_exports__, __webpack_require__) {
9126
9127"use strict";
9128__webpack_require__.r(__webpack_exports__);
9129/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utf8_encode", function() { return utf8_encode; });
9130/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "capitalise", function() { return capitalise; });
9131/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "escapeString", function() { return escapeString; });
9132/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "camelCaseToHumanText", function() { return camelCaseToHumanText; });
9133/**
9134 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9135 * @version v29.2.0
9136 * @link https://www.ag-grid.com/
9137 * @license MIT
9138 */
9139var reUnescapedHtml = /[&<>"']/g;
9140/**
9141 * HTML Escapes.
9142 */
9143var HTML_ESCAPES = {
9144 '&': '&amp;',
9145 '<': '&lt;',
9146 '>': '&gt;',
9147 '"': '&quot;',
9148 "'": '&#39;'
9149};
9150/**
9151 * It encodes any string in UTF-8 format
9152 * taken from https://github.com/mathiasbynens/utf8.js
9153 * @param {string} s
9154 * @returns {string}
9155 */
9156function utf8_encode(s) {
9157 var stringFromCharCode = String.fromCharCode;
9158 function ucs2decode(string) {
9159 var output = [];
9160 if (!string) {
9161 return [];
9162 }
9163 var len = string.length;
9164 var counter = 0;
9165 var value;
9166 var extra;
9167 while (counter < len) {
9168 value = string.charCodeAt(counter++);
9169 if (value >= 0xD800 && value <= 0xDBFF && counter < len) {
9170 // high surrogate, and there is a next character
9171 extra = string.charCodeAt(counter++);
9172 if ((extra & 0xFC00) == 0xDC00) { // low surrogate
9173 output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
9174 }
9175 else {
9176 // unmatched surrogate; only append this code unit, in case the next
9177 // code unit is the high surrogate of a surrogate pair
9178 output.push(value);
9179 counter--;
9180 }
9181 }
9182 else {
9183 output.push(value);
9184 }
9185 }
9186 return output;
9187 }
9188 function checkScalarValue(point) {
9189 if (point >= 0xD800 && point <= 0xDFFF) {
9190 throw Error('Lone surrogate U+' + point.toString(16).toUpperCase() +
9191 ' is not a scalar value');
9192 }
9193 }
9194 function createByte(point, shift) {
9195 return stringFromCharCode(((point >> shift) & 0x3F) | 0x80);
9196 }
9197 function encodeCodePoint(point) {
9198 if ((point >= 0 && point <= 31 && point !== 10)) {
9199 var convertedCode = point.toString(16).toUpperCase();
9200 var paddedCode = convertedCode.padStart(4, '0');
9201 return "_x" + paddedCode + "_";
9202 }
9203 if ((point & 0xFFFFFF80) == 0) { // 1-byte sequence
9204 return stringFromCharCode(point);
9205 }
9206 var symbol = '';
9207 if ((point & 0xFFFFF800) == 0) { // 2-byte sequence
9208 symbol = stringFromCharCode(((point >> 6) & 0x1F) | 0xC0);
9209 }
9210 else if ((point & 0xFFFF0000) == 0) { // 3-byte sequence
9211 checkScalarValue(point);
9212 symbol = stringFromCharCode(((point >> 12) & 0x0F) | 0xE0);
9213 symbol += createByte(point, 6);
9214 }
9215 else if ((point & 0xFFE00000) == 0) { // 4-byte sequence
9216 symbol = stringFromCharCode(((point >> 18) & 0x07) | 0xF0);
9217 symbol += createByte(point, 12);
9218 symbol += createByte(point, 6);
9219 }
9220 symbol += stringFromCharCode((point & 0x3F) | 0x80);
9221 return symbol;
9222 }
9223 var codePoints = ucs2decode(s);
9224 var length = codePoints.length;
9225 var index = -1;
9226 var codePoint;
9227 var byteString = '';
9228 while (++index < length) {
9229 codePoint = codePoints[index];
9230 byteString += encodeCodePoint(codePoint);
9231 }
9232 return byteString;
9233}
9234function capitalise(str) {
9235 return str[0].toUpperCase() + str.substr(1).toLowerCase();
9236}
9237function escapeString(toEscape, skipEscapingHtmlChars) {
9238 if (toEscape == null) {
9239 return null;
9240 }
9241 // we call toString() twice, in case value is an object, where user provides
9242 // a toString() method, and first call to toString() returns back something other
9243 // than a string (eg a number to render)
9244 var stringResult = toEscape.toString().toString();
9245 if (skipEscapingHtmlChars) {
9246 return stringResult;
9247 }
9248 // in react we don't need to escape html characters, as it's done by the framework
9249 return stringResult.replace(reUnescapedHtml, function (chr) { return HTML_ESCAPES[chr]; });
9250}
9251/**
9252 * Converts a camelCase string into startCase
9253 * @param {string} camelCase
9254 * @return {string}
9255 */
9256function camelCaseToHumanText(camelCase) {
9257 if (!camelCase || camelCase == null) {
9258 return null;
9259 }
9260 // either split on a lowercase followed by uppercase ie asHereTo -> as Here To
9261 var rex = /([a-z])([A-Z])/g;
9262 // or starts with uppercase and we take all expect the last which is assumed to be part of next word if followed by lowercase HEREToThere -> HERE To There
9263 var rexCaps = /([A-Z]+)([A-Z])([a-z])/g;
9264 var words = camelCase
9265 .replace(rex, '$1 $2')
9266 .replace(rexCaps, '$1 $2$3')
9267 .replace(/\./g, ' ')
9268 .split(' ');
9269 return words.map(function (word) { return word.substring(0, 1).toUpperCase() + ((word.length > 1) ? word.substring(1, word.length) : ''); }).join(' ');
9270}
9271
9272
9273/***/ }),
9274/* 32 */
9275/***/ (function(module, __webpack_exports__, __webpack_require__) {
9276
9277"use strict";
9278__webpack_require__.r(__webpack_exports__);
9279/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToMap", function() { return convertToMap; });
9280/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapById", function() { return mapById; });
9281/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return keys; });
9282/**
9283 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9284 * @version v29.2.0
9285 * @link https://www.ag-grid.com/
9286 * @license MIT
9287 */
9288function convertToMap(arr) {
9289 var map = new Map();
9290 arr.forEach(function (pair) { return map.set(pair[0], pair[1]); });
9291 return map;
9292}
9293// handy for organising a list into a map, where each item is mapped by an attribute, eg mapping Columns by ID
9294function mapById(arr, callback) {
9295 var map = new Map();
9296 arr.forEach(function (item) { return map.set(callback(item), item); });
9297 return map;
9298}
9299function keys(map) {
9300 var arr = [];
9301 map.forEach(function (_, key) { return arr.push(key); });
9302 return arr;
9303}
9304
9305
9306/***/ }),
9307/* 33 */
9308/***/ (function(module, __webpack_exports__, __webpack_require__) {
9309
9310"use strict";
9311__webpack_require__.r(__webpack_exports__);
9312/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnUtils", function() { return ColumnUtils; });
9313/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
9314/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
9315/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
9316/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
9317/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
9318/**
9319 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9320 * @version v29.2.0
9321 * @link https://www.ag-grid.com/
9322 * @license MIT
9323 */
9324var __extends = (undefined && undefined.__extends) || (function () {
9325 var extendStatics = function (d, b) {
9326 extendStatics = Object.setPrototypeOf ||
9327 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9328 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
9329 return extendStatics(d, b);
9330 };
9331 return function (d, b) {
9332 extendStatics(d, b);
9333 function __() { this.constructor = d; }
9334 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
9335 };
9336})();
9337var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
9338 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9339 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9340 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;
9341 return c > 3 && r && Object.defineProperty(target, key, r), r;
9342};
9343
9344
9345
9346
9347
9348// takes in a list of columns, as specified by the column definitions, and returns column groups
9349var ColumnUtils = /** @class */ (function (_super) {
9350 __extends(ColumnUtils, _super);
9351 function ColumnUtils() {
9352 return _super !== null && _super.apply(this, arguments) || this;
9353 }
9354 ColumnUtils.prototype.calculateColMinWidth = function (colDef) {
9355 return colDef.minWidth != null ? colDef.minWidth : this.environment.getMinColWidth();
9356 };
9357 ColumnUtils.prototype.calculateColMaxWidth = function (colDef) {
9358 return colDef.maxWidth != null ? colDef.maxWidth : Number.MAX_SAFE_INTEGER;
9359 };
9360 ColumnUtils.prototype.calculateColInitialWidth = function (colDef) {
9361 var minColWidth = this.calculateColMinWidth(colDef);
9362 var maxColWidth = this.calculateColMaxWidth(colDef);
9363 var width;
9364 var colDefWidth = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToNumber"])(colDef.width);
9365 var colDefInitialWidth = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["attrToNumber"])(colDef.initialWidth);
9366 if (colDefWidth != null) {
9367 width = colDefWidth;
9368 }
9369 else if (colDefInitialWidth != null) {
9370 width = colDefInitialWidth;
9371 }
9372 else {
9373 width = 200;
9374 }
9375 return Math.max(Math.min(width, maxColWidth), minColWidth);
9376 };
9377 ColumnUtils.prototype.getOriginalPathForColumn = function (column, originalBalancedTree) {
9378 var result = [];
9379 var found = false;
9380 var recursePath = function (balancedColumnTree, dept) {
9381 for (var i = 0; i < balancedColumnTree.length; i++) {
9382 if (found) {
9383 return;
9384 }
9385 // quit the search, so 'result' is kept with the found result
9386 var node = balancedColumnTree[i];
9387 if (node instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
9388 var nextNode = node;
9389 recursePath(nextNode.getChildren(), dept + 1);
9390 result[dept] = node;
9391 }
9392 else if (node === column) {
9393 found = true;
9394 }
9395 }
9396 };
9397 recursePath(originalBalancedTree, 0);
9398 // we should always find the path, but in case there is a bug somewhere, returning null
9399 // will make it fail rather than provide a 'hard to track down' bug
9400 return found ? result : null;
9401 };
9402 ColumnUtils.prototype.depthFirstOriginalTreeSearch = function (parent, tree, callback) {
9403 var _this = this;
9404 if (!tree) {
9405 return;
9406 }
9407 tree.forEach(function (child) {
9408 if (child instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
9409 _this.depthFirstOriginalTreeSearch(child, child.getChildren(), callback);
9410 }
9411 callback(child, parent);
9412 });
9413 };
9414 ColumnUtils.prototype.depthFirstAllColumnTreeSearch = function (tree, callback) {
9415 var _this = this;
9416 if (!tree) {
9417 return;
9418 }
9419 tree.forEach(function (child) {
9420 if (child instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
9421 _this.depthFirstAllColumnTreeSearch(child.getChildren(), callback);
9422 }
9423 callback(child);
9424 });
9425 };
9426 ColumnUtils.prototype.depthFirstDisplayedColumnTreeSearch = function (tree, callback) {
9427 var _this = this;
9428 if (!tree) {
9429 return;
9430 }
9431 tree.forEach(function (child) {
9432 if (child instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
9433 _this.depthFirstDisplayedColumnTreeSearch(child.getDisplayedChildren(), callback);
9434 }
9435 callback(child);
9436 });
9437 };
9438 ColumnUtils = __decorate([
9439 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('columnUtils')
9440 ], ColumnUtils);
9441 return ColumnUtils;
9442}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
9443
9444
9445
9446/***/ }),
9447/* 34 */
9448/***/ (function(module, __webpack_exports__, __webpack_require__) {
9449
9450"use strict";
9451__webpack_require__.r(__webpack_exports__);
9452/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DisplayedGroupCreator", function() { return DisplayedGroupCreator; });
9453/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
9454/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
9455/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
9456/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
9457/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19);
9458/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
9459/**
9460 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9461 * @version v29.2.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 (Object.prototype.hasOwnProperty.call(b, 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
9488
9489
9490// takes in a list of columns, as specified by the column definitions, and returns column groups
9491var DisplayedGroupCreator = /** @class */ (function (_super) {
9492 __extends(DisplayedGroupCreator, _super);
9493 function DisplayedGroupCreator() {
9494 return _super !== null && _super.apply(this, arguments) || this;
9495 }
9496 DisplayedGroupCreator.prototype.createDisplayedGroups = function (
9497 // all displayed columns sorted - this is the columns the grid should show
9498 sortedVisibleColumns,
9499 // the tree of columns, as provided by the users, used to know what groups columns roll up into
9500 balancedColumnTree,
9501 // creates unique id's for the group
9502 groupInstanceIdCreator,
9503 // whether it's left, right or center col
9504 pinned,
9505 // we try to reuse old groups if we can, to allow gui to do animation
9506 oldDisplayedGroups) {
9507 var _this = this;
9508 var result = [];
9509 var previousRealPath;
9510 var previousOriginalPath;
9511 var oldColumnsMapped = this.mapOldGroupsById(oldDisplayedGroups);
9512 // go through each column, then do a bottom up comparison to the previous column, and start
9513 // to share groups if they converge at any point.
9514 sortedVisibleColumns.forEach(function (currentColumn) {
9515 var currentOriginalPath = _this.getOriginalPathForColumn(balancedColumnTree, currentColumn);
9516 var currentRealPath = [];
9517 var firstColumn = !previousOriginalPath;
9518 for (var i = 0; i < currentOriginalPath.length; i++) {
9519 if (firstColumn || currentOriginalPath[i] !== previousOriginalPath[i]) {
9520 // new group needed
9521 var newGroup = _this.createColumnGroup(currentOriginalPath[i], groupInstanceIdCreator, oldColumnsMapped, pinned);
9522 currentRealPath[i] = newGroup;
9523 // if top level, add to result, otherwise add to parent
9524 if (i == 0) {
9525 result.push(newGroup);
9526 }
9527 else {
9528 currentRealPath[i - 1].addChild(newGroup);
9529 }
9530 }
9531 else {
9532 // reuse old group
9533 currentRealPath[i] = previousRealPath[i];
9534 }
9535 }
9536 var noColumnGroups = currentRealPath.length === 0;
9537 if (noColumnGroups) {
9538 // if we are not grouping, then the result of the above is an empty
9539 // path (no groups), and we just add the column to the root list.
9540 result.push(currentColumn);
9541 }
9542 else {
9543 var leafGroup = Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(currentRealPath);
9544 leafGroup.addChild(currentColumn);
9545 }
9546 previousRealPath = currentRealPath;
9547 previousOriginalPath = currentOriginalPath;
9548 });
9549 this.setupParentsIntoColumns(result, null);
9550 return result;
9551 };
9552 DisplayedGroupCreator.prototype.createColumnGroup = function (providedGroup, groupInstanceIdCreator, oldColumnsMapped, pinned) {
9553 var groupId = providedGroup.getGroupId();
9554 var instanceId = groupInstanceIdCreator.getInstanceIdForKey(groupId);
9555 var uniqueId = _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"].createUniqueId(groupId, instanceId);
9556 var columnGroup = oldColumnsMapped[uniqueId];
9557 // if the user is setting new colDefs, it is possible that the id's overlap, and we
9558 // would have a false match from above. so we double check we are talking about the
9559 // same original column group.
9560 if (columnGroup && columnGroup.getProvidedColumnGroup() !== providedGroup) {
9561 columnGroup = null;
9562 }
9563 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(columnGroup)) {
9564 // clean out the old column group here, as we will be adding children into it again
9565 columnGroup.reset();
9566 }
9567 else {
9568 columnGroup = new _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"](providedGroup, groupId, instanceId, pinned);
9569 this.context.createBean(columnGroup);
9570 }
9571 return columnGroup;
9572 };
9573 // returns back a 2d map of ColumnGroup as follows: groupId -> instanceId -> ColumnGroup
9574 DisplayedGroupCreator.prototype.mapOldGroupsById = function (displayedGroups) {
9575 var result = {};
9576 var recursive = function (columnsOrGroups) {
9577 columnsOrGroups.forEach(function (columnOrGroup) {
9578 if (columnOrGroup instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
9579 var columnGroup = columnOrGroup;
9580 result[columnOrGroup.getUniqueId()] = columnGroup;
9581 recursive(columnGroup.getChildren());
9582 }
9583 });
9584 };
9585 if (displayedGroups) {
9586 recursive(displayedGroups);
9587 }
9588 return result;
9589 };
9590 DisplayedGroupCreator.prototype.setupParentsIntoColumns = function (columnsOrGroups, parent) {
9591 var _this = this;
9592 columnsOrGroups.forEach(function (columnsOrGroup) {
9593 columnsOrGroup.setParent(parent);
9594 if (columnsOrGroup instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
9595 var columnGroup = columnsOrGroup;
9596 _this.setupParentsIntoColumns(columnGroup.getChildren(), columnGroup);
9597 }
9598 });
9599 };
9600 DisplayedGroupCreator.prototype.getOriginalPathForColumn = function (balancedColumnTree, column) {
9601 var result = [];
9602 var found = false;
9603 var recursePath = function (columnTree, dept) {
9604 for (var i = 0; i < columnTree.length; i++) {
9605 // quit the search, so 'result' is kept with the found result
9606 if (found) {
9607 return;
9608 }
9609 var node = columnTree[i];
9610 if (node instanceof _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"]) {
9611 recursePath(node.getChildren(), dept + 1);
9612 result[dept] = node;
9613 }
9614 else if (node === column) {
9615 found = true;
9616 }
9617 }
9618 };
9619 recursePath(balancedColumnTree, 0);
9620 // it's possible we didn't find a path. this happens if the column is generated
9621 // by the grid (auto-group), in that the definition didn't come from the client. in this case,
9622 // we create a fake original path.
9623 if (found) {
9624 return result;
9625 }
9626 console.warn('AG Grid: could not get path');
9627 return null;
9628 };
9629 DisplayedGroupCreator = __decorate([
9630 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('displayedGroupCreator')
9631 ], DisplayedGroupCreator);
9632 return DisplayedGroupCreator;
9633}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
9634
9635
9636
9637/***/ }),
9638/* 35 */
9639/***/ (function(module, __webpack_exports__, __webpack_require__) {
9640
9641"use strict";
9642__webpack_require__.r(__webpack_exports__);
9643/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgStackComponentsRegistry", function() { return AgStackComponentsRegistry; });
9644/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
9645/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
9646/**
9647 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9648 * @version v29.2.0
9649 * @link https://www.ag-grid.com/
9650 * @license MIT
9651 */
9652var __extends = (undefined && undefined.__extends) || (function () {
9653 var extendStatics = function (d, b) {
9654 extendStatics = Object.setPrototypeOf ||
9655 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9656 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
9657 return extendStatics(d, b);
9658 };
9659 return function (d, b) {
9660 extendStatics(d, b);
9661 function __() { this.constructor = d; }
9662 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
9663 };
9664})();
9665var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
9666 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9667 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9668 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;
9669 return c > 3 && r && Object.defineProperty(target, key, r), r;
9670};
9671
9672
9673var AgStackComponentsRegistry = /** @class */ (function (_super) {
9674 __extends(AgStackComponentsRegistry, _super);
9675 function AgStackComponentsRegistry() {
9676 var _this = _super !== null && _super.apply(this, arguments) || this;
9677 _this.componentsMappedByName = {};
9678 return _this;
9679 }
9680 AgStackComponentsRegistry.prototype.setupComponents = function (components) {
9681 var _this = this;
9682 if (components) {
9683 components.forEach(function (componentMeta) { return _this.addComponent(componentMeta); });
9684 }
9685 };
9686 AgStackComponentsRegistry.prototype.addComponent = function (componentMeta) {
9687 // get name of the class as a string
9688 // insert a dash after every capital letter
9689 // let classEscaped = className.replace(/([A-Z])/g, "-$1").toLowerCase();
9690 var classEscaped = componentMeta.componentName.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
9691 // put all to upper case
9692 var classUpperCase = classEscaped.toUpperCase();
9693 // finally store
9694 this.componentsMappedByName[classUpperCase] = componentMeta.componentClass;
9695 };
9696 AgStackComponentsRegistry.prototype.getComponentClass = function (htmlTag) {
9697 return this.componentsMappedByName[htmlTag];
9698 };
9699 AgStackComponentsRegistry = __decorate([
9700 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('agStackComponentsRegistry')
9701 ], AgStackComponentsRegistry);
9702 return AgStackComponentsRegistry;
9703}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
9704
9705
9706
9707/***/ }),
9708/* 36 */
9709/***/ (function(module, __webpack_exports__, __webpack_require__) {
9710
9711"use strict";
9712__webpack_require__.r(__webpack_exports__);
9713/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserComponentRegistry", function() { return UserComponentRegistry; });
9714/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
9715/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
9716/* harmony import */ var _filter_floating_provided_readOnlyFloatingFilter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(37);
9717/* harmony import */ var _filter_provided_date_dateFilter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(58);
9718/* harmony import */ var _filter_provided_date_dateFloatingFilter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75);
9719/* harmony import */ var _filter_provided_date_defaultDateComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(77);
9720/* harmony import */ var _filter_provided_number_numberFilter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(78);
9721/* harmony import */ var _filter_provided_number_numberFloatingFilter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(81);
9722/* harmony import */ var _filter_provided_text_textFilter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(83);
9723/* harmony import */ var _filter_provided_text_textFloatingFilter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(84);
9724/* harmony import */ var _headerRendering_cells_column_headerComp__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(85);
9725/* harmony import */ var _headerRendering_cells_column_sortIndicatorComp__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(87);
9726/* harmony import */ var _headerRendering_cells_columnGroup_headerGroupComp__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(88);
9727/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14);
9728/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(15);
9729/* harmony import */ var _rendering_cellEditors_largeTextCellEditor__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(89);
9730/* harmony import */ var _rendering_cellEditors_selectCellEditor__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(91);
9731/* harmony import */ var _rendering_cellEditors_textCellEditor__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(92);
9732/* harmony import */ var _rendering_cellRenderers_animateShowChangeCellRenderer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(93);
9733/* harmony import */ var _rendering_cellRenderers_animateSlideCellRenderer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(94);
9734/* harmony import */ var _rendering_cellRenderers_groupCellRenderer__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(95);
9735/* harmony import */ var _rendering_cellRenderers_loadingCellRenderer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(101);
9736/* harmony import */ var _rendering_overlays_loadingOverlayComponent__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(102);
9737/* harmony import */ var _rendering_overlays_noRowsOverlayComponent__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(103);
9738/* harmony import */ var _rendering_tooltipComponent__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(104);
9739/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(13);
9740/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(12);
9741/* harmony import */ var _utils_fuzzyMatch__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(28);
9742/**
9743 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9744 * @version v29.2.0
9745 * @link https://www.ag-grid.com/
9746 * @license MIT
9747 */
9748var __extends = (undefined && undefined.__extends) || (function () {
9749 var extendStatics = function (d, b) {
9750 extendStatics = Object.setPrototypeOf ||
9751 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9752 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
9753 return extendStatics(d, b);
9754 };
9755 return function (d, b) {
9756 extendStatics(d, b);
9757 function __() { this.constructor = d; }
9758 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
9759 };
9760})();
9761var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
9762 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9763 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9764 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;
9765 return c > 3 && r && Object.defineProperty(target, key, r), r;
9766};
9767var __read = (undefined && undefined.__read) || function (o, n) {
9768 var m = typeof Symbol === "function" && o[Symbol.iterator];
9769 if (!m) return o;
9770 var i = m.call(o), r, ar = [], e;
9771 try {
9772 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
9773 }
9774 catch (error) { e = { error: error }; }
9775 finally {
9776 try {
9777 if (r && !r.done && (m = i["return"])) m.call(i);
9778 }
9779 finally { if (e) throw e.error; }
9780 }
9781 return ar;
9782};
9783var __spread = (undefined && undefined.__spread) || function () {
9784 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
9785 return ar;
9786};
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815var UserComponentRegistry = /** @class */ (function (_super) {
9816 __extends(UserComponentRegistry, _super);
9817 function UserComponentRegistry() {
9818 var _this = _super !== null && _super.apply(this, arguments) || this;
9819 _this.agGridDefaults = {
9820 //date
9821 agDateInput: _filter_provided_date_defaultDateComponent__WEBPACK_IMPORTED_MODULE_5__["DefaultDateComponent"],
9822 //header
9823 agColumnHeader: _headerRendering_cells_column_headerComp__WEBPACK_IMPORTED_MODULE_10__["HeaderComp"],
9824 agColumnGroupHeader: _headerRendering_cells_columnGroup_headerGroupComp__WEBPACK_IMPORTED_MODULE_12__["HeaderGroupComp"],
9825 agSortIndicator: _headerRendering_cells_column_sortIndicatorComp__WEBPACK_IMPORTED_MODULE_11__["SortIndicatorComp"],
9826 //floating filters
9827 agTextColumnFloatingFilter: _filter_provided_text_textFloatingFilter__WEBPACK_IMPORTED_MODULE_9__["TextFloatingFilter"],
9828 agNumberColumnFloatingFilter: _filter_provided_number_numberFloatingFilter__WEBPACK_IMPORTED_MODULE_7__["NumberFloatingFilter"],
9829 agDateColumnFloatingFilter: _filter_provided_date_dateFloatingFilter__WEBPACK_IMPORTED_MODULE_4__["DateFloatingFilter"],
9830 agReadOnlyFloatingFilter: _filter_floating_provided_readOnlyFloatingFilter__WEBPACK_IMPORTED_MODULE_2__["ReadOnlyFloatingFilter"],
9831 // renderers
9832 agAnimateShowChangeCellRenderer: _rendering_cellRenderers_animateShowChangeCellRenderer__WEBPACK_IMPORTED_MODULE_18__["AnimateShowChangeCellRenderer"],
9833 agAnimateSlideCellRenderer: _rendering_cellRenderers_animateSlideCellRenderer__WEBPACK_IMPORTED_MODULE_19__["AnimateSlideCellRenderer"],
9834 agGroupCellRenderer: _rendering_cellRenderers_groupCellRenderer__WEBPACK_IMPORTED_MODULE_20__["GroupCellRenderer"],
9835 agGroupRowRenderer: _rendering_cellRenderers_groupCellRenderer__WEBPACK_IMPORTED_MODULE_20__["GroupCellRenderer"],
9836 agLoadingCellRenderer: _rendering_cellRenderers_loadingCellRenderer__WEBPACK_IMPORTED_MODULE_21__["LoadingCellRenderer"],
9837 //editors
9838 agCellEditor: _rendering_cellEditors_textCellEditor__WEBPACK_IMPORTED_MODULE_17__["TextCellEditor"],
9839 agTextCellEditor: _rendering_cellEditors_textCellEditor__WEBPACK_IMPORTED_MODULE_17__["TextCellEditor"],
9840 agSelectCellEditor: _rendering_cellEditors_selectCellEditor__WEBPACK_IMPORTED_MODULE_16__["SelectCellEditor"],
9841 agLargeTextCellEditor: _rendering_cellEditors_largeTextCellEditor__WEBPACK_IMPORTED_MODULE_15__["LargeTextCellEditor"],
9842 //filter
9843 agTextColumnFilter: _filter_provided_text_textFilter__WEBPACK_IMPORTED_MODULE_8__["TextFilter"],
9844 agNumberColumnFilter: _filter_provided_number_numberFilter__WEBPACK_IMPORTED_MODULE_6__["NumberFilter"],
9845 agDateColumnFilter: _filter_provided_date_dateFilter__WEBPACK_IMPORTED_MODULE_3__["DateFilter"],
9846 //overlays
9847 agLoadingOverlay: _rendering_overlays_loadingOverlayComponent__WEBPACK_IMPORTED_MODULE_22__["LoadingOverlayComponent"],
9848 agNoRowsOverlay: _rendering_overlays_noRowsOverlayComponent__WEBPACK_IMPORTED_MODULE_23__["NoRowsOverlayComponent"],
9849 // tooltips
9850 agTooltipComponent: _rendering_tooltipComponent__WEBPACK_IMPORTED_MODULE_24__["TooltipComponent"]
9851 };
9852 /** Used to provide useful error messages if a user is trying to use an enterprise component without loading the module. */
9853 _this.enterpriseAgDefaultCompsModule = {
9854 agSetColumnFilter: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].SetFilterModule,
9855 agSetColumnFloatingFilter: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].SetFilterModule,
9856 agMultiColumnFilter: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].MultiFilterModule,
9857 agMultiColumnFloatingFilter: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].MultiFilterModule,
9858 agGroupColumnFilter: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].RowGroupingModule,
9859 agGroupColumnFloatingFilter: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].RowGroupingModule,
9860 agRichSelect: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].RichSelectModule,
9861 agRichSelectCellEditor: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].RichSelectModule,
9862 agDetailCellRenderer: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].MasterDetailModule,
9863 agSparklineCellRenderer: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_13__["ModuleNames"].SparklinesModule
9864 };
9865 _this.deprecatedAgGridDefaults = {
9866 agPopupTextCellEditor: 'AG Grid: Since v27.1 The agPopupTextCellEditor is deprecated. Instead use { cellEditor: "agTextCellEditor", cellEditorPopup: true }',
9867 agPopupSelectCellEditor: 'AG Grid: Since v27.1 the agPopupSelectCellEditor is deprecated. Instead use { cellEditor: "agSelectCellEditor", cellEditorPopup: true }',
9868 };
9869 _this.jsComps = {};
9870 _this.fwComps = {};
9871 return _this;
9872 }
9873 UserComponentRegistry.prototype.init = function () {
9874 var _this = this;
9875 if (this.gridOptions.components != null) {
9876 Object(_utils_object__WEBPACK_IMPORTED_MODULE_26__["iterateObject"])(this.gridOptions.components, function (key, component) { return _this.registerJsComponent(key, component); });
9877 }
9878 if (this.gridOptions.frameworkComponents != null) {
9879 Object(_utils_object__WEBPACK_IMPORTED_MODULE_26__["iterateObject"])(this.gridOptions.frameworkComponents, function (key, component) { return _this.registerFwComponent(key, component); });
9880 }
9881 };
9882 UserComponentRegistry.prototype.registerDefaultComponent = function (name, component) {
9883 if (this.agGridDefaults[name]) {
9884 console.error("Trying to overwrite a default component. You should call registerComponent");
9885 return;
9886 }
9887 this.agGridDefaults[name] = component;
9888 };
9889 UserComponentRegistry.prototype.registerJsComponent = function (name, component) {
9890 if (this.fwComps[name]) {
9891 console.error("Trying to register a component that you have already registered for frameworks: " + name);
9892 return;
9893 }
9894 this.jsComps[name] = component;
9895 };
9896 /**
9897 * B the business interface (ie IHeader)
9898 * A the agGridComponent interface (ie IHeaderComp). The final object acceptable by ag-grid
9899 */
9900 UserComponentRegistry.prototype.registerFwComponent = function (name, component) {
9901 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.";
9902 Object(_utils_function__WEBPACK_IMPORTED_MODULE_25__["doOnce"])(function () { return console.warn(warningMessage); }, "UserComponentRegistry.frameworkComponentsDeprecated");
9903 this.fwComps[name] = component;
9904 };
9905 UserComponentRegistry.prototype.retrieve = function (propertyName, name) {
9906 var _this = this;
9907 var createResult = function (component, componentFromFramework) { return ({ componentFromFramework: componentFromFramework, component: component }); };
9908 // FrameworkOverrides.frameworkComponent() is used in two locations:
9909 // 1) for Vue, user provided components get registered via a framework specific way.
9910 // 2) for React, it's how the React UI provides alternative default components (eg GroupCellRenderer and DetailCellRenderer)
9911 var registeredViaFrameworkComp = this.getFrameworkOverrides().frameworkComponent(name, this.gridOptions.components);
9912 if (registeredViaFrameworkComp != null) {
9913 return createResult(registeredViaFrameworkComp, true);
9914 }
9915 var frameworkComponent = this.fwComps[name];
9916 if (frameworkComponent) {
9917 return createResult(frameworkComponent, true);
9918 }
9919 var jsComponent = this.jsComps[name];
9920 if (jsComponent) {
9921 var isFwkComp = this.getFrameworkOverrides().isFrameworkComponent(jsComponent);
9922 return createResult(jsComponent, isFwkComp);
9923 }
9924 var defaultComponent = this.agGridDefaults[name];
9925 if (defaultComponent) {
9926 return createResult(defaultComponent, false);
9927 }
9928 var moduleForComponent = this.enterpriseAgDefaultCompsModule[name];
9929 if (moduleForComponent) {
9930 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_14__["ModuleRegistry"].assertRegistered(moduleForComponent, "AG Grid '" + propertyName + "' component: " + name);
9931 }
9932 else if (this.deprecatedAgGridDefaults[name]) {
9933 Object(_utils_function__WEBPACK_IMPORTED_MODULE_25__["doOnce"])(function () { return console.warn(_this.deprecatedAgGridDefaults[name]); }, name);
9934 }
9935 else {
9936 Object(_utils_function__WEBPACK_IMPORTED_MODULE_25__["doOnce"])(function () { _this.warnAboutMissingComponent(propertyName, name); }, "MissingComp" + name);
9937 }
9938 return null;
9939 };
9940 UserComponentRegistry.prototype.warnAboutMissingComponent = function (propertyName, componentName) {
9941 var validComponents = __spread(Object.keys(this.agGridDefaults).filter(function (k) { return !['agCellEditor', 'agGroupRowRenderer', 'agSortIndicator'].includes(k); }), Object.keys(this.jsComps), Object.keys(this.fwComps));
9942 var suggestions = Object(_utils_fuzzyMatch__WEBPACK_IMPORTED_MODULE_27__["fuzzySuggestions"])(componentName, validComponents, true, 0.8);
9943 console.warn("AG Grid: Could not find '" + componentName + "' component. It was configured as \"" + propertyName + ": '" + componentName + "'\" but it wasn't found in the list of registered components.");
9944 if (suggestions.length > 0) {
9945 console.warn(" Did you mean: [" + suggestions.slice(0, 3) + "]?");
9946 }
9947 console.warn("If using a custom component check it has been registered as described in: https://ag-grid.com/javascript-data-grid/components/");
9948 };
9949 __decorate([
9950 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptions')
9951 ], UserComponentRegistry.prototype, "gridOptions", void 0);
9952 __decorate([
9953 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
9954 ], UserComponentRegistry.prototype, "init", null);
9955 UserComponentRegistry = __decorate([
9956 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('userComponentRegistry')
9957 ], UserComponentRegistry);
9958 return UserComponentRegistry;
9959}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
9960
9961
9962
9963/***/ }),
9964/* 37 */
9965/***/ (function(module, __webpack_exports__, __webpack_require__) {
9966
9967"use strict";
9968__webpack_require__.r(__webpack_exports__);
9969/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReadOnlyFloatingFilter", function() { return ReadOnlyFloatingFilter; });
9970/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
9971/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
9972/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
9973/**
9974 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
9975 * @version v29.2.0
9976 * @link https://www.ag-grid.com/
9977 * @license MIT
9978 */
9979var __extends = (undefined && undefined.__extends) || (function () {
9980 var extendStatics = function (d, b) {
9981 extendStatics = Object.setPrototypeOf ||
9982 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9983 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
9984 return extendStatics(d, b);
9985 };
9986 return function (d, b) {
9987 extendStatics(d, b);
9988 function __() { this.constructor = d; }
9989 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
9990 };
9991})();
9992var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
9993 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9994 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9995 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;
9996 return c > 3 && r && Object.defineProperty(target, key, r), r;
9997};
9998
9999
10000
10001// optional floating filter for user provided filters - instead of providing a floating filter,
10002// they can provide a getModelAsString() method on the filter instead. this class just displays
10003// the string returned from getModelAsString()
10004var ReadOnlyFloatingFilter = /** @class */ (function (_super) {
10005 __extends(ReadOnlyFloatingFilter, _super);
10006 function ReadOnlyFloatingFilter() {
10007 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;
10008 }
10009 // this is a user component, and IComponent has "public destroy()" as part of the interface.
10010 // so we need to override destroy() just to make the method public.
10011 ReadOnlyFloatingFilter.prototype.destroy = function () {
10012 _super.prototype.destroy.call(this);
10013 };
10014 ReadOnlyFloatingFilter.prototype.init = function (params) {
10015 this.params = params;
10016 var displayName = this.columnModel.getDisplayNameForColumn(params.column, 'header', true);
10017 var translate = this.localeService.getLocaleTextFunc();
10018 this.eFloatingFilterText
10019 .setDisabled(true)
10020 .setInputAriaLabel(displayName + " " + translate('ariaFilterInput', 'Filter Input'));
10021 };
10022 ReadOnlyFloatingFilter.prototype.onParentModelChanged = function (parentModel) {
10023 var _this = this;
10024 if (!parentModel) {
10025 this.eFloatingFilterText.setValue('');
10026 return;
10027 }
10028 this.params.parentFilterInstance(function (filterInstance) {
10029 // it would be nice to check if getModelAsString was present before creating this component,
10030 // however that is not possible, as React Hooks and VueJS don't attached the methods to the Filter until
10031 // AFTER the filter is created, not allowing inspection before this (we create floating filters as columns
10032 // are drawn, but the parent filters are only created when needed).
10033 if (filterInstance.getModelAsString) {
10034 var modelAsString = filterInstance.getModelAsString(parentModel);
10035 _this.eFloatingFilterText.setValue(modelAsString);
10036 }
10037 });
10038 };
10039 __decorate([
10040 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eFloatingFilterText')
10041 ], ReadOnlyFloatingFilter.prototype, "eFloatingFilterText", void 0);
10042 __decorate([
10043 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
10044 ], ReadOnlyFloatingFilter.prototype, "columnModel", void 0);
10045 return ReadOnlyFloatingFilter;
10046}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
10047
10048
10049
10050/***/ }),
10051/* 38 */
10052/***/ (function(module, __webpack_exports__, __webpack_require__) {
10053
10054"use strict";
10055__webpack_require__.r(__webpack_exports__);
10056/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return Component; });
10057/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
10058/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
10059/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39);
10060/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45);
10061/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
10062/* harmony import */ var _customTooltipFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(55);
10063/* harmony import */ var _rendering_cssClassManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(56);
10064/**
10065 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
10066 * @version v29.2.0
10067 * @link https://www.ag-grid.com/
10068 * @license MIT
10069 */
10070var __extends = (undefined && undefined.__extends) || (function () {
10071 var extendStatics = function (d, b) {
10072 extendStatics = Object.setPrototypeOf ||
10073 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10074 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
10075 return extendStatics(d, b);
10076 };
10077 return function (d, b) {
10078 extendStatics(d, b);
10079 function __() { this.constructor = d; }
10080 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10081 };
10082})();
10083var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
10084 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
10085 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
10086 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;
10087 return c > 3 && r && Object.defineProperty(target, key, r), r;
10088};
10089
10090
10091
10092
10093
10094
10095
10096var compIdSequence = new _utils__WEBPACK_IMPORTED_MODULE_2__["NumberSequence"]();
10097var Component = /** @class */ (function (_super) {
10098 __extends(Component, _super);
10099 function Component(template) {
10100 var _this = _super.call(this) || this;
10101 // if false, then CSS class "ag-hidden" is applied, which sets "display: none"
10102 _this.displayed = true;
10103 // if false, then CSS class "ag-invisible" is applied, which sets "visibility: hidden"
10104 _this.visible = true;
10105 // unique id for this row component. this is used for getting a reference to the HTML dom.
10106 // we cannot use the RowNode id as this is not unique (due to animation, old rows can be lying
10107 // around as we create a new rowComp instance for the same row node).
10108 _this.compId = compIdSequence.next();
10109 _this.cssClassManager = new _rendering_cssClassManager__WEBPACK_IMPORTED_MODULE_6__["CssClassManager"](function () { return _this.eGui; });
10110 if (template) {
10111 _this.setTemplate(template);
10112 }
10113 return _this;
10114 }
10115 Component.prototype.preConstructOnComponent = function () {
10116 this.usingBrowserTooltips = this.gridOptionsService.is('enableBrowserTooltips');
10117 };
10118 Component.prototype.getCompId = function () {
10119 return this.compId;
10120 };
10121 Component.prototype.getTooltipParams = function () {
10122 return {
10123 value: this.tooltipText,
10124 location: 'UNKNOWN'
10125 };
10126 };
10127 Component.prototype.setTooltip = function (newTooltipText) {
10128 var _this = this;
10129 var removeTooltip = function () {
10130 if (_this.usingBrowserTooltips) {
10131 _this.getGui().removeAttribute('title');
10132 }
10133 else {
10134 _this.tooltipFeature = _this.destroyBean(_this.tooltipFeature);
10135 }
10136 };
10137 var addTooltip = function () {
10138 if (_this.usingBrowserTooltips) {
10139 _this.getGui().setAttribute('title', _this.tooltipText);
10140 }
10141 else {
10142 _this.tooltipFeature = _this.createBean(new _customTooltipFeature__WEBPACK_IMPORTED_MODULE_5__["CustomTooltipFeature"](_this));
10143 }
10144 };
10145 if (this.tooltipText != newTooltipText) {
10146 if (this.tooltipText) {
10147 removeTooltip();
10148 }
10149 if (newTooltipText != null) {
10150 this.tooltipText = newTooltipText;
10151 if (this.tooltipText) {
10152 addTooltip();
10153 }
10154 }
10155 }
10156 };
10157 // for registered components only, eg creates AgCheckbox instance from ag-checkbox HTML tag
10158 Component.prototype.createChildComponentsFromTags = function (parentNode, paramsMap) {
10159 var _this = this;
10160 // we MUST take a copy of the list first, as the 'swapComponentForNode' adds comments into the DOM
10161 // which messes up the traversal order of the children.
10162 var childNodeList = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["copyNodeList"])(parentNode.childNodes);
10163 childNodeList.forEach(function (childNode) {
10164 if (!(childNode instanceof HTMLElement)) {
10165 return;
10166 }
10167 var childComp = _this.createComponentFromElement(childNode, function (childComp) {
10168 // copy over all attributes, including css classes, so any attributes user put on the tag
10169 // wll be carried across
10170 var childGui = childComp.getGui();
10171 if (childGui) {
10172 _this.copyAttributesFromNode(childNode, childComp.getGui());
10173 }
10174 }, paramsMap);
10175 if (childComp) {
10176 if (childComp.addItems && childNode.children.length) {
10177 _this.createChildComponentsFromTags(childNode, paramsMap);
10178 // converting from HTMLCollection to Array
10179 var items = Array.prototype.slice.call(childNode.children);
10180 childComp.addItems(items);
10181 }
10182 // replace the tag (eg ag-checkbox) with the proper HTMLElement (eg 'div') in the dom
10183 _this.swapComponentForNode(childComp, parentNode, childNode);
10184 }
10185 else if (childNode.childNodes) {
10186 _this.createChildComponentsFromTags(childNode, paramsMap);
10187 }
10188 });
10189 };
10190 Component.prototype.createComponentFromElement = function (element, afterPreCreateCallback, paramsMap) {
10191 var key = element.nodeName;
10192 var componentParams = paramsMap ? paramsMap[element.getAttribute('ref')] : undefined;
10193 var ComponentClass = this.agStackComponentsRegistry.getComponentClass(key);
10194 if (ComponentClass) {
10195 Component.elementGettingCreated = element;
10196 var newComponent = new ComponentClass(componentParams);
10197 newComponent.setParentComponent(this);
10198 this.createBean(newComponent, null, afterPreCreateCallback);
10199 return newComponent;
10200 }
10201 return null;
10202 };
10203 Component.prototype.copyAttributesFromNode = function (source, dest) {
10204 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["iterateNamedNodeMap"])(source.attributes, function (name, value) { return dest.setAttribute(name, value); });
10205 };
10206 Component.prototype.swapComponentForNode = function (newComponent, parentNode, childNode) {
10207 var eComponent = newComponent.getGui();
10208 parentNode.replaceChild(eComponent, childNode);
10209 parentNode.insertBefore(document.createComment(childNode.nodeName), eComponent);
10210 this.addDestroyFunc(this.destroyBean.bind(this, newComponent));
10211 this.swapInComponentForQuerySelectors(newComponent, childNode);
10212 };
10213 Component.prototype.swapInComponentForQuerySelectors = function (newComponent, childNode) {
10214 var thisNoType = this;
10215 this.iterateOverQuerySelectors(function (querySelector) {
10216 if (thisNoType[querySelector.attributeName] === childNode) {
10217 thisNoType[querySelector.attributeName] = newComponent;
10218 }
10219 });
10220 };
10221 Component.prototype.iterateOverQuerySelectors = function (action) {
10222 var thisPrototype = Object.getPrototypeOf(this);
10223 while (thisPrototype != null) {
10224 var metaData = thisPrototype.__agComponentMetaData;
10225 var currentProtoName = Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["getFunctionName"])(thisPrototype.constructor);
10226 if (metaData && metaData[currentProtoName] && metaData[currentProtoName].querySelectors) {
10227 metaData[currentProtoName].querySelectors.forEach(function (querySelector) { return action(querySelector); });
10228 }
10229 thisPrototype = Object.getPrototypeOf(thisPrototype);
10230 }
10231 };
10232 Component.prototype.setTemplate = function (template, paramsMap) {
10233 var eGui = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["loadTemplate"])(template);
10234 this.setTemplateFromElement(eGui, paramsMap);
10235 };
10236 Component.prototype.setTemplateFromElement = function (element, paramsMap) {
10237 this.eGui = element;
10238 this.eGui.__agComponent = this;
10239 this.wireQuerySelectors();
10240 // context will not be available when user sets template in constructor
10241 if (!!this.getContext()) {
10242 this.createChildComponentsFromTags(this.getGui(), paramsMap);
10243 }
10244 };
10245 Component.prototype.createChildComponentsPreConstruct = function () {
10246 // ui exists if user sets template in constructor. when this happens, we have to wait for the context
10247 // to be autoWired first before we can create child components.
10248 if (!!this.getGui()) {
10249 this.createChildComponentsFromTags(this.getGui());
10250 }
10251 };
10252 Component.prototype.wireQuerySelectors = function () {
10253 var _this = this;
10254 if (!this.eGui) {
10255 return;
10256 }
10257 var thisNoType = this;
10258 this.iterateOverQuerySelectors(function (querySelector) {
10259 var setResult = function (result) { return thisNoType[querySelector.attributeName] = result; };
10260 // if it's a ref selector, and match is on top level component, we return
10261 // the element. otherwise no way of components putting ref=xxx on the top
10262 // level element as querySelector only looks at children.
10263 var topLevelRefMatch = querySelector.refSelector
10264 && _this.eGui.getAttribute('ref') === querySelector.refSelector;
10265 if (topLevelRefMatch) {
10266 setResult(_this.eGui);
10267 }
10268 else {
10269 // otherwise use querySelector, which looks at children
10270 var resultOfQuery = _this.eGui.querySelector(querySelector.querySelector);
10271 if (resultOfQuery) {
10272 setResult(resultOfQuery.__agComponent || resultOfQuery);
10273 }
10274 }
10275 });
10276 };
10277 Component.prototype.getGui = function () {
10278 return this.eGui;
10279 };
10280 Component.prototype.getFocusableElement = function () {
10281 return this.eGui;
10282 };
10283 Component.prototype.setParentComponent = function (component) {
10284 this.parentComponent = component;
10285 };
10286 Component.prototype.getParentComponent = function () {
10287 return this.parentComponent;
10288 };
10289 // this method is for older code, that wants to provide the gui element,
10290 // it is not intended for this to be in ag-Stack
10291 Component.prototype.setGui = function (eGui) {
10292 this.eGui = eGui;
10293 };
10294 Component.prototype.queryForHtmlElement = function (cssSelector) {
10295 return this.eGui.querySelector(cssSelector);
10296 };
10297 Component.prototype.queryForHtmlInputElement = function (cssSelector) {
10298 return this.eGui.querySelector(cssSelector);
10299 };
10300 Component.prototype.appendChild = function (newChild, container) {
10301 if (newChild == null) {
10302 return;
10303 }
10304 if (!container) {
10305 container = this.eGui;
10306 }
10307 if (Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["isNodeOrElement"])(newChild)) {
10308 container.appendChild(newChild);
10309 }
10310 else {
10311 var childComponent = newChild;
10312 container.appendChild(childComponent.getGui());
10313 }
10314 };
10315 Component.prototype.isDisplayed = function () {
10316 return this.displayed;
10317 };
10318 Component.prototype.setVisible = function (visible, options) {
10319 if (options === void 0) { options = {}; }
10320 if (visible !== this.visible) {
10321 this.visible = visible;
10322 var skipAriaHidden = options.skipAriaHidden;
10323 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setVisible"])(this.eGui, visible, { skipAriaHidden: skipAriaHidden });
10324 }
10325 };
10326 Component.prototype.setDisplayed = function (displayed, options) {
10327 if (options === void 0) { options = {}; }
10328 if (displayed !== this.displayed) {
10329 this.displayed = displayed;
10330 var skipAriaHidden = options.skipAriaHidden;
10331 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setDisplayed"])(this.eGui, displayed, { skipAriaHidden: skipAriaHidden });
10332 var event_1 = {
10333 type: Component.EVENT_DISPLAYED_CHANGED,
10334 visible: this.displayed
10335 };
10336 this.dispatchEvent(event_1);
10337 }
10338 };
10339 Component.prototype.destroy = function () {
10340 if (this.tooltipFeature) {
10341 this.tooltipFeature = this.destroyBean(this.tooltipFeature);
10342 }
10343 if (this.parentComponent) {
10344 this.parentComponent = undefined;
10345 }
10346 var eGui = this.eGui;
10347 if (eGui && eGui.__agComponent) {
10348 eGui.__agComponent = undefined;
10349 }
10350 _super.prototype.destroy.call(this);
10351 };
10352 Component.prototype.addGuiEventListener = function (event, listener, options) {
10353 var _this = this;
10354 this.eGui.addEventListener(event, listener, options);
10355 this.addDestroyFunc(function () { return _this.eGui.removeEventListener(event, listener); });
10356 };
10357 Component.prototype.addCssClass = function (className) {
10358 this.cssClassManager.addCssClass(className);
10359 };
10360 Component.prototype.removeCssClass = function (className) {
10361 this.cssClassManager.removeCssClass(className);
10362 };
10363 Component.prototype.containsCssClass = function (className) {
10364 return this.cssClassManager.containsCssClass(className);
10365 };
10366 Component.prototype.addOrRemoveCssClass = function (className, addOrRemove) {
10367 this.cssClassManager.addOrRemoveCssClass(className, addOrRemove);
10368 };
10369 Component.prototype.getAttribute = function (key) {
10370 var eGui = this.eGui;
10371 return eGui ? eGui.getAttribute(key) : null;
10372 };
10373 Component.prototype.getRefElement = function (refName) {
10374 return this.queryForHtmlElement("[ref=\"" + refName + "\"]");
10375 };
10376 Component.EVENT_DISPLAYED_CHANGED = 'displayedChanged';
10377 __decorate([
10378 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('agStackComponentsRegistry')
10379 ], Component.prototype, "agStackComponentsRegistry", void 0);
10380 __decorate([
10381 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreConstruct"]
10382 ], Component.prototype, "preConstructOnComponent", null);
10383 __decorate([
10384 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreConstruct"]
10385 ], Component.prototype, "createChildComponentsPreConstruct", null);
10386 return Component;
10387}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
10388
10389
10390
10391/***/ }),
10392/* 39 */
10393/***/ (function(module, __webpack_exports__, __webpack_require__) {
10394
10395"use strict";
10396__webpack_require__.r(__webpack_exports__);
10397/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
10398/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_", function() { return _utils__WEBPACK_IMPORTED_MODULE_0__["_"]; });
10399
10400/* harmony import */ var _numberSequence__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(52);
10401/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberSequence", function() { return _numberSequence__WEBPACK_IMPORTED_MODULE_1__["NumberSequence"]; });
10402
10403/* harmony import */ var _promise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53);
10404/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromiseStatus", function() { return _promise__WEBPACK_IMPORTED_MODULE_2__["AgPromiseStatus"]; });
10405
10406/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromise", function() { return _promise__WEBPACK_IMPORTED_MODULE_2__["AgPromise"]; });
10407
10408/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54);
10409/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return _timer__WEBPACK_IMPORTED_MODULE_3__["Timer"]; });
10410
10411/**
10412 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
10413 * @version v29.2.0
10414 * @link https://www.ag-grid.com/
10415 * @license MIT
10416 */
10417
10418
10419
10420
10421
10422
10423/***/ }),
10424/* 40 */
10425/***/ (function(module, __webpack_exports__, __webpack_require__) {
10426
10427"use strict";
10428__webpack_require__.r(__webpack_exports__);
10429/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_", function() { return _; });
10430/* harmony import */ var _aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
10431/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19);
10432/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
10433/* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43);
10434/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45);
10435/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18);
10436/* harmony import */ var _function__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13);
10437/* harmony import */ var _fuzzyMatch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(28);
10438/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7);
10439/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46);
10440/* harmony import */ var _keyboard__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(47);
10441/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(32);
10442/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(49);
10443/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(44);
10444/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(12);
10445/* harmony import */ var _rowNode__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(50);
10446/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(51);
10447/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(31);
10448/**
10449 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
10450 * @version v29.2.0
10451 * @link https://www.ag-grid.com/
10452 * @license MIT
10453 */
10454var __assign = (undefined && undefined.__assign) || function () {
10455 __assign = Object.assign || function(t) {
10456 for (var s, i = 1, n = arguments.length; i < n; i++) {
10457 s = arguments[i];
10458 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10459 t[p] = s[p];
10460 }
10461 return t;
10462 };
10463 return __assign.apply(this, arguments);
10464};
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483var utils = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, _aria__WEBPACK_IMPORTED_MODULE_0__), _array__WEBPACK_IMPORTED_MODULE_1__), _browser__WEBPACK_IMPORTED_MODULE_2__), _date__WEBPACK_IMPORTED_MODULE_3__), _dom__WEBPACK_IMPORTED_MODULE_4__), _event__WEBPACK_IMPORTED_MODULE_5__), _function__WEBPACK_IMPORTED_MODULE_6__), _fuzzyMatch__WEBPACK_IMPORTED_MODULE_7__), _generic__WEBPACK_IMPORTED_MODULE_8__), _icon__WEBPACK_IMPORTED_MODULE_9__), _keyboard__WEBPACK_IMPORTED_MODULE_10__), _map__WEBPACK_IMPORTED_MODULE_11__), _mouse__WEBPACK_IMPORTED_MODULE_12__), _number__WEBPACK_IMPORTED_MODULE_13__), _object__WEBPACK_IMPORTED_MODULE_14__), _rowNode__WEBPACK_IMPORTED_MODULE_15__), _set__WEBPACK_IMPORTED_MODULE_16__), _string__WEBPACK_IMPORTED_MODULE_17__);
10484var _ = utils;
10485
10486
10487/***/ }),
10488/* 41 */
10489/***/ (function(module, __webpack_exports__, __webpack_require__) {
10490
10491"use strict";
10492__webpack_require__.r(__webpack_exports__);
10493/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaRole", function() { return setAriaRole; });
10494/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAriaSortState", function() { return getAriaSortState; });
10495/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAriaLevel", function() { return getAriaLevel; });
10496/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAriaPosInSet", function() { return getAriaPosInSet; });
10497/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAriaDescribedBy", function() { return getAriaDescribedBy; });
10498/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaLabel", function() { return setAriaLabel; });
10499/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaLabelledBy", function() { return setAriaLabelledBy; });
10500/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaDescription", function() { return setAriaDescription; });
10501/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaDescribedBy", function() { return setAriaDescribedBy; });
10502/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaLive", function() { return setAriaLive; });
10503/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaLevel", function() { return setAriaLevel; });
10504/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaDisabled", function() { return setAriaDisabled; });
10505/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaHidden", function() { return setAriaHidden; });
10506/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaExpanded", function() { return setAriaExpanded; });
10507/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAriaExpanded", function() { return removeAriaExpanded; });
10508/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaSetSize", function() { return setAriaSetSize; });
10509/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaPosInSet", function() { return setAriaPosInSet; });
10510/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaMultiSelectable", function() { return setAriaMultiSelectable; });
10511/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaRowCount", function() { return setAriaRowCount; });
10512/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaRowIndex", function() { return setAriaRowIndex; });
10513/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaColCount", function() { return setAriaColCount; });
10514/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaColIndex", function() { return setAriaColIndex; });
10515/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaColSpan", function() { return setAriaColSpan; });
10516/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaSort", function() { return setAriaSort; });
10517/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAriaSort", function() { return removeAriaSort; });
10518/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaSelected", function() { return setAriaSelected; });
10519/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAriaChecked", function() { return setAriaChecked; });
10520/**
10521 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
10522 * @version v29.2.0
10523 * @link https://www.ag-grid.com/
10524 * @license MIT
10525 */
10526// ARIA HELPER FUNCTIONS
10527function toggleAriaAttribute(element, attribute, value) {
10528 if (value == null || value == '') {
10529 removeAriaAttribute(element, attribute);
10530 }
10531 else {
10532 setAriaAttribute(element, attribute, value);
10533 }
10534}
10535function setAriaAttribute(element, attribute, value) {
10536 element.setAttribute(ariaAttributeName(attribute), value.toString());
10537}
10538function removeAriaAttribute(element, attribute) {
10539 element.removeAttribute(ariaAttributeName(attribute));
10540}
10541function ariaAttributeName(attribute) {
10542 return "aria-" + attribute;
10543}
10544function setAriaRole(element, role) {
10545 if (role) {
10546 element.setAttribute('role', role);
10547 }
10548 else {
10549 element.removeAttribute('role');
10550 }
10551}
10552function getAriaSortState(sortDirection) {
10553 var sort;
10554 if (sortDirection === 'asc') {
10555 sort = 'ascending';
10556 }
10557 else if (sortDirection === 'desc') {
10558 sort = 'descending';
10559 }
10560 else if (sortDirection === 'mixed') {
10561 sort = 'other';
10562 }
10563 else {
10564 sort = 'none';
10565 }
10566 return sort;
10567}
10568// ARIA ATTRIBUTE GETTERS
10569function getAriaLevel(element) {
10570 return parseInt(element.getAttribute('aria-level'), 10);
10571}
10572function getAriaPosInSet(element) {
10573 return parseInt(element.getAttribute('aria-posinset'), 10);
10574}
10575function getAriaDescribedBy(element) {
10576 return element.getAttribute('aria-describedby') || '';
10577}
10578// ARIA ATTRIBUTE SETTERS
10579function setAriaLabel(element, label) {
10580 toggleAriaAttribute(element, 'label', label);
10581}
10582function setAriaLabelledBy(element, labelledBy) {
10583 toggleAriaAttribute(element, 'labelledby', labelledBy);
10584}
10585function setAriaDescription(element, description) {
10586 toggleAriaAttribute(element, 'description', description);
10587}
10588function setAriaDescribedBy(element, describedby) {
10589 toggleAriaAttribute(element, 'describedby', describedby);
10590}
10591function setAriaLive(element, live) {
10592 toggleAriaAttribute(element, 'live', live);
10593}
10594function setAriaLevel(element, level) {
10595 toggleAriaAttribute(element, 'level', level);
10596}
10597function setAriaDisabled(element, disabled) {
10598 toggleAriaAttribute(element, 'disabled', disabled);
10599}
10600function setAriaHidden(element, hidden) {
10601 toggleAriaAttribute(element, 'hidden', hidden);
10602}
10603function setAriaExpanded(element, expanded) {
10604 setAriaAttribute(element, 'expanded', expanded);
10605}
10606function removeAriaExpanded(element) {
10607 removeAriaAttribute(element, 'expanded');
10608}
10609function setAriaSetSize(element, setsize) {
10610 setAriaAttribute(element, 'setsize', setsize);
10611}
10612function setAriaPosInSet(element, position) {
10613 setAriaAttribute(element, 'posinset', position);
10614}
10615function setAriaMultiSelectable(element, multiSelectable) {
10616 setAriaAttribute(element, 'multiselectable', multiSelectable);
10617}
10618function setAriaRowCount(element, rowCount) {
10619 setAriaAttribute(element, 'rowcount', rowCount);
10620}
10621function setAriaRowIndex(element, rowIndex) {
10622 setAriaAttribute(element, 'rowindex', rowIndex);
10623}
10624function setAriaColCount(element, colCount) {
10625 setAriaAttribute(element, 'colcount', colCount);
10626}
10627function setAriaColIndex(element, colIndex) {
10628 setAriaAttribute(element, 'colindex', colIndex);
10629}
10630function setAriaColSpan(element, colSpan) {
10631 setAriaAttribute(element, 'colspan', colSpan);
10632}
10633function setAriaSort(element, sort) {
10634 setAriaAttribute(element, 'sort', sort);
10635}
10636function removeAriaSort(element) {
10637 removeAriaAttribute(element, 'sort');
10638}
10639function setAriaSelected(element, selected) {
10640 toggleAriaAttribute(element, 'selected', selected);
10641}
10642function setAriaChecked(element, checked) {
10643 setAriaAttribute(element, 'checked', checked === undefined ? 'mixed' : checked);
10644}
10645
10646
10647/***/ }),
10648/* 42 */
10649/***/ (function(module, __webpack_exports__, __webpack_require__) {
10650
10651"use strict";
10652__webpack_require__.r(__webpack_exports__);
10653/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowserSafari", function() { return isBrowserSafari; });
10654/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSafariVersion", function() { return getSafariVersion; });
10655/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowserChrome", function() { return isBrowserChrome; });
10656/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowserFirefox", function() { return isBrowserFirefox; });
10657/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMacOsUserAgent", function() { return isMacOsUserAgent; });
10658/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIOSUserAgent", function() { return isIOSUserAgent; });
10659/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "browserSupportsPreventScroll", function() { return browserSupportsPreventScroll; });
10660/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTabIndex", function() { return getTabIndex; });
10661/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMaxDivHeight", function() { return getMaxDivHeight; });
10662/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBodyWidth", function() { return getBodyWidth; });
10663/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBodyHeight", function() { return getBodyHeight; });
10664/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getScrollbarWidth", function() { return getScrollbarWidth; });
10665/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInvisibleScrollbar", function() { return isInvisibleScrollbar; });
10666/**
10667 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
10668 * @version v29.2.0
10669 * @link https://www.ag-grid.com/
10670 * @license MIT
10671 */
10672/**
10673 * These variables are lazy loaded, as otherwise they try and get initialised when we are loading
10674 * unit tests and we don't have references to window or document in the unit tests
10675 */
10676var isSafari;
10677var safariVersion;
10678var isChrome;
10679var isFirefox;
10680var isMacOs;
10681var isIOS;
10682var invisibleScrollbar;
10683var browserScrollbarWidth;
10684function isBrowserSafari() {
10685 if (isSafari === undefined) {
10686 isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
10687 }
10688 return isSafari;
10689}
10690function getSafariVersion() {
10691 if (safariVersion === undefined) {
10692 if (isBrowserSafari()) {
10693 var versionMatch = navigator.userAgent.match(/version\/(\d+)/i);
10694 if (versionMatch) {
10695 safariVersion = versionMatch[1] != null ? parseFloat(versionMatch[1]) : 0;
10696 }
10697 }
10698 else {
10699 safariVersion = 0;
10700 }
10701 }
10702 return safariVersion;
10703}
10704/**
10705 * Returns true for Chrome and also for Edge (Chromium)
10706 */
10707function isBrowserChrome() {
10708 if (isChrome === undefined) {
10709 var win = window;
10710 isChrome = (!!win.chrome && (!!win.chrome.webstore || !!win.chrome.runtime)) ||
10711 (/Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor));
10712 }
10713 return isChrome;
10714}
10715function isBrowserFirefox() {
10716 if (isFirefox === undefined) {
10717 isFirefox = /(firefox)/i.test(navigator.userAgent);
10718 }
10719 return isFirefox;
10720}
10721function isMacOsUserAgent() {
10722 if (isMacOs === undefined) {
10723 isMacOs = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);
10724 }
10725 return isMacOs;
10726}
10727function isIOSUserAgent() {
10728 if (isIOS === undefined) {
10729 isIOS = (/iPad|iPhone|iPod/.test(navigator.platform) ||
10730 // eslint-disable-next-line
10731 (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));
10732 }
10733 return isIOS;
10734}
10735function browserSupportsPreventScroll() {
10736 // all browsers except safari support focus({ preventScroll: true }).
10737 // this feature was added on Safari 15+
10738 return !isBrowserSafari() || getSafariVersion() >= 15;
10739}
10740function getTabIndex(el) {
10741 if (!el) {
10742 return null;
10743 }
10744 var numberTabIndex = el.tabIndex;
10745 var tabIndex = el.getAttribute('tabIndex');
10746 if (numberTabIndex === -1 && (tabIndex === null || (tabIndex === '' && !isBrowserFirefox()))) {
10747 return null;
10748 }
10749 return numberTabIndex.toString();
10750}
10751function getMaxDivHeight() {
10752 if (!document.body) {
10753 return -1;
10754 }
10755 var res = 1000000;
10756 // FF reports the height back but still renders blank after ~6M px
10757 var testUpTo = navigator.userAgent.toLowerCase().match(/firefox/) ? 6000000 : 1000000000;
10758 var div = document.createElement('div');
10759 document.body.appendChild(div);
10760 while (true) {
10761 var test = res * 2;
10762 div.style.height = test + 'px';
10763 if (test > testUpTo || div.clientHeight !== test) {
10764 break;
10765 }
10766 else {
10767 res = test;
10768 }
10769 }
10770 document.body.removeChild(div);
10771 return res;
10772}
10773function getBodyWidth() {
10774 var _a, _b, _c;
10775 return (_b = (_a = document.body) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : (window.innerHeight || ((_c = document.documentElement) === null || _c === void 0 ? void 0 : _c.clientWidth) || -1);
10776}
10777function getBodyHeight() {
10778 var _a, _b, _c;
10779 return (_b = (_a = document.body) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : (window.innerHeight || ((_c = document.documentElement) === null || _c === void 0 ? void 0 : _c.clientHeight) || -1);
10780}
10781function getScrollbarWidth() {
10782 if (browserScrollbarWidth == null) {
10783 initScrollbarWidthAndVisibility();
10784 }
10785 return browserScrollbarWidth;
10786}
10787function initScrollbarWidthAndVisibility() {
10788 var body = document.body;
10789 var div = document.createElement('div');
10790 div.style.width = div.style.height = '100px';
10791 div.style.opacity = '0';
10792 div.style.overflow = 'scroll';
10793 div.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps
10794 div.style.position = 'absolute';
10795 body.appendChild(div);
10796 var width = div.offsetWidth - div.clientWidth;
10797 // if width is 0 and client width is 0, means the DOM isn't ready
10798 if (width === 0 && div.clientWidth === 0) {
10799 width = null;
10800 }
10801 // remove div
10802 if (div.parentNode) {
10803 div.parentNode.removeChild(div);
10804 }
10805 if (width != null) {
10806 browserScrollbarWidth = width;
10807 invisibleScrollbar = width === 0;
10808 }
10809}
10810function isInvisibleScrollbar() {
10811 if (invisibleScrollbar == null) {
10812 initScrollbarWidthAndVisibility();
10813 }
10814 return invisibleScrollbar;
10815}
10816
10817
10818/***/ }),
10819/* 43 */
10820/***/ (function(module, __webpack_exports__, __webpack_require__) {
10821
10822"use strict";
10823__webpack_require__.r(__webpack_exports__);
10824/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serialiseDate", function() { return serialiseDate; });
10825/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dateToFormattedString", function() { return dateToFormattedString; });
10826/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDateTimeFromString", function() { return parseDateTimeFromString; });
10827/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44);
10828/**
10829 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
10830 * @version v29.2.0
10831 * @link https://www.ag-grid.com/
10832 * @license MIT
10833 */
10834var __read = (undefined && undefined.__read) || function (o, n) {
10835 var m = typeof Symbol === "function" && o[Symbol.iterator];
10836 if (!m) return o;
10837 var i = m.call(o), r, ar = [], e;
10838 try {
10839 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
10840 }
10841 catch (error) { e = { error: error }; }
10842 finally {
10843 try {
10844 if (r && !r.done && (m = i["return"])) m.call(i);
10845 }
10846 finally { if (e) throw e.error; }
10847 }
10848 return ar;
10849};
10850
10851/**
10852 * Serialises a Date to a string of format `yyyy-MM-dd HH:mm:ss`.
10853 * An alternative separator can be provided to be used instead of hyphens.
10854 * @param date The date to serialise
10855 * @param includeTime Whether to include the time in the serialised string
10856 * @param separator The separator to use between date parts
10857 */
10858function serialiseDate(date, includeTime, separator) {
10859 if (includeTime === void 0) { includeTime = true; }
10860 if (separator === void 0) { separator = '-'; }
10861 if (!date) {
10862 return null;
10863 }
10864 var serialised = [date.getFullYear(), date.getMonth() + 1, date.getDate()].map(function (part) { return Object(_number__WEBPACK_IMPORTED_MODULE_0__["padStartWidthZeros"])(part, 2); }).join(separator);
10865 if (includeTime) {
10866 serialised += ' ' + [date.getHours(), date.getMinutes(), date.getSeconds()].map(function (part) { return Object(_number__WEBPACK_IMPORTED_MODULE_0__["padStartWidthZeros"])(part, 2); }).join(':');
10867 }
10868 return serialised;
10869}
10870var calculateOrdinal = function (value) {
10871 if (value > 3 && value < 21) {
10872 return 'th';
10873 }
10874 var remainder = value % 10;
10875 switch (remainder) {
10876 case 1: return "st";
10877 case 2: return "nd";
10878 case 3: return "rd";
10879 }
10880 return 'th';
10881};
10882/**
10883 * Serialises a Date to a string of format the defined format, does not include time.
10884 * @param date The date to serialise
10885 * @param format The string to format the date to, defaults to YYYY-MM-DD
10886 */
10887function dateToFormattedString(date, format) {
10888 if (format === void 0) { format = 'YYYY-MM-DD'; }
10889 var fullYear = Object(_number__WEBPACK_IMPORTED_MODULE_0__["padStartWidthZeros"])(date.getFullYear(), 4);
10890 var months = [
10891 'January', 'February', 'March', 'April', 'May', 'June',
10892 'July', 'August', 'September', 'October', 'November', 'December',
10893 ];
10894 var days = [
10895 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday',
10896 ];
10897 var replace = {
10898 YYYY: function () { return fullYear.slice(fullYear.length - 4, fullYear.length); },
10899 YY: function () { return fullYear.slice(fullYear.length - 2, fullYear.length); },
10900 Y: function () { return "" + date.getFullYear(); },
10901 MMMM: function () { return months[date.getMonth()]; },
10902 MMM: function () { return months[date.getMonth()].slice(0, 3); },
10903 MM: function () { return Object(_number__WEBPACK_IMPORTED_MODULE_0__["padStartWidthZeros"])(date.getMonth() + 1, 2); },
10904 Mo: function () { return "" + (date.getMonth() + 1) + calculateOrdinal(date.getMonth() + 1); },
10905 M: function () { return "" + (date.getMonth() + 1); },
10906 Do: function () { return "" + date.getDate() + calculateOrdinal(date.getDate()); },
10907 DD: function () { return Object(_number__WEBPACK_IMPORTED_MODULE_0__["padStartWidthZeros"])(date.getDate(), 2); },
10908 D: function () { return "" + date.getDate(); },
10909 dddd: function () { return days[date.getDay()]; },
10910 ddd: function () { return days[date.getDay()].slice(0, 3); },
10911 dd: function () { return days[date.getDay()].slice(0, 2); },
10912 do: function () { return "" + date.getDay() + calculateOrdinal(date.getDay()); },
10913 d: function () { return "" + date.getDay(); },
10914 };
10915 var regexp = new RegExp(Object.keys(replace).join('|'), 'g');
10916 return format.replace(regexp, function (match) {
10917 if (match in replace) {
10918 return replace[match]();
10919 }
10920 return match;
10921 });
10922}
10923/**
10924 * Parses a date and time from a string in the format `yyyy-MM-dd HH:mm:ss`
10925 */
10926function parseDateTimeFromString(value) {
10927 if (!value) {
10928 return null;
10929 }
10930 var _a = __read(value.split(' '), 2), dateStr = _a[0], timeStr = _a[1];
10931 if (!dateStr) {
10932 return null;
10933 }
10934 var fields = dateStr.split('-').map(function (f) { return parseInt(f, 10); });
10935 if (fields.filter(function (f) { return !isNaN(f); }).length !== 3) {
10936 return null;
10937 }
10938 var _b = __read(fields, 3), year = _b[0], month = _b[1], day = _b[2];
10939 var date = new Date(year, month - 1, day);
10940 if (date.getFullYear() !== year ||
10941 date.getMonth() !== month - 1 ||
10942 date.getDate() !== day) {
10943 // date was not parsed as expected so must have been invalid
10944 return null;
10945 }
10946 if (!timeStr || timeStr === '00:00:00') {
10947 return date;
10948 }
10949 var _c = __read(timeStr.split(':').map(function (part) { return parseInt(part, 10); }), 3), hours = _c[0], minutes = _c[1], seconds = _c[2];
10950 if (hours >= 0 && hours < 24) {
10951 date.setHours(hours);
10952 }
10953 if (minutes >= 0 && minutes < 60) {
10954 date.setMinutes(minutes);
10955 }
10956 if (seconds >= 0 && seconds < 60) {
10957 date.setSeconds(seconds);
10958 }
10959 return date;
10960}
10961
10962
10963/***/ }),
10964/* 44 */
10965/***/ (function(module, __webpack_exports__, __webpack_require__) {
10966
10967"use strict";
10968__webpack_require__.r(__webpack_exports__);
10969/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "padStartWidthZeros", function() { return padStartWidthZeros; });
10970/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createArrayOfNumbers", function() { return createArrayOfNumbers; });
10971/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanNumber", function() { return cleanNumber; });
10972/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decToHex", function() { return decToHex; });
10973/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatNumberTwoDecimalPlacesAndCommas", function() { return formatNumberTwoDecimalPlacesAndCommas; });
10974/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatNumberCommas", function() { return formatNumberCommas; });
10975/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return sum; });
10976/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zeroOrGreater", function() { return zeroOrGreater; });
10977/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "oneOrGreater", function() { return oneOrGreater; });
10978/**
10979 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
10980 * @version v29.2.0
10981 * @link https://www.ag-grid.com/
10982 * @license MIT
10983 */
10984function padStartWidthZeros(value, totalStringSize) {
10985 return value.toString().padStart(totalStringSize, '0');
10986}
10987function createArrayOfNumbers(first, last) {
10988 var result = [];
10989 for (var i = first; i <= last; i++) {
10990 result.push(i);
10991 }
10992 return result;
10993}
10994function cleanNumber(value) {
10995 if (typeof value === 'string') {
10996 value = parseInt(value, 10);
10997 }
10998 if (typeof value === 'number') {
10999 return Math.floor(value);
11000 }
11001 return null;
11002}
11003function decToHex(number, bytes) {
11004 var hex = '';
11005 for (var i = 0; i < bytes; i++) {
11006 hex += String.fromCharCode(number & 0xff);
11007 number >>>= 8;
11008 }
11009 return hex;
11010}
11011function formatNumberTwoDecimalPlacesAndCommas(value, thousandSeparator, decimalSeparator) {
11012 if (typeof value !== 'number') {
11013 return '';
11014 }
11015 return formatNumberCommas(Math.round(value * 100) / 100, thousandSeparator, decimalSeparator);
11016}
11017/**
11018 * the native method number.toLocaleString(undefined, {minimumFractionDigits: 0})
11019 * puts in decimal places in IE, so we use this method instead
11020 * from: http://blog.tompawlak.org/number-currency-formatting-javascript
11021 * @param {number} value
11022 * @returns {string}
11023 */
11024function formatNumberCommas(value, thousandSeparator, decimalSeparator) {
11025 if (typeof value !== 'number') {
11026 return '';
11027 }
11028 return value.toString().replace('.', decimalSeparator).replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1" + thousandSeparator);
11029}
11030function sum(values) {
11031 return values == null ? null : values.reduce(function (total, value) { return total + value; }, 0);
11032}
11033function zeroOrGreater(value, defaultValue) {
11034 if (value >= 0) {
11035 return value;
11036 }
11037 // zero gets returned if number is missing or the wrong type
11038 return defaultValue;
11039}
11040function oneOrGreater(value, defaultValue) {
11041 var valueNumber = parseInt(value, 10);
11042 if (!isNaN(valueNumber) && isFinite(valueNumber) && valueNumber > 0) {
11043 return valueNumber;
11044 }
11045 return defaultValue;
11046}
11047
11048
11049/***/ }),
11050/* 45 */
11051/***/ (function(module, __webpack_exports__, __webpack_require__) {
11052
11053"use strict";
11054__webpack_require__.r(__webpack_exports__);
11055/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "radioCssClass", function() { return radioCssClass; });
11056/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOCUSABLE_SELECTOR", function() { return FOCUSABLE_SELECTOR; });
11057/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOCUSABLE_EXCLUDE", function() { return FOCUSABLE_EXCLUDE; });
11058/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFocusableFormField", function() { return isFocusableFormField; });
11059/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDisplayed", function() { return setDisplayed; });
11060/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setVisible", function() { return setVisible; });
11061/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDisabled", function() { return setDisabled; });
11062/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isElementChildOfClass", function() { return isElementChildOfClass; });
11063/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementSize", function() { return getElementSize; });
11064/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInnerHeight", function() { return getInnerHeight; });
11065/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInnerWidth", function() { return getInnerWidth; });
11066/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAbsoluteHeight", function() { return getAbsoluteHeight; });
11067/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAbsoluteWidth", function() { return getAbsoluteWidth; });
11068/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRtlNegativeScroll", function() { return isRtlNegativeScroll; });
11069/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getScrollLeft", function() { return getScrollLeft; });
11070/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setScrollLeft", function() { return setScrollLeft; });
11071/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearElement", function() { return clearElement; });
11072/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return removeElement; });
11073/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeFromParent", function() { return removeFromParent; });
11074/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVisible", function() { return isVisible; });
11075/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadTemplate", function() { return loadTemplate; });
11076/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendHtml", function() { return appendHtml; });
11077/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementAttribute", function() { return getElementAttribute; });
11078/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "offsetHeight", function() { return offsetHeight; });
11079/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "offsetWidth", function() { return offsetWidth; });
11080/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ensureDomOrder", function() { return ensureDomOrder; });
11081/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDomChildOrder", function() { return setDomChildOrder; });
11082/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertWithDomOrder", function() { return insertWithDomOrder; });
11083/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prependDC", function() { return prependDC; });
11084/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addStylesToElement", function() { return addStylesToElement; });
11085/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isHorizontalScrollShowing", function() { return isHorizontalScrollShowing; });
11086/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVerticalScrollShowing", function() { return isVerticalScrollShowing; });
11087/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setElementWidth", function() { return setElementWidth; });
11088/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFixedWidth", function() { return setFixedWidth; });
11089/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setElementHeight", function() { return setElementHeight; });
11090/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFixedHeight", function() { return setFixedHeight; });
11091/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatSize", function() { return formatSize; });
11092/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNodeOrElement", function() { return isNodeOrElement; });
11093/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copyNodeList", function() { return copyNodeList; });
11094/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterateNamedNodeMap", function() { return iterateNamedNodeMap; });
11095/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addOrRemoveAttribute", function() { return addOrRemoveAttribute; });
11096/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nodeListForEach", function() { return nodeListForEach; });
11097/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42);
11098/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
11099/* harmony import */ var _aria__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41);
11100/**
11101 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11102 * @version v29.2.0
11103 * @link https://www.ag-grid.com/
11104 * @license MIT
11105 */
11106var __values = (undefined && undefined.__values) || function(o) {
11107 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
11108 if (m) return m.call(o);
11109 if (o && typeof o.length === "number") return {
11110 next: function () {
11111 if (o && i >= o.length) o = void 0;
11112 return { value: o && o[i++], done: !o };
11113 }
11114 };
11115 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
11116};
11117var __read = (undefined && undefined.__read) || function (o, n) {
11118 var m = typeof Symbol === "function" && o[Symbol.iterator];
11119 if (!m) return o;
11120 var i = m.call(o), r, ar = [], e;
11121 try {
11122 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
11123 }
11124 catch (error) { e = { error: error }; }
11125 finally {
11126 try {
11127 if (r && !r.done && (m = i["return"])) m.call(i);
11128 }
11129 finally { if (e) throw e.error; }
11130 }
11131 return ar;
11132};
11133
11134
11135
11136var rtlNegativeScroll;
11137/**
11138 * This method adds a class to an element and remove that class from all siblings.
11139 * Useful for toggling state.
11140 * @param {HTMLElement} element The element to receive the class
11141 * @param {string} elementClass The class to be assigned to the element
11142 * @param {boolean} otherElementClass The class to be assigned to siblings of the element, but not the element itself
11143 */
11144function radioCssClass(element, elementClass, otherElementClass) {
11145 var parent = element.parentElement;
11146 var sibling = parent && parent.firstChild;
11147 while (sibling) {
11148 if (elementClass) {
11149 sibling.classList.toggle(elementClass, sibling === element);
11150 }
11151 if (otherElementClass) {
11152 sibling.classList.toggle(otherElementClass, sibling !== element);
11153 }
11154 sibling = sibling.nextSibling;
11155 }
11156}
11157var FOCUSABLE_SELECTOR = '[tabindex], input, select, button, textarea, [href]';
11158var FOCUSABLE_EXCLUDE = '.ag-hidden, .ag-hidden *, [disabled], .ag-disabled, .ag-disabled *';
11159function isFocusableFormField(element) {
11160 var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;
11161 var inputSelector = 'input, select, button, textarea';
11162 var isFocusable = matches.call(element, inputSelector);
11163 var isNotFocusable = matches.call(element, FOCUSABLE_EXCLUDE);
11164 var isElementVisible = isVisible(element);
11165 var focusable = isFocusable && !isNotFocusable && isElementVisible;
11166 return focusable;
11167}
11168function setDisplayed(element, displayed, options) {
11169 if (options === void 0) { options = {}; }
11170 var skipAriaHidden = options.skipAriaHidden;
11171 element.classList.toggle('ag-hidden', !displayed);
11172 if (!skipAriaHidden) {
11173 Object(_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaHidden"])(element, !displayed);
11174 }
11175}
11176function setVisible(element, visible, options) {
11177 if (options === void 0) { options = {}; }
11178 var skipAriaHidden = options.skipAriaHidden;
11179 element.classList.toggle('ag-invisible', !visible);
11180 if (!skipAriaHidden) {
11181 Object(_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaHidden"])(element, !visible);
11182 }
11183}
11184function setDisabled(element, disabled) {
11185 var attributeName = 'disabled';
11186 var addOrRemoveDisabledAttribute = disabled ?
11187 function (e) { return e.setAttribute(attributeName, ''); } :
11188 function (e) { return e.removeAttribute(attributeName); };
11189 addOrRemoveDisabledAttribute(element);
11190 nodeListForEach(element.querySelectorAll('input'), function (input) { return addOrRemoveDisabledAttribute(input); });
11191}
11192function isElementChildOfClass(element, cls, maxNest) {
11193 var counter = 0;
11194 while (element) {
11195 if (element.classList.contains(cls)) {
11196 return true;
11197 }
11198 element = element.parentElement;
11199 if (typeof maxNest == 'number') {
11200 if (++counter > maxNest) {
11201 break;
11202 }
11203 }
11204 else if (element === maxNest) {
11205 break;
11206 }
11207 }
11208 return false;
11209}
11210// returns back sizes as doubles instead of strings. similar to
11211// getBoundingClientRect, however getBoundingClientRect does not:
11212// a) work with fractions (eg browser is zooming)
11213// b) has CSS transitions applied (eg CSS scale, browser zoom), which we don't want, we want the un-transitioned values
11214function getElementSize(el) {
11215 var _a = window.getComputedStyle(el), height = _a.height, width = _a.width, borderTopWidth = _a.borderTopWidth, borderRightWidth = _a.borderRightWidth, borderBottomWidth = _a.borderBottomWidth, borderLeftWidth = _a.borderLeftWidth, 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;
11216 return {
11217 height: parseFloat(height),
11218 width: parseFloat(width),
11219 borderTopWidth: parseFloat(borderTopWidth),
11220 borderRightWidth: parseFloat(borderRightWidth),
11221 borderBottomWidth: parseFloat(borderBottomWidth),
11222 borderLeftWidth: parseFloat(borderLeftWidth),
11223 paddingTop: parseFloat(paddingTop),
11224 paddingRight: parseFloat(paddingRight),
11225 paddingBottom: parseFloat(paddingBottom),
11226 paddingLeft: parseFloat(paddingLeft),
11227 marginTop: parseFloat(marginTop),
11228 marginRight: parseFloat(marginRight),
11229 marginBottom: parseFloat(marginBottom),
11230 marginLeft: parseFloat(marginLeft),
11231 boxSizing: boxSizing
11232 };
11233}
11234function getInnerHeight(el) {
11235 var size = getElementSize(el);
11236 if (size.boxSizing === 'border-box') {
11237 return size.height - size.paddingTop - size.paddingBottom;
11238 }
11239 return size.height;
11240}
11241function getInnerWidth(el) {
11242 var size = getElementSize(el);
11243 if (size.boxSizing === 'border-box') {
11244 return size.width - size.paddingLeft - size.paddingRight;
11245 }
11246 return size.width;
11247}
11248function getAbsoluteHeight(el) {
11249 var size = getElementSize(el);
11250 var marginRight = size.marginBottom + size.marginTop;
11251 return Math.ceil(el.offsetHeight + marginRight);
11252}
11253function getAbsoluteWidth(el) {
11254 var size = getElementSize(el);
11255 var marginWidth = size.marginLeft + size.marginRight;
11256 return Math.ceil(el.offsetWidth + marginWidth);
11257}
11258function isRtlNegativeScroll() {
11259 if (typeof rtlNegativeScroll === "boolean") {
11260 return rtlNegativeScroll;
11261 }
11262 var template = document.createElement('div');
11263 template.style.direction = 'rtl';
11264 template.style.width = '1px';
11265 template.style.height = '1px';
11266 template.style.position = 'fixed';
11267 template.style.top = '0px';
11268 template.style.overflow = 'hidden';
11269 template.dir = 'rtl';
11270 template.innerHTML = /* html */
11271 "<div style=\"width: 2px\">\n <span style=\"display: inline-block; width: 1px\"></span>\n <span style=\"display: inline-block; width: 1px\"></span>\n </div>";
11272 document.body.appendChild(template);
11273 template.scrollLeft = 1;
11274 rtlNegativeScroll = Math.floor(template.scrollLeft) === 0;
11275 document.body.removeChild(template);
11276 return rtlNegativeScroll;
11277}
11278function getScrollLeft(element, rtl) {
11279 var scrollLeft = element.scrollLeft;
11280 if (rtl) {
11281 // Absolute value - for FF that reports RTL scrolls in negative numbers
11282 scrollLeft = Math.abs(scrollLeft);
11283 if (Object(_browser__WEBPACK_IMPORTED_MODULE_0__["isBrowserChrome"])() && !isRtlNegativeScroll()) {
11284 scrollLeft = element.scrollWidth - element.clientWidth - scrollLeft;
11285 }
11286 }
11287 return scrollLeft;
11288}
11289function setScrollLeft(element, value, rtl) {
11290 if (rtl) {
11291 // Chrome and Safari when doing RTL have the END position of the scroll as zero, not the start
11292 if (isRtlNegativeScroll()) {
11293 value *= -1;
11294 }
11295 else if (Object(_browser__WEBPACK_IMPORTED_MODULE_0__["isBrowserSafari"])() || Object(_browser__WEBPACK_IMPORTED_MODULE_0__["isBrowserChrome"])()) {
11296 value = element.scrollWidth - element.clientWidth - value;
11297 }
11298 }
11299 element.scrollLeft = value;
11300}
11301function clearElement(el) {
11302 while (el && el.firstChild) {
11303 el.removeChild(el.firstChild);
11304 }
11305}
11306/** @deprecated */
11307function removeElement(parent, cssSelector) {
11308 removeFromParent(parent.querySelector(cssSelector));
11309}
11310function removeFromParent(node) {
11311 if (node && node.parentNode) {
11312 node.parentNode.removeChild(node);
11313 }
11314}
11315function isVisible(element) {
11316 return element.offsetParent !== null;
11317}
11318/**
11319 * Loads the template and returns it as an element. makes up for no simple way in
11320 * the dom api to load html directly, eg we cannot do this: document.createElement(template)
11321 * @param {string} template
11322 * @returns {HTMLElement}
11323 */
11324function loadTemplate(template) {
11325 var tempDiv = document.createElement('div');
11326 tempDiv.innerHTML = (template || '').trim();
11327 return tempDiv.firstChild;
11328}
11329function appendHtml(eContainer, htmlTemplate) {
11330 if (eContainer.lastChild) {
11331 // https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML
11332 // we put the items at the start, so new items appear underneath old items,
11333 // so when expanding/collapsing groups, the new rows don't go on top of the
11334 // rows below that are moving our of the way
11335 eContainer.insertAdjacentHTML('afterbegin', htmlTemplate);
11336 }
11337 else {
11338 eContainer.innerHTML = htmlTemplate;
11339 }
11340}
11341/** @deprecated */
11342function getElementAttribute(element, attributeName) {
11343 if (element.attributes && element.attributes[attributeName]) {
11344 var attribute = element.attributes[attributeName];
11345 return attribute.value;
11346 }
11347 return null;
11348}
11349function offsetHeight(element) {
11350 return element && element.clientHeight ? element.clientHeight : 0;
11351}
11352function offsetWidth(element) {
11353 return element && element.clientWidth ? element.clientWidth : 0;
11354}
11355function ensureDomOrder(eContainer, eChild, eChildBefore) {
11356 // if already in right order, do nothing
11357 if (eChildBefore && eChildBefore.nextSibling === eChild) {
11358 return;
11359 }
11360 var focusedEl = document.activeElement;
11361 var eChildHasFocus = eChild.contains(focusedEl);
11362 if (eChildBefore) {
11363 if (eChildBefore.nextSibling) {
11364 // insert between the eRowBefore and the row after it
11365 eContainer.insertBefore(eChild, eChildBefore.nextSibling);
11366 }
11367 else {
11368 // if nextSibling is missing, means other row is at end, so just append new row at the end
11369 eContainer.appendChild(eChild);
11370 }
11371 }
11372 else {
11373 // otherwise put at start
11374 if (eContainer.firstChild && eContainer.firstChild !== eChild) {
11375 // insert it at the first location
11376 eContainer.insertAdjacentElement('afterbegin', eChild);
11377 }
11378 }
11379 if (eChildHasFocus && focusedEl && Object(_browser__WEBPACK_IMPORTED_MODULE_0__["browserSupportsPreventScroll"])()) {
11380 focusedEl.focus({ preventScroll: true });
11381 }
11382}
11383function setDomChildOrder(eContainer, orderedChildren) {
11384 for (var i = 0; i < orderedChildren.length; i++) {
11385 var correctCellAtIndex = orderedChildren[i];
11386 var actualCellAtIndex = eContainer.children[i];
11387 if (actualCellAtIndex !== correctCellAtIndex) {
11388 eContainer.insertBefore(correctCellAtIndex, actualCellAtIndex);
11389 }
11390 }
11391}
11392function insertWithDomOrder(eContainer, eToInsert, eChildBefore) {
11393 if (eChildBefore) {
11394 // if previous element exists, just slot in after the previous element
11395 eChildBefore.insertAdjacentElement('afterend', eToInsert);
11396 }
11397 else {
11398 if (eContainer.firstChild) {
11399 // insert it at the first location
11400 eContainer.insertAdjacentElement('afterbegin', eToInsert);
11401 }
11402 else {
11403 // otherwise eContainer is empty, so just append it
11404 eContainer.appendChild(eToInsert);
11405 }
11406 }
11407}
11408/** @deprecated */
11409function prependDC(parent, documentFragment) {
11410 if (Object(_generic__WEBPACK_IMPORTED_MODULE_1__["exists"])(parent.firstChild)) {
11411 parent.insertBefore(documentFragment, parent.firstChild);
11412 }
11413 else {
11414 parent.appendChild(documentFragment);
11415 }
11416}
11417function addStylesToElement(eElement, styles) {
11418 var e_1, _a;
11419 if (!styles) {
11420 return;
11421 }
11422 try {
11423 for (var _b = __values(Object.entries(styles)), _c = _b.next(); !_c.done; _c = _b.next()) {
11424 var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
11425 if (!key || !key.length || value == null) {
11426 continue;
11427 }
11428 // changes the key from camelCase into a hyphenated-string
11429 var parsedKey = key.replace(/[A-Z]/g, function (s) { return "-" + s.toLocaleLowerCase(); });
11430 var valueAsString = value.toString();
11431 var parsedValue = valueAsString.replace(/\s*!important/g, '');
11432 var priority = parsedValue.length != valueAsString.length ? 'important' : undefined;
11433 eElement.style.setProperty(parsedKey, value, priority);
11434 }
11435 }
11436 catch (e_1_1) { e_1 = { error: e_1_1 }; }
11437 finally {
11438 try {
11439 if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
11440 }
11441 finally { if (e_1) throw e_1.error; }
11442 }
11443}
11444function isHorizontalScrollShowing(element) {
11445 return element.clientWidth < element.scrollWidth;
11446}
11447function isVerticalScrollShowing(element) {
11448 return element.clientHeight < element.scrollHeight;
11449}
11450function setElementWidth(element, width) {
11451 if (width === 'flex') {
11452 element.style.removeProperty('width');
11453 element.style.removeProperty('minWidth');
11454 element.style.removeProperty('maxWidth');
11455 element.style.flex = '1 1 auto';
11456 }
11457 else {
11458 setFixedWidth(element, width);
11459 }
11460}
11461function setFixedWidth(element, width) {
11462 width = formatSize(width);
11463 element.style.width = width.toString();
11464 element.style.maxWidth = width.toString();
11465 element.style.minWidth = width.toString();
11466}
11467function setElementHeight(element, height) {
11468 if (height === 'flex') {
11469 element.style.removeProperty('height');
11470 element.style.removeProperty('minHeight');
11471 element.style.removeProperty('maxHeight');
11472 element.style.flex = '1 1 auto';
11473 }
11474 else {
11475 setFixedHeight(element, height);
11476 }
11477}
11478function setFixedHeight(element, height) {
11479 height = formatSize(height);
11480 element.style.height = height.toString();
11481 element.style.maxHeight = height.toString();
11482 element.style.minHeight = height.toString();
11483}
11484function formatSize(size) {
11485 if (typeof size === 'number') {
11486 return size + "px";
11487 }
11488 return size;
11489}
11490function isNodeOrElement(o) {
11491 return o instanceof Node || o instanceof HTMLElement;
11492}
11493/**
11494 * Makes a copy of a node list into a list
11495 * @param {NodeList} nodeList
11496 * @returns {Node[]}
11497 */
11498function copyNodeList(nodeList) {
11499 if (nodeList == null) {
11500 return [];
11501 }
11502 var result = [];
11503 nodeListForEach(nodeList, function (node) { return result.push(node); });
11504 return result;
11505}
11506function iterateNamedNodeMap(map, callback) {
11507 if (!map) {
11508 return;
11509 }
11510 for (var i = 0; i < map.length; i++) {
11511 var attr = map[i];
11512 callback(attr.name, attr.value);
11513 }
11514}
11515function addOrRemoveAttribute(element, name, value) {
11516 if (value == null) {
11517 element.removeAttribute(name);
11518 }
11519 else {
11520 element.setAttribute(name, value.toString());
11521 }
11522}
11523function nodeListForEach(nodeList, action) {
11524 if (nodeList == null) {
11525 return;
11526 }
11527 for (var i = 0; i < nodeList.length; i++) {
11528 action(nodeList[i]);
11529 }
11530}
11531
11532
11533/***/ }),
11534/* 46 */
11535/***/ (function(module, __webpack_exports__, __webpack_require__) {
11536
11537"use strict";
11538__webpack_require__.r(__webpack_exports__);
11539/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iconNameClassMap", function() { return iconNameClassMap; });
11540/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createIcon", function() { return createIcon; });
11541/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createIconNoSpan", function() { return createIconNoSpan; });
11542/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
11543/* harmony import */ var _aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
11544/**
11545 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11546 * @version v29.2.0
11547 * @link https://www.ag-grid.com/
11548 * @license MIT
11549 */
11550
11551
11552//
11553// IMPORTANT NOTE!
11554//
11555// If you change the list below, copy/paste the new content into the docs page javascript-grid-icons
11556//
11557var iconNameClassMap = {
11558 // header column group shown when expanded (click to contract)
11559 columnGroupOpened: 'expanded',
11560 // header column group shown when contracted (click to expand)
11561 columnGroupClosed: 'contracted',
11562 // tool panel column group contracted (click to expand)
11563 columnSelectClosed: 'tree-closed',
11564 // tool panel column group expanded (click to contract)
11565 columnSelectOpen: 'tree-open',
11566 // column tool panel header expand/collapse all button, shown when some children are expanded and
11567 // others are collapsed
11568 columnSelectIndeterminate: 'tree-indeterminate',
11569 // shown on ghost icon while dragging column to the side of the grid to pin
11570 columnMovePin: 'pin',
11571 // shown on ghost icon while dragging over part of the page that is not a drop zone
11572 columnMoveHide: 'eye-slash',
11573 // shown on ghost icon while dragging columns to reorder
11574 columnMoveMove: 'arrows',
11575 // animating icon shown when dragging a column to the right of the grid causes horizontal scrolling
11576 columnMoveLeft: 'left',
11577 // animating icon shown when dragging a column to the left of the grid causes horizontal scrolling
11578 columnMoveRight: 'right',
11579 // shown on ghost icon while dragging over Row Groups drop zone
11580 columnMoveGroup: 'group',
11581 // shown on ghost icon while dragging over Values drop zone
11582 columnMoveValue: 'aggregation',
11583 // shown on ghost icon while dragging over pivot drop zone
11584 columnMovePivot: 'pivot',
11585 // shown on ghost icon while dragging over drop zone that doesn't support it, e.g.
11586 // string column over aggregation drop zone
11587 dropNotAllowed: 'not-allowed',
11588 // shown on row group when contracted (click to expand)
11589 groupContracted: 'tree-closed',
11590 // shown on row group when expanded (click to contract)
11591 groupExpanded: 'tree-open',
11592 // set filter tree list group contracted (click to expand)
11593 setFilterGroupClosed: 'tree-closed',
11594 // set filter tree list group expanded (click to contract)
11595 setFilterGroupOpen: 'tree-open',
11596 // set filter tree list expand/collapse all button, shown when some children are expanded and
11597 // others are collapsed
11598 setFilterGroupIndeterminate: 'tree-indeterminate',
11599 // context menu chart item
11600 chart: 'chart',
11601 // chart window title bar
11602 close: 'cross',
11603 // X (remove) on column 'pill' after adding it to a drop zone list
11604 cancel: 'cancel',
11605 // indicates the currently active pin state in the "Pin column" sub-menu of the column menu
11606 check: 'tick',
11607 // "go to first" button in pagination controls
11608 first: 'first',
11609 // "go to previous" button in pagination controls
11610 previous: 'previous',
11611 // "go to next" button in pagination controls
11612 next: 'next',
11613 // "go to last" button in pagination controls
11614 last: 'last',
11615 // shown on top right of chart when chart is linked to range data (click to unlink)
11616 linked: 'linked',
11617 // shown on top right of chart when chart is not linked to range data (click to link)
11618 unlinked: 'unlinked',
11619 // "Choose colour" button on chart settings tab
11620 colorPicker: 'color-picker',
11621 // rotating spinner shown by the loading cell renderer
11622 groupLoading: 'loading',
11623 // button to launch enterprise column menu
11624 menu: 'menu',
11625 // filter tool panel tab
11626 filter: 'filter',
11627 // column tool panel tab
11628 columns: 'columns',
11629 // button in chart regular size window title bar (click to maximise)
11630 maximize: 'maximize',
11631 // button in chart maximised window title bar (click to make regular size)
11632 minimize: 'minimize',
11633 // "Pin column" item in column header menu
11634 menuPin: 'pin',
11635 // "Value aggregation" column menu item (shown on numeric columns when grouping is active)"
11636 menuValue: 'aggregation',
11637 // "Group by {column-name}" item in column header menu
11638 menuAddRowGroup: 'group',
11639 // "Un-Group by {column-name}" item in column header menu
11640 menuRemoveRowGroup: 'group',
11641 // context menu copy item
11642 clipboardCopy: 'copy',
11643 // context menu cut item
11644 clipboardCut: 'cut',
11645 // context menu paste item
11646 clipboardPaste: 'paste',
11647 // identifies the pivot drop zone
11648 pivotPanel: 'pivot',
11649 // "Row groups" drop zone in column tool panel
11650 rowGroupPanel: 'group',
11651 // columns tool panel Values drop zone
11652 valuePanel: 'aggregation',
11653 // drag handle used to pick up draggable columns
11654 columnDrag: 'grip',
11655 // drag handle used to pick up draggable rows
11656 rowDrag: 'grip',
11657 // context menu export item
11658 save: 'save',
11659 // csv export
11660 csvExport: 'csv',
11661 // excel export,
11662 excelExport: 'excel',
11663 // icon on dropdown editors
11664 smallDown: 'small-down',
11665 // version of small-right used in RTL mode
11666 smallLeft: 'small-left',
11667 // separater between column 'pills' when you add multiple columns to the header drop zone
11668 smallRight: 'small-right',
11669 smallUp: 'small-up',
11670 // show on column header when column is sorted ascending
11671 sortAscending: 'asc',
11672 // show on column header when column is sorted descending
11673 sortDescending: 'desc',
11674 // show on column header when column has no sort, only when enabled with gridOptions.unSortIcon=true
11675 sortUnSort: 'none'
11676};
11677/**
11678 * If icon provided, use this (either a string, or a function callback).
11679 * if not, then use the default icon from the theme
11680 * @param {string} iconName
11681 * @param {GridOptionsService} gridOptionsService
11682 * @param {Column | null} [column]
11683 * @returns {HTMLElement}
11684 */
11685function createIcon(iconName, gridOptionsService, column) {
11686 var iconContents = createIconNoSpan(iconName, gridOptionsService, column);
11687 if (iconContents && iconContents.className.indexOf('ag-icon') > -1) {
11688 return iconContents;
11689 }
11690 var eResult = document.createElement('span');
11691 eResult.appendChild(iconContents);
11692 return eResult;
11693}
11694function createIconNoSpan(iconName, gridOptionsService, column, forceCreate) {
11695 var userProvidedIcon = null;
11696 // check col for icon first
11697 var icons = column && column.getColDef().icons;
11698 if (icons) {
11699 userProvidedIcon = icons[iconName];
11700 }
11701 // if not in col, try grid options
11702 if (gridOptionsService && !userProvidedIcon) {
11703 var optionsIcons = gridOptionsService.get('icons');
11704 if (optionsIcons) {
11705 userProvidedIcon = optionsIcons[iconName];
11706 }
11707 }
11708 // now if user provided, use it
11709 if (userProvidedIcon) {
11710 var rendererResult = void 0;
11711 if (typeof userProvidedIcon === 'function') {
11712 rendererResult = userProvidedIcon();
11713 }
11714 else if (typeof userProvidedIcon === 'string') {
11715 rendererResult = userProvidedIcon;
11716 }
11717 else {
11718 throw new Error('icon from grid options needs to be a string or a function');
11719 }
11720 if (typeof rendererResult === 'string') {
11721 return Object(_dom__WEBPACK_IMPORTED_MODULE_0__["loadTemplate"])(rendererResult);
11722 }
11723 if (Object(_dom__WEBPACK_IMPORTED_MODULE_0__["isNodeOrElement"])(rendererResult)) {
11724 return rendererResult;
11725 }
11726 console.warn('AG Grid: iconRenderer should return back a string or a dom object');
11727 }
11728 else {
11729 var span = document.createElement('span');
11730 var cssClass = iconNameClassMap[iconName];
11731 if (!cssClass) {
11732 if (!forceCreate) {
11733 console.warn("AG Grid: Did not find icon " + iconName);
11734 cssClass = '';
11735 }
11736 else {
11737 cssClass = iconName;
11738 }
11739 }
11740 span.setAttribute('class', "ag-icon ag-icon-" + cssClass);
11741 span.setAttribute('unselectable', 'on');
11742 Object(_aria__WEBPACK_IMPORTED_MODULE_1__["setAriaRole"])(span, 'presentation');
11743 return span;
11744 }
11745}
11746
11747
11748/***/ }),
11749/* 47 */
11750/***/ (function(module, __webpack_exports__, __webpack_require__) {
11751
11752"use strict";
11753__webpack_require__.r(__webpack_exports__);
11754/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEventFromPrintableCharacter", function() { return isEventFromPrintableCharacter; });
11755/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUserSuppressingKeyboardEvent", function() { return isUserSuppressingKeyboardEvent; });
11756/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUserSuppressingHeaderKeyboardEvent", function() { return isUserSuppressingHeaderKeyboardEvent; });
11757/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normaliseQwertyAzerty", function() { return normaliseQwertyAzerty; });
11758/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDeleteKey", function() { return isDeleteKey; });
11759/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(48);
11760/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42);
11761/* harmony import */ var _generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
11762/**
11763 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11764 * @version v29.2.0
11765 * @link https://www.ag-grid.com/
11766 * @license MIT
11767 */
11768
11769
11770
11771var A_KEYCODE = 65;
11772var C_KEYCODE = 67;
11773var V_KEYCODE = 86;
11774var D_KEYCODE = 68;
11775var Z_KEYCODE = 90;
11776var Y_KEYCODE = 89;
11777function isEventFromPrintableCharacter(event) {
11778 // no allowed printable chars have alt or ctrl key combinations
11779 if (event.altKey || event.ctrlKey || event.metaKey) {
11780 return false;
11781 }
11782 // if key is length 1, eg if it is 'a' for the a key, or '2' for the '2' key.
11783 // non-printable characters have names, eg 'Enter' or 'Backspace'.
11784 var printableCharacter = event.key.length === 1;
11785 return printableCharacter;
11786}
11787/**
11788 * Allows user to tell the grid to skip specific keyboard events
11789 * @param {GridOptionsService} gridOptionsService
11790 * @param {KeyboardEvent} keyboardEvent
11791 * @param {IRowNode} rowNode
11792 * @param {Column} column
11793 * @param {boolean} editing
11794 * @returns {boolean}
11795 */
11796function isUserSuppressingKeyboardEvent(gridOptionsService, keyboardEvent, rowNode, column, editing) {
11797 var colDefFunc = column ? column.getColDef().suppressKeyboardEvent : undefined;
11798 // if no callbacks provided by user, then do nothing
11799 if (!colDefFunc) {
11800 return false;
11801 }
11802 var params = {
11803 event: keyboardEvent,
11804 editing: editing,
11805 column: column,
11806 api: gridOptionsService.api,
11807 node: rowNode,
11808 data: rowNode.data,
11809 colDef: column.getColDef(),
11810 context: gridOptionsService.context,
11811 columnApi: gridOptionsService.columnApi
11812 };
11813 // colDef get first preference on suppressing events
11814 if (colDefFunc) {
11815 var colDefFuncResult = colDefFunc(params);
11816 // if colDef func suppressed, then return now, no need to call gridOption func
11817 if (colDefFuncResult) {
11818 return true;
11819 }
11820 }
11821 // otherwise return false, don't suppress, as colDef didn't suppress and no func on gridOptions
11822 return false;
11823}
11824function isUserSuppressingHeaderKeyboardEvent(gridOptionsService, keyboardEvent, headerRowIndex, column) {
11825 var colDef = column.getDefinition();
11826 var colDefFunc = colDef && colDef.suppressHeaderKeyboardEvent;
11827 if (!Object(_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(colDefFunc)) {
11828 return false;
11829 }
11830 var params = {
11831 api: gridOptionsService.api,
11832 columnApi: gridOptionsService.columnApi,
11833 context: gridOptionsService.context,
11834 colDef: colDef,
11835 column: column,
11836 headerRowIndex: headerRowIndex,
11837 event: keyboardEvent
11838 };
11839 return !!colDefFunc(params);
11840}
11841function normaliseQwertyAzerty(keyboardEvent) {
11842 var keyCode = keyboardEvent.keyCode;
11843 var code;
11844 switch (keyCode) {
11845 case A_KEYCODE:
11846 code = _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].A;
11847 break;
11848 case C_KEYCODE:
11849 code = _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].C;
11850 break;
11851 case V_KEYCODE:
11852 code = _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].V;
11853 break;
11854 case D_KEYCODE:
11855 code = _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].D;
11856 break;
11857 case Z_KEYCODE:
11858 code = _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].Z;
11859 break;
11860 case Y_KEYCODE:
11861 code = _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].Y;
11862 break;
11863 default:
11864 code = keyboardEvent.code;
11865 }
11866 return code;
11867}
11868function isDeleteKey(key, alwaysReturnFalseOnBackspace) {
11869 if (alwaysReturnFalseOnBackspace === void 0) { alwaysReturnFalseOnBackspace = false; }
11870 if (key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].DELETE) {
11871 return true;
11872 }
11873 if (!alwaysReturnFalseOnBackspace && key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].BACKSPACE) {
11874 return Object(_browser__WEBPACK_IMPORTED_MODULE_1__["isMacOsUserAgent"])();
11875 }
11876 return false;
11877}
11878
11879
11880/***/ }),
11881/* 48 */
11882/***/ (function(module, __webpack_exports__, __webpack_require__) {
11883
11884"use strict";
11885__webpack_require__.r(__webpack_exports__);
11886/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyCode", function() { return KeyCode; });
11887/**
11888 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11889 * @version v29.2.0
11890 * @link https://www.ag-grid.com/
11891 * @license MIT
11892 */
11893var KeyCode = /** @class */ (function () {
11894 function KeyCode() {
11895 }
11896 KeyCode.BACKSPACE = 'Backspace';
11897 KeyCode.TAB = 'Tab';
11898 KeyCode.ENTER = 'Enter';
11899 KeyCode.ESCAPE = 'Escape';
11900 KeyCode.SPACE = ' ';
11901 KeyCode.LEFT = 'ArrowLeft';
11902 KeyCode.UP = 'ArrowUp';
11903 KeyCode.RIGHT = 'ArrowRight';
11904 KeyCode.DOWN = 'ArrowDown';
11905 KeyCode.DELETE = 'Delete';
11906 KeyCode.F2 = 'F2';
11907 KeyCode.PAGE_UP = 'PageUp';
11908 KeyCode.PAGE_DOWN = 'PageDown';
11909 KeyCode.PAGE_HOME = 'Home';
11910 KeyCode.PAGE_END = 'End';
11911 // these should be used with `event.code` instead of `event.key`
11912 // as `event.key` changes when non-latin keyboards are used
11913 KeyCode.A = 'KeyA';
11914 KeyCode.C = 'KeyC';
11915 KeyCode.D = 'KeyD';
11916 KeyCode.V = 'KeyV';
11917 KeyCode.X = 'KeyX';
11918 KeyCode.Y = 'KeyY';
11919 KeyCode.Z = 'KeyZ';
11920 return KeyCode;
11921}());
11922
11923
11924
11925/***/ }),
11926/* 49 */
11927/***/ (function(module, __webpack_exports__, __webpack_require__) {
11928
11929"use strict";
11930__webpack_require__.r(__webpack_exports__);
11931/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areEventsNear", function() { return areEventsNear; });
11932/**
11933 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11934 * @version v29.2.0
11935 * @link https://www.ag-grid.com/
11936 * @license MIT
11937 */
11938/**
11939 * `True` if the event is close to the original event by X pixels either vertically or horizontally.
11940 * we only start dragging after X pixels so this allows us to know if we should start dragging yet.
11941 * @param {MouseEvent | TouchEvent} e1
11942 * @param {MouseEvent | TouchEvent} e2
11943 * @param {number} pixelCount
11944 * @returns {boolean}
11945 */
11946function areEventsNear(e1, e2, pixelCount) {
11947 // by default, we wait 4 pixels before starting the drag
11948 if (pixelCount === 0) {
11949 return false;
11950 }
11951 var diffX = Math.abs(e1.clientX - e2.clientX);
11952 var diffY = Math.abs(e1.clientY - e2.clientY);
11953 return Math.max(diffX, diffY) <= pixelCount;
11954}
11955
11956
11957/***/ }),
11958/* 50 */
11959/***/ (function(module, __webpack_exports__, __webpack_require__) {
11960
11961"use strict";
11962__webpack_require__.r(__webpack_exports__);
11963/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortRowNodesByOrder", function() { return sortRowNodesByOrder; });
11964/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "traverseNodesWithKey", function() { return traverseNodesWithKey; });
11965/**
11966 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
11967 * @version v29.2.0
11968 * @link https://www.ag-grid.com/
11969 * @license MIT
11970 */
11971/**
11972 * Gets called by: a) ClientSideNodeManager and b) GroupStage to do sorting.
11973 * when in ClientSideNodeManager we always have indexes (as this sorts the items the
11974 * user provided) but when in GroupStage, the nodes can contain filler nodes that
11975 * don't have order id's
11976 * @param {RowNode[]} rowNodes
11977 * @param {Object} rowNodeOrder
11978 *
11979 * @returns a boolean representing whether nodes were reordered
11980 */
11981function sortRowNodesByOrder(rowNodes, rowNodeOrder) {
11982 if (!rowNodes) {
11983 return false;
11984 }
11985 var comparator = function (nodeA, nodeB) {
11986 var positionA = rowNodeOrder[nodeA.id];
11987 var positionB = rowNodeOrder[nodeB.id];
11988 var aHasIndex = positionA !== undefined;
11989 var bHasIndex = positionB !== undefined;
11990 var bothNodesAreUserNodes = aHasIndex && bHasIndex;
11991 var bothNodesAreFillerNodes = !aHasIndex && !bHasIndex;
11992 if (bothNodesAreUserNodes) {
11993 // when comparing two nodes the user has provided, they always
11994 // have indexes
11995 return positionA - positionB;
11996 }
11997 if (bothNodesAreFillerNodes) {
11998 // when comparing two filler nodes, we have no index to compare them
11999 // against, however we want this sorting to be deterministic, so that
12000 // the rows don't jump around as the user does delta updates. so we
12001 // want the same sort result. so we use the __objectId - which doesn't make sense
12002 // from a sorting point of view, but does give consistent behaviour between
12003 // calls. otherwise groups jump around as delta updates are done.
12004 // note: previously here we used nodeId, however this gave a strange order
12005 // as string ordering of numbers is wrong, so using id based on creation order
12006 // as least gives better looking order.
12007 return nodeA.__objectId - nodeB.__objectId;
12008 }
12009 if (aHasIndex) {
12010 return 1;
12011 }
12012 return -1;
12013 };
12014 // check if the list first needs sorting
12015 var rowNodeA;
12016 var rowNodeB;
12017 var atLeastOneOutOfOrder = false;
12018 for (var i = 0; i < rowNodes.length - 1; i++) {
12019 rowNodeA = rowNodes[i];
12020 rowNodeB = rowNodes[i + 1];
12021 if (comparator(rowNodeA, rowNodeB) > 0) {
12022 atLeastOneOutOfOrder = true;
12023 break;
12024 }
12025 }
12026 if (atLeastOneOutOfOrder) {
12027 rowNodes.sort(comparator);
12028 return true;
12029 }
12030 return false;
12031}
12032function traverseNodesWithKey(nodes, callback) {
12033 var keyParts = [];
12034 recursiveSearchNodes(nodes);
12035 function recursiveSearchNodes(currentNodes) {
12036 if (!currentNodes) {
12037 return;
12038 }
12039 currentNodes.forEach(function (node) {
12040 // also checking for children for tree data
12041 if (node.group || node.hasChildren()) {
12042 keyParts.push(node.key);
12043 var key = keyParts.join('|');
12044 callback(node, key);
12045 recursiveSearchNodes(node.childrenAfterGroup);
12046 keyParts.pop();
12047 }
12048 });
12049 }
12050}
12051
12052
12053/***/ }),
12054/* 51 */
12055/***/ (function(module, __webpack_exports__, __webpack_require__) {
12056
12057"use strict";
12058__webpack_require__.r(__webpack_exports__);
12059/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToSet", function() { return convertToSet; });
12060/**
12061 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12062 * @version v29.2.0
12063 * @link https://www.ag-grid.com/
12064 * @license MIT
12065 */
12066function convertToSet(list) {
12067 var set = new Set();
12068 list.forEach(function (x) { return set.add(x); });
12069 return set;
12070}
12071
12072
12073/***/ }),
12074/* 52 */
12075/***/ (function(module, __webpack_exports__, __webpack_require__) {
12076
12077"use strict";
12078__webpack_require__.r(__webpack_exports__);
12079/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberSequence", function() { return NumberSequence; });
12080/**
12081 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12082 * @version v29.2.0
12083 * @link https://www.ag-grid.com/
12084 * @license MIT
12085 */
12086var NumberSequence = /** @class */ (function () {
12087 function NumberSequence(initValue, step) {
12088 if (initValue === void 0) { initValue = 0; }
12089 if (step === void 0) { step = 1; }
12090 this.nextValue = initValue;
12091 this.step = step;
12092 }
12093 NumberSequence.prototype.next = function () {
12094 var valToReturn = this.nextValue;
12095 this.nextValue += this.step;
12096 return valToReturn;
12097 };
12098 NumberSequence.prototype.peek = function () {
12099 return this.nextValue;
12100 };
12101 NumberSequence.prototype.skip = function (count) {
12102 this.nextValue += count;
12103 };
12104 return NumberSequence;
12105}());
12106
12107
12108
12109/***/ }),
12110/* 53 */
12111/***/ (function(module, __webpack_exports__, __webpack_require__) {
12112
12113"use strict";
12114__webpack_require__.r(__webpack_exports__);
12115/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgPromiseStatus", function() { return AgPromiseStatus; });
12116/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgPromise", function() { return AgPromise; });
12117/**
12118 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12119 * @version v29.2.0
12120 * @link https://www.ag-grid.com/
12121 * @license MIT
12122 */
12123var AgPromiseStatus;
12124(function (AgPromiseStatus) {
12125 AgPromiseStatus[AgPromiseStatus["IN_PROGRESS"] = 0] = "IN_PROGRESS";
12126 AgPromiseStatus[AgPromiseStatus["RESOLVED"] = 1] = "RESOLVED";
12127})(AgPromiseStatus || (AgPromiseStatus = {}));
12128var AgPromise = /** @class */ (function () {
12129 function AgPromise(callback) {
12130 var _this = this;
12131 this.status = AgPromiseStatus.IN_PROGRESS;
12132 this.resolution = null;
12133 this.waiters = [];
12134 callback(function (value) { return _this.onDone(value); }, function (params) { return _this.onReject(params); });
12135 }
12136 AgPromise.all = function (promises) {
12137 return new AgPromise(function (resolve) {
12138 var remainingToResolve = promises.length;
12139 var combinedValues = new Array(remainingToResolve);
12140 promises.forEach(function (promise, index) {
12141 promise.then(function (value) {
12142 combinedValues[index] = value;
12143 remainingToResolve--;
12144 if (remainingToResolve === 0) {
12145 resolve(combinedValues);
12146 }
12147 });
12148 });
12149 });
12150 };
12151 AgPromise.resolve = function (value) {
12152 if (value === void 0) { value = null; }
12153 return new AgPromise(function (resolve) { return resolve(value); });
12154 };
12155 AgPromise.prototype.then = function (func) {
12156 var _this = this;
12157 return new AgPromise(function (resolve) {
12158 if (_this.status === AgPromiseStatus.RESOLVED) {
12159 resolve(func(_this.resolution));
12160 }
12161 else {
12162 _this.waiters.push(function (value) { return resolve(func(value)); });
12163 }
12164 });
12165 };
12166 AgPromise.prototype.resolveNow = function (ifNotResolvedValue, ifResolved) {
12167 return this.status === AgPromiseStatus.RESOLVED ? ifResolved(this.resolution) : ifNotResolvedValue;
12168 };
12169 AgPromise.prototype.onDone = function (value) {
12170 this.status = AgPromiseStatus.RESOLVED;
12171 this.resolution = value;
12172 this.waiters.forEach(function (waiter) { return waiter(value); });
12173 };
12174 AgPromise.prototype.onReject = function (params) {
12175 console.warn('TBI');
12176 };
12177 return AgPromise;
12178}());
12179
12180
12181
12182/***/ }),
12183/* 54 */
12184/***/ (function(module, __webpack_exports__, __webpack_require__) {
12185
12186"use strict";
12187__webpack_require__.r(__webpack_exports__);
12188/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return Timer; });
12189/**
12190 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12191 * @version v29.2.0
12192 * @link https://www.ag-grid.com/
12193 * @license MIT
12194 */
12195/**
12196 * A Util Class only used when debugging for printing time to console
12197 */
12198var Timer = /** @class */ (function () {
12199 function Timer() {
12200 this.timestamp = new Date().getTime();
12201 }
12202 Timer.prototype.print = function (msg) {
12203 var duration = (new Date().getTime()) - this.timestamp;
12204 console.info(msg + " = " + duration);
12205 this.timestamp = new Date().getTime();
12206 };
12207 return Timer;
12208}());
12209
12210
12211
12212/***/ }),
12213/* 55 */
12214/***/ (function(module, __webpack_exports__, __webpack_require__) {
12215
12216"use strict";
12217__webpack_require__.r(__webpack_exports__);
12218/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomTooltipFeature", function() { return CustomTooltipFeature; });
12219/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
12220/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
12221/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
12222/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
12223/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31);
12224/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(13);
12225/**
12226 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12227 * @version v29.2.0
12228 * @link https://www.ag-grid.com/
12229 * @license MIT
12230 */
12231var __extends = (undefined && undefined.__extends) || (function () {
12232 var extendStatics = function (d, b) {
12233 extendStatics = Object.setPrototypeOf ||
12234 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
12235 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
12236 return extendStatics(d, b);
12237 };
12238 return function (d, b) {
12239 extendStatics(d, b);
12240 function __() { this.constructor = d; }
12241 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12242 };
12243})();
12244var __assign = (undefined && undefined.__assign) || function () {
12245 __assign = Object.assign || function(t) {
12246 for (var s, i = 1, n = arguments.length; i < n; i++) {
12247 s = arguments[i];
12248 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
12249 t[p] = s[p];
12250 }
12251 return t;
12252 };
12253 return __assign.apply(this, arguments);
12254};
12255var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
12256 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
12257 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
12258 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;
12259 return c > 3 && r && Object.defineProperty(target, key, r), r;
12260};
12261
12262
12263
12264
12265
12266
12267var TooltipStates;
12268(function (TooltipStates) {
12269 TooltipStates[TooltipStates["NOTHING"] = 0] = "NOTHING";
12270 TooltipStates[TooltipStates["WAITING_TO_SHOW"] = 1] = "WAITING_TO_SHOW";
12271 TooltipStates[TooltipStates["SHOWING"] = 2] = "SHOWING";
12272})(TooltipStates || (TooltipStates = {}));
12273var CustomTooltipFeature = /** @class */ (function (_super) {
12274 __extends(CustomTooltipFeature, _super);
12275 function CustomTooltipFeature(parentComp) {
12276 var _this = _super.call(this) || this;
12277 _this.DEFAULT_SHOW_TOOLTIP_DELAY = 2000;
12278 _this.DEFAULT_HIDE_TOOLTIP_DELAY = 10000;
12279 _this.SHOW_QUICK_TOOLTIP_DIFF = 1000;
12280 _this.FADE_OUT_TOOLTIP_TIMEOUT = 1000;
12281 _this.state = TooltipStates.NOTHING;
12282 // when showing the tooltip, we need to make sure it's the most recent instance we request, as due to
12283 // async we could request two tooltips before the first instance returns, in which case we should
12284 // disregard the second instance.
12285 _this.tooltipInstanceCount = 0;
12286 _this.tooltipMouseTrack = false;
12287 _this.parentComp = parentComp;
12288 return _this;
12289 }
12290 CustomTooltipFeature.prototype.postConstruct = function () {
12291 this.tooltipShowDelay = this.getTooltipDelay('show') || this.DEFAULT_SHOW_TOOLTIP_DELAY;
12292 this.tooltipHideDelay = this.getTooltipDelay('hide') || this.DEFAULT_HIDE_TOOLTIP_DELAY;
12293 this.tooltipMouseTrack = this.gridOptionsService.is('tooltipMouseTrack');
12294 var el = this.parentComp.getGui();
12295 this.addManagedListener(el, 'mouseenter', this.onMouseEnter.bind(this));
12296 this.addManagedListener(el, 'mouseleave', this.onMouseLeave.bind(this));
12297 this.addManagedListener(el, 'mousemove', this.onMouseMove.bind(this));
12298 this.addManagedListener(el, 'mousedown', this.onMouseDown.bind(this));
12299 this.addManagedListener(el, 'keydown', this.onKeyDown.bind(this));
12300 };
12301 CustomTooltipFeature.prototype.destroy = function () {
12302 // if this component gets destroyed while tooltip is showing, need to make sure
12303 // we don't end with no mouseLeave event resulting in zombie tooltip
12304 this.setToDoNothing();
12305 _super.prototype.destroy.call(this);
12306 };
12307 CustomTooltipFeature.prototype.onMouseEnter = function (e) {
12308 if (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isIOSUserAgent"])()) {
12309 return;
12310 }
12311 // every mouseenter should be following by a mouseleave, however for some unkonwn, it's possible for
12312 // mouseenter to be called twice in a row, which can happen if editing the cell. this was reported
12313 // in https://ag-grid.atlassian.net/browse/AG-4422. to get around this, we check the state, and if
12314 // state is !=nothing, then we know mouseenter was already received.
12315 if (this.state != TooltipStates.NOTHING) {
12316 return;
12317 }
12318 // if another tooltip was hidden very recently, we only wait 200ms to show, not the normal waiting time
12319 var delay = this.isLastTooltipHiddenRecently() ? 200 : this.tooltipShowDelay;
12320 this.showTooltipTimeoutId = window.setTimeout(this.showTooltip.bind(this), delay);
12321 this.lastMouseEvent = e;
12322 this.state = TooltipStates.WAITING_TO_SHOW;
12323 };
12324 CustomTooltipFeature.prototype.onMouseLeave = function () {
12325 this.setToDoNothing();
12326 };
12327 CustomTooltipFeature.prototype.onKeyDown = function () {
12328 this.setToDoNothing();
12329 };
12330 CustomTooltipFeature.prototype.setToDoNothing = function () {
12331 if (this.state === TooltipStates.SHOWING) {
12332 this.hideTooltip();
12333 }
12334 this.clearTimeouts();
12335 this.state = TooltipStates.NOTHING;
12336 };
12337 CustomTooltipFeature.prototype.onMouseMove = function (e) {
12338 // there is a delay from the time we mouseOver a component and the time the
12339 // tooltip is displayed, so we need to track mousemove to be able to correctly
12340 // position the tooltip when showTooltip is called.
12341 this.lastMouseEvent = e;
12342 if (this.tooltipMouseTrack &&
12343 this.state === TooltipStates.SHOWING &&
12344 this.tooltipComp) {
12345 this.positionTooltipUnderLastMouseEvent();
12346 }
12347 };
12348 CustomTooltipFeature.prototype.onMouseDown = function () {
12349 this.setToDoNothing();
12350 };
12351 CustomTooltipFeature.prototype.getTooltipDelay = function (type) {
12352 var tooltipShowDelay = this.gridOptionsService.getNum('tooltipShowDelay');
12353 var tooltipHideDelay = this.gridOptionsService.getNum('tooltipHideDelay');
12354 var delay = type === 'show' ? tooltipShowDelay : tooltipHideDelay;
12355 var capitalisedType = Object(_utils_string__WEBPACK_IMPORTED_MODULE_4__["capitalise"])(type);
12356 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(delay)) {
12357 if (delay < 0) {
12358 Object(_utils_function__WEBPACK_IMPORTED_MODULE_5__["doOnce"])(function () { return console.warn("AG Grid: tooltip" + capitalisedType + "Delay should not be lower than 0"); }, "tooltip" + capitalisedType + "DelayWarn");
12359 }
12360 return Math.max(200, delay);
12361 }
12362 return null;
12363 };
12364 CustomTooltipFeature.prototype.hideTooltip = function () {
12365 // check if comp exists - due to async, although we asked for
12366 // one, the instance may not be back yet
12367 if (this.tooltipComp) {
12368 this.destroyTooltipComp();
12369 CustomTooltipFeature.lastTooltipHideTime = new Date().getTime();
12370 }
12371 this.state = TooltipStates.NOTHING;
12372 };
12373 CustomTooltipFeature.prototype.destroyTooltipComp = function () {
12374 var _this = this;
12375 // add class to fade out the tooltip
12376 this.tooltipComp.getGui().classList.add('ag-tooltip-hiding');
12377 // make local copies of these variables, as we use them in the async function below,
12378 // and we clear then to 'undefined' later, so need to take a copy before they are undefined.
12379 var tooltipPopupDestroyFunc = this.tooltipPopupDestroyFunc;
12380 var tooltipComp = this.tooltipComp;
12381 window.setTimeout(function () {
12382 tooltipPopupDestroyFunc();
12383 _this.getContext().destroyBean(tooltipComp);
12384 }, this.FADE_OUT_TOOLTIP_TIMEOUT);
12385 this.tooltipPopupDestroyFunc = undefined;
12386 this.tooltipComp = undefined;
12387 };
12388 CustomTooltipFeature.prototype.isLastTooltipHiddenRecently = function () {
12389 // return true if <1000ms since last time we hid a tooltip
12390 var now = new Date().getTime();
12391 var then = CustomTooltipFeature.lastTooltipHideTime;
12392 return (now - then) < this.SHOW_QUICK_TOOLTIP_DIFF;
12393 };
12394 CustomTooltipFeature.prototype.showTooltip = function () {
12395 var params = __assign({}, this.parentComp.getTooltipParams());
12396 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(params.value)) {
12397 this.setToDoNothing();
12398 return;
12399 }
12400 this.state = TooltipStates.SHOWING;
12401 this.tooltipInstanceCount++;
12402 // we pass in tooltipInstanceCount so the callback knows what the count was when
12403 // we requested the tooltip, so if another tooltip was requested in the mean time
12404 // we disregard it
12405 var callback = this.newTooltipComponentCallback.bind(this, this.tooltipInstanceCount);
12406 var userDetails = this.userComponentFactory.getTooltipCompDetails(params);
12407 userDetails.newAgStackInstance().then(callback);
12408 };
12409 CustomTooltipFeature.prototype.newTooltipComponentCallback = function (tooltipInstanceCopy, tooltipComp) {
12410 var compNoLongerNeeded = this.state !== TooltipStates.SHOWING || this.tooltipInstanceCount !== tooltipInstanceCopy;
12411 if (compNoLongerNeeded) {
12412 this.getContext().destroyBean(tooltipComp);
12413 return;
12414 }
12415 var eGui = tooltipComp.getGui();
12416 this.tooltipComp = tooltipComp;
12417 if (!eGui.classList.contains('ag-tooltip')) {
12418 eGui.classList.add('ag-tooltip-custom');
12419 }
12420 var translate = this.localeService.getLocaleTextFunc();
12421 var addPopupRes = this.popupService.addPopup({
12422 eChild: eGui,
12423 ariaLabel: translate('ariaLabelTooltip', 'Tooltip')
12424 });
12425 if (addPopupRes) {
12426 this.tooltipPopupDestroyFunc = addPopupRes.hideFunc;
12427 }
12428 // this.tooltipPopupDestroyFunc = this.popupService.addPopup(false, eGui, false);
12429 this.positionTooltipUnderLastMouseEvent();
12430 this.hideTooltipTimeoutId = window.setTimeout(this.hideTooltip.bind(this), this.tooltipHideDelay);
12431 };
12432 CustomTooltipFeature.prototype.positionTooltipUnderLastMouseEvent = function () {
12433 this.popupService.positionPopupUnderMouseEvent({
12434 type: 'tooltip',
12435 mouseEvent: this.lastMouseEvent,
12436 ePopup: this.tooltipComp.getGui(),
12437 nudgeY: 18,
12438 skipObserver: this.tooltipMouseTrack
12439 });
12440 };
12441 CustomTooltipFeature.prototype.clearTimeouts = function () {
12442 if (this.showTooltipTimeoutId) {
12443 window.clearTimeout(this.showTooltipTimeoutId);
12444 this.showTooltipTimeoutId = undefined;
12445 }
12446 if (this.hideTooltipTimeoutId) {
12447 window.clearTimeout(this.hideTooltipTimeoutId);
12448 this.hideTooltipTimeoutId = undefined;
12449 }
12450 };
12451 __decorate([
12452 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('popupService')
12453 ], CustomTooltipFeature.prototype, "popupService", void 0);
12454 __decorate([
12455 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('userComponentFactory')
12456 ], CustomTooltipFeature.prototype, "userComponentFactory", void 0);
12457 __decorate([
12458 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
12459 ], CustomTooltipFeature.prototype, "columnApi", void 0);
12460 __decorate([
12461 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
12462 ], CustomTooltipFeature.prototype, "gridApi", void 0);
12463 __decorate([
12464 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
12465 ], CustomTooltipFeature.prototype, "postConstruct", null);
12466 return CustomTooltipFeature;
12467}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
12468
12469
12470
12471/***/ }),
12472/* 56 */
12473/***/ (function(module, __webpack_exports__, __webpack_require__) {
12474
12475"use strict";
12476__webpack_require__.r(__webpack_exports__);
12477/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CssClassManager", function() { return CssClassManager; });
12478/**
12479 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12480 * @version v29.2.0
12481 * @link https://www.ag-grid.com/
12482 * @license MIT
12483 */
12484var CssClassManager = /** @class */ (function () {
12485 function CssClassManager(getGui) {
12486 // to minimise DOM hits, we only apply CSS classes if they have changed. as adding a CSS class that is already
12487 // there, or removing one that wasn't present, all takes CPU.
12488 this.cssClassStates = {};
12489 this.getGui = getGui;
12490 }
12491 CssClassManager.prototype.addCssClass = function (className) {
12492 var _this = this;
12493 var list = (className || '').split(' ');
12494 if (list.length > 1) {
12495 list.forEach(function (cls) { return _this.addCssClass(cls); });
12496 return;
12497 }
12498 var updateNeeded = this.cssClassStates[className] !== true;
12499 if (updateNeeded && className.length) {
12500 var eGui = this.getGui();
12501 if (eGui) {
12502 eGui.classList.add(className);
12503 }
12504 this.cssClassStates[className] = true;
12505 }
12506 };
12507 CssClassManager.prototype.removeCssClass = function (className) {
12508 var _this = this;
12509 var list = (className || '').split(' ');
12510 if (list.length > 1) {
12511 list.forEach(function (cls) { return _this.removeCssClass(cls); });
12512 return;
12513 }
12514 var updateNeeded = this.cssClassStates[className] !== false;
12515 if (updateNeeded && className.length) {
12516 var eGui = this.getGui();
12517 if (eGui) {
12518 eGui.classList.remove(className);
12519 }
12520 this.cssClassStates[className] = false;
12521 }
12522 };
12523 CssClassManager.prototype.containsCssClass = function (className) {
12524 var eGui = this.getGui();
12525 if (!eGui) {
12526 return false;
12527 }
12528 return eGui.classList.contains(className);
12529 };
12530 CssClassManager.prototype.addOrRemoveCssClass = function (className, addOrRemove) {
12531 var _this = this;
12532 if (!className) {
12533 return;
12534 }
12535 // we check for spaces before doing the split, as doing the split
12536 // created a performance problem (on windows only, see AG-6765)
12537 if (className.indexOf(' ') >= 0) {
12538 var list = (className || '').split(' ');
12539 if (list.length > 1) {
12540 list.forEach(function (cls) { return _this.addOrRemoveCssClass(cls, addOrRemove); });
12541 return;
12542 }
12543 }
12544 var updateNeeded = this.cssClassStates[className] !== addOrRemove;
12545 if (updateNeeded && className.length) {
12546 var eGui = this.getGui();
12547 if (eGui) {
12548 eGui.classList.toggle(className, addOrRemove);
12549 }
12550 this.cssClassStates[className] = addOrRemove;
12551 }
12552 };
12553 return CssClassManager;
12554}());
12555
12556
12557
12558/***/ }),
12559/* 57 */
12560/***/ (function(module, __webpack_exports__, __webpack_require__) {
12561
12562"use strict";
12563__webpack_require__.r(__webpack_exports__);
12564/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuerySelector", function() { return QuerySelector; });
12565/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RefSelector", function() { return RefSelector; });
12566/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
12567/**
12568 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12569 * @version v29.2.0
12570 * @link https://www.ag-grid.com/
12571 * @license MIT
12572 */
12573
12574function QuerySelector(selector) {
12575 return querySelectorFunc.bind(this, selector, undefined);
12576}
12577function RefSelector(ref) {
12578 return querySelectorFunc.bind(this, "[ref=" + ref + "]", ref);
12579}
12580function querySelectorFunc(selector, refSelector, classPrototype, methodOrAttributeName, index) {
12581 if (selector === null) {
12582 console.error('AG Grid: QuerySelector selector should not be null');
12583 return;
12584 }
12585 if (typeof index === 'number') {
12586 console.error('AG Grid: QuerySelector should be on an attribute');
12587 return;
12588 }
12589 addToObjectProps(classPrototype, 'querySelectors', {
12590 attributeName: methodOrAttributeName,
12591 querySelector: selector,
12592 refSelector: refSelector
12593 });
12594}
12595// // think we should take this out, put property bindings on the
12596// export function Method(eventName?: string): Function {
12597// return methodFunc.bind(this, eventName);
12598// }
12599//
12600// function methodFunc(alias: string, target: Object, methodName: string) {
12601// if (alias === null) {
12602// console.error("AG Grid: EventListener eventName should not be null");
12603// return;
12604// }
12605//
12606// addToObjectProps(target, 'methods', {
12607// methodName: methodName,
12608// alias: alias
12609// });
12610// }
12611function addToObjectProps(target, key, value) {
12612 // it's an attribute on the class
12613 var props = getOrCreateProps(target, Object(_utils_function__WEBPACK_IMPORTED_MODULE_0__["getFunctionName"])(target.constructor));
12614 if (!props[key]) {
12615 props[key] = [];
12616 }
12617 props[key].push(value);
12618}
12619function getOrCreateProps(target, instanceName) {
12620 if (!target.__agComponentMetaData) {
12621 target.__agComponentMetaData = {};
12622 }
12623 if (!target.__agComponentMetaData[instanceName]) {
12624 target.__agComponentMetaData[instanceName] = {};
12625 }
12626 return target.__agComponentMetaData[instanceName];
12627}
12628
12629
12630/***/ }),
12631/* 58 */
12632/***/ (function(module, __webpack_exports__, __webpack_require__) {
12633
12634"use strict";
12635__webpack_require__.r(__webpack_exports__);
12636/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateFilterModelFormatter", function() { return DateFilterModelFormatter; });
12637/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateFilter", function() { return DateFilter; });
12638/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
12639/* harmony import */ var _dateCompWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59);
12640/* harmony import */ var _simpleFilter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60);
12641/* harmony import */ var _scalarFilter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74);
12642/* harmony import */ var _utils_date__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43);
12643/**
12644 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12645 * @version v29.2.0
12646 * @link https://www.ag-grid.com/
12647 * @license MIT
12648 */
12649var __extends = (undefined && undefined.__extends) || (function () {
12650 var extendStatics = function (d, b) {
12651 extendStatics = Object.setPrototypeOf ||
12652 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
12653 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
12654 return extendStatics(d, b);
12655 };
12656 return function (d, b) {
12657 extendStatics(d, b);
12658 function __() { this.constructor = d; }
12659 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12660 };
12661})();
12662var __assign = (undefined && undefined.__assign) || function () {
12663 __assign = Object.assign || function(t) {
12664 for (var s, i = 1, n = arguments.length; i < n; i++) {
12665 s = arguments[i];
12666 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
12667 t[p] = s[p];
12668 }
12669 return t;
12670 };
12671 return __assign.apply(this, arguments);
12672};
12673var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
12674 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
12675 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
12676 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;
12677 return c > 3 && r && Object.defineProperty(target, key, r), r;
12678};
12679
12680
12681
12682
12683
12684var DEFAULT_MIN_YEAR = 1000;
12685var DEFAULT_MAX_YEAR = Infinity;
12686var DateFilterModelFormatter = /** @class */ (function (_super) {
12687 __extends(DateFilterModelFormatter, _super);
12688 function DateFilterModelFormatter(dateFilterParams, localeService, optionsFactory) {
12689 var _this = _super.call(this, localeService, optionsFactory) || this;
12690 _this.dateFilterParams = dateFilterParams;
12691 return _this;
12692 }
12693 DateFilterModelFormatter.prototype.conditionToString = function (condition, options) {
12694 var type = condition.type;
12695 var numberOfInputs = (options || {}).numberOfInputs;
12696 var isRange = type == _simpleFilter__WEBPACK_IMPORTED_MODULE_2__["SimpleFilter"].IN_RANGE || numberOfInputs === 2;
12697 var dateFrom = Object(_utils_date__WEBPACK_IMPORTED_MODULE_4__["parseDateTimeFromString"])(condition.dateFrom);
12698 var dateTo = Object(_utils_date__WEBPACK_IMPORTED_MODULE_4__["parseDateTimeFromString"])(condition.dateTo);
12699 var format = this.dateFilterParams.inRangeFloatingFilterDateFormat;
12700 if (isRange) {
12701 var formattedFrom = dateFrom !== null ? Object(_utils_date__WEBPACK_IMPORTED_MODULE_4__["dateToFormattedString"])(dateFrom, format) : 'null';
12702 var formattedTo = dateTo !== null ? Object(_utils_date__WEBPACK_IMPORTED_MODULE_4__["dateToFormattedString"])(dateTo, format) : 'null';
12703 return formattedFrom + "-" + formattedTo;
12704 }
12705 if (dateFrom != null) {
12706 return Object(_utils_date__WEBPACK_IMPORTED_MODULE_4__["dateToFormattedString"])(dateFrom, format);
12707 }
12708 // cater for when the type doesn't need a value
12709 return "" + type;
12710 };
12711 return DateFilterModelFormatter;
12712}(_simpleFilter__WEBPACK_IMPORTED_MODULE_2__["SimpleFilterModelFormatter"]));
12713
12714var DateFilter = /** @class */ (function (_super) {
12715 __extends(DateFilter, _super);
12716 function DateFilter() {
12717 var _this = _super.call(this, 'dateFilter') || this;
12718 _this.eConditionPanelsFrom = [];
12719 _this.eConditionPanelsTo = [];
12720 _this.dateConditionFromComps = [];
12721 _this.dateConditionToComps = [];
12722 _this.minValidYear = DEFAULT_MIN_YEAR;
12723 _this.maxValidYear = DEFAULT_MAX_YEAR;
12724 return _this;
12725 }
12726 DateFilter.prototype.afterGuiAttached = function (params) {
12727 _super.prototype.afterGuiAttached.call(this, params);
12728 this.dateConditionFromComps[0].afterGuiAttached(params);
12729 };
12730 DateFilter.prototype.mapValuesFromModel = function (filterModel) {
12731 // unlike the other filters, we do two things here:
12732 // 1) allow for different attribute names (same as done for other filters) (eg the 'from' and 'to'
12733 // are in different locations in Date and Number filter models)
12734 // 2) convert the type (because Date filter uses Dates, however model is 'string')
12735 //
12736 // NOTE: The conversion of string to date also removes the timezone - i.e. when user picks
12737 // a date from the UI, it will have timezone info in it. This is lost when creating
12738 // the model. When we recreate the date again here, it's without a timezone.
12739 var _a = filterModel || {}, dateFrom = _a.dateFrom, dateTo = _a.dateTo, type = _a.type;
12740 return [
12741 dateFrom && Object(_utils_date__WEBPACK_IMPORTED_MODULE_4__["parseDateTimeFromString"])(dateFrom) || null,
12742 dateTo && Object(_utils_date__WEBPACK_IMPORTED_MODULE_4__["parseDateTimeFromString"])(dateTo) || null,
12743 ].slice(0, this.getNumberOfInputs(type));
12744 };
12745 DateFilter.prototype.comparator = function () {
12746 return this.dateFilterParams.comparator ? this.dateFilterParams.comparator : this.defaultComparator.bind(this);
12747 };
12748 DateFilter.prototype.defaultComparator = function (filterDate, cellValue) {
12749 // The default comparator assumes that the cellValue is a date
12750 var cellAsDate = cellValue;
12751 if (cellValue == null || cellAsDate < filterDate) {
12752 return -1;
12753 }
12754 if (cellAsDate > filterDate) {
12755 return 1;
12756 }
12757 return 0;
12758 };
12759 DateFilter.prototype.setParams = function (params) {
12760 this.dateFilterParams = params;
12761 _super.prototype.setParams.call(this, params);
12762 var yearParser = function (param, fallback) {
12763 if (params[param] != null) {
12764 if (!isNaN(params[param])) {
12765 return params[param] == null ? fallback : Number(params[param]);
12766 }
12767 else {
12768 console.warn("AG Grid: DateFilter " + param + " is not a number");
12769 }
12770 }
12771 return fallback;
12772 };
12773 this.minValidYear = yearParser('minValidYear', DEFAULT_MIN_YEAR);
12774 this.maxValidYear = yearParser('maxValidYear', DEFAULT_MAX_YEAR);
12775 if (this.minValidYear > this.maxValidYear) {
12776 console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear");
12777 }
12778 this.filterModelFormatter = new DateFilterModelFormatter(this.dateFilterParams, this.localeService, this.optionsFactory);
12779 };
12780 DateFilter.prototype.createDateCompWrapper = function (element) {
12781 var _this = this;
12782 var dateCompWrapper = new _dateCompWrapper__WEBPACK_IMPORTED_MODULE_1__["DateCompWrapper"](this.getContext(), this.userComponentFactory, {
12783 onDateChanged: function () { return _this.onUiChanged(); },
12784 filterParams: this.dateFilterParams
12785 }, element);
12786 this.addDestroyFunc(function () { return dateCompWrapper.destroy(); });
12787 return dateCompWrapper;
12788 };
12789 DateFilter.prototype.setElementValue = function (element, value) {
12790 element.setDate(value);
12791 };
12792 DateFilter.prototype.setElementDisplayed = function (element, displayed) {
12793 element.setDisplayed(displayed);
12794 };
12795 DateFilter.prototype.setElementDisabled = function (element, disabled) {
12796 element.setDisabled(disabled);
12797 };
12798 DateFilter.prototype.getDefaultFilterOptions = function () {
12799 return DateFilter.DEFAULT_FILTER_OPTIONS;
12800 };
12801 DateFilter.prototype.createValueElement = function () {
12802 var eCondition = document.createElement('div');
12803 eCondition.classList.add('ag-filter-body');
12804 this.createFromToElement(eCondition, this.eConditionPanelsFrom, this.dateConditionFromComps, 'from');
12805 this.createFromToElement(eCondition, this.eConditionPanelsTo, this.dateConditionToComps, 'to');
12806 return eCondition;
12807 };
12808 DateFilter.prototype.createFromToElement = function (eCondition, eConditionPanels, dateConditionComps, fromTo) {
12809 var eConditionPanel = document.createElement('div');
12810 eConditionPanel.classList.add("ag-filter-" + fromTo);
12811 eConditionPanel.classList.add("ag-filter-date-" + fromTo);
12812 eConditionPanels.push(eConditionPanel);
12813 eCondition.appendChild(eConditionPanel);
12814 dateConditionComps.push(this.createDateCompWrapper(eConditionPanel));
12815 };
12816 DateFilter.prototype.removeValueElements = function (startPosition, deleteCount) {
12817 this.removeDateComps(this.dateConditionFromComps, startPosition, deleteCount);
12818 this.removeDateComps(this.dateConditionToComps, startPosition, deleteCount);
12819 this.removeItems(this.eConditionPanelsFrom, startPosition, deleteCount);
12820 this.removeItems(this.eConditionPanelsTo, startPosition, deleteCount);
12821 };
12822 DateFilter.prototype.removeDateComps = function (components, startPosition, deleteCount) {
12823 var removedComponents = this.removeItems(components, startPosition, deleteCount);
12824 removedComponents.forEach(function (comp) { return comp.destroy(); });
12825 };
12826 DateFilter.prototype.isConditionUiComplete = function (position) {
12827 var _this = this;
12828 if (!_super.prototype.isConditionUiComplete.call(this, position)) {
12829 return false;
12830 }
12831 var isValidDate = function (value) { return value != null
12832 && value.getUTCFullYear() >= _this.minValidYear
12833 && value.getUTCFullYear() <= _this.maxValidYear; };
12834 var valid = true;
12835 this.forEachInput(function (element, index, elPosition, numberOfInputs) {
12836 if (elPosition !== position || !valid || index >= numberOfInputs) {
12837 return;
12838 }
12839 valid = valid && isValidDate(element.getDate());
12840 });
12841 return valid;
12842 };
12843 DateFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {
12844 return aSimple.dateFrom === bSimple.dateFrom
12845 && aSimple.dateTo === bSimple.dateTo
12846 && aSimple.type === bSimple.type;
12847 };
12848 DateFilter.prototype.getFilterType = function () {
12849 return 'date';
12850 };
12851 DateFilter.prototype.createCondition = function (position) {
12852 var type = this.getConditionType(position);
12853 var model = {};
12854 var values = this.getValues(position);
12855 if (values.length > 0) {
12856 model.dateFrom = Object(_utils_date__WEBPACK_IMPORTED_MODULE_4__["serialiseDate"])(values[0]);
12857 }
12858 if (values.length > 1) {
12859 model.dateTo = Object(_utils_date__WEBPACK_IMPORTED_MODULE_4__["serialiseDate"])(values[1]);
12860 }
12861 return __assign({ dateFrom: null, dateTo: null, filterType: this.getFilterType(), type: type }, model);
12862 };
12863 DateFilter.prototype.resetPlaceholder = function () {
12864 var globalTranslate = this.localeService.getLocaleTextFunc();
12865 var placeholder = this.translate('dateFormatOoo');
12866 var ariaLabel = globalTranslate('ariaFilterValue', 'Filter Value');
12867 this.forEachInput(function (element) {
12868 element.setInputPlaceholder(placeholder);
12869 element.setInputAriaLabel(ariaLabel);
12870 });
12871 };
12872 DateFilter.prototype.getInputs = function (position) {
12873 if (position >= this.dateConditionFromComps.length) {
12874 return [null, null];
12875 }
12876 return [this.dateConditionFromComps[position], this.dateConditionToComps[position]];
12877 };
12878 DateFilter.prototype.getValues = function (position) {
12879 var result = [];
12880 this.forEachPositionInput(position, function (element, index, _elPosition, numberOfInputs) {
12881 if (index < numberOfInputs) {
12882 result.push(element.getDate());
12883 }
12884 });
12885 return result;
12886 };
12887 DateFilter.prototype.getModelAsString = function (model) {
12888 var _a;
12889 return (_a = this.filterModelFormatter.getModelAsString(model)) !== null && _a !== void 0 ? _a : '';
12890 };
12891 DateFilter.DEFAULT_FILTER_OPTIONS = [
12892 _scalarFilter__WEBPACK_IMPORTED_MODULE_3__["ScalarFilter"].EQUALS,
12893 _scalarFilter__WEBPACK_IMPORTED_MODULE_3__["ScalarFilter"].GREATER_THAN,
12894 _scalarFilter__WEBPACK_IMPORTED_MODULE_3__["ScalarFilter"].LESS_THAN,
12895 _scalarFilter__WEBPACK_IMPORTED_MODULE_3__["ScalarFilter"].NOT_EQUAL,
12896 _scalarFilter__WEBPACK_IMPORTED_MODULE_3__["ScalarFilter"].IN_RANGE,
12897 _scalarFilter__WEBPACK_IMPORTED_MODULE_3__["ScalarFilter"].BLANK,
12898 _scalarFilter__WEBPACK_IMPORTED_MODULE_3__["ScalarFilter"].NOT_BLANK,
12899 ];
12900 __decorate([
12901 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('userComponentFactory')
12902 ], DateFilter.prototype, "userComponentFactory", void 0);
12903 return DateFilter;
12904}(_scalarFilter__WEBPACK_IMPORTED_MODULE_3__["ScalarFilter"]));
12905
12906
12907
12908/***/ }),
12909/* 59 */
12910/***/ (function(module, __webpack_exports__, __webpack_require__) {
12911
12912"use strict";
12913__webpack_require__.r(__webpack_exports__);
12914/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateCompWrapper", function() { return DateCompWrapper; });
12915/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
12916/**
12917 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12918 * @version v29.2.0
12919 * @link https://www.ag-grid.com/
12920 * @license MIT
12921 */
12922
12923/** Provides sync access to async component. Date component can be lazy created - this class encapsulates
12924 * this by keeping value locally until DateComp has loaded, then passing DateComp the value. */
12925var DateCompWrapper = /** @class */ (function () {
12926 function DateCompWrapper(context, userComponentFactory, dateComponentParams, eParent) {
12927 var _this = this;
12928 this.alive = true;
12929 this.context = context;
12930 this.eParent = eParent;
12931 var compDetails = userComponentFactory.getDateCompDetails(dateComponentParams);
12932 var promise = compDetails.newAgStackInstance();
12933 promise.then(function (dateComp) {
12934 // because async, check the filter still exists after component comes back
12935 if (!_this.alive) {
12936 context.destroyBean(dateComp);
12937 return;
12938 }
12939 _this.dateComp = dateComp;
12940 if (!dateComp) {
12941 return;
12942 }
12943 eParent.appendChild(dateComp.getGui());
12944 if (dateComp.afterGuiAttached) {
12945 dateComp.afterGuiAttached();
12946 }
12947 if (_this.tempValue) {
12948 dateComp.setDate(_this.tempValue);
12949 }
12950 if (_this.disabled != null) {
12951 _this.setDateCompDisabled(_this.disabled);
12952 }
12953 });
12954 }
12955 DateCompWrapper.prototype.destroy = function () {
12956 this.alive = false;
12957 this.dateComp = this.context.destroyBean(this.dateComp);
12958 };
12959 DateCompWrapper.prototype.getDate = function () {
12960 return this.dateComp ? this.dateComp.getDate() : this.tempValue;
12961 };
12962 DateCompWrapper.prototype.setDate = function (value) {
12963 if (this.dateComp) {
12964 this.dateComp.setDate(value);
12965 }
12966 else {
12967 this.tempValue = value;
12968 }
12969 };
12970 DateCompWrapper.prototype.setDisabled = function (disabled) {
12971 if (this.dateComp) {
12972 this.setDateCompDisabled(disabled);
12973 }
12974 else {
12975 this.disabled = disabled;
12976 }
12977 };
12978 DateCompWrapper.prototype.setDisplayed = function (displayed) {
12979 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__["setDisplayed"])(this.eParent, displayed);
12980 };
12981 DateCompWrapper.prototype.setInputPlaceholder = function (placeholder) {
12982 if (this.dateComp && this.dateComp.setInputPlaceholder) {
12983 this.dateComp.setInputPlaceholder(placeholder);
12984 }
12985 };
12986 DateCompWrapper.prototype.setInputAriaLabel = function (label) {
12987 if (this.dateComp && this.dateComp.setInputAriaLabel) {
12988 this.dateComp.setInputAriaLabel(label);
12989 }
12990 };
12991 DateCompWrapper.prototype.afterGuiAttached = function (params) {
12992 if (this.dateComp && typeof this.dateComp.afterGuiAttached === 'function') {
12993 this.dateComp.afterGuiAttached(params);
12994 }
12995 };
12996 DateCompWrapper.prototype.setDateCompDisabled = function (disabled) {
12997 if (this.dateComp == null) {
12998 return;
12999 }
13000 if (this.dateComp.setDisabled == null) {
13001 return;
13002 }
13003 this.dateComp.setDisabled(disabled);
13004 };
13005 return DateCompWrapper;
13006}());
13007
13008
13009
13010/***/ }),
13011/* 60 */
13012/***/ (function(module, __webpack_exports__, __webpack_require__) {
13013
13014"use strict";
13015__webpack_require__.r(__webpack_exports__);
13016/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleFilterModelFormatter", function() { return SimpleFilterModelFormatter; });
13017/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleFilter", function() { return SimpleFilter; });
13018/* harmony import */ var _optionsFactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61);
13019/* harmony import */ var _providedFilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62);
13020/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39);
13021/* harmony import */ var _widgets_agSelect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66);
13022/* harmony import */ var _widgets_agRadioButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71);
13023/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(19);
13024/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45);
13025/* harmony import */ var _filterLocaleText__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(63);
13026/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38);
13027/* harmony import */ var _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73);
13028/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(13);
13029/**
13030 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
13031 * @version v29.2.0
13032 * @link https://www.ag-grid.com/
13033 * @license MIT
13034 */
13035var __extends = (undefined && undefined.__extends) || (function () {
13036 var extendStatics = function (d, b) {
13037 extendStatics = Object.setPrototypeOf ||
13038 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
13039 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
13040 return extendStatics(d, b);
13041 };
13042 return function (d, b) {
13043 extendStatics(d, b);
13044 function __() { this.constructor = d; }
13045 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13046 };
13047})();
13048var __read = (undefined && undefined.__read) || function (o, n) {
13049 var m = typeof Symbol === "function" && o[Symbol.iterator];
13050 if (!m) return o;
13051 var i = m.call(o), r, ar = [], e;
13052 try {
13053 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
13054 }
13055 catch (error) { e = { error: error }; }
13056 finally {
13057 try {
13058 if (r && !r.done && (m = i["return"])) m.call(i);
13059 }
13060 finally { if (e) throw e.error; }
13061 }
13062 return ar;
13063};
13064var __spread = (undefined && undefined.__spread) || function () {
13065 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
13066 return ar;
13067};
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079var SimpleFilterModelFormatter = /** @class */ (function () {
13080 function SimpleFilterModelFormatter(localeService, optionsFactory) {
13081 this.localeService = localeService;
13082 this.optionsFactory = optionsFactory;
13083 }
13084 // used by:
13085 // 1) NumberFloatingFilter & TextFloatingFilter: Always, for both when editable and read only.
13086 // 2) DateFloatingFilter: Only when read only (as we show text rather than a date picker when read only)
13087 SimpleFilterModelFormatter.prototype.getModelAsString = function (model) {
13088 var _this = this;
13089 if (!model) {
13090 return null;
13091 }
13092 var isCombined = model.operator != null;
13093 var translate = this.localeService.getLocaleTextFunc();
13094 if (isCombined) {
13095 var combinedModel = model;
13096 var conditions = combinedModel.conditions;
13097 if (!conditions) {
13098 var condition1 = combinedModel.condition1, condition2 = combinedModel.condition2;
13099 conditions = [condition1, condition2];
13100 }
13101 var customOptions = conditions.map(function (condition) { return _this.getModelAsString(condition); });
13102 var joinOperatorTranslateKey = combinedModel.operator === 'AND' ? 'andCondition' : 'orCondition';
13103 return customOptions.join(" " + translate(joinOperatorTranslateKey, _filterLocaleText__WEBPACK_IMPORTED_MODULE_7__["DEFAULT_FILTER_LOCALE_TEXT"][joinOperatorTranslateKey]) + " ");
13104 }
13105 else if (model.type === SimpleFilter.BLANK || model.type === SimpleFilter.NOT_BLANK) {
13106 return translate(model.type, model.type);
13107 }
13108 else {
13109 var condition = model;
13110 var customOption = this.optionsFactory.getCustomOption(condition.type);
13111 // For custom filter options we display the Name of the filter instead
13112 // of displaying the `from` value, as it wouldn't be relevant
13113 var _a = customOption || {}, displayKey = _a.displayKey, displayName = _a.displayName, numberOfInputs = _a.numberOfInputs;
13114 if (displayKey && displayName && numberOfInputs === 0) {
13115 translate(displayKey, displayName);
13116 return displayName;
13117 }
13118 return this.conditionToString(condition, customOption);
13119 }
13120 };
13121 return SimpleFilterModelFormatter;
13122}());
13123
13124/**
13125 * Every filter with a dropdown where the user can specify a comparing type against the filter values.
13126 *
13127 * @param M type of filter-model managed by the concrete sub-class that extends this type
13128 * @param V type of value managed by the concrete sub-class that extends this type
13129 * @param E type of UI element used for collecting user-input
13130 */
13131var SimpleFilter = /** @class */ (function (_super) {
13132 __extends(SimpleFilter, _super);
13133 function SimpleFilter() {
13134 var _this = _super !== null && _super.apply(this, arguments) || this;
13135 _this.eTypes = [];
13136 _this.eJoinOperatorPanels = [];
13137 _this.eJoinOperatorsAnd = [];
13138 _this.eJoinOperatorsOr = [];
13139 _this.eConditionBodies = [];
13140 _this.listener = function () { return _this.onUiChanged(); };
13141 _this.lastUiCompletePosition = null;
13142 _this.joinOperatorId = 0;
13143 return _this;
13144 }
13145 SimpleFilter.prototype.getNumberOfInputs = function (type) {
13146 var customOpts = this.optionsFactory.getCustomOption(type);
13147 if (customOpts) {
13148 var numberOfInputs = customOpts.numberOfInputs;
13149 return numberOfInputs != null ? numberOfInputs : 1;
13150 }
13151 var zeroInputTypes = [
13152 SimpleFilter.EMPTY, SimpleFilter.NOT_BLANK, SimpleFilter.BLANK,
13153 ];
13154 if (type && zeroInputTypes.indexOf(type) >= 0) {
13155 return 0;
13156 }
13157 else if (type === SimpleFilter.IN_RANGE) {
13158 return 2;
13159 }
13160 return 1;
13161 };
13162 // floating filter calls this when user applies filter from floating filter
13163 SimpleFilter.prototype.onFloatingFilterChanged = function (type, value) {
13164 this.setTypeFromFloatingFilter(type);
13165 this.setValueFromFloatingFilter(value);
13166 this.onUiChanged(true);
13167 };
13168 SimpleFilter.prototype.setTypeFromFloatingFilter = function (type) {
13169 var _this = this;
13170 this.eTypes.forEach(function (eType, position) {
13171 if (position === 0) {
13172 eType.setValue(type, true);
13173 }
13174 else {
13175 eType.setValue(_this.optionsFactory.getDefaultOption(), true);
13176 }
13177 });
13178 };
13179 SimpleFilter.prototype.getModelFromUi = function () {
13180 var conditions = this.getUiCompleteConditions();
13181 if (conditions.length === 0) {
13182 return null;
13183 }
13184 if (this.maxNumConditions > 1 && conditions.length > 1) {
13185 return {
13186 filterType: this.getFilterType(),
13187 operator: this.getJoinOperator(),
13188 condition1: conditions[0],
13189 condition2: conditions[1],
13190 conditions: conditions
13191 };
13192 }
13193 return conditions[0];
13194 };
13195 SimpleFilter.prototype.getConditionTypes = function () {
13196 return this.eTypes.map(function (eType) { return eType.getValue(); });
13197 };
13198 SimpleFilter.prototype.getConditionType = function (position) {
13199 return this.eTypes[position].getValue();
13200 };
13201 SimpleFilter.prototype.getJoinOperator = function () {
13202 if (this.eJoinOperatorsOr.length === 0) {
13203 return this.defaultJoinOperator;
13204 }
13205 return this.eJoinOperatorsOr[0].getValue() === true ? 'OR' : 'AND';
13206 };
13207 SimpleFilter.prototype.areModelsEqual = function (a, b) {
13208 var _this = this;
13209 // both are missing
13210 if (!a && !b) {
13211 return true;
13212 }
13213 // one is missing, other present
13214 if ((!a && b) || (a && !b)) {
13215 return false;
13216 }
13217 // one is combined, the other is not
13218 var aIsSimple = !a.operator;
13219 var bIsSimple = !b.operator;
13220 var oneSimpleOneCombined = (!aIsSimple && bIsSimple) || (aIsSimple && !bIsSimple);
13221 if (oneSimpleOneCombined) {
13222 return false;
13223 }
13224 var res;
13225 // otherwise both present, so compare
13226 if (aIsSimple) {
13227 var aSimple = a;
13228 var bSimple = b;
13229 res = this.areSimpleModelsEqual(aSimple, bSimple);
13230 }
13231 else {
13232 var aCombined = a;
13233 var bCombined = b;
13234 res = aCombined.operator === bCombined.operator
13235 && Object(_utils_array__WEBPACK_IMPORTED_MODULE_5__["areEqual"])(aCombined.conditions, bCombined.conditions, function (aModel, bModel) { return _this.areSimpleModelsEqual(aModel, bModel); });
13236 }
13237 return res;
13238 };
13239 SimpleFilter.prototype.setModelIntoUi = function (model) {
13240 var _this = this;
13241 var isCombined = model.operator;
13242 if (isCombined) {
13243 var combinedModel = model;
13244 if (!combinedModel.conditions) {
13245 combinedModel.conditions = [
13246 combinedModel.condition1,
13247 combinedModel.condition2
13248 ];
13249 }
13250 var numConditions = this.validateAndUpdateConditions(combinedModel.conditions);
13251 var numPrevConditions = this.getNumConditions();
13252 if (numConditions < numPrevConditions) {
13253 this.removeConditionsAndOperators(numConditions);
13254 }
13255 else if (numConditions > numPrevConditions) {
13256 for (var i = numPrevConditions; i < numConditions; i++) {
13257 this.createJoinOperatorPanel();
13258 this.createOption();
13259 }
13260 }
13261 var orChecked_1 = combinedModel.operator === 'OR';
13262 this.eJoinOperatorsAnd.forEach(function (eJoinOperatorAnd) { return eJoinOperatorAnd.setValue(!orChecked_1, true); });
13263 this.eJoinOperatorsOr.forEach(function (eJoinOperatorOr) { return eJoinOperatorOr.setValue(orChecked_1, true); });
13264 combinedModel.conditions.forEach(function (condition, position) {
13265 _this.eTypes[position].setValue(condition.type, true);
13266 _this.setConditionIntoUi(condition, position);
13267 });
13268 }
13269 else {
13270 var simpleModel = model;
13271 if (this.getNumConditions() > 1) {
13272 this.removeConditionsAndOperators(1);
13273 }
13274 this.eTypes[0].setValue(simpleModel.type, true);
13275 this.setConditionIntoUi(simpleModel, 0);
13276 }
13277 this.lastUiCompletePosition = this.getNumConditions() - 1;
13278 this.createMissingConditionsAndOperators();
13279 this.onUiChanged();
13280 return _utils__WEBPACK_IMPORTED_MODULE_2__["AgPromise"].resolve();
13281 };
13282 SimpleFilter.prototype.validateAndUpdateConditions = function (conditions) {
13283 var numConditions = conditions.length;
13284 if (numConditions > this.maxNumConditions) {
13285 conditions.splice(this.maxNumConditions);
13286 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["doOnce"])(function () { return console.warn('AG Grid: Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'); }, 'simpleFilterSetModelMaxNumConditions');
13287 numConditions = this.maxNumConditions;
13288 }
13289 return numConditions;
13290 };
13291 SimpleFilter.prototype.doesFilterPass = function (params) {
13292 var _this = this;
13293 var _a;
13294 var model = this.getModel();
13295 if (model == null) {
13296 return true;
13297 }
13298 var operator = model.operator;
13299 var models = [];
13300 if (operator) {
13301 var combinedModel = model;
13302 models.push.apply(models, __spread(((_a = combinedModel.conditions) !== null && _a !== void 0 ? _a : [])));
13303 }
13304 else {
13305 models.push(model);
13306 }
13307 var combineFunction = operator && operator === 'OR' ? 'some' : 'every';
13308 return models[combineFunction](function (m) { return _this.individualConditionPasses(params, m); });
13309 };
13310 SimpleFilter.prototype.setParams = function (params) {
13311 _super.prototype.setParams.call(this, params);
13312 this.setNumConditions(params);
13313 this.defaultJoinOperator = this.getDefaultJoinOperator(params.defaultJoinOperator);
13314 this.filterPlaceholder = params.filterPlaceholder;
13315 this.optionsFactory = new _optionsFactory__WEBPACK_IMPORTED_MODULE_0__["OptionsFactory"]();
13316 this.optionsFactory.init(params, this.getDefaultFilterOptions());
13317 this.createOption();
13318 this.createMissingConditionsAndOperators();
13319 };
13320 SimpleFilter.prototype.setNumConditions = function (params) {
13321 var _a, _b;
13322 if (params.suppressAndOrCondition != null) {
13323 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["doOnce"])(function () { return console.warn('AG Grid: Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'); }, 'simpleFilterSuppressAndOrCondition');
13324 }
13325 if (params.alwaysShowBothConditions != null) {
13326 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["doOnce"])(function () { return console.warn('AG Grid: Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'); }, 'simpleFilterAlwaysShowBothConditions');
13327 }
13328 this.maxNumConditions = (_a = params.maxNumConditions) !== null && _a !== void 0 ? _a : (params.suppressAndOrCondition ? 1 : 2);
13329 if (this.maxNumConditions < 1) {
13330 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["doOnce"])(function () { return console.warn('AG Grid: "filterParams.maxNumConditions" must be greater than or equal to zero.'); }, 'simpleFilterMaxNumConditions');
13331 this.maxNumConditions = 1;
13332 }
13333 this.numAlwaysVisibleConditions = (_b = params.numAlwaysVisibleConditions) !== null && _b !== void 0 ? _b : (params.alwaysShowBothConditions ? 2 : 1);
13334 if (this.numAlwaysVisibleConditions < 1) {
13335 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["doOnce"])(function () { return console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'); }, 'simpleFilterNumAlwaysVisibleConditions');
13336 this.numAlwaysVisibleConditions = 1;
13337 }
13338 if (this.numAlwaysVisibleConditions > this.maxNumConditions) {
13339 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["doOnce"])(function () { return console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'); }, 'simpleFilterNumAlwaysVisibleGreaterThanMaxNumConditions');
13340 this.numAlwaysVisibleConditions = this.maxNumConditions;
13341 }
13342 };
13343 SimpleFilter.prototype.createOption = function () {
13344 var _this = this;
13345 var eType = this.createManagedBean(new _widgets_agSelect__WEBPACK_IMPORTED_MODULE_3__["AgSelect"]());
13346 this.eTypes.push(eType);
13347 eType.addCssClass('ag-filter-select');
13348 this.eFilterBody.appendChild(eType.getGui());
13349 var eConditionBody = this.createValueElement();
13350 this.eConditionBodies.push(eConditionBody);
13351 this.eFilterBody.appendChild(eConditionBody);
13352 this.putOptionsIntoDropdown(eType);
13353 this.resetType(eType);
13354 var position = this.getNumConditions() - 1;
13355 this.forEachPositionInput(position, function (element) { return _this.resetInput(element); });
13356 this.addChangedListeners(eType, position);
13357 };
13358 SimpleFilter.prototype.createJoinOperatorPanel = function () {
13359 var eJoinOperatorPanel = document.createElement('div');
13360 this.eJoinOperatorPanels.push(eJoinOperatorPanel);
13361 eJoinOperatorPanel.classList.add('ag-filter-condition');
13362 var eJoinOperatorAnd = this.createJoinOperator(this.eJoinOperatorsAnd, eJoinOperatorPanel, 'and');
13363 var eJoinOperatorOr = this.createJoinOperator(this.eJoinOperatorsOr, eJoinOperatorPanel, 'or');
13364 this.eFilterBody.appendChild(eJoinOperatorPanel);
13365 var index = this.eJoinOperatorPanels.length - 1;
13366 var uniqueGroupId = this.joinOperatorId++;
13367 this.resetJoinOperatorAnd(eJoinOperatorAnd, index, uniqueGroupId);
13368 this.resetJoinOperatorOr(eJoinOperatorOr, index, uniqueGroupId);
13369 if (!this.isReadOnly()) {
13370 eJoinOperatorAnd.onValueChange(this.listener);
13371 eJoinOperatorOr.onValueChange(this.listener);
13372 }
13373 };
13374 SimpleFilter.prototype.createJoinOperator = function (eJoinOperators, eJoinOperatorPanel, andOr) {
13375 var eJoinOperator = this.createManagedBean(new _widgets_agRadioButton__WEBPACK_IMPORTED_MODULE_4__["AgRadioButton"]());
13376 eJoinOperators.push(eJoinOperator);
13377 eJoinOperator.addCssClass('ag-filter-condition-operator');
13378 eJoinOperator.addCssClass("ag-filter-condition-operator-" + andOr);
13379 eJoinOperatorPanel.appendChild(eJoinOperator.getGui());
13380 return eJoinOperator;
13381 };
13382 SimpleFilter.prototype.getDefaultJoinOperator = function (defaultJoinOperator) {
13383 return defaultJoinOperator === 'AND' || defaultJoinOperator === 'OR' ? defaultJoinOperator : 'AND';
13384 };
13385 SimpleFilter.prototype.putOptionsIntoDropdown = function (eType) {
13386 var _this = this;
13387 var filterOptions = this.optionsFactory.getFilterOptions();
13388 // Add specified options to all condition drop-downs.
13389 filterOptions.forEach(function (option) {
13390 var listOption = typeof option === 'string' ?
13391 _this.createBoilerplateListOption(option) :
13392 _this.createCustomListOption(option);
13393 eType.addOption(listOption);
13394 });
13395 // Make drop-downs read-only if there is only one option.
13396 eType.setDisabled(filterOptions.length <= 1);
13397 };
13398 SimpleFilter.prototype.createBoilerplateListOption = function (option) {
13399 return { value: option, text: this.translate(option) };
13400 };
13401 SimpleFilter.prototype.createCustomListOption = function (option) {
13402 var displayKey = option.displayKey;
13403 var customOption = this.optionsFactory.getCustomOption(option.displayKey);
13404 return {
13405 value: displayKey,
13406 text: customOption ?
13407 this.localeService.getLocaleTextFunc()(customOption.displayKey, customOption.displayName) :
13408 this.translate(displayKey),
13409 };
13410 };
13411 /**
13412 * @deprecated As of v29.2 filters can have more than two conditions. Check `colDef.filterParams.maxNumConditions` instead.
13413 */
13414 SimpleFilter.prototype.isAllowTwoConditions = function () {
13415 return this.maxNumConditions >= 2;
13416 };
13417 SimpleFilter.prototype.createBodyTemplate = function () {
13418 // created dynamically
13419 return '';
13420 };
13421 SimpleFilter.prototype.getCssIdentifier = function () {
13422 return 'simple-filter';
13423 };
13424 SimpleFilter.prototype.updateUiVisibility = function () {
13425 var joinOperator = this.getJoinOperator();
13426 this.updateNumConditions();
13427 // from here, the number of elements in all the collections is correct, so can just update the values/statuses
13428 this.updateConditionStatusesAndValues(this.lastUiCompletePosition, joinOperator);
13429 };
13430 SimpleFilter.prototype.updateNumConditions = function () {
13431 var _a;
13432 // Collection sizes are already correct if updated via API, so only need to handle UI updates here
13433 var lastUiCompletePosition = -1;
13434 var areAllConditionsUiComplete = true;
13435 for (var position = 0; position < this.getNumConditions(); position++) {
13436 if (this.isConditionUiComplete(position)) {
13437 lastUiCompletePosition = position;
13438 }
13439 else {
13440 areAllConditionsUiComplete = false;
13441 }
13442 }
13443 if (this.shouldAddNewConditionAtEnd(areAllConditionsUiComplete)) {
13444 this.createJoinOperatorPanel();
13445 this.createOption();
13446 }
13447 else {
13448 var activePosition = (_a = this.lastUiCompletePosition) !== null && _a !== void 0 ? _a : this.getNumConditions() - 2;
13449 if (lastUiCompletePosition < activePosition) {
13450 // remove any incomplete conditions at the end, excluding the active position
13451 this.removeConditionsAndOperators(activePosition + 1);
13452 var removeStartPosition = lastUiCompletePosition + 1;
13453 var numConditionsToRemove = activePosition - removeStartPosition;
13454 if (numConditionsToRemove > 0) {
13455 this.removeConditionsAndOperators(removeStartPosition, numConditionsToRemove);
13456 }
13457 this.createMissingConditionsAndOperators();
13458 }
13459 }
13460 this.lastUiCompletePosition = lastUiCompletePosition;
13461 };
13462 SimpleFilter.prototype.updateConditionStatusesAndValues = function (lastUiCompletePosition, joinOperator) {
13463 var _this = this;
13464 this.eTypes.forEach(function (eType, position) {
13465 var disabled = _this.isConditionDisabled(position, lastUiCompletePosition);
13466 var group = position === 1 ? [eType, _this.eJoinOperatorPanels[0], _this.eJoinOperatorsAnd[0], _this.eJoinOperatorsOr[0]] : [eType];
13467 group.forEach(function (element) {
13468 if (element instanceof _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_9__["AgAbstractInputField"] || element instanceof _widgets_agSelect__WEBPACK_IMPORTED_MODULE_3__["AgSelect"]) {
13469 element.setDisabled(disabled);
13470 }
13471 else {
13472 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["setDisabled"])(element, disabled);
13473 }
13474 });
13475 });
13476 this.eConditionBodies.forEach(function (element, index) {
13477 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["setDisplayed"])(element, _this.isConditionBodyVisible(index));
13478 });
13479 var orChecked = (joinOperator !== null && joinOperator !== void 0 ? joinOperator : this.getJoinOperator()) === 'OR';
13480 this.eJoinOperatorsAnd.forEach(function (eJoinOperatorAnd, index) {
13481 eJoinOperatorAnd.setValue(!orChecked, true);
13482 });
13483 this.eJoinOperatorsOr.forEach(function (eJoinOperatorOr, index) {
13484 eJoinOperatorOr.setValue(orChecked, true);
13485 });
13486 this.forEachInput(function (element, index, position, numberOfInputs) {
13487 _this.setElementDisplayed(element, index < numberOfInputs);
13488 _this.setElementDisabled(element, _this.isConditionDisabled(position, lastUiCompletePosition));
13489 });
13490 this.resetPlaceholder();
13491 };
13492 SimpleFilter.prototype.shouldAddNewConditionAtEnd = function (areAllConditionsUiComplete) {
13493 return areAllConditionsUiComplete && this.getNumConditions() < this.maxNumConditions && !this.isReadOnly();
13494 };
13495 SimpleFilter.prototype.removeConditionsAndOperators = function (startPosition, deleteCount) {
13496 if (startPosition >= this.getNumConditions()) {
13497 return;
13498 }
13499 this.removeComponents(this.eTypes, startPosition, deleteCount);
13500 this.removeElements(this.eConditionBodies, startPosition, deleteCount);
13501 this.removeValueElements(startPosition, deleteCount);
13502 var joinOperatorIndex = Math.max(startPosition - 1, 0);
13503 this.removeElements(this.eJoinOperatorPanels, joinOperatorIndex, deleteCount);
13504 this.removeComponents(this.eJoinOperatorsAnd, joinOperatorIndex, deleteCount);
13505 this.removeComponents(this.eJoinOperatorsOr, joinOperatorIndex, deleteCount);
13506 };
13507 SimpleFilter.prototype.removeElements = function (elements, startPosition, deleteCount) {
13508 var removedElements = this.removeItems(elements, startPosition, deleteCount);
13509 removedElements.forEach(function (element) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["removeFromParent"])(element); });
13510 };
13511 SimpleFilter.prototype.removeComponents = function (components, startPosition, deleteCount) {
13512 var _this = this;
13513 var removedComponents = this.removeItems(components, startPosition, deleteCount);
13514 removedComponents.forEach(function (comp) {
13515 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["removeFromParent"])(comp.getGui());
13516 _this.destroyBean(comp);
13517 });
13518 };
13519 SimpleFilter.prototype.removeItems = function (items, startPosition, deleteCount) {
13520 return deleteCount == null ? items.splice(startPosition) : items.splice(startPosition, deleteCount);
13521 };
13522 SimpleFilter.prototype.afterGuiAttached = function (params) {
13523 _super.prototype.afterGuiAttached.call(this, params);
13524 this.resetPlaceholder();
13525 if (!params || (!params.suppressFocus && !this.isReadOnly())) {
13526 var firstInput = this.getInputs(0)[0];
13527 if (!firstInput) {
13528 return;
13529 }
13530 if (firstInput instanceof _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_9__["AgAbstractInputField"]) {
13531 firstInput.getInputElement().focus();
13532 }
13533 }
13534 };
13535 SimpleFilter.prototype.afterGuiDetached = function () {
13536 _super.prototype.afterGuiDetached.call(this);
13537 var appliedModel = this.getModel();
13538 if (!this.areModelsEqual(appliedModel, this.getModelFromUi())) {
13539 this.resetUiToActiveModel(appliedModel);
13540 }
13541 // remove incomplete positions
13542 var lastUiCompletePosition = -1;
13543 // as we remove incomplete positions, the last UI complete position will change
13544 var updatedLastUiCompletePosition = -1;
13545 var conditionsRemoved = false;
13546 var joinOperator = this.getJoinOperator();
13547 for (var position = this.getNumConditions() - 1; position >= 0; position--) {
13548 if (this.isConditionUiComplete(position)) {
13549 if (lastUiCompletePosition === -1) {
13550 lastUiCompletePosition = position;
13551 updatedLastUiCompletePosition = position;
13552 }
13553 }
13554 else {
13555 var shouldRemovePositionAtEnd = position >= this.numAlwaysVisibleConditions && !this.isConditionUiComplete(position - 1);
13556 var positionBeforeLastUiCompletePosition = position < lastUiCompletePosition;
13557 if (shouldRemovePositionAtEnd || positionBeforeLastUiCompletePosition) {
13558 this.removeConditionsAndOperators(position, 1);
13559 conditionsRemoved = true;
13560 if (positionBeforeLastUiCompletePosition) {
13561 updatedLastUiCompletePosition--;
13562 }
13563 }
13564 }
13565 }
13566 var shouldUpdateConditionStatusesAndValues = false;
13567 if (this.getNumConditions() < this.numAlwaysVisibleConditions) {
13568 // if conditions have been removed, need to recreate new ones at the end up to the number required
13569 this.createMissingConditionsAndOperators();
13570 shouldUpdateConditionStatusesAndValues = true;
13571 }
13572 if (this.shouldAddNewConditionAtEnd(updatedLastUiCompletePosition === this.getNumConditions() - 1)) {
13573 this.createJoinOperatorPanel();
13574 this.createOption();
13575 shouldUpdateConditionStatusesAndValues = true;
13576 }
13577 if (shouldUpdateConditionStatusesAndValues) {
13578 this.updateConditionStatusesAndValues(updatedLastUiCompletePosition, joinOperator);
13579 }
13580 if (conditionsRemoved) {
13581 this.updateJoinOperatorsDisabled();
13582 }
13583 this.lastUiCompletePosition = updatedLastUiCompletePosition;
13584 };
13585 SimpleFilter.prototype.getPlaceholderText = function (defaultPlaceholder, position) {
13586 var placeholder = this.translate(defaultPlaceholder);
13587 if (Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["isFunction"])(this.filterPlaceholder)) {
13588 var filterPlaceholderFn = this.filterPlaceholder;
13589 var filterOptionKey = this.eTypes[position].getValue();
13590 var filterOption = this.translate(filterOptionKey);
13591 placeholder = filterPlaceholderFn({
13592 filterOptionKey: filterOptionKey,
13593 filterOption: filterOption,
13594 placeholder: placeholder
13595 });
13596 }
13597 else if (typeof this.filterPlaceholder === 'string') {
13598 placeholder = this.filterPlaceholder;
13599 }
13600 return placeholder;
13601 };
13602 // allow sub-classes to reset HTML placeholders after UI update.
13603 SimpleFilter.prototype.resetPlaceholder = function () {
13604 var _this = this;
13605 var globalTranslate = this.localeService.getLocaleTextFunc();
13606 this.forEachInput(function (element, index, position, numberOfInputs) {
13607 if (!(element instanceof _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_9__["AgAbstractInputField"])) {
13608 return;
13609 }
13610 var placeholder = index === 0 && numberOfInputs > 1 ? 'inRangeStart' :
13611 index === 0 ? 'filterOoo' :
13612 'inRangeEnd';
13613 var ariaLabel = index === 0 && numberOfInputs > 1 ? globalTranslate('ariaFilterFromValue', 'Filter from value') :
13614 index === 0 ? globalTranslate('ariaFilterValue', 'Filter Value') :
13615 globalTranslate('ariaFilterToValue', 'Filter to Value');
13616 element.setInputPlaceholder(_this.getPlaceholderText(placeholder, position));
13617 element.setInputAriaLabel(ariaLabel);
13618 });
13619 };
13620 SimpleFilter.prototype.setElementValue = function (element, value) {
13621 if (element instanceof _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_9__["AgAbstractInputField"]) {
13622 element.setValue(value != null ? String(value) : null, true);
13623 }
13624 };
13625 SimpleFilter.prototype.setElementDisplayed = function (element, displayed) {
13626 if (element instanceof _widgets_component__WEBPACK_IMPORTED_MODULE_8__["Component"]) {
13627 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["setDisplayed"])(element.getGui(), displayed);
13628 }
13629 };
13630 SimpleFilter.prototype.setElementDisabled = function (element, disabled) {
13631 if (element instanceof _widgets_component__WEBPACK_IMPORTED_MODULE_8__["Component"]) {
13632 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["setDisabled"])(element.getGui(), disabled);
13633 }
13634 };
13635 SimpleFilter.prototype.attachElementOnChange = function (element, listener) {
13636 if (element instanceof _widgets_agAbstractInputField__WEBPACK_IMPORTED_MODULE_9__["AgAbstractInputField"]) {
13637 element.onValueChange(listener);
13638 }
13639 };
13640 SimpleFilter.prototype.forEachInput = function (cb) {
13641 var _this = this;
13642 this.getConditionTypes().forEach(function (type, position) {
13643 _this.forEachPositionTypeInput(position, type, cb);
13644 });
13645 };
13646 SimpleFilter.prototype.forEachPositionInput = function (position, cb) {
13647 var type = this.getConditionType(position);
13648 this.forEachPositionTypeInput(position, type, cb);
13649 };
13650 SimpleFilter.prototype.forEachPositionTypeInput = function (position, type, cb) {
13651 var numberOfInputs = this.getNumberOfInputs(type);
13652 var inputs = this.getInputs(position);
13653 for (var index = 0; index < inputs.length; index++) {
13654 var input = inputs[index];
13655 if (input != null) {
13656 cb(input, index, position, numberOfInputs);
13657 }
13658 }
13659 };
13660 SimpleFilter.prototype.isConditionDisabled = function (position, lastUiCompletePosition) {
13661 if (this.isReadOnly()) {
13662 return true;
13663 } // Read-only mode trumps everything.
13664 if (position === 0) {
13665 return false;
13666 } // Position 0 should typically be editable.
13667 // Only allow editing of a 2nd or later condition if the previous condition is complete and no subsequent conditions are complete.
13668 return position > lastUiCompletePosition + 1;
13669 };
13670 SimpleFilter.prototype.isConditionBodyVisible = function (position) {
13671 // Check that the condition needs inputs.
13672 var type = this.getConditionType(position);
13673 var numberOfInputs = this.getNumberOfInputs(type);
13674 return numberOfInputs > 0;
13675 };
13676 // returns true if the UI represents a working filter, eg all parts are filled out.
13677 // eg if text filter and textfield blank then returns false.
13678 SimpleFilter.prototype.isConditionUiComplete = function (position) {
13679 if (position >= this.getNumConditions()) {
13680 return false;
13681 } // Condition doesn't exist.
13682 var type = this.getConditionType(position);
13683 if (type === SimpleFilter.EMPTY) {
13684 return false;
13685 }
13686 if (this.getValues(position).some(function (v) { return v == null; })) {
13687 return false;
13688 }
13689 return true;
13690 };
13691 SimpleFilter.prototype.getNumConditions = function () {
13692 return this.eTypes.length;
13693 };
13694 SimpleFilter.prototype.getUiCompleteConditions = function () {
13695 var conditions = [];
13696 for (var position = 0; position < this.getNumConditions(); position++) {
13697 if (this.isConditionUiComplete(position)) {
13698 conditions.push(this.createCondition(position));
13699 }
13700 }
13701 return conditions;
13702 };
13703 SimpleFilter.prototype.createMissingConditionsAndOperators = function () {
13704 if (this.isReadOnly()) {
13705 return;
13706 } // don't show incomplete conditions when read only
13707 for (var i = this.getNumConditions(); i < this.numAlwaysVisibleConditions; i++) {
13708 this.createJoinOperatorPanel();
13709 this.createOption();
13710 }
13711 };
13712 SimpleFilter.prototype.resetUiToDefaults = function (silent) {
13713 var _this = this;
13714 this.removeConditionsAndOperators(this.isReadOnly() ? 1 : this.numAlwaysVisibleConditions);
13715 this.eTypes.forEach(function (eType) { return _this.resetType(eType); });
13716 this.eJoinOperatorsAnd.forEach(function (eJoinOperatorAnd, index) { return _this.resetJoinOperatorAnd(eJoinOperatorAnd, index, _this.joinOperatorId + index); });
13717 this.eJoinOperatorsOr.forEach(function (eJoinOperatorOr, index) { return _this.resetJoinOperatorOr(eJoinOperatorOr, index, _this.joinOperatorId + index); });
13718 this.joinOperatorId++;
13719 this.forEachInput(function (element) { return _this.resetInput(element); });
13720 this.resetPlaceholder();
13721 this.createMissingConditionsAndOperators();
13722 this.lastUiCompletePosition = null;
13723 if (!silent) {
13724 this.onUiChanged();
13725 }
13726 return _utils__WEBPACK_IMPORTED_MODULE_2__["AgPromise"].resolve();
13727 };
13728 SimpleFilter.prototype.resetType = function (eType) {
13729 var translate = this.localeService.getLocaleTextFunc();
13730 var filteringLabel = translate('ariaFilteringOperator', 'Filtering operator');
13731 eType
13732 .setValue(this.optionsFactory.getDefaultOption(), true)
13733 .setAriaLabel(filteringLabel)
13734 .setDisabled(this.isReadOnly());
13735 };
13736 SimpleFilter.prototype.resetJoinOperatorAnd = function (eJoinOperatorAnd, index, uniqueGroupId) {
13737 this.resetJoinOperator(eJoinOperatorAnd, index, this.isDefaultOperator('AND'), this.translate('andCondition'), uniqueGroupId);
13738 };
13739 SimpleFilter.prototype.resetJoinOperatorOr = function (eJoinOperatorOr, index, uniqueGroupId) {
13740 this.resetJoinOperator(eJoinOperatorOr, index, this.isDefaultOperator('OR'), this.translate('orCondition'), uniqueGroupId);
13741 };
13742 SimpleFilter.prototype.resetJoinOperator = function (eJoinOperator, index, value, label, uniqueGroupId) {
13743 this.updateJoinOperatorDisabled(eJoinOperator
13744 .setValue(value, true)
13745 .setName("ag-simple-filter-and-or-" + this.getCompId() + "-" + uniqueGroupId)
13746 .setLabel(label), index);
13747 };
13748 SimpleFilter.prototype.updateJoinOperatorsDisabled = function () {
13749 var _this = this;
13750 this.eJoinOperatorsAnd.forEach(function (eJoinOperator, index) { return _this.updateJoinOperatorDisabled(eJoinOperator, index); });
13751 this.eJoinOperatorsOr.forEach(function (eJoinOperator, index) { return _this.updateJoinOperatorDisabled(eJoinOperator, index); });
13752 };
13753 SimpleFilter.prototype.updateJoinOperatorDisabled = function (eJoinOperator, index) {
13754 eJoinOperator.setDisabled(this.isReadOnly() || index > 0);
13755 };
13756 SimpleFilter.prototype.resetInput = function (element) {
13757 this.setElementValue(element, null);
13758 this.setElementDisabled(element, this.isReadOnly());
13759 };
13760 // puts model values into the UI
13761 SimpleFilter.prototype.setConditionIntoUi = function (model, position) {
13762 var _this = this;
13763 var values = this.mapValuesFromModel(model);
13764 this.forEachInput(function (element, index, elPosition, _) {
13765 if (elPosition !== position) {
13766 return;
13767 }
13768 _this.setElementValue(element, values[index] != null ? values[index] : null);
13769 });
13770 };
13771 // after floating filter changes, this sets the 'value' section. this is implemented by the base class
13772 // (as that's where value is controlled), the 'type' part from the floating filter is dealt with in this class.
13773 SimpleFilter.prototype.setValueFromFloatingFilter = function (value) {
13774 var _this = this;
13775 this.forEachInput(function (element, index, position, _) {
13776 _this.setElementValue(element, index === 0 && position === 0 ? value : null);
13777 });
13778 };
13779 SimpleFilter.prototype.isDefaultOperator = function (operator) {
13780 return operator === this.defaultJoinOperator;
13781 };
13782 SimpleFilter.prototype.addChangedListeners = function (eType, position) {
13783 var _this = this;
13784 if (this.isReadOnly()) {
13785 return;
13786 }
13787 eType.onValueChange(this.listener);
13788 this.forEachPositionInput(position, function (element) {
13789 _this.attachElementOnChange(element, _this.listener);
13790 });
13791 };
13792 /** returns true if the row passes the said condition */
13793 SimpleFilter.prototype.individualConditionPasses = function (params, filterModel) {
13794 var cellValue = this.getCellValue(params.node);
13795 var values = this.mapValuesFromModel(filterModel);
13796 var customFilterOption = this.optionsFactory.getCustomOption(filterModel.type);
13797 var customFilterResult = this.evaluateCustomFilter(customFilterOption, values, cellValue);
13798 if (customFilterResult != null) {
13799 return customFilterResult;
13800 }
13801 if (cellValue == null) {
13802 return this.evaluateNullValue(filterModel.type);
13803 }
13804 return this.evaluateNonNullValue(values, cellValue, filterModel, params);
13805 };
13806 SimpleFilter.prototype.evaluateCustomFilter = function (customFilterOption, values, cellValue) {
13807 if (customFilterOption == null) {
13808 return;
13809 }
13810 var predicate = customFilterOption.predicate;
13811 // only execute the custom filter if a value exists or a value isn't required, i.e. input is hidden
13812 if (predicate != null && !values.some(function (v) { return v == null; })) {
13813 return predicate(values, cellValue);
13814 }
13815 // No custom filter invocation, indicate that to the caller.
13816 return;
13817 };
13818 SimpleFilter.prototype.isBlank = function (cellValue) {
13819 return cellValue == null ||
13820 (typeof cellValue === 'string' && cellValue.trim().length === 0);
13821 };
13822 SimpleFilter.EMPTY = 'empty';
13823 SimpleFilter.BLANK = 'blank';
13824 SimpleFilter.NOT_BLANK = 'notBlank';
13825 SimpleFilter.EQUALS = 'equals';
13826 SimpleFilter.NOT_EQUAL = 'notEqual';
13827 SimpleFilter.LESS_THAN = 'lessThan';
13828 SimpleFilter.LESS_THAN_OR_EQUAL = 'lessThanOrEqual';
13829 SimpleFilter.GREATER_THAN = 'greaterThan';
13830 SimpleFilter.GREATER_THAN_OR_EQUAL = 'greaterThanOrEqual';
13831 SimpleFilter.IN_RANGE = 'inRange';
13832 SimpleFilter.CONTAINS = 'contains';
13833 SimpleFilter.NOT_CONTAINS = 'notContains';
13834 SimpleFilter.STARTS_WITH = 'startsWith';
13835 SimpleFilter.ENDS_WITH = 'endsWith';
13836 return SimpleFilter;
13837}(_providedFilter__WEBPACK_IMPORTED_MODULE_1__["ProvidedFilter"]));
13838
13839
13840
13841/***/ }),
13842/* 61 */
13843/***/ (function(module, __webpack_exports__, __webpack_require__) {
13844
13845"use strict";
13846__webpack_require__.r(__webpack_exports__);
13847/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OptionsFactory", function() { return OptionsFactory; });
13848/**
13849 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
13850 * @version v29.2.0
13851 * @link https://www.ag-grid.com/
13852 * @license MIT
13853 */
13854var __assign = (undefined && undefined.__assign) || function () {
13855 __assign = Object.assign || function(t) {
13856 for (var s, i = 1, n = arguments.length; i < n; i++) {
13857 s = arguments[i];
13858 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
13859 t[p] = s[p];
13860 }
13861 return t;
13862 };
13863 return __assign.apply(this, arguments);
13864};
13865/* Common logic for options, used by both filters and floating filters. */
13866var OptionsFactory = /** @class */ (function () {
13867 function OptionsFactory() {
13868 this.customFilterOptions = {};
13869 }
13870 OptionsFactory.prototype.init = function (params, defaultOptions) {
13871 this.filterOptions = params.filterOptions || defaultOptions;
13872 this.mapCustomOptions();
13873 this.selectDefaultItem(params);
13874 this.checkForDeprecatedParams();
13875 };
13876 OptionsFactory.prototype.checkForDeprecatedParams = function () {
13877 if (this.filterOptions.some(function (opt) { return typeof opt != 'string' && opt.test != null; })) {
13878 console.warn("AG Grid: [IFilterOptionDef] since v26.2.0, test() has been replaced with predicate().");
13879 }
13880 if (this.filterOptions.some(function (opt) { return typeof opt != 'string' && opt.hideFilterInput != null; })) {
13881 console.warn("AG Grid: [IFilterOptionDef] since v26.2.0, useOfHideFilterInput has been replaced with numberOfInputs.");
13882 }
13883 };
13884 OptionsFactory.prototype.getFilterOptions = function () {
13885 return this.filterOptions;
13886 };
13887 OptionsFactory.prototype.mapCustomOptions = function () {
13888 var _this = this;
13889 if (!this.filterOptions) {
13890 return;
13891 }
13892 this.filterOptions.forEach(function (filterOption) {
13893 if (typeof filterOption === 'string') {
13894 return;
13895 }
13896 var requiredProperties = [['displayKey'], ['displayName'], ['predicate', 'test']];
13897 var propertyCheck = function (keys) {
13898 if (!keys.some(function (key) { return filterOption[key] != null; })) {
13899 console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '" + keys + "'");
13900 return false;
13901 }
13902 return true;
13903 };
13904 if (!requiredProperties.every(propertyCheck)) {
13905 _this.filterOptions = _this.filterOptions.filter(function (v) { return v === filterOption; }) || [];
13906 return;
13907 }
13908 var test = filterOption.test;
13909 var mutatedFilterOptions = __assign({}, filterOption);
13910 if (test != null && filterOption.predicate == null) {
13911 mutatedFilterOptions.predicate = function (v, cv) { return test(v[0], cv); };
13912 delete mutatedFilterOptions.test;
13913 }
13914 if (mutatedFilterOptions.hideFilterInput && mutatedFilterOptions.numberOfInputs == null) {
13915 mutatedFilterOptions.numberOfInputs = 0;
13916 delete mutatedFilterOptions.hideFilterInput;
13917 }
13918 _this.customFilterOptions[filterOption.displayKey] = mutatedFilterOptions;
13919 });
13920 };
13921 OptionsFactory.prototype.selectDefaultItem = function (params) {
13922 if (params.defaultOption) {
13923 this.defaultOption = params.defaultOption;
13924 }
13925 else if (this.filterOptions.length >= 1) {
13926 var firstFilterOption = this.filterOptions[0];
13927 if (typeof firstFilterOption === 'string') {
13928 this.defaultOption = firstFilterOption;
13929 }
13930 else if (firstFilterOption.displayKey) {
13931 this.defaultOption = firstFilterOption.displayKey;
13932 }
13933 else {
13934 console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'");
13935 }
13936 }
13937 else {
13938 console.warn('AG Grid: no filter options for filter');
13939 }
13940 };
13941 OptionsFactory.prototype.getDefaultOption = function () {
13942 return this.defaultOption;
13943 };
13944 OptionsFactory.prototype.getCustomOption = function (name) {
13945 return this.customFilterOptions[name];
13946 };
13947 return OptionsFactory;
13948}());
13949
13950
13951
13952/***/ }),
13953/* 62 */
13954/***/ (function(module, __webpack_exports__, __webpack_require__) {
13955
13956"use strict";
13957__webpack_require__.r(__webpack_exports__);
13958/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProvidedFilter", function() { return ProvidedFilter; });
13959/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
13960/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
13961/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
13962/* harmony import */ var _filterLocaleText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63);
13963/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(64);
13964/* harmony import */ var _utils_set__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(51);
13965/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38);
13966/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(57);
13967/* harmony import */ var _rendering_features_positionableFeature__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65);
13968/**
13969 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
13970 * @version v29.2.0
13971 * @link https://www.ag-grid.com/
13972 * @license MIT
13973 */
13974var __extends = (undefined && undefined.__extends) || (function () {
13975 var extendStatics = function (d, b) {
13976 extendStatics = Object.setPrototypeOf ||
13977 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
13978 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
13979 return extendStatics(d, b);
13980 };
13981 return function (d, b) {
13982 extendStatics(d, b);
13983 function __() { this.constructor = d; }
13984 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13985 };
13986})();
13987var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
13988 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
13989 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
13990 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;
13991 return c > 3 && r && Object.defineProperty(target, key, r), r;
13992};
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002/**
14003 * Contains common logic to all provided filters (apply button, clear button, etc).
14004 * All the filters that come with AG Grid extend this class. User filters do not
14005 * extend this class.
14006 *
14007 * @param M type of filter-model managed by the concrete sub-class that extends this type
14008 * @param V type of value managed by the concrete sub-class that extends this type
14009 */
14010var ProvidedFilter = /** @class */ (function (_super) {
14011 __extends(ProvidedFilter, _super);
14012 function ProvidedFilter(filterNameKey) {
14013 var _this = _super.call(this) || this;
14014 _this.filterNameKey = filterNameKey;
14015 _this.applyActive = false;
14016 _this.hidePopup = null;
14017 _this.debouncePending = false;
14018 // after the user hits 'apply' the model gets copied to here. this is then the model that we use for
14019 // all filtering. so if user changes UI but doesn't hit apply, then the UI will be out of sync with this model.
14020 // this is what we want, as the UI should only become the 'active' filter once it's applied. when apply is
14021 // inactive, this model will be in sync (following the debounce ms). if the UI is not a valid filter
14022 // (eg the value is missing so nothing to filter on, or for set filter all checkboxes are checked so filter
14023 // not active) then this appliedModel will be null/undefined.
14024 _this.appliedModel = null;
14025 return _this;
14026 }
14027 ProvidedFilter.prototype.postConstruct = function () {
14028 this.resetTemplate(); // do this first to create the DOM
14029 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_4__["ManagedFocusFeature"](this.getFocusableElement(), {
14030 handleKeyDown: this.handleKeyDown.bind(this)
14031 }));
14032 this.positionableFeature = new _rendering_features_positionableFeature__WEBPACK_IMPORTED_MODULE_8__["PositionableFeature"](this.getPositionableElement(), { forcePopupParentAsOffsetParent: true });
14033 this.createBean(this.positionableFeature);
14034 };
14035 // override
14036 ProvidedFilter.prototype.handleKeyDown = function (e) { };
14037 ProvidedFilter.prototype.getFilterTitle = function () {
14038 return this.translate(this.filterNameKey);
14039 };
14040 ProvidedFilter.prototype.isFilterActive = function () {
14041 // filter is active if we have a valid applied model
14042 return !!this.appliedModel;
14043 };
14044 ProvidedFilter.prototype.resetTemplate = function (paramsMap) {
14045 var eGui = this.getGui();
14046 if (eGui) {
14047 eGui.removeEventListener('submit', this.onFormSubmit);
14048 }
14049 var templateString = /* html */ "\n <form class=\"ag-filter-wrapper\">\n <div class=\"ag-filter-body-wrapper ag-" + this.getCssIdentifier() + "-body-wrapper\" ref=\"eFilterBody\">\n " + this.createBodyTemplate() + "\n </div>\n </form>";
14050 this.setTemplate(templateString, paramsMap);
14051 eGui = this.getGui();
14052 if (eGui) {
14053 eGui.addEventListener('submit', this.onFormSubmit);
14054 }
14055 };
14056 ProvidedFilter.prototype.isReadOnly = function () {
14057 return !!this.providedFilterParams.readOnly;
14058 };
14059 ProvidedFilter.prototype.init = function (params) {
14060 var _this = this;
14061 this.setParams(params);
14062 this.resetUiToDefaults(true).then(function () {
14063 _this.updateUiVisibility();
14064 _this.setupOnBtApplyDebounce();
14065 });
14066 };
14067 ProvidedFilter.prototype.setParams = function (params) {
14068 this.providedFilterParams = params;
14069 this.applyActive = ProvidedFilter.isUseApplyButton(params);
14070 this.createButtonPanel();
14071 };
14072 ProvidedFilter.prototype.createButtonPanel = function () {
14073 var _this = this;
14074 var buttons = this.providedFilterParams.buttons;
14075 if (!buttons || buttons.length < 1 || this.isReadOnly()) {
14076 return;
14077 }
14078 var eButtonsPanel = document.createElement('div');
14079 eButtonsPanel.classList.add('ag-filter-apply-panel');
14080 var addButton = function (type) {
14081 var text;
14082 var clickListener;
14083 switch (type) {
14084 case 'apply':
14085 text = _this.translate('applyFilter');
14086 clickListener = function (e) { return _this.onBtApply(false, false, e); };
14087 break;
14088 case 'clear':
14089 text = _this.translate('clearFilter');
14090 clickListener = function () { return _this.onBtClear(); };
14091 break;
14092 case 'reset':
14093 text = _this.translate('resetFilter');
14094 clickListener = function () { return _this.onBtReset(); };
14095 break;
14096 case 'cancel':
14097 text = _this.translate('cancelFilter');
14098 clickListener = function (e) { _this.onBtCancel(e); };
14099 break;
14100 default:
14101 console.warn('AG Grid: Unknown button type specified');
14102 return;
14103 }
14104 var buttonType = type === 'apply' ? 'submit' : 'button';
14105 var button = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["loadTemplate"])(
14106 /* html */
14107 "<button\n type=\"" + buttonType + "\"\n ref=\"" + type + "FilterButton\"\n class=\"ag-standard-button ag-filter-apply-panel-button\"\n >" + text + "\n </button>");
14108 eButtonsPanel.appendChild(button);
14109 _this.addManagedListener(button, 'click', clickListener);
14110 };
14111 Object(_utils_set__WEBPACK_IMPORTED_MODULE_5__["convertToSet"])(buttons).forEach(function (type) { return addButton(type); });
14112 this.getGui().appendChild(eButtonsPanel);
14113 };
14114 // subclasses can override this to provide alternative debounce defaults
14115 ProvidedFilter.prototype.getDefaultDebounceMs = function () {
14116 return 0;
14117 };
14118 ProvidedFilter.prototype.setupOnBtApplyDebounce = function () {
14119 var _this = this;
14120 var debounceMs = ProvidedFilter.getDebounceMs(this.providedFilterParams, this.getDefaultDebounceMs());
14121 var debounceFunc = Object(_utils_function__WEBPACK_IMPORTED_MODULE_2__["debounce"])(this.checkApplyDebounce.bind(this), debounceMs);
14122 this.onBtApplyDebounce = function () {
14123 _this.debouncePending = true;
14124 debounceFunc();
14125 };
14126 };
14127 ProvidedFilter.prototype.checkApplyDebounce = function () {
14128 if (this.debouncePending) {
14129 // May already have been applied, so don't apply again (e.g. closing filter before debounce timeout)
14130 this.debouncePending = false;
14131 this.onBtApply();
14132 }
14133 };
14134 ProvidedFilter.prototype.getModel = function () {
14135 return this.appliedModel ? this.appliedModel : null;
14136 };
14137 ProvidedFilter.prototype.setModel = function (model) {
14138 var _this = this;
14139 var promise = model != null ? this.setModelIntoUi(model) : this.resetUiToDefaults();
14140 return promise.then(function () {
14141 _this.updateUiVisibility();
14142 // we set the model from the GUI, rather than the provided model,
14143 // so the model is consistent, e.g. handling of null/undefined will be the same,
14144 // or if model is case insensitive, then casing is removed.
14145 _this.applyModel('api');
14146 });
14147 };
14148 ProvidedFilter.prototype.onBtCancel = function (e) {
14149 var _this = this;
14150 this.resetUiToActiveModel(this.getModel(), function () {
14151 if (_this.providedFilterParams.closeOnApply) {
14152 _this.close(e);
14153 }
14154 });
14155 };
14156 ProvidedFilter.prototype.resetUiToActiveModel = function (currentModel, afterUiUpdatedFunc) {
14157 var _this = this;
14158 var afterAppliedFunc = function () {
14159 _this.onUiChanged(false, 'prevent');
14160 afterUiUpdatedFunc === null || afterUiUpdatedFunc === void 0 ? void 0 : afterUiUpdatedFunc();
14161 };
14162 if (currentModel != null) {
14163 this.setModelIntoUi(currentModel).then(afterAppliedFunc);
14164 }
14165 else {
14166 this.resetUiToDefaults().then(afterAppliedFunc);
14167 }
14168 };
14169 ProvidedFilter.prototype.onBtClear = function () {
14170 var _this = this;
14171 this.resetUiToDefaults().then(function () { return _this.onUiChanged(); });
14172 };
14173 ProvidedFilter.prototype.onBtReset = function () {
14174 this.onBtClear();
14175 this.onBtApply();
14176 };
14177 /**
14178 * Applies changes made in the UI to the filter, and returns true if the model has changed.
14179 */
14180 ProvidedFilter.prototype.applyModel = function (source) {
14181 if (source === void 0) { source = 'api'; }
14182 var newModel = this.getModelFromUi();
14183 if (!this.isModelValid(newModel)) {
14184 return false;
14185 }
14186 var previousModel = this.appliedModel;
14187 this.appliedModel = newModel;
14188 // models can be same if user pasted same content into text field, or maybe just changed the case
14189 // and it's a case insensitive filter
14190 return !this.areModelsEqual(previousModel, newModel);
14191 };
14192 ProvidedFilter.prototype.isModelValid = function (model) {
14193 return true;
14194 };
14195 ProvidedFilter.prototype.onFormSubmit = function (e) {
14196 e.preventDefault();
14197 };
14198 ProvidedFilter.prototype.onBtApply = function (afterFloatingFilter, afterDataChange, e) {
14199 if (afterFloatingFilter === void 0) { afterFloatingFilter = false; }
14200 if (afterDataChange === void 0) { afterDataChange = false; }
14201 // Prevent form submission
14202 if (e) {
14203 e.preventDefault();
14204 }
14205 if (this.applyModel(afterDataChange ? 'rowDataUpdated' : 'ui')) {
14206 // the floating filter uses 'afterFloatingFilter' info, so it doesn't refresh after filter changed if change
14207 // came from floating filter
14208 this.providedFilterParams.filterChangedCallback({ afterFloatingFilter: afterFloatingFilter, afterDataChange: afterDataChange });
14209 }
14210 var closeOnApply = this.providedFilterParams.closeOnApply;
14211 // only close if an apply button is visible, otherwise we'd be closing every time a change was made!
14212 if (closeOnApply && this.applyActive && !afterFloatingFilter && !afterDataChange) {
14213 this.close(e);
14214 }
14215 };
14216 ProvidedFilter.prototype.onNewRowsLoaded = function () {
14217 };
14218 ProvidedFilter.prototype.close = function (e) {
14219 if (!this.hidePopup) {
14220 return;
14221 }
14222 var keyboardEvent = e;
14223 var key = keyboardEvent && keyboardEvent.key;
14224 var params;
14225 if (key === 'Enter' || key === 'Space') {
14226 params = { keyboardEvent: keyboardEvent };
14227 }
14228 this.hidePopup(params);
14229 this.hidePopup = null;
14230 };
14231 /**
14232 * By default, if the change came from a floating filter it will be applied immediately, otherwise if there is no
14233 * apply button it will be applied after a debounce, otherwise it will not be applied at all. This behaviour can
14234 * be adjusted by using the apply parameter.
14235 */
14236 ProvidedFilter.prototype.onUiChanged = function (fromFloatingFilter, apply) {
14237 if (fromFloatingFilter === void 0) { fromFloatingFilter = false; }
14238 this.updateUiVisibility();
14239 this.providedFilterParams.filterModifiedCallback();
14240 if (this.applyActive && !this.isReadOnly()) {
14241 var isValid = this.isModelValid(this.getModelFromUi());
14242 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisabled"])(this.getRefElement('applyFilterButton'), !isValid);
14243 }
14244 if ((fromFloatingFilter && !apply) || apply === 'immediately') {
14245 this.onBtApply(fromFloatingFilter);
14246 }
14247 else if ((!this.applyActive && !apply) || apply === 'debounce') {
14248 this.onBtApplyDebounce();
14249 }
14250 };
14251 ProvidedFilter.prototype.afterGuiAttached = function (params) {
14252 if ((params === null || params === void 0 ? void 0 : params.container) === 'floatingFilter') {
14253 this.positionableFeature.restoreLastSize();
14254 this.positionableFeature.setResizable(this.gridOptionsService.is('enableRtl')
14255 ? { bottom: true, bottomLeft: true, left: true }
14256 : { bottom: true, bottomRight: true, right: true });
14257 }
14258 else {
14259 this.positionableFeature.removeSizeFromEl();
14260 this.positionableFeature.setResizable(false);
14261 }
14262 if (params == null) {
14263 return;
14264 }
14265 this.hidePopup = params.hidePopup;
14266 };
14267 ProvidedFilter.prototype.afterGuiDetached = function () {
14268 this.checkApplyDebounce();
14269 };
14270 // static, as used by floating filter also
14271 ProvidedFilter.getDebounceMs = function (params, debounceDefault) {
14272 if (ProvidedFilter.isUseApplyButton(params)) {
14273 if (params.debounceMs != null) {
14274 console.warn('AG Grid: debounceMs is ignored when apply button is present');
14275 }
14276 return 0;
14277 }
14278 return params.debounceMs != null ? params.debounceMs : debounceDefault;
14279 };
14280 // static, as used by floating filter also
14281 ProvidedFilter.isUseApplyButton = function (params) {
14282 return !!params.buttons && params.buttons.indexOf('apply') >= 0;
14283 };
14284 ProvidedFilter.prototype.destroy = function () {
14285 var eGui = this.getGui();
14286 if (eGui) {
14287 eGui.removeEventListener('submit', this.onFormSubmit);
14288 }
14289 this.hidePopup = null;
14290 _super.prototype.destroy.call(this);
14291 };
14292 ProvidedFilter.prototype.translate = function (key) {
14293 var translate = this.localeService.getLocaleTextFunc();
14294 return translate(key, _filterLocaleText__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_FILTER_LOCALE_TEXT"][key]);
14295 };
14296 ProvidedFilter.prototype.getCellValue = function (rowNode) {
14297 var _a = this.providedFilterParams, api = _a.api, colDef = _a.colDef, column = _a.column, columnApi = _a.columnApi, context = _a.context;
14298 return this.providedFilterParams.valueGetter({
14299 api: api,
14300 colDef: colDef,
14301 column: column,
14302 columnApi: columnApi,
14303 context: context,
14304 data: rowNode.data,
14305 getValue: function (field) { return rowNode.data[field]; },
14306 node: rowNode,
14307 });
14308 };
14309 // override to control positionable feature
14310 ProvidedFilter.prototype.getPositionableElement = function () {
14311 return this.eFilterBody;
14312 };
14313 __decorate([
14314 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
14315 ], ProvidedFilter.prototype, "rowModel", void 0);
14316 __decorate([
14317 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_7__["RefSelector"])('eFilterBody')
14318 ], ProvidedFilter.prototype, "eFilterBody", void 0);
14319 __decorate([
14320 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
14321 ], ProvidedFilter.prototype, "postConstruct", null);
14322 return ProvidedFilter;
14323}(_widgets_component__WEBPACK_IMPORTED_MODULE_6__["Component"]));
14324
14325
14326
14327/***/ }),
14328/* 63 */
14329/***/ (function(module, __webpack_exports__, __webpack_require__) {
14330
14331"use strict";
14332__webpack_require__.r(__webpack_exports__);
14333/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_FILTER_LOCALE_TEXT", function() { return DEFAULT_FILTER_LOCALE_TEXT; });
14334/**
14335 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14336 * @version v29.2.0
14337 * @link https://www.ag-grid.com/
14338 * @license MIT
14339 */
14340var DEFAULT_FILTER_LOCALE_TEXT = {
14341 applyFilter: 'Apply',
14342 clearFilter: 'Clear',
14343 resetFilter: 'Reset',
14344 cancelFilter: 'Cancel',
14345 textFilter: 'Text Filter',
14346 numberFilter: 'Number Filter',
14347 dateFilter: 'Date Filter',
14348 setFilter: 'Set Filter',
14349 filterOoo: 'Filter...',
14350 empty: 'Choose One',
14351 equals: 'Equals',
14352 notEqual: 'Not equal',
14353 lessThan: 'Less than',
14354 greaterThan: 'Greater than',
14355 inRange: 'In range',
14356 inRangeStart: 'From',
14357 inRangeEnd: 'To',
14358 lessThanOrEqual: 'Less than or equals',
14359 greaterThanOrEqual: 'Greater than or equals',
14360 contains: 'Contains',
14361 notContains: 'Not contains',
14362 startsWith: 'Starts with',
14363 endsWith: 'Ends with',
14364 blank: 'Blank',
14365 notBlank: 'Not blank',
14366 andCondition: 'AND',
14367 orCondition: 'OR',
14368 dateFormatOoo: 'yyyy-mm-dd',
14369};
14370
14371
14372/***/ }),
14373/* 64 */
14374/***/ (function(module, __webpack_exports__, __webpack_require__) {
14375
14376"use strict";
14377__webpack_require__.r(__webpack_exports__);
14378/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ManagedFocusFeature", function() { return ManagedFocusFeature; });
14379/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
14380/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
14381/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
14382/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
14383/**
14384 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14385 * @version v29.2.0
14386 * @link https://www.ag-grid.com/
14387 * @license MIT
14388 */
14389var __extends = (undefined && undefined.__extends) || (function () {
14390 var extendStatics = function (d, b) {
14391 extendStatics = Object.setPrototypeOf ||
14392 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14393 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
14394 return extendStatics(d, b);
14395 };
14396 return function (d, b) {
14397 extendStatics(d, b);
14398 function __() { this.constructor = d; }
14399 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14400 };
14401})();
14402var __assign = (undefined && undefined.__assign) || function () {
14403 __assign = Object.assign || function(t) {
14404 for (var s, i = 1, n = arguments.length; i < n; i++) {
14405 s = arguments[i];
14406 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
14407 t[p] = s[p];
14408 }
14409 return t;
14410 };
14411 return __assign.apply(this, arguments);
14412};
14413var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
14414 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14415 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14416 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;
14417 return c > 3 && r && Object.defineProperty(target, key, r), r;
14418};
14419
14420
14421
14422
14423var ManagedFocusFeature = /** @class */ (function (_super) {
14424 __extends(ManagedFocusFeature, _super);
14425 function ManagedFocusFeature(eFocusableElement, callbacks) {
14426 if (callbacks === void 0) { callbacks = {}; }
14427 var _this = _super.call(this) || this;
14428 _this.eFocusableElement = eFocusableElement;
14429 _this.callbacks = callbacks;
14430 _this.callbacks = __assign({ shouldStopEventPropagation: function () { return false; }, onTabKeyDown: function (e) {
14431 if (e.defaultPrevented) {
14432 return;
14433 }
14434 var nextRoot = _this.focusService.findNextFocusableElement(_this.eFocusableElement, false, e.shiftKey);
14435 if (!nextRoot) {
14436 return;
14437 }
14438 nextRoot.focus();
14439 e.preventDefault();
14440 } }, callbacks);
14441 return _this;
14442 }
14443 ManagedFocusFeature.prototype.postConstruct = function () {
14444 this.eFocusableElement.classList.add(ManagedFocusFeature.FOCUS_MANAGED_CLASS);
14445 this.addKeyDownListeners(this.eFocusableElement);
14446 if (this.callbacks.onFocusIn) {
14447 this.addManagedListener(this.eFocusableElement, 'focusin', this.callbacks.onFocusIn);
14448 }
14449 if (this.callbacks.onFocusOut) {
14450 this.addManagedListener(this.eFocusableElement, 'focusout', this.callbacks.onFocusOut);
14451 }
14452 };
14453 ManagedFocusFeature.prototype.addKeyDownListeners = function (eGui) {
14454 var _this = this;
14455 this.addManagedListener(eGui, 'keydown', function (e) {
14456 if (e.defaultPrevented || Object(_utils_event__WEBPACK_IMPORTED_MODULE_2__["isStopPropagationForAgGrid"])(e)) {
14457 return;
14458 }
14459 if (_this.callbacks.shouldStopEventPropagation(e)) {
14460 Object(_utils_event__WEBPACK_IMPORTED_MODULE_2__["stopPropagationForAgGrid"])(e);
14461 return;
14462 }
14463 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].TAB) {
14464 _this.callbacks.onTabKeyDown(e);
14465 }
14466 else if (_this.callbacks.handleKeyDown) {
14467 _this.callbacks.handleKeyDown(e);
14468 }
14469 });
14470 };
14471 ManagedFocusFeature.FOCUS_MANAGED_CLASS = 'ag-focus-managed';
14472 __decorate([
14473 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
14474 ], ManagedFocusFeature.prototype, "focusService", void 0);
14475 __decorate([
14476 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
14477 ], ManagedFocusFeature.prototype, "postConstruct", null);
14478 return ManagedFocusFeature;
14479}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
14480
14481
14482
14483/***/ }),
14484/* 65 */
14485/***/ (function(module, __webpack_exports__, __webpack_require__) {
14486
14487"use strict";
14488__webpack_require__.r(__webpack_exports__);
14489/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PositionableFeature", function() { return PositionableFeature; });
14490/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
14491/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
14492/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
14493/**
14494 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14495 * @version v29.2.0
14496 * @link https://www.ag-grid.com/
14497 * @license MIT
14498 */
14499var __extends = (undefined && undefined.__extends) || (function () {
14500 var extendStatics = function (d, b) {
14501 extendStatics = Object.setPrototypeOf ||
14502 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14503 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
14504 return extendStatics(d, b);
14505 };
14506 return function (d, b) {
14507 extendStatics(d, b);
14508 function __() { this.constructor = d; }
14509 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14510 };
14511})();
14512var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
14513 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14514 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14515 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;
14516 return c > 3 && r && Object.defineProperty(target, key, r), r;
14517};
14518
14519
14520
14521var RESIZE_CONTAINER_STYLE = 'ag-resizer-wrapper';
14522var 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>";
14523var PositionableFeature = /** @class */ (function (_super) {
14524 __extends(PositionableFeature, _super);
14525 function PositionableFeature(element, config) {
14526 var _this = _super.call(this) || this;
14527 _this.element = element;
14528 _this.dragStartPosition = {
14529 x: 0,
14530 y: 0
14531 };
14532 _this.position = {
14533 x: 0,
14534 y: 0
14535 };
14536 _this.lastSize = {
14537 width: -1,
14538 height: -1
14539 };
14540 _this.positioned = false;
14541 _this.resizersAdded = false;
14542 _this.resizeListeners = [];
14543 _this.boundaryEl = null;
14544 _this.isResizing = false;
14545 _this.isMoving = false;
14546 _this.resizable = {};
14547 _this.movable = false;
14548 _this.currentResizer = null;
14549 _this.config = Object.assign({}, { popup: false }, config);
14550 return _this;
14551 }
14552 PositionableFeature.prototype.center = function () {
14553 var _a = this.offsetParent, clientHeight = _a.clientHeight, clientWidth = _a.clientWidth;
14554 var x = (clientWidth / 2) - (this.getWidth() / 2);
14555 var y = (clientHeight / 2) - (this.getHeight() / 2);
14556 this.offsetElement(x, y);
14557 };
14558 PositionableFeature.prototype.initialisePosition = function () {
14559 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;
14560 if (!this.offsetParent) {
14561 this.setOffsetParent();
14562 }
14563 var computedMinHeight = 0;
14564 var computedMinWidth = 0;
14565 // here we don't use the main offset parent but the element's offsetParent
14566 // in order to calculated the minWidth and minHeight correctly
14567 var isVisible = !!this.element.offsetParent;
14568 if (isVisible) {
14569 var boundaryEl = this.findBoundaryElement();
14570 var offsetParentComputedStyles = window.getComputedStyle(boundaryEl);
14571 if (offsetParentComputedStyles.minWidth != null) {
14572 var paddingWidth = boundaryEl.offsetWidth - this.element.offsetWidth;
14573 computedMinWidth = parseInt(offsetParentComputedStyles.minWidth, 10) - paddingWidth;
14574 }
14575 if (offsetParentComputedStyles.minHeight != null) {
14576 var paddingHeight = boundaryEl.offsetHeight - this.element.offsetHeight;
14577 computedMinHeight = parseInt(offsetParentComputedStyles.minHeight, 10) - paddingHeight;
14578 }
14579 }
14580 this.minHeight = minHeight || computedMinHeight;
14581 this.minWidth = minWidth || computedMinWidth;
14582 if (width) {
14583 this.setWidth(width);
14584 }
14585 if (height) {
14586 this.setHeight(height);
14587 }
14588 if (!width || !height) {
14589 this.refreshSize();
14590 }
14591 if (centered) {
14592 this.center();
14593 }
14594 else if (x || y) {
14595 this.offsetElement(x, y);
14596 }
14597 else if (isVisible && forcePopupParentAsOffsetParent && this.boundaryEl) {
14598 var top_1 = parseFloat(this.boundaryEl.style.top);
14599 var left = parseFloat(this.boundaryEl.style.left);
14600 this.offsetElement(isNaN(left) ? 0 : left, isNaN(top_1) ? 0 : top_1);
14601 }
14602 this.positioned = !!this.offsetParent;
14603 };
14604 PositionableFeature.prototype.isPositioned = function () {
14605 return this.positioned;
14606 };
14607 PositionableFeature.prototype.getPosition = function () {
14608 return this.position;
14609 };
14610 PositionableFeature.prototype.setMovable = function (movable, moveElement) {
14611 if (!this.config.popup || movable === this.movable) {
14612 return;
14613 }
14614 this.movable = movable;
14615 var params = this.moveElementDragListener || {
14616 eElement: moveElement,
14617 onDragStart: this.onMoveStart.bind(this),
14618 onDragging: this.onMove.bind(this),
14619 onDragStop: this.onMoveEnd.bind(this)
14620 };
14621 if (movable) {
14622 this.dragService.addDragSource(params);
14623 this.moveElementDragListener = params;
14624 }
14625 else {
14626 this.dragService.removeDragSource(params);
14627 this.moveElementDragListener = undefined;
14628 }
14629 };
14630 PositionableFeature.prototype.setResizable = function (resizable) {
14631 var _this = this;
14632 this.clearResizeListeners();
14633 if (resizable) {
14634 this.addResizers();
14635 }
14636 else {
14637 this.removeResizers();
14638 }
14639 if (typeof resizable === 'boolean') {
14640 if (resizable === false) {
14641 return;
14642 }
14643 resizable = {
14644 topLeft: resizable,
14645 top: resizable,
14646 topRight: resizable,
14647 right: resizable,
14648 bottomRight: resizable,
14649 bottom: resizable,
14650 bottomLeft: resizable,
14651 left: resizable
14652 };
14653 }
14654 Object.keys(resizable).forEach(function (side) {
14655 var resizableStructure = resizable;
14656 var isSideResizable = !!resizableStructure[side];
14657 var resizerEl = _this.getResizerElement(side);
14658 var params = {
14659 dragStartPixels: 0,
14660 eElement: resizerEl,
14661 onDragStart: function (e) { return _this.onResizeStart(e, side); },
14662 onDragging: _this.onResize.bind(_this),
14663 onDragStop: function (e) { return _this.onResizeEnd(e, side); },
14664 };
14665 if (isSideResizable || (!_this.isAlive() && !isSideResizable)) {
14666 if (isSideResizable) {
14667 _this.dragService.addDragSource(params);
14668 _this.resizeListeners.push(params);
14669 resizerEl.style.pointerEvents = 'all';
14670 }
14671 else {
14672 resizerEl.style.pointerEvents = 'none';
14673 }
14674 _this.resizable[side] = isSideResizable;
14675 }
14676 });
14677 };
14678 PositionableFeature.prototype.removeSizeFromEl = function () {
14679 this.element.style.removeProperty('height');
14680 this.element.style.removeProperty('width');
14681 this.element.style.removeProperty('flex');
14682 };
14683 PositionableFeature.prototype.restoreLastSize = function () {
14684 this.element.style.flex = '0 0 auto';
14685 var _a = this.lastSize, height = _a.height, width = _a.width;
14686 if (width !== -1) {
14687 this.element.style.width = width + "px";
14688 }
14689 if (height !== -1) {
14690 this.element.style.height = height + "px";
14691 }
14692 };
14693 PositionableFeature.prototype.getHeight = function () {
14694 return this.element.offsetHeight;
14695 };
14696 PositionableFeature.prototype.setHeight = function (height) {
14697 var _a = this.config, popup = _a.popup, forcePopupParentAsOffsetParent = _a.forcePopupParentAsOffsetParent;
14698 var eGui = this.element;
14699 var isPercent = false;
14700 if (typeof height === 'string' && height.indexOf('%') !== -1) {
14701 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedHeight"])(eGui, height);
14702 height = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["getAbsoluteHeight"])(eGui);
14703 isPercent = true;
14704 }
14705 else if (this.positioned) {
14706 var elRect = this.element.getBoundingClientRect();
14707 var parentRect = this.offsetParent.getBoundingClientRect();
14708 height = Math.max(this.minHeight, height);
14709 var clientHeight = this.offsetParent.clientHeight;
14710 if (clientHeight) {
14711 var yPosition = popup ? this.position.y : elRect.top;
14712 var parentTop = popup ? 0 : parentRect.top;
14713 // When `forcePopupParentAsOffsetParent`, there may be elements that appear after the resizable element, but aren't included in the height.
14714 // Take these into account here
14715 var additionalHeight = 0;
14716 if (forcePopupParentAsOffsetParent && this.boundaryEl) {
14717 var bottom = this.boundaryEl.getBoundingClientRect().bottom;
14718 additionalHeight = bottom - elRect.bottom;
14719 }
14720 var availableHeight = clientHeight + parentTop - yPosition - additionalHeight;
14721 if (height > availableHeight) {
14722 height = availableHeight;
14723 }
14724 }
14725 }
14726 if (this.getHeight() === height) {
14727 return;
14728 }
14729 if (!isPercent) {
14730 if (popup) {
14731 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedHeight"])(eGui, height);
14732 }
14733 else {
14734 eGui.style.height = height + "px";
14735 eGui.style.flex = '0 0 auto';
14736 this.lastSize.height = typeof height === 'number' ? height : parseFloat(height);
14737 }
14738 }
14739 else {
14740 eGui.style.maxHeight = 'unset';
14741 eGui.style.minHeight = 'unset';
14742 }
14743 };
14744 PositionableFeature.prototype.getWidth = function () {
14745 return this.element.offsetWidth;
14746 };
14747 PositionableFeature.prototype.setWidth = function (width) {
14748 var eGui = this.element;
14749 var popup = this.config.popup;
14750 var isPercent = false;
14751 if (typeof width === 'string' && width.indexOf('%') !== -1) {
14752 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedWidth"])(eGui, width);
14753 width = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["getAbsoluteWidth"])(eGui);
14754 isPercent = true;
14755 }
14756 else if (this.positioned) {
14757 width = Math.max(this.minWidth, width);
14758 var clientWidth = this.offsetParent.clientWidth;
14759 var xPosition = popup ? this.position.x : this.element.getBoundingClientRect().left;
14760 if (clientWidth && (width + xPosition > clientWidth)) {
14761 width = clientWidth - xPosition;
14762 }
14763 }
14764 if (this.getWidth() === width) {
14765 return;
14766 }
14767 if (!isPercent) {
14768 if (this.config.popup) {
14769 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedWidth"])(eGui, width);
14770 }
14771 else {
14772 eGui.style.width = width + "px";
14773 eGui.style.flex = ' unset';
14774 this.lastSize.width = typeof width === 'number' ? width : parseFloat(width);
14775 }
14776 }
14777 else {
14778 eGui.style.maxWidth = 'unset';
14779 eGui.style.minWidth = 'unset';
14780 }
14781 };
14782 PositionableFeature.prototype.offsetElement = function (x, y) {
14783 if (x === void 0) { x = 0; }
14784 if (y === void 0) { y = 0; }
14785 var ePopup = this.config.forcePopupParentAsOffsetParent ? this.boundaryEl : this.element;
14786 this.popupService.positionPopup({
14787 ePopup: ePopup,
14788 keepWithinBounds: true,
14789 skipObserver: this.movable || this.isResizable(),
14790 updatePosition: function () { return ({ x: x, y: y }); }
14791 });
14792 this.setPosition(parseFloat(ePopup.style.left), parseFloat(ePopup.style.top));
14793 };
14794 PositionableFeature.prototype.setPosition = function (x, y) {
14795 this.position.x = x;
14796 this.position.y = y;
14797 };
14798 PositionableFeature.prototype.updateDragStartPosition = function (x, y) {
14799 this.dragStartPosition = { x: x, y: y };
14800 };
14801 PositionableFeature.prototype.calculateMouseMovement = function (params) {
14802 var e = params.e, isLeft = params.isLeft, isTop = params.isTop, anywhereWithin = params.anywhereWithin, topBuffer = params.topBuffer;
14803 var xDiff = e.clientX - this.dragStartPosition.x;
14804 var yDiff = e.clientY - this.dragStartPosition.y;
14805 var movementX = this.shouldSkipX(e, !!isLeft, !!anywhereWithin, xDiff) ? 0 : xDiff;
14806 var movementY = this.shouldSkipY(e, !!isTop, topBuffer, yDiff) ? 0 : yDiff;
14807 return { movementX: movementX, movementY: movementY };
14808 };
14809 PositionableFeature.prototype.shouldSkipX = function (e, isLeft, anywhereWithin, diff) {
14810 var elRect = this.element.getBoundingClientRect();
14811 var parentRect = this.offsetParent.getBoundingClientRect();
14812 var boundaryElRect = this.boundaryEl.getBoundingClientRect();
14813 var xPosition = this.config.popup ? this.position.x : elRect.left;
14814 // skip if cursor is outside of popupParent horizontally
14815 var skipX = ((xPosition <= 0 && parentRect.left >= e.clientX) ||
14816 (parentRect.right <= e.clientX && parentRect.right <= boundaryElRect.right));
14817 if (skipX) {
14818 return true;
14819 }
14820 if (isLeft) {
14821 skipX = (
14822 // skip if we are moving to the left and the cursor
14823 // is positioned to the right of the left side anchor
14824 (diff < 0 && e.clientX > xPosition + parentRect.left) ||
14825 // skip if we are moving to the right and the cursor
14826 // is positioned to the left of the dialog
14827 (diff > 0 && e.clientX < xPosition + parentRect.left));
14828 }
14829 else {
14830 if (anywhereWithin) {
14831 // if anywhereWithin is true, we allow to move
14832 // as long as the cursor is within the dialog
14833 skipX = ((diff < 0 && e.clientX > boundaryElRect.right) ||
14834 (diff > 0 && e.clientX < xPosition + parentRect.left));
14835 }
14836 else {
14837 skipX = (
14838 // if the movement is bound to the right side of the dialog
14839 // we skip if we are moving to the left and the cursor
14840 // is to the right of the dialog
14841 (diff < 0 && e.clientX > boundaryElRect.right) ||
14842 // or skip if we are moving to the right and the cursor
14843 // is to the left of the right side anchor
14844 (diff > 0 && e.clientX < boundaryElRect.right));
14845 }
14846 }
14847 return skipX;
14848 };
14849 PositionableFeature.prototype.shouldSkipY = function (e, isTop, topBuffer, diff) {
14850 if (topBuffer === void 0) { topBuffer = 0; }
14851 var elRect = this.element.getBoundingClientRect();
14852 var parentRect = this.offsetParent.getBoundingClientRect();
14853 var boundaryElRect = this.boundaryEl.getBoundingClientRect();
14854 var yPosition = this.config.popup ? this.position.y : elRect.top;
14855 // skip if cursor is outside of popupParent vertically
14856 var skipY = ((yPosition <= 0 && parentRect.top >= e.clientY) ||
14857 (parentRect.bottom <= e.clientY && parentRect.bottom <= boundaryElRect.bottom));
14858 if (skipY) {
14859 return true;
14860 }
14861 if (isTop) {
14862 skipY = (
14863 // skip if we are moving to towards top and the cursor is
14864 // below the top anchor + topBuffer
14865 // note: topBuffer is used when moving the dialog using the title bar
14866 (diff < 0 && e.clientY > yPosition + parentRect.top + topBuffer) ||
14867 // skip if we are moving to the bottom and the cursor is
14868 // above the top anchor
14869 (diff > 0 && e.clientY < yPosition + parentRect.top));
14870 }
14871 else {
14872 skipY = (
14873 // skip if we are moving towards the top and the cursor
14874 // is below the bottom anchor
14875 (diff < 0 && e.clientY > boundaryElRect.bottom) ||
14876 // skip if we are moving towards the bottom and the cursor
14877 // is above the bottom anchor
14878 (diff > 0 && e.clientY < boundaryElRect.bottom));
14879 }
14880 return skipY;
14881 };
14882 PositionableFeature.prototype.createResizeMap = function () {
14883 var eGui = this.element;
14884 this.resizerMap = {
14885 topLeft: { element: eGui.querySelector('[ref=eTopLeftResizer]') },
14886 top: { element: eGui.querySelector('[ref=eTopResizer]') },
14887 topRight: { element: eGui.querySelector('[ref=eTopRightResizer]') },
14888 right: { element: eGui.querySelector('[ref=eRightResizer]') },
14889 bottomRight: { element: eGui.querySelector('[ref=eBottomRightResizer]') },
14890 bottom: { element: eGui.querySelector('[ref=eBottomResizer]') },
14891 bottomLeft: { element: eGui.querySelector('[ref=eBottomLeftResizer]') },
14892 left: { element: eGui.querySelector('[ref=eLeftResizer]') }
14893 };
14894 };
14895 PositionableFeature.prototype.addResizers = function () {
14896 if (this.resizersAdded) {
14897 return;
14898 }
14899 var eGui = this.element;
14900 if (!eGui) {
14901 return;
14902 }
14903 var parser = new DOMParser();
14904 var resizers = parser.parseFromString(RESIZE_TEMPLATE, 'text/html').body;
14905 eGui.appendChild(resizers.firstChild);
14906 this.createResizeMap();
14907 this.resizersAdded = true;
14908 };
14909 PositionableFeature.prototype.removeResizers = function () {
14910 this.resizerMap = undefined;
14911 var resizerEl = this.element.querySelector("." + RESIZE_CONTAINER_STYLE);
14912 if (resizerEl) {
14913 this.element.removeChild(resizerEl);
14914 }
14915 this.resizersAdded = false;
14916 };
14917 PositionableFeature.prototype.getResizerElement = function (side) {
14918 return this.resizerMap[side].element;
14919 };
14920 PositionableFeature.prototype.onResizeStart = function (e, side) {
14921 this.boundaryEl = this.findBoundaryElement();
14922 if (!this.positioned) {
14923 this.initialisePosition();
14924 }
14925 this.currentResizer = {
14926 isTop: !!side.match(/top/i),
14927 isRight: !!side.match(/right/i),
14928 isBottom: !!side.match(/bottom/i),
14929 isLeft: !!side.match(/left/i),
14930 };
14931 this.element.classList.add('ag-resizing');
14932 this.resizerMap[side].element.classList.add('ag-active');
14933 var _a = this.config, popup = _a.popup, forcePopupParentAsOffsetParent = _a.forcePopupParentAsOffsetParent;
14934 if (!popup && !forcePopupParentAsOffsetParent) {
14935 this.applySizeToSiblings(this.currentResizer.isBottom || this.currentResizer.isTop);
14936 }
14937 this.isResizing = true;
14938 this.updateDragStartPosition(e.clientX, e.clientY);
14939 };
14940 PositionableFeature.prototype.getSiblings = function () {
14941 var element = this.element;
14942 var parent = element.parentElement;
14943 if (!parent) {
14944 return null;
14945 }
14946 return Array.prototype.slice.call(parent.children).filter(function (el) { return !el.classList.contains('ag-hidden'); });
14947 };
14948 PositionableFeature.prototype.getMinSizeOfSiblings = function () {
14949 var siblings = this.getSiblings() || [];
14950 var height = 0;
14951 var width = 0;
14952 for (var i = 0; i < siblings.length; i++) {
14953 var currentEl = siblings[i];
14954 var isFlex = !!currentEl.style.flex && currentEl.style.flex !== '0 0 auto';
14955 if (currentEl === this.element) {
14956 continue;
14957 }
14958 var nextHeight = this.minHeight || 0;
14959 var nextWidth = this.minWidth || 0;
14960 if (isFlex) {
14961 var computedStyle = window.getComputedStyle(currentEl);
14962 if (computedStyle.minHeight) {
14963 nextHeight = parseInt(computedStyle.minHeight, 10);
14964 }
14965 if (computedStyle.minWidth) {
14966 nextWidth = parseInt(computedStyle.minWidth, 10);
14967 }
14968 }
14969 else {
14970 nextHeight = currentEl.offsetHeight;
14971 nextWidth = currentEl.offsetWidth;
14972 }
14973 height += nextHeight;
14974 width += nextWidth;
14975 }
14976 return { height: height, width: width };
14977 };
14978 PositionableFeature.prototype.applySizeToSiblings = function (vertical) {
14979 var containerToFlex = null;
14980 var siblings = this.getSiblings();
14981 if (!siblings) {
14982 return;
14983 }
14984 for (var i = 0; i < siblings.length; i++) {
14985 var el = siblings[i];
14986 if (el === containerToFlex) {
14987 continue;
14988 }
14989 if (vertical) {
14990 el.style.height = el.offsetHeight + "px";
14991 }
14992 else {
14993 el.style.width = el.offsetWidth + "px";
14994 }
14995 el.style.flex = '0 0 auto';
14996 if (el === this.element) {
14997 containerToFlex = siblings[i + 1];
14998 }
14999 }
15000 if (containerToFlex) {
15001 containerToFlex.style.removeProperty('height');
15002 containerToFlex.style.removeProperty('min-height');
15003 containerToFlex.style.removeProperty('max-height');
15004 containerToFlex.style.flex = '1 1 auto';
15005 }
15006 };
15007 PositionableFeature.prototype.isResizable = function () {
15008 return Object.values(this.resizable).some(function (value) { return value; });
15009 };
15010 PositionableFeature.prototype.onResize = function (e) {
15011 if (!this.isResizing || !this.currentResizer) {
15012 return;
15013 }
15014 var _a = this.config, popup = _a.popup, forcePopupParentAsOffsetParent = _a.forcePopupParentAsOffsetParent;
15015 var _b = this.currentResizer, isTop = _b.isTop, isRight = _b.isRight, isBottom = _b.isBottom, isLeft = _b.isLeft;
15016 var isHorizontal = isRight || isLeft;
15017 var isVertical = isBottom || isTop;
15018 var _c = this.calculateMouseMovement({ e: e, isLeft: isLeft, isTop: isTop }), movementX = _c.movementX, movementY = _c.movementY;
15019 var xPosition = this.position.x;
15020 var yPosition = this.position.y;
15021 var offsetLeft = 0;
15022 var offsetTop = 0;
15023 if (isHorizontal && movementX) {
15024 var direction = isLeft ? -1 : 1;
15025 var oldWidth = this.getWidth();
15026 var newWidth = oldWidth + (movementX * direction);
15027 var skipWidth = false;
15028 if (isLeft) {
15029 offsetLeft = oldWidth - newWidth;
15030 if (xPosition + offsetLeft <= 0 || newWidth <= this.minWidth) {
15031 skipWidth = true;
15032 offsetLeft = 0;
15033 }
15034 }
15035 if (!skipWidth) {
15036 this.setWidth(newWidth);
15037 }
15038 }
15039 if (isVertical && movementY) {
15040 var direction = isTop ? -1 : 1;
15041 var oldHeight = this.getHeight();
15042 var newHeight = oldHeight + (movementY * direction);
15043 var skipHeight = false;
15044 if (isTop) {
15045 offsetTop = oldHeight - newHeight;
15046 if (yPosition + offsetTop <= 0 || newHeight <= this.minHeight) {
15047 skipHeight = true;
15048 offsetTop = 0;
15049 }
15050 }
15051 else {
15052 // do not let the size of all siblings be higher than the parent container
15053 if (!this.config.popup &&
15054 !this.config.forcePopupParentAsOffsetParent &&
15055 oldHeight < newHeight &&
15056 (this.getMinSizeOfSiblings().height + newHeight) > this.element.parentElement.offsetHeight) {
15057 skipHeight = true;
15058 }
15059 }
15060 if (!skipHeight) {
15061 this.setHeight(newHeight);
15062 }
15063 }
15064 this.updateDragStartPosition(e.clientX, e.clientY);
15065 if ((popup || forcePopupParentAsOffsetParent) && offsetLeft || offsetTop) {
15066 this.offsetElement(xPosition + offsetLeft, yPosition + offsetTop);
15067 }
15068 };
15069 PositionableFeature.prototype.onResizeEnd = function (e, side) {
15070 this.isResizing = false;
15071 this.currentResizer = null;
15072 this.boundaryEl = null;
15073 var params = {
15074 type: 'resize',
15075 api: this.gridOptionsService.api,
15076 columnApi: this.gridOptionsService.columnApi
15077 };
15078 this.element.classList.remove('ag-resizing');
15079 this.resizerMap[side].element.classList.remove('ag-active');
15080 this.dispatchEvent(params);
15081 };
15082 PositionableFeature.prototype.refreshSize = function () {
15083 var eGui = this.element;
15084 if (this.config.popup) {
15085 if (!this.config.width) {
15086 this.setWidth(eGui.offsetWidth);
15087 }
15088 if (!this.config.height) {
15089 this.setHeight(eGui.offsetHeight);
15090 }
15091 }
15092 };
15093 PositionableFeature.prototype.onMoveStart = function (e) {
15094 this.boundaryEl = this.findBoundaryElement();
15095 if (!this.positioned) {
15096 this.initialisePosition();
15097 }
15098 this.isMoving = true;
15099 this.element.classList.add('ag-moving');
15100 this.updateDragStartPosition(e.clientX, e.clientY);
15101 };
15102 PositionableFeature.prototype.onMove = function (e) {
15103 if (!this.isMoving) {
15104 return;
15105 }
15106 var _a = this.position, x = _a.x, y = _a.y;
15107 var topBuffer;
15108 if (this.config.calculateTopBuffer) {
15109 topBuffer = this.config.calculateTopBuffer();
15110 }
15111 var _b = this.calculateMouseMovement({
15112 e: e,
15113 isTop: true,
15114 anywhereWithin: true,
15115 topBuffer: topBuffer
15116 }), movementX = _b.movementX, movementY = _b.movementY;
15117 this.offsetElement(x + movementX, y + movementY);
15118 this.updateDragStartPosition(e.clientX, e.clientY);
15119 };
15120 PositionableFeature.prototype.onMoveEnd = function () {
15121 this.isMoving = false;
15122 this.boundaryEl = null;
15123 this.element.classList.remove('ag-moving');
15124 };
15125 PositionableFeature.prototype.setOffsetParent = function () {
15126 if (this.config.forcePopupParentAsOffsetParent) {
15127 this.offsetParent = this.popupService.getPopupParent();
15128 }
15129 else {
15130 this.offsetParent = this.element.offsetParent;
15131 }
15132 };
15133 PositionableFeature.prototype.findBoundaryElement = function () {
15134 var el = this.element;
15135 while (el) {
15136 if (window.getComputedStyle(el).position !== 'static') {
15137 return el;
15138 }
15139 el = el.parentElement;
15140 }
15141 return this.element;
15142 };
15143 PositionableFeature.prototype.clearResizeListeners = function () {
15144 while (this.resizeListeners.length) {
15145 var params = this.resizeListeners.pop();
15146 this.dragService.removeDragSource(params);
15147 }
15148 };
15149 PositionableFeature.prototype.destroy = function () {
15150 _super.prototype.destroy.call(this);
15151 if (this.moveElementDragListener) {
15152 this.dragService.removeDragSource(this.moveElementDragListener);
15153 }
15154 this.clearResizeListeners();
15155 this.removeResizers();
15156 };
15157 __decorate([
15158 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('popupService')
15159 ], PositionableFeature.prototype, "popupService", void 0);
15160 __decorate([
15161 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragService')
15162 ], PositionableFeature.prototype, "dragService", void 0);
15163 return PositionableFeature;
15164}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
15165
15166
15167
15168/***/ }),
15169/* 66 */
15170/***/ (function(module, __webpack_exports__, __webpack_require__) {
15171
15172"use strict";
15173__webpack_require__.r(__webpack_exports__);
15174/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgSelect", function() { return AgSelect; });
15175/* harmony import */ var _agAbstractField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67);
15176/* harmony import */ var _agPickerField__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69);
15177/* harmony import */ var _agList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70);
15178/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11);
15179/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45);
15180/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41);
15181/**
15182 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15183 * @version v29.2.0
15184 * @link https://www.ag-grid.com/
15185 * @license MIT
15186 */
15187var __extends = (undefined && undefined.__extends) || (function () {
15188 var extendStatics = function (d, b) {
15189 extendStatics = Object.setPrototypeOf ||
15190 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15191 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
15192 return extendStatics(d, b);
15193 };
15194 return function (d, b) {
15195 extendStatics(d, b);
15196 function __() { this.constructor = d; }
15197 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15198 };
15199})();
15200var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15201 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15202 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15203 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;
15204 return c > 3 && r && Object.defineProperty(target, key, r), r;
15205};
15206
15207
15208
15209
15210
15211
15212var AgSelect = /** @class */ (function (_super) {
15213 __extends(AgSelect, _super);
15214 function AgSelect(config) {
15215 return _super.call(this, config, 'ag-select', 'smallDown', 'listbox') || this;
15216 }
15217 AgSelect.prototype.init = function () {
15218 var _this = this;
15219 this.listComponent = this.createBean(new _agList__WEBPACK_IMPORTED_MODULE_2__["AgList"]('select'));
15220 this.listComponent.setParentComponent(this);
15221 this.eWrapper.tabIndex = 0;
15222 this.listComponent.addManagedListener(this.listComponent, _agList__WEBPACK_IMPORTED_MODULE_2__["AgList"].EVENT_ITEM_SELECTED, function () {
15223 if (_this.hideList) {
15224 _this.hideList();
15225 }
15226 _this.dispatchEvent({ type: AgSelect.EVENT_ITEM_SELECTED });
15227 });
15228 this.listComponent.addManagedListener(this.listComponent, _agAbstractField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractField"].EVENT_CHANGED, function () {
15229 _this.setValue(_this.listComponent.getValue(), false, true);
15230 if (_this.hideList) {
15231 _this.hideList();
15232 }
15233 });
15234 };
15235 AgSelect.prototype.showPicker = function () {
15236 var _this = this;
15237 var listGui = this.listComponent.getGui();
15238 var eDocument = this.gridOptionsService.getDocument();
15239 var destroyMouseWheelFunc = this.addManagedListener(eDocument.body, 'wheel', function (e) {
15240 if (!listGui.contains(e.target) && _this.hideList) {
15241 _this.hideList();
15242 }
15243 });
15244 var destroyFocusOutFunc = this.addManagedListener(listGui, 'focusout', function (e) {
15245 if (!listGui.contains(e.relatedTarget) && _this.hideList) {
15246 _this.hideList();
15247 }
15248 });
15249 var translate = this.localeService.getLocaleTextFunc();
15250 var addPopupRes = this.popupService.addPopup({
15251 modal: true,
15252 eChild: listGui,
15253 closeOnEsc: true,
15254 closedCallback: function () {
15255 _this.hideList = null;
15256 _this.isPickerDisplayed = false;
15257 destroyFocusOutFunc();
15258 destroyMouseWheelFunc();
15259 if (_this.isAlive()) {
15260 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaExpanded"])(_this.eWrapper, false);
15261 _this.getFocusableElement().focus();
15262 }
15263 },
15264 ariaLabel: translate('ariaLabelSelectField', 'Select Field')
15265 });
15266 if (addPopupRes) {
15267 this.hideList = addPopupRes.hideFunc;
15268 }
15269 this.isPickerDisplayed = true;
15270 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setElementWidth"])(listGui, Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["getAbsoluteWidth"])(this.eWrapper));
15271 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaExpanded"])(this.eWrapper, true);
15272 listGui.style.maxHeight = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["getInnerHeight"])(this.popupService.getPopupParent()) + 'px';
15273 listGui.style.position = 'absolute';
15274 this.popupService.positionPopupByComponent({
15275 type: 'ag-list',
15276 eventSource: this.eWrapper,
15277 ePopup: listGui,
15278 position: 'under',
15279 keepWithinBounds: true
15280 });
15281 this.listComponent.refreshHighlighted();
15282 return this.listComponent;
15283 };
15284 AgSelect.prototype.addOptions = function (options) {
15285 var _this = this;
15286 options.forEach(function (option) { return _this.addOption(option); });
15287 return this;
15288 };
15289 AgSelect.prototype.addOption = function (option) {
15290 this.listComponent.addOption(option);
15291 return this;
15292 };
15293 AgSelect.prototype.setValue = function (value, silent, fromPicker) {
15294 if (this.value === value) {
15295 return this;
15296 }
15297 if (!fromPicker) {
15298 this.listComponent.setValue(value, true);
15299 }
15300 var newValue = this.listComponent.getValue();
15301 if (newValue === this.getValue()) {
15302 return this;
15303 }
15304 this.eDisplayField.innerHTML = this.listComponent.getDisplayValue();
15305 return _super.prototype.setValue.call(this, value, silent);
15306 };
15307 AgSelect.prototype.destroy = function () {
15308 if (this.hideList) {
15309 this.hideList();
15310 }
15311 this.destroyBean(this.listComponent);
15312 _super.prototype.destroy.call(this);
15313 };
15314 AgSelect.EVENT_ITEM_SELECTED = 'selectedItem';
15315 __decorate([
15316 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('popupService')
15317 ], AgSelect.prototype, "popupService", void 0);
15318 __decorate([
15319 _context_context__WEBPACK_IMPORTED_MODULE_3__["PostConstruct"]
15320 ], AgSelect.prototype, "init", null);
15321 return AgSelect;
15322}(_agPickerField__WEBPACK_IMPORTED_MODULE_1__["AgPickerField"]));
15323
15324
15325
15326/***/ }),
15327/* 67 */
15328/***/ (function(module, __webpack_exports__, __webpack_require__) {
15329
15330"use strict";
15331__webpack_require__.r(__webpack_exports__);
15332/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgAbstractField", function() { return AgAbstractField; });
15333/* harmony import */ var _agAbstractLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68);
15334/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
15335/**
15336 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15337 * @version v29.2.0
15338 * @link https://www.ag-grid.com/
15339 * @license MIT
15340 */
15341var __extends = (undefined && undefined.__extends) || (function () {
15342 var extendStatics = function (d, b) {
15343 extendStatics = Object.setPrototypeOf ||
15344 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15345 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
15346 return extendStatics(d, b);
15347 };
15348 return function (d, b) {
15349 extendStatics(d, b);
15350 function __() { this.constructor = d; }
15351 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15352 };
15353})();
15354
15355
15356var AgAbstractField = /** @class */ (function (_super) {
15357 __extends(AgAbstractField, _super);
15358 function AgAbstractField(config, template, className) {
15359 var _this = _super.call(this, config, template) || this;
15360 _this.className = className;
15361 return _this;
15362 }
15363 AgAbstractField.prototype.postConstruct = function () {
15364 _super.prototype.postConstruct.call(this);
15365 if (this.className) {
15366 this.addCssClass(this.className);
15367 }
15368 };
15369 AgAbstractField.prototype.onValueChange = function (callbackFn) {
15370 var _this = this;
15371 this.addManagedListener(this, AgAbstractField.EVENT_CHANGED, function () { return callbackFn(_this.getValue()); });
15372 return this;
15373 };
15374 AgAbstractField.prototype.getWidth = function () {
15375 return this.getGui().clientWidth;
15376 };
15377 AgAbstractField.prototype.setWidth = function (width) {
15378 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setFixedWidth"])(this.getGui(), width);
15379 return this;
15380 };
15381 AgAbstractField.prototype.getPreviousValue = function () {
15382 return this.previousValue;
15383 };
15384 AgAbstractField.prototype.getValue = function () {
15385 return this.value;
15386 };
15387 AgAbstractField.prototype.setValue = function (value, silent) {
15388 if (this.value === value) {
15389 return this;
15390 }
15391 this.previousValue = this.value;
15392 this.value = value;
15393 if (!silent) {
15394 this.dispatchEvent({ type: AgAbstractField.EVENT_CHANGED });
15395 }
15396 return this;
15397 };
15398 AgAbstractField.EVENT_CHANGED = 'valueChange';
15399 return AgAbstractField;
15400}(_agAbstractLabel__WEBPACK_IMPORTED_MODULE_0__["AgAbstractLabel"]));
15401
15402
15403
15404/***/ }),
15405/* 68 */
15406/***/ (function(module, __webpack_exports__, __webpack_require__) {
15407
15408"use strict";
15409__webpack_require__.r(__webpack_exports__);
15410/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgAbstractLabel", function() { return AgAbstractLabel; });
15411/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
15412/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
15413/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
15414/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41);
15415/**
15416 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15417 * @version v29.2.0
15418 * @link https://www.ag-grid.com/
15419 * @license MIT
15420 */
15421var __extends = (undefined && undefined.__extends) || (function () {
15422 var extendStatics = function (d, b) {
15423 extendStatics = Object.setPrototypeOf ||
15424 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15425 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
15426 return extendStatics(d, b);
15427 };
15428 return function (d, b) {
15429 extendStatics(d, b);
15430 function __() { this.constructor = d; }
15431 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15432 };
15433})();
15434var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15435 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15436 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15437 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;
15438 return c > 3 && r && Object.defineProperty(target, key, r), r;
15439};
15440
15441
15442
15443
15444var AgAbstractLabel = /** @class */ (function (_super) {
15445 __extends(AgAbstractLabel, _super);
15446 function AgAbstractLabel(config, template) {
15447 var _this = _super.call(this, template) || this;
15448 _this.labelSeparator = '';
15449 _this.labelAlignment = 'left';
15450 _this.disabled = false;
15451 _this.label = '';
15452 _this.config = config || {};
15453 return _this;
15454 }
15455 AgAbstractLabel.prototype.postConstruct = function () {
15456 this.addCssClass('ag-labeled');
15457 this.eLabel.classList.add('ag-label');
15458 var _a = this.config, labelSeparator = _a.labelSeparator, label = _a.label, labelWidth = _a.labelWidth, labelAlignment = _a.labelAlignment;
15459 if (labelSeparator != null) {
15460 this.setLabelSeparator(labelSeparator);
15461 }
15462 if (label != null) {
15463 this.setLabel(label);
15464 }
15465 if (labelWidth != null) {
15466 this.setLabelWidth(labelWidth);
15467 }
15468 this.setLabelAlignment(labelAlignment || this.labelAlignment);
15469 this.refreshLabel();
15470 };
15471 AgAbstractLabel.prototype.refreshLabel = function () {
15472 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["clearElement"])(this.eLabel);
15473 if (typeof this.label === 'string') {
15474 this.eLabel.innerText = this.label + this.labelSeparator;
15475 }
15476 else if (this.label) {
15477 this.eLabel.appendChild(this.label);
15478 }
15479 if (this.label === '') {
15480 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eLabel, false);
15481 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaRole"])(this.eLabel, 'presentation');
15482 }
15483 else {
15484 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eLabel, true);
15485 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaRole"])(this.eLabel, null);
15486 }
15487 };
15488 AgAbstractLabel.prototype.setLabelSeparator = function (labelSeparator) {
15489 if (this.labelSeparator === labelSeparator) {
15490 return this;
15491 }
15492 this.labelSeparator = labelSeparator;
15493 if (this.label != null) {
15494 this.refreshLabel();
15495 }
15496 return this;
15497 };
15498 AgAbstractLabel.prototype.getLabelId = function () {
15499 this.eLabel.id = this.eLabel.id || "ag-" + this.getCompId() + "-label";
15500 return this.eLabel.id;
15501 };
15502 AgAbstractLabel.prototype.getLabel = function () {
15503 return this.label;
15504 };
15505 AgAbstractLabel.prototype.setLabel = function (label) {
15506 if (this.label === label) {
15507 return this;
15508 }
15509 this.label = label;
15510 this.refreshLabel();
15511 return this;
15512 };
15513 AgAbstractLabel.prototype.setLabelAlignment = function (alignment) {
15514 var eGui = this.getGui();
15515 var eGuiClassList = eGui.classList;
15516 eGuiClassList.toggle('ag-label-align-left', alignment === 'left');
15517 eGuiClassList.toggle('ag-label-align-right', alignment === 'right');
15518 eGuiClassList.toggle('ag-label-align-top', alignment === 'top');
15519 return this;
15520 };
15521 AgAbstractLabel.prototype.setLabelEllipsis = function (hasEllipsis) {
15522 this.eLabel.classList.toggle('ag-label-ellipsis', hasEllipsis);
15523 return this;
15524 };
15525 AgAbstractLabel.prototype.setLabelWidth = function (width) {
15526 if (this.label == null) {
15527 return this;
15528 }
15529 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setElementWidth"])(this.eLabel, width);
15530 return this;
15531 };
15532 AgAbstractLabel.prototype.setDisabled = function (disabled) {
15533 disabled = !!disabled;
15534 var element = this.getGui();
15535 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisabled"])(element, disabled);
15536 element.classList.toggle('ag-disabled', disabled);
15537 this.disabled = disabled;
15538 return this;
15539 };
15540 AgAbstractLabel.prototype.isDisabled = function () {
15541 return !!this.disabled;
15542 };
15543 __decorate([
15544 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
15545 ], AgAbstractLabel.prototype, "postConstruct", null);
15546 return AgAbstractLabel;
15547}(_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
15548
15549
15550
15551/***/ }),
15552/* 69 */
15553/***/ (function(module, __webpack_exports__, __webpack_require__) {
15554
15555"use strict";
15556__webpack_require__.r(__webpack_exports__);
15557/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgPickerField", function() { return AgPickerField; });
15558/* harmony import */ var _agAbstractField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67);
15559/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
15560/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41);
15561/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46);
15562/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
15563/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45);
15564/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48);
15565/**
15566 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15567 * @version v29.2.0
15568 * @link https://www.ag-grid.com/
15569 * @license MIT
15570 */
15571var __extends = (undefined && undefined.__extends) || (function () {
15572 var extendStatics = function (d, b) {
15573 extendStatics = Object.setPrototypeOf ||
15574 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15575 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
15576 return extendStatics(d, b);
15577 };
15578 return function (d, b) {
15579 extendStatics(d, b);
15580 function __() { this.constructor = d; }
15581 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15582 };
15583})();
15584var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15585 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15586 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15587 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;
15588 return c > 3 && r && Object.defineProperty(target, key, r), r;
15589};
15590
15591
15592
15593
15594
15595
15596
15597var AgPickerField = /** @class */ (function (_super) {
15598 __extends(AgPickerField, _super);
15599 function AgPickerField(config, className, pickerIcon, ariaRole) {
15600 var _this = _super.call(this, config,
15601 /* 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;
15602 _this.pickerIcon = pickerIcon;
15603 _this.isPickerDisplayed = false;
15604 _this.isDestroyingPicker = false;
15605 _this.skipClick = false;
15606 return _this;
15607 }
15608 AgPickerField.prototype.postConstruct = function () {
15609 var _this = this;
15610 _super.prototype.postConstruct.call(this);
15611 var displayId = this.getCompId() + "-display";
15612 this.eDisplayField.setAttribute('id', displayId);
15613 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaDescribedBy"])(this.eWrapper, displayId);
15614 var clickHandler = function () {
15615 if (_this.skipClick) {
15616 _this.skipClick = false;
15617 return;
15618 }
15619 if (_this.isDisabled()) {
15620 return;
15621 }
15622 _this.pickerComponent = _this.showPicker();
15623 };
15624 var eGui = this.getGui();
15625 this.addManagedListener(eGui, 'mousedown', function (e) {
15626 if (!_this.skipClick &&
15627 _this.pickerComponent &&
15628 _this.pickerComponent.isAlive() &&
15629 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["isVisible"])(_this.pickerComponent.getGui()) &&
15630 eGui.contains(e.target)) {
15631 _this.skipClick = true;
15632 }
15633 });
15634 this.addManagedListener(eGui, 'keydown', function (e) {
15635 switch (e.key) {
15636 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].UP:
15637 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].DOWN:
15638 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].ENTER:
15639 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].SPACE:
15640 clickHandler();
15641 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].ESCAPE:
15642 if (_this.isPickerDisplayed) {
15643 e.preventDefault();
15644 }
15645 break;
15646 }
15647 });
15648 this.addManagedListener(this.eWrapper, 'click', clickHandler);
15649 this.addManagedListener(this.eLabel, 'click', clickHandler);
15650 if (this.pickerIcon) {
15651 var icon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIconNoSpan"])(this.pickerIcon, this.gridOptionsService);
15652 if (icon) {
15653 this.eIcon.appendChild(icon);
15654 }
15655 }
15656 };
15657 AgPickerField.prototype.refreshLabel = function () {
15658 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(this.getLabel())) {
15659 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaLabelledBy"])(this.eWrapper, this.getLabelId());
15660 }
15661 else {
15662 this.eWrapper.removeAttribute('aria-labelledby');
15663 }
15664 _super.prototype.refreshLabel.call(this);
15665 };
15666 AgPickerField.prototype.setAriaLabel = function (label) {
15667 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaLabel"])(this.eWrapper, label);
15668 return this;
15669 };
15670 AgPickerField.prototype.setInputWidth = function (width) {
15671 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["setElementWidth"])(this.eWrapper, width);
15672 return this;
15673 };
15674 AgPickerField.prototype.getFocusableElement = function () {
15675 return this.eWrapper;
15676 };
15677 __decorate([
15678 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eLabel')
15679 ], AgPickerField.prototype, "eLabel", void 0);
15680 __decorate([
15681 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eWrapper')
15682 ], AgPickerField.prototype, "eWrapper", void 0);
15683 __decorate([
15684 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eDisplayField')
15685 ], AgPickerField.prototype, "eDisplayField", void 0);
15686 __decorate([
15687 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eIcon')
15688 ], AgPickerField.prototype, "eIcon", void 0);
15689 return AgPickerField;
15690}(_agAbstractField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractField"]));
15691
15692
15693
15694/***/ }),
15695/* 70 */
15696/***/ (function(module, __webpack_exports__, __webpack_require__) {
15697
15698"use strict";
15699__webpack_require__.r(__webpack_exports__);
15700/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgList", function() { return AgList; });
15701/* harmony import */ var _agAbstractField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67);
15702/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38);
15703/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
15704/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31);
15705/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48);
15706/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41);
15707/**
15708 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15709 * @version v29.2.0
15710 * @link https://www.ag-grid.com/
15711 * @license MIT
15712 */
15713var __extends = (undefined && undefined.__extends) || (function () {
15714 var extendStatics = function (d, b) {
15715 extendStatics = Object.setPrototypeOf ||
15716 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15717 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
15718 return extendStatics(d, b);
15719 };
15720 return function (d, b) {
15721 extendStatics(d, b);
15722 function __() { this.constructor = d; }
15723 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15724 };
15725})();
15726var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15727 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15728 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15729 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;
15730 return c > 3 && r && Object.defineProperty(target, key, r), r;
15731};
15732
15733
15734
15735
15736
15737
15738var AgList = /** @class */ (function (_super) {
15739 __extends(AgList, _super);
15740 function AgList(cssIdentifier) {
15741 if (cssIdentifier === void 0) { cssIdentifier = 'default'; }
15742 var _this = _super.call(this, /* html */ "<div class=\"ag-list ag-" + cssIdentifier + "-list\" role=\"listbox\"></div>") || this;
15743 _this.cssIdentifier = cssIdentifier;
15744 _this.options = [];
15745 _this.itemEls = [];
15746 return _this;
15747 }
15748 AgList.prototype.init = function () {
15749 this.addManagedListener(this.getGui(), 'keydown', this.handleKeyDown.bind(this));
15750 };
15751 AgList.prototype.handleKeyDown = function (e) {
15752 var key = e.key;
15753 switch (key) {
15754 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].ENTER:
15755 if (!this.highlightedEl) {
15756 this.setValue(this.getValue());
15757 }
15758 else {
15759 var pos = this.itemEls.indexOf(this.highlightedEl);
15760 this.setValueByIndex(pos);
15761 }
15762 break;
15763 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].DOWN:
15764 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].UP:
15765 var isDown = key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].DOWN;
15766 var itemToHighlight = void 0;
15767 e.preventDefault();
15768 if (!this.highlightedEl) {
15769 itemToHighlight = this.itemEls[isDown ? 0 : this.itemEls.length - 1];
15770 }
15771 else {
15772 var currentIdx = this.itemEls.indexOf(this.highlightedEl);
15773 var nextPos = currentIdx + (isDown ? 1 : -1);
15774 nextPos = Math.min(Math.max(nextPos, 0), this.itemEls.length - 1);
15775 itemToHighlight = this.itemEls[nextPos];
15776 }
15777 this.highlightItem(itemToHighlight);
15778 break;
15779 }
15780 };
15781 AgList.prototype.addOptions = function (listOptions) {
15782 var _this = this;
15783 listOptions.forEach(function (listOption) { return _this.addOption(listOption); });
15784 return this;
15785 };
15786 AgList.prototype.addOption = function (listOption) {
15787 var value = listOption.value, text = listOption.text;
15788 var sanitisedText = Object(_utils_string__WEBPACK_IMPORTED_MODULE_3__["escapeString"])(text || value);
15789 this.options.push({ value: value, text: sanitisedText });
15790 this.renderOption(value, sanitisedText);
15791 this.updateIndices();
15792 return this;
15793 };
15794 AgList.prototype.updateIndices = function () {
15795 var options = this.getGui().querySelectorAll('.ag-list-item');
15796 options.forEach(function (option, idx) {
15797 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaPosInSet"])(option, idx + 1);
15798 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaSetSize"])(option, options.length);
15799 });
15800 };
15801 AgList.prototype.renderOption = function (value, text) {
15802 var _this = this;
15803 var itemEl = document.createElement('div');
15804 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaRole"])(itemEl, 'option');
15805 itemEl.classList.add('ag-list-item', "ag-" + this.cssIdentifier + "-list-item");
15806 itemEl.innerHTML = "<span>" + text + "</span>";
15807 itemEl.tabIndex = -1;
15808 this.itemEls.push(itemEl);
15809 this.addManagedListener(itemEl, 'mouseover', function () { return _this.highlightItem(itemEl); });
15810 this.addManagedListener(itemEl, 'mouseleave', function () { return _this.clearHighlighted(); });
15811 this.addManagedListener(itemEl, 'click', function () { return _this.setValue(value); });
15812 this.getGui().appendChild(itemEl);
15813 };
15814 AgList.prototype.setValue = function (value, silent) {
15815 if (this.value === value) {
15816 this.fireItemSelected();
15817 return this;
15818 }
15819 if (value == null) {
15820 this.reset();
15821 return this;
15822 }
15823 var idx = this.options.findIndex(function (option) { return option.value === value; });
15824 if (idx !== -1) {
15825 var option = this.options[idx];
15826 this.value = option.value;
15827 this.displayValue = option.text != null ? option.text : option.value;
15828 this.highlightItem(this.itemEls[idx]);
15829 if (!silent) {
15830 this.fireChangeEvent();
15831 }
15832 }
15833 return this;
15834 };
15835 AgList.prototype.setValueByIndex = function (idx) {
15836 return this.setValue(this.options[idx].value);
15837 };
15838 AgList.prototype.getValue = function () {
15839 return this.value;
15840 };
15841 AgList.prototype.getDisplayValue = function () {
15842 return this.displayValue;
15843 };
15844 AgList.prototype.refreshHighlighted = function () {
15845 var _this = this;
15846 this.clearHighlighted();
15847 var idx = this.options.findIndex(function (option) { return option.value === _this.value; });
15848 if (idx !== -1) {
15849 this.highlightItem(this.itemEls[idx]);
15850 }
15851 };
15852 AgList.prototype.reset = function () {
15853 this.value = null;
15854 this.displayValue = null;
15855 this.clearHighlighted();
15856 this.fireChangeEvent();
15857 };
15858 AgList.prototype.highlightItem = function (el) {
15859 if (!el.offsetParent) {
15860 return;
15861 }
15862 this.clearHighlighted();
15863 this.highlightedEl = el;
15864 this.highlightedEl.classList.add(AgList.ACTIVE_CLASS);
15865 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaSelected"])(this.highlightedEl, true);
15866 this.highlightedEl.focus();
15867 };
15868 AgList.prototype.clearHighlighted = function () {
15869 if (!this.highlightedEl || !this.highlightedEl.offsetParent) {
15870 return;
15871 }
15872 this.highlightedEl.classList.remove(AgList.ACTIVE_CLASS);
15873 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaSelected"])(this.highlightedEl, false);
15874 this.highlightedEl = null;
15875 };
15876 AgList.prototype.fireChangeEvent = function () {
15877 this.dispatchEvent({ type: _agAbstractField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractField"].EVENT_CHANGED });
15878 this.fireItemSelected();
15879 };
15880 AgList.prototype.fireItemSelected = function () {
15881 this.dispatchEvent({ type: AgList.EVENT_ITEM_SELECTED });
15882 };
15883 AgList.EVENT_ITEM_SELECTED = 'selectedItem';
15884 AgList.ACTIVE_CLASS = 'ag-active-item';
15885 __decorate([
15886 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
15887 ], AgList.prototype, "init", null);
15888 return AgList;
15889}(_component__WEBPACK_IMPORTED_MODULE_1__["Component"]));
15890
15891
15892
15893/***/ }),
15894/* 71 */
15895/***/ (function(module, __webpack_exports__, __webpack_require__) {
15896
15897"use strict";
15898__webpack_require__.r(__webpack_exports__);
15899/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgRadioButton", function() { return AgRadioButton; });
15900/* harmony import */ var _agCheckbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72);
15901/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26);
15902/**
15903 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15904 * @version v29.2.0
15905 * @link https://www.ag-grid.com/
15906 * @license MIT
15907 */
15908var __extends = (undefined && undefined.__extends) || (function () {
15909 var extendStatics = function (d, b) {
15910 extendStatics = Object.setPrototypeOf ||
15911 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15912 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
15913 return extendStatics(d, b);
15914 };
15915 return function (d, b) {
15916 extendStatics(d, b);
15917 function __() { this.constructor = d; }
15918 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15919 };
15920})();
15921
15922
15923var AgRadioButton = /** @class */ (function (_super) {
15924 __extends(AgRadioButton, _super);
15925 function AgRadioButton(config) {
15926 return _super.call(this, config, 'ag-radio-button', 'radio') || this;
15927 }
15928 AgRadioButton.prototype.isSelected = function () {
15929 return this.eInput.checked;
15930 };
15931 AgRadioButton.prototype.toggle = function () {
15932 if (this.eInput.disabled) {
15933 return;
15934 }
15935 // do not allow an active radio button to be deselected
15936 if (!this.isSelected()) {
15937 this.setValue(true);
15938 }
15939 };
15940 AgRadioButton.prototype.addInputListeners = function () {
15941 _super.prototype.addInputListeners.call(this);
15942 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CHECKBOX_CHANGED, this.onChange.bind(this));
15943 };
15944 /**
15945 * This ensures that if another radio button in the same named group is selected, we deselect this radio button.
15946 * By default the browser does this for you, but we are managing classes ourselves in order to ensure input
15947 * elements are styled correctly in IE11, and the DOM 'changed' event is only fired when a button is selected,
15948 * not deselected, so we need to use our own event.
15949 */
15950 AgRadioButton.prototype.onChange = function (event) {
15951 if (event.selected &&
15952 event.name &&
15953 this.eInput.name &&
15954 this.eInput.name === event.name &&
15955 event.id &&
15956 this.eInput.id !== event.id) {
15957 this.setValue(false, true);
15958 }
15959 };
15960 return AgRadioButton;
15961}(_agCheckbox__WEBPACK_IMPORTED_MODULE_0__["AgCheckbox"]));
15962
15963
15964
15965/***/ }),
15966/* 72 */
15967/***/ (function(module, __webpack_exports__, __webpack_require__) {
15968
15969"use strict";
15970__webpack_require__.r(__webpack_exports__);
15971/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgCheckbox", function() { return AgCheckbox; });
15972/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
15973/* harmony import */ var _agAbstractInputField__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73);
15974/**
15975 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
15976 * @version v29.2.0
15977 * @link https://www.ag-grid.com/
15978 * @license MIT
15979 */
15980var __extends = (undefined && undefined.__extends) || (function () {
15981 var extendStatics = function (d, b) {
15982 extendStatics = Object.setPrototypeOf ||
15983 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15984 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
15985 return extendStatics(d, b);
15986 };
15987 return function (d, b) {
15988 extendStatics(d, b);
15989 function __() { this.constructor = d; }
15990 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15991 };
15992})();
15993
15994
15995var AgCheckbox = /** @class */ (function (_super) {
15996 __extends(AgCheckbox, _super);
15997 function AgCheckbox(config, className, inputType) {
15998 if (className === void 0) { className = 'ag-checkbox'; }
15999 if (inputType === void 0) { inputType = 'checkbox'; }
16000 var _this = _super.call(this, config, className, inputType) || this;
16001 _this.labelAlignment = 'right';
16002 _this.selected = false;
16003 _this.readOnly = false;
16004 _this.passive = false;
16005 return _this;
16006 }
16007 AgCheckbox.prototype.addInputListeners = function () {
16008 this.addManagedListener(this.eInput, 'click', this.onCheckboxClick.bind(this));
16009 this.addManagedListener(this.eLabel, 'click', this.toggle.bind(this));
16010 };
16011 AgCheckbox.prototype.getNextValue = function () {
16012 return this.selected === undefined ? true : !this.selected;
16013 };
16014 AgCheckbox.prototype.setPassive = function (passive) {
16015 this.passive = passive;
16016 };
16017 AgCheckbox.prototype.isReadOnly = function () {
16018 return this.readOnly;
16019 };
16020 AgCheckbox.prototype.setReadOnly = function (readOnly) {
16021 this.eWrapper.classList.toggle('ag-disabled', readOnly);
16022 this.eInput.disabled = readOnly;
16023 this.readOnly = readOnly;
16024 };
16025 AgCheckbox.prototype.setDisabled = function (disabled) {
16026 this.eWrapper.classList.toggle('ag-disabled', disabled);
16027 return _super.prototype.setDisabled.call(this, disabled);
16028 };
16029 AgCheckbox.prototype.toggle = function () {
16030 if (this.eInput.disabled) {
16031 return;
16032 }
16033 var previousValue = this.isSelected();
16034 var nextValue = this.getNextValue();
16035 if (this.passive) {
16036 this.dispatchChange(nextValue, previousValue);
16037 }
16038 else {
16039 this.setValue(nextValue);
16040 }
16041 };
16042 AgCheckbox.prototype.getValue = function () {
16043 return this.isSelected();
16044 };
16045 AgCheckbox.prototype.setValue = function (value, silent) {
16046 this.refreshSelectedClass(value);
16047 this.setSelected(value, silent);
16048 return this;
16049 };
16050 AgCheckbox.prototype.setName = function (name) {
16051 var input = this.getInputElement();
16052 input.name = name;
16053 return this;
16054 };
16055 AgCheckbox.prototype.isSelected = function () {
16056 return this.selected;
16057 };
16058 AgCheckbox.prototype.setSelected = function (selected, silent) {
16059 if (this.isSelected() === selected) {
16060 return;
16061 }
16062 this.previousValue = this.isSelected();
16063 selected = this.selected = typeof selected === 'boolean' ? selected : undefined;
16064 this.eInput.checked = selected;
16065 this.eInput.indeterminate = selected === undefined;
16066 if (!silent) {
16067 this.dispatchChange(this.selected, this.previousValue);
16068 }
16069 };
16070 AgCheckbox.prototype.dispatchChange = function (selected, previousValue, event) {
16071 this.dispatchEvent({ type: AgCheckbox.EVENT_CHANGED, selected: selected, previousValue: previousValue, event: event });
16072 var input = this.getInputElement();
16073 var checkboxChangedEvent = {
16074 type: _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CHECKBOX_CHANGED,
16075 id: input.id,
16076 name: input.name,
16077 selected: selected,
16078 previousValue: previousValue
16079 };
16080 this.eventService.dispatchEvent(checkboxChangedEvent);
16081 };
16082 AgCheckbox.prototype.onCheckboxClick = function (e) {
16083 if (this.passive || this.eInput.disabled) {
16084 return;
16085 }
16086 var previousValue = this.isSelected();
16087 var selected = this.selected = e.target.checked;
16088 this.refreshSelectedClass(selected);
16089 this.dispatchChange(selected, previousValue, e);
16090 };
16091 AgCheckbox.prototype.refreshSelectedClass = function (value) {
16092 this.eWrapper.classList.toggle('ag-checked', value === true);
16093 this.eWrapper.classList.toggle('ag-indeterminate', value == null);
16094 };
16095 return AgCheckbox;
16096}(_agAbstractInputField__WEBPACK_IMPORTED_MODULE_1__["AgAbstractInputField"]));
16097
16098
16099
16100/***/ }),
16101/* 73 */
16102/***/ (function(module, __webpack_exports__, __webpack_require__) {
16103
16104"use strict";
16105__webpack_require__.r(__webpack_exports__);
16106/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgAbstractInputField", function() { return AgAbstractInputField; });
16107/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
16108/* harmony import */ var _agAbstractField__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67);
16109/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
16110/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41);
16111/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
16112/**
16113 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16114 * @version v29.2.0
16115 * @link https://www.ag-grid.com/
16116 * @license MIT
16117 */
16118var __extends = (undefined && undefined.__extends) || (function () {
16119 var extendStatics = function (d, b) {
16120 extendStatics = Object.setPrototypeOf ||
16121 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16122 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
16123 return extendStatics(d, b);
16124 };
16125 return function (d, b) {
16126 extendStatics(d, b);
16127 function __() { this.constructor = d; }
16128 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16129 };
16130})();
16131var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16132 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16133 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16134 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;
16135 return c > 3 && r && Object.defineProperty(target, key, r), r;
16136};
16137
16138
16139
16140
16141
16142var AgAbstractInputField = /** @class */ (function (_super) {
16143 __extends(AgAbstractInputField, _super);
16144 function AgAbstractInputField(config, className, inputType, displayFieldTag) {
16145 if (inputType === void 0) { inputType = 'text'; }
16146 if (displayFieldTag === void 0) { displayFieldTag = 'input'; }
16147 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;
16148 _this.inputType = inputType;
16149 _this.displayFieldTag = displayFieldTag;
16150 return _this;
16151 }
16152 AgAbstractInputField.prototype.postConstruct = function () {
16153 _super.prototype.postConstruct.call(this);
16154 this.setInputType();
16155 this.eLabel.classList.add(this.className + "-label");
16156 this.eWrapper.classList.add(this.className + "-input-wrapper");
16157 this.eInput.classList.add(this.className + "-input");
16158 this.addCssClass('ag-input-field');
16159 this.eInput.id = this.eInput.id || "ag-" + this.getCompId() + "-input";
16160 var _a = this.config, width = _a.width, value = _a.value;
16161 if (width != null) {
16162 this.setWidth(width);
16163 }
16164 if (value != null) {
16165 this.setValue(value);
16166 }
16167 this.addInputListeners();
16168 };
16169 AgAbstractInputField.prototype.refreshLabel = function () {
16170 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(this.getLabel())) {
16171 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaLabelledBy"])(this.eInput, this.getLabelId());
16172 }
16173 else {
16174 this.eInput.removeAttribute('aria-labelledby');
16175 }
16176 _super.prototype.refreshLabel.call(this);
16177 };
16178 AgAbstractInputField.prototype.addInputListeners = function () {
16179 var _this = this;
16180 this.addManagedListener(this.eInput, 'input', function (e) { return _this.setValue(e.target.value); });
16181 };
16182 AgAbstractInputField.prototype.setInputType = function () {
16183 if (this.displayFieldTag === 'input') {
16184 this.eInput.setAttribute('type', this.inputType);
16185 }
16186 };
16187 AgAbstractInputField.prototype.getInputElement = function () {
16188 return this.eInput;
16189 };
16190 AgAbstractInputField.prototype.setInputWidth = function (width) {
16191 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setElementWidth"])(this.eWrapper, width);
16192 return this;
16193 };
16194 AgAbstractInputField.prototype.setInputName = function (name) {
16195 this.getInputElement().setAttribute('name', name);
16196 return this;
16197 };
16198 AgAbstractInputField.prototype.getFocusableElement = function () {
16199 return this.eInput;
16200 };
16201 AgAbstractInputField.prototype.setMaxLength = function (length) {
16202 var eInput = this.eInput;
16203 eInput.maxLength = length;
16204 return this;
16205 };
16206 AgAbstractInputField.prototype.setInputPlaceholder = function (placeholder) {
16207 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["addOrRemoveAttribute"])(this.eInput, 'placeholder', placeholder);
16208 return this;
16209 };
16210 AgAbstractInputField.prototype.setInputAriaLabel = function (label) {
16211 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaLabel"])(this.eInput, label);
16212 return this;
16213 };
16214 AgAbstractInputField.prototype.setDisabled = function (disabled) {
16215 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisabled"])(this.eInput, disabled);
16216 return _super.prototype.setDisabled.call(this, disabled);
16217 };
16218 __decorate([
16219 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eLabel')
16220 ], AgAbstractInputField.prototype, "eLabel", void 0);
16221 __decorate([
16222 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eWrapper')
16223 ], AgAbstractInputField.prototype, "eWrapper", void 0);
16224 __decorate([
16225 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eInput')
16226 ], AgAbstractInputField.prototype, "eInput", void 0);
16227 return AgAbstractInputField;
16228}(_agAbstractField__WEBPACK_IMPORTED_MODULE_1__["AgAbstractField"]));
16229
16230
16231
16232/***/ }),
16233/* 74 */
16234/***/ (function(module, __webpack_exports__, __webpack_require__) {
16235
16236"use strict";
16237__webpack_require__.r(__webpack_exports__);
16238/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScalarFilter", function() { return ScalarFilter; });
16239/* harmony import */ var _simpleFilter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60);
16240/**
16241 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16242 * @version v29.2.0
16243 * @link https://www.ag-grid.com/
16244 * @license MIT
16245 */
16246var __extends = (undefined && undefined.__extends) || (function () {
16247 var extendStatics = function (d, b) {
16248 extendStatics = Object.setPrototypeOf ||
16249 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16250 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
16251 return extendStatics(d, b);
16252 };
16253 return function (d, b) {
16254 extendStatics(d, b);
16255 function __() { this.constructor = d; }
16256 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16257 };
16258})();
16259
16260var ScalarFilter = /** @class */ (function (_super) {
16261 __extends(ScalarFilter, _super);
16262 function ScalarFilter() {
16263 return _super !== null && _super.apply(this, arguments) || this;
16264 }
16265 ScalarFilter.prototype.setParams = function (params) {
16266 _super.prototype.setParams.call(this, params);
16267 this.scalarFilterParams = params;
16268 };
16269 ScalarFilter.prototype.evaluateNullValue = function (filterType) {
16270 switch (filterType) {
16271 case ScalarFilter.EQUALS:
16272 case ScalarFilter.NOT_EQUAL:
16273 if (this.scalarFilterParams.includeBlanksInEquals) {
16274 return true;
16275 }
16276 break;
16277 case ScalarFilter.GREATER_THAN:
16278 case ScalarFilter.GREATER_THAN_OR_EQUAL:
16279 if (this.scalarFilterParams.includeBlanksInGreaterThan) {
16280 return true;
16281 }
16282 break;
16283 case ScalarFilter.LESS_THAN:
16284 case ScalarFilter.LESS_THAN_OR_EQUAL:
16285 if (this.scalarFilterParams.includeBlanksInLessThan) {
16286 return true;
16287 }
16288 break;
16289 case ScalarFilter.IN_RANGE:
16290 if (this.scalarFilterParams.includeBlanksInRange) {
16291 return true;
16292 }
16293 break;
16294 case ScalarFilter.BLANK:
16295 return true;
16296 case ScalarFilter.NOT_BLANK:
16297 return false;
16298 }
16299 return false;
16300 };
16301 ScalarFilter.prototype.evaluateNonNullValue = function (values, cellValue, filterModel) {
16302 var comparator = this.comparator();
16303 var compareResult = values[0] != null ? comparator(values[0], cellValue) : 0;
16304 switch (filterModel.type) {
16305 case ScalarFilter.EQUALS:
16306 return compareResult === 0;
16307 case ScalarFilter.NOT_EQUAL:
16308 return compareResult !== 0;
16309 case ScalarFilter.GREATER_THAN:
16310 return compareResult > 0;
16311 case ScalarFilter.GREATER_THAN_OR_EQUAL:
16312 return compareResult >= 0;
16313 case ScalarFilter.LESS_THAN:
16314 return compareResult < 0;
16315 case ScalarFilter.LESS_THAN_OR_EQUAL:
16316 return compareResult <= 0;
16317 case ScalarFilter.IN_RANGE: {
16318 var compareToResult = comparator(values[1], cellValue);
16319 return this.scalarFilterParams.inRangeInclusive ?
16320 compareResult >= 0 && compareToResult <= 0 :
16321 compareResult > 0 && compareToResult < 0;
16322 }
16323 case ScalarFilter.BLANK:
16324 return this.isBlank(cellValue);
16325 case ScalarFilter.NOT_BLANK:
16326 return !this.isBlank(cellValue);
16327 default:
16328 console.warn('AG Grid: Unexpected type of filter "' + filterModel.type + '", it looks like the filter was configured with incorrect Filter Options');
16329 return true;
16330 }
16331 };
16332 return ScalarFilter;
16333}(_simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"]));
16334
16335
16336
16337/***/ }),
16338/* 75 */
16339/***/ (function(module, __webpack_exports__, __webpack_require__) {
16340
16341"use strict";
16342__webpack_require__.r(__webpack_exports__);
16343/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateFloatingFilter", function() { return DateFloatingFilter; });
16344/* harmony import */ var _dateFilter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58);
16345/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
16346/* harmony import */ var _dateCompWrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59);
16347/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57);
16348/* harmony import */ var _floating_provided_simpleFloatingFilter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76);
16349/* harmony import */ var _providedFilter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(62);
16350/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45);
16351/* harmony import */ var _utils_date__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(43);
16352/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(13);
16353/**
16354 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16355 * @version v29.2.0
16356 * @link https://www.ag-grid.com/
16357 * @license MIT
16358 */
16359var __extends = (undefined && undefined.__extends) || (function () {
16360 var extendStatics = function (d, b) {
16361 extendStatics = Object.setPrototypeOf ||
16362 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16363 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
16364 return extendStatics(d, b);
16365 };
16366 return function (d, b) {
16367 extendStatics(d, b);
16368 function __() { this.constructor = d; }
16369 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16370 };
16371})();
16372var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16373 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16374 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16375 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;
16376 return c > 3 && r && Object.defineProperty(target, key, r), r;
16377};
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387var DateFloatingFilter = /** @class */ (function (_super) {
16388 __extends(DateFloatingFilter, _super);
16389 function DateFloatingFilter() {
16390 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;
16391 }
16392 DateFloatingFilter.prototype.getDefaultFilterOptions = function () {
16393 return _dateFilter__WEBPACK_IMPORTED_MODULE_0__["DateFilter"].DEFAULT_FILTER_OPTIONS;
16394 };
16395 DateFloatingFilter.prototype.init = function (params) {
16396 _super.prototype.init.call(this, params);
16397 this.params = params;
16398 this.filterParams = params.filterParams;
16399 this.createDateComponent();
16400 var translate = this.localeService.getLocaleTextFunc();
16401 this.eReadOnlyText
16402 .setDisabled(true)
16403 .setInputAriaLabel(translate('ariaDateFilterInput', 'Date Filter Input'));
16404 this.filterModelFormatter = new _dateFilter__WEBPACK_IMPORTED_MODULE_0__["DateFilterModelFormatter"](this.filterParams, this.localeService, this.optionsFactory);
16405 };
16406 DateFloatingFilter.prototype.setEditable = function (editable) {
16407 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["setDisplayed"])(this.eDateWrapper, editable);
16408 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["setDisplayed"])(this.eReadOnlyText.getGui(), !editable);
16409 };
16410 DateFloatingFilter.prototype.onParentModelChanged = function (model, event) {
16411 // We don't want to update the floating filter if the floating filter caused the change,
16412 // because the UI is already in sync. if we didn't do this, the UI would behave strangely
16413 // as it would be updating as the user is typing.
16414 // This is similar for data changes, which don't affect provided date floating filters
16415 if (this.isEventFromFloatingFilter(event) || this.isEventFromDataChange(event)) {
16416 return;
16417 }
16418 _super.prototype.setLastTypeFromModel.call(this, model);
16419 var allowEditing = !this.isReadOnly() &&
16420 this.canWeEditAfterModelFromParentFilter(model);
16421 this.setEditable(allowEditing);
16422 if (allowEditing) {
16423 if (model) {
16424 var dateModel = model;
16425 this.dateComp.setDate(Object(_utils_date__WEBPACK_IMPORTED_MODULE_7__["parseDateTimeFromString"])(dateModel.dateFrom));
16426 }
16427 else {
16428 this.dateComp.setDate(null);
16429 }
16430 this.eReadOnlyText.setValue('');
16431 }
16432 else {
16433 this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(model));
16434 this.dateComp.setDate(null);
16435 }
16436 };
16437 DateFloatingFilter.prototype.onDateChanged = function () {
16438 var _this = this;
16439 var filterValueDate = this.dateComp.getDate();
16440 var filterValueText = Object(_utils_date__WEBPACK_IMPORTED_MODULE_7__["serialiseDate"])(filterValueDate);
16441 this.params.parentFilterInstance(function (filterInstance) {
16442 if (filterInstance) {
16443 var date = Object(_utils_date__WEBPACK_IMPORTED_MODULE_7__["parseDateTimeFromString"])(filterValueText);
16444 filterInstance.onFloatingFilterChanged(_this.getLastType() || null, date);
16445 }
16446 });
16447 };
16448 DateFloatingFilter.prototype.createDateComponent = function () {
16449 var _this = this;
16450 var debounceMs = _providedFilter__WEBPACK_IMPORTED_MODULE_5__["ProvidedFilter"].getDebounceMs(this.params.filterParams, this.getDefaultDebounceMs());
16451 var dateComponentParams = {
16452 onDateChanged: Object(_utils_function__WEBPACK_IMPORTED_MODULE_8__["debounce"])(this.onDateChanged.bind(this), debounceMs),
16453 filterParams: this.params.column.getColDef().filterParams
16454 };
16455 this.dateComp = new _dateCompWrapper__WEBPACK_IMPORTED_MODULE_2__["DateCompWrapper"](this.getContext(), this.userComponentFactory, dateComponentParams, this.eDateWrapper);
16456 this.addDestroyFunc(function () { return _this.dateComp.destroy(); });
16457 };
16458 DateFloatingFilter.prototype.getFilterModelFormatter = function () {
16459 return this.filterModelFormatter;
16460 };
16461 __decorate([
16462 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('userComponentFactory')
16463 ], DateFloatingFilter.prototype, "userComponentFactory", void 0);
16464 __decorate([
16465 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eReadOnlyText')
16466 ], DateFloatingFilter.prototype, "eReadOnlyText", void 0);
16467 __decorate([
16468 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eDateWrapper')
16469 ], DateFloatingFilter.prototype, "eDateWrapper", void 0);
16470 return DateFloatingFilter;
16471}(_floating_provided_simpleFloatingFilter__WEBPACK_IMPORTED_MODULE_4__["SimpleFloatingFilter"]));
16472
16473
16474
16475/***/ }),
16476/* 76 */
16477/***/ (function(module, __webpack_exports__, __webpack_require__) {
16478
16479"use strict";
16480__webpack_require__.r(__webpack_exports__);
16481/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleFloatingFilter", function() { return SimpleFloatingFilter; });
16482/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
16483/* harmony import */ var _provided_simpleFilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60);
16484/* harmony import */ var _provided_optionsFactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61);
16485/**
16486 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16487 * @version v29.2.0
16488 * @link https://www.ag-grid.com/
16489 * @license MIT
16490 */
16491var __extends = (undefined && undefined.__extends) || (function () {
16492 var extendStatics = function (d, b) {
16493 extendStatics = Object.setPrototypeOf ||
16494 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16495 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
16496 return extendStatics(d, b);
16497 };
16498 return function (d, b) {
16499 extendStatics(d, b);
16500 function __() { this.constructor = d; }
16501 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16502 };
16503})();
16504
16505
16506
16507var SimpleFloatingFilter = /** @class */ (function (_super) {
16508 __extends(SimpleFloatingFilter, _super);
16509 function SimpleFloatingFilter() {
16510 return _super !== null && _super.apply(this, arguments) || this;
16511 }
16512 SimpleFloatingFilter.prototype.getDefaultDebounceMs = function () {
16513 return 0;
16514 };
16515 // this is a user component, and IComponent has "public destroy()" as part of the interface.
16516 // so we need to override destroy() just to make the method public.
16517 SimpleFloatingFilter.prototype.destroy = function () {
16518 _super.prototype.destroy.call(this);
16519 };
16520 SimpleFloatingFilter.prototype.isEventFromFloatingFilter = function (event) {
16521 return event && event.afterFloatingFilter;
16522 };
16523 SimpleFloatingFilter.prototype.isEventFromDataChange = function (event) {
16524 return event === null || event === void 0 ? void 0 : event.afterDataChange;
16525 };
16526 SimpleFloatingFilter.prototype.getLastType = function () {
16527 return this.lastType;
16528 };
16529 SimpleFloatingFilter.prototype.isReadOnly = function () {
16530 return this.readOnly;
16531 };
16532 SimpleFloatingFilter.prototype.setLastTypeFromModel = function (model) {
16533 // if no model provided by the parent filter use default
16534 if (!model) {
16535 this.lastType = this.optionsFactory.getDefaultOption();
16536 return;
16537 }
16538 var isCombined = model.operator;
16539 var condition;
16540 if (isCombined) {
16541 var combinedModel = model;
16542 condition = combinedModel.conditions[0];
16543 }
16544 else {
16545 condition = model;
16546 }
16547 this.lastType = condition.type;
16548 };
16549 SimpleFloatingFilter.prototype.canWeEditAfterModelFromParentFilter = function (model) {
16550 if (!model) {
16551 // if no model, then we can edit as long as the lastType is something we can edit, as this
16552 // is the type we will provide to the parent filter if the user decides to use the floating filter.
16553 return this.isTypeEditable(this.lastType);
16554 }
16555 // never allow editing if the filter is combined (ie has two parts)
16556 var isCombined = model.operator;
16557 if (isCombined) {
16558 return false;
16559 }
16560 var simpleModel = model;
16561 return this.isTypeEditable(simpleModel.type);
16562 };
16563 SimpleFloatingFilter.prototype.init = function (params) {
16564 this.optionsFactory = new _provided_optionsFactory__WEBPACK_IMPORTED_MODULE_2__["OptionsFactory"]();
16565 this.optionsFactory.init(params.filterParams, this.getDefaultFilterOptions());
16566 this.lastType = this.optionsFactory.getDefaultOption();
16567 // readOnly is a property of ProvidedFilterParams - we need to find a better (type-safe)
16568 // way to support reading this in the future.
16569 this.readOnly = !!params.filterParams.readOnly;
16570 // we are editable if:
16571 // 1) there is a type (user has configured filter wrong if not type)
16572 // AND
16573 // 2) the default type is not 'in range'
16574 var editable = this.isTypeEditable(this.lastType);
16575 this.setEditable(editable);
16576 };
16577 SimpleFloatingFilter.prototype.doesFilterHaveSingleInput = function (filterType) {
16578 var customFilterOption = this.optionsFactory.getCustomOption(filterType);
16579 var numberOfInputs = (customFilterOption || {}).numberOfInputs;
16580 return numberOfInputs == null || numberOfInputs == 1;
16581 };
16582 SimpleFloatingFilter.prototype.isTypeEditable = function (type) {
16583 var uneditableTypes = [
16584 _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,
16585 ];
16586 return !!type &&
16587 !this.isReadOnly() &&
16588 this.doesFilterHaveSingleInput(type) &&
16589 uneditableTypes.indexOf(type) < 0;
16590 };
16591 return SimpleFloatingFilter;
16592}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
16593
16594
16595
16596/***/ }),
16597/* 77 */
16598/***/ (function(module, __webpack_exports__, __webpack_require__) {
16599
16600"use strict";
16601__webpack_require__.r(__webpack_exports__);
16602/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultDateComponent", function() { return DefaultDateComponent; });
16603/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
16604/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
16605/* harmony import */ var _utils_date__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43);
16606/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
16607/**
16608 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16609 * @version v29.2.0
16610 * @link https://www.ag-grid.com/
16611 * @license MIT
16612 */
16613var __extends = (undefined && undefined.__extends) || (function () {
16614 var extendStatics = function (d, b) {
16615 extendStatics = Object.setPrototypeOf ||
16616 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16617 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
16618 return extendStatics(d, b);
16619 };
16620 return function (d, b) {
16621 extendStatics(d, b);
16622 function __() { this.constructor = d; }
16623 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16624 };
16625})();
16626var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16627 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16628 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16629 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;
16630 return c > 3 && r && Object.defineProperty(target, key, r), r;
16631};
16632
16633
16634
16635
16636var DefaultDateComponent = /** @class */ (function (_super) {
16637 __extends(DefaultDateComponent, _super);
16638 function DefaultDateComponent() {
16639 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;
16640 }
16641 // this is a user component, and IComponent has "public destroy()" as part of the interface.
16642 // so we need to override destroy() just to make the method public.
16643 DefaultDateComponent.prototype.destroy = function () {
16644 _super.prototype.destroy.call(this);
16645 };
16646 DefaultDateComponent.prototype.init = function (params) {
16647 var _this = this;
16648 var eDocument = this.gridOptionsService.getDocument();
16649 var inputElement = this.eDateInput.getInputElement();
16650 var shouldUseBrowserDatePicker = this.shouldUseBrowserDatePicker(params);
16651 if (shouldUseBrowserDatePicker) {
16652 inputElement.type = 'date';
16653 }
16654 // ensures that the input element is focussed when a clear button is clicked,
16655 // unless using safari as there is no clear button and focus does not work properly
16656 var usingSafariDatePicker = shouldUseBrowserDatePicker && Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isBrowserSafari"])();
16657 this.addManagedListener(inputElement, 'mousedown', function () {
16658 if (_this.eDateInput.isDisabled() || usingSafariDatePicker) {
16659 return;
16660 }
16661 inputElement.focus();
16662 });
16663 this.addManagedListener(inputElement, 'input', function (e) {
16664 if (e.target !== eDocument.activeElement) {
16665 return;
16666 }
16667 if (_this.eDateInput.isDisabled()) {
16668 return;
16669 }
16670 params.onDateChanged();
16671 });
16672 var _a = params.filterParams || {}, minValidYear = _a.minValidYear, maxValidYear = _a.maxValidYear;
16673 if (minValidYear) {
16674 inputElement.min = minValidYear + "-01-01";
16675 }
16676 if (maxValidYear) {
16677 inputElement.max = maxValidYear + "-12-31";
16678 }
16679 };
16680 DefaultDateComponent.prototype.getDate = function () {
16681 return Object(_utils_date__WEBPACK_IMPORTED_MODULE_2__["parseDateTimeFromString"])(this.eDateInput.getValue());
16682 };
16683 DefaultDateComponent.prototype.setDate = function (date) {
16684 this.eDateInput.setValue(Object(_utils_date__WEBPACK_IMPORTED_MODULE_2__["serialiseDate"])(date, false));
16685 };
16686 DefaultDateComponent.prototype.setInputPlaceholder = function (placeholder) {
16687 this.eDateInput.setInputPlaceholder(placeholder);
16688 };
16689 DefaultDateComponent.prototype.setDisabled = function (disabled) {
16690 this.eDateInput.setDisabled(disabled);
16691 };
16692 DefaultDateComponent.prototype.afterGuiAttached = function (params) {
16693 if (!params || !params.suppressFocus) {
16694 this.eDateInput.getInputElement().focus();
16695 }
16696 };
16697 DefaultDateComponent.prototype.shouldUseBrowserDatePicker = function (params) {
16698 if (params.filterParams && params.filterParams.browserDatePicker != null) {
16699 return params.filterParams.browserDatePicker;
16700 }
16701 return Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isBrowserChrome"])() || Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isBrowserFirefox"])() || (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isBrowserSafari"])() && Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["getSafariVersion"])() >= 14.1);
16702 };
16703 __decorate([
16704 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eDateInput')
16705 ], DefaultDateComponent.prototype, "eDateInput", void 0);
16706 return DefaultDateComponent;
16707}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
16708
16709
16710
16711/***/ }),
16712/* 78 */
16713/***/ (function(module, __webpack_exports__, __webpack_require__) {
16714
16715"use strict";
16716__webpack_require__.r(__webpack_exports__);
16717/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberFilterModelFormatter", function() { return NumberFilterModelFormatter; });
16718/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllowedCharPattern", function() { return getAllowedCharPattern; });
16719/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberFilter", function() { return NumberFilter; });
16720/* harmony import */ var _simpleFilter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60);
16721/* harmony import */ var _scalarFilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74);
16722/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
16723/* harmony import */ var _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(79);
16724/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
16725/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41);
16726/* harmony import */ var _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80);
16727/**
16728 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16729 * @version v29.2.0
16730 * @link https://www.ag-grid.com/
16731 * @license MIT
16732 */
16733var __extends = (undefined && undefined.__extends) || (function () {
16734 var extendStatics = function (d, b) {
16735 extendStatics = Object.setPrototypeOf ||
16736 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16737 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
16738 return extendStatics(d, b);
16739 };
16740 return function (d, b) {
16741 extendStatics(d, b);
16742 function __() { this.constructor = d; }
16743 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16744 };
16745})();
16746
16747
16748
16749
16750
16751
16752
16753var NumberFilterModelFormatter = /** @class */ (function (_super) {
16754 __extends(NumberFilterModelFormatter, _super);
16755 function NumberFilterModelFormatter() {
16756 return _super !== null && _super.apply(this, arguments) || this;
16757 }
16758 NumberFilterModelFormatter.prototype.conditionToString = function (condition, options) {
16759 var numberOfInputs = (options || {}).numberOfInputs;
16760 var isRange = condition.type == _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].IN_RANGE || numberOfInputs === 2;
16761 if (isRange) {
16762 return condition.filter + "-" + condition.filterTo;
16763 }
16764 // cater for when the type doesn't need a value
16765 if (condition.filter != null) {
16766 return "" + condition.filter;
16767 }
16768 return "" + condition.type;
16769 };
16770 return NumberFilterModelFormatter;
16771}(_simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilterModelFormatter"]));
16772
16773function getAllowedCharPattern(filterParams) {
16774 var allowedCharPattern = (filterParams !== null && filterParams !== void 0 ? filterParams : {}).allowedCharPattern;
16775 if (allowedCharPattern) {
16776 return allowedCharPattern;
16777 }
16778 if (!Object(_utils_browser__WEBPACK_IMPORTED_MODULE_4__["isBrowserChrome"])()) {
16779 // only Chrome and Edge (Chromium) have nice HTML5 number field handling, so for other browsers we provide an equivalent
16780 // constraint instead
16781 return '\\d\\-\\.';
16782 }
16783 return null;
16784}
16785var NumberFilter = /** @class */ (function (_super) {
16786 __extends(NumberFilter, _super);
16787 function NumberFilter() {
16788 var _this = _super.call(this, 'numberFilter') || this;
16789 _this.eValuesFrom = [];
16790 _this.eValuesTo = [];
16791 return _this;
16792 }
16793 NumberFilter.prototype.mapValuesFromModel = function (filterModel) {
16794 var _a = filterModel || {}, filter = _a.filter, filterTo = _a.filterTo, type = _a.type;
16795 return [
16796 this.processValue(filter),
16797 this.processValue(filterTo),
16798 ].slice(0, this.getNumberOfInputs(type));
16799 };
16800 NumberFilter.prototype.getDefaultDebounceMs = function () {
16801 return 500;
16802 };
16803 NumberFilter.prototype.comparator = function () {
16804 return function (left, right) {
16805 if (left === right) {
16806 return 0;
16807 }
16808 return left < right ? 1 : -1;
16809 };
16810 };
16811 NumberFilter.prototype.setParams = function (params) {
16812 this.numberFilterParams = params;
16813 _super.prototype.setParams.call(this, params);
16814 this.filterModelFormatter = new NumberFilterModelFormatter(this.localeService, this.optionsFactory);
16815 };
16816 NumberFilter.prototype.getDefaultFilterOptions = function () {
16817 return NumberFilter.DEFAULT_FILTER_OPTIONS;
16818 };
16819 NumberFilter.prototype.createValueElement = function () {
16820 var allowedCharPattern = getAllowedCharPattern(this.numberFilterParams);
16821 var eCondition = document.createElement('div');
16822 eCondition.classList.add('ag-filter-body');
16823 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_5__["setAriaRole"])(eCondition, 'presentation');
16824 this.createFromToElement(eCondition, this.eValuesFrom, 'from', allowedCharPattern);
16825 this.createFromToElement(eCondition, this.eValuesTo, 'to', allowedCharPattern);
16826 return eCondition;
16827 };
16828 NumberFilter.prototype.createFromToElement = function (eCondition, eValues, fromTo, allowedCharPattern) {
16829 var eValue = this.createManagedBean(allowedCharPattern ? new _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_3__["AgInputTextField"]({ allowedCharPattern: allowedCharPattern }) : new _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_6__["AgInputNumberField"]());
16830 eValue.addCssClass("ag-filter-" + fromTo);
16831 eValue.addCssClass('ag-filter-filter');
16832 eValues.push(eValue);
16833 eCondition.appendChild(eValue.getGui());
16834 };
16835 NumberFilter.prototype.removeValueElements = function (startPosition, deleteCount) {
16836 this.removeComponents(this.eValuesFrom, startPosition, deleteCount);
16837 this.removeComponents(this.eValuesTo, startPosition, deleteCount);
16838 };
16839 NumberFilter.prototype.getValues = function (position) {
16840 var _this = this;
16841 var result = [];
16842 this.forEachPositionInput(position, function (element, index, _elPosition, numberOfInputs) {
16843 if (index < numberOfInputs) {
16844 result.push(_this.processValue(_this.stringToFloat(element.getValue())));
16845 }
16846 });
16847 return result;
16848 };
16849 NumberFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {
16850 return aSimple.filter === bSimple.filter
16851 && aSimple.filterTo === bSimple.filterTo
16852 && aSimple.type === bSimple.type;
16853 };
16854 NumberFilter.prototype.getFilterType = function () {
16855 return 'number';
16856 };
16857 NumberFilter.prototype.processValue = function (value) {
16858 if (value == null) {
16859 return null;
16860 }
16861 return isNaN(value) ? null : value;
16862 };
16863 NumberFilter.prototype.stringToFloat = function (value) {
16864 if (typeof value === 'number') {
16865 return value;
16866 }
16867 var filterText = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["makeNull"])(value);
16868 if (filterText != null && filterText.trim() === '') {
16869 filterText = null;
16870 }
16871 if (this.numberFilterParams.numberParser) {
16872 return this.numberFilterParams.numberParser(filterText);
16873 }
16874 return filterText == null || filterText.trim() === '-' ? null : parseFloat(filterText);
16875 };
16876 NumberFilter.prototype.createCondition = function (position) {
16877 var type = this.getConditionType(position);
16878 var model = {
16879 filterType: this.getFilterType(),
16880 type: type
16881 };
16882 var values = this.getValues(position);
16883 if (values.length > 0) {
16884 model.filter = values[0];
16885 }
16886 if (values.length > 1) {
16887 model.filterTo = values[1];
16888 }
16889 return model;
16890 };
16891 NumberFilter.prototype.getInputs = function (position) {
16892 if (position >= this.eValuesFrom.length) {
16893 return [null, null];
16894 }
16895 return [this.eValuesFrom[position], this.eValuesTo[position]];
16896 };
16897 NumberFilter.prototype.getModelAsString = function (model) {
16898 var _a;
16899 return (_a = this.filterModelFormatter.getModelAsString(model)) !== null && _a !== void 0 ? _a : '';
16900 };
16901 NumberFilter.DEFAULT_FILTER_OPTIONS = [
16902 _scalarFilter__WEBPACK_IMPORTED_MODULE_1__["ScalarFilter"].EQUALS,
16903 _scalarFilter__WEBPACK_IMPORTED_MODULE_1__["ScalarFilter"].NOT_EQUAL,
16904 _scalarFilter__WEBPACK_IMPORTED_MODULE_1__["ScalarFilter"].LESS_THAN,
16905 _scalarFilter__WEBPACK_IMPORTED_MODULE_1__["ScalarFilter"].LESS_THAN_OR_EQUAL,
16906 _scalarFilter__WEBPACK_IMPORTED_MODULE_1__["ScalarFilter"].GREATER_THAN,
16907 _scalarFilter__WEBPACK_IMPORTED_MODULE_1__["ScalarFilter"].GREATER_THAN_OR_EQUAL,
16908 _scalarFilter__WEBPACK_IMPORTED_MODULE_1__["ScalarFilter"].IN_RANGE,
16909 _scalarFilter__WEBPACK_IMPORTED_MODULE_1__["ScalarFilter"].BLANK,
16910 _scalarFilter__WEBPACK_IMPORTED_MODULE_1__["ScalarFilter"].NOT_BLANK,
16911 ];
16912 return NumberFilter;
16913}(_scalarFilter__WEBPACK_IMPORTED_MODULE_1__["ScalarFilter"]));
16914
16915
16916
16917/***/ }),
16918/* 79 */
16919/***/ (function(module, __webpack_exports__, __webpack_require__) {
16920
16921"use strict";
16922__webpack_require__.r(__webpack_exports__);
16923/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgInputTextField", function() { return AgInputTextField; });
16924/* harmony import */ var _agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73);
16925/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
16926/**
16927 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
16928 * @version v29.2.0
16929 * @link https://www.ag-grid.com/
16930 * @license MIT
16931 */
16932var __extends = (undefined && undefined.__extends) || (function () {
16933 var extendStatics = function (d, b) {
16934 extendStatics = Object.setPrototypeOf ||
16935 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16936 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
16937 return extendStatics(d, b);
16938 };
16939 return function (d, b) {
16940 extendStatics(d, b);
16941 function __() { this.constructor = d; }
16942 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16943 };
16944})();
16945
16946
16947var AgInputTextField = /** @class */ (function (_super) {
16948 __extends(AgInputTextField, _super);
16949 function AgInputTextField(config, className, inputType) {
16950 if (className === void 0) { className = 'ag-text-field'; }
16951 if (inputType === void 0) { inputType = 'text'; }
16952 return _super.call(this, config, className, inputType) || this;
16953 }
16954 AgInputTextField.prototype.postConstruct = function () {
16955 _super.prototype.postConstruct.call(this);
16956 if (this.config.allowedCharPattern) {
16957 this.preventDisallowedCharacters();
16958 }
16959 };
16960 AgInputTextField.prototype.setValue = function (value, silent) {
16961 var ret = _super.prototype.setValue.call(this, value, silent);
16962 if (this.eInput.value !== value) {
16963 this.eInput.value = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_1__["exists"])(value) ? value : '';
16964 }
16965 return ret;
16966 };
16967 AgInputTextField.prototype.preventDisallowedCharacters = function () {
16968 var pattern = new RegExp("[" + this.config.allowedCharPattern + "]");
16969 var preventDisallowedCharacters = function (event) {
16970 if (event.ctrlKey || event.metaKey) {
16971 // copy/paste can fall in here on certain browsers (e.g. Safari)
16972 return;
16973 }
16974 if (event.key && !pattern.test(event.key)) {
16975 event.preventDefault();
16976 }
16977 };
16978 this.addManagedListener(this.eInput, 'keypress', preventDisallowedCharacters);
16979 this.addManagedListener(this.eInput, 'paste', function (e) {
16980 var _a;
16981 var text = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
16982 if (text && text.split('').some(function (c) { return !pattern.test(c); })) {
16983 e.preventDefault();
16984 }
16985 });
16986 };
16987 return AgInputTextField;
16988}(_agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractInputField"]));
16989
16990
16991
16992/***/ }),
16993/* 80 */
16994/***/ (function(module, __webpack_exports__, __webpack_require__) {
16995
16996"use strict";
16997__webpack_require__.r(__webpack_exports__);
16998/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgInputNumberField", function() { return AgInputNumberField; });
16999/* harmony import */ var _agInputTextField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79);
17000/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
17001/**
17002 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17003 * @version v29.2.0
17004 * @link https://www.ag-grid.com/
17005 * @license MIT
17006 */
17007var __extends = (undefined && undefined.__extends) || (function () {
17008 var extendStatics = function (d, b) {
17009 extendStatics = Object.setPrototypeOf ||
17010 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17011 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
17012 return extendStatics(d, b);
17013 };
17014 return function (d, b) {
17015 extendStatics(d, b);
17016 function __() { this.constructor = d; }
17017 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17018 };
17019})();
17020
17021
17022var AgInputNumberField = /** @class */ (function (_super) {
17023 __extends(AgInputNumberField, _super);
17024 function AgInputNumberField(config) {
17025 return _super.call(this, config, 'ag-number-field', 'number') || this;
17026 }
17027 AgInputNumberField.prototype.postConstruct = function () {
17028 var _this = this;
17029 _super.prototype.postConstruct.call(this);
17030 this.addManagedListener(this.eInput, 'blur', function () {
17031 var floatedValue = parseFloat(_this.eInput.value);
17032 var value = isNaN(floatedValue) ? '' : _this.normalizeValue(floatedValue.toString());
17033 if (_this.value !== value) {
17034 _this.setValue(value);
17035 }
17036 });
17037 this.addManagedListener(this.eInput, 'wheel', this.onWheel.bind(this));
17038 this.eInput.step = 'any';
17039 };
17040 AgInputNumberField.prototype.onWheel = function (e) {
17041 // Prevent default scroll events from incrementing / decrementing the input, since its inconsistent between browsers
17042 if (document.activeElement === this.eInput) {
17043 e.preventDefault();
17044 }
17045 };
17046 AgInputNumberField.prototype.normalizeValue = function (value) {
17047 if (value === '') {
17048 return '';
17049 }
17050 if (this.precision) {
17051 value = this.adjustPrecision(value);
17052 }
17053 var val = parseFloat(value);
17054 if (this.min != null && val < this.min) {
17055 value = this.min.toString();
17056 }
17057 else if (this.max != null && val > this.max) {
17058 value = this.max.toString();
17059 }
17060 return value;
17061 };
17062 AgInputNumberField.prototype.adjustPrecision = function (value) {
17063 if (this.precision) {
17064 var floatString = parseFloat(value).toFixed(this.precision);
17065 value = parseFloat(floatString).toString();
17066 }
17067 return value;
17068 };
17069 AgInputNumberField.prototype.setMin = function (min) {
17070 if (this.min === min) {
17071 return this;
17072 }
17073 this.min = min;
17074 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["addOrRemoveAttribute"])(this.eInput, 'min', min);
17075 return this;
17076 };
17077 AgInputNumberField.prototype.setMax = function (max) {
17078 if (this.max === max) {
17079 return this;
17080 }
17081 this.max = max;
17082 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["addOrRemoveAttribute"])(this.eInput, 'max', max);
17083 return this;
17084 };
17085 AgInputNumberField.prototype.setPrecision = function (precision) {
17086 this.precision = precision;
17087 return this;
17088 };
17089 AgInputNumberField.prototype.setStep = function (step) {
17090 if (this.step === step) {
17091 return this;
17092 }
17093 this.step = step;
17094 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["addOrRemoveAttribute"])(this.eInput, 'step', step);
17095 return this;
17096 };
17097 AgInputNumberField.prototype.setValue = function (value, silent) {
17098 if (value != null) {
17099 value = this.adjustPrecision(value);
17100 var normalizedValue = this.normalizeValue(value);
17101 if (value != normalizedValue) {
17102 return this;
17103 }
17104 }
17105 return _super.prototype.setValue.call(this, value, silent);
17106 };
17107 return AgInputNumberField;
17108}(_agInputTextField__WEBPACK_IMPORTED_MODULE_0__["AgInputTextField"]));
17109
17110
17111
17112/***/ }),
17113/* 81 */
17114/***/ (function(module, __webpack_exports__, __webpack_require__) {
17115
17116"use strict";
17117__webpack_require__.r(__webpack_exports__);
17118/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberFloatingFilter", function() { return NumberFloatingFilter; });
17119/* harmony import */ var _numberFilter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78);
17120/* harmony import */ var _floating_provided_textInputFloatingFilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82);
17121/* harmony import */ var _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(80);
17122/* harmony import */ var _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(79);
17123/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17);
17124/**
17125 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17126 * @version v29.2.0
17127 * @link https://www.ag-grid.com/
17128 * @license MIT
17129 */
17130var __extends = (undefined && undefined.__extends) || (function () {
17131 var extendStatics = function (d, b) {
17132 extendStatics = Object.setPrototypeOf ||
17133 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17134 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
17135 return extendStatics(d, b);
17136 };
17137 return function (d, b) {
17138 extendStatics(d, b);
17139 function __() { this.constructor = d; }
17140 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17141 };
17142})();
17143
17144
17145
17146
17147
17148var FloatingFilterNumberInputService = /** @class */ (function (_super) {
17149 __extends(FloatingFilterNumberInputService, _super);
17150 function FloatingFilterNumberInputService(params) {
17151 var _this = _super.call(this) || this;
17152 _this.params = params;
17153 _this.numberInputActive = true;
17154 return _this;
17155 }
17156 FloatingFilterNumberInputService.prototype.setupGui = function (parentElement) {
17157 this.eFloatingFilterNumberInput = this.createManagedBean(new _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_2__["AgInputNumberField"]());
17158 this.eFloatingFilterTextInput = this.createManagedBean(new _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_3__["AgInputTextField"]());
17159 this.eFloatingFilterTextInput.setDisabled(true);
17160 this.eFloatingFilterNumberInput.setInputAriaLabel(this.params.ariaLabel);
17161 this.eFloatingFilterTextInput.setInputAriaLabel(this.params.ariaLabel);
17162 parentElement.appendChild(this.eFloatingFilterNumberInput.getGui());
17163 parentElement.appendChild(this.eFloatingFilterTextInput.getGui());
17164 };
17165 FloatingFilterNumberInputService.prototype.setEditable = function (editable) {
17166 this.numberInputActive = editable;
17167 this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive);
17168 this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive);
17169 };
17170 FloatingFilterNumberInputService.prototype.getValue = function () {
17171 return this.getActiveInputElement().getValue();
17172 };
17173 FloatingFilterNumberInputService.prototype.setValue = function (value, silent) {
17174 this.getActiveInputElement().setValue(value, silent);
17175 };
17176 FloatingFilterNumberInputService.prototype.getActiveInputElement = function () {
17177 return this.numberInputActive ? this.eFloatingFilterNumberInput : this.eFloatingFilterTextInput;
17178 };
17179 FloatingFilterNumberInputService.prototype.addValueChangedListener = function (listener) {
17180 this.setupListeners(this.eFloatingFilterNumberInput.getGui(), listener);
17181 this.setupListeners(this.eFloatingFilterTextInput.getGui(), listener);
17182 };
17183 FloatingFilterNumberInputService.prototype.setupListeners = function (element, listener) {
17184 this.addManagedListener(element, 'input', listener);
17185 this.addManagedListener(element, 'keypress', listener);
17186 this.addManagedListener(element, 'keydown', listener);
17187 };
17188 return FloatingFilterNumberInputService;
17189}(_context_beanStub__WEBPACK_IMPORTED_MODULE_4__["BeanStub"]));
17190var NumberFloatingFilter = /** @class */ (function (_super) {
17191 __extends(NumberFloatingFilter, _super);
17192 function NumberFloatingFilter() {
17193 return _super !== null && _super.apply(this, arguments) || this;
17194 }
17195 NumberFloatingFilter.prototype.init = function (params) {
17196 _super.prototype.init.call(this, params);
17197 this.filterModelFormatter = new _numberFilter__WEBPACK_IMPORTED_MODULE_0__["NumberFilterModelFormatter"](this.localeService, this.optionsFactory);
17198 };
17199 NumberFloatingFilter.prototype.getDefaultFilterOptions = function () {
17200 return _numberFilter__WEBPACK_IMPORTED_MODULE_0__["NumberFilter"].DEFAULT_FILTER_OPTIONS;
17201 };
17202 NumberFloatingFilter.prototype.getFilterModelFormatter = function () {
17203 return this.filterModelFormatter;
17204 };
17205 NumberFloatingFilter.prototype.createFloatingFilterInputService = function (ariaLabel) {
17206 var allowedCharPattern = Object(_numberFilter__WEBPACK_IMPORTED_MODULE_0__["getAllowedCharPattern"])(this.params.filterParams);
17207 if (allowedCharPattern) {
17208 // need to sue text input
17209 return this.createManagedBean(new _floating_provided_textInputFloatingFilter__WEBPACK_IMPORTED_MODULE_1__["FloatingFilterTextInputService"]({
17210 config: { allowedCharPattern: allowedCharPattern },
17211 ariaLabel: ariaLabel
17212 }));
17213 }
17214 return this.createManagedBean(new FloatingFilterNumberInputService({ ariaLabel: ariaLabel }));
17215 };
17216 return NumberFloatingFilter;
17217}(_floating_provided_textInputFloatingFilter__WEBPACK_IMPORTED_MODULE_1__["TextInputFloatingFilter"]));
17218
17219
17220
17221/***/ }),
17222/* 82 */
17223/***/ (function(module, __webpack_exports__, __webpack_require__) {
17224
17225"use strict";
17226__webpack_require__.r(__webpack_exports__);
17227/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FloatingFilterTextInputService", function() { return FloatingFilterTextInputService; });
17228/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextInputFloatingFilter", function() { return TextInputFloatingFilter; });
17229/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
17230/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
17231/* harmony import */ var _provided_providedFilter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62);
17232/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11);
17233/* harmony import */ var _simpleFloatingFilter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76);
17234/* harmony import */ var _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79);
17235/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48);
17236/* harmony import */ var _provided_text_textFilter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(83);
17237/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17);
17238/**
17239 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17240 * @version v29.2.0
17241 * @link https://www.ag-grid.com/
17242 * @license MIT
17243 */
17244var __extends = (undefined && undefined.__extends) || (function () {
17245 var extendStatics = function (d, b) {
17246 extendStatics = Object.setPrototypeOf ||
17247 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17248 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
17249 return extendStatics(d, b);
17250 };
17251 return function (d, b) {
17252 extendStatics(d, b);
17253 function __() { this.constructor = d; }
17254 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17255 };
17256})();
17257var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17258 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17259 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17260 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;
17261 return c > 3 && r && Object.defineProperty(target, key, r), r;
17262};
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272var FloatingFilterTextInputService = /** @class */ (function (_super) {
17273 __extends(FloatingFilterTextInputService, _super);
17274 function FloatingFilterTextInputService(params) {
17275 var _this = _super.call(this) || this;
17276 _this.params = params;
17277 return _this;
17278 }
17279 FloatingFilterTextInputService.prototype.setupGui = function (parentElement) {
17280 this.eFloatingFilterTextInput = this.createManagedBean(new _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_5__["AgInputTextField"](this.params.config));
17281 this.eFloatingFilterTextInput.setInputAriaLabel(this.params.ariaLabel);
17282 parentElement.appendChild(this.eFloatingFilterTextInput.getGui());
17283 };
17284 FloatingFilterTextInputService.prototype.setEditable = function (editable) {
17285 this.eFloatingFilterTextInput.setDisabled(!editable);
17286 };
17287 FloatingFilterTextInputService.prototype.getValue = function () {
17288 return this.eFloatingFilterTextInput.getValue();
17289 };
17290 FloatingFilterTextInputService.prototype.setValue = function (value, silent) {
17291 this.eFloatingFilterTextInput.setValue(value, silent);
17292 };
17293 FloatingFilterTextInputService.prototype.addValueChangedListener = function (listener) {
17294 var inputGui = this.eFloatingFilterTextInput.getGui();
17295 this.addManagedListener(inputGui, 'input', listener);
17296 this.addManagedListener(inputGui, 'keypress', listener);
17297 this.addManagedListener(inputGui, 'keydown', listener);
17298 };
17299 return FloatingFilterTextInputService;
17300}(_context_beanStub__WEBPACK_IMPORTED_MODULE_8__["BeanStub"]));
17301
17302var TextInputFloatingFilter = /** @class */ (function (_super) {
17303 __extends(TextInputFloatingFilter, _super);
17304 function TextInputFloatingFilter() {
17305 return _super !== null && _super.apply(this, arguments) || this;
17306 }
17307 TextInputFloatingFilter.prototype.postConstruct = function () {
17308 this.setTemplate(/* html */ "\n <div class=\"ag-floating-filter-input\" role=\"presentation\" ref=\"eFloatingFilterInputContainer\"></div>\n ");
17309 };
17310 TextInputFloatingFilter.prototype.getDefaultDebounceMs = function () {
17311 return 500;
17312 };
17313 TextInputFloatingFilter.prototype.onParentModelChanged = function (model, event) {
17314 if (this.isEventFromFloatingFilter(event) || this.isEventFromDataChange(event)) {
17315 // if the floating filter triggered the change, it is already in sync.
17316 // Data changes also do not affect provided text floating filters
17317 return;
17318 }
17319 this.setLastTypeFromModel(model);
17320 this.setEditable(this.canWeEditAfterModelFromParentFilter(model));
17321 this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(model));
17322 };
17323 TextInputFloatingFilter.prototype.init = function (params) {
17324 this.params = params;
17325 var displayName = this.columnModel.getDisplayNameForColumn(params.column, 'header', true);
17326 var translate = this.localeService.getLocaleTextFunc();
17327 var ariaLabel = displayName + " " + translate('ariaFilterInput', 'Filter Input');
17328 this.floatingFilterInputService = this.createFloatingFilterInputService(ariaLabel);
17329 this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer);
17330 _super.prototype.init.call(this, params);
17331 this.applyActive = _provided_providedFilter__WEBPACK_IMPORTED_MODULE_2__["ProvidedFilter"].isUseApplyButton(this.params.filterParams);
17332 if (!this.isReadOnly()) {
17333 var debounceMs = _provided_providedFilter__WEBPACK_IMPORTED_MODULE_2__["ProvidedFilter"].getDebounceMs(this.params.filterParams, this.getDefaultDebounceMs());
17334 var toDebounce = Object(_utils_function__WEBPACK_IMPORTED_MODULE_1__["debounce"])(this.syncUpWithParentFilter.bind(this), debounceMs);
17335 this.floatingFilterInputService.addValueChangedListener(toDebounce);
17336 }
17337 };
17338 TextInputFloatingFilter.prototype.syncUpWithParentFilter = function (e) {
17339 var _this = this;
17340 var enterKeyPressed = e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].ENTER;
17341 if (this.applyActive && !enterKeyPressed) {
17342 return;
17343 }
17344 var value = this.floatingFilterInputService.getValue();
17345 if (this.params.filterParams.trimInput) {
17346 value = _provided_text_textFilter__WEBPACK_IMPORTED_MODULE_7__["TextFilter"].trimInput(value);
17347 this.floatingFilterInputService.setValue(value, true); // ensure visible value is trimmed
17348 }
17349 this.params.parentFilterInstance(function (filterInstance) {
17350 if (filterInstance) {
17351 // NumberFilter is typed as number, but actually receives string values
17352 filterInstance.onFloatingFilterChanged(_this.getLastType() || null, value || null);
17353 }
17354 });
17355 };
17356 TextInputFloatingFilter.prototype.setEditable = function (editable) {
17357 this.floatingFilterInputService.setEditable(editable);
17358 };
17359 __decorate([
17360 Object(_context_context__WEBPACK_IMPORTED_MODULE_3__["Autowired"])('columnModel')
17361 ], TextInputFloatingFilter.prototype, "columnModel", void 0);
17362 __decorate([
17363 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eFloatingFilterInputContainer')
17364 ], TextInputFloatingFilter.prototype, "eFloatingFilterInputContainer", void 0);
17365 __decorate([
17366 _context_context__WEBPACK_IMPORTED_MODULE_3__["PostConstruct"]
17367 ], TextInputFloatingFilter.prototype, "postConstruct", null);
17368 return TextInputFloatingFilter;
17369}(_simpleFloatingFilter__WEBPACK_IMPORTED_MODULE_4__["SimpleFloatingFilter"]));
17370
17371
17372
17373/***/ }),
17374/* 83 */
17375/***/ (function(module, __webpack_exports__, __webpack_require__) {
17376
17377"use strict";
17378__webpack_require__.r(__webpack_exports__);
17379/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextFilterModelFormatter", function() { return TextFilterModelFormatter; });
17380/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextFilter", function() { return TextFilter; });
17381/* harmony import */ var _simpleFilter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60);
17382/* harmony import */ var _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(79);
17383/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
17384/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39);
17385/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41);
17386/**
17387 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17388 * @version v29.2.0
17389 * @link https://www.ag-grid.com/
17390 * @license MIT
17391 */
17392var __extends = (undefined && undefined.__extends) || (function () {
17393 var extendStatics = function (d, b) {
17394 extendStatics = Object.setPrototypeOf ||
17395 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17396 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
17397 return extendStatics(d, b);
17398 };
17399 return function (d, b) {
17400 extendStatics(d, b);
17401 function __() { this.constructor = d; }
17402 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17403 };
17404})();
17405var __assign = (undefined && undefined.__assign) || function () {
17406 __assign = Object.assign || function(t) {
17407 for (var s, i = 1, n = arguments.length; i < n; i++) {
17408 s = arguments[i];
17409 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
17410 t[p] = s[p];
17411 }
17412 return t;
17413 };
17414 return __assign.apply(this, arguments);
17415};
17416
17417
17418
17419
17420
17421var TextFilterModelFormatter = /** @class */ (function (_super) {
17422 __extends(TextFilterModelFormatter, _super);
17423 function TextFilterModelFormatter() {
17424 return _super !== null && _super.apply(this, arguments) || this;
17425 }
17426 TextFilterModelFormatter.prototype.conditionToString = function (condition, options) {
17427 var numberOfInputs = (options || {}).numberOfInputs;
17428 var isRange = condition.type == _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].IN_RANGE || numberOfInputs === 2;
17429 if (isRange) {
17430 return condition.filter + "-" + condition.filterTo;
17431 }
17432 // cater for when the type doesn't need a value
17433 if (condition.filter != null) {
17434 return "" + condition.filter;
17435 }
17436 return "" + condition.type;
17437 };
17438 return TextFilterModelFormatter;
17439}(_simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilterModelFormatter"]));
17440
17441var TextFilter = /** @class */ (function (_super) {
17442 __extends(TextFilter, _super);
17443 function TextFilter() {
17444 var _this = _super.call(this, 'textFilter') || this;
17445 _this.eValuesFrom = [];
17446 _this.eValuesTo = [];
17447 return _this;
17448 }
17449 TextFilter.trimInput = function (value) {
17450 var trimmedInput = value && value.trim();
17451 // trim the input, unless it is all whitespace (this is consistent with Excel behaviour)
17452 return trimmedInput === '' ? value : trimmedInput;
17453 };
17454 TextFilter.prototype.getDefaultDebounceMs = function () {
17455 return 500;
17456 };
17457 TextFilter.prototype.setParams = function (params) {
17458 this.textFilterParams = params;
17459 _super.prototype.setParams.call(this, params);
17460 this.matcher = this.getTextMatcher();
17461 this.formatter = this.textFilterParams.textFormatter ||
17462 (this.textFilterParams.caseSensitive ? TextFilter.DEFAULT_FORMATTER : TextFilter.DEFAULT_LOWERCASE_FORMATTER);
17463 this.filterModelFormatter = new TextFilterModelFormatter(this.localeService, this.optionsFactory);
17464 };
17465 TextFilter.prototype.getTextMatcher = function () {
17466 var legacyComparator = this.textFilterParams.textCustomComparator;
17467 if (legacyComparator) {
17468 _utils__WEBPACK_IMPORTED_MODULE_3__["_"].doOnce(function () { return console.warn('AG Grid - textCustomComparator is deprecated, use textMatcher instead.'); }, 'textCustomComparator.deprecated');
17469 return function (_a) {
17470 var filterOption = _a.filterOption, value = _a.value, filterText = _a.filterText;
17471 return legacyComparator(filterOption, value, filterText);
17472 };
17473 }
17474 return this.textFilterParams.textMatcher || TextFilter.DEFAULT_MATCHER;
17475 };
17476 TextFilter.prototype.createCondition = function (position) {
17477 var type = this.getConditionType(position);
17478 var model = {
17479 filterType: this.getFilterType(),
17480 type: type,
17481 };
17482 var values = this.getValues(position);
17483 if (values.length > 0) {
17484 model.filter = values[0];
17485 }
17486 if (values.length > 1) {
17487 model.filterTo = values[1];
17488 }
17489 return model;
17490 };
17491 TextFilter.prototype.getFilterType = function () {
17492 return 'text';
17493 };
17494 TextFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {
17495 return aSimple.filter === bSimple.filter &&
17496 aSimple.filterTo === bSimple.filterTo &&
17497 aSimple.type === bSimple.type;
17498 };
17499 TextFilter.prototype.getInputs = function (position) {
17500 if (position >= this.eValuesFrom.length) {
17501 return [null, null];
17502 }
17503 return [this.eValuesFrom[position], this.eValuesTo[position]];
17504 };
17505 TextFilter.prototype.getValues = function (position) {
17506 var _this = this;
17507 var result = [];
17508 this.forEachPositionInput(position, function (element, index, _elPosition, numberOfInputs) {
17509 if (index < numberOfInputs) {
17510 var value = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["makeNull"])(element.getValue());
17511 var cleanValue = (_this.textFilterParams.trimInput ? TextFilter.trimInput(value) : value) || null;
17512 result.push(cleanValue);
17513 element.setValue(cleanValue, true); // ensure clean value is visible
17514 }
17515 });
17516 return result;
17517 };
17518 TextFilter.prototype.getDefaultFilterOptions = function () {
17519 return TextFilter.DEFAULT_FILTER_OPTIONS;
17520 };
17521 TextFilter.prototype.createValueElement = function () {
17522 var eCondition = document.createElement('div');
17523 eCondition.classList.add('ag-filter-body');
17524 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_4__["setAriaRole"])(eCondition, 'presentation');
17525 this.createFromToElement(eCondition, this.eValuesFrom, 'from');
17526 this.createFromToElement(eCondition, this.eValuesTo, 'to');
17527 return eCondition;
17528 };
17529 TextFilter.prototype.createFromToElement = function (eCondition, eValues, fromTo) {
17530 var eValue = this.createManagedBean(new _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_1__["AgInputTextField"]());
17531 eValue.addCssClass("ag-filter-" + fromTo);
17532 eValue.addCssClass('ag-filter-filter');
17533 eValues.push(eValue);
17534 eCondition.appendChild(eValue.getGui());
17535 };
17536 TextFilter.prototype.removeValueElements = function (startPosition, deleteCount) {
17537 this.removeComponents(this.eValuesFrom, startPosition, deleteCount);
17538 this.removeComponents(this.eValuesTo, startPosition, deleteCount);
17539 };
17540 TextFilter.prototype.mapValuesFromModel = function (filterModel) {
17541 var _a = filterModel || {}, filter = _a.filter, filterTo = _a.filterTo, type = _a.type;
17542 return [
17543 filter || null,
17544 filterTo || null,
17545 ].slice(0, this.getNumberOfInputs(type));
17546 };
17547 TextFilter.prototype.evaluateNullValue = function (filterType) {
17548 var filterTypesAllowNulls = [
17549 _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].NOT_EQUAL, _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].NOT_CONTAINS, _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].BLANK,
17550 ];
17551 return filterType ? filterTypesAllowNulls.indexOf(filterType) >= 0 : false;
17552 };
17553 TextFilter.prototype.evaluateNonNullValue = function (values, cellValue, filterModel, params) {
17554 var _this = this;
17555 var formattedValues = values.map(function (v) { return _this.formatter(v); }) || [];
17556 var cellValueFormatted = this.formatter(cellValue);
17557 var _a = this.textFilterParams, api = _a.api, colDef = _a.colDef, column = _a.column, columnApi = _a.columnApi, context = _a.context, textFormatter = _a.textFormatter;
17558 if (filterModel.type === _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].BLANK) {
17559 return this.isBlank(cellValue);
17560 }
17561 else if (filterModel.type === _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].NOT_BLANK) {
17562 return !this.isBlank(cellValue);
17563 }
17564 var matcherParams = {
17565 api: api,
17566 colDef: colDef,
17567 column: column,
17568 columnApi: columnApi,
17569 context: context,
17570 node: params.node,
17571 data: params.data,
17572 filterOption: filterModel.type,
17573 value: cellValueFormatted,
17574 textFormatter: textFormatter,
17575 };
17576 return formattedValues.some(function (v) { return _this.matcher(__assign(__assign({}, matcherParams), { filterText: v })); });
17577 };
17578 TextFilter.prototype.getModelAsString = function (model) {
17579 var _a;
17580 return (_a = this.filterModelFormatter.getModelAsString(model)) !== null && _a !== void 0 ? _a : '';
17581 };
17582 TextFilter.DEFAULT_FILTER_OPTIONS = [
17583 _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].CONTAINS,
17584 _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].NOT_CONTAINS,
17585 _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].EQUALS,
17586 _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].NOT_EQUAL,
17587 _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].STARTS_WITH,
17588 _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].ENDS_WITH,
17589 _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].BLANK,
17590 _simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"].NOT_BLANK,
17591 ];
17592 TextFilter.DEFAULT_FORMATTER = function (from) { return from; };
17593 TextFilter.DEFAULT_LOWERCASE_FORMATTER = function (from) { return from == null ? null : from.toString().toLowerCase(); };
17594 TextFilter.DEFAULT_MATCHER = function (_a) {
17595 var filterOption = _a.filterOption, value = _a.value, filterText = _a.filterText;
17596 if (filterText == null) {
17597 return false;
17598 }
17599 switch (filterOption) {
17600 case TextFilter.CONTAINS:
17601 return value.indexOf(filterText) >= 0;
17602 case TextFilter.NOT_CONTAINS:
17603 return value.indexOf(filterText) < 0;
17604 case TextFilter.EQUALS:
17605 return value === filterText;
17606 case TextFilter.NOT_EQUAL:
17607 return value != filterText;
17608 case TextFilter.STARTS_WITH:
17609 return value.indexOf(filterText) === 0;
17610 case TextFilter.ENDS_WITH:
17611 var index = value.lastIndexOf(filterText);
17612 return index >= 0 && index === (value.length - filterText.length);
17613 default:
17614 return false;
17615 }
17616 };
17617 return TextFilter;
17618}(_simpleFilter__WEBPACK_IMPORTED_MODULE_0__["SimpleFilter"]));
17619
17620
17621
17622/***/ }),
17623/* 84 */
17624/***/ (function(module, __webpack_exports__, __webpack_require__) {
17625
17626"use strict";
17627__webpack_require__.r(__webpack_exports__);
17628/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextFloatingFilter", function() { return TextFloatingFilter; });
17629/* harmony import */ var _textFilter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83);
17630/* harmony import */ var _floating_provided_textInputFloatingFilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82);
17631/**
17632 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17633 * @version v29.2.0
17634 * @link https://www.ag-grid.com/
17635 * @license MIT
17636 */
17637var __extends = (undefined && undefined.__extends) || (function () {
17638 var extendStatics = function (d, b) {
17639 extendStatics = Object.setPrototypeOf ||
17640 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17641 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
17642 return extendStatics(d, b);
17643 };
17644 return function (d, b) {
17645 extendStatics(d, b);
17646 function __() { this.constructor = d; }
17647 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17648 };
17649})();
17650
17651
17652var TextFloatingFilter = /** @class */ (function (_super) {
17653 __extends(TextFloatingFilter, _super);
17654 function TextFloatingFilter() {
17655 return _super !== null && _super.apply(this, arguments) || this;
17656 }
17657 TextFloatingFilter.prototype.init = function (params) {
17658 _super.prototype.init.call(this, params);
17659 this.filterModelFormatter = new _textFilter__WEBPACK_IMPORTED_MODULE_0__["TextFilterModelFormatter"](this.localeService, this.optionsFactory);
17660 };
17661 TextFloatingFilter.prototype.getDefaultFilterOptions = function () {
17662 return _textFilter__WEBPACK_IMPORTED_MODULE_0__["TextFilter"].DEFAULT_FILTER_OPTIONS;
17663 };
17664 TextFloatingFilter.prototype.getFilterModelFormatter = function () {
17665 return this.filterModelFormatter;
17666 };
17667 TextFloatingFilter.prototype.createFloatingFilterInputService = function (ariaLabel) {
17668 return this.createManagedBean(new _floating_provided_textInputFloatingFilter__WEBPACK_IMPORTED_MODULE_1__["FloatingFilterTextInputService"]({
17669 ariaLabel: ariaLabel
17670 }));
17671 };
17672 return TextFloatingFilter;
17673}(_floating_provided_textInputFloatingFilter__WEBPACK_IMPORTED_MODULE_1__["TextInputFloatingFilter"]));
17674
17675
17676
17677/***/ }),
17678/* 85 */
17679/***/ (function(module, __webpack_exports__, __webpack_require__) {
17680
17681"use strict";
17682__webpack_require__.r(__webpack_exports__);
17683/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderComp", function() { return HeaderComp; });
17684/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
17685/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
17686/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19);
17687/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
17688/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45);
17689/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
17690/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46);
17691/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31);
17692/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38);
17693/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(57);
17694/* harmony import */ var _widgets_touchListener__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(86);
17695/* harmony import */ var _sortIndicatorComp__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(87);
17696/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(26);
17697/**
17698 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17699 * @version v29.2.0
17700 * @link https://www.ag-grid.com/
17701 * @license MIT
17702 */
17703var __extends = (undefined && undefined.__extends) || (function () {
17704 var extendStatics = function (d, b) {
17705 extendStatics = Object.setPrototypeOf ||
17706 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17707 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
17708 return extendStatics(d, b);
17709 };
17710 return function (d, b) {
17711 extendStatics(d, b);
17712 function __() { this.constructor = d; }
17713 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17714 };
17715})();
17716var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17717 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17718 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17719 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;
17720 return c > 3 && r && Object.defineProperty(target, key, r), r;
17721};
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735var HeaderComp = /** @class */ (function (_super) {
17736 __extends(HeaderComp, _super);
17737 function HeaderComp() {
17738 var _this = _super !== null && _super.apply(this, arguments) || this;
17739 _this.lastMovingChanged = 0;
17740 return _this;
17741 }
17742 // this is a user component, and IComponent has "public destroy()" as part of the interface.
17743 // so we need to override destroy() just to make the method public.
17744 HeaderComp.prototype.destroy = function () {
17745 _super.prototype.destroy.call(this);
17746 };
17747 HeaderComp.prototype.refresh = function (params) {
17748 this.params = params;
17749 // if template changed, then recreate the whole comp, the code required to manage
17750 // a changing template is to difficult for what it's worth.
17751 if (this.workOutTemplate() != this.currentTemplate) {
17752 return false;
17753 }
17754 if (this.workOutShowMenu() != this.currentShowMenu) {
17755 return false;
17756 }
17757 if (this.workOutSort() != this.currentSort) {
17758 return false;
17759 }
17760 this.setDisplayName(params);
17761 return true;
17762 };
17763 HeaderComp.prototype.workOutTemplate = function () {
17764 var template = Object(_utils_array__WEBPACK_IMPORTED_MODULE_2__["firstExistingValue"])(this.params.template, HeaderComp.TEMPLATE);
17765 // take account of any newlines & whitespace before/after the actual template
17766 template = template && template.trim ? template.trim() : template;
17767 return template;
17768 };
17769 HeaderComp.prototype.init = function (params) {
17770 this.params = params;
17771 this.currentTemplate = this.workOutTemplate();
17772 this.setTemplate(this.currentTemplate);
17773 this.setupTap();
17774 this.setupIcons(params.column);
17775 this.setMenu();
17776 this.setupSort();
17777 this.setupFilterIcon();
17778 this.setDisplayName(params);
17779 };
17780 HeaderComp.prototype.setDisplayName = function (params) {
17781 if (this.currentDisplayName != params.displayName) {
17782 this.currentDisplayName = params.displayName;
17783 var displayNameSanitised = Object(_utils_string__WEBPACK_IMPORTED_MODULE_7__["escapeString"])(this.currentDisplayName);
17784 if (this.eText) {
17785 this.eText.innerHTML = displayNameSanitised;
17786 }
17787 }
17788 };
17789 HeaderComp.prototype.setupIcons = function (column) {
17790 this.addInIcon('menu', this.eMenu, column);
17791 this.addInIcon('filter', this.eFilter, column);
17792 };
17793 HeaderComp.prototype.addInIcon = function (iconName, eParent, column) {
17794 if (eParent == null) {
17795 return;
17796 }
17797 var eIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_6__["createIconNoSpan"])(iconName, this.gridOptionsService, column);
17798 if (eIcon) {
17799 eParent.appendChild(eIcon);
17800 }
17801 };
17802 HeaderComp.prototype.setupTap = function () {
17803 var _this = this;
17804 var gridOptionsService = this.gridOptionsService;
17805 if (gridOptionsService.is('suppressTouch')) {
17806 return;
17807 }
17808 var touchListener = new _widgets_touchListener__WEBPACK_IMPORTED_MODULE_10__["TouchListener"](this.getGui(), true);
17809 var suppressMenuHide = gridOptionsService.is('suppressMenuHide');
17810 var tapMenuButton = suppressMenuHide && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(this.eMenu);
17811 var menuTouchListener = tapMenuButton ? new _widgets_touchListener__WEBPACK_IMPORTED_MODULE_10__["TouchListener"](this.eMenu, true) : touchListener;
17812 if (this.params.enableMenu) {
17813 var eventType = tapMenuButton ? 'EVENT_TAP' : 'EVENT_LONG_TAP';
17814 var showMenuFn = function (event) {
17815 gridOptionsService.api.showColumnMenuAfterMouseClick(_this.params.column, event.touchStart);
17816 };
17817 this.addManagedListener(menuTouchListener, _widgets_touchListener__WEBPACK_IMPORTED_MODULE_10__["TouchListener"][eventType], showMenuFn);
17818 }
17819 if (this.params.enableSorting) {
17820 var tapListener = function (event) {
17821 var target = event.touchStart.target;
17822 // When suppressMenuHide is true, a tap on the menu icon will bubble up
17823 // to the header container, in that case we should not sort
17824 if (suppressMenuHide && _this.eMenu.contains(target)) {
17825 return;
17826 }
17827 _this.sortController.progressSort(_this.params.column, false, "uiColumnSorted");
17828 };
17829 this.addManagedListener(touchListener, _widgets_touchListener__WEBPACK_IMPORTED_MODULE_10__["TouchListener"].EVENT_TAP, tapListener);
17830 }
17831 // if tapMenuButton is true `touchListener` and `menuTouchListener` are different
17832 // so we need to make sure to destroy both listeners here
17833 this.addDestroyFunc(function () { return touchListener.destroy(); });
17834 if (tapMenuButton) {
17835 this.addDestroyFunc(function () { return menuTouchListener.destroy(); });
17836 }
17837 };
17838 HeaderComp.prototype.workOutShowMenu = function () {
17839 // we don't show the menu if on an iPad/iPhone, as the user cannot have a pointer device/
17840 // However if suppressMenuHide is set to true the menu will be displayed alwasys, so it's ok
17841 // to show it on iPad in this case (as hover isn't needed). If suppressMenuHide
17842 // is false (default) user will need to use longpress to display the menu.
17843 var menuHides = !this.gridOptionsService.is('suppressMenuHide');
17844 var onIpadAndMenuHides = Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isIOSUserAgent"])() && menuHides;
17845 var showMenu = this.params.enableMenu && !onIpadAndMenuHides;
17846 return showMenu;
17847 };
17848 HeaderComp.prototype.setMenu = function () {
17849 var _this = this;
17850 // if no menu provided in template, do nothing
17851 if (!this.eMenu) {
17852 return;
17853 }
17854 this.currentShowMenu = this.workOutShowMenu();
17855 if (!this.currentShowMenu) {
17856 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["removeFromParent"])(this.eMenu);
17857 return;
17858 }
17859 var suppressMenuHide = this.gridOptionsService.is('suppressMenuHide');
17860 this.addManagedListener(this.eMenu, 'click', function () { return _this.showMenu(_this.eMenu); });
17861 this.eMenu.classList.toggle('ag-header-menu-always-show', suppressMenuHide);
17862 };
17863 HeaderComp.prototype.showMenu = function (eventSource) {
17864 if (!eventSource) {
17865 eventSource = this.eMenu;
17866 }
17867 this.menuFactory.showMenuAfterButtonClick(this.params.column, eventSource, 'columnMenu');
17868 };
17869 HeaderComp.prototype.workOutSort = function () {
17870 return this.params.enableSorting;
17871 };
17872 HeaderComp.prototype.setupSort = function () {
17873 var _this = this;
17874 this.currentSort = this.params.enableSorting;
17875 // eSortIndicator will not be present when customers provided custom header
17876 // templates, in that case, we need to look for provided sort elements and
17877 // manually create eSortIndicator.
17878 if (!this.eSortIndicator) {
17879 this.eSortIndicator = this.context.createBean(new _sortIndicatorComp__WEBPACK_IMPORTED_MODULE_11__["SortIndicatorComp"](true));
17880 this.eSortIndicator.attachCustomElements(this.eSortOrder, this.eSortAsc, this.eSortDesc, this.eSortMixed, this.eSortNone);
17881 }
17882 this.eSortIndicator.setupSort(this.params.column);
17883 // we set up the indicator prior to the check for whether this column is sortable, as it allows the indicator to
17884 // set up the multi sort indicator which can appear irrelevant of whether this column can itself be sorted.
17885 // this can occur in the case of a non-sortable group display column.
17886 if (!this.currentSort) {
17887 return;
17888 }
17889 var sortUsingCtrl = this.gridOptionsService.get('multiSortKey') === 'ctrl';
17890 // keep track of last time the moving changed flag was set
17891 this.addManagedListener(this.params.column, _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"].EVENT_MOVING_CHANGED, function () {
17892 _this.lastMovingChanged = new Date().getTime();
17893 });
17894 // add the event on the header, so when clicked, we do sorting
17895 if (this.eLabel) {
17896 this.addManagedListener(this.eLabel, 'click', function (event) {
17897 // sometimes when moving a column via dragging, this was also firing a clicked event.
17898 // here is issue raised by user: https://ag-grid.zendesk.com/agent/tickets/1076
17899 // this check stops sort if a) column is moving or b) column moved less than 200ms ago (so caters for race condition)
17900 var moving = _this.params.column.isMoving();
17901 var nowTime = new Date().getTime();
17902 // typically there is <2ms if moving flag was set recently, as it would be done in same VM turn
17903 var movedRecently = (nowTime - _this.lastMovingChanged) < 50;
17904 var columnMoving = moving || movedRecently;
17905 if (!columnMoving) {
17906 var multiSort = sortUsingCtrl ? (event.ctrlKey || event.metaKey) : event.shiftKey;
17907 _this.params.progressSort(multiSort);
17908 }
17909 });
17910 }
17911 var onSortingChanged = function () {
17912 _this.addOrRemoveCssClass('ag-header-cell-sorted-asc', _this.params.column.isSortAscending());
17913 _this.addOrRemoveCssClass('ag-header-cell-sorted-desc', _this.params.column.isSortDescending());
17914 _this.addOrRemoveCssClass('ag-header-cell-sorted-none', _this.params.column.isSortNone());
17915 if (_this.params.column.getColDef().showRowGroup) {
17916 var sourceColumns = _this.columnModel.getSourceColumnsForGroupColumn(_this.params.column);
17917 // this == is intentional, as it allows null and undefined to match, which are both unsorted states
17918 var sortDirectionsMatch = sourceColumns === null || sourceColumns === void 0 ? void 0 : sourceColumns.every(function (sourceCol) { return _this.params.column.getSort() == sourceCol.getSort(); });
17919 var isMultiSorting = !sortDirectionsMatch;
17920 _this.addOrRemoveCssClass('ag-header-cell-sorted-mixed', isMultiSorting);
17921 }
17922 };
17923 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_12__["Events"].EVENT_SORT_CHANGED, onSortingChanged);
17924 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_12__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, onSortingChanged);
17925 };
17926 HeaderComp.prototype.setupFilterIcon = function () {
17927 if (!this.eFilter) {
17928 return;
17929 }
17930 this.addManagedListener(this.params.column, _entities_column__WEBPACK_IMPORTED_MODULE_1__["Column"].EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));
17931 this.onFilterChanged();
17932 };
17933 HeaderComp.prototype.onFilterChanged = function () {
17934 var filterPresent = this.params.column.isFilterActive();
17935 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(this.eFilter, filterPresent, { skipAriaHidden: true });
17936 };
17937 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 <ag-sort-indicator ref=\"eSortIndicator\"></ag-sort-indicator>\n </div>\n </div>";
17938 __decorate([
17939 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortController')
17940 ], HeaderComp.prototype, "sortController", void 0);
17941 __decorate([
17942 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('menuFactory')
17943 ], HeaderComp.prototype, "menuFactory", void 0);
17944 __decorate([
17945 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
17946 ], HeaderComp.prototype, "columnModel", void 0);
17947 __decorate([
17948 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])('eFilter')
17949 ], HeaderComp.prototype, "eFilter", void 0);
17950 __decorate([
17951 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])('eSortIndicator')
17952 ], HeaderComp.prototype, "eSortIndicator", void 0);
17953 __decorate([
17954 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])('eMenu')
17955 ], HeaderComp.prototype, "eMenu", void 0);
17956 __decorate([
17957 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])('eLabel')
17958 ], HeaderComp.prototype, "eLabel", void 0);
17959 __decorate([
17960 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])('eText')
17961 ], HeaderComp.prototype, "eText", void 0);
17962 __decorate([
17963 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])('eSortOrder')
17964 ], HeaderComp.prototype, "eSortOrder", void 0);
17965 __decorate([
17966 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])('eSortAsc')
17967 ], HeaderComp.prototype, "eSortAsc", void 0);
17968 __decorate([
17969 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])('eSortDesc')
17970 ], HeaderComp.prototype, "eSortDesc", void 0);
17971 __decorate([
17972 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])('eSortMixed')
17973 ], HeaderComp.prototype, "eSortMixed", void 0);
17974 __decorate([
17975 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])('eSortNone')
17976 ], HeaderComp.prototype, "eSortNone", void 0);
17977 return HeaderComp;
17978}(_widgets_component__WEBPACK_IMPORTED_MODULE_8__["Component"]));
17979
17980
17981
17982/***/ }),
17983/* 86 */
17984/***/ (function(module, __webpack_exports__, __webpack_require__) {
17985
17986"use strict";
17987__webpack_require__.r(__webpack_exports__);
17988/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TouchListener", function() { return TouchListener; });
17989/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
17990/* harmony import */ var _utils_mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
17991/**
17992 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
17993 * @version v29.2.0
17994 * @link https://www.ag-grid.com/
17995 * @license MIT
17996 */
17997
17998
17999var TouchListener = /** @class */ (function () {
18000 function TouchListener(eElement, preventMouseClick) {
18001 var _this = this;
18002 if (preventMouseClick === void 0) { preventMouseClick = false; }
18003 this.destroyFuncs = [];
18004 this.touching = false;
18005 this.eventService = new _eventService__WEBPACK_IMPORTED_MODULE_0__["EventService"]();
18006 this.eElement = eElement;
18007 this.preventMouseClick = preventMouseClick;
18008 var startListener = this.onTouchStart.bind(this);
18009 var moveListener = this.onTouchMove.bind(this);
18010 var endListener = this.onTouchEnd.bind(this);
18011 this.eElement.addEventListener("touchstart", startListener, { passive: true });
18012 this.eElement.addEventListener("touchmove", moveListener, { passive: true });
18013 // we set passive=false, as we want to prevent default on this event
18014 this.eElement.addEventListener("touchend", endListener, { passive: false });
18015 this.destroyFuncs.push(function () {
18016 _this.eElement.removeEventListener("touchstart", startListener, { passive: true });
18017 _this.eElement.removeEventListener("touchmove", moveListener, { passive: true });
18018 _this.eElement.removeEventListener("touchend", endListener, { passive: false });
18019 });
18020 }
18021 TouchListener.prototype.getActiveTouch = function (touchList) {
18022 for (var i = 0; i < touchList.length; i++) {
18023 var matches = touchList[i].identifier === this.touchStart.identifier;
18024 if (matches) {
18025 return touchList[i];
18026 }
18027 }
18028 return null;
18029 };
18030 TouchListener.prototype.addEventListener = function (eventType, listener) {
18031 this.eventService.addEventListener(eventType, listener);
18032 };
18033 TouchListener.prototype.removeEventListener = function (eventType, listener) {
18034 this.eventService.removeEventListener(eventType, listener);
18035 };
18036 TouchListener.prototype.onTouchStart = function (touchEvent) {
18037 var _this = this;
18038 // only looking at one touch point at any time
18039 if (this.touching) {
18040 return;
18041 }
18042 this.touchStart = touchEvent.touches[0];
18043 this.touching = true;
18044 this.moved = false;
18045 var touchStartCopy = this.touchStart;
18046 window.setTimeout(function () {
18047 var touchesMatch = _this.touchStart === touchStartCopy;
18048 if (_this.touching && touchesMatch && !_this.moved) {
18049 _this.moved = true;
18050 var event_1 = {
18051 type: TouchListener.EVENT_LONG_TAP,
18052 touchStart: _this.touchStart,
18053 touchEvent: touchEvent
18054 };
18055 _this.eventService.dispatchEvent(event_1);
18056 }
18057 }, 500);
18058 };
18059 TouchListener.prototype.onTouchMove = function (touchEvent) {
18060 if (!this.touching) {
18061 return;
18062 }
18063 var touch = this.getActiveTouch(touchEvent.touches);
18064 if (!touch) {
18065 return;
18066 }
18067 var eventIsFarAway = !Object(_utils_mouse__WEBPACK_IMPORTED_MODULE_1__["areEventsNear"])(touch, this.touchStart, 4);
18068 if (eventIsFarAway) {
18069 this.moved = true;
18070 }
18071 };
18072 TouchListener.prototype.onTouchEnd = function (touchEvent) {
18073 if (!this.touching) {
18074 return;
18075 }
18076 if (!this.moved) {
18077 var event_2 = {
18078 type: TouchListener.EVENT_TAP,
18079 touchStart: this.touchStart
18080 };
18081 this.eventService.dispatchEvent(event_2);
18082 this.checkForDoubleTap();
18083 }
18084 // stops the tap from also been processed as a mouse click
18085 if (this.preventMouseClick && touchEvent.cancelable) {
18086 touchEvent.preventDefault();
18087 }
18088 this.touching = false;
18089 };
18090 TouchListener.prototype.checkForDoubleTap = function () {
18091 var now = new Date().getTime();
18092 if (this.lastTapTime && this.lastTapTime > 0) {
18093 // if previous tap, see if duration is short enough to be considered double tap
18094 var interval = now - this.lastTapTime;
18095 if (interval > TouchListener.DOUBLE_TAP_MILLIS) {
18096 // dispatch double tap event
18097 var event_3 = {
18098 type: TouchListener.EVENT_DOUBLE_TAP,
18099 touchStart: this.touchStart
18100 };
18101 this.eventService.dispatchEvent(event_3);
18102 // this stops a tripple tap ending up as two double taps
18103 this.lastTapTime = null;
18104 }
18105 else {
18106 this.lastTapTime = now;
18107 }
18108 }
18109 else {
18110 this.lastTapTime = now;
18111 }
18112 };
18113 TouchListener.prototype.destroy = function () {
18114 this.destroyFuncs.forEach(function (func) { return func(); });
18115 };
18116 TouchListener.EVENT_TAP = "tap";
18117 TouchListener.EVENT_DOUBLE_TAP = "doubleTap";
18118 TouchListener.EVENT_LONG_TAP = "longTap";
18119 TouchListener.DOUBLE_TAP_MILLIS = 500;
18120 return TouchListener;
18121}());
18122
18123
18124
18125/***/ }),
18126/* 87 */
18127/***/ (function(module, __webpack_exports__, __webpack_require__) {
18128
18129"use strict";
18130__webpack_require__.r(__webpack_exports__);
18131/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortIndicatorComp", function() { return SortIndicatorComp; });
18132/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26);
18133/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
18134/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
18135/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57);
18136/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(38);
18137/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(46);
18138/**
18139 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
18140 * @version v29.2.0
18141 * @link https://www.ag-grid.com/
18142 * @license MIT
18143 */
18144var __extends = (undefined && undefined.__extends) || (function () {
18145 var extendStatics = function (d, b) {
18146 extendStatics = Object.setPrototypeOf ||
18147 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18148 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
18149 return extendStatics(d, b);
18150 };
18151 return function (d, b) {
18152 extendStatics(d, b);
18153 function __() { this.constructor = d; }
18154 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18155 };
18156})();
18157var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
18158 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
18159 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
18160 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;
18161 return c > 3 && r && Object.defineProperty(target, key, r), r;
18162};
18163
18164
18165
18166
18167
18168
18169var SortIndicatorComp = /** @class */ (function (_super) {
18170 __extends(SortIndicatorComp, _super);
18171 function SortIndicatorComp(skipTemplate) {
18172 var _this = _super.call(this) || this;
18173 if (!skipTemplate) {
18174 _this.setTemplate(SortIndicatorComp.TEMPLATE);
18175 }
18176 return _this;
18177 }
18178 SortIndicatorComp.prototype.attachCustomElements = function (eSortOrder, eSortAsc, eSortDesc, eSortMixed, eSortNone) {
18179 this.eSortOrder = eSortOrder;
18180 this.eSortAsc = eSortAsc;
18181 this.eSortDesc = eSortDesc;
18182 this.eSortMixed = eSortMixed;
18183 this.eSortNone = eSortNone;
18184 };
18185 SortIndicatorComp.prototype.setupSort = function (column, suppressOrder) {
18186 var _this = this;
18187 if (suppressOrder === void 0) { suppressOrder = false; }
18188 this.column = column;
18189 this.suppressOrder = suppressOrder;
18190 this.setupMultiSortIndicator();
18191 var canSort = !!this.column.getColDef().sortable;
18192 if (!canSort) {
18193 return;
18194 }
18195 this.addInIcon('sortAscending', this.eSortAsc, column);
18196 this.addInIcon('sortDescending', this.eSortDesc, column);
18197 this.addInIcon('sortUnSort', this.eSortNone, column);
18198 // Watch global events, as row group columns can effect their display column.
18199 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SORT_CHANGED, function () { return _this.onSortChanged(); });
18200 // when grouping changes so can sort indexes and icons
18201 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, function () { return _this.onSortChanged(); });
18202 this.onSortChanged();
18203 };
18204 SortIndicatorComp.prototype.addInIcon = function (iconName, eParent, column) {
18205 if (eParent == null) {
18206 return;
18207 }
18208 var eIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_5__["createIconNoSpan"])(iconName, this.gridOptionsService, column);
18209 if (eIcon) {
18210 eParent.appendChild(eIcon);
18211 }
18212 };
18213 SortIndicatorComp.prototype.onSortChanged = function () {
18214 this.updateIcons();
18215 if (!this.suppressOrder) {
18216 this.updateSortOrder();
18217 }
18218 };
18219 SortIndicatorComp.prototype.updateIcons = function () {
18220 var sortDirection = this.sortController.getDisplaySortForColumn(this.column);
18221 if (this.eSortAsc) {
18222 var isAscending = sortDirection === 'asc';
18223 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisplayed"])(this.eSortAsc, isAscending, { skipAriaHidden: true });
18224 }
18225 if (this.eSortDesc) {
18226 var isDescending = sortDirection === 'desc';
18227 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisplayed"])(this.eSortDesc, isDescending, { skipAriaHidden: true });
18228 }
18229 if (this.eSortNone) {
18230 var alwaysHideNoSort = !this.column.getColDef().unSortIcon && !this.gridOptionsService.is('unSortIcon');
18231 var isNone = sortDirection === null || sortDirection === undefined;
18232 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisplayed"])(this.eSortNone, !alwaysHideNoSort && isNone, { skipAriaHidden: true });
18233 }
18234 };
18235 SortIndicatorComp.prototype.setupMultiSortIndicator = function () {
18236 var _this = this;
18237 this.addInIcon('sortUnSort', this.eSortMixed, this.column);
18238 var isColumnShowingRowGroup = this.column.getColDef().showRowGroup;
18239 var areGroupsCoupled = this.gridOptionsService.isColumnsSortingCoupledToGroup();
18240 if (areGroupsCoupled && isColumnShowingRowGroup) {
18241 // Watch global events, as row group columns can effect their display column.
18242 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SORT_CHANGED, function () { return _this.updateMultiSortIndicator(); });
18243 // when grouping changes so can sort indexes and icons
18244 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, function () { return _this.updateMultiSortIndicator(); });
18245 this.updateMultiSortIndicator();
18246 }
18247 };
18248 SortIndicatorComp.prototype.updateMultiSortIndicator = function () {
18249 if (this.eSortMixed) {
18250 var isMixedSort = this.sortController.getDisplaySortForColumn(this.column) === 'mixed';
18251 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisplayed"])(this.eSortMixed, isMixedSort, { skipAriaHidden: true });
18252 }
18253 };
18254 // we listen here for global sort events, NOT column sort events, as we want to do this
18255 // when sorting has been set on all column (if we listened just for our col (where we
18256 // set the asc / desc icons) then it's possible other cols are yet to get their sorting state.
18257 SortIndicatorComp.prototype.updateSortOrder = function () {
18258 var _this = this;
18259 var _a;
18260 if (!this.eSortOrder) {
18261 return;
18262 }
18263 var allColumnsWithSorting = this.sortController.getColumnsWithSortingOrdered();
18264 var indexThisCol = (_a = this.sortController.getDisplaySortIndexForColumn(this.column)) !== null && _a !== void 0 ? _a : -1;
18265 var moreThanOneColSorting = allColumnsWithSorting.some(function (col) { var _a; return (_a = _this.sortController.getDisplaySortIndexForColumn(col)) !== null && _a !== void 0 ? _a : -1 >= 1; });
18266 var showIndex = indexThisCol >= 0 && moreThanOneColSorting;
18267 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisplayed"])(this.eSortOrder, showIndex, { skipAriaHidden: true });
18268 if (indexThisCol >= 0) {
18269 this.eSortOrder.innerHTML = (indexThisCol + 1).toString();
18270 }
18271 else {
18272 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["clearElement"])(this.eSortOrder);
18273 }
18274 };
18275 SortIndicatorComp.TEMPLATE = "<span class=\"ag-sort-indicator-container\">\n <span ref=\"eSortOrder\" class=\"ag-sort-indicator-icon ag-sort-order ag-hidden\" aria-hidden=\"true\"></span>\n <span ref=\"eSortAsc\" class=\"ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden\" aria-hidden=\"true\"></span>\n <span ref=\"eSortDesc\" class=\"ag-sort-indicator-icon ag-sort-descending-icon ag-hidden\" aria-hidden=\"true\"></span>\n <span ref=\"eSortMixed\" class=\"ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden\" aria-hidden=\"true\"></span>\n <span ref=\"eSortNone\" class=\"ag-sort-indicator-icon ag-sort-none-icon ag-hidden\" aria-hidden=\"true\"></span>\n </span>";
18276 __decorate([
18277 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eSortOrder')
18278 ], SortIndicatorComp.prototype, "eSortOrder", void 0);
18279 __decorate([
18280 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eSortAsc')
18281 ], SortIndicatorComp.prototype, "eSortAsc", void 0);
18282 __decorate([
18283 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eSortDesc')
18284 ], SortIndicatorComp.prototype, "eSortDesc", void 0);
18285 __decorate([
18286 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eSortMixed')
18287 ], SortIndicatorComp.prototype, "eSortMixed", void 0);
18288 __decorate([
18289 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eSortNone')
18290 ], SortIndicatorComp.prototype, "eSortNone", void 0);
18291 __decorate([
18292 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
18293 ], SortIndicatorComp.prototype, "columnModel", void 0);
18294 __decorate([
18295 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('sortController')
18296 ], SortIndicatorComp.prototype, "sortController", void 0);
18297 return SortIndicatorComp;
18298}(_widgets_component__WEBPACK_IMPORTED_MODULE_4__["Component"]));
18299
18300
18301
18302/***/ }),
18303/* 88 */
18304/***/ (function(module, __webpack_exports__, __webpack_require__) {
18305
18306"use strict";
18307__webpack_require__.r(__webpack_exports__);
18308/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupComp", function() { return HeaderGroupComp; });
18309/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
18310/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
18311/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
18312/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
18313/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
18314/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
18315/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46);
18316/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31);
18317/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38);
18318/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(57);
18319/* harmony import */ var _widgets_touchListener__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(86);
18320/**
18321 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
18322 * @version v29.2.0
18323 * @link https://www.ag-grid.com/
18324 * @license MIT
18325 */
18326var __extends = (undefined && undefined.__extends) || (function () {
18327 var extendStatics = function (d, b) {
18328 extendStatics = Object.setPrototypeOf ||
18329 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18330 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
18331 return extendStatics(d, b);
18332 };
18333 return function (d, b) {
18334 extendStatics(d, b);
18335 function __() { this.constructor = d; }
18336 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18337 };
18338})();
18339var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
18340 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
18341 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
18342 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;
18343 return c > 3 && r && Object.defineProperty(target, key, r), r;
18344};
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356var HeaderGroupComp = /** @class */ (function (_super) {
18357 __extends(HeaderGroupComp, _super);
18358 function HeaderGroupComp() {
18359 return _super.call(this, HeaderGroupComp.TEMPLATE) || this;
18360 }
18361 // this is a user component, and IComponent has "public destroy()" as part of the interface.
18362 // so we need to override destroy() just to make the method public.
18363 HeaderGroupComp.prototype.destroy = function () {
18364 _super.prototype.destroy.call(this);
18365 };
18366 HeaderGroupComp.prototype.init = function (params) {
18367 this.params = params;
18368 this.checkWarnings();
18369 this.setupLabel();
18370 this.addGroupExpandIcon();
18371 this.setupExpandIcons();
18372 };
18373 HeaderGroupComp.prototype.checkWarnings = function () {
18374 var paramsAny = this.params;
18375 if (paramsAny.template) {
18376 var message_1 = "AG Grid: A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)";
18377 Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["doOnce"])(function () { return console.warn(message_1); }, 'HeaderGroupComp.templateNotSupported');
18378 }
18379 };
18380 HeaderGroupComp.prototype.setupExpandIcons = function () {
18381 var _this = this;
18382 this.addInIcon("columnGroupOpened", "agOpened");
18383 this.addInIcon("columnGroupClosed", "agClosed");
18384 var expandAction = function (event) {
18385 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_3__["isStopPropagationForAgGrid"])(event)) {
18386 return;
18387 }
18388 var newExpandedValue = !_this.params.columnGroup.isExpanded();
18389 _this.columnModel.setColumnGroupOpened(_this.params.columnGroup.getProvidedColumnGroup(), newExpandedValue, "uiColumnExpanded");
18390 };
18391 this.addTouchAndClickListeners(this.eCloseIcon, expandAction);
18392 this.addTouchAndClickListeners(this.eOpenIcon, expandAction);
18393 var stopPropagationAction = function (event) {
18394 Object(_utils_event__WEBPACK_IMPORTED_MODULE_3__["stopPropagationForAgGrid"])(event);
18395 };
18396 // adding stopPropagation to the double click for the icons prevents double click action happening
18397 // when the icons are clicked. if the icons are double clicked, then the groups should open and
18398 // then close again straight away. if we also listened to double click, then the group would open,
18399 // close, then open, which is not what we want. double click should only action if the user double
18400 // clicks outside of the icons.
18401 this.addManagedListener(this.eCloseIcon, "dblclick", stopPropagationAction);
18402 this.addManagedListener(this.eOpenIcon, "dblclick", stopPropagationAction);
18403 this.addManagedListener(this.getGui(), "dblclick", expandAction);
18404 this.updateIconVisibility();
18405 var providedColumnGroup = this.params.columnGroup.getProvidedColumnGroup();
18406 this.addManagedListener(providedColumnGroup, _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"].EVENT_EXPANDED_CHANGED, this.updateIconVisibility.bind(this));
18407 this.addManagedListener(providedColumnGroup, _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_1__["ProvidedColumnGroup"].EVENT_EXPANDABLE_CHANGED, this.updateIconVisibility.bind(this));
18408 };
18409 HeaderGroupComp.prototype.addTouchAndClickListeners = function (eElement, action) {
18410 var touchListener = new _widgets_touchListener__WEBPACK_IMPORTED_MODULE_10__["TouchListener"](eElement, true);
18411 this.addManagedListener(touchListener, _widgets_touchListener__WEBPACK_IMPORTED_MODULE_10__["TouchListener"].EVENT_TAP, action);
18412 this.addDestroyFunc(function () { return touchListener.destroy(); });
18413 this.addManagedListener(eElement, "click", action);
18414 };
18415 HeaderGroupComp.prototype.updateIconVisibility = function () {
18416 var columnGroup = this.params.columnGroup;
18417 if (columnGroup.isExpandable()) {
18418 var expanded = this.params.columnGroup.isExpanded();
18419 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eOpenIcon, expanded);
18420 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eCloseIcon, !expanded);
18421 }
18422 else {
18423 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eOpenIcon, false);
18424 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eCloseIcon, false);
18425 }
18426 };
18427 HeaderGroupComp.prototype.addInIcon = function (iconName, refName) {
18428 var eIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_6__["createIconNoSpan"])(iconName, this.gridOptionsService, null);
18429 if (eIcon) {
18430 this.getRefElement(refName).appendChild(eIcon);
18431 }
18432 };
18433 HeaderGroupComp.prototype.addGroupExpandIcon = function () {
18434 if (!this.params.columnGroup.isExpandable()) {
18435 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eOpenIcon, false);
18436 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.eCloseIcon, false);
18437 return;
18438 }
18439 };
18440 HeaderGroupComp.prototype.setupLabel = function () {
18441 // no renderer, default text render
18442 var displayName = this.params.displayName;
18443 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(displayName)) {
18444 var displayNameSanitised = Object(_utils_string__WEBPACK_IMPORTED_MODULE_7__["escapeString"])(displayName);
18445 this.getRefElement('agLabel').innerHTML = displayNameSanitised;
18446 }
18447 };
18448 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>";
18449 __decorate([
18450 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("columnModel")
18451 ], HeaderGroupComp.prototype, "columnModel", void 0);
18452 __decorate([
18453 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])("agOpened")
18454 ], HeaderGroupComp.prototype, "eOpenIcon", void 0);
18455 __decorate([
18456 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_9__["RefSelector"])("agClosed")
18457 ], HeaderGroupComp.prototype, "eCloseIcon", void 0);
18458 return HeaderGroupComp;
18459}(_widgets_component__WEBPACK_IMPORTED_MODULE_8__["Component"]));
18460
18461
18462
18463/***/ }),
18464/* 89 */
18465/***/ (function(module, __webpack_exports__, __webpack_require__) {
18466
18467"use strict";
18468__webpack_require__.r(__webpack_exports__);
18469/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LargeTextCellEditor", function() { return LargeTextCellEditor; });
18470/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
18471/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
18472/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
18473/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48);
18474/**
18475 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
18476 * @version v29.2.0
18477 * @link https://www.ag-grid.com/
18478 * @license MIT
18479 */
18480var __extends = (undefined && undefined.__extends) || (function () {
18481 var extendStatics = function (d, b) {
18482 extendStatics = Object.setPrototypeOf ||
18483 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18484 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
18485 return extendStatics(d, b);
18486 };
18487 return function (d, b) {
18488 extendStatics(d, b);
18489 function __() { this.constructor = d; }
18490 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18491 };
18492})();
18493var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
18494 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
18495 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
18496 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;
18497 return c > 3 && r && Object.defineProperty(target, key, r), r;
18498};
18499
18500
18501
18502
18503var LargeTextCellEditor = /** @class */ (function (_super) {
18504 __extends(LargeTextCellEditor, _super);
18505 function LargeTextCellEditor() {
18506 return _super.call(this, LargeTextCellEditor.TEMPLATE) || this;
18507 }
18508 LargeTextCellEditor.prototype.init = function (params) {
18509 this.params = params;
18510 this.focusAfterAttached = params.cellStartedEdit;
18511 this.eTextArea
18512 .setMaxLength(params.maxLength || 200)
18513 .setCols(params.cols || 60)
18514 .setRows(params.rows || 10);
18515 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(params.value, true)) {
18516 this.eTextArea.setValue(params.value.toString(), true);
18517 }
18518 this.addGuiEventListener('keydown', this.onKeyDown.bind(this));
18519 };
18520 LargeTextCellEditor.prototype.onKeyDown = function (event) {
18521 var key = event.key;
18522 if (key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].LEFT ||
18523 key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP ||
18524 key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].RIGHT ||
18525 key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].DOWN ||
18526 (event.shiftKey && key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].ENTER)) { // shift+enter allows for newlines
18527 event.stopPropagation();
18528 }
18529 };
18530 LargeTextCellEditor.prototype.afterGuiAttached = function () {
18531 var translate = this.localeService.getLocaleTextFunc();
18532 this.eTextArea.setInputAriaLabel(translate('ariaInputEditor', 'Input Editor'));
18533 if (this.focusAfterAttached) {
18534 this.eTextArea.getFocusableElement().focus();
18535 }
18536 };
18537 LargeTextCellEditor.prototype.getValue = function () {
18538 return this.params.parseValue(this.eTextArea.getValue());
18539 };
18540 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>";
18541 __decorate([
18542 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])("eTextArea")
18543 ], LargeTextCellEditor.prototype, "eTextArea", void 0);
18544 return LargeTextCellEditor;
18545}(_widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__["PopupComponent"]));
18546
18547
18548
18549/***/ }),
18550/* 90 */
18551/***/ (function(module, __webpack_exports__, __webpack_require__) {
18552
18553"use strict";
18554__webpack_require__.r(__webpack_exports__);
18555/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupComponent", function() { return PopupComponent; });
18556/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
18557/**
18558 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
18559 * @version v29.2.0
18560 * @link https://www.ag-grid.com/
18561 * @license MIT
18562 */
18563var __extends = (undefined && undefined.__extends) || (function () {
18564 var extendStatics = function (d, b) {
18565 extendStatics = Object.setPrototypeOf ||
18566 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18567 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
18568 return extendStatics(d, b);
18569 };
18570 return function (d, b) {
18571 extendStatics(d, b);
18572 function __() { this.constructor = d; }
18573 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18574 };
18575})();
18576
18577var PopupComponent = /** @class */ (function (_super) {
18578 __extends(PopupComponent, _super);
18579 function PopupComponent() {
18580 return _super !== null && _super.apply(this, arguments) || this;
18581 }
18582 PopupComponent.prototype.isPopup = function () {
18583 return true;
18584 };
18585 PopupComponent.prototype.setParentComponent = function (container) {
18586 container.addCssClass('ag-has-popup');
18587 _super.prototype.setParentComponent.call(this, container);
18588 };
18589 PopupComponent.prototype.destroy = function () {
18590 var parentComp = this.parentComponent;
18591 var hasParent = parentComp && parentComp.isAlive();
18592 if (hasParent) {
18593 parentComp.getGui().classList.remove('ag-has-popup');
18594 }
18595 _super.prototype.destroy.call(this);
18596 };
18597 return PopupComponent;
18598}(_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
18599
18600
18601
18602/***/ }),
18603/* 91 */
18604/***/ (function(module, __webpack_exports__, __webpack_require__) {
18605
18606"use strict";
18607__webpack_require__.r(__webpack_exports__);
18608/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectCellEditor", function() { return SelectCellEditor; });
18609/* harmony import */ var _widgets_agSelect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(66);
18610/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
18611/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90);
18612/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57);
18613/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
18614/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(48);
18615/**
18616 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
18617 * @version v29.2.0
18618 * @link https://www.ag-grid.com/
18619 * @license MIT
18620 */
18621var __extends = (undefined && undefined.__extends) || (function () {
18622 var extendStatics = function (d, b) {
18623 extendStatics = Object.setPrototypeOf ||
18624 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18625 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
18626 return extendStatics(d, b);
18627 };
18628 return function (d, b) {
18629 extendStatics(d, b);
18630 function __() { this.constructor = d; }
18631 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18632 };
18633})();
18634var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
18635 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
18636 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
18637 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;
18638 return c > 3 && r && Object.defineProperty(target, key, r), r;
18639};
18640
18641
18642
18643
18644
18645
18646var SelectCellEditor = /** @class */ (function (_super) {
18647 __extends(SelectCellEditor, _super);
18648 function SelectCellEditor() {
18649 var _this = _super.call(this, '<div class="ag-cell-edit-wrapper"><ag-select class="ag-cell-editor" ref="eSelect"></ag-select></div>') || this;
18650 _this.startedByEnter = false;
18651 return _this;
18652 }
18653 SelectCellEditor.prototype.init = function (params) {
18654 var _this = this;
18655 this.focusAfterAttached = params.cellStartedEdit;
18656 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(params.values)) {
18657 console.warn('AG Grid: no values found for select cellEditor');
18658 return;
18659 }
18660 this.startedByEnter = params.eventKey != null ? params.eventKey === _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].ENTER : false;
18661 var hasValue = false;
18662 params.values.forEach(function (value) {
18663 var option = { value: value };
18664 var valueFormatted = _this.valueFormatterService.formatValue(params.column, null, value);
18665 var valueFormattedExits = valueFormatted !== null && valueFormatted !== undefined;
18666 option.text = valueFormattedExits ? valueFormatted : value;
18667 _this.eSelect.addOption(option);
18668 hasValue = hasValue || params.value === value;
18669 });
18670 if (hasValue) {
18671 this.eSelect.setValue(params.value, true);
18672 }
18673 else if (params.values.length) {
18674 this.eSelect.setValue(params.values[0], true);
18675 }
18676 // we don't want to add this if full row editing, otherwise selecting will stop the
18677 // full row editing.
18678 if (this.gridOptionsService.get('editType') !== 'fullRow') {
18679 this.addManagedListener(this.eSelect, _widgets_agSelect__WEBPACK_IMPORTED_MODULE_0__["AgSelect"].EVENT_ITEM_SELECTED, function () { return params.stopEditing(); });
18680 }
18681 };
18682 SelectCellEditor.prototype.afterGuiAttached = function () {
18683 if (this.focusAfterAttached) {
18684 this.eSelect.getFocusableElement().focus();
18685 }
18686 if (this.startedByEnter) {
18687 this.eSelect.showPicker();
18688 }
18689 };
18690 SelectCellEditor.prototype.focusIn = function () {
18691 this.eSelect.getFocusableElement().focus();
18692 };
18693 SelectCellEditor.prototype.getValue = function () {
18694 return this.eSelect.getValue();
18695 };
18696 SelectCellEditor.prototype.isPopup = function () {
18697 return false;
18698 };
18699 __decorate([
18700 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('valueFormatterService')
18701 ], SelectCellEditor.prototype, "valueFormatterService", void 0);
18702 __decorate([
18703 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eSelect')
18704 ], SelectCellEditor.prototype, "eSelect", void 0);
18705 return SelectCellEditor;
18706}(_widgets_popupComponent__WEBPACK_IMPORTED_MODULE_2__["PopupComponent"]));
18707
18708
18709
18710/***/ }),
18711/* 92 */
18712/***/ (function(module, __webpack_exports__, __webpack_require__) {
18713
18714"use strict";
18715__webpack_require__.r(__webpack_exports__);
18716/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextCellEditor", function() { return TextCellEditor; });
18717/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
18718/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
18719/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
18720/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
18721/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48);
18722/**
18723 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
18724 * @version v29.2.0
18725 * @link https://www.ag-grid.com/
18726 * @license MIT
18727 */
18728var __extends = (undefined && undefined.__extends) || (function () {
18729 var extendStatics = function (d, b) {
18730 extendStatics = Object.setPrototypeOf ||
18731 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18732 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
18733 return extendStatics(d, b);
18734 };
18735 return function (d, b) {
18736 extendStatics(d, b);
18737 function __() { this.constructor = d; }
18738 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18739 };
18740})();
18741var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
18742 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
18743 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
18744 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;
18745 return c > 3 && r && Object.defineProperty(target, key, r), r;
18746};
18747
18748
18749
18750
18751
18752var TextCellEditor = /** @class */ (function (_super) {
18753 __extends(TextCellEditor, _super);
18754 function TextCellEditor() {
18755 return _super.call(this, TextCellEditor.TEMPLATE) || this;
18756 }
18757 TextCellEditor.prototype.init = function (params) {
18758 this.params = params;
18759 var eInput = this.eInput;
18760 var startValue;
18761 // cellStartedEdit is only false if we are doing fullRow editing
18762 if (params.cellStartedEdit) {
18763 this.focusAfterAttached = true;
18764 if (params.eventKey === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].BACKSPACE || params.eventKey === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].DELETE) {
18765 startValue = '';
18766 }
18767 else if (params.charPress) {
18768 startValue = params.charPress;
18769 }
18770 else {
18771 startValue = this.getStartValue(params);
18772 if (params.eventKey !== _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].F2) {
18773 this.highlightAllOnFocus = true;
18774 }
18775 }
18776 }
18777 else {
18778 this.focusAfterAttached = false;
18779 startValue = this.getStartValue(params);
18780 }
18781 if (startValue != null) {
18782 eInput.setValue(startValue, true);
18783 }
18784 if (params.maxLength != null) {
18785 eInput.setMaxLength(params.maxLength);
18786 }
18787 this.addManagedListener(eInput.getGui(), 'keydown', function (event) {
18788 var key = event.key;
18789 if (key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_UP || key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_DOWN) {
18790 event.preventDefault();
18791 }
18792 });
18793 };
18794 TextCellEditor.prototype.afterGuiAttached = function () {
18795 var translate = this.localeService.getLocaleTextFunc();
18796 var eInput = this.eInput;
18797 eInput.setInputAriaLabel(translate('ariaInputEditor', 'Input Editor'));
18798 if (!this.focusAfterAttached) {
18799 return;
18800 }
18801 // Added for AG-3238. We can't remove this explicit focus() because Chrome requires an input
18802 // to be focused before setSelectionRange will work. But it triggers a bug in Safari where
18803 // explicitly focusing then blurring an empty field will cause the parent container to scroll.
18804 if (!Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isBrowserSafari"])()) {
18805 eInput.getFocusableElement().focus();
18806 }
18807 var inputEl = eInput.getInputElement();
18808 if (this.highlightAllOnFocus) {
18809 inputEl.select();
18810 }
18811 else {
18812 // when we started editing, we want the caret at the end, not the start.
18813 // this comes into play in two scenarios:
18814 // a) when user hits F2
18815 // b) when user hits a printable character
18816 var value = eInput.getValue();
18817 var len = (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(value) && value.length) || 0;
18818 if (len) {
18819 inputEl.setSelectionRange(len, len);
18820 }
18821 }
18822 };
18823 // gets called when tabbing trough cells and in full row edit mode
18824 TextCellEditor.prototype.focusIn = function () {
18825 var eInput = this.eInput;
18826 var focusEl = eInput.getFocusableElement();
18827 var inputEl = eInput.getInputElement();
18828 focusEl.focus();
18829 inputEl.select();
18830 };
18831 TextCellEditor.prototype.getValue = function () {
18832 var eInput = this.eInput;
18833 return this.params.parseValue(eInput.getValue());
18834 };
18835 TextCellEditor.prototype.getStartValue = function (params) {
18836 var formatValue = params.useFormatter || params.column.getColDef().refData;
18837 return formatValue ? params.formatValue(params.value) : params.value;
18838 };
18839 TextCellEditor.prototype.isPopup = function () {
18840 return false;
18841 };
18842 TextCellEditor.TEMPLATE = "<div class=\"ag-cell-edit-wrapper\">\n <ag-input-text-field class=\"ag-cell-editor\" ref=\"eInput\"></ag-input-text-field>\n </div>";
18843 __decorate([
18844 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eInput')
18845 ], TextCellEditor.prototype, "eInput", void 0);
18846 return TextCellEditor;
18847}(_widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__["PopupComponent"]));
18848
18849
18850
18851/***/ }),
18852/* 93 */
18853/***/ (function(module, __webpack_exports__, __webpack_require__) {
18854
18855"use strict";
18856__webpack_require__.r(__webpack_exports__);
18857/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimateShowChangeCellRenderer", function() { return AnimateShowChangeCellRenderer; });
18858/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
18859/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38);
18860/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
18861/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45);
18862/**
18863 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
18864 * @version v29.2.0
18865 * @link https://www.ag-grid.com/
18866 * @license MIT
18867 */
18868var __extends = (undefined && undefined.__extends) || (function () {
18869 var extendStatics = function (d, b) {
18870 extendStatics = Object.setPrototypeOf ||
18871 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18872 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
18873 return extendStatics(d, b);
18874 };
18875 return function (d, b) {
18876 extendStatics(d, b);
18877 function __() { this.constructor = d; }
18878 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18879 };
18880})();
18881var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
18882 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
18883 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
18884 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;
18885 return c > 3 && r && Object.defineProperty(target, key, r), r;
18886};
18887
18888
18889
18890
18891var ARROW_UP = '\u2191';
18892var ARROW_DOWN = '\u2193';
18893var AnimateShowChangeCellRenderer = /** @class */ (function (_super) {
18894 __extends(AnimateShowChangeCellRenderer, _super);
18895 function AnimateShowChangeCellRenderer() {
18896 var _this = _super.call(this, AnimateShowChangeCellRenderer.TEMPLATE) || this;
18897 _this.refreshCount = 0;
18898 return _this;
18899 }
18900 AnimateShowChangeCellRenderer.prototype.init = function (params) {
18901 // this.params = params;
18902 this.eValue = this.queryForHtmlElement('.ag-value-change-value');
18903 this.eDelta = this.queryForHtmlElement('.ag-value-change-delta');
18904 this.refresh(params);
18905 };
18906 AnimateShowChangeCellRenderer.prototype.showDelta = function (params, delta) {
18907 var absDelta = Math.abs(delta);
18908 var valueFormatted = params.formatValue(absDelta);
18909 var valueToUse = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(valueFormatted) ? valueFormatted : absDelta;
18910 var deltaUp = (delta >= 0);
18911 if (deltaUp) {
18912 this.eDelta.innerHTML = ARROW_UP + valueToUse;
18913 }
18914 else {
18915 // because negative, use ABS to remove sign
18916 this.eDelta.innerHTML = ARROW_DOWN + valueToUse;
18917 }
18918 this.eDelta.classList.toggle('ag-value-change-delta-up', deltaUp);
18919 this.eDelta.classList.toggle('ag-value-change-delta-down', !deltaUp);
18920 };
18921 AnimateShowChangeCellRenderer.prototype.setTimerToRemoveDelta = function () {
18922 var _this = this;
18923 // the refreshCount makes sure that if the value updates again while
18924 // the below timer is waiting, then the below timer will realise it
18925 // is not the most recent and will not try to remove the delta value.
18926 this.refreshCount++;
18927 var refreshCountCopy = this.refreshCount;
18928 window.setTimeout(function () {
18929 if (refreshCountCopy === _this.refreshCount) {
18930 _this.hideDeltaValue();
18931 }
18932 }, 2000);
18933 };
18934 AnimateShowChangeCellRenderer.prototype.hideDeltaValue = function () {
18935 this.eValue.classList.remove('ag-value-change-value-highlight');
18936 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["clearElement"])(this.eDelta);
18937 };
18938 AnimateShowChangeCellRenderer.prototype.refresh = function (params) {
18939 var value = params.value;
18940 if (value === this.lastValue) {
18941 return false;
18942 }
18943 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(params.valueFormatted)) {
18944 this.eValue.innerHTML = params.valueFormatted;
18945 }
18946 else if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(params.value)) {
18947 this.eValue.innerHTML = value;
18948 }
18949 else {
18950 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["clearElement"])(this.eValue);
18951 }
18952 // we don't show the delta if we are in the middle of a filter. see comment on FilterManager
18953 // with regards processingFilterChange
18954 if (this.filterManager.isSuppressFlashingCellsBecauseFiltering()) {
18955 return false;
18956 }
18957 if (typeof value === 'number' && typeof this.lastValue === 'number') {
18958 var delta = value - this.lastValue;
18959 this.showDelta(params, delta);
18960 }
18961 // highlight the current value, but only if it's not new, otherwise it
18962 // would get highlighted first time the value is shown
18963 if (this.lastValue) {
18964 this.eValue.classList.add('ag-value-change-value-highlight');
18965 }
18966 this.setTimerToRemoveDelta();
18967 this.lastValue = value;
18968 return true;
18969 };
18970 AnimateShowChangeCellRenderer.TEMPLATE = '<span>' +
18971 '<span class="ag-value-change-delta"></span>' +
18972 '<span class="ag-value-change-value"></span>' +
18973 '</span>';
18974 __decorate([
18975 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
18976 ], AnimateShowChangeCellRenderer.prototype, "filterManager", void 0);
18977 return AnimateShowChangeCellRenderer;
18978}(_widgets_component__WEBPACK_IMPORTED_MODULE_1__["Component"]));
18979
18980
18981
18982/***/ }),
18983/* 94 */
18984/***/ (function(module, __webpack_exports__, __webpack_require__) {
18985
18986"use strict";
18987__webpack_require__.r(__webpack_exports__);
18988/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimateSlideCellRenderer", function() { return AnimateSlideCellRenderer; });
18989/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
18990/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38);
18991/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
18992/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
18993/**
18994 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
18995 * @version v29.2.0
18996 * @link https://www.ag-grid.com/
18997 * @license MIT
18998 */
18999var __extends = (undefined && undefined.__extends) || (function () {
19000 var extendStatics = function (d, b) {
19001 extendStatics = Object.setPrototypeOf ||
19002 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19003 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
19004 return extendStatics(d, b);
19005 };
19006 return function (d, b) {
19007 extendStatics(d, b);
19008 function __() { this.constructor = d; }
19009 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19010 };
19011})();
19012var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
19013 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19014 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
19015 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;
19016 return c > 3 && r && Object.defineProperty(target, key, r), r;
19017};
19018
19019
19020
19021
19022var AnimateSlideCellRenderer = /** @class */ (function (_super) {
19023 __extends(AnimateSlideCellRenderer, _super);
19024 function AnimateSlideCellRenderer() {
19025 var _this = _super.call(this, AnimateSlideCellRenderer.TEMPLATE) || this;
19026 _this.refreshCount = 0;
19027 _this.eCurrent = _this.queryForHtmlElement('.ag-value-slide-current');
19028 return _this;
19029 }
19030 AnimateSlideCellRenderer.prototype.init = function (params) {
19031 this.refresh(params);
19032 };
19033 AnimateSlideCellRenderer.prototype.addSlideAnimation = function () {
19034 var _this = this;
19035 this.refreshCount++;
19036 // below we keep checking this, and stop working on the animation
19037 // if it no longer matches - this means another animation has started
19038 // and this one is stale.
19039 var refreshCountCopy = this.refreshCount;
19040 // if old animation, remove it
19041 if (this.ePrevious) {
19042 this.getGui().removeChild(this.ePrevious);
19043 }
19044 this.ePrevious = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["loadTemplate"])('<span class="ag-value-slide-previous ag-value-slide-out"></span>');
19045 this.ePrevious.innerHTML = this.eCurrent.innerHTML;
19046 this.getGui().insertBefore(this.ePrevious, this.eCurrent);
19047 // having timeout of 0 allows use to skip to the next css turn,
19048 // so we know the previous css classes have been applied. so the
19049 // complex set of setTimeout below creates the animation
19050 window.setTimeout(function () {
19051 if (refreshCountCopy !== _this.refreshCount) {
19052 return;
19053 }
19054 _this.ePrevious.classList.add('ag-value-slide-out-end');
19055 }, 50);
19056 window.setTimeout(function () {
19057 if (refreshCountCopy !== _this.refreshCount) {
19058 return;
19059 }
19060 _this.getGui().removeChild(_this.ePrevious);
19061 _this.ePrevious = null;
19062 }, 3000);
19063 };
19064 AnimateSlideCellRenderer.prototype.refresh = function (params) {
19065 var value = params.value;
19066 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(value)) {
19067 value = '';
19068 }
19069 if (value === this.lastValue) {
19070 return false;
19071 }
19072 // we don't show the delta if we are in the middle of a filter. see comment on FilterManager
19073 // with regards processingFilterChange
19074 if (this.filterManager.isSuppressFlashingCellsBecauseFiltering()) {
19075 return false;
19076 }
19077 this.addSlideAnimation();
19078 this.lastValue = value;
19079 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(params.valueFormatted)) {
19080 this.eCurrent.innerHTML = params.valueFormatted;
19081 }
19082 else if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(params.value)) {
19083 this.eCurrent.innerHTML = value;
19084 }
19085 else {
19086 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["clearElement"])(this.eCurrent);
19087 }
19088 return true;
19089 };
19090 AnimateSlideCellRenderer.TEMPLATE = "<span>\n <span class=\"ag-value-slide-current\"></span>\n </span>";
19091 __decorate([
19092 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
19093 ], AnimateSlideCellRenderer.prototype, "filterManager", void 0);
19094 return AnimateSlideCellRenderer;
19095}(_widgets_component__WEBPACK_IMPORTED_MODULE_1__["Component"]));
19096
19097
19098
19099/***/ }),
19100/* 95 */
19101/***/ (function(module, __webpack_exports__, __webpack_require__) {
19102
19103"use strict";
19104__webpack_require__.r(__webpack_exports__);
19105/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupCellRenderer", function() { return GroupCellRenderer; });
19106/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
19107/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
19108/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38);
19109/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57);
19110/* harmony import */ var _groupCellRendererCtrl__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96);
19111/**
19112 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
19113 * @version v29.2.0
19114 * @link https://www.ag-grid.com/
19115 * @license MIT
19116 */
19117var __extends = (undefined && undefined.__extends) || (function () {
19118 var extendStatics = function (d, b) {
19119 extendStatics = Object.setPrototypeOf ||
19120 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19121 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
19122 return extendStatics(d, b);
19123 };
19124 return function (d, b) {
19125 extendStatics(d, b);
19126 function __() { this.constructor = d; }
19127 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19128 };
19129})();
19130var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
19131 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19132 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
19133 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;
19134 return c > 3 && r && Object.defineProperty(target, key, r), r;
19135};
19136
19137
19138
19139
19140
19141var GroupCellRenderer = /** @class */ (function (_super) {
19142 __extends(GroupCellRenderer, _super);
19143 function GroupCellRenderer() {
19144 return _super.call(this, GroupCellRenderer.TEMPLATE) || this;
19145 }
19146 GroupCellRenderer.prototype.init = function (params) {
19147 var _this = this;
19148 var compProxy = {
19149 setInnerRenderer: function (compDetails, valueToDisplay) { return _this.setRenderDetails(compDetails, valueToDisplay); },
19150 setChildCount: function (count) { return _this.eChildCount.innerHTML = count; },
19151 addOrRemoveCssClass: function (cssClass, value) { return _this.addOrRemoveCssClass(cssClass, value); },
19152 setContractedDisplayed: function (expanded) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisplayed"])(_this.eContracted, expanded); },
19153 setExpandedDisplayed: function (expanded) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisplayed"])(_this.eExpanded, expanded); },
19154 setCheckboxVisible: function (visible) { return _this.eCheckbox.classList.toggle('ag-invisible', !visible); }
19155 };
19156 var ctrl = this.createManagedBean(new _groupCellRendererCtrl__WEBPACK_IMPORTED_MODULE_4__["GroupCellRendererCtrl"]());
19157 var fullWidth = !params.colDef;
19158 var eGui = this.getGui();
19159 ctrl.init(compProxy, eGui, this.eCheckbox, this.eExpanded, this.eContracted, this.constructor, params);
19160 if (fullWidth) {
19161 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_0__["setAriaRole"])(eGui, 'gridcell');
19162 }
19163 };
19164 GroupCellRenderer.prototype.setRenderDetails = function (compDetails, valueToDisplay) {
19165 var _this = this;
19166 if (compDetails) {
19167 var componentPromise = compDetails.newAgStackInstance();
19168 if (!componentPromise) {
19169 return;
19170 }
19171 componentPromise.then(function (comp) {
19172 if (!comp) {
19173 return;
19174 }
19175 var destroyComp = function () { return _this.context.destroyBean(comp); };
19176 if (_this.isAlive()) {
19177 _this.eValue.appendChild(comp.getGui());
19178 _this.addDestroyFunc(destroyComp);
19179 }
19180 else {
19181 destroyComp();
19182 }
19183 });
19184 }
19185 else {
19186 this.eValue.innerText = valueToDisplay;
19187 }
19188 };
19189 // this is a user component, and IComponent has "public destroy()" as part of the interface.
19190 // so we need to have public here instead of private or protected
19191 GroupCellRenderer.prototype.destroy = function () {
19192 this.getContext().destroyBean(this.innerCellRenderer);
19193 _super.prototype.destroy.call(this);
19194 };
19195 GroupCellRenderer.prototype.refresh = function () {
19196 return false;
19197 };
19198 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>";
19199 __decorate([
19200 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eExpanded')
19201 ], GroupCellRenderer.prototype, "eExpanded", void 0);
19202 __decorate([
19203 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eContracted')
19204 ], GroupCellRenderer.prototype, "eContracted", void 0);
19205 __decorate([
19206 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eCheckbox')
19207 ], GroupCellRenderer.prototype, "eCheckbox", void 0);
19208 __decorate([
19209 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eValue')
19210 ], GroupCellRenderer.prototype, "eValue", void 0);
19211 __decorate([
19212 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eChildCount')
19213 ], GroupCellRenderer.prototype, "eChildCount", void 0);
19214 return GroupCellRenderer;
19215}(_widgets_component__WEBPACK_IMPORTED_MODULE_2__["Component"]));
19216
19217
19218
19219/***/ }),
19220/* 96 */
19221/***/ (function(module, __webpack_exports__, __webpack_require__) {
19222
19223"use strict";
19224__webpack_require__.r(__webpack_exports__);
19225/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupCellRendererCtrl", function() { return GroupCellRendererCtrl; });
19226/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(48);
19227/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
19228/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
19229/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97);
19230/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41);
19231/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18);
19232/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7);
19233/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(46);
19234/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12);
19235/* harmony import */ var _checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(98);
19236/* harmony import */ var _row_rowDragComp__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(99);
19237/**
19238 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
19239 * @version v29.2.0
19240 * @link https://www.ag-grid.com/
19241 * @license MIT
19242 */
19243var __extends = (undefined && undefined.__extends) || (function () {
19244 var extendStatics = function (d, b) {
19245 extendStatics = Object.setPrototypeOf ||
19246 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19247 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
19248 return extendStatics(d, b);
19249 };
19250 return function (d, b) {
19251 extendStatics(d, b);
19252 function __() { this.constructor = d; }
19253 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19254 };
19255})();
19256var __assign = (undefined && undefined.__assign) || function () {
19257 __assign = Object.assign || function(t) {
19258 for (var s, i = 1, n = arguments.length; i < n; i++) {
19259 s = arguments[i];
19260 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19261 t[p] = s[p];
19262 }
19263 return t;
19264 };
19265 return __assign.apply(this, arguments);
19266};
19267var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
19268 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19269 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
19270 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;
19271 return c > 3 && r && Object.defineProperty(target, key, r), r;
19272};
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284var GroupCellRendererCtrl = /** @class */ (function (_super) {
19285 __extends(GroupCellRendererCtrl, _super);
19286 function GroupCellRendererCtrl() {
19287 return _super !== null && _super.apply(this, arguments) || this;
19288 }
19289 GroupCellRendererCtrl.prototype.init = function (comp, eGui, eCheckbox, eExpanded, eContracted, compClass, params) {
19290 this.params = params;
19291 this.eGui = eGui;
19292 this.eCheckbox = eCheckbox;
19293 this.eExpanded = eExpanded;
19294 this.eContracted = eContracted;
19295 this.comp = comp;
19296 this.compClass = compClass;
19297 var topLevelFooter = this.isTopLevelFooter();
19298 var embeddedRowMismatch = this.isEmbeddedRowMismatch();
19299 // This allows for empty strings to appear as groups since
19300 // it will only return for null or undefined.
19301 var isNullValueAndNotMaster = params.value == null && !params.node.master;
19302 var skipCell = false;
19303 // if the groupCellRenderer is inside of a footer and groupHideOpenParents is true
19304 // we should only display the groupCellRenderer if the current column is the rowGroupedColumn
19305 if (this.gridOptionsService.is('groupIncludeFooter') && this.gridOptionsService.is('groupHideOpenParents')) {
19306 var node = params.node;
19307 if (node.footer) {
19308 var showRowGroup = params.colDef && params.colDef.showRowGroup;
19309 var rowGroupColumnId = node.rowGroupColumn && node.rowGroupColumn.getColId();
19310 skipCell = showRowGroup !== rowGroupColumnId;
19311 }
19312 }
19313 this.cellIsBlank = topLevelFooter ? false : (embeddedRowMismatch || (isNullValueAndNotMaster && !params.node.master) || skipCell);
19314 if (this.cellIsBlank) {
19315 return;
19316 }
19317 this.setupShowingValueForOpenedParent();
19318 this.findDisplayedGroupNode();
19319 this.addFullWidthRowDraggerIfNeeded();
19320 this.addExpandAndContract();
19321 this.addCheckboxIfNeeded();
19322 this.addValueElement();
19323 this.setupIndent();
19324 this.refreshAriaExpanded();
19325 };
19326 GroupCellRendererCtrl.prototype.destroy = function () {
19327 _super.prototype.destroy.call(this);
19328 // property cleanup to avoid memory leaks
19329 this.expandListener = null;
19330 };
19331 GroupCellRendererCtrl.prototype.refreshAriaExpanded = function () {
19332 var _a = this.params, node = _a.node, eParentOfValue = _a.eParentOfValue;
19333 if (this.expandListener) {
19334 this.expandListener = this.expandListener();
19335 }
19336 if (!this.isExpandable()) {
19337 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_4__["removeAriaExpanded"])(eParentOfValue);
19338 return;
19339 }
19340 var listener = function () {
19341 // for react, we don't use JSX, as setting attributes via jsx is slower
19342 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_4__["setAriaExpanded"])(eParentOfValue, !!node.expanded);
19343 };
19344 this.expandListener = this.addManagedListener(node, _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__["RowNode"].EVENT_EXPANDED_CHANGED, listener) || null;
19345 listener();
19346 };
19347 GroupCellRendererCtrl.prototype.isTopLevelFooter = function () {
19348 if (!this.gridOptionsService.is('groupIncludeTotalFooter')) {
19349 return false;
19350 }
19351 if (this.params.value != null || this.params.node.level != -1) {
19352 return false;
19353 }
19354 // at this point, we know it's the root node and there is no value present, so it's a footer cell.
19355 // the only thing to work out is if we are displaying groups across multiple
19356 // columns (groupDisplayType: 'multipleColumns'), we only want 'total' to appear in the first column.
19357 var colDef = this.params.colDef;
19358 var doingFullWidth = colDef == null;
19359 if (doingFullWidth) {
19360 return true;
19361 }
19362 if (colDef.showRowGroup === true) {
19363 return true;
19364 }
19365 var rowGroupCols = this.columnModel.getRowGroupColumns();
19366 // this is a sanity check, rowGroupCols should always be present
19367 if (!rowGroupCols || rowGroupCols.length === 0) {
19368 return true;
19369 }
19370 var firstRowGroupCol = rowGroupCols[0];
19371 return firstRowGroupCol.getId() === colDef.showRowGroup;
19372 };
19373 // if we are doing embedded full width rows, we only show the renderer when
19374 // in the body, or if pinning in the pinned section, or if pinning and RTL,
19375 // in the right section. otherwise we would have the cell repeated in each section.
19376 GroupCellRendererCtrl.prototype.isEmbeddedRowMismatch = function () {
19377 if (!this.params.fullWidth || !this.gridOptionsService.is('embedFullWidthRows')) {
19378 return false;
19379 }
19380 var pinnedLeftCell = this.params.pinned === 'left';
19381 var pinnedRightCell = this.params.pinned === 'right';
19382 var bodyCell = !pinnedLeftCell && !pinnedRightCell;
19383 if (this.gridOptionsService.is('enableRtl')) {
19384 if (this.columnModel.isPinningLeft()) {
19385 return !pinnedRightCell;
19386 }
19387 return !bodyCell;
19388 }
19389 if (this.columnModel.isPinningLeft()) {
19390 return !pinnedLeftCell;
19391 }
19392 return !bodyCell;
19393 };
19394 GroupCellRendererCtrl.prototype.findDisplayedGroupNode = function () {
19395 var column = this.params.column;
19396 var rowNode = this.params.node;
19397 if (this.showingValueForOpenedParent) {
19398 var pointer = rowNode.parent;
19399 while (pointer != null) {
19400 if (pointer.rowGroupColumn && column.isRowGroupDisplayed(pointer.rowGroupColumn.getId())) {
19401 this.displayedGroupNode = pointer;
19402 break;
19403 }
19404 pointer = pointer.parent;
19405 }
19406 }
19407 // if we didn't find a displayed group, set it to the row node
19408 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missing"])(this.displayedGroupNode)) {
19409 this.displayedGroupNode = rowNode;
19410 }
19411 };
19412 GroupCellRendererCtrl.prototype.setupShowingValueForOpenedParent = function () {
19413 // note - this code depends on sortService.updateGroupDataForHiddenOpenParents, where group data
19414 // is updated to reflect the dragged down parents
19415 var rowNode = this.params.node;
19416 var column = this.params.column;
19417 if (!this.gridOptionsService.is('groupHideOpenParents')) {
19418 this.showingValueForOpenedParent = false;
19419 return;
19420 }
19421 // hideOpenParents means rowNode.groupData can have data for the group this column is displaying, even though
19422 // this rowNode isn't grouping by the column we are displaying
19423 // if no groupData at all, we are not showing a parent value
19424 if (!rowNode.groupData) {
19425 this.showingValueForOpenedParent = false;
19426 return;
19427 }
19428 // this is the normal case, in that we are showing a group for which this column is configured. note that
19429 // this means the Row Group is closed (if it was open, we would not be displaying it)
19430 var showingGroupNode = rowNode.rowGroupColumn != null;
19431 if (showingGroupNode) {
19432 var keyOfGroupingColumn = rowNode.rowGroupColumn.getId();
19433 var configuredToShowThisGroupLevel = column.isRowGroupDisplayed(keyOfGroupingColumn);
19434 // if showing group as normal, we didn't take group info from parent
19435 if (configuredToShowThisGroupLevel) {
19436 this.showingValueForOpenedParent = false;
19437 return;
19438 }
19439 }
19440 // see if we are showing a Group Value for the Displayed Group. if we are showing a group value, and this Row Node
19441 // is not grouping by this Displayed Group, we must of gotten the value from a parent node
19442 var valPresent = rowNode.groupData[column.getId()] != null;
19443 this.showingValueForOpenedParent = valPresent;
19444 };
19445 GroupCellRendererCtrl.prototype.addValueElement = function () {
19446 if (this.displayedGroupNode.footer) {
19447 this.addFooterValue();
19448 }
19449 else {
19450 this.addGroupValue();
19451 this.addChildCount();
19452 }
19453 };
19454 GroupCellRendererCtrl.prototype.addGroupValue = function () {
19455 // we try and use the cellRenderer of the column used for the grouping if we can
19456 var paramsAdjusted = this.adjustParamsWithDetailsFromRelatedColumn();
19457 var innerCompDetails = this.getInnerCompDetails(paramsAdjusted);
19458 var valueFormatted = paramsAdjusted.valueFormatted, value = paramsAdjusted.value;
19459 var valueWhenNoRenderer = valueFormatted;
19460 if (valueWhenNoRenderer == null) {
19461 if (value === '' && this.params.node.group) {
19462 var localeTextFunc = this.localeService.getLocaleTextFunc();
19463 valueWhenNoRenderer = localeTextFunc('blanks', '(Blanks)');
19464 }
19465 else {
19466 valueWhenNoRenderer = value !== null && value !== void 0 ? value : null;
19467 }
19468 }
19469 this.comp.setInnerRenderer(innerCompDetails, valueWhenNoRenderer);
19470 };
19471 GroupCellRendererCtrl.prototype.adjustParamsWithDetailsFromRelatedColumn = function () {
19472 var relatedColumn = this.displayedGroupNode.rowGroupColumn;
19473 var column = this.params.column;
19474 if (!relatedColumn) {
19475 return this.params;
19476 }
19477 var notFullWidth = column != null;
19478 if (notFullWidth) {
19479 var showingThisRowGroup = column.isRowGroupDisplayed(relatedColumn.getId());
19480 if (!showingThisRowGroup) {
19481 return this.params;
19482 }
19483 }
19484 var params = this.params;
19485 var _a = this.params, value = _a.value, node = _a.node;
19486 var valueFormatted = this.valueFormatterService.formatValue(relatedColumn, node, value);
19487 // we don't update the original params, as they could of come through React,
19488 // as react has RowGroupCellRenderer, which means the params could be props which
19489 // would be read only
19490 var paramsAdjusted = __assign(__assign({}, params), { valueFormatted: valueFormatted });
19491 return paramsAdjusted;
19492 };
19493 GroupCellRendererCtrl.prototype.addFooterValue = function () {
19494 var footerValueGetter = this.params.footerValueGetter;
19495 var footerValue = '';
19496 if (footerValueGetter) {
19497 // params is same as we were given, except we set the value as the item to display
19498 var paramsClone = Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["cloneObject"])(this.params);
19499 paramsClone.value = this.params.value;
19500 if (typeof footerValueGetter === 'function') {
19501 footerValue = footerValueGetter(paramsClone);
19502 }
19503 else if (typeof footerValueGetter === 'string') {
19504 footerValue = this.expressionService.evaluate(footerValueGetter, paramsClone);
19505 }
19506 else {
19507 console.warn('AG Grid: footerValueGetter should be either a function or a string (expression)');
19508 }
19509 }
19510 else {
19511 footerValue = 'Total ' + (this.params.value != null ? this.params.value : '');
19512 }
19513 var innerCompDetails = this.getInnerCompDetails(this.params);
19514 this.comp.setInnerRenderer(innerCompDetails, footerValue);
19515 };
19516 GroupCellRendererCtrl.prototype.getInnerCompDetails = function (params) {
19517 var _this = this;
19518 // for full width rows, we don't do any of the below
19519 if (params.fullWidth) {
19520 return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptionsService.get('groupRowRendererParams'), params);
19521 }
19522 // when grouping, the normal case is we use the cell renderer of the grouped column. eg if grouping by country
19523 // and then rating, we will use the country cell renderer for each country group row and likewise the rating
19524 // cell renderer for each rating group row.
19525 //
19526 // however if the user has innerCellRenderer defined, this gets preference and we don't use cell renderers
19527 // of the grouped columns.
19528 //
19529 // so we check and use in the following order:
19530 //
19531 // 1) thisColDef.cellRendererParams.innerRenderer of the column showing the groups (eg auto group column)
19532 // 2) groupedColDef.cellRenderer of the grouped column
19533 // 3) groupedColDef.cellRendererParams.innerRenderer
19534 // we check if cell renderer provided for the group cell renderer, eg colDef.cellRendererParams.innerRenderer
19535 var innerCompDetails = this.userComponentFactory
19536 .getInnerRendererDetails(params, params);
19537 // avoid using GroupCellRenderer again, otherwise stack overflow, as we insert same renderer again and again.
19538 // this covers off chance user is grouping by a column that is also configured with GroupCellRenderer
19539 var isGroupRowRenderer = function (details) { return details && details.componentClass == _this.compClass; };
19540 if (innerCompDetails && !isGroupRowRenderer(innerCompDetails)) {
19541 // use the renderer defined in cellRendererParams.innerRenderer
19542 return innerCompDetails;
19543 }
19544 var relatedColumn = this.displayedGroupNode.rowGroupColumn;
19545 var relatedColDef = relatedColumn ? relatedColumn.getColDef() : undefined;
19546 if (!relatedColDef) {
19547 return;
19548 }
19549 // otherwise see if we can use the cellRenderer of the column we are grouping by
19550 var relatedCompDetails = this.userComponentFactory
19551 .getCellRendererDetails(relatedColDef, params);
19552 if (relatedCompDetails && !isGroupRowRenderer(relatedCompDetails)) {
19553 // Only if the original column is using a specific renderer, it it is a using a DEFAULT one ignore it
19554 return relatedCompDetails;
19555 }
19556 if (isGroupRowRenderer(relatedCompDetails) &&
19557 relatedColDef.cellRendererParams &&
19558 relatedColDef.cellRendererParams.innerRenderer) {
19559 // edge case - this comes from a column which has been grouped dynamically, that has a renderer 'group'
19560 // and has an inner cell renderer
19561 var res = this.userComponentFactory.getInnerRendererDetails(relatedColDef.cellRendererParams, params);
19562 return res;
19563 }
19564 };
19565 GroupCellRendererCtrl.prototype.addChildCount = function () {
19566 // only include the child count if it's included, eg if user doing custom aggregation,
19567 // then this could be left out, or set to -1, ie no child count
19568 if (this.params.suppressCount) {
19569 return;
19570 }
19571 this.addManagedListener(this.displayedGroupNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__["RowNode"].EVENT_ALL_CHILDREN_COUNT_CHANGED, this.updateChildCount.bind(this));
19572 // filtering changes the child count, so need to cater for it
19573 this.updateChildCount();
19574 };
19575 GroupCellRendererCtrl.prototype.updateChildCount = function () {
19576 var allChildrenCount = this.displayedGroupNode.allChildrenCount;
19577 var showingGroupForThisNode = this.isShowRowGroupForThisRow();
19578 var showCount = showingGroupForThisNode && allChildrenCount != null && allChildrenCount >= 0;
19579 var countString = showCount ? "(" + allChildrenCount + ")" : "";
19580 this.comp.setChildCount(countString);
19581 };
19582 GroupCellRendererCtrl.prototype.isShowRowGroupForThisRow = function () {
19583 if (this.gridOptionsService.isTreeData()) {
19584 return true;
19585 }
19586 var rowGroupColumn = this.displayedGroupNode.rowGroupColumn;
19587 if (!rowGroupColumn) {
19588 return false;
19589 }
19590 // column is null for fullWidthRows
19591 var column = this.params.column;
19592 var thisColumnIsInterested = column == null || column.isRowGroupDisplayed(rowGroupColumn.getId());
19593 return thisColumnIsInterested;
19594 };
19595 GroupCellRendererCtrl.prototype.addExpandAndContract = function () {
19596 var params = this.params;
19597 var eExpandedIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_7__["createIconNoSpan"])('groupExpanded', this.gridOptionsService, null);
19598 var eContractedIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_7__["createIconNoSpan"])('groupContracted', this.gridOptionsService, null);
19599 if (eExpandedIcon) {
19600 this.eExpanded.appendChild(eExpandedIcon);
19601 }
19602 if (eContractedIcon) {
19603 this.eContracted.appendChild(eContractedIcon);
19604 }
19605 var eGroupCell = params.eGridCell;
19606 // if editing groups, then double click is to start editing
19607 if (!this.gridOptionsService.is('enableGroupEdit') && this.isExpandable() && !params.suppressDoubleClickExpand) {
19608 this.addManagedListener(eGroupCell, 'dblclick', this.onCellDblClicked.bind(this));
19609 }
19610 this.addManagedListener(this.eExpanded, 'click', this.onExpandClicked.bind(this));
19611 this.addManagedListener(this.eContracted, 'click', this.onExpandClicked.bind(this));
19612 // expand / contract as the user hits enter
19613 this.addManagedListener(eGroupCell, 'keydown', this.onKeyDown.bind(this));
19614 this.addManagedListener(params.node, _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__["RowNode"].EVENT_EXPANDED_CHANGED, this.showExpandAndContractIcons.bind(this));
19615 this.showExpandAndContractIcons();
19616 // because we don't show the expand / contract when there are no children, we need to check every time
19617 // the number of children change.
19618 var expandableChangedListener = this.onRowNodeIsExpandableChanged.bind(this);
19619 this.addManagedListener(this.displayedGroupNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__["RowNode"].EVENT_ALL_CHILDREN_COUNT_CHANGED, expandableChangedListener);
19620 this.addManagedListener(this.displayedGroupNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__["RowNode"].EVENT_MASTER_CHANGED, expandableChangedListener);
19621 this.addManagedListener(this.displayedGroupNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__["RowNode"].EVENT_GROUP_CHANGED, expandableChangedListener);
19622 this.addManagedListener(this.displayedGroupNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__["RowNode"].EVENT_HAS_CHILDREN_CHANGED, expandableChangedListener);
19623 };
19624 GroupCellRendererCtrl.prototype.onExpandClicked = function (mouseEvent) {
19625 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["isStopPropagationForAgGrid"])(mouseEvent)) {
19626 return;
19627 }
19628 // so if we expand a node, it does not also get selected.
19629 Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["stopPropagationForAgGrid"])(mouseEvent);
19630 this.onExpandOrContract(mouseEvent);
19631 };
19632 GroupCellRendererCtrl.prototype.onExpandOrContract = function (e) {
19633 // must use the displayedGroup, so if data was dragged down, we expand the parent, not this row
19634 var rowNode = this.displayedGroupNode;
19635 var nextExpandState = !rowNode.expanded;
19636 if (!nextExpandState && rowNode.sticky) {
19637 this.scrollToStickyNode(rowNode);
19638 }
19639 rowNode.setExpanded(nextExpandState, e);
19640 };
19641 GroupCellRendererCtrl.prototype.scrollToStickyNode = function (rowNode) {
19642 var gridBodyCtrl = this.ctrlsService.getGridBodyCtrl();
19643 var scrollFeature = gridBodyCtrl.getScrollFeature();
19644 scrollFeature.setVerticalScrollPosition(rowNode.rowTop - rowNode.stickyRowTop);
19645 };
19646 GroupCellRendererCtrl.prototype.isExpandable = function () {
19647 if (this.showingValueForOpenedParent) {
19648 return true;
19649 }
19650 var rowNode = this.displayedGroupNode;
19651 var reducedLeafNode = this.columnModel.isPivotMode() && rowNode.leafGroup;
19652 var expandableGroup = rowNode.isExpandable() && !rowNode.footer && !reducedLeafNode;
19653 if (!expandableGroup) {
19654 return false;
19655 }
19656 // column is null for fullWidthRows
19657 var column = this.params.column;
19658 var displayingForOneColumnOnly = column != null && typeof column.getColDef().showRowGroup === 'string';
19659 if (displayingForOneColumnOnly) {
19660 var showing = this.isShowRowGroupForThisRow();
19661 return showing;
19662 }
19663 return true;
19664 };
19665 GroupCellRendererCtrl.prototype.showExpandAndContractIcons = function () {
19666 var _a = this, params = _a.params, displayedGroup = _a.displayedGroupNode, columnModel = _a.columnModel;
19667 var node = params.node;
19668 var isExpandable = this.isExpandable();
19669 if (isExpandable) {
19670 // if expandable, show one based on expand state.
19671 // if we were dragged down, means our parent is always expanded
19672 var expanded = this.showingValueForOpenedParent ? true : node.expanded;
19673 this.comp.setExpandedDisplayed(expanded);
19674 this.comp.setContractedDisplayed(!expanded);
19675 }
19676 else {
19677 // it not expandable, show neither
19678 this.comp.setExpandedDisplayed(false);
19679 this.comp.setContractedDisplayed(false);
19680 }
19681 // compensation padding for leaf nodes, so there is blank space instead of the expand icon
19682 var pivotMode = columnModel.isPivotMode();
19683 var pivotModeAndLeafGroup = pivotMode && displayedGroup.leafGroup;
19684 var addExpandableCss = isExpandable && !pivotModeAndLeafGroup;
19685 var isTotalFooterNode = node.footer && node.level === -1;
19686 this.comp.addOrRemoveCssClass('ag-cell-expandable', addExpandableCss);
19687 this.comp.addOrRemoveCssClass('ag-row-group', addExpandableCss);
19688 if (pivotMode) {
19689 this.comp.addOrRemoveCssClass('ag-pivot-leaf-group', pivotModeAndLeafGroup);
19690 }
19691 else if (!isTotalFooterNode) {
19692 this.comp.addOrRemoveCssClass('ag-row-group-leaf-indent', !addExpandableCss);
19693 }
19694 };
19695 GroupCellRendererCtrl.prototype.onRowNodeIsExpandableChanged = function () {
19696 // maybe if no children now, we should hide the expand / contract icons
19697 this.showExpandAndContractIcons();
19698 // if we have no children, this impacts the indent
19699 this.setIndent();
19700 this.refreshAriaExpanded();
19701 };
19702 GroupCellRendererCtrl.prototype.setupIndent = function () {
19703 // only do this if an indent - as this overwrites the padding that
19704 // the theme set, which will make things look 'not aligned' for the
19705 // first group level.
19706 var node = this.params.node;
19707 var suppressPadding = this.params.suppressPadding;
19708 if (!suppressPadding) {
19709 this.addManagedListener(node, _entities_rowNode__WEBPACK_IMPORTED_MODULE_3__["RowNode"].EVENT_UI_LEVEL_CHANGED, this.setIndent.bind(this));
19710 this.setIndent();
19711 }
19712 };
19713 GroupCellRendererCtrl.prototype.setIndent = function () {
19714 if (this.gridOptionsService.is('groupHideOpenParents')) {
19715 return;
19716 }
19717 var params = this.params;
19718 var rowNode = params.node;
19719 // if we are only showing one group column, we don't want to be indenting based on level
19720 var fullWithRow = !!params.colDef;
19721 var treeData = this.gridOptionsService.isTreeData();
19722 var manyDimensionThisColumn = !fullWithRow || treeData || params.colDef.showRowGroup === true;
19723 var paddingCount = manyDimensionThisColumn ? rowNode.uiLevel : 0;
19724 if (this.indentClass) {
19725 this.comp.addOrRemoveCssClass(this.indentClass, false);
19726 }
19727 this.indentClass = 'ag-row-group-indent-' + paddingCount;
19728 this.comp.addOrRemoveCssClass(this.indentClass, true);
19729 };
19730 GroupCellRendererCtrl.prototype.addFullWidthRowDraggerIfNeeded = function () {
19731 var _this = this;
19732 if (!this.params.fullWidth || !this.params.rowDrag) {
19733 return;
19734 }
19735 var rowDragComp = new _row_rowDragComp__WEBPACK_IMPORTED_MODULE_10__["RowDragComp"](function () { return _this.params.value; }, this.params.node);
19736 this.createManagedBean(rowDragComp, this.context);
19737 this.eGui.insertAdjacentElement('afterbegin', rowDragComp.getGui());
19738 };
19739 GroupCellRendererCtrl.prototype.isUserWantsSelected = function () {
19740 var paramsCheckbox = this.params.checkbox;
19741 // if a function, we always return true as change detection can show or hide the checkbox.
19742 return typeof paramsCheckbox === 'function' || paramsCheckbox === true;
19743 };
19744 GroupCellRendererCtrl.prototype.addCheckboxIfNeeded = function () {
19745 var _this = this;
19746 var rowNode = this.displayedGroupNode;
19747 var checkboxNeeded = this.isUserWantsSelected() &&
19748 // footers cannot be selected
19749 !rowNode.footer &&
19750 // pinned rows cannot be selected
19751 !rowNode.rowPinned &&
19752 // details cannot be selected
19753 !rowNode.detail;
19754 if (checkboxNeeded) {
19755 var cbSelectionComponent_1 = new _checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_9__["CheckboxSelectionComponent"]();
19756 this.getContext().createBean(cbSelectionComponent_1);
19757 cbSelectionComponent_1.init({
19758 rowNode: rowNode,
19759 column: this.params.column,
19760 overrides: {
19761 isVisible: this.params.checkbox,
19762 callbackParams: this.params,
19763 removeHidden: true,
19764 },
19765 });
19766 this.eCheckbox.appendChild(cbSelectionComponent_1.getGui());
19767 this.addDestroyFunc(function () { return _this.getContext().destroyBean(cbSelectionComponent_1); });
19768 }
19769 this.comp.setCheckboxVisible(checkboxNeeded);
19770 };
19771 GroupCellRendererCtrl.prototype.onKeyDown = function (event) {
19772 var enterKeyPressed = event.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].ENTER;
19773 if (!enterKeyPressed || this.params.suppressEnterExpand) {
19774 return;
19775 }
19776 var cellEditable = this.params.column && this.params.column.isCellEditable(this.params.node);
19777 if (cellEditable) {
19778 return;
19779 }
19780 this.onExpandOrContract(event);
19781 };
19782 GroupCellRendererCtrl.prototype.onCellDblClicked = function (mouseEvent) {
19783 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["isStopPropagationForAgGrid"])(mouseEvent)) {
19784 return;
19785 }
19786 // we want to avoid acting on double click events on the expand / contract icon,
19787 // as that icons already has expand / collapse functionality on it. otherwise if
19788 // the icon was double clicked, we would get 'click', 'click', 'dblclick' which
19789 // is open->close->open, however double click should be open->close only.
19790 var targetIsExpandIcon = Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["isElementInEventPath"])(this.eExpanded, mouseEvent)
19791 || Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["isElementInEventPath"])(this.eContracted, mouseEvent);
19792 if (!targetIsExpandIcon) {
19793 this.onExpandOrContract(mouseEvent);
19794 }
19795 };
19796 __decorate([
19797 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('expressionService')
19798 ], GroupCellRendererCtrl.prototype, "expressionService", void 0);
19799 __decorate([
19800 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('valueFormatterService')
19801 ], GroupCellRendererCtrl.prototype, "valueFormatterService", void 0);
19802 __decorate([
19803 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
19804 ], GroupCellRendererCtrl.prototype, "columnModel", void 0);
19805 __decorate([
19806 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('userComponentFactory')
19807 ], GroupCellRendererCtrl.prototype, "userComponentFactory", void 0);
19808 __decorate([
19809 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])("ctrlsService")
19810 ], GroupCellRendererCtrl.prototype, "ctrlsService", void 0);
19811 return GroupCellRendererCtrl;
19812}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
19813
19814
19815
19816/***/ }),
19817/* 97 */
19818/***/ (function(module, __webpack_exports__, __webpack_require__) {
19819
19820"use strict";
19821__webpack_require__.r(__webpack_exports__);
19822/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowNode", function() { return RowNode; });
19823/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
19824/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
19825/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
19826/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
19827/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12);
19828/**
19829 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
19830 * @version v29.2.0
19831 * @link https://www.ag-grid.com/
19832 * @license MIT
19833 */
19834var __assign = (undefined && undefined.__assign) || function () {
19835 __assign = Object.assign || function(t) {
19836 for (var s, i = 1, n = arguments.length; i < n; i++) {
19837 s = arguments[i];
19838 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19839 t[p] = s[p];
19840 }
19841 return t;
19842 };
19843 return __assign.apply(this, arguments);
19844};
19845
19846
19847
19848
19849
19850var RowNode = /** @class */ (function () {
19851 function RowNode(beans) {
19852 /** The current row index. If the row is filtered out or in a collapsed group, this value will be `null`. */
19853 this.rowIndex = null;
19854 /** The key for the group eg Ireland, UK, USA */
19855 this.key = null;
19856 /** Children mapped by the pivot columns. */
19857 this.childrenMapped = {};
19858 /**
19859 * This will be `true` if it has a rowIndex assigned, otherwise `false`.
19860 */
19861 this.displayed = false;
19862 /** The row top position in pixels. */
19863 this.rowTop = null;
19864 /** The top pixel for this row last time, makes sense if data set was ordered or filtered,
19865 * it is used so new rows can animate in from their old position. */
19866 this.oldRowTop = null;
19867 /** `true` by default - can be overridden via gridOptions.isRowSelectable(rowNode) */
19868 this.selectable = true;
19869 /** Used by sorting service - to give deterministic sort to groups. Previously we
19870 * just id for this, however id is a string and had slower sorting compared to numbers. */
19871 this.__objectId = RowNode.OBJECT_ID_SEQUENCE++;
19872 /** When one or more Columns are using autoHeight, this keeps track of height of each autoHeight Cell,
19873 * indexed by the Column ID. */
19874 this.__autoHeights = {};
19875 /** `true` when nodes with the same id are being removed and added as part of the same batch transaction */
19876 this.alreadyRendered = false;
19877 this.highlighted = null;
19878 this.selected = false;
19879 this.beans = beans;
19880 }
19881 /**
19882 * Replaces the data on the `rowNode`. When this method is called, the grid will refresh the entire rendered row if it is displayed.
19883 */
19884 RowNode.prototype.setData = function (data) {
19885 this.setDataCommon(data, false);
19886 };
19887 // similar to setRowData, however it is expected that the data is the same data item. this
19888 // is intended to be used with Redux type stores, where the whole data can be changed. we are
19889 // guaranteed that the data is the same entity (so grid doesn't need to worry about the id of the
19890 // underlying data changing, hence doesn't need to worry about selection). the grid, upon receiving
19891 // dataChanged event, will refresh the cells rather than rip them all out (so user can show transitions).
19892 /**
19893 * Updates the data on the `rowNode`. When this method is called, the grid will refresh the entire rendered row if it is displayed.
19894 */
19895 RowNode.prototype.updateData = function (data) {
19896 this.setDataCommon(data, true);
19897 };
19898 RowNode.prototype.setDataCommon = function (data, update) {
19899 var oldData = this.data;
19900 this.data = data;
19901 this.beans.valueCache.onDataChanged();
19902 this.updateDataOnDetailNode();
19903 this.checkRowSelectable();
19904 this.resetQuickFilterAggregateText();
19905 var event = this.createDataChangedEvent(data, oldData, update);
19906 this.dispatchLocalEvent(event);
19907 };
19908 // when we are doing master / detail, the detail node is lazy created, but then kept around.
19909 // so if we show / hide the detail, the same detail rowNode is used. so we need to keep the data
19910 // in sync, otherwise expand/collapse of the detail would still show the old values.
19911 RowNode.prototype.updateDataOnDetailNode = function () {
19912 if (this.detailNode) {
19913 this.detailNode.data = this.data;
19914 }
19915 };
19916 RowNode.prototype.createDataChangedEvent = function (newData, oldData, update) {
19917 return {
19918 type: RowNode.EVENT_DATA_CHANGED,
19919 node: this,
19920 oldData: oldData,
19921 newData: newData,
19922 update: update
19923 };
19924 };
19925 RowNode.prototype.createLocalRowEvent = function (type) {
19926 return {
19927 type: type,
19928 node: this
19929 };
19930 };
19931 RowNode.prototype.getRowIndexString = function () {
19932 if (this.rowPinned === 'top') {
19933 return 't-' + this.rowIndex;
19934 }
19935 if (this.rowPinned === 'bottom') {
19936 return 'b-' + this.rowIndex;
19937 }
19938 return this.rowIndex.toString();
19939 };
19940 RowNode.prototype.createDaemonNode = function () {
19941 var oldNode = new RowNode(this.beans);
19942 // just copy the id and data, this is enough for the node to be used
19943 // in the selection controller (the selection controller is the only
19944 // place where daemon nodes can live).
19945 oldNode.id = this.id;
19946 oldNode.data = this.data;
19947 oldNode.__daemon = true;
19948 oldNode.selected = this.selected;
19949 oldNode.level = this.level;
19950 return oldNode;
19951 };
19952 RowNode.prototype.setDataAndId = function (data, id) {
19953 var oldNode = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(this.id) ? this.createDaemonNode() : null;
19954 var oldData = this.data;
19955 this.data = data;
19956 this.updateDataOnDetailNode();
19957 this.setId(id);
19958 this.beans.selectionService.syncInRowNode(this, oldNode);
19959 this.checkRowSelectable();
19960 var event = this.createDataChangedEvent(data, oldData, false);
19961 this.dispatchLocalEvent(event);
19962 };
19963 RowNode.prototype.checkRowSelectable = function () {
19964 var isRowSelectableFunc = this.beans.gridOptionsService.get('isRowSelectable');
19965 this.setRowSelectable(isRowSelectableFunc ? isRowSelectableFunc(this) : true);
19966 };
19967 RowNode.prototype.setRowSelectable = function (newVal) {
19968 if (this.selectable !== newVal) {
19969 this.selectable = newVal;
19970 if (this.eventService) {
19971 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_SELECTABLE_CHANGED));
19972 }
19973 var isGroupSelectsChildren = this.beans.gridOptionsService.is('groupSelectsChildren');
19974 if (isGroupSelectsChildren) {
19975 var selected = this.calculateSelectedFromChildren();
19976 this.setSelectedParams({ newValue: selected !== null && selected !== void 0 ? selected : false, source: 'selectableChanged' });
19977 }
19978 }
19979 };
19980 RowNode.prototype.setId = function (id) {
19981 // see if user is providing the id's
19982 var getRowIdFunc = this.beans.gridOptionsService.getRowIdFunc();
19983 if (getRowIdFunc) {
19984 // if user is providing the id's, then we set the id only after the data has been set.
19985 // this is important for virtual pagination and viewport, where empty rows exist.
19986 if (this.data) {
19987 // we pass 'true' as we skip this level when generating keys,
19988 // as we don't always have the key for this level (eg when updating
19989 // data via transaction on SSRM, we are getting key to look up the
19990 // RowNode, don't have the RowNode yet, thus no way to get the current key)
19991 var parentKeys = this.getGroupKeys(true);
19992 this.id = getRowIdFunc({
19993 data: this.data,
19994 parentKeys: parentKeys.length > 0 ? parentKeys : undefined,
19995 level: this.level
19996 });
19997 // make sure id provided doesn't start with 'row-group-' as this is reserved. also check that
19998 // it has 'startsWith' in case the user provided a number.
19999 if (this.id !== null && typeof this.id === 'string' && this.id.startsWith(RowNode.ID_PREFIX_ROW_GROUP)) {
20000 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.");
20001 }
20002 // force id to be a string
20003 if (this.id !== null && typeof this.id !== 'string') {
20004 this.id = '' + this.id;
20005 }
20006 }
20007 else {
20008 // this can happen if user has set blank into the rowNode after the row previously
20009 // having data. this happens in virtual page row model, when data is delete and
20010 // the page is refreshed.
20011 this.id = undefined;
20012 }
20013 }
20014 else {
20015 this.id = id;
20016 }
20017 };
20018 RowNode.prototype.getGroupKeys = function (excludeSelf) {
20019 if (excludeSelf === void 0) { excludeSelf = false; }
20020 var keys = [];
20021 var pointer = this;
20022 if (excludeSelf) {
20023 pointer = pointer.parent;
20024 }
20025 while (pointer && pointer.level >= 0) {
20026 keys.push(pointer.key);
20027 pointer = pointer.parent;
20028 }
20029 keys.reverse();
20030 return keys;
20031 };
20032 RowNode.prototype.isPixelInRange = function (pixel) {
20033 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(this.rowTop) || !Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(this.rowHeight)) {
20034 return false;
20035 }
20036 return pixel >= this.rowTop && pixel < (this.rowTop + this.rowHeight);
20037 };
20038 RowNode.prototype.setFirstChild = function (firstChild) {
20039 if (this.firstChild === firstChild) {
20040 return;
20041 }
20042 this.firstChild = firstChild;
20043 if (this.eventService) {
20044 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_FIRST_CHILD_CHANGED));
20045 }
20046 };
20047 RowNode.prototype.setLastChild = function (lastChild) {
20048 if (this.lastChild === lastChild) {
20049 return;
20050 }
20051 this.lastChild = lastChild;
20052 if (this.eventService) {
20053 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_LAST_CHILD_CHANGED));
20054 }
20055 };
20056 RowNode.prototype.setChildIndex = function (childIndex) {
20057 if (this.childIndex === childIndex) {
20058 return;
20059 }
20060 this.childIndex = childIndex;
20061 if (this.eventService) {
20062 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_CHILD_INDEX_CHANGED));
20063 }
20064 };
20065 RowNode.prototype.setRowTop = function (rowTop) {
20066 this.oldRowTop = this.rowTop;
20067 if (this.rowTop === rowTop) {
20068 return;
20069 }
20070 this.rowTop = rowTop;
20071 if (this.eventService) {
20072 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_TOP_CHANGED));
20073 }
20074 this.setDisplayed(rowTop !== null);
20075 };
20076 RowNode.prototype.clearRowTopAndRowIndex = function () {
20077 this.oldRowTop = null;
20078 this.setRowTop(null);
20079 this.setRowIndex(null);
20080 };
20081 RowNode.prototype.setDisplayed = function (displayed) {
20082 if (this.displayed === displayed) {
20083 return;
20084 }
20085 this.displayed = displayed;
20086 if (this.eventService) {
20087 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_DISPLAYED_CHANGED));
20088 }
20089 };
20090 RowNode.prototype.setDragging = function (dragging) {
20091 if (this.dragging === dragging) {
20092 return;
20093 }
20094 this.dragging = dragging;
20095 if (this.eventService) {
20096 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_DRAGGING_CHANGED));
20097 }
20098 };
20099 RowNode.prototype.setHighlighted = function (highlighted) {
20100 if (highlighted === this.highlighted) {
20101 return;
20102 }
20103 this.highlighted = highlighted;
20104 if (this.eventService) {
20105 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HIGHLIGHT_CHANGED));
20106 }
20107 };
20108 RowNode.prototype.setAllChildrenCount = function (allChildrenCount) {
20109 if (this.allChildrenCount === allChildrenCount) {
20110 return;
20111 }
20112 this.allChildrenCount = allChildrenCount;
20113 if (this.eventService) {
20114 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED));
20115 }
20116 };
20117 RowNode.prototype.setMaster = function (master) {
20118 if (this.master === master) {
20119 return;
20120 }
20121 // if changing AWAY from master, then unexpand, otherwise
20122 // next time it's shown it is expanded again
20123 if (this.master && !master) {
20124 this.expanded = false;
20125 }
20126 this.master = master;
20127 if (this.eventService) {
20128 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_MASTER_CHANGED));
20129 }
20130 };
20131 RowNode.prototype.setGroup = function (group) {
20132 if (this.group === group) {
20133 return;
20134 }
20135 // if we used to be a group, and no longer, then close the node
20136 if (this.group && !group) {
20137 this.expanded = false;
20138 }
20139 this.group = group;
20140 this.updateHasChildren();
20141 if (this.eventService) {
20142 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_GROUP_CHANGED));
20143 }
20144 };
20145 /**
20146 * Sets the row height.
20147 * Call if you want to change the height initially assigned to the row.
20148 * After calling, you must call `api.onRowHeightChanged()` so the grid knows it needs to work out the placement of the rows. */
20149 RowNode.prototype.setRowHeight = function (rowHeight, estimated) {
20150 if (estimated === void 0) { estimated = false; }
20151 this.rowHeight = rowHeight;
20152 this.rowHeightEstimated = estimated;
20153 if (this.eventService) {
20154 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HEIGHT_CHANGED));
20155 }
20156 };
20157 RowNode.prototype.setRowAutoHeight = function (cellHeight, column) {
20158 if (!this.__autoHeights) {
20159 this.__autoHeights = {};
20160 }
20161 var autoHeights = this.__autoHeights;
20162 autoHeights[column.getId()] = cellHeight;
20163 if (cellHeight != null) {
20164 if (this.checkAutoHeightsDebounced == null) {
20165 this.checkAutoHeightsDebounced = Object(_utils_function__WEBPACK_IMPORTED_MODULE_2__["debounce"])(this.checkAutoHeights.bind(this), 1);
20166 }
20167 this.checkAutoHeightsDebounced();
20168 }
20169 };
20170 RowNode.prototype.checkAutoHeights = function () {
20171 var notAllPresent = false;
20172 var nonePresent = true;
20173 var newRowHeight = 0;
20174 var autoHeights = this.__autoHeights;
20175 if (autoHeights == null) {
20176 return;
20177 }
20178 var displayedAutoHeightCols = this.beans.columnModel.getAllDisplayedAutoHeightCols();
20179 displayedAutoHeightCols.forEach(function (col) {
20180 var cellHeight = autoHeights[col.getId()];
20181 if (cellHeight == null) {
20182 notAllPresent = true;
20183 return;
20184 }
20185 nonePresent = false;
20186 if (cellHeight > newRowHeight) {
20187 newRowHeight = cellHeight;
20188 }
20189 });
20190 if (notAllPresent) {
20191 return;
20192 }
20193 // we take min of 10, so we don't adjust for empty rows. if <10, we put to default.
20194 // this prevents the row starting very small when waiting for async components,
20195 // which would then mean the grid squashes in far to many rows (as small heights
20196 // means more rows fit in) which looks crap. so best ignore small values and assume
20197 // we are still waiting for values to render.
20198 if (nonePresent || newRowHeight < 10) {
20199 newRowHeight = this.beans.gridOptionsService.getRowHeightForNode(this).height;
20200 }
20201 if (newRowHeight == this.rowHeight) {
20202 return;
20203 }
20204 this.setRowHeight(newRowHeight);
20205 var rowModel = this.beans.rowModel;
20206 if (rowModel.onRowHeightChangedDebounced) {
20207 rowModel.onRowHeightChangedDebounced();
20208 }
20209 };
20210 RowNode.prototype.setRowIndex = function (rowIndex) {
20211 if (this.rowIndex === rowIndex) {
20212 return;
20213 }
20214 this.rowIndex = rowIndex;
20215 if (this.eventService) {
20216 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_ROW_INDEX_CHANGED));
20217 }
20218 };
20219 RowNode.prototype.setUiLevel = function (uiLevel) {
20220 if (this.uiLevel === uiLevel) {
20221 return;
20222 }
20223 this.uiLevel = uiLevel;
20224 if (this.eventService) {
20225 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_UI_LEVEL_CHANGED));
20226 }
20227 };
20228 /**
20229 * Set the expanded state of this rowNode. Pass `true` to expand and `false` to collapse.
20230 */
20231 RowNode.prototype.setExpanded = function (expanded, e) {
20232 if (this.expanded === expanded) {
20233 return;
20234 }
20235 this.expanded = expanded;
20236 if (this.eventService) {
20237 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_EXPANDED_CHANGED));
20238 }
20239 var event = Object.assign({}, this.createGlobalRowEvent(_events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_ROW_GROUP_OPENED), {
20240 expanded: expanded,
20241 event: e || null
20242 });
20243 this.beans.rowNodeEventThrottle.dispatchExpanded(event);
20244 // when using footers we need to refresh the group row, as the aggregation
20245 // values jump between group and footer
20246 if (this.beans.gridOptionsService.is('groupIncludeFooter')) {
20247 this.beans.rowRenderer.refreshCells({ rowNodes: [this] });
20248 }
20249 };
20250 RowNode.prototype.createGlobalRowEvent = function (type) {
20251 return {
20252 type: type,
20253 node: this,
20254 data: this.data,
20255 rowIndex: this.rowIndex,
20256 rowPinned: this.rowPinned,
20257 context: this.beans.gridOptionsService.context,
20258 api: this.beans.gridOptionsService.api,
20259 columnApi: this.beans.gridOptionsService.columnApi
20260 };
20261 };
20262 RowNode.prototype.dispatchLocalEvent = function (event) {
20263 if (this.eventService) {
20264 this.eventService.dispatchEvent(event);
20265 }
20266 };
20267 /**
20268 * Replaces the value on the `rowNode` for the specified column. When complete,
20269 * the grid will refresh the rendered cell on the required row only.
20270 * **Note**: This method on fires `onCellEditRequest` when the Grid is on **Read Only** mode.
20271 *
20272 * @param colKey The column where the value should be updated
20273 * @param newValue The new value
20274 * @param eventSource The source of the event
20275 * @returns `True` if the value was changed, otherwise `False`.
20276 */
20277 RowNode.prototype.setDataValue = function (colKey, newValue, eventSource) {
20278 // When it is done via the editors, no 'cell changed' event gets fired, as it's assumed that
20279 // the cell knows about the change given it's in charge of the editing.
20280 // this method is for the client to call, so the cell listens for the change
20281 // event, and also flashes the cell when the change occurs.
20282 var column = this.beans.columnModel.getPrimaryColumn(colKey);
20283 var oldValue = this.beans.valueService.getValue(column, this);
20284 if (this.beans.gridOptionsService.is('readOnlyEdit')) {
20285 this.dispatchEventForSaveValueReadOnly(column, oldValue, newValue, eventSource);
20286 return false;
20287 }
20288 var valueChanged = this.beans.valueService.setValue(this, column, newValue, eventSource);
20289 this.dispatchCellChangedEvent(column, newValue, oldValue);
20290 this.checkRowSelectable();
20291 return valueChanged;
20292 };
20293 RowNode.prototype.dispatchEventForSaveValueReadOnly = function (column, oldValue, newValue, eventSource) {
20294 var event = {
20295 type: _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_EDIT_REQUEST,
20296 event: null,
20297 rowIndex: this.rowIndex,
20298 rowPinned: this.rowPinned,
20299 column: column,
20300 colDef: column.getColDef(),
20301 context: this.beans.gridOptionsService.context,
20302 api: this.beans.gridOptionsService.api,
20303 columnApi: this.beans.gridOptionsService.columnApi,
20304 data: this.data,
20305 node: this,
20306 oldValue: oldValue,
20307 newValue: newValue,
20308 value: newValue,
20309 source: eventSource
20310 };
20311 this.beans.eventService.dispatchEvent(event);
20312 };
20313 RowNode.prototype.setGroupValue = function (colKey, newValue) {
20314 var column = this.beans.columnModel.getGridColumn(colKey);
20315 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(this.groupData)) {
20316 this.groupData = {};
20317 }
20318 var columnId = column.getColId();
20319 var oldValue = this.groupData[columnId];
20320 if (oldValue === newValue) {
20321 return;
20322 }
20323 this.groupData[columnId] = newValue;
20324 this.dispatchCellChangedEvent(column, newValue, oldValue);
20325 };
20326 // sets the data for an aggregation
20327 RowNode.prototype.setAggData = function (newAggData) {
20328 var _this = this;
20329 // find out all keys that could potentially change
20330 var colIds = Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["getAllKeysInObjects"])([this.aggData, newAggData]);
20331 var oldAggData = this.aggData;
20332 this.aggData = newAggData;
20333 // if no event service, nobody has registered for events, so no need fire event
20334 if (this.eventService) {
20335 colIds.forEach(function (colId) {
20336 var column = _this.beans.columnModel.getGridColumn(colId);
20337 var value = _this.aggData ? _this.aggData[colId] : undefined;
20338 var oldValue = oldAggData ? oldAggData[colId] : undefined;
20339 _this.dispatchCellChangedEvent(column, value, oldValue);
20340 });
20341 }
20342 };
20343 RowNode.prototype.updateHasChildren = function () {
20344 // in CSRM, the group property will be set before the childrenAfterGroup property, check both to prevent flickering
20345 var newValue = (this.group && !this.footer) || (this.childrenAfterGroup && this.childrenAfterGroup.length > 0);
20346 var isSsrm = this.beans.gridOptionsService.isRowModelType('serverSide');
20347 if (isSsrm) {
20348 var isTreeData = this.beans.gridOptionsService.isTreeData();
20349 var isGroupFunc = this.beans.gridOptionsService.get('isServerSideGroup');
20350 // stubs and footers can never have children, as they're grid rows. if tree data the presence of children
20351 // is determined by the isServerSideGroup callback, if not tree data then the rows group property will be set.
20352 newValue = !this.stub && !this.footer && (isTreeData ? !!isGroupFunc && isGroupFunc(this.data) : !!this.group);
20353 }
20354 if (newValue !== this.__hasChildren) {
20355 this.__hasChildren = !!newValue;
20356 if (this.eventService) {
20357 this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HAS_CHILDREN_CHANGED));
20358 }
20359 }
20360 };
20361 RowNode.prototype.hasChildren = function () {
20362 if (this.__hasChildren == null) {
20363 this.updateHasChildren();
20364 }
20365 return this.__hasChildren;
20366 };
20367 RowNode.prototype.isEmptyRowGroupNode = function () {
20368 return this.group && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missingOrEmpty"])(this.childrenAfterGroup);
20369 };
20370 RowNode.prototype.dispatchCellChangedEvent = function (column, newValue, oldValue) {
20371 var cellChangedEvent = {
20372 type: RowNode.EVENT_CELL_CHANGED,
20373 node: this,
20374 column: column,
20375 newValue: newValue,
20376 oldValue: oldValue
20377 };
20378 this.dispatchLocalEvent(cellChangedEvent);
20379 };
20380 /**
20381 * The first time `quickFilter` runs, the grid creates a one-off string representation of the row.
20382 * This string is then used for the quick filter instead of hitting each column separately.
20383 * When you edit, using grid editing, this string gets cleared down.
20384 * 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.
20385 * Otherwise new values will not work with the `quickFilter`. */
20386 RowNode.prototype.resetQuickFilterAggregateText = function () {
20387 this.quickFilterAggregateText = null;
20388 };
20389 /** Returns:
20390 * - `true` if the node can be expanded, i.e it is a group or master row.
20391 * - `false` if the node cannot be expanded
20392 */
20393 RowNode.prototype.isExpandable = function () {
20394 return (this.hasChildren() && !this.footer) || this.master ? true : false;
20395 };
20396 /** Returns:
20397 * - `true` if node is selected,
20398 * - `false` if the node isn't selected
20399 * - `undefined` if it's partially selected (group where not all children are selected). */
20400 RowNode.prototype.isSelected = function () {
20401 // for footers, we just return what our sibling selected state is, as cannot select a footer
20402 if (this.footer) {
20403 return this.sibling.isSelected();
20404 }
20405 return this.selected;
20406 };
20407 /** Perform a depth-first search of this node and its children. */
20408 RowNode.prototype.depthFirstSearch = function (callback) {
20409 if (this.childrenAfterGroup) {
20410 this.childrenAfterGroup.forEach(function (child) { return child.depthFirstSearch(callback); });
20411 }
20412 callback(this);
20413 };
20414 // + selectionController.calculatedSelectedForAllGroupNodes()
20415 RowNode.prototype.calculateSelectedFromChildren = function () {
20416 var _a;
20417 var atLeastOneSelected = false;
20418 var atLeastOneDeSelected = false;
20419 var atLeastOneMixed = false;
20420 if (!((_a = this.childrenAfterGroup) === null || _a === void 0 ? void 0 : _a.length)) {
20421 return this.selectable ? this.selected : null;
20422 }
20423 for (var i = 0; i < this.childrenAfterGroup.length; i++) {
20424 var child = this.childrenAfterGroup[i];
20425 var childState = child.isSelected();
20426 // non-selectable nodes must be calculated from their children, or ignored if no value results.
20427 if (!child.selectable) {
20428 var selectable = child.calculateSelectedFromChildren();
20429 if (selectable === null) {
20430 continue;
20431 }
20432 childState = selectable;
20433 }
20434 switch (childState) {
20435 case true:
20436 atLeastOneSelected = true;
20437 break;
20438 case false:
20439 atLeastOneDeSelected = true;
20440 break;
20441 default:
20442 atLeastOneMixed = true;
20443 break;
20444 }
20445 }
20446 if (atLeastOneMixed || (atLeastOneSelected && atLeastOneDeSelected)) {
20447 return undefined;
20448 }
20449 else if (atLeastOneSelected) {
20450 return true;
20451 }
20452 else if (atLeastOneDeSelected) {
20453 return false;
20454 }
20455 else if (!this.selectable) {
20456 return null;
20457 }
20458 else {
20459 return this.selected;
20460 }
20461 };
20462 RowNode.prototype.setSelectedInitialValue = function (selected) {
20463 this.selected = selected;
20464 };
20465 RowNode.prototype.selectThisNode = function (newValue, e, source) {
20466 if (source === void 0) { source = 'api'; }
20467 // we only check selectable when newValue=true (ie selecting) to allow unselecting values,
20468 // as selectable is dynamic, need a way to unselect rows when selectable becomes false.
20469 var selectionNotAllowed = !this.selectable && newValue;
20470 var selectionNotChanged = this.selected === newValue;
20471 if (selectionNotAllowed || selectionNotChanged) {
20472 return false;
20473 }
20474 this.selected = newValue;
20475 if (this.eventService) {
20476 this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_ROW_SELECTED));
20477 }
20478 var event = __assign(__assign({}, this.createGlobalRowEvent(_events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_ROW_SELECTED)), { event: e || null, source: source });
20479 this.beans.eventService.dispatchEvent(event);
20480 return true;
20481 };
20482 /**
20483 * Select (or deselect) the node.
20484 * @param newValue -`true` for selection, `false` for deselection.
20485 * @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.
20486 * @param suppressFinishActions - Pass `true` to prevent the `selectionChanged` from being fired. Note that the `rowSelected` event will still be fired.
20487 * @param source - Source property that will appear in the `selectionChanged` event.
20488 */
20489 RowNode.prototype.setSelected = function (newValue, clearSelection, suppressFinishActions, source) {
20490 if (clearSelection === void 0) { clearSelection = false; }
20491 if (suppressFinishActions === void 0) { suppressFinishActions = false; }
20492 if (source === void 0) { source = 'api'; }
20493 this.setSelectedParams({
20494 newValue: newValue,
20495 clearSelection: clearSelection,
20496 suppressFinishActions: suppressFinishActions,
20497 rangeSelect: false,
20498 source: source
20499 });
20500 };
20501 // to make calling code more readable, this is the same method as setSelected except it takes names parameters
20502 RowNode.prototype.setSelectedParams = function (params) {
20503 if (this.rowPinned) {
20504 console.warn('AG Grid: cannot select pinned rows');
20505 return 0;
20506 }
20507 if (this.id === undefined) {
20508 console.warn('AG Grid: cannot select node until id for node is known');
20509 return 0;
20510 }
20511 return this.beans.selectionService.setNodeSelected(__assign(__assign({}, params), { node: this.footer ? this.sibling : this }));
20512 };
20513 /**
20514 * Returns:
20515 * - `true` if node is either pinned to the `top` or `bottom`
20516 * - `false` if the node isn't pinned
20517 */
20518 RowNode.prototype.isRowPinned = function () {
20519 return this.rowPinned === 'top' || this.rowPinned === 'bottom';
20520 };
20521 RowNode.prototype.isParentOfNode = function (potentialParent) {
20522 var parentNode = this.parent;
20523 while (parentNode) {
20524 if (parentNode === potentialParent) {
20525 return true;
20526 }
20527 parentNode = parentNode.parent;
20528 }
20529 return false;
20530 };
20531 /** Add an event listener. */
20532 RowNode.prototype.addEventListener = function (eventType, listener) {
20533 if (!this.eventService) {
20534 this.eventService = new _eventService__WEBPACK_IMPORTED_MODULE_1__["EventService"]();
20535 }
20536 this.eventService.addEventListener(eventType, listener);
20537 };
20538 /** Remove event listener. */
20539 RowNode.prototype.removeEventListener = function (eventType, listener) {
20540 if (!this.eventService) {
20541 return;
20542 }
20543 this.eventService.removeEventListener(eventType, listener);
20544 if (this.eventService.noRegisteredListenersExist()) {
20545 this.eventService = null;
20546 }
20547 };
20548 RowNode.prototype.onMouseEnter = function () {
20549 this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_MOUSE_ENTER));
20550 };
20551 RowNode.prototype.onMouseLeave = function () {
20552 this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_MOUSE_LEAVE));
20553 };
20554 RowNode.prototype.getFirstChildOfFirstChild = function (rowGroupColumn) {
20555 var currentRowNode = this;
20556 var isCandidate = true;
20557 var foundFirstChildPath = false;
20558 var nodeToSwapIn = null;
20559 // if we are hiding groups, then if we are the first child, of the first child,
20560 // all the way up to the column we are interested in, then we show the group cell.
20561 while (isCandidate && !foundFirstChildPath) {
20562 var parentRowNode = currentRowNode.parent;
20563 var firstChild = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(parentRowNode) && currentRowNode.firstChild;
20564 if (firstChild) {
20565 if (parentRowNode.rowGroupColumn === rowGroupColumn) {
20566 foundFirstChildPath = true;
20567 nodeToSwapIn = parentRowNode;
20568 }
20569 }
20570 else {
20571 isCandidate = false;
20572 }
20573 currentRowNode = parentRowNode;
20574 }
20575 return foundFirstChildPath ? nodeToSwapIn : null;
20576 };
20577 /**
20578 * Returns:
20579 * - `true` if the node is a full width cell
20580 * - `false` if the node is not a full width cell
20581 */
20582 RowNode.prototype.isFullWidthCell = function () {
20583 var isFullWidthCellFunc = this.getIsFullWidthCellFunc();
20584 return isFullWidthCellFunc ? isFullWidthCellFunc({ rowNode: this }) : false;
20585 };
20586 RowNode.prototype.getIsFullWidthCellFunc = function () {
20587 var isFullWidthRow = this.beans.gridOptionsService.getCallback('isFullWidthRow');
20588 if (isFullWidthRow) {
20589 return isFullWidthRow;
20590 }
20591 // this is the deprecated way, so provide a proxy to make it compatible
20592 var isFullWidthCell = this.beans.gridOptionsService.get('isFullWidthCell');
20593 if (isFullWidthCell) {
20594 return function (params) { return isFullWidthCell(params.rowNode); };
20595 }
20596 };
20597 /**
20598 * Returns the route of the row node. If the Row Node is a group, it returns the route to that Row Node.
20599 * If the Row Node is not a group, it returns `undefined`.
20600 */
20601 RowNode.prototype.getRoute = function () {
20602 if (this.key == null) {
20603 return;
20604 }
20605 var res = [];
20606 var pointer = this;
20607 while (pointer.key != null) {
20608 res.push(pointer.key);
20609 pointer = pointer.parent;
20610 }
20611 return res.reverse();
20612 };
20613 RowNode.prototype.createFooter = function () {
20614 var _this = this;
20615 // only create footer node once, otherwise we have daemons and
20616 // the animate screws up with the daemons hanging around
20617 if (this.sibling) {
20618 return;
20619 }
20620 var footerNode = new RowNode(this.beans);
20621 Object.keys(this).forEach(function (key) {
20622 footerNode[key] = _this[key];
20623 });
20624 footerNode.footer = true;
20625 footerNode.setRowTop(null);
20626 footerNode.setRowIndex(null);
20627 // manually set oldRowTop to null so we discard any
20628 // previous information about its position.
20629 footerNode.oldRowTop = null;
20630 footerNode.id = 'rowGroupFooter_' + this.id;
20631 // get both header and footer to reference each other as siblings. this is never undone,
20632 // only overwritten. so if a group is expanded, then contracted, it will have a ghost
20633 // sibling - but that's fine, as we can ignore this if the header is contracted.
20634 footerNode.sibling = this;
20635 this.sibling = footerNode;
20636 };
20637 RowNode.ID_PREFIX_ROW_GROUP = 'row-group-';
20638 RowNode.ID_PREFIX_TOP_PINNED = 't-';
20639 RowNode.ID_PREFIX_BOTTOM_PINNED = 'b-';
20640 RowNode.OBJECT_ID_SEQUENCE = 0;
20641 RowNode.EVENT_ROW_SELECTED = 'rowSelected';
20642 RowNode.EVENT_DATA_CHANGED = 'dataChanged';
20643 RowNode.EVENT_CELL_CHANGED = 'cellChanged';
20644 RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED = 'allChildrenCountChanged';
20645 RowNode.EVENT_MASTER_CHANGED = 'masterChanged';
20646 RowNode.EVENT_GROUP_CHANGED = 'groupChanged';
20647 RowNode.EVENT_MOUSE_ENTER = 'mouseEnter';
20648 RowNode.EVENT_MOUSE_LEAVE = 'mouseLeave';
20649 RowNode.EVENT_HEIGHT_CHANGED = 'heightChanged';
20650 RowNode.EVENT_TOP_CHANGED = 'topChanged';
20651 RowNode.EVENT_DISPLAYED_CHANGED = 'displayedChanged';
20652 RowNode.EVENT_FIRST_CHILD_CHANGED = 'firstChildChanged';
20653 RowNode.EVENT_LAST_CHILD_CHANGED = 'lastChildChanged';
20654 RowNode.EVENT_CHILD_INDEX_CHANGED = 'childIndexChanged';
20655 RowNode.EVENT_ROW_INDEX_CHANGED = 'rowIndexChanged';
20656 RowNode.EVENT_EXPANDED_CHANGED = 'expandedChanged';
20657 RowNode.EVENT_HAS_CHILDREN_CHANGED = 'hasChildrenChanged';
20658 RowNode.EVENT_SELECTABLE_CHANGED = 'selectableChanged';
20659 RowNode.EVENT_UI_LEVEL_CHANGED = 'uiLevelChanged';
20660 RowNode.EVENT_HIGHLIGHT_CHANGED = 'rowHighlightChanged';
20661 RowNode.EVENT_DRAGGING_CHANGED = 'draggingChanged';
20662 return RowNode;
20663}());
20664
20665
20666
20667/***/ }),
20668/* 98 */
20669/***/ (function(module, __webpack_exports__, __webpack_require__) {
20670
20671"use strict";
20672__webpack_require__.r(__webpack_exports__);
20673/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckboxSelectionComponent", function() { return CheckboxSelectionComponent; });
20674/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
20675/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38);
20676/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
20677/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57);
20678/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97);
20679/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18);
20680/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41);
20681/**
20682 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
20683 * @version v29.2.0
20684 * @link https://www.ag-grid.com/
20685 * @license MIT
20686 */
20687var __extends = (undefined && undefined.__extends) || (function () {
20688 var extendStatics = function (d, b) {
20689 extendStatics = Object.setPrototypeOf ||
20690 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20691 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20692 return extendStatics(d, b);
20693 };
20694 return function (d, b) {
20695 extendStatics(d, b);
20696 function __() { this.constructor = d; }
20697 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20698 };
20699})();
20700var __assign = (undefined && undefined.__assign) || function () {
20701 __assign = Object.assign || function(t) {
20702 for (var s, i = 1, n = arguments.length; i < n; i++) {
20703 s = arguments[i];
20704 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20705 t[p] = s[p];
20706 }
20707 return t;
20708 };
20709 return __assign.apply(this, arguments);
20710};
20711var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
20712 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20713 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20714 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;
20715 return c > 3 && r && Object.defineProperty(target, key, r), r;
20716};
20717
20718
20719
20720
20721
20722
20723
20724var CheckboxSelectionComponent = /** @class */ (function (_super) {
20725 __extends(CheckboxSelectionComponent, _super);
20726 function CheckboxSelectionComponent() {
20727 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;
20728 }
20729 CheckboxSelectionComponent.prototype.postConstruct = function () {
20730 this.eCheckbox.setPassive(true);
20731 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_6__["setAriaLive"])(this.eCheckbox.getInputElement(), 'polite');
20732 };
20733 CheckboxSelectionComponent.prototype.getCheckboxId = function () {
20734 return this.eCheckbox.getInputElement().id;
20735 };
20736 CheckboxSelectionComponent.prototype.onDataChanged = function () {
20737 // when rows are loaded for the second time, this can impact the selection, as a row
20738 // could be loaded as already selected (if user scrolls down, and then up again).
20739 this.onSelectionChanged();
20740 };
20741 CheckboxSelectionComponent.prototype.onSelectableChanged = function () {
20742 this.showOrHideSelect();
20743 };
20744 CheckboxSelectionComponent.prototype.onSelectionChanged = function () {
20745 var translate = this.localeService.getLocaleTextFunc();
20746 var state = this.rowNode.isSelected();
20747 var stateName = state === undefined
20748 ? translate('ariaIndeterminate', 'indeterminate')
20749 : (state === true
20750 ? translate('ariaChecked', 'checked')
20751 : translate('ariaUnchecked', 'unchecked'));
20752 var ariaLabel = translate('ariaRowToggleSelection', 'Press Space to toggle row selection');
20753 this.eCheckbox.setValue(state, true);
20754 this.eCheckbox.setInputAriaLabel(ariaLabel + " (" + stateName + ")");
20755 };
20756 CheckboxSelectionComponent.prototype.onCheckedClicked = function (event) {
20757 var groupSelectsFiltered = this.gridOptionsService.is('groupSelectsFiltered');
20758 var updatedCount = this.rowNode.setSelectedParams({ newValue: false, rangeSelect: event.shiftKey, groupSelectsFiltered: groupSelectsFiltered, event: event, source: 'checkboxSelected' });
20759 return updatedCount;
20760 };
20761 CheckboxSelectionComponent.prototype.onUncheckedClicked = function (event) {
20762 var groupSelectsFiltered = this.gridOptionsService.is('groupSelectsFiltered');
20763 var updatedCount = this.rowNode.setSelectedParams({ newValue: true, rangeSelect: event.shiftKey, groupSelectsFiltered: groupSelectsFiltered, event: event, source: 'checkboxSelected' });
20764 return updatedCount;
20765 };
20766 CheckboxSelectionComponent.prototype.init = function (params) {
20767 var _this = this;
20768 this.rowNode = params.rowNode;
20769 this.column = params.column;
20770 this.overrides = params.overrides;
20771 this.onSelectionChanged();
20772 // we don't want double click on this icon to open a group
20773 this.addManagedListener(this.eCheckbox.getInputElement(), 'dblclick', function (event) {
20774 Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["stopPropagationForAgGrid"])(event);
20775 });
20776 this.addManagedListener(this.eCheckbox.getInputElement(), 'click', function (event) {
20777 // we don't want the row clicked event to fire when selecting the checkbox, otherwise the row
20778 // would possibly get selected twice
20779 Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["stopPropagationForAgGrid"])(event);
20780 var isSelected = _this.eCheckbox.getValue();
20781 if (isSelected) {
20782 _this.onCheckedClicked(event);
20783 }
20784 else {
20785 _this.onUncheckedClicked(event || {});
20786 }
20787 });
20788 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_ROW_SELECTED, this.onSelectionChanged.bind(this));
20789 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_DATA_CHANGED, this.onDataChanged.bind(this));
20790 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_SELECTABLE_CHANGED, this.onSelectableChanged.bind(this));
20791 var isRowSelectableFunc = this.gridOptionsService.get('isRowSelectable');
20792 var checkboxVisibleIsDynamic = isRowSelectableFunc || typeof this.getIsVisible() === 'function';
20793 if (checkboxVisibleIsDynamic) {
20794 var showOrHideSelectListener = this.showOrHideSelect.bind(this);
20795 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, showOrHideSelectListener);
20796 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_DATA_CHANGED, showOrHideSelectListener);
20797 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_4__["RowNode"].EVENT_CELL_CHANGED, showOrHideSelectListener);
20798 this.showOrHideSelect();
20799 }
20800 this.eCheckbox.getInputElement().setAttribute('tabindex', '-1');
20801 };
20802 CheckboxSelectionComponent.prototype.showOrHideSelect = function () {
20803 var _a, _b, _c, _d;
20804 // if the isRowSelectable() is not provided the row node is selectable by default
20805 var selectable = this.rowNode.selectable;
20806 // checkboxSelection callback is deemed a legacy solution however we will still consider it's result.
20807 // If selectable, then also check the colDef callback. if not selectable, this it short circuits - no need
20808 // to call the colDef callback.
20809 var isVisible = this.getIsVisible();
20810 if (selectable) {
20811 if (typeof isVisible === 'function') {
20812 var extraParams = (_a = this.overrides) === null || _a === void 0 ? void 0 : _a.callbackParams;
20813 var params = (_b = this.column) === null || _b === void 0 ? void 0 : _b.createColumnFunctionCallbackParams(this.rowNode);
20814 selectable = params ? isVisible(__assign(__assign({}, extraParams), params)) : false;
20815 }
20816 else {
20817 selectable = isVisible !== null && isVisible !== void 0 ? isVisible : false;
20818 }
20819 }
20820 var disableInsteadOfHide = (_c = this.column) === null || _c === void 0 ? void 0 : _c.getColDef().showDisabledCheckboxes;
20821 if (disableInsteadOfHide) {
20822 this.eCheckbox.setDisabled(!selectable);
20823 this.setVisible(true);
20824 this.setDisplayed(true);
20825 return;
20826 }
20827 if ((_d = this.overrides) === null || _d === void 0 ? void 0 : _d.removeHidden) {
20828 this.setDisplayed(selectable);
20829 return;
20830 }
20831 this.setVisible(selectable);
20832 };
20833 CheckboxSelectionComponent.prototype.getIsVisible = function () {
20834 var _a, _b;
20835 if (this.overrides) {
20836 return this.overrides.isVisible;
20837 }
20838 // column will be missing if groupDisplayType = 'groupRows'
20839 return (_b = (_a = this.column) === null || _a === void 0 ? void 0 : _a.getColDef()) === null || _b === void 0 ? void 0 : _b.checkboxSelection;
20840 };
20841 __decorate([
20842 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_3__["RefSelector"])('eCheckbox')
20843 ], CheckboxSelectionComponent.prototype, "eCheckbox", void 0);
20844 __decorate([
20845 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
20846 ], CheckboxSelectionComponent.prototype, "postConstruct", null);
20847 return CheckboxSelectionComponent;
20848}(_widgets_component__WEBPACK_IMPORTED_MODULE_1__["Component"]));
20849
20850
20851
20852/***/ }),
20853/* 99 */
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__, "RowDragComp", function() { return RowDragComp; });
20859/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
20860/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
20861/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97);
20862/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(100);
20863/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26);
20864/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
20865/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46);
20866/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(13);
20867/**
20868 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
20869 * @version v29.2.0
20870 * @link https://www.ag-grid.com/
20871 * @license MIT
20872 */
20873var __extends = (undefined && undefined.__extends) || (function () {
20874 var extendStatics = function (d, b) {
20875 extendStatics = Object.setPrototypeOf ||
20876 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20877 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20878 return extendStatics(d, b);
20879 };
20880 return function (d, b) {
20881 extendStatics(d, b);
20882 function __() { this.constructor = d; }
20883 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20884 };
20885})();
20886var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
20887 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20888 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20889 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;
20890 return c > 3 && r && Object.defineProperty(target, key, r), r;
20891};
20892
20893
20894
20895
20896
20897
20898
20899
20900var RowDragComp = /** @class */ (function (_super) {
20901 __extends(RowDragComp, _super);
20902 function RowDragComp(cellValueFn, rowNode, column, customGui, dragStartPixels, suppressVisibilityChange) {
20903 var _this = _super.call(this) || this;
20904 _this.cellValueFn = cellValueFn;
20905 _this.rowNode = rowNode;
20906 _this.column = column;
20907 _this.customGui = customGui;
20908 _this.dragStartPixels = dragStartPixels;
20909 _this.suppressVisibilityChange = suppressVisibilityChange;
20910 _this.dragSource = null;
20911 return _this;
20912 }
20913 RowDragComp.prototype.isCustomGui = function () {
20914 return this.customGui != null;
20915 };
20916 RowDragComp.prototype.postConstruct = function () {
20917 if (!this.customGui) {
20918 this.setTemplate(/* html */ "<div class=\"ag-drag-handle ag-row-drag\" aria-hidden=\"true\"></div>");
20919 this.getGui().appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_6__["createIconNoSpan"])('rowDrag', this.beans.gridOptionsService, null));
20920 this.addDragSource();
20921 }
20922 else {
20923 this.setDragElement(this.customGui, this.dragStartPixels);
20924 }
20925 this.checkCompatibility();
20926 if (!this.suppressVisibilityChange) {
20927 var strategy = this.beans.gridOptionsService.is('rowDragManaged') ?
20928 new ManagedVisibilityStrategy(this, this.beans, this.rowNode, this.column) :
20929 new NonManagedVisibilityStrategy(this, this.beans, this.rowNode, this.column);
20930 this.createManagedBean(strategy, this.beans.context);
20931 }
20932 };
20933 RowDragComp.prototype.setDragElement = function (dragElement, dragStartPixels) {
20934 this.setTemplateFromElement(dragElement);
20935 this.addDragSource(dragStartPixels);
20936 };
20937 RowDragComp.prototype.getSelectedNodes = function () {
20938 var isRowDragMultiRow = this.beans.gridOptionsService.is('rowDragMultiRow');
20939 if (!isRowDragMultiRow) {
20940 return [this.rowNode];
20941 }
20942 var selection = this.beans.selectionService.getSelectedNodes();
20943 return selection.indexOf(this.rowNode) !== -1 ? selection : [this.rowNode];
20944 };
20945 // returns true if all compatibility items work out
20946 RowDragComp.prototype.checkCompatibility = function () {
20947 var managed = this.beans.gridOptionsService.is('rowDragManaged');
20948 var treeData = this.beans.gridOptionsService.isTreeData();
20949 if (treeData && managed) {
20950 Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["doOnce"])(function () {
20951 return console.warn('AG Grid: If using row drag with tree data, you cannot have rowDragManaged=true');
20952 }, 'RowDragComp.managedAndTreeData');
20953 }
20954 };
20955 RowDragComp.prototype.getDragItem = function () {
20956 return {
20957 rowNode: this.rowNode,
20958 rowNodes: this.getSelectedNodes(),
20959 columns: this.column ? [this.column] : undefined,
20960 defaultTextValue: this.cellValueFn(),
20961 };
20962 };
20963 RowDragComp.prototype.getRowDragText = function (column) {
20964 if (column) {
20965 var colDef = column.getColDef();
20966 if (colDef.rowDragText) {
20967 return colDef.rowDragText;
20968 }
20969 }
20970 return this.gridOptionsService.get('rowDragText');
20971 };
20972 RowDragComp.prototype.addDragSource = function (dragStartPixels) {
20973 var _this = this;
20974 if (dragStartPixels === void 0) { dragStartPixels = 4; }
20975 // if this is changing the drag element, delete the previous dragSource
20976 if (this.dragSource) {
20977 this.removeDragSource();
20978 }
20979 var rowDragText = this.getRowDragText(this.column);
20980 var translate = this.localeService.getLocaleTextFunc();
20981 this.dragSource = {
20982 type: _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_3__["DragSourceType"].RowDrag,
20983 eElement: this.getGui(),
20984 dragItemName: function () {
20985 var _a;
20986 var dragItem = _this.getDragItem();
20987 var dragItemCount = ((_a = dragItem.rowNodes) === null || _a === void 0 ? void 0 : _a.length) || 1;
20988 if (rowDragText) {
20989 return rowDragText(dragItem, dragItemCount);
20990 }
20991 return dragItemCount === 1 ? _this.cellValueFn() : dragItemCount + " " + translate('rowDragRows', 'rows');
20992 },
20993 getDragItem: function () { return _this.getDragItem(); },
20994 dragStartPixels: dragStartPixels,
20995 dragSourceDomDataKey: this.beans.gridOptionsService.getDomDataKey()
20996 };
20997 this.beans.dragAndDropService.addDragSource(this.dragSource, true);
20998 };
20999 RowDragComp.prototype.removeDragSource = function () {
21000 if (this.dragSource) {
21001 this.beans.dragAndDropService.removeDragSource(this.dragSource);
21002 }
21003 this.dragSource = null;
21004 };
21005 __decorate([
21006 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('beans')
21007 ], RowDragComp.prototype, "beans", void 0);
21008 __decorate([
21009 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
21010 ], RowDragComp.prototype, "postConstruct", null);
21011 __decorate([
21012 _context_context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
21013 ], RowDragComp.prototype, "removeDragSource", null);
21014 return RowDragComp;
21015}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
21016
21017var VisibilityStrategy = /** @class */ (function (_super) {
21018 __extends(VisibilityStrategy, _super);
21019 function VisibilityStrategy(parent, rowNode, column) {
21020 var _this = _super.call(this) || this;
21021 _this.parent = parent;
21022 _this.rowNode = rowNode;
21023 _this.column = column;
21024 return _this;
21025 }
21026 VisibilityStrategy.prototype.setDisplayedOrVisible = function (neverDisplayed) {
21027 var displayedOptions = { skipAriaHidden: true };
21028 if (neverDisplayed) {
21029 this.parent.setDisplayed(false, displayedOptions);
21030 }
21031 else {
21032 var shown = true;
21033 var isShownSometimes = false;
21034 if (this.column) {
21035 shown = this.column.isRowDrag(this.rowNode) || this.parent.isCustomGui();
21036 isShownSometimes = Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["isFunction"])(this.column.getColDef().rowDrag);
21037 }
21038 // if shown sometimes, them some rows can have drag handle while other don't,
21039 // so we use setVisible to keep the handles horizontally aligned (as setVisible
21040 // keeps the empty space, whereas setDisplayed looses the space)
21041 if (isShownSometimes) {
21042 this.parent.setDisplayed(true, displayedOptions);
21043 this.parent.setVisible(shown, displayedOptions);
21044 }
21045 else {
21046 this.parent.setDisplayed(shown, displayedOptions);
21047 this.parent.setVisible(true, displayedOptions);
21048 }
21049 }
21050 };
21051 return VisibilityStrategy;
21052}(_context_beanStub__WEBPACK_IMPORTED_MODULE_5__["BeanStub"]));
21053// when non managed, the visibility depends on suppressRowDrag property only
21054var NonManagedVisibilityStrategy = /** @class */ (function (_super) {
21055 __extends(NonManagedVisibilityStrategy, _super);
21056 function NonManagedVisibilityStrategy(parent, beans, rowNode, column) {
21057 var _this = _super.call(this, parent, rowNode, column) || this;
21058 _this.beans = beans;
21059 return _this;
21060 }
21061 NonManagedVisibilityStrategy.prototype.postConstruct = function () {
21062 this.addManagedPropertyListener('suppressRowDrag', this.onSuppressRowDrag.bind(this));
21063 // in case data changes, then we need to update visibility of drag item
21064 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_DATA_CHANGED, this.workOutVisibility.bind(this));
21065 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));
21066 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));
21067 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_NEW_COLUMNS_LOADED, this.workOutVisibility.bind(this));
21068 this.workOutVisibility();
21069 };
21070 NonManagedVisibilityStrategy.prototype.onSuppressRowDrag = function () {
21071 this.workOutVisibility();
21072 };
21073 NonManagedVisibilityStrategy.prototype.workOutVisibility = function () {
21074 // only show the drag if both sort and filter are not present
21075 var neverDisplayed = this.beans.gridOptionsService.is('suppressRowDrag');
21076 this.setDisplayedOrVisible(neverDisplayed);
21077 };
21078 __decorate([
21079 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
21080 ], NonManagedVisibilityStrategy.prototype, "postConstruct", null);
21081 return NonManagedVisibilityStrategy;
21082}(VisibilityStrategy));
21083// when managed, the visibility depends on sort, filter and row group, as well as suppressRowDrag property
21084var ManagedVisibilityStrategy = /** @class */ (function (_super) {
21085 __extends(ManagedVisibilityStrategy, _super);
21086 function ManagedVisibilityStrategy(parent, beans, rowNode, column) {
21087 var _this = _super.call(this, parent, rowNode, column) || this;
21088 _this.beans = beans;
21089 return _this;
21090 }
21091 ManagedVisibilityStrategy.prototype.postConstruct = function () {
21092 // we do not show the component if sort, filter or grouping is active
21093 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_SORT_CHANGED, this.workOutVisibility.bind(this));
21094 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_FILTER_CHANGED, this.workOutVisibility.bind(this));
21095 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, this.workOutVisibility.bind(this));
21096 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_NEW_COLUMNS_LOADED, this.workOutVisibility.bind(this));
21097 // in case data changes, then we need to update visibility of drag item
21098 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_DATA_CHANGED, this.workOutVisibility.bind(this));
21099 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_2__["RowNode"].EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));
21100 this.addManagedPropertyListener('suppressRowDrag', this.onSuppressRowDrag.bind(this));
21101 this.workOutVisibility();
21102 };
21103 ManagedVisibilityStrategy.prototype.onSuppressRowDrag = function () {
21104 this.workOutVisibility();
21105 };
21106 ManagedVisibilityStrategy.prototype.workOutVisibility = function () {
21107 // only show the drag if both sort and filter are not present
21108 var gridBodyCon = this.beans.ctrlsService.getGridBodyCtrl();
21109 var rowDragFeature = gridBodyCon.getRowDragFeature();
21110 var shouldPreventRowMove = rowDragFeature && rowDragFeature.shouldPreventRowMove();
21111 var suppressRowDrag = this.beans.gridOptionsService.is('suppressRowDrag');
21112 var hasExternalDropZones = this.beans.dragAndDropService.hasExternalDropZones();
21113 var neverDisplayed = (shouldPreventRowMove && !hasExternalDropZones) || suppressRowDrag;
21114 this.setDisplayedOrVisible(neverDisplayed);
21115 };
21116 __decorate([
21117 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
21118 ], ManagedVisibilityStrategy.prototype, "postConstruct", null);
21119 return ManagedVisibilityStrategy;
21120}(VisibilityStrategy));
21121
21122
21123/***/ }),
21124/* 100 */
21125/***/ (function(module, __webpack_exports__, __webpack_require__) {
21126
21127"use strict";
21128__webpack_require__.r(__webpack_exports__);
21129/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragSourceType", function() { return DragSourceType; });
21130/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VerticalDirection", function() { return VerticalDirection; });
21131/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HorizontalDirection", function() { return HorizontalDirection; });
21132/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragAndDropService", function() { return DragAndDropService; });
21133/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
21134/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
21135/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31);
21136/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46);
21137/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19);
21138/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42);
21139/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45);
21140/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(13);
21141/**
21142 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
21143 * @version v29.2.0
21144 * @link https://www.ag-grid.com/
21145 * @license MIT
21146 */
21147var __extends = (undefined && undefined.__extends) || (function () {
21148 var extendStatics = function (d, b) {
21149 extendStatics = Object.setPrototypeOf ||
21150 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21151 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21152 return extendStatics(d, b);
21153 };
21154 return function (d, b) {
21155 extendStatics(d, b);
21156 function __() { this.constructor = d; }
21157 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21158 };
21159})();
21160var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
21161 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
21162 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21163 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;
21164 return c > 3 && r && Object.defineProperty(target, key, r), r;
21165};
21166var __values = (undefined && undefined.__values) || function(o) {
21167 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
21168 if (m) return m.call(o);
21169 if (o && typeof o.length === "number") return {
21170 next: function () {
21171 if (o && i >= o.length) o = void 0;
21172 return { value: o && o[i++], done: !o };
21173 }
21174 };
21175 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
21176};
21177
21178
21179
21180
21181
21182
21183
21184
21185var DragSourceType;
21186(function (DragSourceType) {
21187 DragSourceType[DragSourceType["ToolPanel"] = 0] = "ToolPanel";
21188 DragSourceType[DragSourceType["HeaderCell"] = 1] = "HeaderCell";
21189 DragSourceType[DragSourceType["RowDrag"] = 2] = "RowDrag";
21190 DragSourceType[DragSourceType["ChartPanel"] = 3] = "ChartPanel";
21191})(DragSourceType || (DragSourceType = {}));
21192var VerticalDirection;
21193(function (VerticalDirection) {
21194 VerticalDirection[VerticalDirection["Up"] = 0] = "Up";
21195 VerticalDirection[VerticalDirection["Down"] = 1] = "Down";
21196})(VerticalDirection || (VerticalDirection = {}));
21197var HorizontalDirection;
21198(function (HorizontalDirection) {
21199 HorizontalDirection[HorizontalDirection["Left"] = 0] = "Left";
21200 HorizontalDirection[HorizontalDirection["Right"] = 1] = "Right";
21201})(HorizontalDirection || (HorizontalDirection = {}));
21202var DragAndDropService = /** @class */ (function (_super) {
21203 __extends(DragAndDropService, _super);
21204 function DragAndDropService() {
21205 var _this = _super !== null && _super.apply(this, arguments) || this;
21206 _this.dragSourceAndParamsList = [];
21207 _this.dropTargets = [];
21208 return _this;
21209 }
21210 DragAndDropService_1 = DragAndDropService;
21211 DragAndDropService.prototype.init = function () {
21212 this.ePinnedIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMovePin', this.gridOptionsService, null);
21213 this.eHideIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveHide', this.gridOptionsService, null);
21214 this.eMoveIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveMove', this.gridOptionsService, null);
21215 this.eLeftIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveLeft', this.gridOptionsService, null);
21216 this.eRightIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveRight', this.gridOptionsService, null);
21217 this.eGroupIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveGroup', this.gridOptionsService, null);
21218 this.eAggregateIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMoveValue', this.gridOptionsService, null);
21219 this.ePivotIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnMovePivot', this.gridOptionsService, null);
21220 this.eDropNotAllowedIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('dropNotAllowed', this.gridOptionsService, null);
21221 };
21222 DragAndDropService.prototype.addDragSource = function (dragSource, allowTouch) {
21223 if (allowTouch === void 0) { allowTouch = false; }
21224 var params = {
21225 eElement: dragSource.eElement,
21226 dragStartPixels: dragSource.dragStartPixels,
21227 onDragStart: this.onDragStart.bind(this, dragSource),
21228 onDragStop: this.onDragStop.bind(this),
21229 onDragging: this.onDragging.bind(this)
21230 };
21231 this.dragSourceAndParamsList.push({ params: params, dragSource: dragSource });
21232 this.dragService.addDragSource(params, allowTouch);
21233 };
21234 DragAndDropService.prototype.removeDragSource = function (dragSource) {
21235 var sourceAndParams = this.dragSourceAndParamsList.find(function (item) { return item.dragSource === dragSource; });
21236 if (sourceAndParams) {
21237 this.dragService.removeDragSource(sourceAndParams.params);
21238 Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["removeFromArray"])(this.dragSourceAndParamsList, sourceAndParams);
21239 }
21240 };
21241 DragAndDropService.prototype.clearDragSourceParamsList = function () {
21242 var _this = this;
21243 this.dragSourceAndParamsList.forEach(function (sourceAndParams) { return _this.dragService.removeDragSource(sourceAndParams.params); });
21244 this.dragSourceAndParamsList.length = 0;
21245 this.dropTargets.length = 0;
21246 };
21247 DragAndDropService.prototype.nudge = function () {
21248 if (this.dragging) {
21249 this.onDragging(this.eventLastTime, true);
21250 }
21251 };
21252 DragAndDropService.prototype.onDragStart = function (dragSource, mouseEvent) {
21253 this.dragging = true;
21254 this.dragSource = dragSource;
21255 this.eventLastTime = mouseEvent;
21256 this.dragItem = this.dragSource.getDragItem();
21257 this.lastDropTarget = this.dragSource.dragSourceDropTarget;
21258 if (this.dragSource.onDragStarted) {
21259 this.dragSource.onDragStarted();
21260 }
21261 this.createGhost();
21262 };
21263 DragAndDropService.prototype.onDragStop = function (mouseEvent) {
21264 this.eventLastTime = null;
21265 this.dragging = false;
21266 if (this.dragSource.onDragStopped) {
21267 this.dragSource.onDragStopped();
21268 }
21269 if (this.lastDropTarget && this.lastDropTarget.onDragStop) {
21270 var draggingEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, null, null, false);
21271 this.lastDropTarget.onDragStop(draggingEvent);
21272 }
21273 this.lastDropTarget = null;
21274 this.dragItem = null;
21275 this.removeGhost();
21276 };
21277 DragAndDropService.prototype.onDragging = function (mouseEvent, fromNudge) {
21278 var _this = this;
21279 var _a, _b, _c, _d;
21280 var hDirection = this.getHorizontalDirection(mouseEvent);
21281 var vDirection = this.getVerticalDirection(mouseEvent);
21282 this.eventLastTime = mouseEvent;
21283 this.positionGhost(mouseEvent);
21284 // check if mouseEvent intersects with any of the drop targets
21285 var validDropTargets = this.dropTargets.filter(function (target) { return _this.isMouseOnDropTarget(mouseEvent, target); });
21286 var dropTarget = this.findCurrentDropTarget(mouseEvent, validDropTargets);
21287 if (dropTarget !== this.lastDropTarget) {
21288 this.leaveLastTargetIfExists(mouseEvent, hDirection, vDirection, fromNudge);
21289 if (this.lastDropTarget !== null && dropTarget === null) {
21290 (_b = (_a = this.dragSource).onGridExit) === null || _b === void 0 ? void 0 : _b.call(_a, this.dragItem);
21291 }
21292 if (this.lastDropTarget === null && dropTarget !== null) {
21293 (_d = (_c = this.dragSource).onGridEnter) === null || _d === void 0 ? void 0 : _d.call(_c, this.dragItem);
21294 }
21295 this.enterDragTargetIfExists(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);
21296 this.lastDropTarget = dropTarget;
21297 }
21298 else if (dropTarget && dropTarget.onDragging) {
21299 var draggingEvent = this.createDropTargetEvent(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);
21300 dropTarget.onDragging(draggingEvent);
21301 }
21302 };
21303 DragAndDropService.prototype.getAllContainersFromDropTarget = function (dropTarget) {
21304 var secondaryContainers = dropTarget.getSecondaryContainers ? dropTarget.getSecondaryContainers() : null;
21305 var containers = [[dropTarget.getContainer()]];
21306 return secondaryContainers ? containers.concat(secondaryContainers) : containers;
21307 };
21308 DragAndDropService.prototype.allContainersIntersect = function (mouseEvent, containers) {
21309 var e_1, _a;
21310 try {
21311 for (var containers_1 = __values(containers), containers_1_1 = containers_1.next(); !containers_1_1.done; containers_1_1 = containers_1.next()) {
21312 var container = containers_1_1.value;
21313 var rect = container.getBoundingClientRect();
21314 // if element is not visible, then width and height are zero
21315 if (rect.width === 0 || rect.height === 0) {
21316 return false;
21317 }
21318 var horizontalFit = mouseEvent.clientX >= rect.left && mouseEvent.clientX < rect.right;
21319 var verticalFit = mouseEvent.clientY >= rect.top && mouseEvent.clientY < rect.bottom;
21320 if (!horizontalFit || !verticalFit) {
21321 return false;
21322 }
21323 }
21324 }
21325 catch (e_1_1) { e_1 = { error: e_1_1 }; }
21326 finally {
21327 try {
21328 if (containers_1_1 && !containers_1_1.done && (_a = containers_1.return)) _a.call(containers_1);
21329 }
21330 finally { if (e_1) throw e_1.error; }
21331 }
21332 return true;
21333 };
21334 // checks if the mouse is on the drop target. it checks eContainer and eSecondaryContainers
21335 DragAndDropService.prototype.isMouseOnDropTarget = function (mouseEvent, dropTarget) {
21336 var e_2, _a;
21337 var allContainersFromDropTarget = this.getAllContainersFromDropTarget(dropTarget);
21338 var mouseOverTarget = false;
21339 try {
21340 for (var allContainersFromDropTarget_1 = __values(allContainersFromDropTarget), allContainersFromDropTarget_1_1 = allContainersFromDropTarget_1.next(); !allContainersFromDropTarget_1_1.done; allContainersFromDropTarget_1_1 = allContainersFromDropTarget_1.next()) {
21341 var currentContainers = allContainersFromDropTarget_1_1.value;
21342 if (this.allContainersIntersect(mouseEvent, currentContainers)) {
21343 mouseOverTarget = true;
21344 break;
21345 }
21346 }
21347 }
21348 catch (e_2_1) { e_2 = { error: e_2_1 }; }
21349 finally {
21350 try {
21351 if (allContainersFromDropTarget_1_1 && !allContainersFromDropTarget_1_1.done && (_a = allContainersFromDropTarget_1.return)) _a.call(allContainersFromDropTarget_1);
21352 }
21353 finally { if (e_2) throw e_2.error; }
21354 }
21355 if (dropTarget.targetContainsSource && !dropTarget.getContainer().contains(this.dragSource.eElement)) {
21356 return false;
21357 }
21358 return mouseOverTarget && dropTarget.isInterestedIn(this.dragSource.type, this.dragSource.eElement);
21359 };
21360 DragAndDropService.prototype.findCurrentDropTarget = function (mouseEvent, validDropTargets) {
21361 var e_3, _a, e_4, _b;
21362 var len = validDropTargets.length;
21363 if (len === 0) {
21364 return null;
21365 }
21366 if (len === 1) {
21367 return validDropTargets[0];
21368 }
21369 var rootNode = this.gridOptionsService.getRootNode();
21370 // elementsFromPoint return a list of elements under
21371 // the mouseEvent sorted from topMost to bottomMost
21372 var elementStack = rootNode.elementsFromPoint(mouseEvent.clientX, mouseEvent.clientY);
21373 try {
21374 // loop over the sorted elementStack to find which dropTarget comes first
21375 for (var elementStack_1 = __values(elementStack), elementStack_1_1 = elementStack_1.next(); !elementStack_1_1.done; elementStack_1_1 = elementStack_1.next()) {
21376 var el = elementStack_1_1.value;
21377 try {
21378 for (var validDropTargets_1 = (e_4 = void 0, __values(validDropTargets)), validDropTargets_1_1 = validDropTargets_1.next(); !validDropTargets_1_1.done; validDropTargets_1_1 = validDropTargets_1.next()) {
21379 var dropTarget = validDropTargets_1_1.value;
21380 var containers = Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["flatten"])(this.getAllContainersFromDropTarget(dropTarget));
21381 if (containers.indexOf(el) !== -1) {
21382 return dropTarget;
21383 }
21384 }
21385 }
21386 catch (e_4_1) { e_4 = { error: e_4_1 }; }
21387 finally {
21388 try {
21389 if (validDropTargets_1_1 && !validDropTargets_1_1.done && (_b = validDropTargets_1.return)) _b.call(validDropTargets_1);
21390 }
21391 finally { if (e_4) throw e_4.error; }
21392 }
21393 }
21394 }
21395 catch (e_3_1) { e_3 = { error: e_3_1 }; }
21396 finally {
21397 try {
21398 if (elementStack_1_1 && !elementStack_1_1.done && (_a = elementStack_1.return)) _a.call(elementStack_1);
21399 }
21400 finally { if (e_3) throw e_3.error; }
21401 }
21402 // we should never hit this point of the code because only
21403 // valid dropTargets should be provided to this method.
21404 return null;
21405 };
21406 DragAndDropService.prototype.enterDragTargetIfExists = function (dropTarget, mouseEvent, hDirection, vDirection, fromNudge) {
21407 if (!dropTarget) {
21408 return;
21409 }
21410 if (dropTarget.onDragEnter) {
21411 var dragEnterEvent = this.createDropTargetEvent(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);
21412 dropTarget.onDragEnter(dragEnterEvent);
21413 }
21414 this.setGhostIcon(dropTarget.getIconName ? dropTarget.getIconName() : null);
21415 };
21416 DragAndDropService.prototype.leaveLastTargetIfExists = function (mouseEvent, hDirection, vDirection, fromNudge) {
21417 if (!this.lastDropTarget) {
21418 return;
21419 }
21420 if (this.lastDropTarget.onDragLeave) {
21421 var dragLeaveEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, hDirection, vDirection, fromNudge);
21422 this.lastDropTarget.onDragLeave(dragLeaveEvent);
21423 }
21424 this.setGhostIcon(null);
21425 };
21426 DragAndDropService.prototype.addDropTarget = function (dropTarget) {
21427 this.dropTargets.push(dropTarget);
21428 };
21429 DragAndDropService.prototype.removeDropTarget = function (dropTarget) {
21430 this.dropTargets = this.dropTargets.filter(function (target) { return target.getContainer() !== dropTarget.getContainer(); });
21431 };
21432 DragAndDropService.prototype.hasExternalDropZones = function () {
21433 return this.dropTargets.some(function (zones) { return zones.external; });
21434 };
21435 DragAndDropService.prototype.findExternalZone = function (params) {
21436 var externalTargets = this.dropTargets.filter(function (target) { return target.external; });
21437 return externalTargets.find(function (zone) { return zone.getContainer() === params.getContainer(); }) || null;
21438 };
21439 DragAndDropService.prototype.getHorizontalDirection = function (event) {
21440 var clientX = this.eventLastTime && this.eventLastTime.clientX;
21441 var eClientX = event.clientX;
21442 if (clientX === eClientX) {
21443 return null;
21444 }
21445 return clientX > eClientX ? HorizontalDirection.Left : HorizontalDirection.Right;
21446 };
21447 DragAndDropService.prototype.getVerticalDirection = function (event) {
21448 var clientY = this.eventLastTime && this.eventLastTime.clientY;
21449 var eClientY = event.clientY;
21450 if (clientY === eClientY) {
21451 return null;
21452 }
21453 return clientY > eClientY ? VerticalDirection.Up : VerticalDirection.Down;
21454 };
21455 DragAndDropService.prototype.createDropTargetEvent = function (dropTarget, event, hDirection, vDirection, fromNudge) {
21456 // localise x and y to the target
21457 var dropZoneTarget = dropTarget.getContainer();
21458 var rect = dropZoneTarget.getBoundingClientRect();
21459 var _a = this, api = _a.gridApi, columnApi = _a.columnApi, dragItem = _a.dragItem, dragSource = _a.dragSource;
21460 var x = event.clientX - rect.left;
21461 var y = event.clientY - rect.top;
21462 return { event: event, x: x, y: y, vDirection: vDirection, hDirection: hDirection, dragSource: dragSource, fromNudge: fromNudge, dragItem: dragItem, api: api, columnApi: columnApi, dropZoneTarget: dropZoneTarget };
21463 };
21464 DragAndDropService.prototype.positionGhost = function (event) {
21465 var ghost = this.eGhost;
21466 if (!ghost) {
21467 return;
21468 }
21469 var ghostRect = ghost.getBoundingClientRect();
21470 var ghostHeight = ghostRect.height;
21471 // for some reason, without the '-2', it still overlapped by 1 or 2 pixels, which
21472 // then brought in scrollbars to the browser. no idea why, but putting in -2 here
21473 // works around it which is good enough for me.
21474 var browserWidth = Object(_utils_browser__WEBPACK_IMPORTED_MODULE_5__["getBodyWidth"])() - 2;
21475 var browserHeight = Object(_utils_browser__WEBPACK_IMPORTED_MODULE_5__["getBodyHeight"])() - 2;
21476 var top = event.pageY - (ghostHeight / 2);
21477 var left = event.pageX - 10;
21478 var eDocument = this.gridOptionsService.getDocument();
21479 var win = (eDocument.defaultView || window);
21480 var windowScrollY = win.pageYOffset || eDocument.documentElement.scrollTop;
21481 var windowScrollX = win.pageXOffset || eDocument.documentElement.scrollLeft;
21482 // check ghost is not positioned outside of the browser
21483 if (browserWidth > 0 && ((left + ghost.clientWidth) > (browserWidth + windowScrollX))) {
21484 left = browserWidth + windowScrollX - ghost.clientWidth;
21485 }
21486 if (left < 0) {
21487 left = 0;
21488 }
21489 if (browserHeight > 0 && ((top + ghost.clientHeight) > (browserHeight + windowScrollY))) {
21490 top = browserHeight + windowScrollY - ghost.clientHeight;
21491 }
21492 if (top < 0) {
21493 top = 0;
21494 }
21495 ghost.style.left = left + "px";
21496 ghost.style.top = top + "px";
21497 };
21498 DragAndDropService.prototype.removeGhost = function () {
21499 if (this.eGhost && this.eGhostParent) {
21500 this.eGhostParent.removeChild(this.eGhost);
21501 }
21502 this.eGhost = null;
21503 };
21504 DragAndDropService.prototype.createGhost = function () {
21505 this.eGhost = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["loadTemplate"])(DragAndDropService_1.GHOST_TEMPLATE);
21506 this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);
21507 var theme = this.environment.getTheme().theme;
21508 if (theme) {
21509 this.eGhost.classList.add(theme);
21510 }
21511 this.eGhostIcon = this.eGhost.querySelector('.ag-dnd-ghost-icon');
21512 this.setGhostIcon(null);
21513 var eText = this.eGhost.querySelector('.ag-dnd-ghost-label');
21514 var dragItemName = this.dragSource.dragItemName;
21515 if (Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["isFunction"])(dragItemName)) {
21516 dragItemName = dragItemName();
21517 }
21518 eText.innerHTML = Object(_utils_string__WEBPACK_IMPORTED_MODULE_2__["escapeString"])(dragItemName) || '';
21519 this.eGhost.style.height = '25px';
21520 this.eGhost.style.top = '20px';
21521 this.eGhost.style.left = '20px';
21522 var eDocument = this.gridOptionsService.getDocument();
21523 var targetEl = null;
21524 try {
21525 targetEl = eDocument.fullscreenElement;
21526 }
21527 catch (e) {
21528 // some environments like SalesForce will throw errors
21529 // simply by trying to read the fullscreenElement property
21530 }
21531 finally {
21532 if (!targetEl) {
21533 var rootNode = this.gridOptionsService.getRootNode();
21534 var body = rootNode.querySelector('body');
21535 if (body) {
21536 targetEl = body;
21537 }
21538 else if (rootNode instanceof ShadowRoot) {
21539 targetEl = rootNode;
21540 }
21541 else {
21542 targetEl = rootNode === null || rootNode === void 0 ? void 0 : rootNode.documentElement;
21543 }
21544 }
21545 }
21546 this.eGhostParent = targetEl;
21547 if (!this.eGhostParent) {
21548 console.warn('AG Grid: could not find document body, it is needed for dragging columns');
21549 }
21550 else {
21551 this.eGhostParent.appendChild(this.eGhost);
21552 }
21553 };
21554 DragAndDropService.prototype.setGhostIcon = function (iconName, shake) {
21555 if (shake === void 0) { shake = false; }
21556 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["clearElement"])(this.eGhostIcon);
21557 var eIcon = null;
21558 if (!iconName) {
21559 iconName = this.dragSource.defaultIconName || DragAndDropService_1.ICON_NOT_ALLOWED;
21560 }
21561 switch (iconName) {
21562 case DragAndDropService_1.ICON_PINNED:
21563 eIcon = this.ePinnedIcon;
21564 break;
21565 case DragAndDropService_1.ICON_MOVE:
21566 eIcon = this.eMoveIcon;
21567 break;
21568 case DragAndDropService_1.ICON_LEFT:
21569 eIcon = this.eLeftIcon;
21570 break;
21571 case DragAndDropService_1.ICON_RIGHT:
21572 eIcon = this.eRightIcon;
21573 break;
21574 case DragAndDropService_1.ICON_GROUP:
21575 eIcon = this.eGroupIcon;
21576 break;
21577 case DragAndDropService_1.ICON_AGGREGATE:
21578 eIcon = this.eAggregateIcon;
21579 break;
21580 case DragAndDropService_1.ICON_PIVOT:
21581 eIcon = this.ePivotIcon;
21582 break;
21583 case DragAndDropService_1.ICON_NOT_ALLOWED:
21584 eIcon = this.eDropNotAllowedIcon;
21585 break;
21586 case DragAndDropService_1.ICON_HIDE:
21587 eIcon = this.eHideIcon;
21588 break;
21589 }
21590 this.eGhostIcon.classList.toggle('ag-shake-left-to-right', shake);
21591 if (eIcon === this.eHideIcon && this.gridOptionsService.is('suppressDragLeaveHidesColumns')) {
21592 return;
21593 }
21594 if (eIcon) {
21595 this.eGhostIcon.appendChild(eIcon);
21596 }
21597 };
21598 var DragAndDropService_1;
21599 DragAndDropService.ICON_PINNED = 'pinned';
21600 DragAndDropService.ICON_MOVE = 'move';
21601 DragAndDropService.ICON_LEFT = 'left';
21602 DragAndDropService.ICON_RIGHT = 'right';
21603 DragAndDropService.ICON_GROUP = 'group';
21604 DragAndDropService.ICON_AGGREGATE = 'aggregate';
21605 DragAndDropService.ICON_PIVOT = 'pivot';
21606 DragAndDropService.ICON_NOT_ALLOWED = 'notAllowed';
21607 DragAndDropService.ICON_HIDE = 'hide';
21608 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>";
21609 __decorate([
21610 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragService')
21611 ], DragAndDropService.prototype, "dragService", void 0);
21612 __decorate([
21613 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('mouseEventService')
21614 ], DragAndDropService.prototype, "mouseEventService", void 0);
21615 __decorate([
21616 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnApi')
21617 ], DragAndDropService.prototype, "columnApi", void 0);
21618 __decorate([
21619 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridApi')
21620 ], DragAndDropService.prototype, "gridApi", void 0);
21621 __decorate([
21622 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
21623 ], DragAndDropService.prototype, "init", null);
21624 __decorate([
21625 _context_context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
21626 ], DragAndDropService.prototype, "clearDragSourceParamsList", null);
21627 DragAndDropService = DragAndDropService_1 = __decorate([
21628 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('dragAndDropService')
21629 ], DragAndDropService);
21630 return DragAndDropService;
21631}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
21632
21633
21634
21635/***/ }),
21636/* 101 */
21637/***/ (function(module, __webpack_exports__, __webpack_require__) {
21638
21639"use strict";
21640__webpack_require__.r(__webpack_exports__);
21641/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadingCellRenderer", function() { return LoadingCellRenderer; });
21642/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
21643/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
21644/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46);
21645/**
21646 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
21647 * @version v29.2.0
21648 * @link https://www.ag-grid.com/
21649 * @license MIT
21650 */
21651var __extends = (undefined && undefined.__extends) || (function () {
21652 var extendStatics = function (d, b) {
21653 extendStatics = Object.setPrototypeOf ||
21654 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21655 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21656 return extendStatics(d, b);
21657 };
21658 return function (d, b) {
21659 extendStatics(d, b);
21660 function __() { this.constructor = d; }
21661 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21662 };
21663})();
21664var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
21665 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
21666 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21667 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;
21668 return c > 3 && r && Object.defineProperty(target, key, r), r;
21669};
21670
21671
21672
21673var LoadingCellRenderer = /** @class */ (function (_super) {
21674 __extends(LoadingCellRenderer, _super);
21675 function LoadingCellRenderer() {
21676 return _super.call(this, LoadingCellRenderer.TEMPLATE) || this;
21677 }
21678 LoadingCellRenderer.prototype.init = function (params) {
21679 params.node.failedLoad ? this.setupFailed() : this.setupLoading();
21680 };
21681 LoadingCellRenderer.prototype.setupFailed = function () {
21682 var localeTextFunc = this.localeService.getLocaleTextFunc();
21683 this.eLoadingText.innerText = localeTextFunc('loadingError', 'ERR');
21684 };
21685 LoadingCellRenderer.prototype.setupLoading = function () {
21686 var eLoadingIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_2__["createIconNoSpan"])('groupLoading', this.gridOptionsService, null);
21687 if (eLoadingIcon) {
21688 this.eLoadingIcon.appendChild(eLoadingIcon);
21689 }
21690 var localeTextFunc = this.localeService.getLocaleTextFunc();
21691 this.eLoadingText.innerText = localeTextFunc('loadingOoo', 'Loading');
21692 };
21693 LoadingCellRenderer.prototype.refresh = function (params) {
21694 return false;
21695 };
21696 // this is a user component, and IComponent has "public destroy()" as part of the interface.
21697 // so we need to override destroy() just to make the method public.
21698 LoadingCellRenderer.prototype.destroy = function () {
21699 _super.prototype.destroy.call(this);
21700 };
21701 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>";
21702 __decorate([
21703 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eLoadingIcon')
21704 ], LoadingCellRenderer.prototype, "eLoadingIcon", void 0);
21705 __decorate([
21706 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eLoadingText')
21707 ], LoadingCellRenderer.prototype, "eLoadingText", void 0);
21708 return LoadingCellRenderer;
21709}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
21710
21711
21712
21713/***/ }),
21714/* 102 */
21715/***/ (function(module, __webpack_exports__, __webpack_require__) {
21716
21717"use strict";
21718__webpack_require__.r(__webpack_exports__);
21719/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadingOverlayComponent", function() { return LoadingOverlayComponent; });
21720/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
21721/**
21722 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
21723 * @version v29.2.0
21724 * @link https://www.ag-grid.com/
21725 * @license MIT
21726 */
21727var __extends = (undefined && undefined.__extends) || (function () {
21728 var extendStatics = function (d, b) {
21729 extendStatics = Object.setPrototypeOf ||
21730 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21731 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21732 return extendStatics(d, b);
21733 };
21734 return function (d, b) {
21735 extendStatics(d, b);
21736 function __() { this.constructor = d; }
21737 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21738 };
21739})();
21740
21741var LoadingOverlayComponent = /** @class */ (function (_super) {
21742 __extends(LoadingOverlayComponent, _super);
21743 function LoadingOverlayComponent() {
21744 return _super.call(this) || this;
21745 }
21746 // this is a user component, and IComponent has "public destroy()" as part of the interface.
21747 // so we need to override destroy() just to make the method public.
21748 LoadingOverlayComponent.prototype.destroy = function () {
21749 _super.prototype.destroy.call(this);
21750 };
21751 LoadingOverlayComponent.prototype.init = function (params) {
21752 var _a;
21753 var template = (_a = this.gridOptionsService.get('overlayLoadingTemplate')) !== null && _a !== void 0 ? _a : LoadingOverlayComponent.DEFAULT_LOADING_OVERLAY_TEMPLATE;
21754 var localeTextFunc = this.localeService.getLocaleTextFunc();
21755 var localisedTemplate = template.replace('[LOADING...]', localeTextFunc('loadingOoo', 'Loading...'));
21756 this.setTemplate(localisedTemplate);
21757 };
21758 LoadingOverlayComponent.DEFAULT_LOADING_OVERLAY_TEMPLATE = '<span class="ag-overlay-loading-center">[LOADING...]</span>';
21759 return LoadingOverlayComponent;
21760}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
21761
21762
21763
21764/***/ }),
21765/* 103 */
21766/***/ (function(module, __webpack_exports__, __webpack_require__) {
21767
21768"use strict";
21769__webpack_require__.r(__webpack_exports__);
21770/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoRowsOverlayComponent", function() { return NoRowsOverlayComponent; });
21771/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
21772/**
21773 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
21774 * @version v29.2.0
21775 * @link https://www.ag-grid.com/
21776 * @license MIT
21777 */
21778var __extends = (undefined && undefined.__extends) || (function () {
21779 var extendStatics = function (d, b) {
21780 extendStatics = Object.setPrototypeOf ||
21781 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21782 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21783 return extendStatics(d, b);
21784 };
21785 return function (d, b) {
21786 extendStatics(d, b);
21787 function __() { this.constructor = d; }
21788 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21789 };
21790})();
21791
21792var NoRowsOverlayComponent = /** @class */ (function (_super) {
21793 __extends(NoRowsOverlayComponent, _super);
21794 function NoRowsOverlayComponent() {
21795 return _super.call(this) || this;
21796 }
21797 // this is a user component, and IComponent has "public destroy()" as part of the interface.
21798 // so we need to override destroy() just to make the method public.
21799 NoRowsOverlayComponent.prototype.destroy = function () {
21800 _super.prototype.destroy.call(this);
21801 };
21802 NoRowsOverlayComponent.prototype.init = function (params) {
21803 var _a;
21804 var template = (_a = this.gridOptionsService.get('overlayNoRowsTemplate')) !== null && _a !== void 0 ? _a : NoRowsOverlayComponent.DEFAULT_NO_ROWS_TEMPLATE;
21805 var localeTextFunc = this.localeService.getLocaleTextFunc();
21806 var localisedTemplate = template.replace('[NO_ROWS_TO_SHOW]', localeTextFunc('noRowsToShow', 'No Rows To Show'));
21807 this.setTemplate(localisedTemplate);
21808 };
21809 NoRowsOverlayComponent.DEFAULT_NO_ROWS_TEMPLATE = '<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>';
21810 return NoRowsOverlayComponent;
21811}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
21812
21813
21814
21815/***/ }),
21816/* 104 */
21817/***/ (function(module, __webpack_exports__, __webpack_require__) {
21818
21819"use strict";
21820__webpack_require__.r(__webpack_exports__);
21821/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipComponent", function() { return TooltipComponent; });
21822/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
21823/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31);
21824/**
21825 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
21826 * @version v29.2.0
21827 * @link https://www.ag-grid.com/
21828 * @license MIT
21829 */
21830var __extends = (undefined && undefined.__extends) || (function () {
21831 var extendStatics = function (d, b) {
21832 extendStatics = Object.setPrototypeOf ||
21833 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21834 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21835 return extendStatics(d, b);
21836 };
21837 return function (d, b) {
21838 extendStatics(d, b);
21839 function __() { this.constructor = d; }
21840 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21841 };
21842})();
21843
21844
21845var TooltipComponent = /** @class */ (function (_super) {
21846 __extends(TooltipComponent, _super);
21847 function TooltipComponent() {
21848 return _super.call(this, /* html */ "<div class=\"ag-tooltip\"></div>") || this;
21849 }
21850 // will need to type params
21851 TooltipComponent.prototype.init = function (params) {
21852 var value = params.value;
21853 this.getGui().innerHTML = Object(_utils_string__WEBPACK_IMPORTED_MODULE_1__["escapeString"])(value);
21854 };
21855 return TooltipComponent;
21856}(_widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__["PopupComponent"]));
21857
21858
21859
21860/***/ }),
21861/* 105 */
21862/***/ (function(module, __webpack_exports__, __webpack_require__) {
21863
21864"use strict";
21865__webpack_require__.r(__webpack_exports__);
21866/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserComponentFactory", function() { return UserComponentFactory; });
21867/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
21868/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
21869/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39);
21870/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
21871/* harmony import */ var _componentTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(106);
21872/* harmony import */ var _filter_floating_floatingFilterMapper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(107);
21873/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14);
21874/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(15);
21875/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(13);
21876/**
21877 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
21878 * @version v29.2.0
21879 * @link https://www.ag-grid.com/
21880 * @license MIT
21881 */
21882var __extends = (undefined && undefined.__extends) || (function () {
21883 var extendStatics = function (d, b) {
21884 extendStatics = Object.setPrototypeOf ||
21885 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21886 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21887 return extendStatics(d, b);
21888 };
21889 return function (d, b) {
21890 extendStatics(d, b);
21891 function __() { this.constructor = d; }
21892 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21893 };
21894})();
21895var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
21896 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
21897 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21898 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;
21899 return c > 3 && r && Object.defineProperty(target, key, r), r;
21900};
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910var UserComponentFactory = /** @class */ (function (_super) {
21911 __extends(UserComponentFactory, _super);
21912 function UserComponentFactory() {
21913 return _super !== null && _super.apply(this, arguments) || this;
21914 }
21915 UserComponentFactory.prototype.getHeaderCompDetails = function (colDef, params) {
21916 return this.getCompDetails(colDef, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["HeaderComponent"], 'agColumnHeader', params);
21917 };
21918 UserComponentFactory.prototype.getHeaderGroupCompDetails = function (params) {
21919 var colGroupDef = params.columnGroup.getColGroupDef();
21920 return this.getCompDetails(colGroupDef, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["HeaderGroupComponent"], 'agColumnGroupHeader', params);
21921 };
21922 // this one is unusual, as it can be LoadingCellRenderer, DetailCellRenderer, FullWidthCellRenderer or GroupRowRenderer.
21923 // so we have to pass the type in.
21924 UserComponentFactory.prototype.getFullWidthCellRendererDetails = function (params) {
21925 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FullWidth"], null, params, true);
21926 };
21927 UserComponentFactory.prototype.getFullWidthLoadingCellRendererDetails = function (params) {
21928 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FullWidthLoading"], 'agLoadingCellRenderer', params, true);
21929 };
21930 UserComponentFactory.prototype.getFullWidthGroupCellRendererDetails = function (params) {
21931 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FullWidthGroup"], 'agGroupRowRenderer', params, true);
21932 };
21933 UserComponentFactory.prototype.getFullWidthDetailCellRendererDetails = function (params) {
21934 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FullWidthDetail"], 'agDetailCellRenderer', params, true);
21935 };
21936 // CELL RENDERER
21937 UserComponentFactory.prototype.getInnerRendererDetails = function (def, params) {
21938 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["InnerRendererComponent"], null, params);
21939 };
21940 UserComponentFactory.prototype.getFullWidthGroupRowInnerCellRenderer = function (def, params) {
21941 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["InnerRendererComponent"], null, params);
21942 };
21943 UserComponentFactory.prototype.getCellRendererDetails = function (def, params) {
21944 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["CellRendererComponent"], null, params);
21945 };
21946 // CELL EDITOR
21947 UserComponentFactory.prototype.getCellEditorDetails = function (def, params) {
21948 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["CellEditorComponent"], 'agCellEditor', params, true);
21949 };
21950 // FILTER
21951 UserComponentFactory.prototype.getFilterDetails = function (def, params, defaultFilter) {
21952 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FilterComponent"], defaultFilter, params, true);
21953 };
21954 UserComponentFactory.prototype.getDateCompDetails = function (params) {
21955 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["DateComponent"], 'agDateInput', params, true);
21956 };
21957 UserComponentFactory.prototype.getLoadingOverlayCompDetails = function (params) {
21958 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["LoadingOverlayComponent"], 'agLoadingOverlay', params, true);
21959 };
21960 UserComponentFactory.prototype.getNoRowsOverlayCompDetails = function (params) {
21961 return this.getCompDetails(this.gridOptions, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["NoRowsOverlayComponent"], 'agNoRowsOverlay', params, true);
21962 };
21963 UserComponentFactory.prototype.getTooltipCompDetails = function (params) {
21964 return this.getCompDetails(params.colDef, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["TooltipComponent"], 'agTooltipComponent', params, true);
21965 };
21966 UserComponentFactory.prototype.getSetFilterCellRendererDetails = function (def, params) {
21967 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["CellRendererComponent"], null, params);
21968 };
21969 UserComponentFactory.prototype.getFloatingFilterCompDetails = function (def, params, defaultFloatingFilter) {
21970 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FloatingFilterComponent"], defaultFloatingFilter, params);
21971 };
21972 UserComponentFactory.prototype.getToolPanelCompDetails = function (toolPanelDef, params) {
21973 return this.getCompDetails(toolPanelDef, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["ToolPanelComponent"], null, params, true);
21974 };
21975 UserComponentFactory.prototype.getStatusPanelCompDetails = function (def, params) {
21976 return this.getCompDetails(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["StatusPanelComponent"], null, params, true);
21977 };
21978 UserComponentFactory.prototype.getCompDetails = function (defObject, type, defaultName, params, mandatory) {
21979 var _this = this;
21980 if (mandatory === void 0) { mandatory = false; }
21981 var propertyName = type.propertyName, cellRenderer = type.cellRenderer;
21982 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;
21983 var lookupFromRegistry = function (key) {
21984 var item = _this.userComponentRegistry.retrieve(propertyName, key);
21985 if (item) {
21986 jsComp = !item.componentFromFramework ? item.component : undefined;
21987 fwComp = item.componentFromFramework ? item.component : undefined;
21988 }
21989 };
21990 // if compOption is a string, means we need to look the item up
21991 if (compName != null) {
21992 lookupFromRegistry(compName);
21993 }
21994 // if lookup brought nothing back, and we have a default, lookup the default
21995 if (jsComp == null && fwComp == null && defaultName != null) {
21996 lookupFromRegistry(defaultName);
21997 }
21998 // if we have a comp option, and it's a function, replace it with an object equivalent adaptor
21999 if (jsComp && cellRenderer && !this.agComponentUtils.doesImplementIComponent(jsComp)) {
22000 jsComp = this.agComponentUtils.adaptFunction(propertyName, jsComp);
22001 }
22002 if (!jsComp && !fwComp) {
22003 if (mandatory) {
22004 console.error("AG Grid: Could not find component " + compName + ", did you forget to configure this component?");
22005 }
22006 return;
22007 }
22008 var paramsMerged = this.mergeParamsWithApplicationProvidedParams(defObject, type, params, paramsFromSelector);
22009 var componentFromFramework = jsComp == null;
22010 var componentClass = jsComp ? jsComp : fwComp;
22011 return {
22012 componentFromFramework: componentFromFramework,
22013 componentClass: componentClass,
22014 params: paramsMerged,
22015 type: type,
22016 popupFromSelector: popupFromSelector,
22017 popupPositionFromSelector: popupPositionFromSelector,
22018 newAgStackInstance: function () { return _this.newAgStackInstance(componentClass, componentFromFramework, paramsMerged, type); }
22019 };
22020 };
22021 UserComponentFactory.prototype.getCompKeys = function (defObject, type, params) {
22022 var _this = this;
22023 var propertyName = type.propertyName;
22024 var compName;
22025 var jsComp;
22026 var fwComp;
22027 var paramsFromSelector;
22028 var popupFromSelector;
22029 var popupPositionFromSelector;
22030 // there are two types of js comps, class based and func based. we can only check for
22031 // class based, by checking if getGui() exists. no way to differentiate js func based vs eg react func based
22032 // const isJsClassComp = (comp: any) => this.agComponentUtils.doesImplementIComponent(comp);
22033 // const fwActive = this.frameworkComponentWrapper != null;
22034 // pull from defObject if available
22035 if (defObject) {
22036 var defObjectAny = defObject;
22037 // if selector, use this
22038 var selectorFunc = defObjectAny[propertyName + 'Selector'];
22039 var selectorRes = selectorFunc ? selectorFunc(params) : null;
22040 var assignComp = function (providedJsComp, providedFwComp) {
22041 var xxxFrameworkDeprecatedWarn = function () {
22042 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.";
22043 Object(_utils_function__WEBPACK_IMPORTED_MODULE_8__["doOnce"])(function () { return console.warn(warningMessage); }, "UserComponentFactory." + propertyName + "FrameworkDeprecated");
22044 };
22045 if (typeof providedJsComp === 'string') {
22046 compName = providedJsComp;
22047 }
22048 else if (typeof providedFwComp === 'string') {
22049 xxxFrameworkDeprecatedWarn();
22050 compName = providedFwComp;
22051 // comp===true for filters, which means use the default comp
22052 }
22053 else if (providedJsComp != null && providedJsComp !== true) {
22054 var isFwkComp = _this.getFrameworkOverrides().isFrameworkComponent(providedJsComp);
22055 if (isFwkComp) {
22056 fwComp = providedJsComp;
22057 }
22058 else {
22059 jsComp = providedJsComp;
22060 }
22061 }
22062 else if (providedFwComp != null) {
22063 xxxFrameworkDeprecatedWarn();
22064 fwComp = providedFwComp;
22065 }
22066 };
22067 if (selectorRes) {
22068 if (selectorRes.frameworkComponent != null) {
22069 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.";
22070 Object(_utils_function__WEBPACK_IMPORTED_MODULE_8__["doOnce"])(function () { return console.warn(warningMessage_1); }, "UserComponentFactory." + propertyName + "FrameworkSelectorDeprecated");
22071 assignComp(selectorRes.frameworkComponent, undefined);
22072 }
22073 else {
22074 assignComp(selectorRes.component, undefined);
22075 }
22076 paramsFromSelector = selectorRes.params;
22077 popupFromSelector = selectorRes.popup;
22078 popupPositionFromSelector = selectorRes.popupPosition;
22079 }
22080 else {
22081 // if no selector, or result of selector is empty, take from defObject
22082 assignComp(defObjectAny[propertyName], defObjectAny[propertyName + 'Framework']);
22083 }
22084 }
22085 return { compName: compName, jsComp: jsComp, fwComp: fwComp, paramsFromSelector: paramsFromSelector, popupFromSelector: popupFromSelector, popupPositionFromSelector: popupPositionFromSelector };
22086 };
22087 UserComponentFactory.prototype.newAgStackInstance = function (ComponentClass, componentFromFramework, params, type) {
22088 var propertyName = type.propertyName;
22089 var jsComponent = !componentFromFramework;
22090 // using javascript component
22091 var instance;
22092 if (jsComponent) {
22093 instance = new ComponentClass();
22094 }
22095 else {
22096 // Using framework component
22097 var thisComponentConfig = this.componentMetadataProvider.retrieve(propertyName);
22098 instance = this.frameworkComponentWrapper.wrap(ComponentClass, thisComponentConfig.mandatoryMethodList, thisComponentConfig.optionalMethodList, type);
22099 }
22100 var deferredInit = this.initComponent(instance, params);
22101 if (deferredInit == null) {
22102 return _utils__WEBPACK_IMPORTED_MODULE_2__["AgPromise"].resolve(instance);
22103 }
22104 return deferredInit.then(function () { return instance; });
22105 };
22106 // used by Floating Filter
22107 UserComponentFactory.prototype.mergeParamsWithApplicationProvidedParams = function (defObject, type, paramsFromGrid, paramsFromSelector) {
22108 if (paramsFromSelector === void 0) { paramsFromSelector = null; }
22109 var params = {
22110 context: this.gridOptionsService.context,
22111 columnApi: this.gridOptionsService.columnApi,
22112 api: this.gridOptionsService.api
22113 };
22114 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["mergeDeep"])(params, paramsFromGrid);
22115 // pull user params from either the old prop name and new prop name
22116 // eg either cellRendererParams and cellCompParams
22117 var defObjectAny = defObject;
22118 var userParams = defObjectAny && defObjectAny[type.propertyName + 'Params'];
22119 if (typeof userParams === 'function') {
22120 var userParamsFromFunc = userParams(paramsFromGrid);
22121 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["mergeDeep"])(params, userParamsFromFunc);
22122 }
22123 else if (typeof userParams === 'object') {
22124 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["mergeDeep"])(params, userParams);
22125 }
22126 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["mergeDeep"])(params, paramsFromSelector);
22127 return params;
22128 };
22129 UserComponentFactory.prototype.initComponent = function (component, params) {
22130 this.context.createBean(component);
22131 if (component.init == null) {
22132 return;
22133 }
22134 return component.init(params);
22135 };
22136 UserComponentFactory.prototype.getDefaultFloatingFilterType = function (def) {
22137 if (def == null) {
22138 return null;
22139 }
22140 var defaultFloatingFilterType = null;
22141 var _a = this.getCompKeys(def, _componentTypes__WEBPACK_IMPORTED_MODULE_4__["FilterComponent"]), compName = _a.compName, jsComp = _a.jsComp, fwComp = _a.fwComp;
22142 if (compName) {
22143 // will be undefined if not in the map
22144 defaultFloatingFilterType = _filter_floating_floatingFilterMapper__WEBPACK_IMPORTED_MODULE_5__["FloatingFilterMapper"].getFloatingFilterType(compName);
22145 }
22146 else {
22147 var usingDefaultFilter = (jsComp == null && fwComp == null) && (def.filter === true);
22148 if (usingDefaultFilter) {
22149 var setFilterModuleLoaded = _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_6__["ModuleNames"].SetFilterModule);
22150 defaultFloatingFilterType = setFilterModuleLoaded ? 'agSetColumnFloatingFilter' : 'agTextColumnFloatingFilter';
22151 }
22152 }
22153 return defaultFloatingFilterType;
22154 };
22155 __decorate([
22156 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptions')
22157 ], UserComponentFactory.prototype, "gridOptions", void 0);
22158 __decorate([
22159 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('agComponentUtils')
22160 ], UserComponentFactory.prototype, "agComponentUtils", void 0);
22161 __decorate([
22162 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('componentMetadataProvider')
22163 ], UserComponentFactory.prototype, "componentMetadataProvider", void 0);
22164 __decorate([
22165 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('userComponentRegistry')
22166 ], UserComponentFactory.prototype, "userComponentRegistry", void 0);
22167 __decorate([
22168 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('frameworkComponentWrapper')
22169 ], UserComponentFactory.prototype, "frameworkComponentWrapper", void 0);
22170 UserComponentFactory = __decorate([
22171 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('userComponentFactory')
22172 ], UserComponentFactory);
22173 return UserComponentFactory;
22174}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
22175
22176
22177
22178/***/ }),
22179/* 106 */
22180/***/ (function(module, __webpack_exports__, __webpack_require__) {
22181
22182"use strict";
22183__webpack_require__.r(__webpack_exports__);
22184/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateComponent", function() { return DateComponent; });
22185/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderComponent", function() { return HeaderComponent; });
22186/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupComponent", function() { return HeaderGroupComponent; });
22187/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellRendererComponent", function() { return CellRendererComponent; });
22188/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellEditorComponent", function() { return CellEditorComponent; });
22189/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerRendererComponent", function() { return InnerRendererComponent; });
22190/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadingOverlayComponent", function() { return LoadingOverlayComponent; });
22191/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoRowsOverlayComponent", function() { return NoRowsOverlayComponent; });
22192/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipComponent", function() { return TooltipComponent; });
22193/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterComponent", function() { return FilterComponent; });
22194/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FloatingFilterComponent", function() { return FloatingFilterComponent; });
22195/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToolPanelComponent", function() { return ToolPanelComponent; });
22196/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StatusPanelComponent", function() { return StatusPanelComponent; });
22197/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FullWidth", function() { return FullWidth; });
22198/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FullWidthLoading", function() { return FullWidthLoading; });
22199/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FullWidthGroup", function() { return FullWidthGroup; });
22200/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FullWidthDetail", function() { return FullWidthDetail; });
22201/**
22202 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
22203 * @version v29.2.0
22204 * @link https://www.ag-grid.com/
22205 * @license MIT
22206 */
22207var DateComponent = {
22208 propertyName: 'dateComponent',
22209 cellRenderer: false
22210};
22211var HeaderComponent = {
22212 propertyName: 'headerComponent',
22213 cellRenderer: false
22214};
22215var HeaderGroupComponent = {
22216 propertyName: 'headerGroupComponent',
22217 cellRenderer: false
22218};
22219var CellRendererComponent = {
22220 propertyName: 'cellRenderer',
22221 cellRenderer: true
22222};
22223var CellEditorComponent = {
22224 propertyName: 'cellEditor',
22225 cellRenderer: false
22226};
22227var InnerRendererComponent = {
22228 propertyName: 'innerRenderer',
22229 cellRenderer: true
22230};
22231var LoadingOverlayComponent = {
22232 propertyName: 'loadingOverlayComponent',
22233 cellRenderer: false
22234};
22235var NoRowsOverlayComponent = {
22236 propertyName: 'noRowsOverlayComponent',
22237 cellRenderer: false
22238};
22239var TooltipComponent = {
22240 propertyName: 'tooltipComponent',
22241 cellRenderer: false
22242};
22243var FilterComponent = {
22244 propertyName: 'filter',
22245 cellRenderer: false
22246};
22247var FloatingFilterComponent = {
22248 propertyName: 'floatingFilterComponent',
22249 cellRenderer: false
22250};
22251var ToolPanelComponent = {
22252 propertyName: 'toolPanel',
22253 cellRenderer: false
22254};
22255var StatusPanelComponent = {
22256 propertyName: 'statusPanel',
22257 cellRenderer: false
22258};
22259var FullWidth = {
22260 propertyName: 'fullWidthCellRenderer',
22261 cellRenderer: true
22262};
22263var FullWidthLoading = {
22264 propertyName: 'loadingCellRenderer',
22265 cellRenderer: true
22266};
22267var FullWidthGroup = {
22268 propertyName: 'groupRowRenderer',
22269 cellRenderer: true
22270};
22271var FullWidthDetail = {
22272 propertyName: 'detailCellRenderer',
22273 cellRenderer: true
22274};
22275
22276
22277/***/ }),
22278/* 107 */
22279/***/ (function(module, __webpack_exports__, __webpack_require__) {
22280
22281"use strict";
22282__webpack_require__.r(__webpack_exports__);
22283/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FloatingFilterMapper", function() { return FloatingFilterMapper; });
22284/**
22285 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
22286 * @version v29.2.0
22287 * @link https://www.ag-grid.com/
22288 * @license MIT
22289 */
22290var FloatingFilterMapper = /** @class */ (function () {
22291 function FloatingFilterMapper() {
22292 }
22293 FloatingFilterMapper.getFloatingFilterType = function (filterType) {
22294 return this.filterToFloatingFilterMapping[filterType];
22295 };
22296 FloatingFilterMapper.filterToFloatingFilterMapping = {
22297 set: 'agSetColumnFloatingFilter',
22298 agSetColumnFilter: 'agSetColumnFloatingFilter',
22299 multi: 'agMultiColumnFloatingFilter',
22300 agMultiColumnFilter: 'agMultiColumnFloatingFilter',
22301 group: 'agGroupColumnFloatingFilter',
22302 agGroupColumnFilter: 'agGroupColumnFloatingFilter',
22303 number: 'agNumberColumnFloatingFilter',
22304 agNumberColumnFilter: 'agNumberColumnFloatingFilter',
22305 date: 'agDateColumnFloatingFilter',
22306 agDateColumnFilter: 'agDateColumnFloatingFilter',
22307 text: 'agTextColumnFloatingFilter',
22308 agTextColumnFilter: 'agTextColumnFloatingFilter'
22309 };
22310 return FloatingFilterMapper;
22311}());
22312
22313
22314
22315/***/ }),
22316/* 108 */
22317/***/ (function(module, __webpack_exports__, __webpack_require__) {
22318
22319"use strict";
22320__webpack_require__.r(__webpack_exports__);
22321/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExcelFactoryMode", function() { return ExcelFactoryMode; });
22322/**
22323 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
22324 * @version v29.2.0
22325 * @link https://www.ag-grid.com/
22326 * @license MIT
22327 */
22328// Excel Export
22329var ExcelFactoryMode;
22330(function (ExcelFactoryMode) {
22331 ExcelFactoryMode[ExcelFactoryMode["SINGLE_SHEET"] = 0] = "SINGLE_SHEET";
22332 ExcelFactoryMode[ExcelFactoryMode["MULTI_SHEET"] = 1] = "MULTI_SHEET";
22333})(ExcelFactoryMode || (ExcelFactoryMode = {}));
22334
22335
22336/***/ }),
22337/* 109 */
22338/***/ (function(module, __webpack_exports__, __webpack_require__) {
22339
22340"use strict";
22341__webpack_require__.r(__webpack_exports__);
22342/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragService", function() { return DragService; });
22343/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
22344/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
22345/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
22346/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
22347/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19);
22348/* harmony import */ var _utils_mouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49);
22349/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42);
22350/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45);
22351/**
22352 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
22353 * @version v29.2.0
22354 * @link https://www.ag-grid.com/
22355 * @license MIT
22356 */
22357var __extends = (undefined && undefined.__extends) || (function () {
22358 var extendStatics = function (d, b) {
22359 extendStatics = Object.setPrototypeOf ||
22360 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22361 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
22362 return extendStatics(d, b);
22363 };
22364 return function (d, b) {
22365 extendStatics(d, b);
22366 function __() { this.constructor = d; }
22367 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22368 };
22369})();
22370var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
22371 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22372 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
22373 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;
22374 return c > 3 && r && Object.defineProperty(target, key, r), r;
22375};
22376
22377
22378
22379
22380
22381
22382
22383
22384/** Adds drag listening onto an element. In AG Grid this is used twice, first is resizing columns,
22385 * second is moving the columns and column groups around (ie the 'drag' part of Drag and Drop. */
22386var DragService = /** @class */ (function (_super) {
22387 __extends(DragService, _super);
22388 function DragService() {
22389 var _this = _super !== null && _super.apply(this, arguments) || this;
22390 _this.dragEndFunctions = [];
22391 _this.dragSources = [];
22392 return _this;
22393 }
22394 DragService.prototype.init = function () {
22395 this.logger = this.loggerFactory.create('DragService');
22396 };
22397 DragService.prototype.removeAllListeners = function () {
22398 this.dragSources.forEach(this.removeListener.bind(this));
22399 this.dragSources.length = 0;
22400 };
22401 DragService.prototype.removeListener = function (dragSourceAndListener) {
22402 var element = dragSourceAndListener.dragSource.eElement;
22403 var mouseDownListener = dragSourceAndListener.mouseDownListener;
22404 element.removeEventListener('mousedown', mouseDownListener);
22405 // remove touch listener only if it exists
22406 if (dragSourceAndListener.touchEnabled) {
22407 var touchStartListener = dragSourceAndListener.touchStartListener;
22408 element.removeEventListener('touchstart', touchStartListener, { passive: true });
22409 }
22410 };
22411 DragService.prototype.removeDragSource = function (params) {
22412 var dragSourceAndListener = this.dragSources.find(function (item) { return item.dragSource === params; });
22413 if (!dragSourceAndListener) {
22414 return;
22415 }
22416 this.removeListener(dragSourceAndListener);
22417 Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["removeFromArray"])(this.dragSources, dragSourceAndListener);
22418 };
22419 DragService.prototype.isDragging = function () {
22420 return this.dragging;
22421 };
22422 DragService.prototype.addDragSource = function (params, includeTouch) {
22423 var _this = this;
22424 if (includeTouch === void 0) { includeTouch = false; }
22425 var mouseListener = this.onMouseDown.bind(this, params);
22426 params.eElement.addEventListener('mousedown', mouseListener);
22427 var touchListener = null;
22428 var suppressTouch = this.gridOptionsService.is('suppressTouch');
22429 if (includeTouch && !suppressTouch) {
22430 touchListener = function (touchEvent) {
22431 if (Object(_utils_dom__WEBPACK_IMPORTED_MODULE_7__["isFocusableFormField"])(touchEvent.target)) {
22432 return;
22433 }
22434 if (touchEvent.cancelable) {
22435 touchEvent.preventDefault();
22436 touchEvent.stopPropagation();
22437 }
22438 _this.onTouchStart(params, touchEvent);
22439 };
22440 // we set passive=false, as we want to prevent default on this event
22441 params.eElement.addEventListener('touchstart', touchListener, { passive: false });
22442 }
22443 this.dragSources.push({
22444 dragSource: params,
22445 mouseDownListener: mouseListener,
22446 touchStartListener: touchListener,
22447 touchEnabled: includeTouch
22448 });
22449 };
22450 // gets called whenever mouse down on any drag source
22451 DragService.prototype.onTouchStart = function (params, touchEvent) {
22452 var _this = this;
22453 this.currentDragParams = params;
22454 this.dragging = false;
22455 var touch = touchEvent.touches[0];
22456 this.touchLastTime = touch;
22457 this.touchStart = touch;
22458 var touchMoveEvent = function (e) { return _this.onTouchMove(e, params.eElement); };
22459 var touchEndEvent = function (e) { return _this.onTouchUp(e, params.eElement); };
22460 var documentTouchMove = function (e) { if (e.cancelable) {
22461 e.preventDefault();
22462 } };
22463 var target = touchEvent.target;
22464 var events = [
22465 // Prevents the page document from moving while we are dragging items around.
22466 // preventDefault needs to be called in the touchmove listener and never inside the
22467 // touchstart, because using touchstart causes the click event to be cancelled on touch devices.
22468 { target: document, type: 'touchmove', listener: documentTouchMove, options: { passive: false } },
22469 { target: target, type: 'touchmove', listener: touchMoveEvent, options: { passive: true } },
22470 { target: target, type: 'touchend', listener: touchEndEvent, options: { passive: true } },
22471 { target: target, type: 'touchcancel', listener: touchEndEvent, options: { passive: true } }
22472 ];
22473 // temporally add these listeners, for the duration of the drag
22474 this.addTemporaryEvents(events);
22475 // see if we want to start dragging straight away
22476 if (params.dragStartPixels === 0) {
22477 this.onCommonMove(touch, this.touchStart, params.eElement);
22478 }
22479 };
22480 // gets called whenever mouse down on any drag source
22481 DragService.prototype.onMouseDown = function (params, mouseEvent) {
22482 var _this = this;
22483 var e = mouseEvent;
22484 if (params.skipMouseEvent && params.skipMouseEvent(mouseEvent)) {
22485 return;
22486 }
22487 // if there are two elements with parent / child relationship, and both are draggable,
22488 // when we drag the child, we should NOT drag the parent. an example of this is row moving
22489 // and range selection - row moving should get preference when use drags the rowDrag component.
22490 if (e._alreadyProcessedByDragService) {
22491 return;
22492 }
22493 e._alreadyProcessedByDragService = true;
22494 // only interested in left button clicks
22495 if (mouseEvent.button !== 0) {
22496 return;
22497 }
22498 this.currentDragParams = params;
22499 this.dragging = false;
22500 this.mouseStartEvent = mouseEvent;
22501 var eDocument = this.gridOptionsService.getDocument();
22502 var mouseMoveEvent = function (event) { return _this.onMouseMove(event, params.eElement); };
22503 var mouseUpEvent = function (event) { return _this.onMouseUp(event, params.eElement); };
22504 var contextEvent = function (event) { return event.preventDefault(); };
22505 var target = eDocument;
22506 var events = [
22507 { target: target, type: 'mousemove', listener: mouseMoveEvent },
22508 { target: target, type: 'mouseup', listener: mouseUpEvent },
22509 { target: target, type: 'contextmenu', listener: contextEvent }
22510 ];
22511 // temporally add these listeners, for the duration of the drag
22512 this.addTemporaryEvents(events);
22513 //see if we want to start dragging straight away
22514 if (params.dragStartPixels === 0) {
22515 this.onMouseMove(mouseEvent, params.eElement);
22516 }
22517 };
22518 DragService.prototype.addTemporaryEvents = function (events) {
22519 events.forEach(function (currentEvent) {
22520 var target = currentEvent.target, type = currentEvent.type, listener = currentEvent.listener, options = currentEvent.options;
22521 target.addEventListener(type, listener, options);
22522 });
22523 this.dragEndFunctions.push(function () {
22524 events.forEach(function (currentEvent) {
22525 var target = currentEvent.target, type = currentEvent.type, listener = currentEvent.listener, options = currentEvent.options;
22526 target.removeEventListener(type, listener, options);
22527 });
22528 });
22529 };
22530 // returns true if the event is close to the original event by X pixels either vertically or horizontally.
22531 // we only start dragging after X pixels so this allows us to know if we should start dragging yet.
22532 DragService.prototype.isEventNearStartEvent = function (currentEvent, startEvent) {
22533 // by default, we wait 4 pixels before starting the drag
22534 var dragStartPixels = this.currentDragParams.dragStartPixels;
22535 var requiredPixelDiff = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(dragStartPixels) ? dragStartPixels : 4;
22536 return Object(_utils_mouse__WEBPACK_IMPORTED_MODULE_5__["areEventsNear"])(currentEvent, startEvent, requiredPixelDiff);
22537 };
22538 DragService.prototype.getFirstActiveTouch = function (touchList) {
22539 for (var i = 0; i < touchList.length; i++) {
22540 if (touchList[i].identifier === this.touchStart.identifier) {
22541 return touchList[i];
22542 }
22543 }
22544 return null;
22545 };
22546 DragService.prototype.onCommonMove = function (currentEvent, startEvent, el) {
22547 if (!this.dragging) {
22548 // if mouse hasn't travelled from the start position enough, do nothing
22549 if (!this.dragging && this.isEventNearStartEvent(currentEvent, startEvent)) {
22550 return;
22551 }
22552 this.dragging = true;
22553 var event_1 = {
22554 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DRAG_STARTED,
22555 target: el
22556 };
22557 this.eventService.dispatchEvent(event_1);
22558 this.currentDragParams.onDragStart(startEvent);
22559 // we need ONE drag action at the startEvent, so that we are guaranteed the drop target
22560 // at the start gets notified. this is because the drag can start outside of the element
22561 // that started it, as the mouse is allowed drag away from the mouse down before it's
22562 // considered a drag (the isEventNearStartEvent() above). if we didn't do this, then
22563 // it would be possible to click a column by the edge, then drag outside of the drop zone
22564 // in less than 4 pixels and the drag officially starts outside of the header but the header
22565 // wouldn't be notified of the dragging.
22566 this.currentDragParams.onDragging(startEvent);
22567 }
22568 this.currentDragParams.onDragging(currentEvent);
22569 };
22570 DragService.prototype.onTouchMove = function (touchEvent, el) {
22571 var touch = this.getFirstActiveTouch(touchEvent.touches);
22572 if (!touch) {
22573 return;
22574 }
22575 // this.___statusPanel.setInfoText(Math.random() + ' onTouchMove preventDefault stopPropagation');
22576 this.onCommonMove(touch, this.touchStart, el);
22577 };
22578 // only gets called after a mouse down - as this is only added after mouseDown
22579 // and is removed when mouseUp happens
22580 DragService.prototype.onMouseMove = function (mouseEvent, el) {
22581 // when `isEnableCellTextSelect` is `true`, we need to preventDefault on mouseMove
22582 // to avoid the grid text being selected while dragging components.
22583 // Note: Safari also has an issue, where `user-select: none` is not being respected.
22584 if ((this.gridOptionsService.is('enableCellTextSelection') || Object(_utils_browser__WEBPACK_IMPORTED_MODULE_6__["isBrowserSafari"])()) &&
22585 // The event type can be `mousedown` when `dragStartPixels=0`
22586 // we should only preventDefault on `mousemove`.
22587 mouseEvent.type === 'mousemove' &&
22588 mouseEvent.cancelable &&
22589 this.mouseEventService.isEventFromThisGrid(mouseEvent) &&
22590 // we should not prevent mouseMove when above a form field
22591 // as that would prevent the text in the field from being selected
22592 !this.isOverFormFieldElement(mouseEvent)) {
22593 mouseEvent.preventDefault();
22594 }
22595 this.onCommonMove(mouseEvent, this.mouseStartEvent, el);
22596 };
22597 DragService.prototype.isOverFormFieldElement = function (mouseEvent) {
22598 var el = mouseEvent.target;
22599 var tagName = el === null || el === void 0 ? void 0 : el.tagName.toLocaleLowerCase();
22600 return !!(tagName === null || tagName === void 0 ? void 0 : tagName.match('^a$|textarea|input|select|button'));
22601 };
22602 DragService.prototype.onTouchUp = function (touchEvent, el) {
22603 var touch = this.getFirstActiveTouch(touchEvent.changedTouches);
22604 // i haven't worked this out yet, but there is no matching touch
22605 // when we get the touch up event. to get around this, we swap in
22606 // the last touch. this is a hack to 'get it working' while we
22607 // figure out what's going on, why we are not getting a touch in
22608 // current event.
22609 if (!touch) {
22610 touch = this.touchLastTime;
22611 }
22612 // if mouse was left up before we started to move, then this is a tap.
22613 // we check this before onUpCommon as onUpCommon resets the dragging
22614 // let tap = !this.dragging;
22615 // let tapTarget = this.currentDragParams.eElement;
22616 this.onUpCommon(touch, el);
22617 // if tap, tell user
22618 // console.log(`${Math.random()} tap = ${tap}`);
22619 // if (tap) {
22620 // tapTarget.click();
22621 // }
22622 };
22623 DragService.prototype.onMouseUp = function (mouseEvent, el) {
22624 this.onUpCommon(mouseEvent, el);
22625 };
22626 DragService.prototype.onUpCommon = function (eventOrTouch, el) {
22627 if (this.dragging) {
22628 this.dragging = false;
22629 this.currentDragParams.onDragStop(eventOrTouch);
22630 var event_2 = {
22631 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DRAG_STOPPED,
22632 target: el
22633 };
22634 this.eventService.dispatchEvent(event_2);
22635 }
22636 this.mouseStartEvent = null;
22637 this.touchStart = null;
22638 this.touchLastTime = null;
22639 this.currentDragParams = null;
22640 this.dragEndFunctions.forEach(function (func) { return func(); });
22641 this.dragEndFunctions.length = 0;
22642 };
22643 __decorate([
22644 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('loggerFactory')
22645 ], DragService.prototype, "loggerFactory", void 0);
22646 __decorate([
22647 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('mouseEventService')
22648 ], DragService.prototype, "mouseEventService", void 0);
22649 __decorate([
22650 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
22651 ], DragService.prototype, "init", null);
22652 __decorate([
22653 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
22654 ], DragService.prototype, "removeAllListeners", null);
22655 DragService = __decorate([
22656 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('dragService')
22657 ], DragService);
22658 return DragService;
22659}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
22660
22661
22662
22663/***/ }),
22664/* 110 */
22665/***/ (function(module, __webpack_exports__, __webpack_require__) {
22666
22667"use strict";
22668__webpack_require__.r(__webpack_exports__);
22669/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowHighlightPosition", function() { return RowHighlightPosition; });
22670/**
22671 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
22672 * @version v29.2.0
22673 * @link https://www.ag-grid.com/
22674 * @license MIT
22675 */
22676var RowHighlightPosition;
22677(function (RowHighlightPosition) {
22678 RowHighlightPosition[RowHighlightPosition["Above"] = 0] = "Above";
22679 RowHighlightPosition[RowHighlightPosition["Below"] = 1] = "Below";
22680})(RowHighlightPosition || (RowHighlightPosition = {}));
22681
22682
22683/***/ }),
22684/* 111 */
22685/***/ (function(module, __webpack_exports__, __webpack_require__) {
22686
22687"use strict";
22688__webpack_require__.r(__webpack_exports__);
22689/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterManager", function() { return FilterManager; });
22690/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39);
22691/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
22692/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
22693/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
22694/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15);
22695/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
22696/* harmony import */ var _utils_set__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(51);
22697/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
22698/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12);
22699/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(45);
22700/* harmony import */ var _components_framework_componentTypes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(106);
22701/* harmony import */ var _gridApi__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(112);
22702/**
22703 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
22704 * @version v29.2.0
22705 * @link https://www.ag-grid.com/
22706 * @license MIT
22707 */
22708var __extends = (undefined && undefined.__extends) || (function () {
22709 var extendStatics = function (d, b) {
22710 extendStatics = Object.setPrototypeOf ||
22711 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22712 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
22713 return extendStatics(d, b);
22714 };
22715 return function (d, b) {
22716 extendStatics(d, b);
22717 function __() { this.constructor = d; }
22718 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22719 };
22720})();
22721var __assign = (undefined && undefined.__assign) || function () {
22722 __assign = Object.assign || function(t) {
22723 for (var s, i = 1, n = arguments.length; i < n; i++) {
22724 s = arguments[i];
22725 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22726 t[p] = s[p];
22727 }
22728 return t;
22729 };
22730 return __assign.apply(this, arguments);
22731};
22732var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
22733 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22734 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
22735 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;
22736 return c > 3 && r && Object.defineProperty(target, key, r), r;
22737};
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750var FilterManager = /** @class */ (function (_super) {
22751 __extends(FilterManager, _super);
22752 function FilterManager() {
22753 var _this = _super !== null && _super.apply(this, arguments) || this;
22754 _this.allColumnFilters = new Map();
22755 _this.activeAggregateFilters = [];
22756 _this.activeColumnFilters = [];
22757 _this.quickFilter = null;
22758 _this.quickFilterParts = null;
22759 // this is true when the grid is processing the filter change. this is used by the cell comps, so that they
22760 // don't flash when data changes due to filter changes. there is no need to flash when filter changes as the
22761 // user is in control, so doesn't make sense to show flashing changes. for example, go to main demo where
22762 // this feature is turned off (hack code to always return false for isSuppressFlashingCellsBecauseFiltering(), put in)
22763 // 100,000 rows and group by country. then do some filtering. all the cells flash, which is silly.
22764 _this.processingFilterChange = false;
22765 return _this;
22766 }
22767 FilterManager_1 = FilterManager;
22768 FilterManager.prototype.init = function () {
22769 var _this = this;
22770 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_GRID_COLUMNS_CHANGED, function () { return _this.onColumnsChanged(); });
22771 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VALUE_CHANGED, function () { return _this.refreshFiltersForAggregations(); });
22772 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_CHANGED, function () { return _this.refreshFiltersForAggregations(); });
22773 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED, function () {
22774 _this.refreshFiltersForAggregations();
22775 _this.resetQuickFilterCache();
22776 });
22777 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_NEW_COLUMNS_LOADED, function () { return _this.resetQuickFilterCache(); });
22778 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, function () { return _this.resetQuickFilterCache(); });
22779 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_VISIBLE, function () {
22780 if (_this.gridOptionsService.is('excludeHiddenColumnsFromQuickFilter')) {
22781 _this.resetQuickFilterCache();
22782 }
22783 });
22784 this.addManagedPropertyListener('quickFilterText', function (e) { return _this.setQuickFilter(e.currentValue); });
22785 this.addManagedPropertyListener('excludeHiddenColumnsFromQuickFilter', function () { return _this.onExcludeHiddenColumnsFromQuickFilterChanged(); });
22786 this.quickFilter = this.parseQuickFilter(this.gridOptionsService.get('quickFilterText'));
22787 this.setQuickFilterParts();
22788 this.allowShowChangeAfterFilter = this.gridOptionsService.is('allowShowChangeAfterFilter');
22789 this.externalFilterPresent = this.isExternalFilterPresentCallback();
22790 };
22791 FilterManager.prototype.isExternalFilterPresentCallback = function () {
22792 var isFilterPresent = this.gridOptionsService.getCallback('isExternalFilterPresent');
22793 if (typeof isFilterPresent === 'function') {
22794 return isFilterPresent({});
22795 }
22796 return false;
22797 };
22798 FilterManager.prototype.doesExternalFilterPass = function (node) {
22799 var doesFilterPass = this.gridOptionsService.get('doesExternalFilterPass');
22800 if (typeof doesFilterPass === 'function') {
22801 return doesFilterPass(node);
22802 }
22803 return false;
22804 };
22805 FilterManager.prototype.setQuickFilterParts = function () {
22806 this.quickFilterParts = this.quickFilter ? this.quickFilter.split(' ') : null;
22807 };
22808 FilterManager.prototype.setFilterModel = function (model) {
22809 var _this = this;
22810 var allPromises = [];
22811 var previousModel = this.getFilterModel();
22812 if (model) {
22813 // mark the filters as we set them, so any active filters left over we stop
22814 var modelKeys_1 = Object(_utils_set__WEBPACK_IMPORTED_MODULE_6__["convertToSet"])(Object.keys(model));
22815 this.allColumnFilters.forEach(function (filterWrapper, colId) {
22816 var newModel = model[colId];
22817 allPromises.push(_this.setModelOnFilterWrapper(filterWrapper.filterPromise, newModel));
22818 modelKeys_1.delete(colId);
22819 });
22820 // at this point, processedFields contains data for which we don't have a filter working yet
22821 modelKeys_1.forEach(function (colId) {
22822 var column = _this.columnModel.getPrimaryColumn(colId) || _this.columnModel.getGridColumn(colId);
22823 if (!column) {
22824 console.warn('AG Grid: setFilterModel() - no column found for colId: ' + colId);
22825 return;
22826 }
22827 if (!column.isFilterAllowed()) {
22828 console.warn('AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: ' + colId);
22829 return;
22830 }
22831 var filterWrapper = _this.getOrCreateFilterWrapper(column, 'NO_UI');
22832 if (!filterWrapper) {
22833 console.warn('AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: ' + colId);
22834 return;
22835 }
22836 allPromises.push(_this.setModelOnFilterWrapper(filterWrapper.filterPromise, model[colId]));
22837 });
22838 }
22839 else {
22840 this.allColumnFilters.forEach(function (filterWrapper) {
22841 allPromises.push(_this.setModelOnFilterWrapper(filterWrapper.filterPromise, null));
22842 });
22843 }
22844 _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"].all(allPromises).then(function () {
22845 var currentModel = _this.getFilterModel();
22846 var columns = [];
22847 _this.allColumnFilters.forEach(function (filterWrapper, colId) {
22848 var before = previousModel ? previousModel[colId] : null;
22849 var after = currentModel ? currentModel[colId] : null;
22850 if (!_utils__WEBPACK_IMPORTED_MODULE_0__["_"].jsonEquals(before, after)) {
22851 columns.push(filterWrapper.column);
22852 }
22853 });
22854 if (columns.length > 0) {
22855 _this.onFilterChanged({ columns: columns });
22856 }
22857 });
22858 };
22859 FilterManager.prototype.setModelOnFilterWrapper = function (filterPromise, newModel) {
22860 return new _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"](function (resolve) {
22861 filterPromise.then(function (filter) {
22862 if (typeof filter.setModel !== 'function') {
22863 console.warn('AG Grid: filter missing setModel method, which is needed for setFilterModel');
22864 resolve();
22865 }
22866 (filter.setModel(newModel) || _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"].resolve()).then(function () { return resolve(); });
22867 });
22868 });
22869 };
22870 FilterManager.prototype.getFilterModel = function () {
22871 var result = {};
22872 this.allColumnFilters.forEach(function (filterWrapper, key) {
22873 // because user can provide filters, we provide useful error checking and messages
22874 var filterPromise = filterWrapper.filterPromise;
22875 var filter = filterPromise.resolveNow(null, function (promiseFilter) { return promiseFilter; });
22876 if (filter == null) {
22877 return null;
22878 }
22879 if (typeof filter.getModel !== 'function') {
22880 console.warn('AG Grid: filter API missing getModel method, which is needed for getFilterModel');
22881 return;
22882 }
22883 var model = filter.getModel();
22884 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(model)) {
22885 result[key] = model;
22886 }
22887 });
22888 return result;
22889 };
22890 FilterManager.prototype.isColumnFilterPresent = function () {
22891 return this.activeColumnFilters.length > 0;
22892 };
22893 FilterManager.prototype.isAggregateFilterPresent = function () {
22894 return !!this.activeAggregateFilters.length;
22895 };
22896 FilterManager.prototype.isExternalFilterPresent = function () {
22897 return this.externalFilterPresent;
22898 };
22899 FilterManager.prototype.doAggregateFiltersPass = function (node, filterToSkip) {
22900 return this.doColumnFiltersPass(node, filterToSkip, true);
22901 };
22902 // called by:
22903 // 1) onFilterChanged()
22904 // 2) onNewRowsLoaded()
22905 FilterManager.prototype.updateActiveFilters = function () {
22906 var _this = this;
22907 this.activeColumnFilters.length = 0;
22908 this.activeAggregateFilters.length = 0;
22909 var isFilterActive = function (filter) {
22910 if (!filter) {
22911 return false;
22912 } // this never happens, including to avoid compile error
22913 if (!filter.isFilterActive) {
22914 console.warn('AG Grid: Filter is missing isFilterActive() method');
22915 return false;
22916 }
22917 return filter.isFilterActive();
22918 };
22919 var groupFilterEnabled = !!this.gridOptionsService.getGroupAggFiltering();
22920 var isAggFilter = function (column) {
22921 var isSecondary = !column.isPrimary();
22922 // the only filters that can appear on secondary columns are groupAgg filters
22923 if (isSecondary) {
22924 return true;
22925 }
22926 var isShowingPrimaryColumns = !_this.columnModel.isPivotActive();
22927 var isValueActive = column.isValueActive();
22928 // primary columns are only ever groupAgg filters if a) value is active and b) showing primary columns
22929 if (!isValueActive || !isShowingPrimaryColumns) {
22930 return false;
22931 }
22932 // from here on we know: isPrimary=true, isValueActive=true, isShowingPrimaryColumns=true
22933 if (_this.columnModel.isPivotMode()) {
22934 // primary column is pretending to be a pivot column, ie pivotMode=true, but we are
22935 // still showing primary columns
22936 return true;
22937 }
22938 // we are not pivoting, so we groupFilter when it's an agg column
22939 return groupFilterEnabled;
22940 };
22941 this.allColumnFilters.forEach(function (filterWrapper) {
22942 if (filterWrapper.filterPromise.resolveNow(false, isFilterActive)) {
22943 var filterComp = filterWrapper.filterPromise.resolveNow(null, function (filter) { return filter; });
22944 if (isAggFilter(filterWrapper.column)) {
22945 _this.activeAggregateFilters.push(filterComp);
22946 }
22947 else {
22948 _this.activeColumnFilters.push(filterComp);
22949 }
22950 }
22951 });
22952 };
22953 FilterManager.prototype.updateFilterFlagInColumns = function (source, additionalEventAttributes) {
22954 this.allColumnFilters.forEach(function (filterWrapper) {
22955 var isFilterActive = filterWrapper.filterPromise.resolveNow(false, function (filter) { return filter.isFilterActive(); });
22956 filterWrapper.column.setFilterActive(isFilterActive, source, additionalEventAttributes);
22957 });
22958 };
22959 FilterManager.prototype.isAnyFilterPresent = function () {
22960 return this.isQuickFilterPresent() || this.isColumnFilterPresent() || this.isAggregateFilterPresent() || this.isExternalFilterPresent();
22961 };
22962 FilterManager.prototype.doColumnFiltersPass = function (node, filterToSkip, targetAggregates) {
22963 var data = node.data, aggData = node.aggData;
22964 var targetedFilters = targetAggregates ? this.activeAggregateFilters : this.activeColumnFilters;
22965 var targetedData = targetAggregates ? aggData : data;
22966 for (var i = 0; i < targetedFilters.length; i++) {
22967 var filter = targetedFilters[i];
22968 if (filter == null || filter === filterToSkip) {
22969 continue;
22970 }
22971 if (typeof filter.doesFilterPass !== 'function') {
22972 // because users can do custom filters, give nice error message
22973 throw new Error('Filter is missing method doesFilterPass');
22974 }
22975 if (!filter.doesFilterPass({ node: node, data: targetedData })) {
22976 return false;
22977 }
22978 }
22979 return true;
22980 };
22981 FilterManager.prototype.parseQuickFilter = function (newFilter) {
22982 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(newFilter)) {
22983 return null;
22984 }
22985 if (!this.gridOptionsService.isRowModelType('clientSide')) {
22986 console.warn('AG Grid - Quick filtering only works with the Client-Side Row Model');
22987 return null;
22988 }
22989 return newFilter.toUpperCase();
22990 };
22991 FilterManager.prototype.setQuickFilter = function (newFilter) {
22992 if (newFilter != null && typeof newFilter !== 'string') {
22993 console.warn("AG Grid - setQuickFilter() only supports string inputs, received: " + typeof newFilter);
22994 return;
22995 }
22996 var parsedFilter = this.parseQuickFilter(newFilter);
22997 if (this.quickFilter !== parsedFilter) {
22998 this.quickFilter = parsedFilter;
22999 this.setQuickFilterParts();
23000 this.onFilterChanged();
23001 }
23002 };
23003 FilterManager.prototype.resetQuickFilterCache = function () {
23004 this.rowModel.forEachNode(function (node) { return node.quickFilterAggregateText = null; });
23005 };
23006 FilterManager.prototype.onExcludeHiddenColumnsFromQuickFilterChanged = function () {
23007 this.columnModel.refreshQuickFilterColumns();
23008 this.resetQuickFilterCache();
23009 if (this.isQuickFilterPresent()) {
23010 this.onFilterChanged();
23011 }
23012 };
23013 FilterManager.prototype.refreshFiltersForAggregations = function () {
23014 var isAggFiltering = this.gridOptionsService.getGroupAggFiltering();
23015 if (isAggFiltering) {
23016 this.onFilterChanged();
23017 }
23018 };
23019 // sometimes (especially in React) the filter can call onFilterChanged when we are in the middle
23020 // of a render cycle. this would be bad, so we wait for render cycle to complete when this happens.
23021 // this happens in react when we change React State in the grid (eg setting RowCtrl's in RowContainer)
23022 // which results in React State getting applied in the main application, triggering a useEffect() to
23023 // be kicked off adn then the application calling the grid's API. in AG-6554, the custom filter was
23024 // getting it's useEffect() triggered in this way.
23025 FilterManager.prototype.callOnFilterChangedOutsideRenderCycle = function (params) {
23026 var _this = this;
23027 if (params === void 0) { params = {}; }
23028 var action = function () { return _this.onFilterChanged(params); };
23029 if (this.rowRenderer.isRefreshInProgress()) {
23030 setTimeout(action, 0);
23031 }
23032 else {
23033 action();
23034 }
23035 };
23036 FilterManager.prototype.onFilterChanged = function (params) {
23037 if (params === void 0) { params = {}; }
23038 var filterInstance = params.filterInstance, additionalEventAttributes = params.additionalEventAttributes, columns = params.columns;
23039 this.updateDependantFilters();
23040 this.updateActiveFilters();
23041 this.updateFilterFlagInColumns('filterChanged', additionalEventAttributes);
23042 this.externalFilterPresent = this.isExternalFilterPresentCallback();
23043 this.allColumnFilters.forEach(function (filterWrapper) {
23044 if (!filterWrapper.filterPromise) {
23045 return;
23046 }
23047 filterWrapper.filterPromise.then(function (filter) {
23048 if (filter && filter !== filterInstance && filter.onAnyFilterChanged) {
23049 filter.onAnyFilterChanged();
23050 }
23051 });
23052 });
23053 var filterChangedEvent = {
23054 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_FILTER_CHANGED,
23055 columns: columns || [],
23056 };
23057 if (additionalEventAttributes) {
23058 Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["mergeDeep"])(filterChangedEvent, additionalEventAttributes);
23059 }
23060 // because internal events are not async in ag-grid, when the dispatchEvent
23061 // method comes back, we know all listeners have finished executing.
23062 this.processingFilterChange = true;
23063 this.eventService.dispatchEvent(filterChangedEvent);
23064 this.processingFilterChange = false;
23065 };
23066 FilterManager.prototype.isSuppressFlashingCellsBecauseFiltering = function () {
23067 // if user has elected to always flash cell changes, then always return false, otherwise we suppress flashing
23068 // changes when filtering
23069 return !this.allowShowChangeAfterFilter && this.processingFilterChange;
23070 };
23071 FilterManager.prototype.isQuickFilterPresent = function () {
23072 return this.quickFilter !== null;
23073 };
23074 FilterManager.prototype.doesRowPassOtherFilters = function (filterToSkip, node) {
23075 return this.doesRowPassFilter({ rowNode: node, filterInstanceToSkip: filterToSkip });
23076 };
23077 FilterManager.prototype.doesRowPassQuickFilterNoCache = function (node, filterPart) {
23078 var _this = this;
23079 var columns = this.columnModel.getAllColumnsForQuickFilter();
23080 return columns.some(function (column) {
23081 var part = _this.getQuickFilterTextForColumn(column, node);
23082 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(part) && part.indexOf(filterPart) >= 0;
23083 });
23084 };
23085 FilterManager.prototype.doesRowPassQuickFilterCache = function (node, filterPart) {
23086 if (!node.quickFilterAggregateText) {
23087 this.aggregateRowForQuickFilter(node);
23088 }
23089 return node.quickFilterAggregateText.indexOf(filterPart) >= 0;
23090 };
23091 FilterManager.prototype.doesRowPassQuickFilter = function (node) {
23092 var _this = this;
23093 var usingCache = this.gridOptionsService.is('cacheQuickFilter');
23094 // each part must pass, if any fails, then the whole filter fails
23095 return this.quickFilterParts.every(function (part) {
23096 return usingCache ? _this.doesRowPassQuickFilterCache(node, part) : _this.doesRowPassQuickFilterNoCache(node, part);
23097 });
23098 };
23099 FilterManager.prototype.doesRowPassAggregateFilters = function (params) {
23100 if (this.isAggregateFilterPresent() && !this.doAggregateFiltersPass(params.rowNode, params.filterInstanceToSkip)) {
23101 return false;
23102 }
23103 // got this far, all filters pass
23104 return true;
23105 };
23106 FilterManager.prototype.doesRowPassFilter = function (params) {
23107 // the row must pass ALL of the filters, so if any of them fail,
23108 // we return true. that means if a row passes the quick filter,
23109 // but fails the column filter, it fails overall
23110 // first up, check quick filter
23111 if (this.isQuickFilterPresent() && !this.doesRowPassQuickFilter(params.rowNode)) {
23112 return false;
23113 }
23114 // secondly, give the client a chance to reject this row
23115 if (this.isExternalFilterPresent() && !this.doesExternalFilterPass(params.rowNode)) {
23116 return false;
23117 }
23118 // lastly, check column filter
23119 if (this.isColumnFilterPresent() && !this.doColumnFiltersPass(params.rowNode, params.filterInstanceToSkip)) {
23120 return false;
23121 }
23122 // got this far, all filters pass
23123 return true;
23124 };
23125 FilterManager.prototype.getQuickFilterTextForColumn = function (column, node) {
23126 var value = this.valueService.getValue(column, node, true);
23127 var colDef = column.getColDef();
23128 if (colDef.getQuickFilterText) {
23129 var params = {
23130 value: value,
23131 node: node,
23132 data: node.data,
23133 column: column,
23134 colDef: colDef,
23135 api: this.gridOptionsService.api,
23136 columnApi: this.gridOptionsService.columnApi,
23137 context: this.gridOptionsService.context
23138 };
23139 value = colDef.getQuickFilterText(params);
23140 }
23141 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(value) ? value.toString().toUpperCase() : null;
23142 };
23143 FilterManager.prototype.aggregateRowForQuickFilter = function (node) {
23144 var _this = this;
23145 var stringParts = [];
23146 var columns = this.columnModel.getAllColumnsForQuickFilter();
23147 columns.forEach(function (column) {
23148 var part = _this.getQuickFilterTextForColumn(column, node);
23149 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(part)) {
23150 stringParts.push(part);
23151 }
23152 });
23153 node.quickFilterAggregateText = stringParts.join(FilterManager_1.QUICK_FILTER_SEPARATOR);
23154 };
23155 FilterManager.prototype.onNewRowsLoaded = function (source) {
23156 this.allColumnFilters.forEach(function (filterWrapper) {
23157 filterWrapper.filterPromise.then(function (filter) {
23158 if (filter.onNewRowsLoaded) {
23159 filter.onNewRowsLoaded();
23160 }
23161 });
23162 });
23163 this.updateFilterFlagInColumns(source, { afterDataChange: true });
23164 this.updateActiveFilters();
23165 };
23166 FilterManager.prototype.createValueGetter = function (column) {
23167 var _this = this;
23168 return function (_a) {
23169 var node = _a.node;
23170 return _this.valueService.getValue(column, node, true);
23171 };
23172 };
23173 FilterManager.prototype.getFilterComponent = function (column, source, createIfDoesNotExist) {
23174 var _a;
23175 if (createIfDoesNotExist === void 0) { createIfDoesNotExist = true; }
23176 if (createIfDoesNotExist) {
23177 return ((_a = this.getOrCreateFilterWrapper(column, source)) === null || _a === void 0 ? void 0 : _a.filterPromise) || null;
23178 }
23179 var filterWrapper = this.cachedFilter(column);
23180 return filterWrapper ? filterWrapper.filterPromise : null;
23181 };
23182 FilterManager.prototype.isFilterActive = function (column) {
23183 var filterWrapper = this.cachedFilter(column);
23184 return !!filterWrapper && filterWrapper.filterPromise.resolveNow(false, function (filter) { return filter.isFilterActive(); });
23185 };
23186 FilterManager.prototype.getOrCreateFilterWrapper = function (column, source) {
23187 if (!column.isFilterAllowed()) {
23188 return null;
23189 }
23190 var filterWrapper = this.cachedFilter(column);
23191 if (!filterWrapper) {
23192 filterWrapper = this.createFilterWrapper(column, source);
23193 this.allColumnFilters.set(column.getColId(), filterWrapper);
23194 }
23195 else if (source !== 'NO_UI') {
23196 this.putIntoGui(filterWrapper, source);
23197 }
23198 return filterWrapper;
23199 };
23200 FilterManager.prototype.cachedFilter = function (column) {
23201 return this.allColumnFilters.get(column.getColId());
23202 };
23203 FilterManager.prototype.createFilterInstance = function (column) {
23204 var _this = this;
23205 var defaultFilter = _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_4__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].SetFilterModule) ? 'agSetColumnFilter' : 'agTextColumnFilter';
23206 var colDef = column.getColDef();
23207 var filterInstance;
23208 var params = __assign(__assign({}, this.createFilterParams(column, colDef)), { filterModifiedCallback: function () {
23209 var event = {
23210 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_FILTER_MODIFIED,
23211 column: column,
23212 filterInstance: filterInstance
23213 };
23214 _this.eventService.dispatchEvent(event);
23215 }, filterChangedCallback: function (additionalEventAttributes) {
23216 var params = { filterInstance: filterInstance, additionalEventAttributes: additionalEventAttributes, columns: [column] };
23217 _this.callOnFilterChangedOutsideRenderCycle(params);
23218 }, doesRowPassOtherFilter: function (node) { return _this.doesRowPassOtherFilters(filterInstance, node); } });
23219 var compDetails = this.userComponentFactory.getFilterDetails(colDef, params, defaultFilter);
23220 if (!compDetails) {
23221 return null;
23222 }
23223 var componentPromise = compDetails.newAgStackInstance();
23224 if (componentPromise) {
23225 componentPromise.then(function (r) { return filterInstance = r; });
23226 }
23227 return componentPromise;
23228 };
23229 FilterManager.prototype.createFilterParams = function (column, colDef) {
23230 var params = {
23231 column: column,
23232 colDef: Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["cloneObject"])(colDef),
23233 rowModel: this.rowModel,
23234 filterChangedCallback: function () { },
23235 filterModifiedCallback: function () { },
23236 valueGetter: this.createValueGetter(column),
23237 doesRowPassOtherFilter: function () { return true; },
23238 api: this.gridOptionsService.api,
23239 columnApi: this.gridOptionsService.columnApi,
23240 context: this.gridOptionsService.context,
23241 };
23242 return params;
23243 };
23244 FilterManager.prototype.createFilterWrapper = function (column, source) {
23245 var filterWrapper = {
23246 column: column,
23247 filterPromise: null,
23248 compiledElement: null,
23249 guiPromise: _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"].resolve(null)
23250 };
23251 filterWrapper.filterPromise = this.createFilterInstance(column);
23252 if (filterWrapper.filterPromise) {
23253 this.putIntoGui(filterWrapper, source);
23254 }
23255 return filterWrapper;
23256 };
23257 FilterManager.prototype.putIntoGui = function (filterWrapper, source) {
23258 var _this = this;
23259 var eFilterGui = document.createElement('div');
23260 eFilterGui.className = 'ag-filter';
23261 filterWrapper.guiPromise = new _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"](function (resolve) {
23262 filterWrapper.filterPromise.then(function (filter) {
23263 var guiFromFilter = filter.getGui();
23264 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_7__["exists"])(guiFromFilter)) {
23265 console.warn("AG Grid: getGui method from filter returned " + guiFromFilter + ", it should be a DOM element or an HTML template string.");
23266 }
23267 // for backwards compatibility with Angular 1 - we
23268 // used to allow providing back HTML from getGui().
23269 // once we move away from supporting Angular 1
23270 // directly, we can change this.
23271 if (typeof guiFromFilter === 'string') {
23272 guiFromFilter = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_9__["loadTemplate"])(guiFromFilter);
23273 }
23274 eFilterGui.appendChild(guiFromFilter);
23275 resolve(eFilterGui);
23276 var event = {
23277 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_FILTER_OPENED,
23278 column: filterWrapper.column,
23279 source: source,
23280 eGui: eFilterGui
23281 };
23282 _this.eventService.dispatchEvent(event);
23283 });
23284 });
23285 };
23286 FilterManager.prototype.onColumnsChanged = function () {
23287 var _this = this;
23288 var columns = [];
23289 this.allColumnFilters.forEach(function (wrapper, colId) {
23290 var currentColumn;
23291 if (wrapper.column.isPrimary()) {
23292 currentColumn = _this.columnModel.getPrimaryColumn(colId);
23293 }
23294 else {
23295 currentColumn = _this.columnModel.getGridColumn(colId);
23296 }
23297 if (currentColumn) {
23298 return;
23299 }
23300 columns.push(wrapper.column);
23301 _this.disposeFilterWrapper(wrapper, 'columnChanged');
23302 });
23303 if (columns.length > 0) {
23304 this.onFilterChanged({ columns: columns });
23305 }
23306 else {
23307 // onFilterChanged does this already
23308 this.updateDependantFilters();
23309 }
23310 };
23311 FilterManager.prototype.updateDependantFilters = function () {
23312 var _this = this;
23313 // Group column filters can be dependant on underlying column filters, but don't normally get created until they're used for the first time.
23314 // Instead, create them by default when any filter changes.
23315 var groupColumns = this.columnModel.getGroupAutoColumns();
23316 groupColumns === null || groupColumns === void 0 ? void 0 : groupColumns.forEach(function (groupColumn) {
23317 if (groupColumn.getColDef().filter === 'agGroupColumnFilter') {
23318 _this.getOrCreateFilterWrapper(groupColumn, 'NO_UI');
23319 }
23320 });
23321 };
23322 // for group filters, can change dynamically whether they are allowed or not
23323 FilterManager.prototype.isFilterAllowed = function (column) {
23324 var _a, _b;
23325 var isFilterAllowed = column.isFilterAllowed();
23326 if (!isFilterAllowed) {
23327 return false;
23328 }
23329 var filterWrapper = this.allColumnFilters.get(column.getColId());
23330 return (_b = (_a = filterWrapper === null || filterWrapper === void 0 ? void 0 : filterWrapper.filterPromise) === null || _a === void 0 ? void 0 : _a.resolveNow(true,
23331 // defer to filter component isFilterAllowed if it exists
23332 function (filter) {
23333 var _a, _b;
23334 return (typeof ((_a = filter) === null || _a === void 0 ? void 0 : _a.isFilterAllowed) === 'function')
23335 ? (_b = filter) === null || _b === void 0 ? void 0 : _b.isFilterAllowed() : true;
23336 })) !== null && _b !== void 0 ? _b : true;
23337 };
23338 FilterManager.prototype.getFloatingFilterCompDetails = function (column, showParentFilter) {
23339 var _this = this;
23340 var colDef = column.getColDef();
23341 var filterParams = this.createFilterParams(column, colDef);
23342 var finalFilterParams = this.userComponentFactory.mergeParamsWithApplicationProvidedParams(colDef, _components_framework_componentTypes__WEBPACK_IMPORTED_MODULE_10__["FilterComponent"], filterParams);
23343 var defaultFloatingFilterType = this.userComponentFactory.getDefaultFloatingFilterType(colDef);
23344 if (defaultFloatingFilterType == null) {
23345 defaultFloatingFilterType = 'agReadOnlyFloatingFilter';
23346 }
23347 var parentFilterInstance = function (callback) {
23348 var filterComponent = _this.getFilterComponent(column, 'NO_UI');
23349 if (filterComponent == null) {
23350 return;
23351 }
23352 filterComponent.then(function (instance) {
23353 callback(Object(_gridApi__WEBPACK_IMPORTED_MODULE_11__["unwrapUserComp"])(instance));
23354 });
23355 };
23356 var params = {
23357 column: column,
23358 filterParams: finalFilterParams,
23359 currentParentModel: function () { return _this.getCurrentFloatingFilterParentModel(column); },
23360 parentFilterInstance: parentFilterInstance,
23361 showParentFilter: showParentFilter,
23362 suppressFilterButton: false // This one might be overridden from the colDef
23363 };
23364 return this.userComponentFactory.getFloatingFilterCompDetails(colDef, params, defaultFloatingFilterType);
23365 };
23366 FilterManager.prototype.getCurrentFloatingFilterParentModel = function (column) {
23367 var filterComponent = this.getFilterComponent(column, 'NO_UI', false);
23368 return filterComponent ? filterComponent.resolveNow(null, function (filter) { return filter && filter.getModel(); }) : null;
23369 };
23370 // destroys the filter, so it no longer takes part
23371 /**
23372 * @param source if not calling this from the API, will need to add a new value
23373 */
23374 FilterManager.prototype.destroyFilter = function (column, source) {
23375 if (source === void 0) { source = 'api'; }
23376 var filterWrapper = this.allColumnFilters.get(column.getColId());
23377 if (filterWrapper) {
23378 this.disposeFilterWrapper(filterWrapper, source);
23379 this.onFilterChanged({ columns: [column] });
23380 }
23381 };
23382 FilterManager.prototype.disposeFilterWrapper = function (filterWrapper, source) {
23383 var _this = this;
23384 filterWrapper.filterPromise.then(function (filter) {
23385 (filter.setModel(null) || _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"].resolve()).then(function () {
23386 _this.getContext().destroyBean(filter);
23387 filterWrapper.column.setFilterActive(false, 'filterDestroyed');
23388 _this.allColumnFilters.delete(filterWrapper.column.getColId());
23389 var event = {
23390 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_FILTER_DESTROYED,
23391 source: source,
23392 column: filterWrapper.column,
23393 };
23394 _this.eventService.dispatchEvent(event);
23395 });
23396 });
23397 };
23398 FilterManager.prototype.destroy = function () {
23399 var _this = this;
23400 _super.prototype.destroy.call(this);
23401 this.allColumnFilters.forEach(function (filterWrapper) { return _this.disposeFilterWrapper(filterWrapper, 'gridDestroyed'); });
23402 };
23403 var FilterManager_1;
23404 FilterManager.QUICK_FILTER_SEPARATOR = '\n';
23405 __decorate([
23406 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('valueService')
23407 ], FilterManager.prototype, "valueService", void 0);
23408 __decorate([
23409 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
23410 ], FilterManager.prototype, "columnModel", void 0);
23411 __decorate([
23412 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowModel')
23413 ], FilterManager.prototype, "rowModel", void 0);
23414 __decorate([
23415 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('userComponentFactory')
23416 ], FilterManager.prototype, "userComponentFactory", void 0);
23417 __decorate([
23418 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowRenderer')
23419 ], FilterManager.prototype, "rowRenderer", void 0);
23420 __decorate([
23421 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
23422 ], FilterManager.prototype, "init", null);
23423 FilterManager = FilterManager_1 = __decorate([
23424 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('filterManager')
23425 ], FilterManager);
23426 return FilterManager;
23427}(_context_beanStub__WEBPACK_IMPORTED_MODULE_5__["BeanStub"]));
23428
23429
23430
23431/***/ }),
23432/* 112 */
23433/***/ (function(module, __webpack_exports__, __webpack_require__) {
23434
23435"use strict";
23436__webpack_require__.r(__webpack_exports__);
23437/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unwrapUserComp", function() { return unwrapUserComp; });
23438/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridApi", function() { return GridApi; });
23439/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
23440/* harmony import */ var _gridOptionsValidator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
23441/* harmony import */ var _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(113);
23442/* harmony import */ var _interfaces_iExcelCreator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(108);
23443/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
23444/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(15);
23445/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7);
23446/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12);
23447/**
23448 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
23449 * @version v29.2.0
23450 * @link https://www.ag-grid.com/
23451 * @license MIT
23452 */
23453var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
23454 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23455 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23456 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;
23457 return c > 3 && r && Object.defineProperty(target, key, r), r;
23458};
23459
23460
23461
23462
23463
23464
23465
23466
23467function unwrapUserComp(comp) {
23468 var compAsAny = comp;
23469 var isProxy = compAsAny != null && compAsAny.getFrameworkComponentInstance != null;
23470 return isProxy ? compAsAny.getFrameworkComponentInstance() : comp;
23471}
23472var GridApi = /** @class */ (function () {
23473 function GridApi() {
23474 this.detailGridInfoMap = {};
23475 this.destroyCalled = false;
23476 }
23477 GridApi.prototype.registerOverlayWrapperComp = function (overlayWrapperComp) {
23478 this.overlayWrapperComp = overlayWrapperComp;
23479 };
23480 GridApi.prototype.registerSideBarComp = function (sideBarComp) {
23481 this.sideBarComp = sideBarComp;
23482 };
23483 GridApi.prototype.init = function () {
23484 var _this = this;
23485 switch (this.rowModel.getType()) {
23486 case 'clientSide':
23487 this.clientSideRowModel = this.rowModel;
23488 break;
23489 case 'infinite':
23490 this.infiniteRowModel = this.rowModel;
23491 break;
23492 case 'serverSide':
23493 this.serverSideRowModel = this.rowModel;
23494 break;
23495 }
23496 this.ctrlsService.whenReady(function () {
23497 _this.gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();
23498 });
23499 };
23500 /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */
23501 GridApi.prototype.__getAlignedGridService = function () {
23502 return this.alignedGridsService;
23503 };
23504 /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */
23505 GridApi.prototype.__getContext = function () {
23506 return this.context;
23507 };
23508 GridApi.prototype.getSetterMethod = function (key) {
23509 return "set" + key.charAt(0).toUpperCase() + key.substring(1);
23510 };
23511 /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */
23512 GridApi.prototype.__setProperty = function (propertyName, value) {
23513 // Ensure the GridOptions property gets updated and fires the change event as we
23514 // cannot assume that the dynamic Api call will updated GridOptions.
23515 this.gridOptionsService.set(propertyName, value);
23516 // If the dynamic api does update GridOptions then change detection in the
23517 // GridOptionsService will prevent the event being fired twice.
23518 var setterName = this.getSetterMethod(propertyName);
23519 var dynamicApi = this;
23520 if (dynamicApi[setterName]) {
23521 dynamicApi[setterName](value);
23522 }
23523 };
23524 /** Register a detail grid with the master grid when it is created. */
23525 GridApi.prototype.addDetailGridInfo = function (id, gridInfo) {
23526 this.detailGridInfoMap[id] = gridInfo;
23527 };
23528 /** Unregister a detail grid from the master grid when it is destroyed. */
23529 GridApi.prototype.removeDetailGridInfo = function (id) {
23530 this.detailGridInfoMap[id] = undefined;
23531 };
23532 /** Returns the `DetailGridInfo` corresponding to the supplied `detailGridId`. */
23533 GridApi.prototype.getDetailGridInfo = function (id) {
23534 return this.detailGridInfoMap[id];
23535 };
23536 /** Iterates through each `DetailGridInfo` in the grid and calls the supplied callback on each. */
23537 GridApi.prototype.forEachDetailGridInfo = function (callback) {
23538 var index = 0;
23539 Object(_utils_object__WEBPACK_IMPORTED_MODULE_7__["iterateObject"])(this.detailGridInfoMap, function (id, gridInfo) {
23540 // check for undefined, as old references will still be lying around
23541 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["exists"])(gridInfo)) {
23542 callback(gridInfo, index);
23543 index++;
23544 }
23545 });
23546 };
23547 /** Similar to `exportDataAsCsv`, except returns the result as a string rather than download it. */
23548 GridApi.prototype.getDataAsCsv = function (params) {
23549 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].CsvExportModule, 'api.getDataAsCsv')) {
23550 return this.csvCreator.getDataAsCsv(params);
23551 }
23552 };
23553 /** Downloads a CSV export of the grid's data. */
23554 GridApi.prototype.exportDataAsCsv = function (params) {
23555 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].CsvExportModule, 'api.exportDataAsCSv')) {
23556 this.csvCreator.exportDataAsCsv(params);
23557 }
23558 };
23559 GridApi.prototype.getExcelExportMode = function (params) {
23560 var baseParams = this.gridOptionsService.get('defaultExcelExportParams');
23561 var mergedParams = Object.assign({ exportMode: 'xlsx' }, baseParams, params);
23562 return mergedParams.exportMode;
23563 };
23564 GridApi.prototype.assertNotExcelMultiSheet = function (method, params) {
23565 if (!_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].ExcelExportModule, 'api.' + method)) {
23566 return false;
23567 }
23568 var exportMode = this.getExcelExportMode(params);
23569 if (this.excelCreator.getFactoryMode(exportMode) === _interfaces_iExcelCreator__WEBPACK_IMPORTED_MODULE_3__["ExcelFactoryMode"].MULTI_SHEET) {
23570 console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'");
23571 return false;
23572 }
23573 return true;
23574 };
23575 /** 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. */
23576 GridApi.prototype.getDataAsExcel = function (params) {
23577 if (this.assertNotExcelMultiSheet('getDataAsExcel', params)) {
23578 return this.excelCreator.getDataAsExcel(params);
23579 }
23580 };
23581 /** Downloads an Excel export of the grid's data. */
23582 GridApi.prototype.exportDataAsExcel = function (params) {
23583 if (this.assertNotExcelMultiSheet('exportDataAsExcel', params)) {
23584 this.excelCreator.exportDataAsExcel(params);
23585 }
23586 };
23587 /** 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()`. */
23588 GridApi.prototype.getSheetDataForExcel = function (params) {
23589 if (!_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].ExcelExportModule, 'api.getSheetDataForExcel')) {
23590 return;
23591 }
23592 var exportMode = this.getExcelExportMode(params);
23593 this.excelCreator.setFactoryMode(_interfaces_iExcelCreator__WEBPACK_IMPORTED_MODULE_3__["ExcelFactoryMode"].MULTI_SHEET, exportMode);
23594 return this.excelCreator.getSheetDataForExcel(params);
23595 };
23596 /** 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. */
23597 GridApi.prototype.getMultipleSheetsAsExcel = function (params) {
23598 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].ExcelExportModule, 'api.getMultipleSheetsAsExcel')) {
23599 return this.excelCreator.getMultipleSheetsAsExcel(params);
23600 }
23601 };
23602 /** Downloads an Excel export of multiple sheets in one file. */
23603 GridApi.prototype.exportMultipleSheetsAsExcel = function (params) {
23604 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].ExcelExportModule, 'api.exportMultipleSheetsAsExcel')) {
23605 return this.excelCreator.exportMultipleSheetsAsExcel(params);
23606 }
23607 };
23608 /**
23609 * Sets an ARIA property in the grid panel (element with `role=\"grid\"`), and removes an ARIA property when the value is null.
23610 *
23611 * Example: `api.setGridAriaProperty('label', 'my grid')` will set `aria-label=\"my grid\"`.
23612 *
23613 * `api.setGridAriaProperty('label', null)` will remove the `aria-label` attribute from the grid element.
23614 */
23615 GridApi.prototype.setGridAriaProperty = function (property, value) {
23616 if (!property) {
23617 return;
23618 }
23619 var eGrid = this.ctrlsService.getGridBodyCtrl().getGui();
23620 var ariaProperty = "aria-" + property;
23621 if (value === null) {
23622 eGrid.removeAttribute(ariaProperty);
23623 }
23624 else {
23625 eGrid.setAttribute(ariaProperty, value);
23626 }
23627 };
23628 GridApi.prototype.logMissingRowModel = function (apiMethod) {
23629 var requiredRowModels = [];
23630 for (var _i = 1; _i < arguments.length; _i++) {
23631 requiredRowModels[_i - 1] = arguments[_i];
23632 }
23633 console.error("AG Grid: api." + apiMethod + " can only be called when gridOptions.rowModelType is " + requiredRowModels.join(' or '));
23634 };
23635 /** Set new datasource for Server-Side Row Model. */
23636 GridApi.prototype.setServerSideDatasource = function (datasource) {
23637 if (this.serverSideRowModel) {
23638 this.serverSideRowModel.setDatasource(datasource);
23639 }
23640 else {
23641 this.logMissingRowModel('setServerSideDatasource', 'serverSide');
23642 }
23643 };
23644 /**
23645 * Updates the `cacheBlockSize` when requesting data from the server if `suppressServerSideInfiniteScroll` is not enabled.
23646 *
23647 * Note this purges all the cached data and reloads all the rows of the grid.
23648 * */
23649 GridApi.prototype.setCacheBlockSize = function (blockSize) {
23650 if (this.serverSideRowModel) {
23651 this.gridOptionsService.set('cacheBlockSize', blockSize);
23652 this.serverSideRowModel.resetRootStore();
23653 }
23654 else {
23655 this.logMissingRowModel('setCacheBlockSize', 'serverSide');
23656 }
23657 };
23658 /** Set new datasource for Infinite Row Model. */
23659 GridApi.prototype.setDatasource = function (datasource) {
23660 if (this.gridOptionsService.isRowModelType('infinite')) {
23661 this.rowModel.setDatasource(datasource);
23662 }
23663 else {
23664 this.logMissingRowModel('setDatasource', 'infinite');
23665 }
23666 };
23667 /** Set new datasource for Viewport Row Model. */
23668 GridApi.prototype.setViewportDatasource = function (viewportDatasource) {
23669 if (this.gridOptionsService.isRowModelType('viewport')) {
23670 // this is bad coding, because it's using an interface that's exposed in the enterprise.
23671 // really we should create an interface in the core for viewportDatasource and let
23672 // the enterprise implement it, rather than casting to 'any' here
23673 this.rowModel.setViewportDatasource(viewportDatasource);
23674 }
23675 else {
23676 this.logMissingRowModel('setViewportDatasource', 'viewport');
23677 }
23678 };
23679 /** Set the row data. */
23680 GridApi.prototype.setRowData = function (rowData) {
23681 // immutable service is part of the CSRM module, if missing, no CSRM
23682 var missingImmutableService = this.immutableService == null;
23683 if (missingImmutableService) {
23684 this.logMissingRowModel('setRowData', 'clientSide');
23685 return;
23686 }
23687 // if no keys provided provided for rows, then we can tread the operation as Immutable
23688 if (this.immutableService.isActive()) {
23689 this.immutableService.setRowData(rowData);
23690 }
23691 else {
23692 this.selectionService.reset();
23693 this.clientSideRowModel.setRowData(rowData);
23694 }
23695 };
23696 /** Set the top pinned rows. Call with no rows / undefined to clear top pinned rows. */
23697 GridApi.prototype.setPinnedTopRowData = function (rows) {
23698 this.pinnedRowModel.setPinnedTopRowData(rows);
23699 };
23700 /** Set the bottom pinned rows. Call with no rows / undefined to clear bottom pinned rows. */
23701 GridApi.prototype.setPinnedBottomRowData = function (rows) {
23702 this.pinnedRowModel.setPinnedBottomRowData(rows);
23703 };
23704 /** Gets the number of top pinned rows. */
23705 GridApi.prototype.getPinnedTopRowCount = function () {
23706 return this.pinnedRowModel.getPinnedTopRowCount();
23707 };
23708 /** Gets the number of bottom pinned rows. */
23709 GridApi.prototype.getPinnedBottomRowCount = function () {
23710 return this.pinnedRowModel.getPinnedBottomRowCount();
23711 };
23712 /** Gets the top pinned row with the specified index. */
23713 GridApi.prototype.getPinnedTopRow = function (index) {
23714 return this.pinnedRowModel.getPinnedTopRow(index);
23715 };
23716 /** Gets the top pinned row with the specified index. */
23717 GridApi.prototype.getPinnedBottomRow = function (index) {
23718 return this.pinnedRowModel.getPinnedBottomRow(index);
23719 };
23720 /**
23721 * Call to set new column definitions. The grid will redraw all the column headers, and then redraw all of the rows.
23722 */
23723 GridApi.prototype.setColumnDefs = function (colDefs, source) {
23724 if (source === void 0) { source = "api"; }
23725 this.columnModel.setColumnDefs(colDefs, source);
23726 // Keep gridOptions.columnDefs in sync
23727 this.gridOptionsService.set('columnDefs', colDefs, true, { source: source });
23728 };
23729 /** Call to set new auto group column definition. The grid will recreate any auto-group columns if present. */
23730 GridApi.prototype.setAutoGroupColumnDef = function (colDef, source) {
23731 if (source === void 0) { source = "api"; }
23732 this.gridOptionsService.set('autoGroupColumnDef', colDef, true, { source: source });
23733 };
23734 /** Call to set new Default Column Definition. */
23735 GridApi.prototype.setDefaultColDef = function (colDef, source) {
23736 if (source === void 0) { source = "api"; }
23737 this.gridOptionsService.set('defaultColDef', colDef, true, { source: source });
23738 };
23739 /** Call to set new Column Types. */
23740 GridApi.prototype.setColumnTypes = function (columnTypes, source) {
23741 if (source === void 0) { source = "api"; }
23742 this.gridOptionsService.set('columnTypes', columnTypes, true, { source: source });
23743 };
23744 GridApi.prototype.expireValueCache = function () {
23745 this.valueCache.expire();
23746 };
23747 /**
23748 * Returns an object with two properties:
23749 * - `top`: The top pixel position of the current scroll in the grid
23750 * - `bottom`: The bottom pixel position of the current scroll in the grid
23751 */
23752 GridApi.prototype.getVerticalPixelRange = function () {
23753 return this.gridBodyCtrl.getScrollFeature().getVScrollPosition();
23754 };
23755 /**
23756 * Returns an object with two properties:
23757 * - `left`: The left pixel position of the current scroll in the grid
23758 * - `right`: The right pixel position of the current scroll in the grid
23759 */
23760 GridApi.prototype.getHorizontalPixelRange = function () {
23761 return this.gridBodyCtrl.getScrollFeature().getHScrollPosition();
23762 };
23763 /** If `true`, the horizontal scrollbar will always be present, even if not required. Otherwise, it will only be displayed when necessary. */
23764 GridApi.prototype.setAlwaysShowHorizontalScroll = function (show) {
23765 this.gridOptionsService.set('alwaysShowHorizontalScroll', show);
23766 };
23767 /** If `true`, the vertical scrollbar will always be present, even if not required. Otherwise it will only be displayed when necessary. */
23768 GridApi.prototype.setAlwaysShowVerticalScroll = function (show) {
23769 this.gridOptionsService.set('alwaysShowVerticalScroll', show);
23770 };
23771 /** Performs change detection on all cells, refreshing cells where required. */
23772 GridApi.prototype.refreshCells = function (params) {
23773 if (params === void 0) { params = {}; }
23774 this.rowRenderer.refreshCells(params);
23775 };
23776 /** Flash rows, columns or individual cells. */
23777 GridApi.prototype.flashCells = function (params) {
23778 if (params === void 0) { params = {}; }
23779 this.rowRenderer.flashCells(params);
23780 };
23781 /** Remove row(s) from the DOM and recreate them again from scratch. */
23782 GridApi.prototype.redrawRows = function (params) {
23783 if (params === void 0) { params = {}; }
23784 var rowNodes = params ? params.rowNodes : undefined;
23785 this.rowRenderer.redrawRows(rowNodes);
23786 };
23787 GridApi.prototype.setFunctionsReadOnly = function (readOnly) {
23788 this.gridOptionsService.set('functionsReadOnly', readOnly);
23789 };
23790 /** Redraws the header. Useful if a column name changes, or something else that changes how the column header is displayed. */
23791 GridApi.prototype.refreshHeader = function () {
23792 this.ctrlsService.getHeaderRowContainerCtrls().forEach(function (c) { return c.refresh(); });
23793 };
23794 /** Returns `true` if any filter is set. This includes quick filter, advanced filter or external filter. */
23795 GridApi.prototype.isAnyFilterPresent = function () {
23796 return this.filterManager.isAnyFilterPresent();
23797 };
23798 /** Returns `true` if any column filter is set, otherwise `false`. */
23799 GridApi.prototype.isColumnFilterPresent = function () {
23800 return this.filterManager.isColumnFilterPresent() || this.filterManager.isAggregateFilterPresent();
23801 };
23802 /** Returns `true` if the Quick Filter is set, otherwise `false`. */
23803 GridApi.prototype.isQuickFilterPresent = function () {
23804 return this.filterManager.isQuickFilterPresent();
23805 };
23806 /**
23807 * Returns the row model inside the table.
23808 * From here you can see the original rows, rows after filter has been applied,
23809 * rows after aggregation has been applied, and the final set of 'to be displayed' rows.
23810 */
23811 GridApi.prototype.getModel = function () {
23812 return this.rowModel;
23813 };
23814 /** Expand or collapse a specific row node, optionally expanding/collapsing all of its parent nodes. */
23815 GridApi.prototype.setRowNodeExpanded = function (rowNode, expanded, expandParents) {
23816 if (rowNode) {
23817 // expand all parents recursively, except root node.
23818 if (expandParents && rowNode.parent && rowNode.parent.level !== -1) {
23819 this.setRowNodeExpanded(rowNode.parent, expanded, expandParents);
23820 }
23821 rowNode.setExpanded(expanded);
23822 }
23823 };
23824 /**
23825 * Informs the grid that row group expanded state has changed and it needs to rerender the group nodes.
23826 * Typically called after updating the row node expanded state explicitly, i.e `rowNode.expanded = false`,
23827 * across multiple groups and you want to update the grid view in a single rerender instead of on every group change.
23828 */
23829 GridApi.prototype.onGroupExpandedOrCollapsed = function () {
23830 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missing"])(this.clientSideRowModel)) {
23831 this.logMissingRowModel('onGroupExpandedOrCollapsed', 'clientSide');
23832 return;
23833 }
23834 // we don't really want the user calling this if only one rowNode was expanded, instead they should be
23835 // calling rowNode.setExpanded(boolean) - this way we do a 'keepRenderedRows=false' so that the whole
23836 // grid gets refreshed again - otherwise the row with the rowNodes that were changed won't get updated,
23837 // and thus the expand icon in the group cell won't get 'opened' or 'closed'.
23838 this.clientSideRowModel.refreshModel({ step: _interfaces_iClientSideRowModel__WEBPACK_IMPORTED_MODULE_2__["ClientSideRowModelSteps"].MAP });
23839 };
23840 /**
23841 * Refresh the Client-Side Row Model, executing the grouping, filtering and sorting again.
23842 * Optionally provide the step you wish the refresh to apply from. Defaults to `everything`.
23843 */
23844 GridApi.prototype.refreshClientSideRowModel = function (step) {
23845 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missing"])(this.clientSideRowModel)) {
23846 this.logMissingRowModel('refreshClientSideRowModel', 'clientSide');
23847 return;
23848 }
23849 this.clientSideRowModel.refreshModel(step);
23850 };
23851 /** Returns `true` when there are no more animation frames left to process. */
23852 GridApi.prototype.isAnimationFrameQueueEmpty = function () {
23853 return this.animationFrameService.isQueueEmpty();
23854 };
23855 GridApi.prototype.flushAllAnimationFrames = function () {
23856 this.animationFrameService.flushAllFrames();
23857 };
23858 /**
23859 * Returns the row node with the given ID.
23860 * The row node ID is the one you provide from the callback `getRowId(params)`,
23861 * otherwise the ID is a number (cast as string) auto-generated by the grid when
23862 * the row data is set.
23863 */
23864 GridApi.prototype.getRowNode = function (id) {
23865 return this.rowModel.getRowNode(id);
23866 };
23867 /**
23868 * Gets the sizes that various UI elements will be rendered at with the current theme.
23869 * If you override the row or header height using `gridOptions`, the override value you provided will be returned.
23870 */
23871 GridApi.prototype.getSizesForCurrentTheme = function () {
23872 return {
23873 rowHeight: this.gridOptionsService.getRowHeightAsNumber(),
23874 headerHeight: this.columnModel.getHeaderHeight()
23875 };
23876 };
23877 /** Expand all groups. */
23878 GridApi.prototype.expandAll = function () {
23879 if (this.clientSideRowModel) {
23880 this.clientSideRowModel.expandOrCollapseAll(true);
23881 }
23882 else if (this.serverSideRowModel) {
23883 this.serverSideRowModel.expandAll(true);
23884 }
23885 else {
23886 this.logMissingRowModel('expandAll', 'clientSide', 'serverSide');
23887 }
23888 };
23889 /** Collapse all groups. */
23890 GridApi.prototype.collapseAll = function () {
23891 if (this.clientSideRowModel) {
23892 this.clientSideRowModel.expandOrCollapseAll(false);
23893 }
23894 else if (this.serverSideRowModel) {
23895 this.serverSideRowModel.expandAll(false);
23896 }
23897 else {
23898 this.logMissingRowModel('expandAll', 'clientSide', 'serverSide');
23899 }
23900 };
23901 /**
23902 * Registers a callback to a virtual row.
23903 * 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).
23904 * Unlike normal events, you do not need to unregister rendered row listeners.
23905 * When the rendered row is removed from the grid, all associated rendered row listeners will also be removed.
23906 * listen for this event if your `cellRenderer` needs to do cleanup when the row no longer exists.
23907 */
23908 GridApi.prototype.addRenderedRowListener = function (eventName, rowIndex, callback) {
23909 this.rowRenderer.addRenderedRowListener(eventName, rowIndex, callback);
23910 };
23911 /** Get the current Quick Filter text from the grid, or `undefined` if none is set. */
23912 GridApi.prototype.getQuickFilter = function () {
23913 return this.gridOptionsService.get('quickFilterText');
23914 };
23915 /** Pass a Quick Filter text into the grid for filtering. */
23916 GridApi.prototype.setQuickFilter = function (newFilter) {
23917 this.gridOptionsService.set('quickFilterText', newFilter);
23918 };
23919 /**
23920 * Updates the `excludeHiddenColumnsFromQuickFilter` grid option.
23921 * Set to `true` to exclude hidden columns from being checked by the Quick Filter (or `false` to include them).
23922 * This can give a significant performance improvement when there are a large number of hidden columns,
23923 * and you are only interested in filtering on what's visible.
23924 */
23925 GridApi.prototype.setExcludeHiddenColumnsFromQuickFilter = function (value) {
23926 this.gridOptionsService.set('excludeHiddenColumnsFromQuickFilter', value);
23927 };
23928 /**
23929 * Select all rows, regardless of filtering and rows that are not visible due to grouping being enabled and their groups not expanded.
23930 * @param source Source property that will appear in the `selectionChanged` event. Default: `'apiSelectAll'`
23931 */
23932 GridApi.prototype.selectAll = function (source) {
23933 if (source === void 0) { source = 'apiSelectAll'; }
23934 this.selectionService.selectAllRowNodes({ source: source });
23935 };
23936 /**
23937 * Clear all row selections, regardless of filtering.
23938 * @param source Source property that will appear in the `selectionChanged` event. Default: `'apiSelectAll'`
23939 */
23940 GridApi.prototype.deselectAll = function (source) {
23941 if (source === void 0) { source = 'apiSelectAll'; }
23942 this.selectionService.deselectAllRowNodes({ source: source });
23943 };
23944 /**
23945 * Select all filtered rows.
23946 * @param source Source property that will appear in the `selectionChanged` event. Default: `'apiSelectAllFiltered'`
23947 */
23948 GridApi.prototype.selectAllFiltered = function (source) {
23949 if (source === void 0) { source = 'apiSelectAllFiltered'; }
23950 this.selectionService.selectAllRowNodes({ source: source, justFiltered: true });
23951 };
23952 /**
23953 * Clear all filtered selections.
23954 * @param source Source property that will appear in the `selectionChanged` event. Default: `'apiSelectAllFiltered'`
23955 */
23956 GridApi.prototype.deselectAllFiltered = function (source) {
23957 if (source === void 0) { source = 'apiSelectAllFiltered'; }
23958 this.selectionService.deselectAllRowNodes({ source: source, justFiltered: true });
23959 };
23960 /**
23961 * Returns an object containing rules matching the selected rows in the SSRM.
23962 *
23963 * If `groupSelectsChildren=false` the returned object will be flat, and will conform to IServerSideSelectionState.
23964 * If `groupSelectsChildren=true` the retuned object will be hierarchical, and will conform to IServerSideGroupSelectionState.
23965 */
23966 GridApi.prototype.getServerSideSelectionState = function () {
23967 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missing"])(this.serverSideRowModel)) {
23968 this.logMissingRowModel('getServerSideSelectionState', 'serverSide');
23969 return null;
23970 }
23971 return this.selectionService.getServerSideSelectionState();
23972 };
23973 /**
23974 * Set the rules matching the selected rows in the SSRM.
23975 *
23976 * If `groupSelectsChildren=false` the param will be flat, and should conform to IServerSideSelectionState.
23977 * If `groupSelectsChildren=true` the param will be hierarchical, and should conform to IServerSideGroupSelectionState.
23978 */
23979 GridApi.prototype.setServerSideSelectionState = function (state) {
23980 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missing"])(this.serverSideRowModel)) {
23981 this.logMissingRowModel('setServerSideSelectionState', 'serverSide');
23982 return;
23983 }
23984 this.selectionService.setServerSideSelectionState(state);
23985 };
23986 /**
23987 * Select all rows on the current page.
23988 * @param source Source property that will appear in the `selectionChanged` event. Default: `'apiSelectAllCurrentPage'`
23989 */
23990 GridApi.prototype.selectAllOnCurrentPage = function (source) {
23991 if (source === void 0) { source = 'apiSelectAllCurrentPage'; }
23992 this.selectionService.selectAllRowNodes({ source: source, justCurrentPage: true });
23993 };
23994 /**
23995 * Clear all filtered on the current page.
23996 * @param source Source property that will appear in the `selectionChanged` event. Default: `'apiSelectAllCurrentPage'`
23997 */
23998 GridApi.prototype.deselectAllOnCurrentPage = function (source) {
23999 if (source === void 0) { source = 'apiSelectAllCurrentPage'; }
24000 this.selectionService.deselectAllRowNodes({ source: source, justCurrentPage: true });
24001 };
24002 /**
24003 * Sets columns to adjust in size to fit the grid horizontally.
24004 **/
24005 GridApi.prototype.sizeColumnsToFit = function (params) {
24006 this.gridBodyCtrl.sizeColumnsToFit(params);
24007 };
24008 /** Show the 'loading' overlay. */
24009 GridApi.prototype.showLoadingOverlay = function () {
24010 this.overlayWrapperComp.showLoadingOverlay();
24011 };
24012 /** Show the 'no rows' overlay. */
24013 GridApi.prototype.showNoRowsOverlay = function () {
24014 this.overlayWrapperComp.showNoRowsOverlay();
24015 };
24016 /** Hides the overlay if showing. */
24017 GridApi.prototype.hideOverlay = function () {
24018 this.overlayWrapperComp.hideOverlay();
24019 };
24020 /**
24021 * Returns an unsorted list of selected nodes.
24022 * Getting the underlying node (rather than the data) is useful when working with tree / aggregated data,
24023 * as the node can be traversed.
24024 */
24025 GridApi.prototype.getSelectedNodes = function () {
24026 return this.selectionService.getSelectedNodes();
24027 };
24028 /** Returns an unsorted list of selected rows (i.e. row data that you provided). */
24029 GridApi.prototype.getSelectedRows = function () {
24030 return this.selectionService.getSelectedRows();
24031 };
24032 /**
24033 * Returns a list of all selected nodes at 'best cost', a feature to be used with groups / trees.
24034 * If a group has all its children selected, then the group appears in the result, but not the children.
24035 * Designed for use with `'children'` as the group selection type, where groups don't actually appear in the selection normally.
24036 */
24037 GridApi.prototype.getBestCostNodeSelection = function () {
24038 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missing"])(this.clientSideRowModel)) {
24039 this.logMissingRowModel('getBestCostNodeSelection', 'clientSide');
24040 return;
24041 }
24042 return this.selectionService.getBestCostNodeSelection();
24043 };
24044 /** Retrieve rendered nodes. Due to virtualisation this will contain only the current visible rows and those in the buffer. */
24045 GridApi.prototype.getRenderedNodes = function () {
24046 return this.rowRenderer.getRenderedNodes();
24047 };
24048 /**
24049 * Ensures the column is visible by scrolling the table if needed.
24050 *
24051 * This will have no effect before the firstDataRendered event has fired.
24052 *
24053 * @param key - The column to ensure visible
24054 * @param position - Where the column will be positioned.
24055 * - `auto` - Scrolls the minimum amount to make sure the column is visible.
24056 * - `start` - Scrolls the column to the start of the viewport.
24057 * - `middle` - Scrolls the column to the middle of the viewport.
24058 * - `end` - Scrolls the column to the end of the viewport.
24059 */
24060 GridApi.prototype.ensureColumnVisible = function (key, position) {
24061 if (position === void 0) { position = 'auto'; }
24062 this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(key, position);
24063 };
24064 /**
24065 * Vertically scrolls the grid until the provided row index is inside the visible viewport.
24066 * If a position is provided, the grid will attempt to scroll until the row is at the given position within the viewport.
24067 * This will have no effect before the firstDataRendered event has fired.
24068 */
24069 GridApi.prototype.ensureIndexVisible = function (index, position) {
24070 this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(index, position);
24071 };
24072 /**
24073 * Vertically scrolls the grid until the provided row (or a row matching the provided comparator) is inside the visible viewport.
24074 * If a position is provided, the grid will attempt to scroll until the row is at the given position within the viewport.
24075 * This will have no effect before the firstDataRendered event has fired.
24076 */
24077 GridApi.prototype.ensureNodeVisible = function (nodeSelector, position) {
24078 if (position === void 0) { position = null; }
24079 this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(nodeSelector, position);
24080 };
24081 /**
24082 * Similar to `forEachNode`, except lists all the leaf nodes.
24083 * This effectively goes through all the data that you provided to the grid before the grid performed any grouping.
24084 * If using tree data, goes through all the nodes for the data you provided, including nodes that have children,
24085 * but excluding groups the grid created where gaps were missing in the hierarchy.
24086 */
24087 GridApi.prototype.forEachLeafNode = function (callback) {
24088 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missing"])(this.clientSideRowModel)) {
24089 this.logMissingRowModel('forEachLeafNode', 'clientSide');
24090 return;
24091 }
24092 this.clientSideRowModel.forEachLeafNode(callback);
24093 };
24094 /**
24095 * Iterates through each node (row) in the grid and calls the callback for each node.
24096 * This works similar to the `forEach` method on a JavaScript array.
24097 * This is called for every node, ignoring any filtering or sorting applied within the grid.
24098 * If using the Infinite Row Model, then this gets called for each page loaded in the page cache.
24099 */
24100 GridApi.prototype.forEachNode = function (callback, includeFooterNodes) {
24101 this.rowModel.forEachNode(callback, includeFooterNodes);
24102 };
24103 /** Similar to `forEachNode`, except skips any filtered out data. */
24104 GridApi.prototype.forEachNodeAfterFilter = function (callback) {
24105 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missing"])(this.clientSideRowModel)) {
24106 this.logMissingRowModel('forEachNodeAfterFilter', 'clientSide');
24107 return;
24108 }
24109 this.clientSideRowModel.forEachNodeAfterFilter(callback);
24110 };
24111 /** Similar to `forEachNodeAfterFilter`, except the callbacks are called in the order the rows are displayed in the grid. */
24112 GridApi.prototype.forEachNodeAfterFilterAndSort = function (callback) {
24113 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missing"])(this.clientSideRowModel)) {
24114 this.logMissingRowModel('forEachNodeAfterFilterAndSort', 'clientSide');
24115 return;
24116 }
24117 this.clientSideRowModel.forEachNodeAfterFilterAndSort(callback);
24118 };
24119 /**
24120 * Returns the filter component instance for a column.
24121 * `key` can be a string field name or a ColDef object (matches on object reference, useful if field names are not unique).
24122 * If your filter is created asynchronously, `getFilterInstance` will return `null` so you will need to use the `callback` to access the filter instance instead.
24123 */
24124 GridApi.prototype.getFilterInstance = function (key, callback) {
24125 var res = this.getFilterInstanceImpl(key, function (instance) {
24126 if (!callback) {
24127 return;
24128 }
24129 var unwrapped = unwrapUserComp(instance);
24130 callback(unwrapped);
24131 });
24132 var unwrapped = unwrapUserComp(res);
24133 return unwrapped;
24134 };
24135 GridApi.prototype.getFilterInstanceImpl = function (key, callback) {
24136 var column = this.columnModel.getPrimaryColumn(key);
24137 if (!column) {
24138 return undefined;
24139 }
24140 var filterPromise = this.filterManager.getFilterComponent(column, 'NO_UI');
24141 var currentValue = filterPromise && filterPromise.resolveNow(null, function (filterComp) { return filterComp; });
24142 if (currentValue) {
24143 setTimeout(callback, 0, currentValue);
24144 }
24145 else if (filterPromise) {
24146 filterPromise.then(function (comp) {
24147 callback(comp);
24148 });
24149 }
24150 return currentValue;
24151 };
24152 /** Destroys a filter. Useful to force a particular filter to be created from scratch again. */
24153 GridApi.prototype.destroyFilter = function (key) {
24154 var column = this.columnModel.getPrimaryColumn(key);
24155 if (column) {
24156 return this.filterManager.destroyFilter(column, 'api');
24157 }
24158 };
24159 /** Gets the status panel instance corresponding to the supplied `id`. */
24160 GridApi.prototype.getStatusPanel = function (key) {
24161 if (!_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].StatusBarModule, 'api.getStatusPanel')) {
24162 return;
24163 }
24164 var comp = this.statusBarService.getStatusPanel(key);
24165 return unwrapUserComp(comp);
24166 };
24167 GridApi.prototype.getColumnDef = function (key) {
24168 var column = this.columnModel.getPrimaryColumn(key);
24169 if (column) {
24170 return column.getColDef();
24171 }
24172 return null;
24173 };
24174 /**
24175 * Returns the current column definitions.
24176 */
24177 GridApi.prototype.getColumnDefs = function () { return this.columnModel.getColumnDefs(); };
24178 /** Informs the grid that a filter has changed. This is typically called after a filter change through one of the filter APIs. */
24179 GridApi.prototype.onFilterChanged = function () {
24180 this.filterManager.onFilterChanged();
24181 };
24182 /**
24183 * Gets the grid to act as if the sort was changed.
24184 * Useful if you update some values and want to get the grid to reorder them according to the new values.
24185 */
24186 GridApi.prototype.onSortChanged = function () {
24187 this.sortController.onSortChanged('api');
24188 };
24189 /** Sets the state of all the advanced filters. Provide it with what you get from `getFilterModel()` to restore filter state. */
24190 GridApi.prototype.setFilterModel = function (model) {
24191 this.filterManager.setFilterModel(model);
24192 };
24193 /** Gets the current state of all the advanced filters. Used for saving filter state. */
24194 GridApi.prototype.getFilterModel = function () {
24195 return this.filterManager.getFilterModel();
24196 };
24197 /** Returns the focused cell (or the last focused cell if the grid lost focus). */
24198 GridApi.prototype.getFocusedCell = function () {
24199 return this.focusService.getFocusedCell();
24200 };
24201 /** Clears the focused cell. */
24202 GridApi.prototype.clearFocusedCell = function () {
24203 return this.focusService.clearFocusedCell();
24204 };
24205 /** Sets the focus to the specified cell. `rowPinned` can be either 'top', 'bottom' or null (for not pinned). */
24206 GridApi.prototype.setFocusedCell = function (rowIndex, colKey, rowPinned) {
24207 this.focusService.setFocusedCell({ rowIndex: rowIndex, column: colKey, rowPinned: rowPinned, forceBrowserFocus: true });
24208 };
24209 /** Sets the `suppressRowDrag` property. */
24210 GridApi.prototype.setSuppressRowDrag = function (value) {
24211 this.gridOptionsService.set('suppressRowDrag', value);
24212 };
24213 /** Sets the `suppressMoveWhenRowDragging` property. */
24214 GridApi.prototype.setSuppressMoveWhenRowDragging = function (value) {
24215 this.gridOptionsService.set('suppressMoveWhenRowDragging', value);
24216 };
24217 /** Sets the `suppressRowClickSelection` property. */
24218 GridApi.prototype.setSuppressRowClickSelection = function (value) {
24219 this.gridOptionsService.set('suppressRowClickSelection', value);
24220 };
24221 /** Adds a drop zone outside of the grid where rows can be dropped. */
24222 GridApi.prototype.addRowDropZone = function (params) {
24223 this.gridBodyCtrl.getRowDragFeature().addRowDropZone(params);
24224 };
24225 /** Removes an external drop zone added by `addRowDropZone`. */
24226 GridApi.prototype.removeRowDropZone = function (params) {
24227 var activeDropTarget = this.dragAndDropService.findExternalZone(params);
24228 if (activeDropTarget) {
24229 this.dragAndDropService.removeDropTarget(activeDropTarget);
24230 }
24231 };
24232 /** Returns the `RowDropZoneParams` to be used by another grid's `addRowDropZone` method. */
24233 GridApi.prototype.getRowDropZoneParams = function (events) {
24234 return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(events);
24235 };
24236 /** Sets the height in pixels for the row containing the column label header. */
24237 GridApi.prototype.setHeaderHeight = function (headerHeight) {
24238 this.gridOptionsService.set('headerHeight', headerHeight);
24239 };
24240 /**
24241 * Switch between layout options: `normal`, `autoHeight`, `print`.
24242 * Defaults to `normal` if no domLayout provided.
24243 */
24244 GridApi.prototype.setDomLayout = function (domLayout) {
24245 this.gridOptionsService.set('domLayout', domLayout);
24246 };
24247 /** Sets the `enableCellTextSelection` property. */
24248 GridApi.prototype.setEnableCellTextSelection = function (selectable) {
24249 this.gridBodyCtrl.setCellTextSelection(selectable);
24250 };
24251 /** Sets the preferred direction for the selection fill handle. */
24252 GridApi.prototype.setFillHandleDirection = function (direction) {
24253 this.gridOptionsService.set('fillHandleDirection', direction);
24254 };
24255 /** Sets the height in pixels for the rows containing header column groups. */
24256 GridApi.prototype.setGroupHeaderHeight = function (headerHeight) {
24257 this.gridOptionsService.set('groupHeaderHeight', headerHeight);
24258 };
24259 /** Sets the height in pixels for the row containing the floating filters. */
24260 GridApi.prototype.setFloatingFiltersHeight = function (headerHeight) {
24261 this.gridOptionsService.set('floatingFiltersHeight', headerHeight);
24262 };
24263 /** Sets the height in pixels for the row containing the columns when in pivot mode. */
24264 GridApi.prototype.setPivotHeaderHeight = function (headerHeight) {
24265 this.gridOptionsService.set('pivotHeaderHeight', headerHeight);
24266 };
24267 /** Sets the height in pixels for the row containing header column groups when in pivot mode. */
24268 GridApi.prototype.setPivotGroupHeaderHeight = function (headerHeight) {
24269 this.gridOptionsService.set('pivotGroupHeaderHeight', headerHeight);
24270 };
24271 GridApi.prototype.setPivotMode = function (pivotMode) {
24272 this.columnModel.setPivotMode(pivotMode);
24273 };
24274 GridApi.prototype.setAnimateRows = function (animateRows) {
24275 this.gridOptionsService.set('animateRows', animateRows);
24276 };
24277 GridApi.prototype.setIsExternalFilterPresent = function (isExternalFilterPresentFunc) {
24278 this.gridOptionsService.set('isExternalFilterPresent', isExternalFilterPresentFunc);
24279 };
24280 GridApi.prototype.setDoesExternalFilterPass = function (doesExternalFilterPassFunc) {
24281 this.gridOptionsService.set('doesExternalFilterPass', doesExternalFilterPassFunc);
24282 };
24283 GridApi.prototype.setNavigateToNextCell = function (navigateToNextCellFunc) {
24284 this.gridOptionsService.set('navigateToNextCell', navigateToNextCellFunc);
24285 };
24286 GridApi.prototype.setTabToNextCell = function (tabToNextCellFunc) {
24287 this.gridOptionsService.set('tabToNextCell', tabToNextCellFunc);
24288 };
24289 GridApi.prototype.setTabToNextHeader = function (tabToNextHeaderFunc) {
24290 this.gridOptionsService.set('tabToNextHeader', tabToNextHeaderFunc);
24291 };
24292 GridApi.prototype.setNavigateToNextHeader = function (navigateToNextHeaderFunc) {
24293 this.gridOptionsService.set('navigateToNextHeader', navigateToNextHeaderFunc);
24294 };
24295 GridApi.prototype.setRowGroupPanelShow = function (rowGroupPanelShow) {
24296 this.gridOptionsService.set('rowGroupPanelShow', rowGroupPanelShow);
24297 };
24298 /** @deprecated v27.2 - Use `setGetGroupRowAgg` instead. */
24299 GridApi.prototype.setGroupRowAggNodes = function (groupRowAggNodesFunc) {
24300 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_1__["logDeprecation"])('27.2', 'setGroupRowAggNodes', 'setGetGroupRowAgg');
24301 this.gridOptionsService.set('groupRowAggNodes', groupRowAggNodesFunc);
24302 };
24303 GridApi.prototype.setGetGroupRowAgg = function (getGroupRowAggFunc) {
24304 this.gridOptionsService.set('getGroupRowAgg', getGroupRowAggFunc);
24305 };
24306 GridApi.prototype.setGetBusinessKeyForNode = function (getBusinessKeyForNodeFunc) {
24307 this.gridOptionsService.set('getBusinessKeyForNode', getBusinessKeyForNodeFunc);
24308 };
24309 GridApi.prototype.setGetChildCount = function (getChildCountFunc) {
24310 this.gridOptionsService.set('getChildCount', getChildCountFunc);
24311 };
24312 GridApi.prototype.setProcessRowPostCreate = function (processRowPostCreateFunc) {
24313 this.gridOptionsService.set('processRowPostCreate', processRowPostCreateFunc);
24314 };
24315 /** @deprecated v27.1 Use `setGetRowId` instead */
24316 GridApi.prototype.setGetRowNodeId = function (getRowNodeIdFunc) {
24317 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_1__["logDeprecation"])('27.1', 'setGetRowNodeId', 'setGetRowId');
24318 this.gridOptionsService.set('getRowNodeId', getRowNodeIdFunc);
24319 };
24320 GridApi.prototype.setGetRowId = function (getRowIdFunc) {
24321 this.gridOptionsService.set('getRowId', getRowIdFunc);
24322 };
24323 GridApi.prototype.setGetRowClass = function (rowClassFunc) {
24324 this.gridOptionsService.set('getRowClass', rowClassFunc);
24325 };
24326 /** @deprecated v27.2 Use `setIsFullWidthRow` instead. */
24327 GridApi.prototype.setIsFullWidthCell = function (isFullWidthCellFunc) {
24328 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_1__["logDeprecation"])('27.2', 'setIsFullWidthCell', 'setIsFullWidthRow');
24329 this.gridOptionsService.set('isFullWidthCell', isFullWidthCellFunc);
24330 };
24331 GridApi.prototype.setIsFullWidthRow = function (isFullWidthRowFunc) {
24332 this.gridOptionsService.set('isFullWidthRow', isFullWidthRowFunc);
24333 };
24334 GridApi.prototype.setIsRowSelectable = function (isRowSelectableFunc) {
24335 this.gridOptionsService.set('isRowSelectable', isRowSelectableFunc);
24336 };
24337 GridApi.prototype.setIsRowMaster = function (isRowMasterFunc) {
24338 this.gridOptionsService.set('isRowMaster', isRowMasterFunc);
24339 };
24340 /** @deprecated v27.2 Use `setPostSortRows` instead */
24341 GridApi.prototype.setPostSort = function (postSortFunc) {
24342 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_1__["logDeprecation"])('27.2', 'setPostSort', 'setPostSortRows');
24343 this.gridOptionsService.set('postSort', postSortFunc);
24344 };
24345 GridApi.prototype.setPostSortRows = function (postSortRowsFunc) {
24346 this.gridOptionsService.set('postSortRows', postSortRowsFunc);
24347 };
24348 GridApi.prototype.setGetDocument = function (getDocumentFunc) {
24349 this.gridOptionsService.set('getDocument', getDocumentFunc);
24350 };
24351 GridApi.prototype.setGetContextMenuItems = function (getContextMenuItemsFunc) {
24352 this.gridOptionsService.set('getContextMenuItems', getContextMenuItemsFunc);
24353 };
24354 GridApi.prototype.setGetMainMenuItems = function (getMainMenuItemsFunc) {
24355 this.gridOptionsService.set('getMainMenuItems', getMainMenuItemsFunc);
24356 };
24357 GridApi.prototype.setProcessCellForClipboard = function (processCellForClipboardFunc) {
24358 this.gridOptionsService.set('processCellForClipboard', processCellForClipboardFunc);
24359 };
24360 GridApi.prototype.setSendToClipboard = function (sendToClipboardFunc) {
24361 this.gridOptionsService.set('sendToClipboard', sendToClipboardFunc);
24362 };
24363 GridApi.prototype.setProcessCellFromClipboard = function (processCellFromClipboardFunc) {
24364 this.gridOptionsService.set('processCellFromClipboard', processCellFromClipboardFunc);
24365 };
24366 /** @deprecated v28 use `setProcessPivotResultColDef` instead */
24367 GridApi.prototype.setProcessSecondaryColDef = function (processSecondaryColDefFunc) {
24368 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_1__["logDeprecation"])('28.0', 'setProcessSecondaryColDef', 'setProcessPivotResultColDef');
24369 this.setProcessPivotResultColDef(processSecondaryColDefFunc);
24370 };
24371 /** @deprecated v28 use `setProcessPivotResultColGroupDef` instead */
24372 GridApi.prototype.setProcessSecondaryColGroupDef = function (processSecondaryColGroupDefFunc) {
24373 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_1__["logDeprecation"])('28.0', 'setProcessSecondaryColGroupDef', 'setProcessPivotResultColGroupDef');
24374 this.setProcessPivotResultColGroupDef(processSecondaryColGroupDefFunc);
24375 };
24376 GridApi.prototype.setProcessPivotResultColDef = function (processPivotResultColDefFunc) {
24377 this.gridOptionsService.set('processPivotResultColDef', processPivotResultColDefFunc);
24378 };
24379 GridApi.prototype.setProcessPivotResultColGroupDef = function (processPivotResultColGroupDefFunc) {
24380 this.gridOptionsService.set('processPivotResultColGroupDef', processPivotResultColGroupDefFunc);
24381 };
24382 GridApi.prototype.setPostProcessPopup = function (postProcessPopupFunc) {
24383 this.gridOptionsService.set('postProcessPopup', postProcessPopupFunc);
24384 };
24385 /** @deprecated v27.2 - Use `setInitialGroupOrderComparator` instead */
24386 GridApi.prototype.setDefaultGroupOrderComparator = function (defaultGroupOrderComparatorFunc) {
24387 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_1__["logDeprecation"])('27.2', 'setDefaultGroupOrderComparator', 'setInitialGroupOrderComparator');
24388 this.gridOptionsService.set('defaultGroupOrderComparator', defaultGroupOrderComparatorFunc);
24389 };
24390 GridApi.prototype.setInitialGroupOrderComparator = function (initialGroupOrderComparatorFunc) {
24391 this.gridOptionsService.set('initialGroupOrderComparator', initialGroupOrderComparatorFunc);
24392 };
24393 GridApi.prototype.setGetChartToolbarItems = function (getChartToolbarItemsFunc) {
24394 this.gridOptionsService.set('getChartToolbarItems', getChartToolbarItemsFunc);
24395 };
24396 GridApi.prototype.setPaginationNumberFormatter = function (paginationNumberFormatterFunc) {
24397 this.gridOptionsService.set('paginationNumberFormatter', paginationNumberFormatterFunc);
24398 };
24399 /** @deprecated v28 use setGetServerSideGroupLevelParams instead */
24400 GridApi.prototype.setGetServerSideStoreParams = function (getServerSideStoreParamsFunc) {
24401 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_1__["logDeprecation"])('28.0', 'setGetServerSideStoreParams', 'setGetServerSideGroupLevelParams');
24402 this.setGetServerSideGroupLevelParams(getServerSideStoreParamsFunc);
24403 };
24404 GridApi.prototype.setGetServerSideGroupLevelParams = function (getServerSideGroupLevelParamsFunc) {
24405 this.gridOptionsService.set('getServerSideGroupLevelParams', getServerSideGroupLevelParamsFunc);
24406 };
24407 GridApi.prototype.setIsServerSideGroupOpenByDefault = function (isServerSideGroupOpenByDefaultFunc) {
24408 this.gridOptionsService.set('isServerSideGroupOpenByDefault', isServerSideGroupOpenByDefaultFunc);
24409 };
24410 GridApi.prototype.setIsApplyServerSideTransaction = function (isApplyServerSideTransactionFunc) {
24411 this.gridOptionsService.set('isApplyServerSideTransaction', isApplyServerSideTransactionFunc);
24412 };
24413 GridApi.prototype.setIsServerSideGroup = function (isServerSideGroupFunc) {
24414 this.gridOptionsService.set('isServerSideGroup', isServerSideGroupFunc);
24415 };
24416 GridApi.prototype.setGetServerSideGroupKey = function (getServerSideGroupKeyFunc) {
24417 this.gridOptionsService.set('getServerSideGroupKey', getServerSideGroupKeyFunc);
24418 };
24419 GridApi.prototype.setGetRowStyle = function (rowStyleFunc) {
24420 this.gridOptionsService.set('getRowStyle', rowStyleFunc);
24421 };
24422 GridApi.prototype.setGetRowHeight = function (rowHeightFunc) {
24423 this.gridOptionsService.set('getRowHeight', rowHeightFunc);
24424 };
24425 GridApi.prototype.assertSideBarLoaded = function (apiMethod) {
24426 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].SideBarModule, 'api.' + apiMethod);
24427 };
24428 /** Returns `true` if the side bar is visible. */
24429 GridApi.prototype.isSideBarVisible = function () {
24430 return this.assertSideBarLoaded('isSideBarVisible') && this.sideBarComp.isDisplayed();
24431 };
24432 /** Show/hide the entire side bar, including any visible panel and the tab buttons. */
24433 GridApi.prototype.setSideBarVisible = function (show) {
24434 if (this.assertSideBarLoaded('setSideBarVisible')) {
24435 this.sideBarComp.setDisplayed(show);
24436 }
24437 };
24438 /** Sets the side bar position relative to the grid. Possible values are `'left'` or `'right'`. */
24439 GridApi.prototype.setSideBarPosition = function (position) {
24440 if (this.assertSideBarLoaded('setSideBarPosition')) {
24441 this.sideBarComp.setSideBarPosition(position);
24442 }
24443 };
24444 /** Opens a particular tool panel. Provide the ID of the tool panel to open. */
24445 GridApi.prototype.openToolPanel = function (key) {
24446 if (this.assertSideBarLoaded('openToolPanel')) {
24447 this.sideBarComp.openToolPanel(key, 'api');
24448 }
24449 };
24450 /** Closes the currently open tool panel (if any). */
24451 GridApi.prototype.closeToolPanel = function () {
24452 if (this.assertSideBarLoaded('closeToolPanel')) {
24453 this.sideBarComp.close('api');
24454 }
24455 };
24456 /** Returns the ID of the currently shown tool panel if any, otherwise `null`. */
24457 GridApi.prototype.getOpenedToolPanel = function () {
24458 if (this.assertSideBarLoaded('getOpenedToolPanel')) {
24459 return this.sideBarComp.openedItem();
24460 }
24461 return null;
24462 };
24463 /** Force refresh all tool panels by calling their `refresh` method. */
24464 GridApi.prototype.refreshToolPanel = function () {
24465 if (this.assertSideBarLoaded('refreshToolPanel')) {
24466 this.sideBarComp.refresh();
24467 }
24468 };
24469 /** Returns `true` if the tool panel is showing, otherwise `false`. */
24470 GridApi.prototype.isToolPanelShowing = function () {
24471 return this.assertSideBarLoaded('isToolPanelShowing') && this.sideBarComp.isToolPanelShowing();
24472 };
24473 /** Gets the tool panel instance corresponding to the supplied `id`. */
24474 GridApi.prototype.getToolPanelInstance = function (id) {
24475 if (this.assertSideBarLoaded('getToolPanelInstance')) {
24476 var comp = this.sideBarComp.getToolPanelInstance(id);
24477 return unwrapUserComp(comp);
24478 }
24479 };
24480 /** Returns the current side bar configuration. If a shortcut was used, returns the detailed long form. */
24481 GridApi.prototype.getSideBar = function () {
24482 if (this.assertSideBarLoaded('getSideBar')) {
24483 return this.sideBarComp.getDef();
24484 }
24485 return undefined;
24486 };
24487 /** 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. */
24488 GridApi.prototype.setSideBar = function (def) {
24489 this.gridOptionsService.set('sideBar', def);
24490 };
24491 GridApi.prototype.setSuppressClipboardPaste = function (value) {
24492 this.gridOptionsService.set('suppressClipboardPaste', value);
24493 };
24494 /** Tells the grid to recalculate the row heights. */
24495 GridApi.prototype.resetRowHeights = function () {
24496 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["exists"])(this.clientSideRowModel)) {
24497 if (this.columnModel.isAutoRowHeightActive()) {
24498 console.warn('AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.');
24499 return;
24500 }
24501 this.clientSideRowModel.resetRowHeights();
24502 }
24503 };
24504 GridApi.prototype.setGroupRemoveSingleChildren = function (value) {
24505 this.gridOptionsService.set('groupRemoveSingleChildren', value);
24506 };
24507 GridApi.prototype.setGroupRemoveLowestSingleChildren = function (value) {
24508 this.gridOptionsService.set('groupRemoveLowestSingleChildren', value);
24509 };
24510 GridApi.prototype.setGroupDisplayType = function (value) {
24511 this.gridOptionsService.set('groupDisplayType', value);
24512 };
24513 GridApi.prototype.setRowClass = function (className) {
24514 this.gridOptionsService.set('rowClass', className);
24515 };
24516 /** Sets the `deltaSort` property */
24517 GridApi.prototype.setDeltaSort = function (enable) {
24518 this.gridOptionsService.set('deltaSort', enable);
24519 };
24520 /**
24521 * Sets the `rowCount` and `lastRowIndexKnown` properties.
24522 * The second parameter, `lastRowIndexKnown`, is optional and if left out, only `rowCount` is set.
24523 * Set `rowCount` to adjust the height of the vertical scroll.
24524 * Set `lastRowIndexKnown` to enable / disable searching for more rows.
24525 * 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.
24526 */
24527 GridApi.prototype.setRowCount = function (rowCount, maxRowFound) {
24528 if (this.serverSideRowModel) {
24529 if (this.columnModel.isRowGroupEmpty()) {
24530 this.serverSideRowModel.setRowCount(rowCount, maxRowFound);
24531 return;
24532 }
24533 console.error('AG Grid: setRowCount cannot be used while using row grouping.');
24534 return;
24535 }
24536 if (this.infiniteRowModel) {
24537 this.infiniteRowModel.setRowCount(rowCount, maxRowFound);
24538 return;
24539 }
24540 this.logMissingRowModel('setRowCount', 'infinite', 'serverSide');
24541 };
24542 /** Tells the grid a row height has changed. To be used after calling `rowNode.setRowHeight(newHeight)`. */
24543 GridApi.prototype.onRowHeightChanged = function () {
24544 if (this.clientSideRowModel) {
24545 this.clientSideRowModel.onRowHeightChanged();
24546 }
24547 else if (this.serverSideRowModel) {
24548 this.serverSideRowModel.onRowHeightChanged();
24549 }
24550 };
24551 /**
24552 * Gets the value for a column for a particular `rowNode` (row).
24553 * This is useful if you want the raw value of a cell e.g. if implementing your own CSV export.
24554 */
24555 GridApi.prototype.getValue = function (colKey, rowNode) {
24556 var column = this.columnModel.getPrimaryColumn(colKey);
24557 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missing"])(column)) {
24558 column = this.columnModel.getGridColumn(colKey);
24559 }
24560 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missing"])(column)) {
24561 return null;
24562 }
24563 return this.valueService.getValue(column, rowNode);
24564 };
24565 /** Add an event listener for the specified `eventType`. Works similar to `addEventListener` for a browser DOM element. */
24566 GridApi.prototype.addEventListener = function (eventType, listener) {
24567 var async = this.gridOptionsService.useAsyncEvents();
24568 this.eventService.addEventListener(eventType, listener, async);
24569 };
24570 /** Add an event listener for all event types coming from the grid. */
24571 GridApi.prototype.addGlobalListener = function (listener) {
24572 var async = this.gridOptionsService.useAsyncEvents();
24573 this.eventService.addGlobalListener(listener, async);
24574 };
24575 /** Remove an event listener. */
24576 GridApi.prototype.removeEventListener = function (eventType, listener) {
24577 var async = this.gridOptionsService.useAsyncEvents();
24578 this.eventService.removeEventListener(eventType, listener, async);
24579 };
24580 /** Remove a global event listener. */
24581 GridApi.prototype.removeGlobalListener = function (listener) {
24582 var async = this.gridOptionsService.useAsyncEvents();
24583 this.eventService.removeGlobalListener(listener, async);
24584 };
24585 GridApi.prototype.dispatchEvent = function (event) {
24586 this.eventService.dispatchEvent(event);
24587 };
24588 /** 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. */
24589 GridApi.prototype.destroy = function () {
24590 // this is needed as GridAPI is a bean, and GridAPI.destroy() is called as part
24591 // of context.destroy(). so we need to stop the infinite loop.
24592 if (this.destroyCalled) {
24593 return;
24594 }
24595 this.destroyCalled = true;
24596 // destroy the UI first (as they use the services)
24597 var gridCtrl = this.ctrlsService.getGridCtrl();
24598 if (gridCtrl) {
24599 gridCtrl.destroyGridUi();
24600 }
24601 // destroy the services
24602 this.context.destroy();
24603 };
24604 GridApi.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid = function () {
24605 // some users were raising support issues with regards memory leaks. the problem was the customers applications
24606 // were keeping references to the API. trying to educate them all would be difficult, easier to just remove
24607 // all references in the API so at least the core grid can be garbage collected.
24608 //
24609 // wait about 100ms before clearing down the references, in case user has some cleanup to do,
24610 // and needs to deference the API first
24611 setTimeout(_utils_object__WEBPACK_IMPORTED_MODULE_7__["removeAllReferences"].bind(window, this, 'Grid API'), 100);
24612 };
24613 GridApi.prototype.warnIfDestroyed = function (methodName) {
24614 if (this.destroyCalled) {
24615 console.warn("AG Grid: Grid API method " + methodName + " was called on a grid that was destroyed.");
24616 }
24617 return this.destroyCalled;
24618 };
24619 /** Reset the Quick Filter cache text on every rowNode. */
24620 GridApi.prototype.resetQuickFilter = function () {
24621 if (this.warnIfDestroyed('resetQuickFilter')) {
24622 return;
24623 }
24624 this.filterManager.resetQuickFilterCache();
24625 };
24626 /** Returns the list of selected cell ranges. */
24627 GridApi.prototype.getCellRanges = function () {
24628 if (this.rangeService) {
24629 return this.rangeService.getCellRanges();
24630 }
24631 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].RangeSelectionModule, 'api.getCellRanges');
24632 return null;
24633 };
24634 /** Adds the provided cell range to the selected ranges. */
24635 GridApi.prototype.addCellRange = function (params) {
24636 if (this.rangeService) {
24637 this.rangeService.addCellRange(params);
24638 return;
24639 }
24640 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].RangeSelectionModule, 'api.addCellRange');
24641 };
24642 /** Clears the selected ranges. */
24643 GridApi.prototype.clearRangeSelection = function () {
24644 if (this.rangeService) {
24645 this.rangeService.removeAllCellRanges();
24646 }
24647 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].RangeSelectionModule, 'gridApi.clearRangeSelection');
24648 };
24649 /** Reverts the last cell edit. */
24650 GridApi.prototype.undoCellEditing = function () {
24651 this.undoRedoService.undo('api');
24652 };
24653 /** Re-applies the most recently undone cell edit. */
24654 GridApi.prototype.redoCellEditing = function () {
24655 this.undoRedoService.redo('api');
24656 };
24657 /** Returns current number of available cell edit undo operations. */
24658 GridApi.prototype.getCurrentUndoSize = function () {
24659 return this.undoRedoService.getCurrentUndoStackSize();
24660 };
24661 /** Returns current number of available cell edit redo operations. */
24662 GridApi.prototype.getCurrentRedoSize = function () {
24663 return this.undoRedoService.getCurrentRedoStackSize();
24664 };
24665 /** Returns a list of models with information about the charts that are currently rendered from the grid. */
24666 GridApi.prototype.getChartModels = function () {
24667 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].GridChartsModule, 'api.getChartModels')) {
24668 return this.chartService.getChartModels();
24669 }
24670 };
24671 /** Returns the `ChartRef` using the supplied `chartId`. */
24672 GridApi.prototype.getChartRef = function (chartId) {
24673 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].GridChartsModule, 'api.getChartRef')) {
24674 return this.chartService.getChartRef(chartId);
24675 }
24676 };
24677 /** Returns a base64-encoded image data URL for the referenced chartId. */
24678 GridApi.prototype.getChartImageDataURL = function (params) {
24679 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].GridChartsModule, 'api.getChartImageDataURL')) {
24680 return this.chartService.getChartImageDataURL(params);
24681 }
24682 };
24683 /** Starts a browser-based image download for the referenced chartId. */
24684 GridApi.prototype.downloadChart = function (params) {
24685 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].GridChartsModule, 'api.downloadChart')) {
24686 return this.chartService.downloadChart(params);
24687 }
24688 };
24689 /** Open the Chart Tool Panel. */
24690 GridApi.prototype.openChartToolPanel = function (params) {
24691 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].GridChartsModule, 'api.openChartToolPanel')) {
24692 return this.chartService.openChartToolPanel(params);
24693 }
24694 };
24695 /** Close the Chart Tool Panel. */
24696 GridApi.prototype.closeChartToolPanel = function (params) {
24697 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].GridChartsModule, 'api.closeChartToolPanel')) {
24698 return this.chartService.closeChartToolPanel(params.chartId);
24699 }
24700 };
24701 /** Used to programmatically create charts from a range. */
24702 GridApi.prototype.createRangeChart = function (params) {
24703 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].GridChartsModule, 'api.createRangeChart')) {
24704 return this.chartService.createRangeChart(params);
24705 }
24706 };
24707 /** Used to programmatically create cross filter charts from a range. */
24708 GridApi.prototype.createCrossFilterChart = function (params) {
24709 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].GridChartsModule, 'api.createCrossFilterChart')) {
24710 return this.chartService.createCrossFilterChart(params);
24711 }
24712 };
24713 /** Restores a chart using the `ChartModel` that was previously obtained from `getChartModels()`. */
24714 GridApi.prototype.restoreChart = function (chartModel, chartContainer) {
24715 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].GridChartsModule, 'api.restoreChart')) {
24716 return this.chartService.restoreChart(chartModel, chartContainer);
24717 }
24718 };
24719 /** Used to programmatically create pivot charts from a grid. */
24720 GridApi.prototype.createPivotChart = function (params) {
24721 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].GridChartsModule, 'api.createPivotChart')) {
24722 return this.chartService.createPivotChart(params);
24723 }
24724 };
24725 /** Copies data to clipboard by following the same rules as pressing Ctrl+C. */
24726 GridApi.prototype.copyToClipboard = function (params) {
24727 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].ClipboardModule, 'api.copyToClipboard')) {
24728 this.clipboardService.copyToClipboard(params);
24729 }
24730 };
24731 /** Cuts data to clipboard by following the same rules as pressing Ctrl+X. */
24732 GridApi.prototype.cutToClipboard = function (params) {
24733 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].ClipboardModule, 'api.cutToClipboard')) {
24734 this.clipboardService.cutToClipboard(params);
24735 }
24736 };
24737 /** Copies the selected rows to the clipboard. */
24738 GridApi.prototype.copySelectedRowsToClipboard = function (params) {
24739 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].ClipboardModule, 'api.copySelectedRowsToClipboard')) {
24740 this.clipboardService.copySelectedRowsToClipboard(params);
24741 }
24742 };
24743 /** Copies the selected ranges to the clipboard. */
24744 GridApi.prototype.copySelectedRangeToClipboard = function (params) {
24745 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].ClipboardModule, 'api.copySelectedRangeToClipboard')) {
24746 this.clipboardService.copySelectedRangeToClipboard(params);
24747 }
24748 };
24749 /** Copies the selected range down, similar to `Ctrl + D` in Excel. */
24750 GridApi.prototype.copySelectedRangeDown = function () {
24751 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_5__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_4__["ModuleNames"].ClipboardModule, 'api.copySelectedRangeDown')) {
24752 this.clipboardService.copyRangeDown();
24753 }
24754 };
24755 /** Shows the column menu after and positions it relative to the provided button element. Use in conjunction with your own header template. */
24756 GridApi.prototype.showColumnMenuAfterButtonClick = function (colKey, buttonElement) {
24757 // use grid column so works with pivot mode
24758 var column = this.columnModel.getGridColumn(colKey);
24759 this.menuFactory.showMenuAfterButtonClick(column, buttonElement, 'columnMenu');
24760 };
24761 /** Shows the column menu after and positions it relative to the mouse event. Use in conjunction with your own header template. */
24762 GridApi.prototype.showColumnMenuAfterMouseClick = function (colKey, mouseEvent) {
24763 // use grid column so works with pivot mode
24764 var column = this.columnModel.getGridColumn(colKey);
24765 if (!column) {
24766 column = this.columnModel.getPrimaryColumn(colKey);
24767 }
24768 if (!column) {
24769 console.error("AG Grid: column '" + colKey + "' not found");
24770 return;
24771 }
24772 this.menuFactory.showMenuAfterMouseEvent(column, mouseEvent);
24773 };
24774 /** Hides any visible context menu or column menu. */
24775 GridApi.prototype.hidePopupMenu = function () {
24776 // hide the context menu if in enterprise
24777 if (this.contextMenuFactory) {
24778 this.contextMenuFactory.hideActiveMenu();
24779 }
24780 // and hide the column menu always
24781 this.menuFactory.hideActiveMenu();
24782 };
24783 /** DOM element to use as the popup parent for grid popups (context menu, column menu etc). */
24784 GridApi.prototype.setPopupParent = function (ePopupParent) {
24785 this.gridOptionsService.set('popupParent', ePopupParent);
24786 };
24787 /** Navigates the grid focus to the next cell, as if tabbing. */
24788 GridApi.prototype.tabToNextCell = function (event) {
24789 return this.navigationService.tabToNextCell(false, event);
24790 };
24791 /** Navigates the grid focus to the previous cell, as if shift-tabbing. */
24792 GridApi.prototype.tabToPreviousCell = function (event) {
24793 return this.navigationService.tabToNextCell(true, event);
24794 };
24795 /** Returns the list of active cell renderer instances. */
24796 GridApi.prototype.getCellRendererInstances = function (params) {
24797 if (params === void 0) { params = {}; }
24798 var res = this.rowRenderer.getCellRendererInstances(params);
24799 var unwrapped = res.map(unwrapUserComp);
24800 return unwrapped;
24801 };
24802 /** Returns the list of active cell editor instances. Optionally provide parameters to restrict to certain columns / row nodes. */
24803 GridApi.prototype.getCellEditorInstances = function (params) {
24804 if (params === void 0) { params = {}; }
24805 var res = this.rowRenderer.getCellEditorInstances(params);
24806 var unwrapped = res.map(unwrapUserComp);
24807 return unwrapped;
24808 };
24809 /** If the grid is editing, returns back details of the editing cell(s). */
24810 GridApi.prototype.getEditingCells = function () {
24811 return this.rowRenderer.getEditingCells();
24812 };
24813 /** If a cell is editing, it stops the editing. Pass `true` if you want to cancel the editing (i.e. don't accept changes). */
24814 GridApi.prototype.stopEditing = function (cancel) {
24815 if (cancel === void 0) { cancel = false; }
24816 this.rowRenderer.stopEditing(cancel);
24817 };
24818 /** Start editing the provided cell. If another cell is editing, the editing will be stopped in that other cell. */
24819 GridApi.prototype.startEditingCell = function (params) {
24820 var column = this.columnModel.getGridColumn(params.colKey);
24821 if (!column) {
24822 console.warn("AG Grid: no column found for " + params.colKey);
24823 return;
24824 }
24825 var cellPosition = {
24826 rowIndex: params.rowIndex,
24827 rowPinned: params.rowPinned || null,
24828 column: column
24829 };
24830 var notPinned = params.rowPinned == null;
24831 if (notPinned) {
24832 this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(params.rowIndex);
24833 }
24834 var cell = this.navigationService.getCellByPosition(cellPosition);
24835 if (!cell) {
24836 return;
24837 }
24838 cell.startRowOrCellEdit(params.key, params.charPress);
24839 };
24840 /** Add an aggregation function with the specified key. */
24841 GridApi.prototype.addAggFunc = function (key, aggFunc) {
24842 if (this.aggFuncService) {
24843 this.aggFuncService.addAggFunc(key, aggFunc);
24844 }
24845 };
24846 /** Add aggregations function with the specified keys. */
24847 GridApi.prototype.addAggFuncs = function (aggFuncs) {
24848 if (this.aggFuncService) {
24849 this.aggFuncService.addAggFuncs(aggFuncs);
24850 }
24851 };
24852 /** Clears all aggregation functions (including those provided by the grid). */
24853 GridApi.prototype.clearAggFuncs = function () {
24854 if (this.aggFuncService) {
24855 this.aggFuncService.clear();
24856 }
24857 };
24858 /** Apply transactions to the server side row model. */
24859 GridApi.prototype.applyServerSideTransaction = function (transaction) {
24860 if (!this.serverSideTransactionManager) {
24861 this.logMissingRowModel('applyServerSideTransaction', 'serverSide');
24862 return;
24863 }
24864 return this.serverSideTransactionManager.applyTransaction(transaction);
24865 };
24866 /** Batch apply transactions to the server side row model. */
24867 GridApi.prototype.applyServerSideTransactionAsync = function (transaction, callback) {
24868 if (!this.serverSideTransactionManager) {
24869 this.logMissingRowModel('applyServerSideTransactionAsync', 'serverSide');
24870 return;
24871 }
24872 return this.serverSideTransactionManager.applyTransactionAsync(transaction, callback);
24873 };
24874 /** Gets all failed server side loads to retry. */
24875 GridApi.prototype.retryServerSideLoads = function () {
24876 if (!this.serverSideRowModel) {
24877 this.logMissingRowModel('retryServerSideLoads', 'serverSide');
24878 return;
24879 }
24880 this.serverSideRowModel.retryLoads();
24881 };
24882 GridApi.prototype.flushServerSideAsyncTransactions = function () {
24883 if (!this.serverSideTransactionManager) {
24884 this.logMissingRowModel('flushServerSideAsyncTransactions', 'serverSide');
24885 return;
24886 }
24887 return this.serverSideTransactionManager.flushAsyncTransactions();
24888 };
24889 /** Update row data. Pass a transaction object with lists for `add`, `remove` and `update`. */
24890 GridApi.prototype.applyTransaction = function (rowDataTransaction) {
24891 if (!this.clientSideRowModel) {
24892 this.logMissingRowModel('applyTransaction', 'clientSide');
24893 return;
24894 }
24895 var res = this.clientSideRowModel.updateRowData(rowDataTransaction);
24896 // refresh all the full width rows
24897 this.rowRenderer.refreshFullWidthRows(res.update);
24898 // do change detection for all present cells
24899 if (!this.gridOptionsService.is('suppressChangeDetection')) {
24900 this.rowRenderer.refreshCells();
24901 }
24902 return res;
24903 };
24904 /** Same as `applyTransaction` except executes asynchronously for efficiency. */
24905 GridApi.prototype.applyTransactionAsync = function (rowDataTransaction, callback) {
24906 if (!this.clientSideRowModel) {
24907 this.logMissingRowModel('applyTransactionAsync', 'clientSide');
24908 return;
24909 }
24910 this.clientSideRowModel.batchUpdateRowData(rowDataTransaction, callback);
24911 };
24912 /** Executes any remaining asynchronous grid transactions, if any are waiting to be executed. */
24913 GridApi.prototype.flushAsyncTransactions = function () {
24914 if (!this.clientSideRowModel) {
24915 this.logMissingRowModel('flushAsyncTransactions', 'clientSide');
24916 return;
24917 }
24918 this.clientSideRowModel.flushAsyncTransactions();
24919 };
24920 GridApi.prototype.setSuppressModelUpdateAfterUpdateTransaction = function (value) {
24921 this.gridOptionsService.set('suppressModelUpdateAfterUpdateTransaction', value);
24922 };
24923 /**
24924 * Marks all the currently loaded blocks in the cache for reload.
24925 * If you have 10 blocks in the cache, all 10 will be marked for reload.
24926 * The old data will continue to be displayed until the new data is loaded.
24927 */
24928 GridApi.prototype.refreshInfiniteCache = function () {
24929 if (this.infiniteRowModel) {
24930 this.infiniteRowModel.refreshCache();
24931 }
24932 else {
24933 this.logMissingRowModel('refreshInfiniteCache', 'infinite');
24934 }
24935 };
24936 /**
24937 * Purges the cache.
24938 * 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).
24939 * The grid will display nothing while the new blocks are loaded.
24940 * Use this to immediately remove the old data from the user.
24941 */
24942 GridApi.prototype.purgeInfiniteCache = function () {
24943 if (this.infiniteRowModel) {
24944 this.infiniteRowModel.purgeCache();
24945 }
24946 else {
24947 this.logMissingRowModel('purgeInfiniteCache', 'infinite');
24948 }
24949 };
24950 /**
24951 * Refresh a server-side level.
24952 * If you pass no parameters, then the top level store is refreshed.
24953 * To refresh a child level, pass in the string of keys to get to the desired level.
24954 */
24955 GridApi.prototype.refreshServerSide = function (params) {
24956 if (!this.serverSideRowModel) {
24957 this.logMissingRowModel('refreshServerSide', 'serverSide');
24958 return;
24959 }
24960 this.serverSideRowModel.refreshStore(params);
24961 };
24962 /** @deprecated v28 use `refreshServerSide` instead */
24963 GridApi.prototype.refreshServerSideStore = function (params) {
24964 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_1__["logDeprecation"])('28.0', 'refreshServerSideStore', 'refreshServerSide');
24965 return this.refreshServerSide(params);
24966 };
24967 /** @deprecated v28 use `getServerSideGroupLevelState` instead */
24968 GridApi.prototype.getServerSideStoreState = function () {
24969 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_1__["logDeprecation"])('28.0', 'getServerSideStoreState', 'getServerSideGroupLevelState');
24970 return this.getServerSideGroupLevelState();
24971 };
24972 /** Returns info on all server side group levels. */
24973 GridApi.prototype.getServerSideGroupLevelState = function () {
24974 if (!this.serverSideRowModel) {
24975 this.logMissingRowModel('getServerSideGroupLevelState', 'serverSide');
24976 return [];
24977 }
24978 return this.serverSideRowModel.getStoreState();
24979 };
24980 /** The row count defines how many rows the grid allows scrolling to. */
24981 GridApi.prototype.getInfiniteRowCount = function () {
24982 if (this.infiniteRowModel) {
24983 return this.infiniteRowModel.getRowCount();
24984 }
24985 else {
24986 this.logMissingRowModel('getInfiniteRowCount', 'infinite');
24987 }
24988 };
24989 /** Returns `true` if grid allows for scrolling past the last row to load more rows, thus providing infinite scroll. */
24990 GridApi.prototype.isLastRowIndexKnown = function () {
24991 if (this.infiniteRowModel) {
24992 return this.infiniteRowModel.isLastRowIndexKnown();
24993 }
24994 else {
24995 this.logMissingRowModel('isLastRowIndexKnown', 'infinite');
24996 }
24997 };
24998 /**
24999 * Returns an object representing the state of the cache. This is useful for debugging and understanding how the cache is working.
25000 */
25001 GridApi.prototype.getCacheBlockState = function () {
25002 return this.rowNodeBlockLoader.getBlockState();
25003 };
25004 /** Get the index of the first displayed row due to scrolling (includes invisible rendered rows in the buffer). */
25005 GridApi.prototype.getFirstDisplayedRow = function () {
25006 return this.rowRenderer.getFirstVirtualRenderedRow();
25007 };
25008 /** Get the index of the last displayed row due to scrolling (includes invisible rendered rows in the buffer). */
25009 GridApi.prototype.getLastDisplayedRow = function () {
25010 return this.rowRenderer.getLastVirtualRenderedRow();
25011 };
25012 /** Returns the displayed `RowNode` at the given `index`. */
25013 GridApi.prototype.getDisplayedRowAtIndex = function (index) {
25014 return this.rowModel.getRow(index);
25015 };
25016 /** Returns the total number of displayed rows. */
25017 GridApi.prototype.getDisplayedRowCount = function () {
25018 return this.rowModel.getRowCount();
25019 };
25020 /**
25021 * Set whether the grid paginates the data or not.
25022 * - `true` to enable pagination
25023 * - `false` to disable pagination
25024 */
25025 GridApi.prototype.setPagination = function (value) {
25026 this.gridOptionsService.set('pagination', value);
25027 };
25028 /**
25029 * Returns `true` when the last page is known.
25030 * This will always be `true` if you are using the Client-Side Row Model for pagination.
25031 * Returns `false` when the last page is not known; this only happens when using Infinite Row Model.
25032 */
25033 GridApi.prototype.paginationIsLastPageFound = function () {
25034 return this.paginationProxy.isLastPageFound();
25035 };
25036 /** Returns how many rows are being shown per page. */
25037 GridApi.prototype.paginationGetPageSize = function () {
25038 return this.paginationProxy.getPageSize();
25039 };
25040 /** Sets the `paginationPageSize`, then re-paginates the grid so the changes are applied immediately. */
25041 GridApi.prototype.paginationSetPageSize = function (size) {
25042 this.gridOptionsService.set('paginationPageSize', size);
25043 };
25044 /** Returns the 0-based index of the page which is showing. */
25045 GridApi.prototype.paginationGetCurrentPage = function () {
25046 return this.paginationProxy.getCurrentPage();
25047 };
25048 /** Returns the total number of pages. Returns `null` if `paginationIsLastPageFound() === false`. */
25049 GridApi.prototype.paginationGetTotalPages = function () {
25050 return this.paginationProxy.getTotalPages();
25051 };
25052 /** The total number of rows. Returns `null` if `paginationIsLastPageFound() === false`. */
25053 GridApi.prototype.paginationGetRowCount = function () {
25054 return this.paginationProxy.getMasterRowCount();
25055 };
25056 /** Navigates to the next page. */
25057 GridApi.prototype.paginationGoToNextPage = function () {
25058 this.paginationProxy.goToNextPage();
25059 };
25060 /** Navigates to the previous page. */
25061 GridApi.prototype.paginationGoToPreviousPage = function () {
25062 this.paginationProxy.goToPreviousPage();
25063 };
25064 /** Navigates to the first page. */
25065 GridApi.prototype.paginationGoToFirstPage = function () {
25066 this.paginationProxy.goToFirstPage();
25067 };
25068 /** Navigates to the last page. */
25069 GridApi.prototype.paginationGoToLastPage = function () {
25070 this.paginationProxy.goToLastPage();
25071 };
25072 /** Goes to the specified page. If the page requested doesn't exist, it will go to the last page. */
25073 GridApi.prototype.paginationGoToPage = function (page) {
25074 this.paginationProxy.goToPage(page);
25075 };
25076 __decorate([
25077 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('immutableService')
25078 ], GridApi.prototype, "immutableService", void 0);
25079 __decorate([
25080 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('csvCreator')
25081 ], GridApi.prototype, "csvCreator", void 0);
25082 __decorate([
25083 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('excelCreator')
25084 ], GridApi.prototype, "excelCreator", void 0);
25085 __decorate([
25086 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
25087 ], GridApi.prototype, "rowRenderer", void 0);
25088 __decorate([
25089 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('navigationService')
25090 ], GridApi.prototype, "navigationService", void 0);
25091 __decorate([
25092 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
25093 ], GridApi.prototype, "filterManager", void 0);
25094 __decorate([
25095 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
25096 ], GridApi.prototype, "columnModel", void 0);
25097 __decorate([
25098 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('selectionService')
25099 ], GridApi.prototype, "selectionService", void 0);
25100 __decorate([
25101 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridOptionsService')
25102 ], GridApi.prototype, "gridOptionsService", void 0);
25103 __decorate([
25104 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueService')
25105 ], GridApi.prototype, "valueService", void 0);
25106 __decorate([
25107 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('alignedGridsService')
25108 ], GridApi.prototype, "alignedGridsService", void 0);
25109 __decorate([
25110 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('eventService')
25111 ], GridApi.prototype, "eventService", void 0);
25112 __decorate([
25113 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedRowModel')
25114 ], GridApi.prototype, "pinnedRowModel", void 0);
25115 __decorate([
25116 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('context')
25117 ], GridApi.prototype, "context", void 0);
25118 __decorate([
25119 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
25120 ], GridApi.prototype, "rowModel", void 0);
25121 __decorate([
25122 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortController')
25123 ], GridApi.prototype, "sortController", void 0);
25124 __decorate([
25125 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
25126 ], GridApi.prototype, "paginationProxy", void 0);
25127 __decorate([
25128 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
25129 ], GridApi.prototype, "focusService", void 0);
25130 __decorate([
25131 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('dragAndDropService')
25132 ], GridApi.prototype, "dragAndDropService", void 0);
25133 __decorate([
25134 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('rangeService')
25135 ], GridApi.prototype, "rangeService", void 0);
25136 __decorate([
25137 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('clipboardService')
25138 ], GridApi.prototype, "clipboardService", void 0);
25139 __decorate([
25140 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('aggFuncService')
25141 ], GridApi.prototype, "aggFuncService", void 0);
25142 __decorate([
25143 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('menuFactory')
25144 ], GridApi.prototype, "menuFactory", void 0);
25145 __decorate([
25146 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('contextMenuFactory')
25147 ], GridApi.prototype, "contextMenuFactory", void 0);
25148 __decorate([
25149 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueCache')
25150 ], GridApi.prototype, "valueCache", void 0);
25151 __decorate([
25152 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('animationFrameService')
25153 ], GridApi.prototype, "animationFrameService", void 0);
25154 __decorate([
25155 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('statusBarService')
25156 ], GridApi.prototype, "statusBarService", void 0);
25157 __decorate([
25158 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('chartService')
25159 ], GridApi.prototype, "chartService", void 0);
25160 __decorate([
25161 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('undoRedoService')
25162 ], GridApi.prototype, "undoRedoService", void 0);
25163 __decorate([
25164 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('rowNodeBlockLoader')
25165 ], GridApi.prototype, "rowNodeBlockLoader", void 0);
25166 __decorate([
25167 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('ssrmTransactionManager')
25168 ], GridApi.prototype, "serverSideTransactionManager", void 0);
25169 __decorate([
25170 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
25171 ], GridApi.prototype, "ctrlsService", void 0);
25172 __decorate([
25173 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
25174 ], GridApi.prototype, "init", null);
25175 __decorate([
25176 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
25177 ], GridApi.prototype, "cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid", null);
25178 GridApi = __decorate([
25179 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('gridApi')
25180 ], GridApi);
25181 return GridApi;
25182}());
25183
25184
25185
25186/***/ }),
25187/* 113 */
25188/***/ (function(module, __webpack_exports__, __webpack_require__) {
25189
25190"use strict";
25191__webpack_require__.r(__webpack_exports__);
25192/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelSteps", function() { return ClientSideRowModelSteps; });
25193/**
25194 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
25195 * @version v29.2.0
25196 * @link https://www.ag-grid.com/
25197 * @license MIT
25198 */
25199var ClientSideRowModelSteps;
25200(function (ClientSideRowModelSteps) {
25201 ClientSideRowModelSteps["EVERYTHING"] = "group";
25202 ClientSideRowModelSteps["FILTER"] = "filter";
25203 ClientSideRowModelSteps["SORT"] = "sort";
25204 ClientSideRowModelSteps["MAP"] = "map";
25205 ClientSideRowModelSteps["AGGREGATE"] = "aggregate";
25206 ClientSideRowModelSteps["FILTER_AGGREGATES"] = "filter_aggregates";
25207 ClientSideRowModelSteps["PIVOT"] = "pivot";
25208 ClientSideRowModelSteps["NOTHING"] = "nothing";
25209})(ClientSideRowModelSteps || (ClientSideRowModelSteps = {}));
25210
25211
25212/***/ }),
25213/* 114 */
25214/***/ (function(module, __webpack_exports__, __webpack_require__) {
25215
25216"use strict";
25217__webpack_require__.r(__webpack_exports__);
25218/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellComp", function() { return HeaderFilterCellComp; });
25219/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
25220/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
25221/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
25222/* harmony import */ var _abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(115);
25223/**
25224 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
25225 * @version v29.2.0
25226 * @link https://www.ag-grid.com/
25227 * @license MIT
25228 */
25229var __extends = (undefined && undefined.__extends) || (function () {
25230 var extendStatics = function (d, b) {
25231 extendStatics = Object.setPrototypeOf ||
25232 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25233 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
25234 return extendStatics(d, b);
25235 };
25236 return function (d, b) {
25237 extendStatics(d, b);
25238 function __() { this.constructor = d; }
25239 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
25240 };
25241})();
25242var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
25243 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
25244 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
25245 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;
25246 return c > 3 && r && Object.defineProperty(target, key, r), r;
25247};
25248
25249
25250
25251
25252var HeaderFilterCellComp = /** @class */ (function (_super) {
25253 __extends(HeaderFilterCellComp, _super);
25254 function HeaderFilterCellComp(ctrl) {
25255 return _super.call(this, HeaderFilterCellComp.TEMPLATE, ctrl) || this;
25256 }
25257 HeaderFilterCellComp.prototype.postConstruct = function () {
25258 var _this = this;
25259 var eGui = this.getGui();
25260 var compProxy = {
25261 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
25262 addOrRemoveBodyCssClass: function (cssClassName, on) { return _this.eFloatingFilterBody.classList.toggle(cssClassName, on); },
25263 setButtonWrapperDisplayed: function (displayed) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisplayed"])(_this.eButtonWrapper, displayed); },
25264 setCompDetails: function (compDetails) { return _this.setCompDetails(compDetails); },
25265 getFloatingFilterComp: function () { return _this.compPromise; },
25266 setWidth: function (width) { return eGui.style.width = width; },
25267 setMenuIcon: function (eIcon) { return _this.eButtonShowMainFilter.appendChild(eIcon); }
25268 };
25269 this.ctrl.setComp(compProxy, eGui, this.eButtonShowMainFilter, this.eFloatingFilterBody);
25270 };
25271 HeaderFilterCellComp.prototype.setCompDetails = function (compDetails) {
25272 var _this = this;
25273 // because we are providing defaultFloatingFilterType, we know it will never be undefined;
25274 this.compPromise = compDetails.newAgStackInstance();
25275 this.compPromise.then(function (comp) { return _this.afterCompCreated(comp); });
25276 };
25277 HeaderFilterCellComp.prototype.afterCompCreated = function (comp) {
25278 var _this = this;
25279 if (!comp) {
25280 return;
25281 }
25282 this.addDestroyFunc(function () { return _this.context.destroyBean(comp); });
25283 if (!this.isAlive()) {
25284 return;
25285 }
25286 this.eFloatingFilterBody.appendChild(comp.getGui());
25287 if (comp.afterGuiAttached) {
25288 comp.afterGuiAttached();
25289 }
25290 };
25291 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>";
25292 __decorate([
25293 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('eFloatingFilterBody')
25294 ], HeaderFilterCellComp.prototype, "eFloatingFilterBody", void 0);
25295 __decorate([
25296 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('eButtonWrapper')
25297 ], HeaderFilterCellComp.prototype, "eButtonWrapper", void 0);
25298 __decorate([
25299 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('eButtonShowMainFilter')
25300 ], HeaderFilterCellComp.prototype, "eButtonShowMainFilter", void 0);
25301 __decorate([
25302 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
25303 ], HeaderFilterCellComp.prototype, "postConstruct", null);
25304 return HeaderFilterCellComp;
25305}(_abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_3__["AbstractHeaderCellComp"]));
25306
25307
25308
25309/***/ }),
25310/* 115 */
25311/***/ (function(module, __webpack_exports__, __webpack_require__) {
25312
25313"use strict";
25314__webpack_require__.r(__webpack_exports__);
25315/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractHeaderCellComp", function() { return AbstractHeaderCellComp; });
25316/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
25317/**
25318 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
25319 * @version v29.2.0
25320 * @link https://www.ag-grid.com/
25321 * @license MIT
25322 */
25323var __extends = (undefined && undefined.__extends) || (function () {
25324 var extendStatics = function (d, b) {
25325 extendStatics = Object.setPrototypeOf ||
25326 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25327 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
25328 return extendStatics(d, b);
25329 };
25330 return function (d, b) {
25331 extendStatics(d, b);
25332 function __() { this.constructor = d; }
25333 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
25334 };
25335})();
25336
25337var AbstractHeaderCellComp = /** @class */ (function (_super) {
25338 __extends(AbstractHeaderCellComp, _super);
25339 function AbstractHeaderCellComp(template, ctrl) {
25340 var _this = _super.call(this, template) || this;
25341 _this.ctrl = ctrl;
25342 return _this;
25343 }
25344 AbstractHeaderCellComp.prototype.getCtrl = function () {
25345 return this.ctrl;
25346 };
25347 return AbstractHeaderCellComp;
25348}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
25349
25350
25351
25352/***/ }),
25353/* 116 */
25354/***/ (function(module, __webpack_exports__, __webpack_require__) {
25355
25356"use strict";
25357__webpack_require__.r(__webpack_exports__);
25358/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridBodyComp", function() { return GridBodyComp; });
25359/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
25360/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(117);
25361/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41);
25362/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38);
25363/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57);
25364/* harmony import */ var _gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(118);
25365/* harmony import */ var _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(122);
25366/**
25367 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
25368 * @version v29.2.0
25369 * @link https://www.ag-grid.com/
25370 * @license MIT
25371 */
25372var __extends = (undefined && undefined.__extends) || (function () {
25373 var extendStatics = function (d, b) {
25374 extendStatics = Object.setPrototypeOf ||
25375 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25376 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
25377 return extendStatics(d, b);
25378 };
25379 return function (d, b) {
25380 extendStatics(d, b);
25381 function __() { this.constructor = d; }
25382 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
25383 };
25384})();
25385var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
25386 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
25387 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
25388 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;
25389 return c > 3 && r && Object.defineProperty(target, key, r), r;
25390};
25391
25392
25393
25394
25395
25396
25397
25398var GRID_BODY_TEMPLATE = /* html */ "<div class=\"ag-root ag-unselectable\" role=\"treegrid\">\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\" ref=\"eBody\" role=\"presentation\">\n <div class=\"ag-body-clipper\" ref=\"eBodyClipper\" role=\"presentation\">\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>\n <ag-fake-vertical-scroll></ag-fake-vertical-scroll>\n </div>\n <div class=\"ag-sticky-top\" ref=\"eStickyTop\" role=\"presentation\">\n <ag-row-container ref=\"stickyTopLeftContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].STICKY_TOP_LEFT + "\"></ag-row-container>\n <ag-row-container ref=\"stickyTopCenterContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].STICKY_TOP_CENTER + "\"></ag-row-container>\n <ag-row-container ref=\"stickyTopRightContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].STICKY_TOP_RIGHT + "\"></ag-row-container>\n <ag-row-container ref=\"stickyTopFullWidthContainer\" name=\"" + _rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["RowContainerName"].STICKY_TOP_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>";
25399var GridBodyComp = /** @class */ (function (_super) {
25400 __extends(GridBodyComp, _super);
25401 function GridBodyComp() {
25402 return _super.call(this, GRID_BODY_TEMPLATE) || this;
25403 }
25404 GridBodyComp.prototype.init = function () {
25405 var _this = this;
25406 var setHeight = function (height, element) {
25407 var heightString = height + "px";
25408 element.style.minHeight = heightString;
25409 element.style.height = heightString;
25410 };
25411 var compProxy = {
25412 setRowAnimationCssOnBodyViewport: function (cssClass, animate) { return _this.setRowAnimationCssOnBodyViewport(cssClass, animate); },
25413 setColumnCount: function (count) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaColCount"])(_this.getGui(), count); },
25414 setRowCount: function (count) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaRowCount"])(_this.getGui(), count); },
25415 setTopHeight: function (height) { return setHeight(height, _this.eTop); },
25416 setBottomHeight: function (height) { return setHeight(height, _this.eBottom); },
25417 setTopDisplay: function (display) { return _this.eTop.style.display = display; },
25418 setBottomDisplay: function (display) { return _this.eBottom.style.display = display; },
25419 setStickyTopHeight: function (height) { return _this.eStickyTop.style.height = height; },
25420 setStickyTopTop: function (top) { return _this.eStickyTop.style.top = top; },
25421 setStickyTopWidth: function (width) { return _this.eStickyTop.style.width = width; },
25422 setColumnMovingCss: function (cssClass, flag) { return _this.addOrRemoveCssClass(cssClass, flag); },
25423 updateLayoutClasses: function (cssClass, params) {
25424 var classLists = [
25425 _this.eBodyViewport.classList,
25426 _this.eBodyClipper.classList,
25427 _this.eBody.classList
25428 ];
25429 classLists.forEach(function (classList) {
25430 classList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].AUTO_HEIGHT, params.autoHeight);
25431 classList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].NORMAL, params.normal);
25432 classList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].PRINT, params.print);
25433 });
25434 _this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].AUTO_HEIGHT, params.autoHeight);
25435 _this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].NORMAL, params.normal);
25436 _this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_1__["LayoutCssClasses"].PRINT, params.print);
25437 },
25438 setAlwaysVerticalScrollClass: function (cssClass, on) {
25439 return _this.eBodyViewport.classList.toggle(_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__["CSS_CLASS_FORCE_VERTICAL_SCROLL"], on);
25440 },
25441 registerBodyViewportResizeListener: function (listener) {
25442 var unsubscribeFromResize = _this.resizeObserverService.observeResize(_this.eBodyViewport, listener);
25443 _this.addDestroyFunc(function () { return unsubscribeFromResize(); });
25444 },
25445 setPinnedTopBottomOverflowY: function (overflow) { return _this.eTop.style.overflowY = _this.eBottom.style.overflowY = overflow; },
25446 setCellSelectableCss: function (cssClass, selectable) {
25447 [_this.eTop, _this.eBodyViewport, _this.eBottom]
25448 .forEach(function (ct) { return ct.classList.toggle(_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__["CSS_CLASS_CELL_SELECTABLE"], selectable); });
25449 },
25450 setBodyViewportWidth: function (width) { return _this.eBodyViewport.style.width = width; }
25451 };
25452 this.ctrl = this.createManagedBean(new _gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__["GridBodyCtrl"]());
25453 this.ctrl.setComp(compProxy, this.getGui(), this.eBodyViewport, this.eTop, this.eBottom, this.eStickyTop);
25454 if (this.rangeService || this.gridOptionsService.get('rowSelection') === 'multiple') {
25455 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaMultiSelectable"])(this.getGui(), true);
25456 }
25457 };
25458 GridBodyComp.prototype.setRowAnimationCssOnBodyViewport = function (cssClass, animateRows) {
25459 var bodyViewportClassList = this.eBodyViewport.classList;
25460 bodyViewportClassList.toggle(_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__["RowAnimationCssClasses"].ANIMATION_ON, animateRows);
25461 bodyViewportClassList.toggle(_gridBodyCtrl__WEBPACK_IMPORTED_MODULE_5__["RowAnimationCssClasses"].ANIMATION_OFF, !animateRows);
25462 };
25463 GridBodyComp.prototype.getFloatingTopBottom = function () {
25464 return [this.eTop, this.eBottom];
25465 };
25466 __decorate([
25467 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('resizeObserverService')
25468 ], GridBodyComp.prototype, "resizeObserverService", void 0);
25469 __decorate([
25470 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('rangeService')
25471 ], GridBodyComp.prototype, "rangeService", void 0);
25472 __decorate([
25473 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eBodyViewport')
25474 ], GridBodyComp.prototype, "eBodyViewport", void 0);
25475 __decorate([
25476 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eStickyTop')
25477 ], GridBodyComp.prototype, "eStickyTop", void 0);
25478 __decorate([
25479 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eTop')
25480 ], GridBodyComp.prototype, "eTop", void 0);
25481 __decorate([
25482 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eBottom')
25483 ], GridBodyComp.prototype, "eBottom", void 0);
25484 __decorate([
25485 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('gridHeader')
25486 ], GridBodyComp.prototype, "headerRootComp", void 0);
25487 __decorate([
25488 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eBodyClipper')
25489 ], GridBodyComp.prototype, "eBodyClipper", void 0);
25490 __decorate([
25491 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eBody')
25492 ], GridBodyComp.prototype, "eBody", void 0);
25493 __decorate([
25494 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
25495 ], GridBodyComp.prototype, "init", null);
25496 return GridBodyComp;
25497}(_widgets_component__WEBPACK_IMPORTED_MODULE_3__["Component"]));
25498
25499
25500
25501/***/ }),
25502/* 117 */
25503/***/ (function(module, __webpack_exports__, __webpack_require__) {
25504
25505"use strict";
25506__webpack_require__.r(__webpack_exports__);
25507/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LayoutCssClasses", function() { return LayoutCssClasses; });
25508/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LayoutFeature", function() { return LayoutFeature; });
25509/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
25510/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
25511/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
25512/**
25513 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
25514 * @version v29.2.0
25515 * @link https://www.ag-grid.com/
25516 * @license MIT
25517 */
25518var __extends = (undefined && undefined.__extends) || (function () {
25519 var extendStatics = function (d, b) {
25520 extendStatics = Object.setPrototypeOf ||
25521 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25522 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
25523 return extendStatics(d, b);
25524 };
25525 return function (d, b) {
25526 extendStatics(d, b);
25527 function __() { this.constructor = d; }
25528 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
25529 };
25530})();
25531var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
25532 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
25533 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
25534 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;
25535 return c > 3 && r && Object.defineProperty(target, key, r), r;
25536};
25537
25538
25539
25540var LayoutCssClasses;
25541(function (LayoutCssClasses) {
25542 LayoutCssClasses["AUTO_HEIGHT"] = "ag-layout-auto-height";
25543 LayoutCssClasses["NORMAL"] = "ag-layout-normal";
25544 LayoutCssClasses["PRINT"] = "ag-layout-print";
25545})(LayoutCssClasses || (LayoutCssClasses = {}));
25546var LayoutFeature = /** @class */ (function (_super) {
25547 __extends(LayoutFeature, _super);
25548 function LayoutFeature(view) {
25549 var _this = _super.call(this) || this;
25550 _this.view = view;
25551 return _this;
25552 }
25553 LayoutFeature.prototype.postConstruct = function () {
25554 this.addManagedPropertyListener('domLayout', this.updateLayoutClasses.bind(this));
25555 this.updateLayoutClasses();
25556 };
25557 LayoutFeature.prototype.updateLayoutClasses = function () {
25558 var domLayout = this.getDomLayout();
25559 var params = {
25560 autoHeight: domLayout === 'autoHeight',
25561 normal: domLayout === 'normal',
25562 print: domLayout === 'print'
25563 };
25564 var cssClass = params.autoHeight ? LayoutCssClasses.AUTO_HEIGHT :
25565 params.print ? LayoutCssClasses.PRINT : LayoutCssClasses.NORMAL;
25566 this.view.updateLayoutClasses(cssClass, params);
25567 };
25568 // returns either 'print', 'autoHeight' or 'normal' (normal is the default)
25569 LayoutFeature.prototype.getDomLayout = function () {
25570 var _a;
25571 var domLayout = (_a = this.gridOptionsService.get('domLayout')) !== null && _a !== void 0 ? _a : 'normal';
25572 var validLayouts = ['normal', 'print', 'autoHeight'];
25573 if (validLayouts.indexOf(domLayout) === -1) {
25574 Object(_utils_function__WEBPACK_IMPORTED_MODULE_2__["doOnce"])(function () {
25575 return console.warn("AG Grid: " + domLayout + " is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.");
25576 }, 'warn about dom layout values');
25577 return 'normal';
25578 }
25579 return domLayout;
25580 };
25581 __decorate([
25582 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
25583 ], LayoutFeature.prototype, "postConstruct", null);
25584 return LayoutFeature;
25585}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
25586
25587
25588
25589/***/ }),
25590/* 118 */
25591/***/ (function(module, __webpack_exports__, __webpack_require__) {
25592
25593"use strict";
25594__webpack_require__.r(__webpack_exports__);
25595/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowAnimationCssClasses", function() { return RowAnimationCssClasses; });
25596/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSS_CLASS_CELL_SELECTABLE", function() { return CSS_CLASS_CELL_SELECTABLE; });
25597/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSS_CLASS_FORCE_VERTICAL_SCROLL", function() { return CSS_CLASS_FORCE_VERTICAL_SCROLL; });
25598/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSS_CLASS_COLUMN_MOVING", function() { return CSS_CLASS_COLUMN_MOVING; });
25599/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridBodyCtrl", function() { return GridBodyCtrl; });
25600/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
25601/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
25602/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(117);
25603/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
25604/* harmony import */ var _gridBodyScrollFeature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(119);
25605/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45);
25606/* harmony import */ var _rowDragFeature__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(120);
25607/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(42);
25608/* harmony import */ var _widgets_touchListener__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(86);
25609/**
25610 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
25611 * @version v29.2.0
25612 * @link https://www.ag-grid.com/
25613 * @license MIT
25614 */
25615var __extends = (undefined && undefined.__extends) || (function () {
25616 var extendStatics = function (d, b) {
25617 extendStatics = Object.setPrototypeOf ||
25618 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25619 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
25620 return extendStatics(d, b);
25621 };
25622 return function (d, b) {
25623 extendStatics(d, b);
25624 function __() { this.constructor = d; }
25625 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
25626 };
25627})();
25628var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
25629 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
25630 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
25631 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;
25632 return c > 3 && r && Object.defineProperty(target, key, r), r;
25633};
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643var RowAnimationCssClasses;
25644(function (RowAnimationCssClasses) {
25645 RowAnimationCssClasses["ANIMATION_ON"] = "ag-row-animation";
25646 RowAnimationCssClasses["ANIMATION_OFF"] = "ag-row-no-animation";
25647})(RowAnimationCssClasses || (RowAnimationCssClasses = {}));
25648var CSS_CLASS_CELL_SELECTABLE = 'ag-selectable';
25649var CSS_CLASS_FORCE_VERTICAL_SCROLL = 'ag-force-vertical-scroll';
25650var CSS_CLASS_COLUMN_MOVING = 'ag-column-moving';
25651var GridBodyCtrl = /** @class */ (function (_super) {
25652 __extends(GridBodyCtrl, _super);
25653 function GridBodyCtrl() {
25654 var _this = _super !== null && _super.apply(this, arguments) || this;
25655 _this.stickyTopHeight = 0;
25656 return _this;
25657 }
25658 GridBodyCtrl.prototype.getScrollFeature = function () {
25659 return this.bodyScrollFeature;
25660 };
25661 GridBodyCtrl.prototype.getBodyViewportElement = function () {
25662 return this.eBodyViewport;
25663 };
25664 GridBodyCtrl.prototype.setComp = function (comp, eGridBody, eBodyViewport, eTop, eBottom, eStickyTop) {
25665 this.comp = comp;
25666 this.eGridBody = eGridBody;
25667 this.eBodyViewport = eBodyViewport;
25668 this.eTop = eTop;
25669 this.eBottom = eBottom;
25670 this.eStickyTop = eStickyTop;
25671 this.setCellTextSelection(this.gridOptionsService.is('enableCellTextSelection'));
25672 this.createManagedBean(new _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_2__["LayoutFeature"](this.comp));
25673 this.bodyScrollFeature = this.createManagedBean(new _gridBodyScrollFeature__WEBPACK_IMPORTED_MODULE_4__["GridBodyScrollFeature"](this.eBodyViewport));
25674 this.addRowDragListener();
25675 this.setupRowAnimationCssClass();
25676 this.addEventListeners();
25677 this.addFocusListeners([eTop, eBodyViewport, eBottom, eStickyTop]);
25678 this.onGridColumnsChanged();
25679 this.addBodyViewportListener();
25680 this.setFloatingHeights();
25681 this.disableBrowserDragging();
25682 this.addStopEditingWhenGridLosesFocus();
25683 this.ctrlsService.registerGridBodyCtrl(this);
25684 };
25685 GridBodyCtrl.prototype.getComp = function () {
25686 return this.comp;
25687 };
25688 GridBodyCtrl.prototype.addEventListeners = function () {
25689 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_GRID_COLUMNS_CHANGED, this.onGridColumnsChanged.bind(this));
25690 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED, this.onScrollVisibilityChanged.bind(this));
25691 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_PINNED_ROW_DATA_CHANGED, this.onPinnedRowDataChanged.bind(this));
25692 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_HEADER_HEIGHT_CHANGED, this.onHeaderHeightChanged.bind(this));
25693 };
25694 GridBodyCtrl.prototype.addFocusListeners = function (elements) {
25695 var _this = this;
25696 elements.forEach(function (element) {
25697 _this.addManagedListener(element, 'focusin', function (e) {
25698 var target = e.target;
25699 // element being focused is nested?
25700 var isFocusedElementNested = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["isElementChildOfClass"])(target, 'ag-root', element);
25701 element.classList.toggle('ag-has-focus', !isFocusedElementNested);
25702 });
25703 _this.addManagedListener(element, 'focusout', function (e) {
25704 var target = e.target, relatedTarget = e.relatedTarget;
25705 var gridContainRelatedTarget = element.contains(relatedTarget);
25706 var isNestedRelatedTarget = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["isElementChildOfClass"])(relatedTarget, 'ag-root', element);
25707 var isNestedTarget = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["isElementChildOfClass"])(target, 'ag-root', element);
25708 // element losing focus belongs to a nested grid,
25709 // it should not be handled here.
25710 if (isNestedTarget) {
25711 return;
25712 }
25713 // the grid does not contain, or the focus element is within
25714 // a nested grid
25715 if (!gridContainRelatedTarget || isNestedRelatedTarget) {
25716 element.classList.remove('ag-has-focus');
25717 }
25718 });
25719 });
25720 };
25721 // used by ColumnAnimationService
25722 GridBodyCtrl.prototype.setColumnMovingCss = function (moving) {
25723 this.comp.setColumnMovingCss(CSS_CLASS_COLUMN_MOVING, moving);
25724 };
25725 GridBodyCtrl.prototype.setCellTextSelection = function (selectable) {
25726 if (selectable === void 0) { selectable = false; }
25727 var cssClass = selectable ? CSS_CLASS_CELL_SELECTABLE : null;
25728 this.comp.setCellSelectableCss(cssClass, selectable);
25729 };
25730 GridBodyCtrl.prototype.onScrollVisibilityChanged = function () {
25731 var visible = this.scrollVisibleService.isVerticalScrollShowing();
25732 this.setVerticalScrollPaddingVisible(visible);
25733 this.setStickyTopWidth(visible);
25734 var scrollbarWidth = visible ? (this.gridOptionsService.getScrollbarWidth() || 0) : 0;
25735 var pad = Object(_utils_browser__WEBPACK_IMPORTED_MODULE_7__["isInvisibleScrollbar"])() ? 16 : 0;
25736 var width = "calc(100% + " + (scrollbarWidth + pad) + "px)";
25737 this.comp.setBodyViewportWidth(width);
25738 };
25739 GridBodyCtrl.prototype.onGridColumnsChanged = function () {
25740 var columns = this.columnModel.getAllGridColumns();
25741 this.comp.setColumnCount(columns ? columns.length : 0);
25742 };
25743 // if we do not do this, then the user can select a pic in the grid (eg an image in a custom cell renderer)
25744 // and then that will start the browser native drag n' drop, which messes up with our own drag and drop.
25745 GridBodyCtrl.prototype.disableBrowserDragging = function () {
25746 this.addManagedListener(this.eGridBody, 'dragstart', function (event) {
25747 if (event.target instanceof HTMLImageElement) {
25748 event.preventDefault();
25749 return false;
25750 }
25751 });
25752 };
25753 GridBodyCtrl.prototype.addStopEditingWhenGridLosesFocus = function () {
25754 var _this = this;
25755 if (!this.gridOptionsService.is('stopEditingWhenCellsLoseFocus')) {
25756 return;
25757 }
25758 var focusOutListener = function (event) {
25759 // this is the element the focus is moving to
25760 var elementWithFocus = event.relatedTarget;
25761 if (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_7__["getTabIndex"])(elementWithFocus) === null) {
25762 _this.rowRenderer.stopEditing();
25763 return;
25764 }
25765 var clickInsideGrid =
25766 // see if click came from inside the viewports
25767 viewports.some(function (viewport) { return viewport.contains(elementWithFocus); })
25768 // and also that it's not from a detail grid
25769 && _this.mouseEventService.isElementInThisGrid(elementWithFocus);
25770 if (!clickInsideGrid) {
25771 var popupService = _this.popupService;
25772 clickInsideGrid =
25773 popupService.getActivePopups().some(function (popup) { return popup.contains(elementWithFocus); }) ||
25774 popupService.isElementWithinCustomPopup(elementWithFocus);
25775 }
25776 if (!clickInsideGrid) {
25777 _this.rowRenderer.stopEditing();
25778 }
25779 };
25780 var viewports = [this.eBodyViewport, this.eBottom, this.eTop, this.eStickyTop];
25781 viewports.forEach(function (viewport) { return _this.addManagedListener(viewport, 'focusout', focusOutListener); });
25782 };
25783 GridBodyCtrl.prototype.updateRowCount = function () {
25784 var headerCount = this.headerNavigationService.getHeaderRowCount();
25785 var rowCount = this.rowModel.isLastRowIndexKnown() ? this.rowModel.getRowCount() : -1;
25786 var total = rowCount === -1 ? -1 : (headerCount + rowCount);
25787 this.comp.setRowCount(total);
25788 };
25789 GridBodyCtrl.prototype.registerBodyViewportResizeListener = function (listener) {
25790 this.comp.registerBodyViewportResizeListener(listener);
25791 };
25792 GridBodyCtrl.prototype.setVerticalScrollPaddingVisible = function (visible) {
25793 var overflowY = visible ? 'scroll' : 'hidden';
25794 this.comp.setPinnedTopBottomOverflowY(overflowY);
25795 };
25796 GridBodyCtrl.prototype.isVerticalScrollShowing = function () {
25797 var show = this.gridOptionsService.is('alwaysShowVerticalScroll');
25798 var cssClass = show ? CSS_CLASS_FORCE_VERTICAL_SCROLL : null;
25799 var allowVerticalScroll = this.gridOptionsService.isDomLayout('normal');
25800 this.comp.setAlwaysVerticalScrollClass(cssClass, show);
25801 return show || (allowVerticalScroll && Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["isVerticalScrollShowing"])(this.eBodyViewport));
25802 };
25803 GridBodyCtrl.prototype.setupRowAnimationCssClass = function () {
25804 var _this = this;
25805 var listener = function () {
25806 // we don't want to use row animation if scaling, as rows jump strangely as you scroll,
25807 // when scaling and doing row animation.
25808 var animateRows = _this.gridOptionsService.isAnimateRows() && !_this.rowContainerHeightService.isStretching();
25809 var animateRowsCssClass = animateRows ? RowAnimationCssClasses.ANIMATION_ON : RowAnimationCssClasses.ANIMATION_OFF;
25810 _this.comp.setRowAnimationCssOnBodyViewport(animateRowsCssClass, animateRows);
25811 };
25812 listener();
25813 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_HEIGHT_SCALE_CHANGED, listener);
25814 this.addManagedPropertyListener('animateRows', listener);
25815 };
25816 GridBodyCtrl.prototype.getGridBodyElement = function () {
25817 return this.eGridBody;
25818 };
25819 GridBodyCtrl.prototype.addBodyViewportListener = function () {
25820 var _this = this;
25821 // we want to listen for clicks directly on the eBodyViewport, so the user has a way of showing
25822 // the context menu if no rows or columns are displayed, or user simply clicks outside of a cell
25823 var listener = function (mouseEvent, touch, touchEvent) {
25824 if (!mouseEvent && !touchEvent) {
25825 return;
25826 }
25827 if (_this.gridOptionsService.is('preventDefaultOnContextMenu')) {
25828 var event_1 = (mouseEvent || touchEvent);
25829 event_1.preventDefault();
25830 }
25831 var target = (mouseEvent || touch).target;
25832 if (target === _this.eBodyViewport || target === _this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()) {
25833 // show it
25834 if (_this.contextMenuFactory) {
25835 if (mouseEvent) {
25836 _this.contextMenuFactory.onContextMenu(mouseEvent, null, null, null, null, _this.eGridBody);
25837 }
25838 else if (touchEvent) {
25839 _this.contextMenuFactory.onContextMenu(null, touchEvent, null, null, null, _this.eGridBody);
25840 }
25841 }
25842 }
25843 };
25844 this.addManagedListener(this.eBodyViewport, 'contextmenu', listener);
25845 this.mockContextMenuForIPad(listener);
25846 this.addManagedListener(this.eBodyViewport, 'wheel', this.onBodyViewportWheel.bind(this));
25847 this.addManagedListener(this.eStickyTop, 'wheel', this.onStickyTopWheel.bind(this));
25848 };
25849 GridBodyCtrl.prototype.mockContextMenuForIPad = function (listener) {
25850 // we do NOT want this when not in iPad
25851 if (!Object(_utils_browser__WEBPACK_IMPORTED_MODULE_7__["isIOSUserAgent"])()) {
25852 return;
25853 }
25854 var touchListener = new _widgets_touchListener__WEBPACK_IMPORTED_MODULE_8__["TouchListener"](this.eBodyViewport);
25855 var longTapListener = function (event) {
25856 listener(undefined, event.touchStart, event.touchEvent);
25857 };
25858 this.addManagedListener(touchListener, _widgets_touchListener__WEBPACK_IMPORTED_MODULE_8__["TouchListener"].EVENT_LONG_TAP, longTapListener);
25859 this.addDestroyFunc(function () { return touchListener.destroy(); });
25860 };
25861 GridBodyCtrl.prototype.onBodyViewportWheel = function (e) {
25862 if (!this.gridOptionsService.is('suppressScrollWhenPopupsAreOpen')) {
25863 return;
25864 }
25865 if (this.popupService.hasAnchoredPopup()) {
25866 e.preventDefault();
25867 }
25868 };
25869 GridBodyCtrl.prototype.onStickyTopWheel = function (e) {
25870 e.preventDefault();
25871 if (e.offsetY) {
25872 this.scrollVertically(e.deltaY);
25873 }
25874 };
25875 GridBodyCtrl.prototype.getGui = function () {
25876 return this.eGridBody;
25877 };
25878 // called by rowDragFeature
25879 GridBodyCtrl.prototype.scrollVertically = function (pixels) {
25880 var oldScrollPosition = this.eBodyViewport.scrollTop;
25881 this.bodyScrollFeature.setVerticalScrollPosition(oldScrollPosition + pixels);
25882 return this.eBodyViewport.scrollTop - oldScrollPosition;
25883 };
25884 GridBodyCtrl.prototype.addRowDragListener = function () {
25885 this.rowDragFeature = this.createManagedBean(new _rowDragFeature__WEBPACK_IMPORTED_MODULE_6__["RowDragFeature"](this.eBodyViewport));
25886 this.dragAndDropService.addDropTarget(this.rowDragFeature);
25887 };
25888 GridBodyCtrl.prototype.getRowDragFeature = function () {
25889 return this.rowDragFeature;
25890 };
25891 GridBodyCtrl.prototype.onPinnedRowDataChanged = function () {
25892 this.setFloatingHeights();
25893 };
25894 GridBodyCtrl.prototype.setFloatingHeights = function () {
25895 var pinnedRowModel = this.pinnedRowModel;
25896 var floatingTopHeight = pinnedRowModel.getPinnedTopTotalHeight();
25897 if (floatingTopHeight) {
25898 // adding 1px for cell bottom border
25899 floatingTopHeight += 1;
25900 }
25901 var floatingBottomHeight = pinnedRowModel.getPinnedBottomTotalHeight();
25902 if (floatingBottomHeight) {
25903 // adding 1px for cell bottom border
25904 floatingBottomHeight += 1;
25905 }
25906 this.comp.setTopHeight(floatingTopHeight);
25907 this.comp.setBottomHeight(floatingBottomHeight);
25908 this.comp.setTopDisplay(floatingTopHeight ? 'inherit' : 'none');
25909 this.comp.setBottomDisplay(floatingBottomHeight ? 'inherit' : 'none');
25910 this.setStickyTopOffsetTop();
25911 };
25912 GridBodyCtrl.prototype.setStickyTopHeight = function (height) {
25913 if (height === void 0) { height = 0; }
25914 // console.log('setting sticky top height ' + height);
25915 this.comp.setStickyTopHeight(height + "px");
25916 this.stickyTopHeight = height;
25917 };
25918 GridBodyCtrl.prototype.getStickyTopHeight = function () {
25919 return this.stickyTopHeight;
25920 };
25921 GridBodyCtrl.prototype.setStickyTopWidth = function (vScrollVisible) {
25922 if (!vScrollVisible) {
25923 this.comp.setStickyTopWidth('100%');
25924 }
25925 else {
25926 var scrollbarWidth = this.gridOptionsService.getScrollbarWidth();
25927 this.comp.setStickyTopWidth("calc(100% - " + scrollbarWidth + "px)");
25928 }
25929 };
25930 GridBodyCtrl.prototype.onHeaderHeightChanged = function () {
25931 this.setStickyTopOffsetTop();
25932 };
25933 GridBodyCtrl.prototype.setStickyTopOffsetTop = function () {
25934 var headerCtrl = this.ctrlsService.getGridHeaderCtrl();
25935 var headerHeight = headerCtrl.getHeaderHeight();
25936 var pinnedTopHeight = this.pinnedRowModel.getPinnedTopTotalHeight();
25937 var height = 0;
25938 if (headerHeight > 0) {
25939 height += headerHeight + 1;
25940 }
25941 if (pinnedTopHeight > 0) {
25942 height += pinnedTopHeight + 1;
25943 }
25944 this.comp.setStickyTopTop(height + "px");
25945 };
25946 // method will call itself if no available width. this covers if the grid
25947 // isn't visible, but is just about to be visible.
25948 GridBodyCtrl.prototype.sizeColumnsToFit = function (params, nextTimeout) {
25949 var _this = this;
25950 var removeScrollWidth = this.isVerticalScrollShowing();
25951 var scrollWidthToRemove = removeScrollWidth ? this.gridOptionsService.getScrollbarWidth() : 0;
25952 // bodyViewportWidth should be calculated from eGridBody, not eBodyViewport
25953 // because we change the width of the bodyViewport to hide the real browser scrollbar
25954 var bodyViewportWidth = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["getInnerWidth"])(this.eGridBody);
25955 var availableWidth = bodyViewportWidth - scrollWidthToRemove;
25956 if (availableWidth > 0) {
25957 this.columnModel.sizeColumnsToFit(availableWidth, "sizeColumnsToFit", false, params);
25958 return;
25959 }
25960 if (nextTimeout === undefined) {
25961 window.setTimeout(function () {
25962 _this.sizeColumnsToFit(params, 100);
25963 }, 0);
25964 }
25965 else if (nextTimeout === 100) {
25966 window.setTimeout(function () {
25967 _this.sizeColumnsToFit(params, 500);
25968 }, 100);
25969 }
25970 else if (nextTimeout === 500) {
25971 window.setTimeout(function () {
25972 _this.sizeColumnsToFit(params, -1);
25973 }, 500);
25974 }
25975 else {
25976 console.warn('AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with ' +
25977 'zero width, maybe the grid is not visible yet on the screen?');
25978 }
25979 };
25980 // + rangeService
25981 GridBodyCtrl.prototype.addScrollEventListener = function (listener) {
25982 this.eBodyViewport.addEventListener('scroll', listener, { passive: true });
25983 };
25984 // + focusService
25985 GridBodyCtrl.prototype.removeScrollEventListener = function (listener) {
25986 this.eBodyViewport.removeEventListener('scroll', listener);
25987 };
25988 __decorate([
25989 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowContainerHeightService')
25990 ], GridBodyCtrl.prototype, "rowContainerHeightService", void 0);
25991 __decorate([
25992 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
25993 ], GridBodyCtrl.prototype, "ctrlsService", void 0);
25994 __decorate([
25995 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
25996 ], GridBodyCtrl.prototype, "columnModel", void 0);
25997 __decorate([
25998 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('scrollVisibleService')
25999 ], GridBodyCtrl.prototype, "scrollVisibleService", void 0);
26000 __decorate([
26001 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('contextMenuFactory')
26002 ], GridBodyCtrl.prototype, "contextMenuFactory", void 0);
26003 __decorate([
26004 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('headerNavigationService')
26005 ], GridBodyCtrl.prototype, "headerNavigationService", void 0);
26006 __decorate([
26007 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragAndDropService')
26008 ], GridBodyCtrl.prototype, "dragAndDropService", void 0);
26009 __decorate([
26010 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('pinnedRowModel')
26011 ], GridBodyCtrl.prototype, "pinnedRowModel", void 0);
26012 __decorate([
26013 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowRenderer')
26014 ], GridBodyCtrl.prototype, "rowRenderer", void 0);
26015 __decorate([
26016 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('popupService')
26017 ], GridBodyCtrl.prototype, "popupService", void 0);
26018 __decorate([
26019 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('mouseEventService')
26020 ], GridBodyCtrl.prototype, "mouseEventService", void 0);
26021 __decorate([
26022 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowModel')
26023 ], GridBodyCtrl.prototype, "rowModel", void 0);
26024 return GridBodyCtrl;
26025}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
26026
26027
26028
26029/***/ }),
26030/* 119 */
26031/***/ (function(module, __webpack_exports__, __webpack_require__) {
26032
26033"use strict";
26034__webpack_require__.r(__webpack_exports__);
26035/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridBodyScrollFeature", function() { return GridBodyScrollFeature; });
26036/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
26037/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
26038/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
26039/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
26040/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
26041/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42);
26042/**
26043 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
26044 * @version v29.2.0
26045 * @link https://www.ag-grid.com/
26046 * @license MIT
26047 */
26048var __extends = (undefined && undefined.__extends) || (function () {
26049 var extendStatics = function (d, b) {
26050 extendStatics = Object.setPrototypeOf ||
26051 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26052 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
26053 return extendStatics(d, b);
26054 };
26055 return function (d, b) {
26056 extendStatics(d, b);
26057 function __() { this.constructor = d; }
26058 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26059 };
26060})();
26061var __assign = (undefined && undefined.__assign) || function () {
26062 __assign = Object.assign || function(t) {
26063 for (var s, i = 1, n = arguments.length; i < n; i++) {
26064 s = arguments[i];
26065 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
26066 t[p] = s[p];
26067 }
26068 return t;
26069 };
26070 return __assign.apply(this, arguments);
26071};
26072var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
26073 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
26074 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
26075 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;
26076 return c > 3 && r && Object.defineProperty(target, key, r), r;
26077};
26078
26079
26080
26081
26082
26083
26084var GridBodyScrollFeature = /** @class */ (function (_super) {
26085 __extends(GridBodyScrollFeature, _super);
26086 function GridBodyScrollFeature(eBodyViewport) {
26087 var _this = _super.call(this) || this;
26088 _this.scrollLeft = -1;
26089 _this.nextScrollTop = -1;
26090 _this.scrollTop = -1;
26091 _this.eBodyViewport = eBodyViewport;
26092 _this.resetLastHScrollDebounced = Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["debounce"])(function () { return _this.eLastHScroll = null; }, 500);
26093 _this.resetLastVScrollDebounced = Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["debounce"])(function () { return _this.eLastVScroll = null; }, 500);
26094 return _this;
26095 }
26096 GridBodyScrollFeature.prototype.postConstruct = function () {
26097 var _this = this;
26098 this.enableRtl = this.gridOptionsService.is('enableRtl');
26099 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onDisplayedColumnsWidthChanged.bind(this));
26100 this.ctrlsService.whenReady(function (p) {
26101 _this.centerRowContainerCtrl = p.centerRowContainerCtrl;
26102 _this.onDisplayedColumnsWidthChanged();
26103 _this.addScrollListener();
26104 });
26105 };
26106 GridBodyScrollFeature.prototype.addScrollListener = function () {
26107 var fakeHScroll = this.ctrlsService.getFakeHScrollComp();
26108 var fakeVScroll = this.ctrlsService.getFakeVScrollComp();
26109 this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(), 'scroll', this.onHScroll.bind(this));
26110 this.addManagedListener(fakeHScroll.getViewport(), 'scroll', this.onFakeHScroll.bind(this));
26111 var isDebounce = this.gridOptionsService.is('debounceVerticalScrollbar');
26112 var onVScroll = isDebounce ?
26113 Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["debounce"])(this.onVScroll.bind(this), 100) : this.onVScroll.bind(this);
26114 var onFakeVScroll = isDebounce ?
26115 Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["debounce"])(this.onFakeVScroll.bind(this), 100) : this.onFakeVScroll.bind(this);
26116 this.addManagedListener(this.eBodyViewport, 'scroll', onVScroll);
26117 this.addManagedListener(fakeVScroll.getViewport(), 'scroll', onFakeVScroll);
26118 };
26119 GridBodyScrollFeature.prototype.onDisplayedColumnsWidthChanged = function () {
26120 if (this.enableRtl) {
26121 // because RTL is all backwards, a change in the width of the row
26122 // can cause a change in the scroll position, without a scroll event,
26123 // because the scroll position in RTL is a function that depends on
26124 // the width. to be convinced of this, take out this line, enable RTL,
26125 // scroll all the way to the left and then resize a column
26126 this.horizontallyScrollHeaderCenterAndFloatingCenter();
26127 }
26128 };
26129 GridBodyScrollFeature.prototype.horizontallyScrollHeaderCenterAndFloatingCenter = function (scrollLeft) {
26130 // when doing RTL, this method gets called once prematurely
26131 var notYetInitialised = this.centerRowContainerCtrl == null;
26132 if (notYetInitialised) {
26133 return;
26134 }
26135 if (scrollLeft === undefined) {
26136 scrollLeft = this.centerRowContainerCtrl.getCenterViewportScrollLeft();
26137 }
26138 var offset = this.enableRtl ? scrollLeft : -scrollLeft;
26139 var topCenterContainer = this.ctrlsService.getTopCenterRowContainerCtrl();
26140 var stickyTopCenterContainer = this.ctrlsService.getStickyTopCenterRowContainerCtrl();
26141 var bottomCenterContainer = this.ctrlsService.getBottomCenterRowContainerCtrl();
26142 var fakeHScroll = this.ctrlsService.getFakeHScrollComp();
26143 var centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();
26144 centerHeaderContainer.setHorizontalScroll(offset);
26145 bottomCenterContainer.setContainerTranslateX(offset);
26146 topCenterContainer.setContainerTranslateX(offset);
26147 stickyTopCenterContainer.setContainerTranslateX(offset);
26148 var centerViewport = this.centerRowContainerCtrl.getViewportElement();
26149 var isCenterViewportLastHorizontal = this.eLastHScroll === centerViewport;
26150 var partner = isCenterViewportLastHorizontal ?
26151 fakeHScroll.getViewport() :
26152 this.centerRowContainerCtrl.getViewportElement();
26153 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setScrollLeft"])(partner, Math.abs(scrollLeft), this.enableRtl);
26154 };
26155 GridBodyScrollFeature.prototype.isControllingHScroll = function (eDiv) {
26156 if (!this.eLastHScroll) {
26157 this.eLastHScroll = eDiv;
26158 return true;
26159 }
26160 return eDiv === this.eLastHScroll;
26161 };
26162 GridBodyScrollFeature.prototype.isControllingVScroll = function (eDiv) {
26163 if (!this.eLastVScroll) {
26164 this.eLastVScroll = eDiv;
26165 return true;
26166 }
26167 return eDiv === this.eLastVScroll;
26168 };
26169 GridBodyScrollFeature.prototype.onFakeHScroll = function () {
26170 var fakeHScrollViewport = this.ctrlsService.getFakeHScrollComp().getViewport();
26171 if (!this.isControllingHScroll(fakeHScrollViewport)) {
26172 return;
26173 }
26174 this.onHScrollCommon(fakeHScrollViewport);
26175 };
26176 GridBodyScrollFeature.prototype.onHScroll = function () {
26177 var centerContainerViewport = this.centerRowContainerCtrl.getViewportElement();
26178 if (!this.isControllingHScroll(centerContainerViewport)) {
26179 return;
26180 }
26181 this.onHScrollCommon(centerContainerViewport);
26182 };
26183 GridBodyScrollFeature.prototype.onHScrollCommon = function (eSource) {
26184 var centerContainerViewport = this.centerRowContainerCtrl.getViewportElement();
26185 var scrollLeft = centerContainerViewport.scrollLeft;
26186 if (this.shouldBlockScrollUpdate('horizontal', scrollLeft, true)) {
26187 return;
26188 }
26189 // we do Math.round() rather than Math.floor(), to mirror how scroll values are applied.
26190 // eg if a scale is applied (ie user has zoomed the browser), then applying scroll=200
26191 // could result in 199.88, which then floor(199.88) = 199, however round(199.88) = 200.
26192 // initially Math.floor() was used, however this caused (almost) infinite loop with aligned grids,
26193 // as the scroll would move 1px at at time bouncing from one grid to the next (eg one grid would cause
26194 // scroll to 200px, the next to 199px, then the first back to 198px and so on).
26195 this.doHorizontalScroll(Math.round(Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["getScrollLeft"])(eSource, this.enableRtl)));
26196 this.resetLastHScrollDebounced();
26197 };
26198 GridBodyScrollFeature.prototype.onFakeVScroll = function () {
26199 var fakeVScrollViewport = this.ctrlsService.getFakeVScrollComp().getViewport();
26200 if (!this.isControllingVScroll(fakeVScrollViewport)) {
26201 return;
26202 }
26203 this.onVScrollCommon(fakeVScrollViewport);
26204 };
26205 GridBodyScrollFeature.prototype.onVScroll = function () {
26206 if (!this.isControllingVScroll(this.eBodyViewport)) {
26207 return;
26208 }
26209 this.onVScrollCommon(this.eBodyViewport);
26210 };
26211 GridBodyScrollFeature.prototype.onVScrollCommon = function (eSource) {
26212 var scrollTop = eSource.scrollTop;
26213 if (this.shouldBlockScrollUpdate('vertical', scrollTop, true)) {
26214 return;
26215 }
26216 this.animationFrameService.setScrollTop(scrollTop);
26217 this.nextScrollTop = scrollTop;
26218 if (eSource === this.eBodyViewport) {
26219 var fakeVScrollViewport = this.ctrlsService.getFakeVScrollComp().getViewport();
26220 fakeVScrollViewport.scrollTop = scrollTop;
26221 }
26222 else {
26223 this.eBodyViewport.scrollTop = scrollTop;
26224 }
26225 // the `scrollGridIfNeeded` will recalculate the rows to be rendered by the grid
26226 // so it should only be called after `eBodyViewport` has been scrolled to the correct
26227 // position, otherwise the `first` and `last` row could be miscalculated.
26228 if (this.gridOptionsService.is('suppressAnimationFrame')) {
26229 this.scrollGridIfNeeded();
26230 }
26231 else {
26232 this.animationFrameService.schedule();
26233 }
26234 this.resetLastVScrollDebounced();
26235 };
26236 GridBodyScrollFeature.prototype.doHorizontalScroll = function (scrollLeft) {
26237 var fakeHScrollViewport = this.ctrlsService.getFakeHScrollComp().getViewport();
26238 var fakeScrollLeft = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["getScrollLeft"])(fakeHScrollViewport, this.enableRtl);
26239 if (this.scrollLeft === scrollLeft && scrollLeft === fakeScrollLeft) {
26240 return;
26241 }
26242 this.scrollLeft = scrollLeft;
26243 this.fireScrollEvent('horizontal');
26244 this.horizontallyScrollHeaderCenterAndFloatingCenter(scrollLeft);
26245 this.onHorizontalViewportChanged();
26246 };
26247 GridBodyScrollFeature.prototype.fireScrollEvent = function (direction) {
26248 var _this = this;
26249 var bodyScrollEvent = {
26250 type: _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_BODY_SCROLL,
26251 direction: direction,
26252 left: this.scrollLeft,
26253 top: this.scrollTop
26254 };
26255 this.eventService.dispatchEvent(bodyScrollEvent);
26256 window.clearTimeout(this.scrollTimer);
26257 this.scrollTimer = undefined;
26258 this.scrollTimer = window.setTimeout(function () {
26259 var bodyScrollEndEvent = __assign(__assign({}, bodyScrollEvent), { type: _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_BODY_SCROLL_END });
26260 _this.eventService.dispatchEvent(bodyScrollEndEvent);
26261 }, 100);
26262 };
26263 GridBodyScrollFeature.prototype.shouldBlockScrollUpdate = function (direction, scrollTo, touchOnly) {
26264 // touch devices allow elastic scroll - which temporally scrolls the panel outside of the viewport
26265 // (eg user uses touch to go to the left of the grid, but drags past the left, the rows will actually
26266 // scroll past the left until the user releases the mouse). when this happens, we want ignore the scroll,
26267 // as otherwise it was causing the rows and header to flicker.
26268 if (touchOnly === void 0) { touchOnly = false; }
26269 // sometimes when scrolling, we got values that extended the maximum scroll allowed. we used to
26270 // ignore these scrolls. problem is the max scroll position could be skipped (eg the previous scroll event
26271 // could be 10px before the max position, and then current scroll event could be 20px after the max position).
26272 // if we just ignored the last event, we would be setting the scroll to 10px before the max position, when in
26273 // actual fact the user has exceeded the max scroll and thus scroll should be set to the max.
26274 if (touchOnly && !Object(_utils_browser__WEBPACK_IMPORTED_MODULE_5__["isIOSUserAgent"])()) {
26275 return false;
26276 }
26277 if (direction === 'vertical') {
26278 return this.shouldBlockVerticalScroll(scrollTo);
26279 }
26280 return this.shouldBlockHorizontalScroll(scrollTo);
26281 };
26282 GridBodyScrollFeature.prototype.shouldBlockVerticalScroll = function (scrollTo) {
26283 var clientHeight = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["getInnerHeight"])(this.eBodyViewport);
26284 var scrollHeight = this.eBodyViewport.scrollHeight;
26285 if (scrollTo < 0 || (scrollTo + clientHeight > scrollHeight)) {
26286 return true;
26287 }
26288 return false;
26289 };
26290 GridBodyScrollFeature.prototype.shouldBlockHorizontalScroll = function (scrollTo) {
26291 var clientWidth = this.centerRowContainerCtrl.getCenterWidth();
26292 var scrollWidth = this.centerRowContainerCtrl.getViewportElement().scrollWidth;
26293 if (this.enableRtl && Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isRtlNegativeScroll"])()) {
26294 if (scrollTo > 0) {
26295 return true;
26296 }
26297 }
26298 else if (scrollTo < 0) {
26299 return true;
26300 }
26301 if (Math.abs(scrollTo) + clientWidth > scrollWidth) {
26302 return true;
26303 }
26304 return false;
26305 };
26306 GridBodyScrollFeature.prototype.redrawRowsAfterScroll = function () {
26307 this.fireScrollEvent('vertical');
26308 };
26309 GridBodyScrollFeature.prototype.onHorizontalViewportChanged = function () {
26310 this.centerRowContainerCtrl.onHorizontalViewportChanged();
26311 };
26312 // this is to cater for AG-3274, where grid is removed from the dom and then inserted back in again.
26313 // (which happens with some implementations of tabbing). this can result in horizontal scroll getting
26314 // reset back to the left, however no scroll event is fired. so we need to get header to also scroll
26315 // back to the left to be kept in sync.
26316 // adding and removing the grid from the DOM both resets the scroll position and
26317 // triggers a resize event, so notify listeners if the scroll position has changed
26318 GridBodyScrollFeature.prototype.checkScrollLeft = function () {
26319 if (this.scrollLeft !== this.centerRowContainerCtrl.getCenterViewportScrollLeft()) {
26320 this.onHScrollCommon(this.centerRowContainerCtrl.getViewportElement());
26321 }
26322 };
26323 GridBodyScrollFeature.prototype.scrollGridIfNeeded = function () {
26324 var frameNeeded = this.scrollTop != this.nextScrollTop;
26325 if (frameNeeded) {
26326 this.scrollTop = this.nextScrollTop;
26327 this.redrawRowsAfterScroll();
26328 }
26329 return frameNeeded;
26330 };
26331 // called by scrollHorizontally method and alignedGridsService
26332 GridBodyScrollFeature.prototype.setHorizontalScrollPosition = function (hScrollPosition) {
26333 var minScrollLeft = 0;
26334 var maxScrollLeft = this.centerRowContainerCtrl.getViewportElement().scrollWidth - this.centerRowContainerCtrl.getCenterWidth();
26335 if (this.shouldBlockScrollUpdate('horizontal', hScrollPosition)) {
26336 if (this.enableRtl && Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isRtlNegativeScroll"])()) {
26337 hScrollPosition = hScrollPosition > 0 ? 0 : maxScrollLeft;
26338 }
26339 else {
26340 hScrollPosition = Math.min(Math.max(hScrollPosition, minScrollLeft), maxScrollLeft);
26341 }
26342 }
26343 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setScrollLeft"])(this.centerRowContainerCtrl.getViewportElement(), Math.abs(hScrollPosition), this.enableRtl);
26344 // we need to manually do the event handling (rather than wait for the event)
26345 // for the alignedGridsService, as if we don't, the aligned grid service gets
26346 // notified async, and then it's 'consuming' flag doesn't get used right, and
26347 // we can end up with an infinite loop
26348 this.doHorizontalScroll(hScrollPosition);
26349 };
26350 GridBodyScrollFeature.prototype.setVerticalScrollPosition = function (vScrollPosition) {
26351 this.eBodyViewport.scrollTop = vScrollPosition;
26352 };
26353 GridBodyScrollFeature.prototype.getVScrollPosition = function () {
26354 var result = {
26355 top: this.eBodyViewport.scrollTop,
26356 bottom: this.eBodyViewport.scrollTop + this.eBodyViewport.offsetHeight
26357 };
26358 return result;
26359 };
26360 GridBodyScrollFeature.prototype.getHScrollPosition = function () {
26361 return this.centerRowContainerCtrl.getHScrollPosition();
26362 };
26363 GridBodyScrollFeature.prototype.isHorizontalScrollShowing = function () {
26364 return this.centerRowContainerCtrl.isHorizontalScrollShowing();
26365 };
26366 // called by the headerRootComp and moveColumnController
26367 GridBodyScrollFeature.prototype.scrollHorizontally = function (pixels) {
26368 var oldScrollPosition = this.centerRowContainerCtrl.getViewportElement().scrollLeft;
26369 this.setHorizontalScrollPosition(oldScrollPosition + pixels);
26370 return this.centerRowContainerCtrl.getViewportElement().scrollLeft - oldScrollPosition;
26371 };
26372 // gets called by rowRenderer when new data loaded, as it will want to scroll to the top
26373 GridBodyScrollFeature.prototype.scrollToTop = function () {
26374 this.eBodyViewport.scrollTop = 0;
26375 };
26376 // Valid values for position are bottom, middle and top
26377 GridBodyScrollFeature.prototype.ensureNodeVisible = function (comparator, position) {
26378 if (position === void 0) { position = null; }
26379 // look for the node index we want to display
26380 var rowCount = this.rowModel.getRowCount();
26381 var indexToSelect = -1;
26382 // go through all the nodes, find the one we want to show
26383 for (var i = 0; i < rowCount; i++) {
26384 var node = this.rowModel.getRow(i);
26385 if (typeof comparator === 'function') {
26386 // Have to assert type here, as type could be TData & Function
26387 var predicate = comparator;
26388 if (node && predicate(node)) {
26389 indexToSelect = i;
26390 break;
26391 }
26392 }
26393 else {
26394 // check object equality against node and data
26395 if (comparator === node || comparator === node.data) {
26396 indexToSelect = i;
26397 break;
26398 }
26399 }
26400 }
26401 if (indexToSelect >= 0) {
26402 this.ensureIndexVisible(indexToSelect, position);
26403 }
26404 };
26405 // Valid values for position are bottom, middle and top
26406 // position should be {'top','middle','bottom', or undefined/null}.
26407 // if undefined/null, then the grid will to the minimal amount of scrolling,
26408 // eg if grid needs to scroll up, it scrolls until row is on top,
26409 // if grid needs to scroll down, it scrolls until row is on bottom,
26410 // if row is already in view, grid does not scroll
26411 GridBodyScrollFeature.prototype.ensureIndexVisible = function (index, position) {
26412 // if for print or auto height, everything is always visible
26413 if (this.gridOptionsService.isDomLayout('print')) {
26414 return;
26415 }
26416 var rowCount = this.paginationProxy.getRowCount();
26417 if (typeof index !== 'number' || index < 0 || index >= rowCount) {
26418 console.warn('AG Grid: Invalid row index for ensureIndexVisible: ' + index);
26419 return;
26420 }
26421 var isPaging = this.gridOptionsService.is('pagination');
26422 var paginationPanelEnabled = isPaging && !this.gridOptionsService.is('suppressPaginationPanel');
26423 if (!paginationPanelEnabled) {
26424 this.paginationProxy.goToPageWithIndex(index);
26425 }
26426 var gridBodyCtrl = this.ctrlsService.getGridBodyCtrl();
26427 var stickyTopHeight = gridBodyCtrl.getStickyTopHeight();
26428 var rowNode = this.paginationProxy.getRow(index);
26429 var rowGotShiftedDuringOperation;
26430 do {
26431 var startingRowTop = rowNode.rowTop;
26432 var startingRowHeight = rowNode.rowHeight;
26433 var paginationOffset = this.paginationProxy.getPixelOffset();
26434 var rowTopPixel = rowNode.rowTop - paginationOffset;
26435 var rowBottomPixel = rowTopPixel + rowNode.rowHeight;
26436 var scrollPosition = this.getVScrollPosition();
26437 var heightOffset = this.heightScaler.getDivStretchOffset();
26438 var vScrollTop = scrollPosition.top + heightOffset;
26439 var vScrollBottom = scrollPosition.bottom + heightOffset;
26440 var viewportHeight = vScrollBottom - vScrollTop;
26441 // work out the pixels for top, middle and bottom up front,
26442 // make the if/else below easier to read
26443 var pxTop = this.heightScaler.getScrollPositionForPixel(rowTopPixel);
26444 var pxBottom = this.heightScaler.getScrollPositionForPixel(rowBottomPixel - viewportHeight);
26445 // make sure if middle, the row is not outside the top of the grid
26446 var pxMiddle = Math.min((pxTop + pxBottom) / 2, rowTopPixel);
26447 var rowAboveViewport = (vScrollTop + stickyTopHeight) > rowTopPixel;
26448 var rowBelowViewport = vScrollBottom < rowBottomPixel;
26449 var newScrollPosition = null;
26450 if (position === 'top') {
26451 newScrollPosition = pxTop;
26452 }
26453 else if (position === 'bottom') {
26454 newScrollPosition = pxBottom;
26455 }
26456 else if (position === 'middle') {
26457 newScrollPosition = pxMiddle;
26458 }
26459 else if (rowAboveViewport) {
26460 // if row is before, scroll up with row at top
26461 newScrollPosition = pxTop - stickyTopHeight;
26462 }
26463 else if (rowBelowViewport) {
26464 // if row is after, scroll down with row at bottom
26465 newScrollPosition = pxBottom;
26466 }
26467 if (newScrollPosition !== null) {
26468 this.eBodyViewport.scrollTop = newScrollPosition;
26469 this.rowRenderer.redrawAfterScroll();
26470 }
26471 // the row can get shifted if during the rendering (during rowRenderer.redrawAfterScroll()),
26472 // the height of a row changes due to lazy calculation of row heights when using
26473 // colDef.autoHeight or gridOptions.getRowHeight.
26474 // if row was shifted, then the position we scrolled to is incorrect.
26475 rowGotShiftedDuringOperation = (startingRowTop !== rowNode.rowTop)
26476 || (startingRowHeight !== rowNode.rowHeight);
26477 } while (rowGotShiftedDuringOperation);
26478 // so when we return back to user, the cells have rendered
26479 this.animationFrameService.flushAllFrames();
26480 };
26481 GridBodyScrollFeature.prototype.ensureColumnVisible = function (key, position) {
26482 if (position === void 0) { position = 'auto'; }
26483 var column = this.columnModel.getGridColumn(key);
26484 if (!column) {
26485 return;
26486 }
26487 // calling ensureColumnVisible on a pinned column doesn't make sense
26488 if (column.isPinned()) {
26489 return;
26490 }
26491 // defensive
26492 if (!this.columnModel.isColumnDisplayed(column)) {
26493 return;
26494 }
26495 var newHorizontalScroll = this.getPositionedHorizontalScroll(column, position);
26496 if (newHorizontalScroll !== null) {
26497 this.centerRowContainerCtrl.setCenterViewportScrollLeft(newHorizontalScroll);
26498 }
26499 // this will happen anyway, as the move will cause a 'scroll' event on the body, however
26500 // it is possible that the ensureColumnVisible method is called from within AG Grid and
26501 // the caller will need to have the columns rendered to continue, which will be before
26502 // the event has been worked on (which is the case for cell navigation).
26503 this.centerRowContainerCtrl.onHorizontalViewportChanged();
26504 // so when we return back to user, the cells have rendered
26505 this.animationFrameService.flushAllFrames();
26506 };
26507 GridBodyScrollFeature.prototype.getPositionedHorizontalScroll = function (column, position) {
26508 var _a = this.isColumnOutsideViewport(column), columnBeforeStart = _a.columnBeforeStart, columnAfterEnd = _a.columnAfterEnd;
26509 var viewportTooSmallForColumn = this.centerRowContainerCtrl.getCenterWidth() < column.getActualWidth();
26510 var viewportWidth = this.centerRowContainerCtrl.getCenterWidth();
26511 var isRtl = this.enableRtl;
26512 var alignColToStart = (isRtl ? columnBeforeStart : columnAfterEnd) || viewportTooSmallForColumn;
26513 var alignColToEnd = isRtl ? columnAfterEnd : columnBeforeStart;
26514 if (position !== 'auto') {
26515 alignColToStart = position === 'start';
26516 alignColToEnd = position === 'end';
26517 }
26518 var isMiddle = position === 'middle';
26519 if (alignColToStart || alignColToEnd || isMiddle) {
26520 var _b = this.getColumnBounds(column), colLeft = _b.colLeft, colMiddle = _b.colMiddle, colRight = _b.colRight;
26521 if (isMiddle) {
26522 return colMiddle - viewportWidth / 2;
26523 }
26524 if (alignColToStart) {
26525 return isRtl ? colRight : colLeft;
26526 }
26527 return isRtl ? (colLeft - viewportWidth) : (colRight - viewportWidth);
26528 }
26529 return null;
26530 };
26531 GridBodyScrollFeature.prototype.isColumnOutsideViewport = function (column) {
26532 var _a = this.getViewportBounds(), viewportStart = _a.start, viewportEnd = _a.end;
26533 var _b = this.getColumnBounds(column), colLeft = _b.colLeft, colRight = _b.colRight;
26534 var isRtl = this.enableRtl;
26535 var columnBeforeStart = isRtl ? (viewportStart > colRight) : (viewportEnd < colRight);
26536 var columnAfterEnd = isRtl ? (viewportEnd < colLeft) : (viewportStart > colLeft);
26537 return { columnBeforeStart: columnBeforeStart, columnAfterEnd: columnAfterEnd };
26538 };
26539 GridBodyScrollFeature.prototype.getColumnBounds = function (column) {
26540 var isRtl = this.enableRtl;
26541 var bodyWidth = this.columnModel.getBodyContainerWidth();
26542 var colWidth = column.getActualWidth();
26543 var colLeft = column.getLeft();
26544 var multiplier = isRtl ? -1 : 1;
26545 var colLeftPixel = isRtl ? (bodyWidth - colLeft) : colLeft;
26546 var colRightPixel = colLeftPixel + colWidth * multiplier;
26547 var colMidPixel = colLeftPixel + colWidth / 2 * multiplier;
26548 return { colLeft: colLeftPixel, colMiddle: colMidPixel, colRight: colRightPixel };
26549 };
26550 GridBodyScrollFeature.prototype.getViewportBounds = function () {
26551 var viewportWidth = this.centerRowContainerCtrl.getCenterWidth();
26552 var scrollPosition = this.centerRowContainerCtrl.getCenterViewportScrollLeft();
26553 var viewportStartPixel = scrollPosition;
26554 var viewportEndPixel = viewportWidth + scrollPosition;
26555 return { start: viewportStartPixel, end: viewportEndPixel, width: viewportWidth };
26556 };
26557 __decorate([
26558 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
26559 ], GridBodyScrollFeature.prototype, "ctrlsService", void 0);
26560 __decorate([
26561 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('animationFrameService')
26562 ], GridBodyScrollFeature.prototype, "animationFrameService", void 0);
26563 __decorate([
26564 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
26565 ], GridBodyScrollFeature.prototype, "paginationProxy", void 0);
26566 __decorate([
26567 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
26568 ], GridBodyScrollFeature.prototype, "rowModel", void 0);
26569 __decorate([
26570 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowContainerHeightService')
26571 ], GridBodyScrollFeature.prototype, "heightScaler", void 0);
26572 __decorate([
26573 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
26574 ], GridBodyScrollFeature.prototype, "rowRenderer", void 0);
26575 __decorate([
26576 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
26577 ], GridBodyScrollFeature.prototype, "columnModel", void 0);
26578 __decorate([
26579 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
26580 ], GridBodyScrollFeature.prototype, "postConstruct", null);
26581 return GridBodyScrollFeature;
26582}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
26583
26584
26585
26586/***/ }),
26587/* 120 */
26588/***/ (function(module, __webpack_exports__, __webpack_require__) {
26589
26590"use strict";
26591__webpack_require__.r(__webpack_exports__);
26592/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowDragFeature", function() { return RowDragFeature; });
26593/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(100);
26594/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
26595/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26);
26596/* harmony import */ var _interfaces_iRowNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(110);
26597/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19);
26598/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
26599/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7);
26600/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(13);
26601/* harmony import */ var _autoScrollService__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(121);
26602/**
26603 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
26604 * @version v29.2.0
26605 * @link https://www.ag-grid.com/
26606 * @license MIT
26607 */
26608var __extends = (undefined && undefined.__extends) || (function () {
26609 var extendStatics = function (d, b) {
26610 extendStatics = Object.setPrototypeOf ||
26611 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26612 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
26613 return extendStatics(d, b);
26614 };
26615 return function (d, b) {
26616 extendStatics(d, b);
26617 function __() { this.constructor = d; }
26618 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26619 };
26620})();
26621var __assign = (undefined && undefined.__assign) || function () {
26622 __assign = Object.assign || function(t) {
26623 for (var s, i = 1, n = arguments.length; i < n; i++) {
26624 s = arguments[i];
26625 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
26626 t[p] = s[p];
26627 }
26628 return t;
26629 };
26630 return __assign.apply(this, arguments);
26631};
26632var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
26633 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
26634 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
26635 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;
26636 return c > 3 && r && Object.defineProperty(target, key, r), r;
26637};
26638var __read = (undefined && undefined.__read) || function (o, n) {
26639 var m = typeof Symbol === "function" && o[Symbol.iterator];
26640 if (!m) return o;
26641 var i = m.call(o), r, ar = [], e;
26642 try {
26643 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
26644 }
26645 catch (error) { e = { error: error }; }
26646 finally {
26647 try {
26648 if (r && !r.done && (m = i["return"])) m.call(i);
26649 }
26650 finally { if (e) throw e.error; }
26651 }
26652 return ar;
26653};
26654var __spread = (undefined && undefined.__spread) || function () {
26655 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
26656 return ar;
26657};
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667var RowDragFeature = /** @class */ (function (_super) {
26668 __extends(RowDragFeature, _super);
26669 function RowDragFeature(eContainer) {
26670 var _this = _super.call(this) || this;
26671 _this.isMultiRowDrag = false;
26672 _this.isGridSorted = false;
26673 _this.isGridFiltered = false;
26674 _this.isRowGroupActive = false;
26675 _this.eContainer = eContainer;
26676 return _this;
26677 }
26678 RowDragFeature.prototype.postConstruct = function () {
26679 var _this = this;
26680 if (this.gridOptionsService.isRowModelType('clientSide')) {
26681 this.clientSideRowModel = this.rowModel;
26682 }
26683 var refreshStatus = function () {
26684 _this.onSortChanged();
26685 _this.onFilterChanged();
26686 _this.onRowGroupChanged();
26687 };
26688 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SORT_CHANGED, this.onSortChanged.bind(this));
26689 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));
26690 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, this.onRowGroupChanged.bind(this));
26691 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_MODEL_UPDATED, function () {
26692 refreshStatus();
26693 });
26694 refreshStatus();
26695 this.ctrlsService.whenReady(function () {
26696 var gridBodyCon = _this.ctrlsService.getGridBodyCtrl();
26697 _this.autoScrollService = new _autoScrollService__WEBPACK_IMPORTED_MODULE_8__["AutoScrollService"]({
26698 scrollContainer: gridBodyCon.getBodyViewportElement(),
26699 scrollAxis: 'y',
26700 getVerticalPosition: function () { return gridBodyCon.getScrollFeature().getVScrollPosition().top; },
26701 setVerticalPosition: function (position) { return gridBodyCon.getScrollFeature().setVerticalScrollPosition(position); },
26702 onScrollCallback: function () { _this.onDragging(_this.lastDraggingEvent); }
26703 });
26704 });
26705 };
26706 RowDragFeature.prototype.onSortChanged = function () {
26707 this.isGridSorted = this.sortController.isSortActive();
26708 };
26709 RowDragFeature.prototype.onFilterChanged = function () {
26710 this.isGridFiltered = this.filterManager.isAnyFilterPresent();
26711 };
26712 RowDragFeature.prototype.onRowGroupChanged = function () {
26713 var rowGroups = this.columnModel.getRowGroupColumns();
26714 this.isRowGroupActive = !Object(_utils_generic__WEBPACK_IMPORTED_MODULE_6__["missingOrEmpty"])(rowGroups);
26715 };
26716 RowDragFeature.prototype.getContainer = function () {
26717 return this.eContainer;
26718 };
26719 RowDragFeature.prototype.isInterestedIn = function (type) {
26720 return type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragSourceType"].RowDrag;
26721 };
26722 RowDragFeature.prototype.getIconName = function () {
26723 var managedDrag = this.gridOptionsService.is('rowDragManaged');
26724 if (managedDrag && this.shouldPreventRowMove()) {
26725 return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragAndDropService"].ICON_NOT_ALLOWED;
26726 }
26727 return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragAndDropService"].ICON_MOVE;
26728 };
26729 RowDragFeature.prototype.shouldPreventRowMove = function () {
26730 return this.isGridSorted || this.isGridFiltered || this.isRowGroupActive;
26731 };
26732 RowDragFeature.prototype.getRowNodes = function (draggingEvent) {
26733 var _this = this;
26734 if (!this.isFromThisGrid(draggingEvent)) {
26735 return (draggingEvent.dragItem.rowNodes || []);
26736 }
26737 var isRowDragMultiRow = this.gridOptionsService.is('rowDragMultiRow');
26738 var selectedNodes = __spread(this.selectionService.getSelectedNodes()).sort(function (a, b) {
26739 if (a.rowIndex == null || b.rowIndex == null) {
26740 return 0;
26741 }
26742 return _this.getRowIndexNumber(a) - _this.getRowIndexNumber(b);
26743 });
26744 var currentNode = draggingEvent.dragItem.rowNode;
26745 if (isRowDragMultiRow && selectedNodes.indexOf(currentNode) !== -1) {
26746 this.isMultiRowDrag = true;
26747 return selectedNodes;
26748 }
26749 this.isMultiRowDrag = false;
26750 return [currentNode];
26751 };
26752 RowDragFeature.prototype.onDragEnter = function (draggingEvent) {
26753 // builds a lits of all rows being dragged before firing events
26754 draggingEvent.dragItem.rowNodes = this.getRowNodes(draggingEvent);
26755 // when entering, we fire the enter event, then in onEnterOrDragging,
26756 // we also fire the move event. so we get both events when entering.
26757 this.dispatchGridEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_ENTER, draggingEvent);
26758 this.getRowNodes(draggingEvent).forEach(function (rowNode) {
26759 rowNode.setDragging(true);
26760 });
26761 this.onEnterOrDragging(draggingEvent);
26762 };
26763 RowDragFeature.prototype.onDragging = function (draggingEvent) {
26764 this.onEnterOrDragging(draggingEvent);
26765 };
26766 RowDragFeature.prototype.isFromThisGrid = function (draggingEvent) {
26767 var dragSourceDomDataKey = draggingEvent.dragSource.dragSourceDomDataKey;
26768 return dragSourceDomDataKey === this.gridOptionsService.getDomDataKey();
26769 };
26770 RowDragFeature.prototype.isDropZoneWithinThisGrid = function (draggingEvent) {
26771 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
26772 var gridGui = gridBodyCon.getGui();
26773 var dropZoneTarget = draggingEvent.dropZoneTarget;
26774 return !gridGui.contains(dropZoneTarget);
26775 };
26776 RowDragFeature.prototype.onEnterOrDragging = function (draggingEvent) {
26777 // this event is fired for enter and move
26778 this.dispatchGridEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_MOVE, draggingEvent);
26779 this.lastDraggingEvent = draggingEvent;
26780 var pixel = this.mouseEventService.getNormalisedPosition(draggingEvent).y;
26781 var managedDrag = this.gridOptionsService.is('rowDragManaged');
26782 if (managedDrag) {
26783 this.doManagedDrag(draggingEvent, pixel);
26784 }
26785 this.autoScrollService.check(draggingEvent.event);
26786 };
26787 RowDragFeature.prototype.doManagedDrag = function (draggingEvent, pixel) {
26788 var isFromThisGrid = this.isFromThisGrid(draggingEvent);
26789 var managedDrag = this.gridOptionsService.is('rowDragManaged');
26790 var rowNodes = draggingEvent.dragItem.rowNodes;
26791 if (managedDrag && this.shouldPreventRowMove()) {
26792 return;
26793 }
26794 if (this.gridOptionsService.is('suppressMoveWhenRowDragging') || !isFromThisGrid) {
26795 if (!this.isDropZoneWithinThisGrid(draggingEvent)) {
26796 this.clientSideRowModel.highlightRowAtPixel(rowNodes[0], pixel);
26797 }
26798 }
26799 else {
26800 this.moveRows(rowNodes, pixel);
26801 }
26802 };
26803 RowDragFeature.prototype.getRowIndexNumber = function (rowNode) {
26804 return parseInt(Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(rowNode.getRowIndexString().split('-')), 10);
26805 };
26806 RowDragFeature.prototype.moveRowAndClearHighlight = function (draggingEvent) {
26807 var _this = this;
26808 var lastHighlightedRowNode = this.clientSideRowModel.getLastHighlightedRowNode();
26809 var isBelow = lastHighlightedRowNode && lastHighlightedRowNode.highlighted === _interfaces_iRowNode__WEBPACK_IMPORTED_MODULE_3__["RowHighlightPosition"].Below;
26810 var pixel = this.mouseEventService.getNormalisedPosition(draggingEvent).y;
26811 var rowNodes = draggingEvent.dragItem.rowNodes;
26812 var increment = isBelow ? 1 : 0;
26813 if (this.isFromThisGrid(draggingEvent)) {
26814 rowNodes.forEach(function (rowNode) {
26815 if (rowNode.rowTop < pixel) {
26816 increment -= 1;
26817 }
26818 });
26819 this.moveRows(rowNodes, pixel, increment);
26820 }
26821 else {
26822 var getRowIdFunc_1 = this.gridOptionsService.getRowIdFunc();
26823 var addIndex = this.clientSideRowModel.getRowIndexAtPixel(pixel) + 1;
26824 if (this.clientSideRowModel.getHighlightPosition(pixel) === _interfaces_iRowNode__WEBPACK_IMPORTED_MODULE_3__["RowHighlightPosition"].Above) {
26825 addIndex--;
26826 }
26827 this.clientSideRowModel.updateRowData({
26828 add: rowNodes
26829 .map(function (node) { return node.data; })
26830 .filter(function (data) { return !_this.clientSideRowModel.getRowNode(getRowIdFunc_1 ? getRowIdFunc_1({ data: data, level: 0 }) : data.id); }),
26831 addIndex: addIndex
26832 });
26833 }
26834 this.clearRowHighlight();
26835 };
26836 RowDragFeature.prototype.clearRowHighlight = function () {
26837 this.clientSideRowModel.highlightRowAtPixel(null);
26838 };
26839 RowDragFeature.prototype.moveRows = function (rowNodes, pixel, increment) {
26840 if (increment === void 0) { increment = 0; }
26841 var rowWasMoved = this.clientSideRowModel.ensureRowsAtPixel(rowNodes, pixel, increment);
26842 if (rowWasMoved) {
26843 this.focusService.clearFocusedCell();
26844 if (this.rangeService) {
26845 this.rangeService.removeAllCellRanges();
26846 }
26847 }
26848 };
26849 RowDragFeature.prototype.addRowDropZone = function (params) {
26850 var _this = this;
26851 if (!params.getContainer()) {
26852 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');
26853 return;
26854 }
26855 if (this.dragAndDropService.findExternalZone(params)) {
26856 console.warn('AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.');
26857 return;
26858 }
26859 var processedParams = {
26860 getContainer: params.getContainer
26861 };
26862 if (params.fromGrid) {
26863 params.fromGrid = undefined;
26864 processedParams = params;
26865 }
26866 else {
26867 if (params.onDragEnter) {
26868 processedParams.onDragEnter = function (e) {
26869 params.onDragEnter(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_ENTER, e));
26870 };
26871 }
26872 if (params.onDragLeave) {
26873 processedParams.onDragLeave = function (e) {
26874 params.onDragLeave(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_LEAVE, e));
26875 };
26876 }
26877 if (params.onDragging) {
26878 processedParams.onDragging = function (e) {
26879 params.onDragging(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_MOVE, e));
26880 };
26881 }
26882 if (params.onDragStop) {
26883 processedParams.onDragStop = function (e) {
26884 params.onDragStop(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_END, e));
26885 };
26886 }
26887 }
26888 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));
26889 };
26890 RowDragFeature.prototype.getRowDropZone = function (events) {
26891 var _this = this;
26892 var getContainer = this.getContainer.bind(this);
26893 var onDragEnter = this.onDragEnter.bind(this);
26894 var onDragLeave = this.onDragLeave.bind(this);
26895 var onDragging = this.onDragging.bind(this);
26896 var onDragStop = this.onDragStop.bind(this);
26897 if (!events) {
26898 return { getContainer: getContainer, onDragEnter: onDragEnter, onDragLeave: onDragLeave, onDragging: onDragging, onDragStop: onDragStop, /* @private */ fromGrid: true };
26899 }
26900 return {
26901 getContainer: getContainer,
26902 onDragEnter: events.onDragEnter
26903 ? (function (e) {
26904 onDragEnter(e);
26905 events.onDragEnter(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_ENTER, e));
26906 })
26907 : onDragEnter,
26908 onDragLeave: events.onDragLeave
26909 ? (function (e) {
26910 onDragLeave(e);
26911 events.onDragLeave(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_LEAVE, e));
26912 })
26913 : onDragLeave,
26914 onDragging: events.onDragging
26915 ? (function (e) {
26916 onDragging(e);
26917 events.onDragging(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_MOVE, e));
26918 })
26919 : onDragging,
26920 onDragStop: events.onDragStop
26921 ? (function (e) {
26922 onDragStop(e);
26923 events.onDragStop(_this.draggingToRowDragEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_END, e));
26924 })
26925 : onDragStop,
26926 fromGrid: true /* @private */
26927 };
26928 };
26929 RowDragFeature.prototype.draggingToRowDragEvent = function (type, draggingEvent) {
26930 var yNormalised = this.mouseEventService.getNormalisedPosition(draggingEvent).y;
26931 var mouseIsPastLastRow = yNormalised > this.paginationProxy.getCurrentPageHeight();
26932 var overIndex = -1;
26933 var overNode;
26934 if (!mouseIsPastLastRow) {
26935 overIndex = this.rowModel.getRowIndexAtPixel(yNormalised);
26936 overNode = this.rowModel.getRow(overIndex);
26937 }
26938 var vDirectionString;
26939 switch (draggingEvent.vDirection) {
26940 case _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["VerticalDirection"].Down:
26941 vDirectionString = 'down';
26942 break;
26943 case _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["VerticalDirection"].Up:
26944 vDirectionString = 'up';
26945 break;
26946 default:
26947 vDirectionString = null;
26948 break;
26949 }
26950 var event = {
26951 type: type,
26952 api: this.gridOptionsService.api,
26953 columnApi: this.gridOptionsService.columnApi,
26954 context: this.gridOptionsService.context,
26955 event: draggingEvent.event,
26956 node: draggingEvent.dragItem.rowNode,
26957 nodes: draggingEvent.dragItem.rowNodes,
26958 overIndex: overIndex,
26959 overNode: overNode,
26960 y: yNormalised,
26961 vDirection: vDirectionString
26962 };
26963 return event;
26964 };
26965 RowDragFeature.prototype.dispatchGridEvent = function (type, draggingEvent) {
26966 var event = this.draggingToRowDragEvent(type, draggingEvent);
26967 this.eventService.dispatchEvent(event);
26968 };
26969 RowDragFeature.prototype.onDragLeave = function (draggingEvent) {
26970 this.dispatchGridEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_LEAVE, draggingEvent);
26971 this.stopDragging(draggingEvent);
26972 if (this.gridOptionsService.is('rowDragManaged')) {
26973 this.clearRowHighlight();
26974 }
26975 if (this.isFromThisGrid(draggingEvent)) {
26976 this.isMultiRowDrag = false;
26977 }
26978 };
26979 RowDragFeature.prototype.onDragStop = function (draggingEvent) {
26980 this.dispatchGridEvent(_eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_DRAG_END, draggingEvent);
26981 this.stopDragging(draggingEvent);
26982 if (this.gridOptionsService.is('rowDragManaged') &&
26983 (this.gridOptionsService.is('suppressMoveWhenRowDragging') || !this.isFromThisGrid(draggingEvent)) &&
26984 !this.isDropZoneWithinThisGrid(draggingEvent)) {
26985 this.moveRowAndClearHighlight(draggingEvent);
26986 }
26987 };
26988 RowDragFeature.prototype.stopDragging = function (draggingEvent) {
26989 this.autoScrollService.ensureCleared();
26990 this.getRowNodes(draggingEvent).forEach(function (rowNode) {
26991 rowNode.setDragging(false);
26992 });
26993 };
26994 __decorate([
26995 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragAndDropService')
26996 ], RowDragFeature.prototype, "dragAndDropService", void 0);
26997 __decorate([
26998 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowModel')
26999 ], RowDragFeature.prototype, "rowModel", void 0);
27000 __decorate([
27001 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('paginationProxy')
27002 ], RowDragFeature.prototype, "paginationProxy", void 0);
27003 __decorate([
27004 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
27005 ], RowDragFeature.prototype, "columnModel", void 0);
27006 __decorate([
27007 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('focusService')
27008 ], RowDragFeature.prototype, "focusService", void 0);
27009 __decorate([
27010 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('sortController')
27011 ], RowDragFeature.prototype, "sortController", void 0);
27012 __decorate([
27013 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('filterManager')
27014 ], RowDragFeature.prototype, "filterManager", void 0);
27015 __decorate([
27016 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('selectionService')
27017 ], RowDragFeature.prototype, "selectionService", void 0);
27018 __decorate([
27019 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('mouseEventService')
27020 ], RowDragFeature.prototype, "mouseEventService", void 0);
27021 __decorate([
27022 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
27023 ], RowDragFeature.prototype, "ctrlsService", void 0);
27024 __decorate([
27025 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Optional"])('rangeService')
27026 ], RowDragFeature.prototype, "rangeService", void 0);
27027 __decorate([
27028 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
27029 ], RowDragFeature.prototype, "postConstruct", null);
27030 return RowDragFeature;
27031}(_context_beanStub__WEBPACK_IMPORTED_MODULE_5__["BeanStub"]));
27032
27033
27034
27035/***/ }),
27036/* 121 */
27037/***/ (function(module, __webpack_exports__, __webpack_require__) {
27038
27039"use strict";
27040__webpack_require__.r(__webpack_exports__);
27041/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutoScrollService", function() { return AutoScrollService; });
27042/**
27043 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
27044 * @version v29.2.0
27045 * @link https://www.ag-grid.com/
27046 * @license MIT
27047 */
27048var AutoScrollService = /** @class */ (function () {
27049 function AutoScrollService(params) {
27050 this.tickingInterval = null;
27051 this.onScrollCallback = null;
27052 this.scrollContainer = params.scrollContainer;
27053 this.scrollHorizontally = params.scrollAxis.indexOf('x') !== -1;
27054 this.scrollVertically = params.scrollAxis.indexOf('y') !== -1;
27055 this.scrollByTick = params.scrollByTick != null ? params.scrollByTick : 20;
27056 if (params.onScrollCallback) {
27057 this.onScrollCallback = params.onScrollCallback;
27058 }
27059 if (this.scrollVertically) {
27060 this.getVerticalPosition = params.getVerticalPosition;
27061 this.setVerticalPosition = params.setVerticalPosition;
27062 }
27063 if (this.scrollHorizontally) {
27064 this.getHorizontalPosition = params.getHorizontalPosition;
27065 this.setHorizontalPosition = params.setHorizontalPosition;
27066 }
27067 this.shouldSkipVerticalScroll = params.shouldSkipVerticalScroll || (function () { return false; });
27068 this.shouldSkipHorizontalScroll = params.shouldSkipHorizontalScroll || (function () { return false; });
27069 }
27070 AutoScrollService.prototype.check = function (mouseEvent, forceSkipVerticalScroll) {
27071 if (forceSkipVerticalScroll === void 0) { forceSkipVerticalScroll = false; }
27072 var skipVerticalScroll = forceSkipVerticalScroll || this.shouldSkipVerticalScroll();
27073 if (skipVerticalScroll && this.shouldSkipHorizontalScroll()) {
27074 return;
27075 }
27076 var rect = this.scrollContainer.getBoundingClientRect();
27077 var scrollTick = this.scrollByTick;
27078 this.tickLeft = mouseEvent.clientX < (rect.left + scrollTick);
27079 this.tickRight = mouseEvent.clientX > (rect.right - scrollTick);
27080 this.tickUp = mouseEvent.clientY < (rect.top + scrollTick) && !skipVerticalScroll;
27081 this.tickDown = mouseEvent.clientY > (rect.bottom - scrollTick) && !skipVerticalScroll;
27082 if (this.tickLeft || this.tickRight || this.tickUp || this.tickDown) {
27083 this.ensureTickingStarted();
27084 }
27085 else {
27086 this.ensureCleared();
27087 }
27088 };
27089 AutoScrollService.prototype.ensureTickingStarted = function () {
27090 if (this.tickingInterval === null) {
27091 this.tickingInterval = window.setInterval(this.doTick.bind(this), 100);
27092 this.tickCount = 0;
27093 }
27094 };
27095 AutoScrollService.prototype.doTick = function () {
27096 this.tickCount++;
27097 var tickAmount;
27098 tickAmount = this.tickCount > 20 ? 200 : (this.tickCount > 10 ? 80 : 40);
27099 if (this.scrollVertically) {
27100 var vScrollPosition = this.getVerticalPosition();
27101 if (this.tickUp) {
27102 this.setVerticalPosition(vScrollPosition - tickAmount);
27103 }
27104 if (this.tickDown) {
27105 this.setVerticalPosition(vScrollPosition + tickAmount);
27106 }
27107 }
27108 if (this.scrollHorizontally) {
27109 var hScrollPosition = this.getHorizontalPosition();
27110 if (this.tickLeft) {
27111 this.setHorizontalPosition(hScrollPosition - tickAmount);
27112 }
27113 if (this.tickRight) {
27114 this.setHorizontalPosition(hScrollPosition + tickAmount);
27115 }
27116 }
27117 if (this.onScrollCallback) {
27118 this.onScrollCallback();
27119 }
27120 };
27121 AutoScrollService.prototype.ensureCleared = function () {
27122 if (this.tickingInterval) {
27123 window.clearInterval(this.tickingInterval);
27124 this.tickingInterval = null;
27125 }
27126 };
27127 return AutoScrollService;
27128}());
27129
27130
27131
27132/***/ }),
27133/* 122 */
27134/***/ (function(module, __webpack_exports__, __webpack_require__) {
27135
27136"use strict";
27137__webpack_require__.r(__webpack_exports__);
27138/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerName", function() { return RowContainerName; });
27139/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerType", function() { return RowContainerType; });
27140/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRowContainerTypeForName", function() { return getRowContainerTypeForName; });
27141/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerCtrl", function() { return RowContainerCtrl; });
27142/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
27143/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
27144/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26);
27145/* harmony import */ var _rowContainerEventsFeature__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(123);
27146/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45);
27147/* harmony import */ var _viewportSizeFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(135);
27148/* harmony import */ var _utils_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32);
27149/* harmony import */ var _setPinnedLeftWidthFeature__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(136);
27150/* harmony import */ var _setPinnedRightWidthFeature__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(137);
27151/* harmony import */ var _setHeightFeature__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(138);
27152/* harmony import */ var _dragListenerFeature__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(139);
27153/* harmony import */ var _centerWidthFeature__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(140);
27154/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(42);
27155/**
27156 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
27157 * @version v29.2.0
27158 * @link https://www.ag-grid.com/
27159 * @license MIT
27160 */
27161var __extends = (undefined && undefined.__extends) || (function () {
27162 var extendStatics = function (d, b) {
27163 extendStatics = Object.setPrototypeOf ||
27164 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
27165 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
27166 return extendStatics(d, b);
27167 };
27168 return function (d, b) {
27169 extendStatics(d, b);
27170 function __() { this.constructor = d; }
27171 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
27172 };
27173})();
27174var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
27175 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
27176 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
27177 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;
27178 return c > 3 && r && Object.defineProperty(target, key, r), r;
27179};
27180var __read = (undefined && undefined.__read) || function (o, n) {
27181 var m = typeof Symbol === "function" && o[Symbol.iterator];
27182 if (!m) return o;
27183 var i = m.call(o), r, ar = [], e;
27184 try {
27185 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
27186 }
27187 catch (error) { e = { error: error }; }
27188 finally {
27189 try {
27190 if (r && !r.done && (m = i["return"])) m.call(i);
27191 }
27192 finally { if (e) throw e.error; }
27193 }
27194 return ar;
27195};
27196var __spread = (undefined && undefined.__spread) || function () {
27197 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
27198 return ar;
27199};
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213var RowContainerName;
27214(function (RowContainerName) {
27215 RowContainerName["LEFT"] = "left";
27216 RowContainerName["RIGHT"] = "right";
27217 RowContainerName["CENTER"] = "center";
27218 RowContainerName["FULL_WIDTH"] = "fullWidth";
27219 RowContainerName["TOP_LEFT"] = "topLeft";
27220 RowContainerName["TOP_RIGHT"] = "topRight";
27221 RowContainerName["TOP_CENTER"] = "topCenter";
27222 RowContainerName["TOP_FULL_WIDTH"] = "topFullWidth";
27223 RowContainerName["STICKY_TOP_LEFT"] = "stickyTopLeft";
27224 RowContainerName["STICKY_TOP_RIGHT"] = "stickyTopRight";
27225 RowContainerName["STICKY_TOP_CENTER"] = "stickyTopCenter";
27226 RowContainerName["STICKY_TOP_FULL_WIDTH"] = "stickyTopFullWidth";
27227 RowContainerName["BOTTOM_LEFT"] = "bottomLeft";
27228 RowContainerName["BOTTOM_RIGHT"] = "bottomRight";
27229 RowContainerName["BOTTOM_CENTER"] = "bottomCenter";
27230 RowContainerName["BOTTOM_FULL_WIDTH"] = "bottomFullWidth";
27231})(RowContainerName || (RowContainerName = {}));
27232var RowContainerType;
27233(function (RowContainerType) {
27234 RowContainerType["LEFT"] = "left";
27235 RowContainerType["RIGHT"] = "right";
27236 RowContainerType["CENTER"] = "center";
27237 RowContainerType["FULL_WIDTH"] = "fullWidth";
27238})(RowContainerType || (RowContainerType = {}));
27239function getRowContainerTypeForName(name) {
27240 switch (name) {
27241 case RowContainerName.CENTER:
27242 case RowContainerName.TOP_CENTER:
27243 case RowContainerName.STICKY_TOP_CENTER:
27244 case RowContainerName.BOTTOM_CENTER:
27245 return RowContainerType.CENTER;
27246 case RowContainerName.LEFT:
27247 case RowContainerName.TOP_LEFT:
27248 case RowContainerName.STICKY_TOP_LEFT:
27249 case RowContainerName.BOTTOM_LEFT:
27250 return RowContainerType.LEFT;
27251 case RowContainerName.RIGHT:
27252 case RowContainerName.TOP_RIGHT:
27253 case RowContainerName.STICKY_TOP_RIGHT:
27254 case RowContainerName.BOTTOM_RIGHT:
27255 return RowContainerType.RIGHT;
27256 case RowContainerName.FULL_WIDTH:
27257 case RowContainerName.TOP_FULL_WIDTH:
27258 case RowContainerName.STICKY_TOP_FULL_WIDTH:
27259 case RowContainerName.BOTTOM_FULL_WIDTH:
27260 return RowContainerType.FULL_WIDTH;
27261 default:
27262 throw Error('Invalid Row Container Type');
27263 }
27264}
27265var ContainerCssClasses = Object(_utils_map__WEBPACK_IMPORTED_MODULE_6__["convertToMap"])([
27266 [RowContainerName.CENTER, 'ag-center-cols-container'],
27267 [RowContainerName.LEFT, 'ag-pinned-left-cols-container'],
27268 [RowContainerName.RIGHT, 'ag-pinned-right-cols-container'],
27269 [RowContainerName.FULL_WIDTH, 'ag-full-width-container'],
27270 [RowContainerName.TOP_CENTER, 'ag-floating-top-container'],
27271 [RowContainerName.TOP_LEFT, 'ag-pinned-left-floating-top'],
27272 [RowContainerName.TOP_RIGHT, 'ag-pinned-right-floating-top'],
27273 [RowContainerName.TOP_FULL_WIDTH, 'ag-floating-top-full-width-container'],
27274 [RowContainerName.STICKY_TOP_CENTER, 'ag-sticky-top-container'],
27275 [RowContainerName.STICKY_TOP_LEFT, 'ag-pinned-left-sticky-top'],
27276 [RowContainerName.STICKY_TOP_RIGHT, 'ag-pinned-right-sticky-top'],
27277 [RowContainerName.STICKY_TOP_FULL_WIDTH, 'ag-sticky-top-full-width-container'],
27278 [RowContainerName.BOTTOM_CENTER, 'ag-floating-bottom-container'],
27279 [RowContainerName.BOTTOM_LEFT, 'ag-pinned-left-floating-bottom'],
27280 [RowContainerName.BOTTOM_RIGHT, 'ag-pinned-right-floating-bottom'],
27281 [RowContainerName.BOTTOM_FULL_WIDTH, 'ag-floating-bottom-full-width-container'],
27282]);
27283var ViewportCssClasses = Object(_utils_map__WEBPACK_IMPORTED_MODULE_6__["convertToMap"])([
27284 [RowContainerName.CENTER, 'ag-center-cols-viewport'],
27285 [RowContainerName.TOP_CENTER, 'ag-floating-top-viewport'],
27286 [RowContainerName.STICKY_TOP_CENTER, 'ag-sticky-top-viewport'],
27287 [RowContainerName.BOTTOM_CENTER, 'ag-floating-bottom-viewport'],
27288]);
27289var WrapperCssClasses = Object(_utils_map__WEBPACK_IMPORTED_MODULE_6__["convertToMap"])([
27290 [RowContainerName.CENTER, 'ag-center-cols-clipper'],
27291]);
27292var RowContainerCtrl = /** @class */ (function (_super) {
27293 __extends(RowContainerCtrl, _super);
27294 function RowContainerCtrl(name) {
27295 var _this = _super.call(this) || this;
27296 _this.visible = true;
27297 // Maintaining a constant reference enables optimization in React.
27298 _this.EMPTY_CTRLS = [];
27299 _this.name = name;
27300 _this.isFullWithContainer =
27301 _this.name === RowContainerName.TOP_FULL_WIDTH
27302 || _this.name === RowContainerName.STICKY_TOP_FULL_WIDTH
27303 || _this.name === RowContainerName.BOTTOM_FULL_WIDTH
27304 || _this.name === RowContainerName.FULL_WIDTH;
27305 return _this;
27306 }
27307 RowContainerCtrl.getRowContainerCssClasses = function (name) {
27308 var containerClass = ContainerCssClasses.get(name);
27309 var viewportClass = ViewportCssClasses.get(name);
27310 var wrapperClass = WrapperCssClasses.get(name);
27311 return { container: containerClass, viewport: viewportClass, wrapper: wrapperClass };
27312 };
27313 RowContainerCtrl.getPinned = function (name) {
27314 switch (name) {
27315 case RowContainerName.BOTTOM_LEFT:
27316 case RowContainerName.TOP_LEFT:
27317 case RowContainerName.STICKY_TOP_LEFT:
27318 case RowContainerName.LEFT:
27319 return 'left';
27320 case RowContainerName.BOTTOM_RIGHT:
27321 case RowContainerName.TOP_RIGHT:
27322 case RowContainerName.STICKY_TOP_RIGHT:
27323 case RowContainerName.RIGHT:
27324 return 'right';
27325 default:
27326 return null;
27327 }
27328 };
27329 RowContainerCtrl.prototype.postConstruct = function () {
27330 var _this = this;
27331 this.enableRtl = this.gridOptionsService.is('enableRtl');
27332 this.embedFullWidthRows = this.gridOptionsService.is('embedFullWidthRows');
27333 this.forContainers([RowContainerName.CENTER], function () { return _this.viewportSizeFeature = _this.createManagedBean(new _viewportSizeFeature__WEBPACK_IMPORTED_MODULE_5__["ViewportSizeFeature"](_this)); });
27334 };
27335 RowContainerCtrl.prototype.registerWithCtrlsService = function () {
27336 switch (this.name) {
27337 case RowContainerName.CENTER:
27338 this.ctrlsService.registerCenterRowContainerCtrl(this);
27339 break;
27340 case RowContainerName.LEFT:
27341 this.ctrlsService.registerLeftRowContainerCtrl(this);
27342 break;
27343 case RowContainerName.RIGHT:
27344 this.ctrlsService.registerRightRowContainerCtrl(this);
27345 break;
27346 case RowContainerName.TOP_CENTER:
27347 this.ctrlsService.registerTopCenterRowContainerCtrl(this);
27348 break;
27349 case RowContainerName.TOP_LEFT:
27350 this.ctrlsService.registerTopLeftRowContainerCon(this);
27351 break;
27352 case RowContainerName.TOP_RIGHT:
27353 this.ctrlsService.registerTopRightRowContainerCtrl(this);
27354 break;
27355 case RowContainerName.STICKY_TOP_CENTER:
27356 this.ctrlsService.registerStickyTopCenterRowContainerCtrl(this);
27357 break;
27358 case RowContainerName.STICKY_TOP_LEFT:
27359 this.ctrlsService.registerStickyTopLeftRowContainerCon(this);
27360 break;
27361 case RowContainerName.STICKY_TOP_RIGHT:
27362 this.ctrlsService.registerStickyTopRightRowContainerCtrl(this);
27363 break;
27364 case RowContainerName.BOTTOM_CENTER:
27365 this.ctrlsService.registerBottomCenterRowContainerCtrl(this);
27366 break;
27367 case RowContainerName.BOTTOM_LEFT:
27368 this.ctrlsService.registerBottomLeftRowContainerCtrl(this);
27369 break;
27370 case RowContainerName.BOTTOM_RIGHT:
27371 this.ctrlsService.registerBottomRightRowContainerCtrl(this);
27372 break;
27373 }
27374 };
27375 RowContainerCtrl.prototype.forContainers = function (names, callback) {
27376 if (names.indexOf(this.name) >= 0) {
27377 callback();
27378 }
27379 };
27380 RowContainerCtrl.prototype.getContainerElement = function () {
27381 return this.eContainer;
27382 };
27383 RowContainerCtrl.prototype.getViewportSizeFeature = function () {
27384 return this.viewportSizeFeature;
27385 };
27386 RowContainerCtrl.prototype.setComp = function (view, eContainer, eViewport, eWrapper) {
27387 var _this = this;
27388 this.comp = view;
27389 this.eContainer = eContainer;
27390 this.eViewport = eViewport;
27391 this.eWrapper = eWrapper;
27392 this.createManagedBean(new _rowContainerEventsFeature__WEBPACK_IMPORTED_MODULE_3__["RowContainerEventsFeature"](this.eContainer));
27393 this.addPreventScrollWhileDragging();
27394 this.listenOnDomOrder();
27395 this.stopHScrollOnPinnedRows();
27396 var allTopNoFW = [RowContainerName.TOP_CENTER, RowContainerName.TOP_LEFT, RowContainerName.TOP_RIGHT];
27397 var allStickyTopNoFW = [RowContainerName.STICKY_TOP_CENTER, RowContainerName.STICKY_TOP_LEFT, RowContainerName.STICKY_TOP_RIGHT];
27398 var allBottomNoFW = [RowContainerName.BOTTOM_CENTER, RowContainerName.BOTTOM_LEFT, RowContainerName.BOTTOM_RIGHT];
27399 var allMiddleNoFW = [RowContainerName.CENTER, RowContainerName.LEFT, RowContainerName.RIGHT];
27400 var allNoFW = __spread(allTopNoFW, allBottomNoFW, allMiddleNoFW, allStickyTopNoFW);
27401 var allMiddle = [RowContainerName.CENTER, RowContainerName.LEFT, RowContainerName.RIGHT, RowContainerName.FULL_WIDTH];
27402 var allCenter = [RowContainerName.CENTER, RowContainerName.TOP_CENTER, RowContainerName.STICKY_TOP_CENTER, RowContainerName.BOTTOM_CENTER];
27403 var allLeft = [RowContainerName.LEFT, RowContainerName.BOTTOM_LEFT, RowContainerName.TOP_LEFT, RowContainerName.STICKY_TOP_LEFT];
27404 var allRight = [RowContainerName.RIGHT, RowContainerName.BOTTOM_RIGHT, RowContainerName.TOP_RIGHT, RowContainerName.STICKY_TOP_RIGHT];
27405 this.forContainers(allLeft, function () {
27406 _this.pinnedWidthFeature = _this.createManagedBean(new _setPinnedLeftWidthFeature__WEBPACK_IMPORTED_MODULE_7__["SetPinnedLeftWidthFeature"](_this.eContainer));
27407 _this.addManagedListener(_this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_LEFT_PINNED_WIDTH_CHANGED, function () { return _this.onPinnedWidthChanged(); });
27408 });
27409 this.forContainers(allRight, function () {
27410 _this.pinnedWidthFeature = _this.createManagedBean(new _setPinnedRightWidthFeature__WEBPACK_IMPORTED_MODULE_8__["SetPinnedRightWidthFeature"](_this.eContainer));
27411 _this.addManagedListener(_this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_RIGHT_PINNED_WIDTH_CHANGED, function () { return _this.onPinnedWidthChanged(); });
27412 });
27413 this.forContainers(allMiddle, function () { return _this.createManagedBean(new _setHeightFeature__WEBPACK_IMPORTED_MODULE_9__["SetHeightFeature"](_this.eContainer, _this.eWrapper)); });
27414 this.forContainers(allNoFW, function () { return _this.createManagedBean(new _dragListenerFeature__WEBPACK_IMPORTED_MODULE_10__["DragListenerFeature"](_this.eContainer)); });
27415 this.forContainers(allCenter, function () { return _this.createManagedBean(new _centerWidthFeature__WEBPACK_IMPORTED_MODULE_11__["CenterWidthFeature"](function (width) { return _this.comp.setContainerWidth(width + "px"); })); });
27416 if (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_12__["isInvisibleScrollbar"])()) {
27417 this.forContainers([RowContainerName.CENTER], function () {
27418 var pinnedWidthChangedEvent = _this.enableRtl ? _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_LEFT_PINNED_WIDTH_CHANGED : _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_RIGHT_PINNED_WIDTH_CHANGED;
27419 _this.addManagedListener(_this.eventService, pinnedWidthChangedEvent, function () { return _this.refreshPaddingForFakeScrollbar(); });
27420 });
27421 this.refreshPaddingForFakeScrollbar();
27422 }
27423 this.addListeners();
27424 this.registerWithCtrlsService();
27425 };
27426 RowContainerCtrl.prototype.refreshPaddingForFakeScrollbar = function () {
27427 var _a = this, enableRtl = _a.enableRtl, columnModel = _a.columnModel, name = _a.name, eWrapper = _a.eWrapper, eContainer = _a.eContainer;
27428 var sideToCheck = enableRtl ? RowContainerName.LEFT : RowContainerName.RIGHT;
27429 this.forContainers([RowContainerName.CENTER, sideToCheck], function () {
27430 var pinnedWidth = columnModel.getContainerWidth(sideToCheck);
27431 var marginSide = enableRtl ? 'marginLeft' : 'marginRight';
27432 if (name === RowContainerName.CENTER) {
27433 eWrapper.style[marginSide] = pinnedWidth ? '0px' : '16px';
27434 }
27435 else {
27436 eContainer.style[marginSide] = pinnedWidth ? '16px' : '0px';
27437 }
27438 });
27439 };
27440 RowContainerCtrl.prototype.addListeners = function () {
27441 var _this = this;
27442 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED, function () { return _this.onScrollVisibilityChanged(); });
27443 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, function () { return _this.onDisplayedColumnsChanged(); });
27444 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, function () { return _this.onDisplayedColumnsWidthChanged(); });
27445 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_ROWS_CHANGED, function () { return _this.onDisplayedRowsChanged(); });
27446 this.onScrollVisibilityChanged();
27447 this.onDisplayedColumnsChanged();
27448 this.onDisplayedColumnsWidthChanged();
27449 this.onDisplayedRowsChanged();
27450 };
27451 RowContainerCtrl.prototype.listenOnDomOrder = function () {
27452 var _this = this;
27453 // sticky section must show rows in set order
27454 var allStickyContainers = [RowContainerName.STICKY_TOP_CENTER, RowContainerName.STICKY_TOP_LEFT, RowContainerName.STICKY_TOP_RIGHT, RowContainerName.STICKY_TOP_FULL_WIDTH];
27455 var isStickContainer = allStickyContainers.indexOf(this.name) >= 0;
27456 if (isStickContainer) {
27457 this.comp.setDomOrder(true);
27458 return;
27459 }
27460 var listener = function () {
27461 var isEnsureDomOrder = _this.gridOptionsService.is('ensureDomOrder');
27462 var isPrintLayout = _this.gridOptionsService.isDomLayout('print');
27463 _this.comp.setDomOrder(isEnsureDomOrder || isPrintLayout);
27464 };
27465 this.addManagedPropertyListener('domLayout', listener);
27466 listener();
27467 };
27468 // when editing a pinned row, if the cell is half outside the scrollable area, the browser can
27469 // scroll the column into view. we do not want this, the pinned sections should never scroll.
27470 // so we listen to scrolls on these containers and reset the scroll if we find one.
27471 RowContainerCtrl.prototype.stopHScrollOnPinnedRows = function () {
27472 var _this = this;
27473 this.forContainers([RowContainerName.TOP_CENTER, RowContainerName.STICKY_TOP_CENTER, RowContainerName.BOTTOM_CENTER], function () {
27474 var resetScrollLeft = function () { return _this.eViewport.scrollLeft = 0; };
27475 _this.addManagedListener(_this.eViewport, 'scroll', resetScrollLeft);
27476 });
27477 };
27478 RowContainerCtrl.prototype.onDisplayedColumnsChanged = function () {
27479 var _this = this;
27480 this.forContainers([RowContainerName.CENTER], function () { return _this.onHorizontalViewportChanged(); });
27481 };
27482 RowContainerCtrl.prototype.onDisplayedColumnsWidthChanged = function () {
27483 var _this = this;
27484 this.forContainers([RowContainerName.CENTER], function () { return _this.onHorizontalViewportChanged(); });
27485 };
27486 RowContainerCtrl.prototype.onScrollVisibilityChanged = function () {
27487 if (this.name !== RowContainerName.CENTER) {
27488 return;
27489 }
27490 var visible = this.scrollVisibleService.isHorizontalScrollShowing();
27491 var scrollbarWidth = visible ? (this.gridOptionsService.getScrollbarWidth() || 0) : 0;
27492 var height = scrollbarWidth == 0 ? '100%' : "calc(100% + " + scrollbarWidth + "px)";
27493 this.comp.setViewportHeight(height);
27494 };
27495 // this methods prevents the grid views from being scrolled while the dragService is being used
27496 // eg. the view should not scroll up and down while dragging rows using the rowDragComp.
27497 RowContainerCtrl.prototype.addPreventScrollWhileDragging = function () {
27498 var _this = this;
27499 var preventScroll = function (e) {
27500 if (_this.dragService.isDragging()) {
27501 if (e.cancelable) {
27502 e.preventDefault();
27503 }
27504 }
27505 };
27506 this.eContainer.addEventListener('touchmove', preventScroll, { passive: false });
27507 this.addDestroyFunc(function () { return _this.eContainer.removeEventListener('touchmove', preventScroll); });
27508 };
27509 // this gets called whenever a change in the viewport, so we can inform column controller it has to work
27510 // out the virtual columns again. gets called from following locations:
27511 // + ensureColVisible, scroll, init, layoutChanged, displayedColumnsChanged
27512 RowContainerCtrl.prototype.onHorizontalViewportChanged = function () {
27513 var scrollWidth = this.getCenterWidth();
27514 var scrollPosition = this.getCenterViewportScrollLeft();
27515 this.columnModel.setViewportPosition(scrollWidth, scrollPosition);
27516 };
27517 RowContainerCtrl.prototype.getCenterWidth = function () {
27518 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["getInnerWidth"])(this.eViewport);
27519 };
27520 RowContainerCtrl.prototype.getCenterViewportScrollLeft = function () {
27521 // we defer to a util, as how you calculated scrollLeft when doing RTL depends on the browser
27522 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["getScrollLeft"])(this.eViewport, this.enableRtl);
27523 };
27524 RowContainerCtrl.prototype.registerViewportResizeListener = function (listener) {
27525 var unsubscribeFromResize = this.resizeObserverService.observeResize(this.eViewport, listener);
27526 this.addDestroyFunc(function () { return unsubscribeFromResize(); });
27527 };
27528 RowContainerCtrl.prototype.isViewportVisible = function () {
27529 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["isVisible"])(this.eViewport);
27530 };
27531 RowContainerCtrl.prototype.isViewportHScrollShowing = function () {
27532 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["isHorizontalScrollShowing"])(this.eViewport);
27533 };
27534 RowContainerCtrl.prototype.getViewportScrollLeft = function () {
27535 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["getScrollLeft"])(this.eViewport, this.enableRtl);
27536 };
27537 RowContainerCtrl.prototype.isHorizontalScrollShowing = function () {
27538 var isAlwaysShowHorizontalScroll = this.gridOptionsService.is('alwaysShowHorizontalScroll');
27539 return isAlwaysShowHorizontalScroll || Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["isHorizontalScrollShowing"])(this.eViewport);
27540 };
27541 RowContainerCtrl.prototype.getViewportElement = function () {
27542 return this.eViewport;
27543 };
27544 RowContainerCtrl.prototype.setContainerTranslateX = function (amount) {
27545 this.eContainer.style.transform = "translateX(" + amount + "px)";
27546 };
27547 RowContainerCtrl.prototype.getHScrollPosition = function () {
27548 var res = {
27549 left: this.eViewport.scrollLeft,
27550 right: this.eViewport.scrollLeft + this.eViewport.offsetWidth
27551 };
27552 return res;
27553 };
27554 RowContainerCtrl.prototype.setCenterViewportScrollLeft = function (value) {
27555 // we defer to a util, as how you calculated scrollLeft when doing RTL depends on the browser
27556 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setScrollLeft"])(this.eViewport, value, this.enableRtl);
27557 };
27558 RowContainerCtrl.prototype.isContainerVisible = function () {
27559 var pinned = RowContainerCtrl.getPinned(this.name);
27560 return !pinned || (!!this.pinnedWidthFeature && this.pinnedWidthFeature.getWidth() > 0);
27561 };
27562 RowContainerCtrl.prototype.onPinnedWidthChanged = function () {
27563 var visible = this.isContainerVisible();
27564 if (this.visible != visible) {
27565 this.visible = visible;
27566 this.onDisplayedRowsChanged();
27567 }
27568 if (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_12__["isInvisibleScrollbar"])()) {
27569 this.refreshPaddingForFakeScrollbar();
27570 }
27571 };
27572 RowContainerCtrl.prototype.onDisplayedRowsChanged = function () {
27573 var _this = this;
27574 if (this.visible) {
27575 var printLayout_1 = this.gridOptionsService.isDomLayout('print');
27576 var doesRowMatch = function (rowCtrl) {
27577 var fullWidthRow = rowCtrl.isFullWidth();
27578 var embedFW = _this.embedFullWidthRows || printLayout_1;
27579 var match = _this.isFullWithContainer ?
27580 !embedFW && fullWidthRow
27581 : embedFW || !fullWidthRow;
27582 return match;
27583 };
27584 // this list contains either all pinned top, center or pinned bottom rows
27585 // this filters out rows not for this container, eg if it's a full with row, but we are not full with container
27586 var rowsThisContainer = this.getRowCtrls().filter(doesRowMatch);
27587 this.comp.setRowCtrls(rowsThisContainer);
27588 }
27589 else {
27590 this.comp.setRowCtrls(this.EMPTY_CTRLS);
27591 }
27592 };
27593 RowContainerCtrl.prototype.getRowCtrls = function () {
27594 switch (this.name) {
27595 case RowContainerName.TOP_CENTER:
27596 case RowContainerName.TOP_LEFT:
27597 case RowContainerName.TOP_RIGHT:
27598 case RowContainerName.TOP_FULL_WIDTH:
27599 return this.rowRenderer.getTopRowCtrls();
27600 case RowContainerName.STICKY_TOP_CENTER:
27601 case RowContainerName.STICKY_TOP_LEFT:
27602 case RowContainerName.STICKY_TOP_RIGHT:
27603 case RowContainerName.STICKY_TOP_FULL_WIDTH:
27604 return this.rowRenderer.getStickyTopRowCtrls();
27605 case RowContainerName.BOTTOM_CENTER:
27606 case RowContainerName.BOTTOM_LEFT:
27607 case RowContainerName.BOTTOM_RIGHT:
27608 case RowContainerName.BOTTOM_FULL_WIDTH:
27609 return this.rowRenderer.getBottomRowCtrls();
27610 default:
27611 return this.rowRenderer.getRowCtrls();
27612 }
27613 };
27614 __decorate([
27615 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('scrollVisibleService')
27616 ], RowContainerCtrl.prototype, "scrollVisibleService", void 0);
27617 __decorate([
27618 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragService')
27619 ], RowContainerCtrl.prototype, "dragService", void 0);
27620 __decorate([
27621 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
27622 ], RowContainerCtrl.prototype, "ctrlsService", void 0);
27623 __decorate([
27624 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
27625 ], RowContainerCtrl.prototype, "columnModel", void 0);
27626 __decorate([
27627 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('resizeObserverService')
27628 ], RowContainerCtrl.prototype, "resizeObserverService", void 0);
27629 __decorate([
27630 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowRenderer')
27631 ], RowContainerCtrl.prototype, "rowRenderer", void 0);
27632 __decorate([
27633 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
27634 ], RowContainerCtrl.prototype, "postConstruct", null);
27635 return RowContainerCtrl;
27636}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
27637
27638
27639
27640/***/ }),
27641/* 123 */
27642/***/ (function(module, __webpack_exports__, __webpack_require__) {
27643
27644"use strict";
27645__webpack_require__.r(__webpack_exports__);
27646/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerEventsFeature", function() { return RowContainerEventsFeature; });
27647/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
27648/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
27649/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
27650/* harmony import */ var _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(124);
27651/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
27652/* harmony import */ var _widgets_touchListener__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(86);
27653/* harmony import */ var _utils_keyboard__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47);
27654/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(25);
27655/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(48);
27656/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7);
27657/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(19);
27658/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(15);
27659/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14);
27660/* harmony import */ var _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(125);
27661/**
27662 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
27663 * @version v29.2.0
27664 * @link https://www.ag-grid.com/
27665 * @license MIT
27666 */
27667var __extends = (undefined && undefined.__extends) || (function () {
27668 var extendStatics = function (d, b) {
27669 extendStatics = Object.setPrototypeOf ||
27670 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
27671 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
27672 return extendStatics(d, b);
27673 };
27674 return function (d, b) {
27675 extendStatics(d, b);
27676 function __() { this.constructor = d; }
27677 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
27678 };
27679})();
27680var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
27681 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
27682 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
27683 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;
27684 return c > 3 && r && Object.defineProperty(target, key, r), r;
27685};
27686var __read = (undefined && undefined.__read) || function (o, n) {
27687 var m = typeof Symbol === "function" && o[Symbol.iterator];
27688 if (!m) return o;
27689 var i = m.call(o), r, ar = [], e;
27690 try {
27691 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
27692 }
27693 catch (error) { e = { error: error }; }
27694 finally {
27695 try {
27696 if (r && !r.done && (m = i["return"])) m.call(i);
27697 }
27698 finally { if (e) throw e.error; }
27699 }
27700 return ar;
27701};
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717var RowContainerEventsFeature = /** @class */ (function (_super) {
27718 __extends(RowContainerEventsFeature, _super);
27719 function RowContainerEventsFeature(element) {
27720 var _this = _super.call(this) || this;
27721 _this.element = element;
27722 return _this;
27723 }
27724 RowContainerEventsFeature.prototype.postConstruct = function () {
27725 this.addMouseListeners();
27726 this.mockContextMenuForIPad();
27727 this.addKeyboardEvents();
27728 };
27729 RowContainerEventsFeature.prototype.addKeyboardEvents = function () {
27730 var _this = this;
27731 var eventNames = ['keydown', 'keypress'];
27732 eventNames.forEach(function (eventName) {
27733 var listener = _this.processKeyboardEvent.bind(_this, eventName);
27734 _this.addManagedListener(_this.element, eventName, listener);
27735 });
27736 };
27737 RowContainerEventsFeature.prototype.addMouseListeners = function () {
27738 var _this = this;
27739 var mouseDownEvent = Object(_utils_event__WEBPACK_IMPORTED_MODULE_1__["isEventSupported"])('touchstart') ? 'touchstart' : 'mousedown';
27740 var eventNames = ['dblclick', 'contextmenu', 'mouseover', 'mouseout', 'click', mouseDownEvent];
27741 eventNames.forEach(function (eventName) {
27742 var listener = _this.processMouseEvent.bind(_this, eventName);
27743 _this.addManagedListener(_this.element, eventName, listener);
27744 });
27745 };
27746 RowContainerEventsFeature.prototype.processMouseEvent = function (eventName, mouseEvent) {
27747 if (!this.mouseEventService.isEventFromThisGrid(mouseEvent) ||
27748 Object(_utils_event__WEBPACK_IMPORTED_MODULE_1__["isStopPropagationForAgGrid"])(mouseEvent)) {
27749 return;
27750 }
27751 var rowComp = this.getRowForEvent(mouseEvent);
27752 var cellCtrl = this.mouseEventService.getRenderedCellForEvent(mouseEvent);
27753 if (eventName === "contextmenu") {
27754 this.handleContextMenuMouseEvent(mouseEvent, null, rowComp, cellCtrl);
27755 }
27756 else {
27757 if (cellCtrl) {
27758 cellCtrl.onMouseEvent(eventName, mouseEvent);
27759 }
27760 if (rowComp) {
27761 rowComp.onMouseEvent(eventName, mouseEvent);
27762 }
27763 }
27764 };
27765 RowContainerEventsFeature.prototype.mockContextMenuForIPad = function () {
27766 var _this = this;
27767 // we do NOT want this when not in iPad, otherwise we will be doing
27768 if (!Object(_utils_browser__WEBPACK_IMPORTED_MODULE_4__["isIOSUserAgent"])()) {
27769 return;
27770 }
27771 var touchListener = new _widgets_touchListener__WEBPACK_IMPORTED_MODULE_5__["TouchListener"](this.element);
27772 var longTapListener = function (event) {
27773 var rowComp = _this.getRowForEvent(event.touchEvent);
27774 var cellComp = _this.mouseEventService.getRenderedCellForEvent(event.touchEvent);
27775 _this.handleContextMenuMouseEvent(null, event.touchEvent, rowComp, cellComp);
27776 };
27777 this.addManagedListener(touchListener, _widgets_touchListener__WEBPACK_IMPORTED_MODULE_5__["TouchListener"].EVENT_LONG_TAP, longTapListener);
27778 this.addDestroyFunc(function () { return touchListener.destroy(); });
27779 };
27780 RowContainerEventsFeature.prototype.getRowForEvent = function (event) {
27781 var sourceElement = event.target;
27782 while (sourceElement) {
27783 var rowCon = this.gridOptionsService.getDomData(sourceElement, _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_3__["RowCtrl"].DOM_DATA_KEY_ROW_CTRL);
27784 if (rowCon) {
27785 return rowCon;
27786 }
27787 sourceElement = sourceElement.parentElement;
27788 }
27789 return null;
27790 };
27791 RowContainerEventsFeature.prototype.handleContextMenuMouseEvent = function (mouseEvent, touchEvent, rowComp, cellCtrl) {
27792 var rowNode = rowComp ? rowComp.getRowNode() : null;
27793 var column = cellCtrl ? cellCtrl.getColumn() : null;
27794 var value = null;
27795 if (column) {
27796 var event_1 = mouseEvent ? mouseEvent : touchEvent;
27797 cellCtrl.dispatchCellContextMenuEvent(event_1);
27798 value = this.valueService.getValue(column, rowNode);
27799 }
27800 // if user clicked on a cell, anchor to that cell, otherwise anchor to the grid panel
27801 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
27802 var anchorToElement = cellCtrl ? cellCtrl.getGui() : gridBodyCon.getGridBodyElement();
27803 if (this.contextMenuFactory) {
27804 this.contextMenuFactory.onContextMenu(mouseEvent, touchEvent, rowNode, column, value, anchorToElement);
27805 }
27806 };
27807 RowContainerEventsFeature.prototype.processKeyboardEvent = function (eventName, keyboardEvent) {
27808 var cellComp = Object(_utils_event__WEBPACK_IMPORTED_MODULE_1__["getCtrlForEvent"])(this.gridOptionsService, keyboardEvent, _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_13__["CellCtrl"].DOM_DATA_KEY_CELL_CTRL);
27809 var rowComp = Object(_utils_event__WEBPACK_IMPORTED_MODULE_1__["getCtrlForEvent"])(this.gridOptionsService, keyboardEvent, _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_3__["RowCtrl"].DOM_DATA_KEY_ROW_CTRL);
27810 if (keyboardEvent.defaultPrevented) {
27811 return;
27812 }
27813 if (cellComp) {
27814 this.processCellKeyboardEvent(cellComp, eventName, keyboardEvent);
27815 }
27816 else if (rowComp && rowComp.isFullWidth()) {
27817 this.processFullWidthRowKeyboardEvent(rowComp, eventName, keyboardEvent);
27818 }
27819 };
27820 RowContainerEventsFeature.prototype.processCellKeyboardEvent = function (cellCtrl, eventName, keyboardEvent) {
27821 var rowNode = cellCtrl.getRowNode();
27822 var column = cellCtrl.getColumn();
27823 var editing = cellCtrl.isEditing();
27824 var gridProcessingAllowed = !Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_6__["isUserSuppressingKeyboardEvent"])(this.gridOptionsService, keyboardEvent, rowNode, column, editing);
27825 if (gridProcessingAllowed) {
27826 switch (eventName) {
27827 case 'keydown':
27828 // first see if it's a scroll key, page up / down, home / end etc
27829 var wasScrollKey = !editing && this.navigationService.handlePageScrollingKey(keyboardEvent);
27830 // if not a scroll key, then we pass onto cell
27831 if (!wasScrollKey) {
27832 cellCtrl.onKeyDown(keyboardEvent);
27833 }
27834 // perform clipboard and undo / redo operations
27835 this.doGridOperations(keyboardEvent, cellCtrl.isEditing());
27836 break;
27837 case 'keypress':
27838 cellCtrl.onKeyPress(keyboardEvent);
27839 break;
27840 }
27841 }
27842 if (eventName === 'keydown') {
27843 var cellKeyDownEvent = cellCtrl.createEvent(keyboardEvent, _events__WEBPACK_IMPORTED_MODULE_7__["Events"].EVENT_CELL_KEY_DOWN);
27844 this.eventService.dispatchEvent(cellKeyDownEvent);
27845 }
27846 if (eventName === 'keypress') {
27847 var cellKeyPressEvent = cellCtrl.createEvent(keyboardEvent, _events__WEBPACK_IMPORTED_MODULE_7__["Events"].EVENT_CELL_KEY_PRESS);
27848 this.eventService.dispatchEvent(cellKeyPressEvent);
27849 }
27850 };
27851 RowContainerEventsFeature.prototype.processFullWidthRowKeyboardEvent = function (rowComp, eventName, keyboardEvent) {
27852 var rowNode = rowComp.getRowNode();
27853 var focusedCell = this.focusService.getFocusedCell();
27854 var column = (focusedCell && focusedCell.column);
27855 var gridProcessingAllowed = !Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_6__["isUserSuppressingKeyboardEvent"])(this.gridOptionsService, keyboardEvent, rowNode, column, false);
27856 if (gridProcessingAllowed) {
27857 var key = keyboardEvent.key;
27858 if (eventName === 'keydown') {
27859 switch (key) {
27860 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].PAGE_HOME:
27861 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].PAGE_END:
27862 this.navigationService.handlePageScrollingKey(keyboardEvent);
27863 break;
27864 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].UP:
27865 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].DOWN:
27866 rowComp.onKeyboardNavigate(keyboardEvent);
27867 break;
27868 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].TAB:
27869 rowComp.onTabKeyDown(keyboardEvent);
27870 break;
27871 default:
27872 }
27873 }
27874 }
27875 if (eventName === 'keydown') {
27876 var cellKeyDownEvent = rowComp.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_7__["Events"].EVENT_CELL_KEY_DOWN, keyboardEvent);
27877 this.eventService.dispatchEvent(cellKeyDownEvent);
27878 }
27879 if (eventName === 'keypress') {
27880 var cellKeyPressEvent = rowComp.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_7__["Events"].EVENT_CELL_KEY_PRESS, keyboardEvent);
27881 this.eventService.dispatchEvent(cellKeyPressEvent);
27882 }
27883 };
27884 RowContainerEventsFeature.prototype.doGridOperations = function (keyboardEvent, editing) {
27885 // check if ctrl or meta key pressed
27886 if (!keyboardEvent.ctrlKey && !keyboardEvent.metaKey) {
27887 return;
27888 }
27889 // if the cell the event came from is editing, then we do not
27890 // want to do the default shortcut keys, otherwise the editor
27891 // (eg a text field) would not be able to do the normal cut/copy/paste
27892 if (editing) {
27893 return;
27894 }
27895 // for copy / paste, we don't want to execute when the event
27896 // was from a child grid (happens in master detail)
27897 if (!this.mouseEventService.isEventFromThisGrid(keyboardEvent)) {
27898 return;
27899 }
27900 var keyCode = Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_6__["normaliseQwertyAzerty"])(keyboardEvent);
27901 if (keyCode === _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].A) {
27902 return this.onCtrlAndA(keyboardEvent);
27903 }
27904 if (keyCode === _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].C) {
27905 return this.onCtrlAndC(keyboardEvent);
27906 }
27907 if (keyCode === _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].X) {
27908 return this.onCtrlAndX(keyboardEvent);
27909 }
27910 if (keyCode === _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].V) {
27911 return this.onCtrlAndV();
27912 }
27913 if (keyCode === _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].D) {
27914 return this.onCtrlAndD(keyboardEvent);
27915 }
27916 if (keyCode === _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].Z) {
27917 return this.onCtrlAndZ(keyboardEvent);
27918 }
27919 if (keyCode === _constants_keyCode__WEBPACK_IMPORTED_MODULE_8__["KeyCode"].Y) {
27920 return this.onCtrlAndY();
27921 }
27922 };
27923 RowContainerEventsFeature.prototype.onCtrlAndA = function (event) {
27924 var _a = this, pinnedRowModel = _a.pinnedRowModel, paginationProxy = _a.paginationProxy, rangeService = _a.rangeService;
27925 if (rangeService && paginationProxy.isRowsToRender()) {
27926 var _b = __read([
27927 pinnedRowModel.isEmpty('top'),
27928 pinnedRowModel.isEmpty('bottom')
27929 ], 2), isEmptyPinnedTop = _b[0], isEmptyPinnedBottom = _b[1];
27930 var floatingStart = isEmptyPinnedTop ? null : 'top';
27931 var floatingEnd = void 0;
27932 var rowEnd = void 0;
27933 if (isEmptyPinnedBottom) {
27934 floatingEnd = null;
27935 rowEnd = this.paginationProxy.getRowCount() - 1;
27936 }
27937 else {
27938 floatingEnd = 'bottom';
27939 rowEnd = pinnedRowModel.getPinnedBottomRowData().length - 1;
27940 }
27941 var allDisplayedColumns = this.columnModel.getAllDisplayedColumns();
27942 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["missingOrEmpty"])(allDisplayedColumns)) {
27943 return;
27944 }
27945 rangeService.setCellRange({
27946 rowStartIndex: 0,
27947 rowStartPinned: floatingStart,
27948 rowEndIndex: rowEnd,
27949 rowEndPinned: floatingEnd,
27950 columnStart: allDisplayedColumns[0],
27951 columnEnd: Object(_utils_array__WEBPACK_IMPORTED_MODULE_10__["last"])(allDisplayedColumns)
27952 });
27953 }
27954 event.preventDefault();
27955 };
27956 RowContainerEventsFeature.prototype.onCtrlAndC = function (event) {
27957 if (!this.clipboardService || this.gridOptionsService.is('enableCellTextSelection')) {
27958 return;
27959 }
27960 this.clipboardService.copyToClipboard();
27961 event.preventDefault();
27962 };
27963 RowContainerEventsFeature.prototype.onCtrlAndX = function (event) {
27964 if (!this.clipboardService ||
27965 this.gridOptionsService.is('enableCellTextSelection') ||
27966 this.gridOptionsService.is('suppressCutToClipboard')) {
27967 return;
27968 }
27969 this.clipboardService.cutToClipboard();
27970 event.preventDefault();
27971 };
27972 RowContainerEventsFeature.prototype.onCtrlAndV = function () {
27973 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_11__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_12__["ModuleNames"].ClipboardModule) && !this.gridOptionsService.is('suppressClipboardPaste')) {
27974 this.clipboardService.pasteFromClipboard();
27975 }
27976 };
27977 RowContainerEventsFeature.prototype.onCtrlAndD = function (event) {
27978 if (_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_11__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_12__["ModuleNames"].ClipboardModule) && !this.gridOptionsService.is('suppressClipboardPaste')) {
27979 this.clipboardService.copyRangeDown();
27980 }
27981 event.preventDefault();
27982 };
27983 RowContainerEventsFeature.prototype.onCtrlAndZ = function (event) {
27984 if (!this.gridOptionsService.is('undoRedoCellEditing')) {
27985 return;
27986 }
27987 event.preventDefault();
27988 if (event.shiftKey) {
27989 this.undoRedoService.redo('ui');
27990 }
27991 else {
27992 this.undoRedoService.undo('ui');
27993 }
27994 };
27995 RowContainerEventsFeature.prototype.onCtrlAndY = function () {
27996 this.undoRedoService.redo('ui');
27997 };
27998 __decorate([
27999 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('mouseEventService')
28000 ], RowContainerEventsFeature.prototype, "mouseEventService", void 0);
28001 __decorate([
28002 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('valueService')
28003 ], RowContainerEventsFeature.prototype, "valueService", void 0);
28004 __decorate([
28005 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Optional"])('contextMenuFactory')
28006 ], RowContainerEventsFeature.prototype, "contextMenuFactory", void 0);
28007 __decorate([
28008 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('ctrlsService')
28009 ], RowContainerEventsFeature.prototype, "ctrlsService", void 0);
28010 __decorate([
28011 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('navigationService')
28012 ], RowContainerEventsFeature.prototype, "navigationService", void 0);
28013 __decorate([
28014 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('focusService')
28015 ], RowContainerEventsFeature.prototype, "focusService", void 0);
28016 __decorate([
28017 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('undoRedoService')
28018 ], RowContainerEventsFeature.prototype, "undoRedoService", void 0);
28019 __decorate([
28020 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
28021 ], RowContainerEventsFeature.prototype, "columnModel", void 0);
28022 __decorate([
28023 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('paginationProxy')
28024 ], RowContainerEventsFeature.prototype, "paginationProxy", void 0);
28025 __decorate([
28026 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('pinnedRowModel')
28027 ], RowContainerEventsFeature.prototype, "pinnedRowModel", void 0);
28028 __decorate([
28029 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Optional"])('rangeService')
28030 ], RowContainerEventsFeature.prototype, "rangeService", void 0);
28031 __decorate([
28032 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Optional"])('clipboardService')
28033 ], RowContainerEventsFeature.prototype, "clipboardService", void 0);
28034 __decorate([
28035 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
28036 ], RowContainerEventsFeature.prototype, "postConstruct", null);
28037 return RowContainerEventsFeature;
28038}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
28039
28040
28041
28042/***/ }),
28043/* 124 */
28044/***/ (function(module, __webpack_exports__, __webpack_require__) {
28045
28046"use strict";
28047__webpack_require__.r(__webpack_exports__);
28048/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowCtrl", function() { return RowCtrl; });
28049/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
28050/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97);
28051/* harmony import */ var _interfaces_iRowNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(110);
28052/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25);
28053/* harmony import */ var _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(122);
28054/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14);
28055/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15);
28056/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(41);
28057/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(45);
28058/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(18);
28059/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(13);
28060/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7);
28061/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(31);
28062/* harmony import */ var _cell_cellCtrl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(125);
28063/* harmony import */ var _rowDragComp__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(99);
28064/**
28065 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
28066 * @version v29.2.0
28067 * @link https://www.ag-grid.com/
28068 * @license MIT
28069 */
28070var __extends = (undefined && undefined.__extends) || (function () {
28071 var extendStatics = function (d, b) {
28072 extendStatics = Object.setPrototypeOf ||
28073 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
28074 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
28075 return extendStatics(d, b);
28076 };
28077 return function (d, b) {
28078 extendStatics(d, b);
28079 function __() { this.constructor = d; }
28080 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28081 };
28082})();
28083var __values = (undefined && undefined.__values) || function(o) {
28084 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
28085 if (m) return m.call(o);
28086 if (o && typeof o.length === "number") return {
28087 next: function () {
28088 if (o && i >= o.length) o = void 0;
28089 return { value: o && o[i++], done: !o };
28090 }
28091 };
28092 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
28093};
28094var __read = (undefined && undefined.__read) || function (o, n) {
28095 var m = typeof Symbol === "function" && o[Symbol.iterator];
28096 if (!m) return o;
28097 var i = m.call(o), r, ar = [], e;
28098 try {
28099 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
28100 }
28101 catch (error) { e = { error: error }; }
28102 finally {
28103 try {
28104 if (r && !r.done && (m = i["return"])) m.call(i);
28105 }
28106 finally { if (e) throw e.error; }
28107 }
28108 return ar;
28109};
28110var __spread = (undefined && undefined.__spread) || function () {
28111 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
28112 return ar;
28113};
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129var RowType;
28130(function (RowType) {
28131 RowType["Normal"] = "Normal";
28132 RowType["FullWidth"] = "FullWidth";
28133 RowType["FullWidthLoading"] = "FullWidthLoading";
28134 RowType["FullWidthGroup"] = "FullWidthGroup";
28135 RowType["FullWidthDetail"] = "FullWidthDetail";
28136})(RowType || (RowType = {}));
28137var instanceIdSequence = 0;
28138var RowCtrl = /** @class */ (function (_super) {
28139 __extends(RowCtrl, _super);
28140 function RowCtrl(rowNode, beans, animateIn, useAnimationFrameForCreate, printLayout) {
28141 var _this = _super.call(this) || this;
28142 _this.allRowGuis = [];
28143 _this.active = true;
28144 _this.centerCellCtrls = { list: [], map: {} };
28145 _this.leftCellCtrls = { list: [], map: {} };
28146 _this.rightCellCtrls = { list: [], map: {} };
28147 _this.slideInAnimation = {
28148 left: false,
28149 center: false,
28150 right: false,
28151 fullWidth: false
28152 };
28153 _this.fadeInAnimation = {
28154 left: false,
28155 center: false,
28156 right: false,
28157 fullWidth: false
28158 };
28159 _this.lastMouseDownOnDragger = false;
28160 _this.updateColumnListsPending = false;
28161 _this.businessKeySanitised = null;
28162 _this.beans = beans;
28163 _this.rowNode = rowNode;
28164 _this.paginationPage = _this.beans.paginationProxy.getCurrentPage();
28165 _this.useAnimationFrameForCreate = useAnimationFrameForCreate;
28166 _this.printLayout = printLayout;
28167 _this.instanceId = rowNode.id + '-' + instanceIdSequence++;
28168 _this.setAnimateFlags(animateIn);
28169 _this.initRowBusinessKey();
28170 _this.rowFocused = _this.beans.focusService.isRowFocused(_this.rowNode.rowIndex, _this.rowNode.rowPinned);
28171 _this.rowLevel = _this.beans.rowCssClassCalculator.calculateRowLevel(_this.rowNode);
28172 _this.setRowType();
28173 _this.addListeners();
28174 return _this;
28175 }
28176 RowCtrl.prototype.initRowBusinessKey = function () {
28177 var businessKeyForNodeFunc = this.beans.gridOptionsService.get('getBusinessKeyForNode');
28178 if (typeof businessKeyForNodeFunc !== 'function') {
28179 return;
28180 }
28181 var businessKey = businessKeyForNodeFunc(this.rowNode);
28182 this.businessKeySanitised = Object(_utils_string__WEBPACK_IMPORTED_MODULE_12__["escapeString"])(businessKey);
28183 };
28184 RowCtrl.prototype.isSticky = function () {
28185 return this.rowNode.sticky;
28186 };
28187 RowCtrl.prototype.getBeans = function () {
28188 return this.beans;
28189 };
28190 RowCtrl.prototype.getInstanceId = function () {
28191 return this.instanceId;
28192 };
28193 RowCtrl.prototype.setComp = function (rowComp, element, containerType) {
28194 var gui = { rowComp: rowComp, element: element, containerType: containerType };
28195 this.allRowGuis.push(gui);
28196 if (containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].LEFT) {
28197 this.leftGui = gui;
28198 }
28199 else if (containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].RIGHT) {
28200 this.rightGui = gui;
28201 }
28202 else if (containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].FULL_WIDTH) {
28203 this.fullWidthGui = gui;
28204 }
28205 else {
28206 this.centerGui = gui;
28207 }
28208 this.initialiseRowComp(gui);
28209 // pinned rows render before the main grid body in the SSRM, only fire the event after the main body has rendered.
28210 if (this.rowType !== 'FullWidthLoading' && !this.rowNode.rowPinned) {
28211 // this is fired within setComp as we know that the component renderer is now trying to render.
28212 // linked with the fact the function implementation queues behind requestAnimationFrame should allow
28213 // us to be certain that all rendering is done by the time the event fires.
28214 this.beans.rowRenderer.dispatchFirstDataRenderedEvent();
28215 }
28216 };
28217 RowCtrl.prototype.unsetComp = function (containerType) {
28218 this.allRowGuis = this.allRowGuis
28219 .filter(function (rowGui) { return rowGui.containerType !== containerType; });
28220 if (containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].LEFT) {
28221 this.leftGui = undefined;
28222 }
28223 else if (containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].RIGHT) {
28224 this.rightGui = undefined;
28225 }
28226 else if (containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].FULL_WIDTH) {
28227 this.fullWidthGui = undefined;
28228 }
28229 };
28230 RowCtrl.prototype.isCacheable = function () {
28231 return this.rowType === RowType.FullWidthDetail
28232 && this.beans.gridOptionsService.is('keepDetailRows');
28233 };
28234 RowCtrl.prototype.setCached = function (cached) {
28235 var displayValue = cached ? 'none' : '';
28236 this.allRowGuis.forEach(function (rg) { return rg.element.style.display = displayValue; });
28237 };
28238 RowCtrl.prototype.initialiseRowComp = function (gui) {
28239 var _this = this;
28240 var gos = this.beans.gridOptionsService;
28241 this.onRowHeightChanged(gui);
28242 this.updateRowIndexes(gui);
28243 this.setFocusedClasses(gui);
28244 this.setStylesFromGridOptions(gui);
28245 if (gos.isRowSelection() && this.rowNode.selectable) {
28246 this.onRowSelected(gui);
28247 }
28248 this.updateColumnLists(!this.useAnimationFrameForCreate);
28249 var comp = gui.rowComp;
28250 comp.setRole('row');
28251 var initialRowClasses = this.getInitialRowClasses(gui.containerType);
28252 initialRowClasses.forEach(function (name) { return comp.addOrRemoveCssClass(name, true); });
28253 this.executeSlideAndFadeAnimations(gui);
28254 if (this.rowNode.group) {
28255 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaExpanded"])(gui.element, this.rowNode.expanded == true);
28256 }
28257 var rowIdSanitised = Object(_utils_string__WEBPACK_IMPORTED_MODULE_12__["escapeString"])(this.rowNode.id);
28258 if (rowIdSanitised != null) {
28259 comp.setRowId(rowIdSanitised);
28260 }
28261 if (this.businessKeySanitised != null) {
28262 comp.setRowBusinessKey(this.businessKeySanitised);
28263 }
28264 if (this.isFullWidth() && !this.beans.gridOptionsService.is('suppressCellFocus')) {
28265 comp.setTabIndex(-1);
28266 }
28267 // DOM DATA
28268 gos.setDomData(gui.element, RowCtrl.DOM_DATA_KEY_ROW_CTRL, this);
28269 this.addDestroyFunc(function () { return gos.setDomData(gui.element, RowCtrl.DOM_DATA_KEY_ROW_CTRL, null); });
28270 // adding hover functionality adds listener to this row, so we
28271 // do it lazily in an animation frame
28272 if (this.useAnimationFrameForCreate) {
28273 this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this, gui.element), this.rowNode.rowIndex, 'createTasksP2');
28274 }
28275 else {
28276 this.addHoverFunctionality(gui.element);
28277 }
28278 if (this.isFullWidth()) {
28279 this.setupFullWidth(gui);
28280 }
28281 if (gos.is('rowDragEntireRow')) {
28282 this.addRowDraggerToRow(gui);
28283 }
28284 if (this.useAnimationFrameForCreate) {
28285 // the height animation we only want active after the row is alive for 1 second.
28286 // this stops the row animation working when rows are initially created. otherwise
28287 // auto-height rows get inserted into the dom and resized immediately, which gives
28288 // very bad UX (eg 10 rows get inserted, then all 10 expand, look particularly bad
28289 // when scrolling). so this makes sure when rows are shown for the first time, they
28290 // are resized immediately without animation.
28291 this.beans.animationFrameService.addDestroyTask(function () {
28292 if (!_this.isAlive()) {
28293 return;
28294 }
28295 gui.rowComp.addOrRemoveCssClass('ag-after-created', true);
28296 });
28297 }
28298 this.executeProcessRowPostCreateFunc();
28299 };
28300 RowCtrl.prototype.executeSlideAndFadeAnimations = function (gui) {
28301 var _this = this;
28302 var containerType = gui.containerType;
28303 var shouldSlide = this.slideInAnimation[containerType];
28304 if (shouldSlide) {
28305 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["executeNextVMTurn"])(function () {
28306 _this.onTopChanged();
28307 });
28308 this.slideInAnimation[containerType] = false;
28309 }
28310 var shouldFade = this.fadeInAnimation[containerType];
28311 if (shouldFade) {
28312 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["executeNextVMTurn"])(function () {
28313 gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', false);
28314 });
28315 this.fadeInAnimation[containerType] = false;
28316 }
28317 };
28318 RowCtrl.prototype.addRowDraggerToRow = function (gui) {
28319 if (this.beans.gridOptionsService.isEnableRangeSelection()) {
28320 Object(_utils_function__WEBPACK_IMPORTED_MODULE_10__["doOnce"])(function () {
28321 console.warn('AG Grid: Setting `rowDragEntireRow: true` in the gridOptions doesn\'t work with `enableRangeSelection: true`');
28322 }, 'rowDragAndRangeSelectionEnabled');
28323 return;
28324 }
28325 var translate = this.beans.localeService.getLocaleTextFunc();
28326 var rowDragComp = new _rowDragComp__WEBPACK_IMPORTED_MODULE_14__["RowDragComp"](function () { return "1 " + translate('rowDragRow', 'row'); }, this.rowNode, undefined, gui.element, undefined, true);
28327 this.createManagedBean(rowDragComp, this.beans.context);
28328 };
28329 RowCtrl.prototype.setupFullWidth = function (gui) {
28330 var pinned = this.getPinnedForContainer(gui.containerType);
28331 var params = this.createFullWidthParams(gui.element, pinned);
28332 if (this.rowType == RowType.FullWidthDetail) {
28333 if (!_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_6__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_5__["ModuleNames"].MasterDetailModule, "cell renderer 'agDetailCellRenderer' (for master detail)")) {
28334 return;
28335 }
28336 }
28337 var compDetails;
28338 switch (this.rowType) {
28339 case RowType.FullWidthDetail:
28340 compDetails = this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(params);
28341 break;
28342 case RowType.FullWidthGroup:
28343 compDetails = this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(params);
28344 break;
28345 case RowType.FullWidthLoading:
28346 compDetails = this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(params);
28347 break;
28348 default:
28349 compDetails = this.beans.userComponentFactory.getFullWidthCellRendererDetails(params);
28350 break;
28351 }
28352 gui.rowComp.showFullWidth(compDetails);
28353 };
28354 RowCtrl.prototype.isPrintLayout = function () {
28355 return this.printLayout;
28356 };
28357 RowCtrl.prototype.getFullWidthCellRenderer = function () {
28358 var _a, _b;
28359 return (_b = (_a = this.fullWidthGui) === null || _a === void 0 ? void 0 : _a.rowComp) === null || _b === void 0 ? void 0 : _b.getFullWidthCellRenderer();
28360 };
28361 // use by autoWidthCalculator, as it clones the elements
28362 RowCtrl.prototype.getCellElement = function (column) {
28363 var cellCtrl = this.getCellCtrl(column);
28364 return cellCtrl ? cellCtrl.getGui() : null;
28365 };
28366 RowCtrl.prototype.executeProcessRowPostCreateFunc = function () {
28367 var _a;
28368 var func = this.beans.gridOptionsService.getCallback('processRowPostCreate');
28369 if (!func || !this.areAllContainersReady()) {
28370 return;
28371 }
28372 var params = {
28373 eRow: (_a = this.centerGui) === null || _a === void 0 ? void 0 : _a.element,
28374 ePinnedLeftRow: this.leftGui ? this.leftGui.element : undefined,
28375 ePinnedRightRow: this.rightGui ? this.rightGui.element : undefined,
28376 node: this.rowNode,
28377 rowIndex: this.rowNode.rowIndex,
28378 addRenderedRowListener: this.addEventListener.bind(this),
28379 };
28380 func(params);
28381 };
28382 RowCtrl.prototype.areAllContainersReady = function () {
28383 var isLeftReady = !!this.leftGui || !this.beans.columnModel.isPinningLeft();
28384 var isCenterReady = !!this.centerGui;
28385 var isRightReady = !!this.rightGui || !this.beans.columnModel.isPinningRight();
28386 return isLeftReady && isCenterReady && isRightReady;
28387 };
28388 RowCtrl.prototype.setRowType = function () {
28389 var isStub = this.rowNode.stub;
28390 var isFullWidthCell = this.rowNode.isFullWidthCell();
28391 var isDetailCell = this.beans.doingMasterDetail && this.rowNode.detail;
28392 var pivotMode = this.beans.columnModel.isPivotMode();
28393 // we only use full width for groups, not footers. it wouldn't make sense to include footers if not looking
28394 // for totals. if users complain about this, then we should introduce a new property 'footerUseEntireRow'
28395 // so each can be set independently (as a customer complained about footers getting full width, hence
28396 // introducing this logic)
28397 var isGroupRow = !!this.rowNode.group && !this.rowNode.footer;
28398 var isFullWidthGroup = isGroupRow && this.beans.gridOptionsService.isGroupUseEntireRow(pivotMode);
28399 if (isStub) {
28400 this.rowType = RowType.FullWidthLoading;
28401 }
28402 else if (isDetailCell) {
28403 this.rowType = RowType.FullWidthDetail;
28404 }
28405 else if (isFullWidthCell) {
28406 this.rowType = RowType.FullWidth;
28407 }
28408 else if (isFullWidthGroup) {
28409 this.rowType = RowType.FullWidthGroup;
28410 }
28411 else {
28412 this.rowType = RowType.Normal;
28413 }
28414 };
28415 RowCtrl.prototype.updateColumnLists = function (suppressAnimationFrame) {
28416 var _this = this;
28417 if (suppressAnimationFrame === void 0) { suppressAnimationFrame = false; }
28418 if (this.isFullWidth()) {
28419 return;
28420 }
28421 var noAnimation = suppressAnimationFrame
28422 || this.beans.gridOptionsService.is('suppressAnimationFrame')
28423 || this.printLayout;
28424 if (noAnimation) {
28425 this.updateColumnListsImpl();
28426 return;
28427 }
28428 if (this.updateColumnListsPending) {
28429 return;
28430 }
28431 this.beans.animationFrameService.createTask(function () {
28432 if (!_this.active) {
28433 return;
28434 }
28435 _this.updateColumnListsImpl();
28436 }, this.rowNode.rowIndex, 'createTasksP1');
28437 this.updateColumnListsPending = true;
28438 };
28439 RowCtrl.prototype.createCellCtrls = function (prev, cols, pinned) {
28440 var _this = this;
28441 if (pinned === void 0) { pinned = null; }
28442 var res = {
28443 list: [],
28444 map: {}
28445 };
28446 var addCell = function (colInstanceId, cellCtrl) {
28447 res.list.push(cellCtrl);
28448 res.map[colInstanceId] = cellCtrl;
28449 };
28450 cols.forEach(function (col) {
28451 // we use instanceId's rather than colId as it's possible there is a Column with same Id,
28452 // but it's referring to a different column instance. Happens a lot with pivot, as pivot col id's are
28453 // reused eg pivot_0, pivot_1 etc
28454 var colInstanceId = col.getInstanceId();
28455 var cellCtrl = prev.map[colInstanceId];
28456 if (!cellCtrl) {
28457 cellCtrl = new _cell_cellCtrl__WEBPACK_IMPORTED_MODULE_13__["CellCtrl"](col, _this.rowNode, _this.beans, _this);
28458 }
28459 addCell(colInstanceId, cellCtrl);
28460 });
28461 prev.list.forEach(function (prevCellCtrl) {
28462 var cellInResult = res.map[prevCellCtrl.getColumn().getInstanceId()] != null;
28463 if (cellInResult) {
28464 return;
28465 }
28466 var keepCell = !_this.isCellEligibleToBeRemoved(prevCellCtrl, pinned);
28467 if (keepCell) {
28468 addCell(prevCellCtrl.getColumn().getInstanceId(), prevCellCtrl);
28469 return;
28470 }
28471 prevCellCtrl.destroy();
28472 });
28473 return res;
28474 };
28475 RowCtrl.prototype.updateColumnListsImpl = function () {
28476 var _this = this;
28477 this.updateColumnListsPending = false;
28478 var columnModel = this.beans.columnModel;
28479 if (this.printLayout) {
28480 this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, columnModel.getAllDisplayedColumns());
28481 this.leftCellCtrls = { list: [], map: {} };
28482 this.rightCellCtrls = { list: [], map: {} };
28483 }
28484 else {
28485 var centerCols = columnModel.getViewportCenterColumnsForRow(this.rowNode);
28486 this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, centerCols);
28487 var leftCols = columnModel.getDisplayedLeftColumnsForRow(this.rowNode);
28488 this.leftCellCtrls = this.createCellCtrls(this.leftCellCtrls, leftCols, 'left');
28489 var rightCols = columnModel.getDisplayedRightColumnsForRow(this.rowNode);
28490 this.rightCellCtrls = this.createCellCtrls(this.rightCellCtrls, rightCols, 'right');
28491 }
28492 this.allRowGuis.forEach(function (item) {
28493 var cellControls = item.containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].LEFT ? _this.leftCellCtrls :
28494 item.containerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].RIGHT ? _this.rightCellCtrls : _this.centerCellCtrls;
28495 item.rowComp.setCellCtrls(cellControls.list);
28496 });
28497 };
28498 RowCtrl.prototype.isCellEligibleToBeRemoved = function (cellCtrl, nextContainerPinned) {
28499 var REMOVE_CELL = true;
28500 var KEEP_CELL = false;
28501 // always remove the cell if it's not rendered or if it's in the wrong pinned location
28502 var column = cellCtrl.getColumn();
28503 if (column.getPinned() != nextContainerPinned) {
28504 return REMOVE_CELL;
28505 }
28506 // we want to try and keep editing and focused cells
28507 var editing = cellCtrl.isEditing();
28508 var focused = this.beans.focusService.isCellFocused(cellCtrl.getCellPosition());
28509 var mightWantToKeepCell = editing || focused;
28510 if (mightWantToKeepCell) {
28511 var column_1 = cellCtrl.getColumn();
28512 var displayedColumns = this.beans.columnModel.getAllDisplayedColumns();
28513 var cellStillDisplayed = displayedColumns.indexOf(column_1) >= 0;
28514 return cellStillDisplayed ? KEEP_CELL : REMOVE_CELL;
28515 }
28516 return REMOVE_CELL;
28517 };
28518 RowCtrl.prototype.setAnimateFlags = function (animateIn) {
28519 if (this.isSticky() || !animateIn) {
28520 return;
28521 }
28522 var oldRowTopExists = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_11__["exists"])(this.rowNode.oldRowTop);
28523 var pinningLeft = this.beans.columnModel.isPinningLeft();
28524 var pinningRight = this.beans.columnModel.isPinningRight();
28525 if (oldRowTopExists) {
28526 // if the row had a previous position, we slide it in
28527 this.slideInAnimation.center = true;
28528 this.slideInAnimation.left = pinningLeft;
28529 this.slideInAnimation.right = pinningRight;
28530 }
28531 else {
28532 // if the row had no previous position, we fade it in
28533 this.fadeInAnimation.center = true;
28534 this.fadeInAnimation.left = pinningLeft;
28535 this.fadeInAnimation.right = pinningRight;
28536 }
28537 };
28538 RowCtrl.prototype.isEditing = function () {
28539 return this.editingRow;
28540 };
28541 RowCtrl.prototype.stopRowEditing = function (cancel) {
28542 this.stopEditing(cancel);
28543 };
28544 RowCtrl.prototype.isFullWidth = function () {
28545 return this.rowType !== RowType.Normal;
28546 };
28547 RowCtrl.prototype.getRowType = function () {
28548 return this.rowType;
28549 };
28550 RowCtrl.prototype.refreshFullWidth = function () {
28551 var _this = this;
28552 // returns 'true' if refresh succeeded
28553 var tryRefresh = function (gui, pinned) {
28554 if (!gui) {
28555 return true;
28556 } // no refresh needed
28557 var cellRenderer = gui.rowComp.getFullWidthCellRenderer();
28558 // no cell renderer, either means comp not yet ready, or comp ready but now reference
28559 // to it (happens in react when comp is stateless). if comp not ready, we don't need to
28560 // refresh, however we don't know which one, so we refresh to cover the case where it's
28561 // react comp without reference so need to force a refresh
28562 if (!cellRenderer) {
28563 return false;
28564 }
28565 // no refresh method present, so can't refresh, hard refresh needed
28566 if (!cellRenderer.refresh) {
28567 return false;
28568 }
28569 var params = _this.createFullWidthParams(gui.element, pinned);
28570 var refreshSucceeded = cellRenderer.refresh(params);
28571 return refreshSucceeded;
28572 };
28573 var fullWidthSuccess = tryRefresh(this.fullWidthGui, null);
28574 var centerSuccess = tryRefresh(this.centerGui, null);
28575 var leftSuccess = tryRefresh(this.leftGui, 'left');
28576 var rightSuccess = tryRefresh(this.rightGui, 'right');
28577 var allFullWidthRowsRefreshed = fullWidthSuccess && centerSuccess && leftSuccess && rightSuccess;
28578 return allFullWidthRowsRefreshed;
28579 };
28580 RowCtrl.prototype.addListeners = function () {
28581 var _this = this;
28582 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_HEIGHT_CHANGED, function () { return _this.onRowHeightChanged(); });
28583 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_ROW_SELECTED, function () { return _this.onRowSelected(); });
28584 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_ROW_INDEX_CHANGED, this.onRowIndexChanged.bind(this));
28585 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_TOP_CHANGED, this.onTopChanged.bind(this));
28586 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_EXPANDED_CHANGED, this.updateExpandedCss.bind(this));
28587 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_HAS_CHILDREN_CHANGED, this.updateExpandedCss.bind(this));
28588 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_DATA_CHANGED, this.onRowNodeDataChanged.bind(this));
28589 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_CELL_CHANGED, this.onRowNodeCellChanged.bind(this));
28590 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_HIGHLIGHT_CHANGED, this.onRowNodeHighlightChanged.bind(this));
28591 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_DRAGGING_CHANGED, this.onRowNodeDraggingChanged.bind(this));
28592 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_UI_LEVEL_CHANGED, this.onUiLevelChanged.bind(this));
28593 var eventService = this.beans.eventService;
28594 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_PAGINATION_PIXEL_OFFSET_CHANGED, this.onPaginationPixelOffsetChanged.bind(this));
28595 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_HEIGHT_SCALE_CHANGED, this.onTopChanged.bind(this));
28596 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));
28597 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_VIRTUAL_COLUMNS_CHANGED, this.onVirtualColumnsChanged.bind(this));
28598 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_CELL_FOCUSED, this.onCellFocused.bind(this));
28599 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_CELL_FOCUS_CLEARED, this.onCellFocusCleared.bind(this));
28600 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_PAGINATION_CHANGED, this.onPaginationChanged.bind(this));
28601 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_MODEL_UPDATED, this.onModelUpdated.bind(this));
28602 this.addManagedListener(eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_COLUMN_MOVED, this.onColumnMoved.bind(this));
28603 this.addListenersForCellComps();
28604 };
28605 RowCtrl.prototype.onColumnMoved = function () {
28606 this.updateColumnLists();
28607 };
28608 RowCtrl.prototype.addListenersForCellComps = function () {
28609 var _this = this;
28610 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_ROW_INDEX_CHANGED, function () {
28611 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onRowIndexChanged(); });
28612 });
28613 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_CELL_CHANGED, function (event) {
28614 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onCellChanged(event); });
28615 });
28616 };
28617 RowCtrl.prototype.onRowNodeDataChanged = function (event) {
28618 // if this is an update, we want to refresh, as this will allow the user to put in a transition
28619 // into the cellRenderer refresh method. otherwise this might be completely new data, in which case
28620 // we will want to completely replace the cells
28621 this.getAllCellCtrls().forEach(function (cellCtrl) {
28622 return cellCtrl.refreshCell({
28623 suppressFlash: !event.update,
28624 newData: !event.update
28625 });
28626 });
28627 // check for selected also, as this could be after lazy loading of the row data, in which case
28628 // the id might of just gotten set inside the row and the row selected state may of changed
28629 // as a result. this is what happens when selected rows are loaded in virtual pagination.
28630 // - niall note - since moving to the stub component, this may no longer be true, as replacing
28631 // the stub component now replaces the entire row
28632 this.onRowSelected();
28633 // as data has changed, then the style and class needs to be recomputed
28634 this.postProcessCss();
28635 };
28636 RowCtrl.prototype.onRowNodeCellChanged = function () {
28637 // as data has changed, then the style and class needs to be recomputed
28638 this.postProcessCss();
28639 };
28640 RowCtrl.prototype.postProcessCss = function () {
28641 this.setStylesFromGridOptions();
28642 this.postProcessClassesFromGridOptions();
28643 this.postProcessRowClassRules();
28644 this.postProcessRowDragging();
28645 };
28646 RowCtrl.prototype.onRowNodeHighlightChanged = function () {
28647 var highlighted = this.rowNode.highlighted;
28648 this.allRowGuis.forEach(function (gui) {
28649 var aboveOn = highlighted === _interfaces_iRowNode__WEBPACK_IMPORTED_MODULE_2__["RowHighlightPosition"].Above;
28650 var belowOn = highlighted === _interfaces_iRowNode__WEBPACK_IMPORTED_MODULE_2__["RowHighlightPosition"].Below;
28651 gui.rowComp.addOrRemoveCssClass('ag-row-highlight-above', aboveOn);
28652 gui.rowComp.addOrRemoveCssClass('ag-row-highlight-below', belowOn);
28653 });
28654 };
28655 RowCtrl.prototype.onRowNodeDraggingChanged = function () {
28656 this.postProcessRowDragging();
28657 };
28658 RowCtrl.prototype.postProcessRowDragging = function () {
28659 var dragging = this.rowNode.dragging;
28660 this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-dragging', dragging); });
28661 };
28662 RowCtrl.prototype.updateExpandedCss = function () {
28663 var expandable = this.rowNode.isExpandable();
28664 var expanded = this.rowNode.expanded == true;
28665 this.allRowGuis.forEach(function (gui) {
28666 gui.rowComp.addOrRemoveCssClass('ag-row-group', expandable);
28667 gui.rowComp.addOrRemoveCssClass('ag-row-group-expanded', expandable && expanded);
28668 gui.rowComp.addOrRemoveCssClass('ag-row-group-contracted', expandable && !expanded);
28669 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaExpanded"])(gui.element, expandable && expanded);
28670 });
28671 };
28672 RowCtrl.prototype.onDisplayedColumnsChanged = function () {
28673 // we skip animations for onDisplayedColumnChanged, as otherwise the client could remove columns and
28674 // then set data, and any old valueGetter's (ie from cols that were removed) would still get called.
28675 this.updateColumnLists(true);
28676 if (this.beans.columnModel.wasAutoRowHeightEverActive()) {
28677 this.rowNode.checkAutoHeights();
28678 }
28679 };
28680 RowCtrl.prototype.onVirtualColumnsChanged = function () {
28681 this.updateColumnLists();
28682 };
28683 RowCtrl.prototype.getRowPosition = function () {
28684 return {
28685 rowPinned: Object(_utils_generic__WEBPACK_IMPORTED_MODULE_11__["makeNull"])(this.rowNode.rowPinned),
28686 rowIndex: this.rowNode.rowIndex
28687 };
28688 };
28689 RowCtrl.prototype.onKeyboardNavigate = function (keyboardEvent) {
28690 var currentFullWidthComp = this.allRowGuis.find(function (c) { return c.element.contains(keyboardEvent.target); });
28691 var currentFullWidthContainer = currentFullWidthComp ? currentFullWidthComp.element : null;
28692 var isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;
28693 if (!isFullWidthContainerFocused) {
28694 return;
28695 }
28696 var node = this.rowNode;
28697 var lastFocusedCell = this.beans.focusService.getFocusedCell();
28698 var cellPosition = {
28699 rowIndex: node.rowIndex,
28700 rowPinned: node.rowPinned,
28701 column: (lastFocusedCell && lastFocusedCell.column)
28702 };
28703 this.beans.navigationService.navigateToNextCell(keyboardEvent, keyboardEvent.key, cellPosition, true);
28704 keyboardEvent.preventDefault();
28705 };
28706 RowCtrl.prototype.onTabKeyDown = function (keyboardEvent) {
28707 if (keyboardEvent.defaultPrevented || Object(_utils_event__WEBPACK_IMPORTED_MODULE_9__["isStopPropagationForAgGrid"])(keyboardEvent)) {
28708 return;
28709 }
28710 var currentFullWidthComp = this.allRowGuis.find(function (c) { return c.element.contains(keyboardEvent.target); });
28711 var currentFullWidthContainer = currentFullWidthComp ? currentFullWidthComp.element : null;
28712 var isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;
28713 var nextEl = null;
28714 if (!isFullWidthContainerFocused) {
28715 nextEl = this.beans.focusService.findNextFocusableElement(currentFullWidthContainer, false, keyboardEvent.shiftKey);
28716 }
28717 if ((this.isFullWidth() && isFullWidthContainerFocused) || !nextEl) {
28718 this.beans.navigationService.onTabKeyDown(this, keyboardEvent);
28719 }
28720 };
28721 RowCtrl.prototype.onFullWidthRowFocused = function (event) {
28722 var _a;
28723 var node = this.rowNode;
28724 var isFocused = !event ? false : this.isFullWidth() && event.rowIndex === node.rowIndex && event.rowPinned == node.rowPinned;
28725 var element = this.fullWidthGui ? this.fullWidthGui.element : (_a = this.centerGui) === null || _a === void 0 ? void 0 : _a.element;
28726 if (!element) {
28727 return;
28728 } // can happen with react ui, comp not yet ready
28729 element.classList.toggle('ag-full-width-focus', isFocused);
28730 if (isFocused) {
28731 // we don't scroll normal rows into view when we focus them, so we don't want
28732 // to scroll Full Width rows either.
28733 element.focus({ preventScroll: true });
28734 }
28735 };
28736 RowCtrl.prototype.refreshCell = function (cellCtrl) {
28737 this.centerCellCtrls = this.removeCellCtrl(this.centerCellCtrls, cellCtrl);
28738 this.leftCellCtrls = this.removeCellCtrl(this.leftCellCtrls, cellCtrl);
28739 this.rightCellCtrls = this.removeCellCtrl(this.rightCellCtrls, cellCtrl);
28740 this.updateColumnLists();
28741 };
28742 RowCtrl.prototype.removeCellCtrl = function (prev, cellCtrlToRemove) {
28743 var res = {
28744 list: [],
28745 map: {}
28746 };
28747 prev.list.forEach(function (cellCtrl) {
28748 if (cellCtrl === cellCtrlToRemove) {
28749 return;
28750 }
28751 res.list.push(cellCtrl);
28752 res.map[cellCtrl.getInstanceId()] = cellCtrl;
28753 });
28754 return res;
28755 };
28756 RowCtrl.prototype.onMouseEvent = function (eventName, mouseEvent) {
28757 switch (eventName) {
28758 case 'dblclick':
28759 this.onRowDblClick(mouseEvent);
28760 break;
28761 case 'click':
28762 this.onRowClick(mouseEvent);
28763 break;
28764 case 'touchstart':
28765 case 'mousedown':
28766 this.onRowMouseDown(mouseEvent);
28767 break;
28768 }
28769 };
28770 RowCtrl.prototype.createRowEvent = function (type, domEvent) {
28771 return {
28772 type: type,
28773 node: this.rowNode,
28774 data: this.rowNode.data,
28775 rowIndex: this.rowNode.rowIndex,
28776 rowPinned: this.rowNode.rowPinned,
28777 context: this.beans.gridOptionsService.context,
28778 api: this.beans.gridOptionsService.api,
28779 columnApi: this.beans.gridOptionsService.columnApi,
28780 event: domEvent
28781 };
28782 };
28783 RowCtrl.prototype.createRowEventWithSource = function (type, domEvent) {
28784 var event = this.createRowEvent(type, domEvent);
28785 // when first developing this, we included the rowComp in the event.
28786 // this seems very weird. so when introducing the event types, i left the 'source'
28787 // out of the type, and just include the source in the two places where this event
28788 // was fired (rowClicked and rowDoubleClicked). it doesn't make sense for any
28789 // users to be using this, as the rowComp isn't an object we expose, so would be
28790 // very surprising if a user was using it.
28791 event.source = this;
28792 return event;
28793 };
28794 RowCtrl.prototype.onRowDblClick = function (mouseEvent) {
28795 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_9__["isStopPropagationForAgGrid"])(mouseEvent)) {
28796 return;
28797 }
28798 var agEvent = this.createRowEventWithSource(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_ROW_DOUBLE_CLICKED, mouseEvent);
28799 this.beans.eventService.dispatchEvent(agEvent);
28800 };
28801 RowCtrl.prototype.onRowMouseDown = function (mouseEvent) {
28802 this.lastMouseDownOnDragger = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_8__["isElementChildOfClass"])(mouseEvent.target, 'ag-row-drag', 3);
28803 if (!this.isFullWidth()) {
28804 return;
28805 }
28806 var node = this.rowNode;
28807 var columnModel = this.beans.columnModel;
28808 if (this.beans.rangeService) {
28809 this.beans.rangeService.removeAllCellRanges();
28810 }
28811 this.beans.focusService.setFocusedCell({
28812 rowIndex: node.rowIndex,
28813 column: columnModel.getAllDisplayedColumns()[0],
28814 rowPinned: node.rowPinned,
28815 forceBrowserFocus: true
28816 });
28817 };
28818 RowCtrl.prototype.onRowClick = function (mouseEvent) {
28819 var stop = Object(_utils_event__WEBPACK_IMPORTED_MODULE_9__["isStopPropagationForAgGrid"])(mouseEvent) || this.lastMouseDownOnDragger;
28820 if (stop) {
28821 return;
28822 }
28823 var agEvent = this.createRowEventWithSource(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_ROW_CLICKED, mouseEvent);
28824 this.beans.eventService.dispatchEvent(agEvent);
28825 // ctrlKey for windows, metaKey for Apple
28826 var multiSelectKeyPressed = mouseEvent.ctrlKey || mouseEvent.metaKey;
28827 var shiftKeyPressed = mouseEvent.shiftKey;
28828 // we do not allow selecting the group by clicking, when groupSelectChildren, as the logic to
28829 // handle this is broken. to observe, change the logic below and allow groups to be selected.
28830 // you will see the group gets selected, then all children get selected, then the grid unselects
28831 // the children (as the default behaviour when clicking is to unselect other rows) which results
28832 // in the group getting unselected (as all children are unselected). the correct thing would be
28833 // to change this, so that children of the selected group are not then subsequenly un-selected.
28834 var groupSelectsChildren = this.beans.gridOptionsService.is('groupSelectsChildren');
28835 if (
28836 // we do not allow selecting groups by clicking (as the click here expands the group), or if it's a detail row,
28837 // so return if it's a group row
28838 (groupSelectsChildren && this.rowNode.group) ||
28839 // this is needed so we don't unselect other rows when we click this row, eg if this row is not selectable,
28840 // and we click it, the selection should not change (ie any currently selected row should stay selected)
28841 !this.rowNode.selectable ||
28842 // we also don't allow selection of pinned rows
28843 this.rowNode.rowPinned ||
28844 // if no selection method enabled, do nothing
28845 !this.beans.gridOptionsService.isRowSelection() ||
28846 // if click selection suppressed, do nothing
28847 this.beans.gridOptionsService.is('suppressRowClickSelection')) {
28848 return;
28849 }
28850 var multiSelectOnClick = this.beans.gridOptionsService.is('rowMultiSelectWithClick');
28851 var rowDeselectionWithCtrl = !this.beans.gridOptionsService.is('suppressRowDeselection');
28852 var source = 'rowClicked';
28853 if (this.rowNode.isSelected()) {
28854 if (multiSelectOnClick) {
28855 this.rowNode.setSelectedParams({ newValue: false, event: mouseEvent, source: source });
28856 }
28857 else if (multiSelectKeyPressed) {
28858 if (rowDeselectionWithCtrl) {
28859 this.rowNode.setSelectedParams({ newValue: false, event: mouseEvent, source: source });
28860 }
28861 }
28862 else {
28863 // selected with no multi key, must make sure anything else is unselected
28864 this.rowNode.setSelectedParams({ newValue: true, clearSelection: !shiftKeyPressed, rangeSelect: shiftKeyPressed, event: mouseEvent, source: source });
28865 }
28866 }
28867 else {
28868 var clearSelection = multiSelectOnClick ? false : !multiSelectKeyPressed;
28869 this.rowNode.setSelectedParams({ newValue: true, clearSelection: clearSelection, rangeSelect: shiftKeyPressed, event: mouseEvent, source: source });
28870 }
28871 };
28872 RowCtrl.prototype.setupDetailRowAutoHeight = function (eDetailGui) {
28873 var _this = this;
28874 if (this.rowType !== RowType.FullWidthDetail) {
28875 return;
28876 }
28877 if (!this.beans.gridOptionsService.is('detailRowAutoHeight')) {
28878 return;
28879 }
28880 var checkRowSizeFunc = function () {
28881 var clientHeight = eDetailGui.clientHeight;
28882 // if the UI is not ready, the height can be 0, which we ignore, as otherwise a flicker will occur
28883 // as UI goes from the default height, to 0, then to the real height as UI becomes ready. this means
28884 // it's not possible for have 0 as auto-height, however this is an improbable use case, as even an
28885 // empty detail grid would still have some styling around it giving at least a few pixels.
28886 if (clientHeight != null && clientHeight > 0) {
28887 // we do the update in a timeout, to make sure we are not calling from inside the grid
28888 // doing another update
28889 var updateRowHeightFunc = function () {
28890 _this.rowNode.setRowHeight(clientHeight);
28891 if (_this.beans.clientSideRowModel) {
28892 _this.beans.clientSideRowModel.onRowHeightChanged();
28893 }
28894 else if (_this.beans.serverSideRowModel) {
28895 _this.beans.serverSideRowModel.onRowHeightChanged();
28896 }
28897 };
28898 _this.beans.frameworkOverrides.setTimeout(updateRowHeightFunc, 0);
28899 }
28900 };
28901 var resizeObserverDestroyFunc = this.beans.resizeObserverService.observeResize(eDetailGui, checkRowSizeFunc);
28902 this.addDestroyFunc(resizeObserverDestroyFunc);
28903 checkRowSizeFunc();
28904 };
28905 RowCtrl.prototype.createFullWidthParams = function (eRow, pinned) {
28906 var _this = this;
28907 var params = {
28908 fullWidth: true,
28909 data: this.rowNode.data,
28910 node: this.rowNode,
28911 value: this.rowNode.key,
28912 valueFormatted: this.rowNode.key,
28913 rowIndex: this.rowNode.rowIndex,
28914 api: this.beans.gridOptionsService.api,
28915 columnApi: this.beans.gridOptionsService.columnApi,
28916 context: this.beans.gridOptionsService.context,
28917 // these need to be taken out, as part of 'afterAttached' now
28918 eGridCell: eRow,
28919 eParentOfValue: eRow,
28920 pinned: pinned,
28921 addRenderedRowListener: this.addEventListener.bind(this),
28922 registerRowDragger: function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) { return _this.addFullWidthRowDragging(rowDraggerElement, dragStartPixels, value, suppressVisibilityChange); }
28923 };
28924 return params;
28925 };
28926 RowCtrl.prototype.addFullWidthRowDragging = function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) {
28927 if (value === void 0) { value = ''; }
28928 if (!this.isFullWidth()) {
28929 return;
28930 }
28931 var rowDragComp = new _rowDragComp__WEBPACK_IMPORTED_MODULE_14__["RowDragComp"](function () { return value; }, this.rowNode, undefined, rowDraggerElement, dragStartPixels, suppressVisibilityChange);
28932 this.createManagedBean(rowDragComp, this.beans.context);
28933 };
28934 RowCtrl.prototype.onUiLevelChanged = function () {
28935 var newLevel = this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);
28936 if (this.rowLevel != newLevel) {
28937 var classToAdd_1 = 'ag-row-level-' + newLevel;
28938 var classToRemove_1 = 'ag-row-level-' + this.rowLevel;
28939 this.allRowGuis.forEach(function (gui) {
28940 gui.rowComp.addOrRemoveCssClass(classToAdd_1, true);
28941 gui.rowComp.addOrRemoveCssClass(classToRemove_1, false);
28942 });
28943 }
28944 this.rowLevel = newLevel;
28945 };
28946 RowCtrl.prototype.isFirstRowOnPage = function () {
28947 return this.rowNode.rowIndex === this.beans.paginationProxy.getPageFirstRow();
28948 };
28949 RowCtrl.prototype.isLastRowOnPage = function () {
28950 return this.rowNode.rowIndex === this.beans.paginationProxy.getPageLastRow();
28951 };
28952 RowCtrl.prototype.onModelUpdated = function () {
28953 this.refreshFirstAndLastRowStyles();
28954 };
28955 RowCtrl.prototype.refreshFirstAndLastRowStyles = function () {
28956 var newFirst = this.isFirstRowOnPage();
28957 var newLast = this.isLastRowOnPage();
28958 if (this.firstRowOnPage !== newFirst) {
28959 this.firstRowOnPage = newFirst;
28960 this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-first', newFirst); });
28961 }
28962 if (this.lastRowOnPage !== newLast) {
28963 this.lastRowOnPage = newLast;
28964 this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-last', newLast); });
28965 }
28966 };
28967 RowCtrl.prototype.stopEditing = function (cancel) {
28968 var e_1, _a;
28969 if (cancel === void 0) { cancel = false; }
28970 // if we are already stopping row edit, there is
28971 // no need to start this process again.
28972 if (this.stoppingRowEdit) {
28973 return;
28974 }
28975 var cellControls = this.getAllCellCtrls();
28976 var isRowEdit = this.editingRow;
28977 this.stoppingRowEdit = true;
28978 var fireRowEditEvent = false;
28979 try {
28980 for (var cellControls_1 = __values(cellControls), cellControls_1_1 = cellControls_1.next(); !cellControls_1_1.done; cellControls_1_1 = cellControls_1.next()) {
28981 var ctrl = cellControls_1_1.value;
28982 var valueChanged = ctrl.stopEditing(cancel);
28983 if (isRowEdit && !cancel && !fireRowEditEvent && valueChanged) {
28984 fireRowEditEvent = true;
28985 }
28986 }
28987 }
28988 catch (e_1_1) { e_1 = { error: e_1_1 }; }
28989 finally {
28990 try {
28991 if (cellControls_1_1 && !cellControls_1_1.done && (_a = cellControls_1.return)) _a.call(cellControls_1);
28992 }
28993 finally { if (e_1) throw e_1.error; }
28994 }
28995 if (fireRowEditEvent) {
28996 var event_1 = this.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_ROW_VALUE_CHANGED);
28997 this.beans.eventService.dispatchEvent(event_1);
28998 }
28999 if (isRowEdit) {
29000 this.setEditingRow(false);
29001 }
29002 this.stoppingRowEdit = false;
29003 };
29004 RowCtrl.prototype.setInlineEditingCss = function (editing) {
29005 this.allRowGuis.forEach(function (gui) {
29006 gui.rowComp.addOrRemoveCssClass("ag-row-inline-editing", editing);
29007 gui.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing", !editing);
29008 });
29009 };
29010 RowCtrl.prototype.setEditingRow = function (value) {
29011 this.editingRow = value;
29012 this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-editing', value); });
29013 var event = value ?
29014 this.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_ROW_EDITING_STARTED)
29015 : this.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_ROW_EDITING_STOPPED);
29016 this.beans.eventService.dispatchEvent(event);
29017 };
29018 RowCtrl.prototype.startRowEditing = function (key, charPress, sourceRenderedCell, event) {
29019 if (key === void 0) { key = null; }
29020 if (charPress === void 0) { charPress = null; }
29021 if (sourceRenderedCell === void 0) { sourceRenderedCell = null; }
29022 if (event === void 0) { event = null; }
29023 // don't do it if already editing
29024 if (this.editingRow) {
29025 return;
29026 }
29027 var atLeastOneEditing = this.getAllCellCtrls().reduce(function (prev, cellCtrl) {
29028 var cellStartedEdit = cellCtrl === sourceRenderedCell;
29029 if (cellStartedEdit) {
29030 cellCtrl.startEditing(key, charPress, cellStartedEdit, event);
29031 }
29032 else {
29033 cellCtrl.startEditing(null, null, cellStartedEdit, event);
29034 }
29035 if (prev) {
29036 return true;
29037 }
29038 return cellCtrl.isEditing();
29039 }, false);
29040 if (atLeastOneEditing) {
29041 this.setEditingRow(true);
29042 }
29043 };
29044 RowCtrl.prototype.getAllCellCtrls = function () {
29045 if (this.leftCellCtrls.list.length === 0 && this.rightCellCtrls.list.length === 0) {
29046 return this.centerCellCtrls.list;
29047 }
29048 var res = __spread(this.centerCellCtrls.list, this.leftCellCtrls.list, this.rightCellCtrls.list);
29049 return res;
29050 };
29051 RowCtrl.prototype.postProcessClassesFromGridOptions = function () {
29052 var _this = this;
29053 var cssClasses = this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);
29054 if (!cssClasses || !cssClasses.length) {
29055 return;
29056 }
29057 cssClasses.forEach(function (classStr) {
29058 _this.allRowGuis.forEach(function (c) { return c.rowComp.addOrRemoveCssClass(classStr, true); });
29059 });
29060 };
29061 RowCtrl.prototype.postProcessRowClassRules = function () {
29062 var _this = this;
29063 this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode, function (className) {
29064 _this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass(className, true); });
29065 }, function (className) {
29066 _this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass(className, false); });
29067 });
29068 };
29069 RowCtrl.prototype.setStylesFromGridOptions = function (gui) {
29070 var rowStyles = this.processStylesFromGridOptions();
29071 this.forEachGui(gui, function (gui) { return gui.rowComp.setUserStyles(rowStyles); });
29072 };
29073 RowCtrl.prototype.getPinnedForContainer = function (rowContainerType) {
29074 var pinned = rowContainerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].LEFT
29075 ? 'left'
29076 : rowContainerType === _gridBodyComp_rowContainer_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_4__["RowContainerType"].RIGHT
29077 ? 'right'
29078 : null;
29079 return pinned;
29080 };
29081 RowCtrl.prototype.getInitialRowClasses = function (rowContainerType) {
29082 var pinned = this.getPinnedForContainer(rowContainerType);
29083 var params = {
29084 rowNode: this.rowNode,
29085 rowFocused: this.rowFocused,
29086 fadeRowIn: this.fadeInAnimation[rowContainerType],
29087 rowIsEven: this.rowNode.rowIndex % 2 === 0,
29088 rowLevel: this.rowLevel,
29089 fullWidthRow: this.isFullWidth(),
29090 firstRowOnPage: this.isFirstRowOnPage(),
29091 lastRowOnPage: this.isLastRowOnPage(),
29092 printLayout: this.printLayout,
29093 expandable: this.rowNode.isExpandable(),
29094 pinned: pinned
29095 };
29096 return this.beans.rowCssClassCalculator.getInitialRowClasses(params);
29097 };
29098 RowCtrl.prototype.processStylesFromGridOptions = function () {
29099 // part 1 - rowStyle
29100 var rowStyle = this.beans.gridOptionsService.get('rowStyle');
29101 if (rowStyle && typeof rowStyle === 'function') {
29102 console.warn('AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead');
29103 return;
29104 }
29105 // part 1 - rowStyleFunc
29106 var rowStyleFunc = this.beans.gridOptionsService.getCallback('getRowStyle');
29107 var rowStyleFuncResult;
29108 if (rowStyleFunc) {
29109 var params = {
29110 data: this.rowNode.data,
29111 node: this.rowNode,
29112 rowIndex: this.rowNode.rowIndex
29113 };
29114 rowStyleFuncResult = rowStyleFunc(params);
29115 }
29116 return Object.assign({}, rowStyle, rowStyleFuncResult);
29117 };
29118 RowCtrl.prototype.onRowSelected = function (gui) {
29119 var _this = this;
29120 // Treat undefined as false, if we pass undefined down it gets treated as toggle class, rather than explicitly
29121 // setting the required value
29122 var selected = !!this.rowNode.isSelected();
29123 this.forEachGui(gui, function (gui) {
29124 gui.rowComp.addOrRemoveCssClass('ag-row-selected', selected);
29125 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaSelected"])(gui.element, selected ? true : undefined);
29126 var ariaLabel = _this.createAriaLabel();
29127 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaLabel"])(gui.element, ariaLabel == null ? '' : ariaLabel);
29128 });
29129 };
29130 RowCtrl.prototype.createAriaLabel = function () {
29131 var selected = this.rowNode.isSelected();
29132 if (selected && this.beans.gridOptionsService.is('suppressRowDeselection')) {
29133 return undefined;
29134 }
29135 var translate = this.beans.localeService.getLocaleTextFunc();
29136 var label = translate(selected ? 'ariaRowDeselect' : 'ariaRowSelect', "Press SPACE to " + (selected ? 'deselect' : 'select') + " this row.");
29137 return label;
29138 };
29139 RowCtrl.prototype.isUseAnimationFrameForCreate = function () {
29140 return this.useAnimationFrameForCreate;
29141 };
29142 RowCtrl.prototype.addHoverFunctionality = function (eRow) {
29143 var _this = this;
29144 // because we use animation frames to do this, it's possible the row no longer exists
29145 // by the time we get to add it
29146 if (!this.active) {
29147 return;
29148 }
29149 // because mouseenter and mouseleave do not propagate, we cannot listen on the gridPanel
29150 // like we do for all the other mouse events.
29151 // because of the pinning, we cannot simply add / remove the class based on the eRow. we
29152 // have to check all eRow's (body & pinned). so the trick is if any of the rows gets a
29153 // mouse hover, it sets such in the rowNode, and then all three reflect the change as
29154 // all are listening for event on the row node.
29155 // step 1 - add listener, to set flag on row node
29156 this.addManagedListener(eRow, 'mouseenter', function () { return _this.rowNode.onMouseEnter(); });
29157 this.addManagedListener(eRow, 'mouseleave', function () { return _this.rowNode.onMouseLeave(); });
29158 // step 2 - listen for changes on row node (which any eRow can trigger)
29159 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_MOUSE_ENTER, function () {
29160 // if hover turned off, we don't add the class. we do this here so that if the application
29161 // toggles this property mid way, we remove the hover form the last row, but we stop
29162 // adding hovers from that point onwards. Also, do not highlight while dragging elements around.
29163 if (!_this.beans.dragService.isDragging() &&
29164 !_this.beans.gridOptionsService.is('suppressRowHoverHighlight')) {
29165 eRow.classList.add('ag-row-hover');
29166 }
29167 });
29168 this.addManagedListener(this.rowNode, _entities_rowNode__WEBPACK_IMPORTED_MODULE_1__["RowNode"].EVENT_MOUSE_LEAVE, function () {
29169 eRow.classList.remove('ag-row-hover');
29170 });
29171 };
29172 // for animation, we don't want to animate entry or exit to a very far away pixel,
29173 // otherwise the row would move so fast, it would appear to disappear. so this method
29174 // moves the row closer to the viewport if it is far away, so the row slide in / out
29175 // at a speed the user can see.
29176 RowCtrl.prototype.roundRowTopToBounds = function (rowTop) {
29177 var gridBodyCon = this.beans.ctrlsService.getGridBodyCtrl();
29178 var range = gridBodyCon.getScrollFeature().getVScrollPosition();
29179 var minPixel = this.applyPaginationOffset(range.top, true) - 100;
29180 var maxPixel = this.applyPaginationOffset(range.bottom, true) + 100;
29181 return Math.min(Math.max(minPixel, rowTop), maxPixel);
29182 };
29183 RowCtrl.prototype.getFrameworkOverrides = function () {
29184 return this.beans.frameworkOverrides;
29185 };
29186 RowCtrl.prototype.forEachGui = function (gui, callback) {
29187 var list = gui ? [gui] : this.allRowGuis;
29188 list.forEach(callback);
29189 };
29190 RowCtrl.prototype.onRowHeightChanged = function (gui) {
29191 // check for exists first - if the user is resetting the row height, then
29192 // it will be null (or undefined) momentarily until the next time the flatten
29193 // stage is called where the row will then update again with a new height
29194 if (this.rowNode.rowHeight == null) {
29195 return;
29196 }
29197 var rowHeight = this.rowNode.rowHeight;
29198 var defaultRowHeight = this.beans.environment.getDefaultRowHeight();
29199 var isHeightFromFunc = this.beans.gridOptionsService.isGetRowHeightFunction();
29200 var heightFromFunc = isHeightFromFunc ? this.beans.gridOptionsService.getRowHeightForNode(this.rowNode).height : undefined;
29201 var lineHeight = heightFromFunc ? Math.min(defaultRowHeight, heightFromFunc) - 2 + "px" : undefined;
29202 this.forEachGui(gui, function (gui) {
29203 gui.element.style.height = rowHeight + "px";
29204 // If the row height is coming from a function, this means some rows can
29205 // be smaller than the theme had intended. so we set --ag-line-height on
29206 // the row, which is picked up by the theme CSS and is used in a calc
29207 // for the CSS line-height property, which makes sure the line-height is
29208 // not bigger than the row height, otherwise the row text would not fit.
29209 // We do not use rowNode.rowHeight here, as this could be the result of autoHeight,
29210 // and we found using the autoHeight result causes a loop, where changing the
29211 // line-height them impacts the cell height, resulting in a new autoHeight,
29212 // resulting in a new line-height and so on loop.
29213 // const heightFromFunc = this.beans.gridOptionsService.getRowHeightForNode(this.rowNode).height;
29214 if (lineHeight) {
29215 gui.element.style.setProperty('--ag-line-height', lineHeight);
29216 }
29217 });
29218 };
29219 RowCtrl.prototype.addEventListener = function (eventType, listener) {
29220 _super.prototype.addEventListener.call(this, eventType, listener);
29221 };
29222 RowCtrl.prototype.removeEventListener = function (eventType, listener) {
29223 _super.prototype.removeEventListener.call(this, eventType, listener);
29224 };
29225 // note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.
29226 RowCtrl.prototype.destroyFirstPass = function () {
29227 this.active = false;
29228 // why do we have this method? shouldn't everything below be added as a destroy func beside
29229 // the corresponding create logic?
29230 this.setupRemoveAnimation();
29231 var event = this.createRowEvent(_events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_VIRTUAL_ROW_REMOVED);
29232 this.dispatchEvent(event);
29233 this.beans.eventService.dispatchEvent(event);
29234 _super.prototype.destroy.call(this);
29235 };
29236 RowCtrl.prototype.setupRemoveAnimation = function () {
29237 // we don't animate sticky rows
29238 if (this.isSticky()) {
29239 return;
29240 }
29241 var rowStillVisibleJustNotInViewport = this.rowNode.rowTop != null;
29242 if (rowStillVisibleJustNotInViewport) {
29243 // if the row is not rendered, but in viewport, it means it has moved,
29244 // so we animate the row out. if the new location is very far away,
29245 // the animation will be so fast the row will look like it's just disappeared,
29246 // so instead we animate to a position just outside the viewport.
29247 var rowTop = this.roundRowTopToBounds(this.rowNode.rowTop);
29248 this.setRowTop(rowTop);
29249 }
29250 else {
29251 this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', true); });
29252 }
29253 };
29254 RowCtrl.prototype.destroySecondPass = function () {
29255 this.allRowGuis.length = 0;
29256 var destroyCellCtrls = function (ctrls) {
29257 ctrls.list.forEach(function (c) { return c.destroy(); });
29258 return { list: [], map: {} };
29259 };
29260 this.centerCellCtrls = destroyCellCtrls(this.centerCellCtrls);
29261 this.leftCellCtrls = destroyCellCtrls(this.leftCellCtrls);
29262 this.rightCellCtrls = destroyCellCtrls(this.rightCellCtrls);
29263 };
29264 RowCtrl.prototype.setFocusedClasses = function (gui) {
29265 var _this = this;
29266 this.forEachGui(gui, function (gui) {
29267 gui.rowComp.addOrRemoveCssClass('ag-row-focus', _this.rowFocused);
29268 gui.rowComp.addOrRemoveCssClass('ag-row-no-focus', !_this.rowFocused);
29269 });
29270 };
29271 RowCtrl.prototype.onCellFocused = function () {
29272 this.onCellFocusChanged();
29273 };
29274 RowCtrl.prototype.onCellFocusCleared = function () {
29275 this.onCellFocusChanged();
29276 };
29277 RowCtrl.prototype.onCellFocusChanged = function () {
29278 var rowFocused = this.beans.focusService.isRowFocused(this.rowNode.rowIndex, this.rowNode.rowPinned);
29279 if (rowFocused !== this.rowFocused) {
29280 this.rowFocused = rowFocused;
29281 this.setFocusedClasses();
29282 }
29283 // if we are editing, then moving the focus out of a row will stop editing
29284 if (!rowFocused && this.editingRow) {
29285 this.stopEditing(false);
29286 }
29287 };
29288 RowCtrl.prototype.onPaginationChanged = function () {
29289 var currentPage = this.beans.paginationProxy.getCurrentPage();
29290 // it is possible this row is in the new page, but the page number has changed, which means
29291 // it needs to reposition itself relative to the new page
29292 if (this.paginationPage !== currentPage) {
29293 this.paginationPage = currentPage;
29294 this.onTopChanged();
29295 }
29296 this.refreshFirstAndLastRowStyles();
29297 };
29298 RowCtrl.prototype.onTopChanged = function () {
29299 this.setRowTop(this.rowNode.rowTop);
29300 };
29301 RowCtrl.prototype.onPaginationPixelOffsetChanged = function () {
29302 // the pixel offset is used when calculating rowTop to set on the row DIV
29303 this.onTopChanged();
29304 };
29305 // applies pagination offset, eg if on second page, and page height is 500px, then removes
29306 // 500px from the top position, so a row with rowTop 600px is displayed at location 100px.
29307 // reverse will take the offset away rather than add.
29308 RowCtrl.prototype.applyPaginationOffset = function (topPx, reverse) {
29309 if (reverse === void 0) { reverse = false; }
29310 if (this.rowNode.isRowPinned()) {
29311 return topPx;
29312 }
29313 var pixelOffset = this.beans.paginationProxy.getPixelOffset();
29314 var multiplier = reverse ? 1 : -1;
29315 return topPx + (pixelOffset * multiplier);
29316 };
29317 RowCtrl.prototype.setRowTop = function (pixels) {
29318 // print layout uses normal flow layout for row positioning
29319 if (this.printLayout) {
29320 return;
29321 }
29322 // need to make sure rowTop is not null, as this can happen if the node was once
29323 // visible (ie parent group was expanded) but is now not visible
29324 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_11__["exists"])(pixels)) {
29325 var afterPaginationPixels = this.applyPaginationOffset(pixels);
29326 var afterScalingPixels = this.rowNode.isRowPinned() ? afterPaginationPixels : this.beans.rowContainerHeightService.getRealPixelPosition(afterPaginationPixels);
29327 var topPx = afterScalingPixels + "px";
29328 this.setRowTopStyle(topPx);
29329 }
29330 };
29331 // the top needs to be set into the DOM element when the element is created, not updated afterwards.
29332 // otherwise the transition would not work, as it would be transitioning from zero (the unset value).
29333 // for example, suppose a row that is outside the viewport, then user does a filter to remove other rows
29334 // and this row now appears in the viewport, and the row moves up (ie it was under the viewport and not rendered,
29335 // but now is in the viewport) then a new RowComp is created, however it should have it's position initialised
29336 // to below the viewport, so the row will appear to animate up. if we didn't set the initial position at creation
29337 // time, the row would animate down (ie from position zero).
29338 RowCtrl.prototype.getInitialRowTop = function (rowContainerType) {
29339 var suppressRowTransform = this.beans.gridOptionsService.is('suppressRowTransform');
29340 return suppressRowTransform ? this.getInitialRowTopShared(rowContainerType) : undefined;
29341 };
29342 RowCtrl.prototype.getInitialTransform = function (rowContainerType) {
29343 var suppressRowTransform = this.beans.gridOptionsService.is('suppressRowTransform');
29344 return suppressRowTransform ? undefined : "translateY(" + this.getInitialRowTopShared(rowContainerType) + ")";
29345 };
29346 RowCtrl.prototype.getInitialRowTopShared = function (rowContainerType) {
29347 // print layout uses normal flow layout for row positioning
29348 if (this.printLayout) {
29349 return '';
29350 }
29351 var rowTop;
29352 if (this.isSticky()) {
29353 rowTop = this.rowNode.stickyRowTop;
29354 }
29355 else {
29356 // if sliding in, we take the old row top. otherwise we just set the current row top.
29357 var pixels = this.slideInAnimation[rowContainerType] ? this.roundRowTopToBounds(this.rowNode.oldRowTop) : this.rowNode.rowTop;
29358 var afterPaginationPixels = this.applyPaginationOffset(pixels);
29359 // we don't apply scaling if row is pinned
29360 rowTop = this.rowNode.isRowPinned() ? afterPaginationPixels : this.beans.rowContainerHeightService.getRealPixelPosition(afterPaginationPixels);
29361 }
29362 return rowTop + 'px';
29363 };
29364 RowCtrl.prototype.setRowTopStyle = function (topPx) {
29365 var suppressRowTransform = this.beans.gridOptionsService.is('suppressRowTransform');
29366 this.allRowGuis.forEach(function (gui) { return suppressRowTransform ?
29367 gui.rowComp.setTop(topPx) :
29368 gui.rowComp.setTransform("translateY(" + topPx + ")"); });
29369 };
29370 RowCtrl.prototype.getRowNode = function () {
29371 return this.rowNode;
29372 };
29373 RowCtrl.prototype.getCellCtrl = function (column) {
29374 // first up, check for cell directly linked to this column
29375 var res = null;
29376 this.getAllCellCtrls().forEach(function (cellCtrl) {
29377 if (cellCtrl.getColumn() == column) {
29378 res = cellCtrl;
29379 }
29380 });
29381 if (res != null) {
29382 return res;
29383 }
29384 // second up, if not found, then check for spanned cols.
29385 // we do this second (and not at the same time) as this is
29386 // more expensive, as spanning cols is a
29387 // infrequently used feature so we don't need to do this most
29388 // of the time
29389 this.getAllCellCtrls().forEach(function (cellCtrl) {
29390 if (cellCtrl.getColSpanningList().indexOf(column) >= 0) {
29391 res = cellCtrl;
29392 }
29393 });
29394 return res;
29395 };
29396 RowCtrl.prototype.onRowIndexChanged = function () {
29397 // we only bother updating if the rowIndex is present. if it is not present, it means this row
29398 // is child of a group node, and the group node was closed, it's the only way to have no row index.
29399 // when this happens, row is about to be de-rendered, so we don't care, rowComp is about to die!
29400 if (this.rowNode.rowIndex != null) {
29401 this.onCellFocusChanged();
29402 this.updateRowIndexes();
29403 this.postProcessCss();
29404 }
29405 };
29406 RowCtrl.prototype.updateRowIndexes = function (gui) {
29407 var rowIndexStr = this.rowNode.getRowIndexString();
29408 var headerRowCount = this.beans.headerNavigationService.getHeaderRowCount();
29409 var rowIsEven = this.rowNode.rowIndex % 2 === 0;
29410 var ariaRowIndex = headerRowCount + this.rowNode.rowIndex + 1;
29411 this.forEachGui(gui, function (c) {
29412 c.rowComp.setRowIndex(rowIndexStr);
29413 c.rowComp.addOrRemoveCssClass('ag-row-even', rowIsEven);
29414 c.rowComp.addOrRemoveCssClass('ag-row-odd', !rowIsEven);
29415 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaRowIndex"])(c.element, ariaRowIndex);
29416 });
29417 };
29418 // returns the pinned left container, either the normal one, or the embedded full with one if exists
29419 RowCtrl.prototype.getPinnedLeftRowElement = function () {
29420 return this.leftGui ? this.leftGui.element : undefined;
29421 };
29422 // returns the pinned right container, either the normal one, or the embedded full with one if exists
29423 RowCtrl.prototype.getPinnedRightRowElement = function () {
29424 return this.rightGui ? this.rightGui.element : undefined;
29425 };
29426 // returns the body container, either the normal one, or the embedded full with one if exists
29427 RowCtrl.prototype.getBodyRowElement = function () {
29428 return this.centerGui ? this.centerGui.element : undefined;
29429 };
29430 // returns the full width container
29431 RowCtrl.prototype.getFullWidthRowElement = function () {
29432 return this.fullWidthGui ? this.fullWidthGui.element : undefined;
29433 };
29434 RowCtrl.DOM_DATA_KEY_ROW_CTRL = 'renderedRow';
29435 return RowCtrl;
29436}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
29437
29438
29439
29440/***/ }),
29441/* 125 */
29442/***/ (function(module, __webpack_exports__, __webpack_require__) {
29443
29444"use strict";
29445__webpack_require__.r(__webpack_exports__);
29446/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellCtrl", function() { return CellCtrl; });
29447/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
29448/* harmony import */ var _cellRangeFeature__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(126);
29449/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
29450/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
29451/* harmony import */ var _cellPositionFeature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(128);
29452/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(31);
29453/* harmony import */ var _cellCustomStyleFeature__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(129);
29454/* harmony import */ var _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(130);
29455/* harmony import */ var _cellMouseListenerFeature__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(131);
29456/* harmony import */ var _cellKeyboardListenerFeature__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(133);
29457/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(48);
29458/* harmony import */ var _checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(98);
29459/* harmony import */ var _dndSourceComp__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(134);
29460/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(13);
29461/* harmony import */ var _row_rowDragComp__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(99);
29462/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(12);
29463/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(45);
29464/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(41);
29465/**
29466 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
29467 * @version v29.2.0
29468 * @link https://www.ag-grid.com/
29469 * @license MIT
29470 */
29471var __extends = (undefined && undefined.__extends) || (function () {
29472 var extendStatics = function (d, b) {
29473 extendStatics = Object.setPrototypeOf ||
29474 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
29475 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
29476 return extendStatics(d, b);
29477 };
29478 return function (d, b) {
29479 extendStatics(d, b);
29480 function __() { this.constructor = d; }
29481 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29482 };
29483})();
29484var __assign = (undefined && undefined.__assign) || function () {
29485 __assign = Object.assign || function(t) {
29486 for (var s, i = 1, n = arguments.length; i < n; i++) {
29487 s = arguments[i];
29488 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
29489 t[p] = s[p];
29490 }
29491 return t;
29492 };
29493 return __assign.apply(this, arguments);
29494};
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513var CSS_CELL = 'ag-cell';
29514var CSS_AUTO_HEIGHT = 'ag-cell-auto-height';
29515var CSS_NORMAL_HEIGHT = 'ag-cell-normal-height';
29516var CSS_CELL_FOCUS = 'ag-cell-focus';
29517var CSS_CELL_FIRST_RIGHT_PINNED = 'ag-cell-first-right-pinned';
29518var CSS_CELL_LAST_LEFT_PINNED = 'ag-cell-last-left-pinned';
29519var CSS_CELL_NOT_INLINE_EDITING = 'ag-cell-not-inline-editing';
29520var CSS_COLUMN_HOVER = 'ag-column-hover';
29521var CSS_CELL_WRAP_TEXT = 'ag-cell-wrap-text';
29522var instanceIdSequence = 0;
29523var CellCtrl = /** @class */ (function (_super) {
29524 __extends(CellCtrl, _super);
29525 function CellCtrl(column, rowNode, beans, rowCtrl) {
29526 var _this = _super.call(this) || this;
29527 _this.cellRangeFeature = null;
29528 _this.cellPositionFeature = null;
29529 _this.cellCustomStyleFeature = null;
29530 _this.tooltipFeature = null;
29531 _this.cellMouseListenerFeature = null;
29532 _this.cellKeyboardListenerFeature = null;
29533 _this.suppressRefreshCell = false;
29534 _this.onCellCompAttachedFuncs = [];
29535 _this.column = column;
29536 _this.rowNode = rowNode;
29537 _this.beans = beans;
29538 _this.rowCtrl = rowCtrl;
29539 // unique id to this instance, including the column ID to help with debugging in React as it's used in 'key'
29540 _this.instanceId = column.getId() + '-' + instanceIdSequence++;
29541 _this.createCellPosition();
29542 _this.addFeatures();
29543 return _this;
29544 }
29545 CellCtrl.prototype.addFeatures = function () {
29546 var _this = this;
29547 this.cellPositionFeature = new _cellPositionFeature__WEBPACK_IMPORTED_MODULE_4__["CellPositionFeature"](this, this.beans);
29548 this.addDestroyFunc(function () { var _a; (_a = _this.cellPositionFeature) === null || _a === void 0 ? void 0 : _a.destroy(); _this.cellPositionFeature = null; });
29549 this.cellCustomStyleFeature = new _cellCustomStyleFeature__WEBPACK_IMPORTED_MODULE_6__["CellCustomStyleFeature"](this, this.beans);
29550 this.addDestroyFunc(function () { var _a; (_a = _this.cellCustomStyleFeature) === null || _a === void 0 ? void 0 : _a.destroy(); _this.cellCustomStyleFeature = null; });
29551 this.cellMouseListenerFeature = new _cellMouseListenerFeature__WEBPACK_IMPORTED_MODULE_8__["CellMouseListenerFeature"](this, this.beans, this.column);
29552 this.addDestroyFunc(function () { var _a; (_a = _this.cellMouseListenerFeature) === null || _a === void 0 ? void 0 : _a.destroy(); _this.cellMouseListenerFeature = null; });
29553 this.cellKeyboardListenerFeature = new _cellKeyboardListenerFeature__WEBPACK_IMPORTED_MODULE_9__["CellKeyboardListenerFeature"](this, this.beans, this.column, this.rowNode, this.rowCtrl);
29554 this.addDestroyFunc(function () { var _a; (_a = _this.cellKeyboardListenerFeature) === null || _a === void 0 ? void 0 : _a.destroy(); _this.cellKeyboardListenerFeature = null; });
29555 var rangeSelectionEnabled = this.beans.rangeService && this.beans.gridOptionsService.isEnableRangeSelection();
29556 if (rangeSelectionEnabled) {
29557 this.cellRangeFeature = new _cellRangeFeature__WEBPACK_IMPORTED_MODULE_1__["CellRangeFeature"](this.beans, this);
29558 this.addDestroyFunc(function () { var _a; (_a = _this.cellRangeFeature) === null || _a === void 0 ? void 0 : _a.destroy(); _this.cellRangeFeature = null; });
29559 }
29560 this.addTooltipFeature();
29561 };
29562 CellCtrl.prototype.addTooltipFeature = function () {
29563 var _this = this;
29564 var getTooltipValue = function () {
29565 var colDef = _this.column.getColDef();
29566 var data = _this.rowNode.data;
29567 if (colDef.tooltipField && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(data)) {
29568 return Object(_utils_object__WEBPACK_IMPORTED_MODULE_15__["getValueUsingField"])(data, colDef.tooltipField, _this.column.isTooltipFieldContainsDots());
29569 }
29570 var valueGetter = colDef.tooltipValueGetter;
29571 if (valueGetter) {
29572 return valueGetter({
29573 location: 'cell',
29574 api: _this.beans.gridOptionsService.api,
29575 columnApi: _this.beans.gridOptionsService.columnApi,
29576 context: _this.beans.gridOptionsService.context,
29577 colDef: _this.column.getColDef(),
29578 column: _this.column,
29579 rowIndex: _this.cellPosition.rowIndex,
29580 node: _this.rowNode,
29581 data: _this.rowNode.data,
29582 value: _this.value,
29583 valueFormatted: _this.valueFormatted,
29584 });
29585 }
29586 return null;
29587 };
29588 var tooltipCtrl = {
29589 getColumn: function () { return _this.column; },
29590 getColDef: function () { return _this.column.getColDef(); },
29591 getRowIndex: function () { return _this.cellPosition.rowIndex; },
29592 getRowNode: function () { return _this.rowNode; },
29593 getGui: function () { return _this.getGui(); },
29594 getLocation: function () { return 'cell'; },
29595 getTooltipValue: getTooltipValue,
29596 // this makes no sense, why is the cell formatted value passed to the tooltip???
29597 getValueFormatted: function () { return _this.valueFormatted; }
29598 };
29599 this.tooltipFeature = new _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_7__["TooltipFeature"](tooltipCtrl, this.beans);
29600 this.addDestroyFunc(function () { var _a; (_a = _this.tooltipFeature) === null || _a === void 0 ? void 0 : _a.destroy(); _this.tooltipFeature = null; });
29601 };
29602 CellCtrl.prototype.setComp = function (comp, eGui, eCellWrapper, printLayout, startEditing) {
29603 var _a, _b, _c, _d;
29604 this.cellComp = comp;
29605 this.eGui = eGui;
29606 this.printLayout = printLayout;
29607 // we force to make sure formatter gets called at least once,
29608 // even if value has not changed (is is undefined)
29609 this.updateAndFormatValue(true);
29610 this.addDomData();
29611 this.onCellFocused();
29612 this.applyStaticCssClasses();
29613 this.setWrapText();
29614 this.onFirstRightPinnedChanged();
29615 this.onLastLeftPinnedChanged();
29616 this.onColumnHover();
29617 this.setupControlComps();
29618 if (eCellWrapper) {
29619 this.setupAutoHeight(eCellWrapper);
29620 }
29621 this.setAriaColIndex();
29622 if (!this.beans.gridOptionsService.is('suppressCellFocus')) {
29623 this.cellComp.setTabIndex(-1);
29624 }
29625 var colIdSanitised = Object(_utils_string__WEBPACK_IMPORTED_MODULE_5__["escapeString"])(this.column.getId());
29626 this.cellComp.setColId(colIdSanitised);
29627 this.cellComp.setRole('gridcell');
29628 (_a = this.cellPositionFeature) === null || _a === void 0 ? void 0 : _a.setComp(eGui);
29629 (_b = this.cellCustomStyleFeature) === null || _b === void 0 ? void 0 : _b.setComp(comp);
29630 (_c = this.tooltipFeature) === null || _c === void 0 ? void 0 : _c.setComp(comp);
29631 (_d = this.cellKeyboardListenerFeature) === null || _d === void 0 ? void 0 : _d.setComp(this.eGui);
29632 if (this.cellRangeFeature) {
29633 this.cellRangeFeature.setComp(comp, eGui);
29634 }
29635 if (startEditing && this.isCellEditable()) {
29636 this.startEditing();
29637 }
29638 else {
29639 this.showValue();
29640 }
29641 if (this.onCellCompAttachedFuncs.length) {
29642 this.onCellCompAttachedFuncs.forEach(function (func) { return func(); });
29643 this.onCellCompAttachedFuncs = [];
29644 }
29645 };
29646 CellCtrl.prototype.setupAutoHeight = function (eCellWrapper) {
29647 var _this = this;
29648 if (!this.column.isAutoHeight()) {
29649 return;
29650 }
29651 var eParentCell = eCellWrapper.parentElement;
29652 // taking minRowHeight from getRowHeightForNode means the getRowHeight() callback is used,
29653 // thus allowing different min heights for different rows.
29654 var minRowHeight = this.beans.gridOptionsService.getRowHeightForNode(this.rowNode).height;
29655 var measureHeight = function (timesCalled) {
29656 if (_this.editing) {
29657 return;
29658 }
29659 // because of the retry's below, it's possible the retry's go beyond
29660 // the rows life.
29661 if (!_this.isAlive()) {
29662 return;
29663 }
29664 var _a = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_16__["getElementSize"])(eParentCell), paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom, borderBottomWidth = _a.borderBottomWidth, borderTopWidth = _a.borderTopWidth;
29665 var extraHeight = paddingTop + paddingBottom + borderBottomWidth + borderTopWidth;
29666 var wrapperHeight = eCellWrapper.offsetHeight;
29667 var autoHeight = wrapperHeight + extraHeight;
29668 if (timesCalled < 5) {
29669 // if not in doc yet, means framework not yet inserted, so wait for next VM turn,
29670 // maybe it will be ready next VM turn
29671 var doc = _this.beans.gridOptionsService.getDocument();
29672 var notYetInDom = !doc || !doc.contains(eCellWrapper);
29673 // this happens in React, where React hasn't put any content in. we say 'possibly'
29674 // as a) may not be React and b) the cell could be empty anyway
29675 var possiblyNoContentYet = autoHeight == 0;
29676 if (notYetInDom || possiblyNoContentYet) {
29677 _this.beans.frameworkOverrides.setTimeout(function () { return measureHeight(timesCalled + 1); }, 0);
29678 return;
29679 }
29680 }
29681 var newHeight = Math.max(autoHeight, minRowHeight);
29682 _this.rowNode.setRowAutoHeight(newHeight, _this.column);
29683 };
29684 var listener = function () { return measureHeight(0); };
29685 // do once to set size in case size doesn't change, common when cell is blank
29686 listener();
29687 var destroyResizeObserver = this.beans.resizeObserverService.observeResize(eCellWrapper, listener);
29688 this.addDestroyFunc(function () {
29689 destroyResizeObserver();
29690 _this.rowNode.setRowAutoHeight(undefined, _this.column);
29691 });
29692 };
29693 CellCtrl.prototype.getInstanceId = function () {
29694 return this.instanceId;
29695 };
29696 CellCtrl.prototype.showValue = function (forceNewCellRendererInstance) {
29697 if (forceNewCellRendererInstance === void 0) { forceNewCellRendererInstance = false; }
29698 var valueToDisplay = this.valueFormatted != null ? this.valueFormatted : this.value;
29699 var params = this.createCellRendererParams();
29700 var compDetails = this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(), params);
29701 this.cellComp.setRenderDetails(compDetails, valueToDisplay, forceNewCellRendererInstance);
29702 this.refreshHandle();
29703 };
29704 CellCtrl.prototype.setupControlComps = function () {
29705 var colDef = this.column.getColDef();
29706 this.includeSelection = this.isIncludeControl(colDef.checkboxSelection);
29707 this.includeRowDrag = this.isIncludeControl(colDef.rowDrag);
29708 this.includeDndSource = this.isIncludeControl(colDef.dndSource);
29709 this.cellComp.setIncludeSelection(this.includeSelection);
29710 this.cellComp.setIncludeDndSource(this.includeDndSource);
29711 this.cellComp.setIncludeRowDrag(this.includeRowDrag);
29712 };
29713 CellCtrl.prototype.isForceWrapper = function () {
29714 // text selection requires the value to be wrapped in another element
29715 var forceWrapper = this.beans.gridOptionsService.is('enableCellTextSelection') || this.column.isAutoHeight();
29716 return forceWrapper;
29717 };
29718 CellCtrl.prototype.isIncludeControl = function (value) {
29719 var rowNodePinned = this.rowNode.rowPinned != null;
29720 var isFunc = typeof value === 'function';
29721 var res = rowNodePinned ? false : isFunc || value === true;
29722 return res;
29723 };
29724 CellCtrl.prototype.refreshShouldDestroy = function () {
29725 var colDef = this.column.getColDef();
29726 var selectionChanged = this.includeSelection != this.isIncludeControl(colDef.checkboxSelection);
29727 var rowDragChanged = this.includeRowDrag != this.isIncludeControl(colDef.rowDrag);
29728 var dndSourceChanged = this.includeDndSource != this.isIncludeControl(colDef.dndSource);
29729 return selectionChanged || rowDragChanged || dndSourceChanged;
29730 };
29731 // either called internally if single cell editing, or called by rowRenderer if row editing
29732 CellCtrl.prototype.startEditing = function (key, charPress, cellStartedEdit, event) {
29733 var _this = this;
29734 if (key === void 0) { key = null; }
29735 if (charPress === void 0) { charPress = null; }
29736 if (cellStartedEdit === void 0) { cellStartedEdit = false; }
29737 if (event === void 0) { event = null; }
29738 if (!this.isCellEditable() || this.editing) {
29739 return;
29740 }
29741 // because of async in React, the cellComp may not be set yet, if no cellComp then we are
29742 // yet to initialise the cell, so we re-schedule this operation for when celLComp is attached
29743 if (!this.cellComp) {
29744 this.onCellCompAttachedFuncs.push(function () { _this.startEditing(key, charPress, cellStartedEdit, event); });
29745 return;
29746 }
29747 var editorParams = this.createCellEditorParams(key, charPress, cellStartedEdit);
29748 var colDef = this.column.getColDef();
29749 var compDetails = this.beans.userComponentFactory.getCellEditorDetails(colDef, editorParams);
29750 // if cellEditorSelector was used, we give preference to popup and popupPosition from the selector
29751 var popup = (compDetails === null || compDetails === void 0 ? void 0 : compDetails.popupFromSelector) != null ? compDetails.popupFromSelector : !!colDef.cellEditorPopup;
29752 var position = (compDetails === null || compDetails === void 0 ? void 0 : compDetails.popupPositionFromSelector) != null ? compDetails.popupPositionFromSelector : colDef.cellEditorPopupPosition;
29753 this.setEditing(true);
29754 this.cellComp.setEditDetails(compDetails, popup, position);
29755 var e = this.createEvent(event, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_EDITING_STARTED);
29756 this.beans.eventService.dispatchEvent(e);
29757 };
29758 CellCtrl.prototype.setEditing = function (editing) {
29759 if (this.editing === editing) {
29760 return;
29761 }
29762 this.editing = editing;
29763 this.refreshHandle();
29764 };
29765 // pass in 'true' to cancel the editing.
29766 CellCtrl.prototype.stopRowOrCellEdit = function (cancel) {
29767 if (cancel === void 0) { cancel = false; }
29768 if (this.beans.gridOptionsService.get('editType') === 'fullRow') {
29769 this.rowCtrl.stopRowEditing(cancel);
29770 }
29771 else {
29772 this.stopEditing(cancel);
29773 }
29774 };
29775 CellCtrl.prototype.onPopupEditorClosed = function () {
29776 if (!this.isEditing()) {
29777 return;
29778 }
29779 // note: this happens because of a click outside of the grid or if the popupEditor
29780 // is closed with `Escape` key. if another cell was clicked, then the editing will
29781 // have already stopped and returned on the conditional above.
29782 this.stopEditingAndFocus();
29783 };
29784 CellCtrl.prototype.takeValueFromCellEditor = function (cancel) {
29785 var noValueResult = { newValueExists: false };
29786 if (cancel) {
29787 return noValueResult;
29788 }
29789 var cellEditor = this.cellComp.getCellEditor();
29790 if (!cellEditor) {
29791 return noValueResult;
29792 }
29793 var userWantsToCancel = cellEditor.isCancelAfterEnd && cellEditor.isCancelAfterEnd();
29794 if (userWantsToCancel) {
29795 return noValueResult;
29796 }
29797 var newValue = cellEditor.getValue();
29798 return {
29799 newValue: newValue,
29800 newValueExists: true
29801 };
29802 };
29803 /**
29804 * @returns `True` if the value changes, otherwise `False`.
29805 */
29806 CellCtrl.prototype.saveNewValue = function (oldValue, newValue) {
29807 if (newValue === oldValue) {
29808 return false;
29809 }
29810 // we suppressRefreshCell because the call to rowNode.setDataValue() results in change detection
29811 // getting triggered, which results in all cells getting refreshed. we do not want this refresh
29812 // to happen on this call as we want to call it explicitly below. otherwise refresh gets called twice.
29813 // if we only did this refresh (and not the one below) then the cell would flash and not be forced.
29814 this.suppressRefreshCell = true;
29815 var valueChanged = this.rowNode.setDataValue(this.column, newValue, 'edit');
29816 this.suppressRefreshCell = false;
29817 return valueChanged;
29818 };
29819 /**
29820 * Ends the Cell Editing
29821 * @param cancel `True` if the edit process is being canceled.
29822 * @returns `True` if the value of the `GridCell` has been updated, otherwise `False`.
29823 */
29824 CellCtrl.prototype.stopEditing = function (cancel) {
29825 if (cancel === void 0) { cancel = false; }
29826 if (!this.editing) {
29827 return false;
29828 }
29829 var _a = this.takeValueFromCellEditor(cancel), newValue = _a.newValue, newValueExists = _a.newValueExists;
29830 var oldValue = this.getValueFromValueService();
29831 var valueChanged = false;
29832 if (newValueExists) {
29833 valueChanged = this.saveNewValue(oldValue, newValue);
29834 }
29835 this.setEditing(false);
29836 this.cellComp.setEditDetails(); // passing nothing stops editing
29837 this.updateAndFormatValue();
29838 this.refreshCell({ forceRefresh: true, suppressFlash: true });
29839 this.dispatchEditingStoppedEvent(oldValue, newValue, !cancel && !!valueChanged);
29840 return valueChanged;
29841 };
29842 CellCtrl.prototype.dispatchEditingStoppedEvent = function (oldValue, newValue, valueChanged) {
29843 var editingStoppedEvent = __assign(__assign({}, this.createEvent(null, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_EDITING_STOPPED)), { oldValue: oldValue,
29844 newValue: newValue,
29845 valueChanged: valueChanged });
29846 this.beans.eventService.dispatchEvent(editingStoppedEvent);
29847 };
29848 CellCtrl.prototype.createCellEditorParams = function (key, charPress, cellStartedEdit) {
29849 return {
29850 value: this.getValueFromValueService(),
29851 eventKey: key,
29852 charPress: charPress,
29853 column: this.column,
29854 colDef: this.column.getColDef(),
29855 rowIndex: this.getCellPosition().rowIndex,
29856 node: this.rowNode,
29857 data: this.rowNode.data,
29858 api: this.beans.gridOptionsService.api,
29859 cellStartedEdit: cellStartedEdit,
29860 columnApi: this.beans.gridOptionsService.columnApi,
29861 context: this.beans.gridOptionsService.context,
29862 onKeyDown: this.onKeyDown.bind(this),
29863 stopEditing: this.stopEditingAndFocus.bind(this),
29864 eGridCell: this.getGui(),
29865 parseValue: this.parseValue.bind(this),
29866 formatValue: this.formatValue.bind(this)
29867 };
29868 };
29869 CellCtrl.prototype.createCellRendererParams = function () {
29870 var _this = this;
29871 var res = {
29872 value: this.value,
29873 valueFormatted: this.valueFormatted,
29874 getValue: this.getValueFromValueService.bind(this),
29875 setValue: function (value) { return _this.beans.valueService.setValue(_this.rowNode, _this.column, value); },
29876 formatValue: this.formatValue.bind(this),
29877 data: this.rowNode.data,
29878 node: this.rowNode,
29879 pinned: this.column.getPinned(),
29880 colDef: this.column.getColDef(),
29881 column: this.column,
29882 rowIndex: this.getCellPosition().rowIndex,
29883 api: this.beans.gridOptionsService.api,
29884 columnApi: this.beans.gridOptionsService.columnApi,
29885 context: this.beans.gridOptionsService.context,
29886 refreshCell: this.refreshCell.bind(this),
29887 eGridCell: this.getGui(),
29888 eParentOfValue: this.cellComp.getParentOfValue(),
29889 registerRowDragger: function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) { return _this.registerRowDragger(rowDraggerElement, dragStartPixels, suppressVisibilityChange); },
29890 };
29891 return res;
29892 };
29893 CellCtrl.prototype.parseValue = function (newValue) {
29894 var colDef = this.column.getColDef();
29895 var params = {
29896 node: this.rowNode,
29897 data: this.rowNode.data,
29898 oldValue: this.getValue(),
29899 newValue: newValue,
29900 colDef: colDef,
29901 column: this.column,
29902 api: this.beans.gridOptionsService.api,
29903 columnApi: this.beans.gridOptionsService.columnApi,
29904 context: this.beans.gridOptionsService.context
29905 };
29906 var valueParser = colDef.valueParser;
29907 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(valueParser)) {
29908 if (typeof valueParser === 'function') {
29909 return valueParser(params);
29910 }
29911 return this.beans.expressionService.evaluate(valueParser, params);
29912 }
29913 return newValue;
29914 };
29915 CellCtrl.prototype.setFocusOutOnEditor = function () {
29916 if (!this.editing) {
29917 return;
29918 }
29919 var cellEditor = this.cellComp.getCellEditor();
29920 if (cellEditor && cellEditor.focusOut) {
29921 cellEditor.focusOut();
29922 }
29923 };
29924 CellCtrl.prototype.setFocusInOnEditor = function () {
29925 if (!this.editing) {
29926 return;
29927 }
29928 var cellEditor = this.cellComp.getCellEditor();
29929 if (cellEditor && cellEditor.focusIn) {
29930 // if the editor is present, then we just focus it
29931 cellEditor.focusIn();
29932 }
29933 else {
29934 // if the editor is not present, it means async cell editor (eg React fibre)
29935 // and we are trying to set focus before the cell editor is present, so we
29936 // focus the cell instead
29937 this.focusCell(true);
29938 }
29939 };
29940 CellCtrl.prototype.onCellChanged = function (event) {
29941 // because of async in React, the cellComp may not be set yet, if no cellComp then we are
29942 // yet to initialise the cell, so no need to refresh.
29943 if (!this.cellComp) {
29944 return;
29945 }
29946 var eventImpactsThisCell = event.column === this.column;
29947 if (eventImpactsThisCell) {
29948 this.refreshCell({});
29949 }
29950 };
29951 // + stop editing {forceRefresh: true, suppressFlash: true}
29952 // + event cellChanged {}
29953 // + cellRenderer.params.refresh() {} -> method passes 'as is' to the cellRenderer, so params could be anything
29954 // + rowCtrl: event dataChanged {suppressFlash: !update, newData: !update}
29955 // + rowCtrl: api refreshCells() {animate: true/false}
29956 // + rowRenderer: api softRefreshView() {}
29957 CellCtrl.prototype.refreshCell = function (params) {
29958 var _a, _b, _c;
29959 // if we are in the middle of 'stopEditing', then we don't refresh here, as refresh gets called explicitly
29960 if (this.suppressRefreshCell || this.editing) {
29961 return;
29962 }
29963 // In React, due to async, it's possible a refresh was asked for before the CellComp
29964 // has been set. If this happens, we skip the refresh, as the cell is going to be
29965 // initialised anyway once the CellComp is set.
29966 if (!this.cellComp) {
29967 return;
29968 }
29969 var colDef = this.column.getColDef();
29970 var newData = params != null && !!params.newData;
29971 var suppressFlash = (params != null && !!params.suppressFlash) || !!colDef.suppressCellFlash;
29972 // we always refresh if cell has no value - this can happen when user provides Cell Renderer and the
29973 // cell renderer doesn't rely on a value, instead it could be looking directly at the data, or maybe
29974 // printing the current time (which would be silly)???. Generally speaking
29975 // non of {field, valueGetter, showRowGroup} is bad in the users application, however for this edge case, it's
29976 // best always refresh and take the performance hit rather than never refresh and users complaining in support
29977 // that cells are not updating.
29978 var noValueProvided = colDef.field == null && colDef.valueGetter == null && colDef.showRowGroup == null;
29979 var forceRefresh = (params && params.forceRefresh) || noValueProvided || newData;
29980 var valuesDifferent = this.updateAndFormatValue();
29981 var dataNeedsUpdating = forceRefresh || valuesDifferent;
29982 if (dataNeedsUpdating) {
29983 // if it's 'new data', then we don't refresh the cellRenderer, even if refresh method is available.
29984 // this is because if the whole data is new (ie we are showing stock price 'BBA' now and not 'SSD')
29985 // then we are not showing a movement in the stock price, rather we are showing different stock.
29986 this.showValue(newData);
29987 // we don't want to flash the cells when processing a filter change, as otherwise the UI would
29988 // be to busy. see comment in FilterManager with regards processingFilterChange
29989 var processingFilterChange = this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();
29990 var flashCell = !suppressFlash && !processingFilterChange &&
29991 (this.beans.gridOptionsService.is('enableCellChangeFlash') || colDef.enableCellChangeFlash);
29992 if (flashCell) {
29993 this.flashCell();
29994 }
29995 (_a = this.cellCustomStyleFeature) === null || _a === void 0 ? void 0 : _a.applyUserStyles();
29996 (_b = this.cellCustomStyleFeature) === null || _b === void 0 ? void 0 : _b.applyClassesFromColDef();
29997 }
29998 this.refreshToolTip();
29999 // we do cellClassRules even if the value has not changed, so that users who have rules that
30000 // look at other parts of the row (where the other part of the row might of changed) will work.
30001 (_c = this.cellCustomStyleFeature) === null || _c === void 0 ? void 0 : _c.applyCellClassRules();
30002 };
30003 // cell editors call this, when they want to stop for reasons other
30004 // than what we pick up on. eg selecting from a dropdown ends editing.
30005 CellCtrl.prototype.stopEditingAndFocus = function (suppressNavigateAfterEdit) {
30006 if (suppressNavigateAfterEdit === void 0) { suppressNavigateAfterEdit = false; }
30007 this.stopRowOrCellEdit();
30008 this.focusCell(true);
30009 if (!suppressNavigateAfterEdit) {
30010 this.navigateAfterEdit();
30011 }
30012 };
30013 CellCtrl.prototype.navigateAfterEdit = function () {
30014 var fullRowEdit = this.beans.gridOptionsService.get('editType') === 'fullRow';
30015 if (fullRowEdit) {
30016 return;
30017 }
30018 var enterMovesDownAfterEdit = this.beans.gridOptionsService.is('enterMovesDownAfterEdit');
30019 if (enterMovesDownAfterEdit) {
30020 this.beans.navigationService.navigateToNextCell(null, _constants_keyCode__WEBPACK_IMPORTED_MODULE_10__["KeyCode"].DOWN, this.getCellPosition(), false);
30021 }
30022 };
30023 // user can also call this via API
30024 CellCtrl.prototype.flashCell = function (delays) {
30025 var flashDelay = delays && delays.flashDelay;
30026 var fadeDelay = delays && delays.fadeDelay;
30027 this.animateCell('data-changed', flashDelay, fadeDelay);
30028 };
30029 CellCtrl.prototype.animateCell = function (cssName, flashDelay, fadeDelay) {
30030 var _this = this;
30031 var _a, _b;
30032 var fullName = "ag-cell-" + cssName;
30033 var animationFullName = "ag-cell-" + cssName + "-animation";
30034 var gridOptionsService = this.beans.gridOptionsService;
30035 if (!flashDelay) {
30036 flashDelay = (_a = gridOptionsService.getNum('cellFlashDelay')) !== null && _a !== void 0 ? _a : 500;
30037 }
30038 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(fadeDelay)) {
30039 fadeDelay = (_b = gridOptionsService.getNum('cellFadeDelay')) !== null && _b !== void 0 ? _b : 1000;
30040 }
30041 // we want to highlight the cells, without any animation
30042 this.cellComp.addOrRemoveCssClass(fullName, true);
30043 this.cellComp.addOrRemoveCssClass(animationFullName, false);
30044 // then once that is applied, we remove the highlight with animation
30045 window.setTimeout(function () {
30046 if (!_this.isAlive()) {
30047 return;
30048 }
30049 _this.cellComp.addOrRemoveCssClass(fullName, false);
30050 _this.cellComp.addOrRemoveCssClass(animationFullName, true);
30051 _this.eGui.style.transition = "background-color " + fadeDelay + "ms";
30052 window.setTimeout(function () {
30053 if (!_this.isAlive()) {
30054 return;
30055 }
30056 // and then to leave things as we got them, we remove the animation
30057 _this.cellComp.addOrRemoveCssClass(animationFullName, false);
30058 _this.eGui.style.transition = '';
30059 }, fadeDelay);
30060 }, flashDelay);
30061 };
30062 CellCtrl.prototype.onFlashCells = function (event) {
30063 if (!this.cellComp) {
30064 return;
30065 }
30066 var cellId = this.beans.cellPositionUtils.createId(this.getCellPosition());
30067 var shouldFlash = event.cells[cellId];
30068 if (shouldFlash) {
30069 this.animateCell('highlight');
30070 }
30071 };
30072 CellCtrl.prototype.isCellEditable = function () {
30073 return this.column.isCellEditable(this.rowNode);
30074 };
30075 CellCtrl.prototype.isSuppressFillHandle = function () {
30076 return this.column.isSuppressFillHandle();
30077 };
30078 CellCtrl.prototype.formatValue = function (value) {
30079 var res = this.callValueFormatter(value);
30080 return res != null ? res : value;
30081 };
30082 CellCtrl.prototype.callValueFormatter = function (value) {
30083 return this.beans.valueFormatterService.formatValue(this.column, this.rowNode, value);
30084 };
30085 CellCtrl.prototype.updateAndFormatValue = function (force) {
30086 if (force === void 0) { force = false; }
30087 var oldValue = this.value;
30088 var oldValueFormatted = this.valueFormatted;
30089 this.value = this.getValueFromValueService();
30090 this.valueFormatted = this.callValueFormatter(this.value);
30091 var valuesDifferent = force ? true :
30092 !this.valuesAreEqual(oldValue, this.value) || this.valueFormatted != oldValueFormatted;
30093 return valuesDifferent;
30094 };
30095 CellCtrl.prototype.valuesAreEqual = function (val1, val2) {
30096 // if the user provided an equals method, use that, otherwise do simple comparison
30097 var colDef = this.column.getColDef();
30098 return colDef.equals ? colDef.equals(val1, val2) : val1 === val2;
30099 };
30100 CellCtrl.prototype.getComp = function () {
30101 return this.cellComp;
30102 };
30103 CellCtrl.prototype.getValueFromValueService = function () {
30104 // if we don't check this, then the grid will render leaf groups as open even if we are not
30105 // allowing the user to open leaf groups. confused? remember for pivot mode we don't allow
30106 // opening leaf groups, so we have to force leafGroups to be closed in case the user expanded
30107 // them via the API, or user user expanded them in the UI before turning on pivot mode
30108 var lockedClosedGroup = this.rowNode.leafGroup && this.beans.columnModel.isPivotMode();
30109 var isOpenGroup = this.rowNode.group && this.rowNode.expanded && !this.rowNode.footer && !lockedClosedGroup;
30110 // are we showing group footers
30111 var groupFootersEnabled = this.beans.gridOptionsService.is('groupIncludeFooter');
30112 // if doing footers, we normally don't show agg data at group level when group is open
30113 var groupAlwaysShowAggData = this.beans.gridOptionsService.is('groupSuppressBlankHeader');
30114 // if doing grouping and footers, we don't want to include the agg value
30115 // in the header when the group is open
30116 var ignoreAggData = (isOpenGroup && groupFootersEnabled) && !groupAlwaysShowAggData;
30117 var value = this.beans.valueService.getValue(this.column, this.rowNode, false, ignoreAggData);
30118 return value;
30119 };
30120 CellCtrl.prototype.getValue = function () {
30121 return this.value;
30122 };
30123 CellCtrl.prototype.getValueFormatted = function () {
30124 return this.valueFormatted;
30125 };
30126 CellCtrl.prototype.addDomData = function () {
30127 var _this = this;
30128 var element = this.getGui();
30129 this.beans.gridOptionsService.setDomData(element, CellCtrl.DOM_DATA_KEY_CELL_CTRL, this);
30130 this.addDestroyFunc(function () { return _this.beans.gridOptionsService.setDomData(element, CellCtrl.DOM_DATA_KEY_CELL_CTRL, null); });
30131 };
30132 CellCtrl.prototype.createEvent = function (domEvent, eventType) {
30133 var event = {
30134 type: eventType,
30135 node: this.rowNode,
30136 data: this.rowNode.data,
30137 value: this.value,
30138 column: this.column,
30139 colDef: this.column.getColDef(),
30140 context: this.beans.gridOptionsService.context,
30141 api: this.beans.gridApi,
30142 columnApi: this.beans.columnApi,
30143 rowPinned: this.rowNode.rowPinned,
30144 event: domEvent,
30145 rowIndex: this.rowNode.rowIndex
30146 };
30147 return event;
30148 };
30149 CellCtrl.prototype.onKeyPress = function (event) {
30150 var _a;
30151 (_a = this.cellKeyboardListenerFeature) === null || _a === void 0 ? void 0 : _a.onKeyPress(event);
30152 };
30153 CellCtrl.prototype.onKeyDown = function (event) {
30154 var _a;
30155 (_a = this.cellKeyboardListenerFeature) === null || _a === void 0 ? void 0 : _a.onKeyDown(event);
30156 };
30157 CellCtrl.prototype.onMouseEvent = function (eventName, mouseEvent) {
30158 var _a;
30159 (_a = this.cellMouseListenerFeature) === null || _a === void 0 ? void 0 : _a.onMouseEvent(eventName, mouseEvent);
30160 };
30161 CellCtrl.prototype.getGui = function () {
30162 return this.eGui;
30163 };
30164 CellCtrl.prototype.refreshToolTip = function () {
30165 var _a;
30166 (_a = this.tooltipFeature) === null || _a === void 0 ? void 0 : _a.refreshToolTip();
30167 };
30168 CellCtrl.prototype.getColSpanningList = function () {
30169 return this.cellPositionFeature.getColSpanningList();
30170 };
30171 CellCtrl.prototype.onLeftChanged = function () {
30172 var _a;
30173 if (!this.cellComp) {
30174 return;
30175 }
30176 (_a = this.cellPositionFeature) === null || _a === void 0 ? void 0 : _a.onLeftChanged();
30177 };
30178 CellCtrl.prototype.onDisplayedColumnsChanged = function () {
30179 if (!this.eGui) {
30180 return;
30181 }
30182 this.setAriaColIndex();
30183 };
30184 CellCtrl.prototype.setAriaColIndex = function () {
30185 var colIdx = this.beans.columnModel.getAriaColumnIndex(this.column);
30186 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_17__["setAriaColIndex"])(this.getGui(), colIdx); // for react, we don't use JSX, as it slowed down column moving
30187 };
30188 CellCtrl.prototype.isSuppressNavigable = function () {
30189 return this.column.isSuppressNavigable(this.rowNode);
30190 };
30191 CellCtrl.prototype.onWidthChanged = function () {
30192 var _a;
30193 return (_a = this.cellPositionFeature) === null || _a === void 0 ? void 0 : _a.onWidthChanged();
30194 };
30195 CellCtrl.prototype.getColumn = function () {
30196 return this.column;
30197 };
30198 CellCtrl.prototype.getRowNode = function () {
30199 return this.rowNode;
30200 };
30201 CellCtrl.prototype.getBeans = function () {
30202 return this.beans;
30203 };
30204 CellCtrl.prototype.isPrintLayout = function () {
30205 return this.printLayout;
30206 };
30207 CellCtrl.prototype.appendChild = function (htmlElement) {
30208 this.eGui.appendChild(htmlElement);
30209 };
30210 CellCtrl.prototype.refreshHandle = function () {
30211 if (this.cellRangeFeature) {
30212 this.cellRangeFeature.refreshHandle();
30213 }
30214 };
30215 CellCtrl.prototype.getCellPosition = function () {
30216 return this.cellPosition;
30217 };
30218 CellCtrl.prototype.isEditing = function () {
30219 return this.editing;
30220 };
30221 // called by rowRenderer when user navigates via tab key
30222 CellCtrl.prototype.startRowOrCellEdit = function (key, charPress, event) {
30223 if (event === void 0) { event = null; }
30224 if (!this.cellComp) {
30225 return;
30226 }
30227 if (this.beans.gridOptionsService.get('editType') === 'fullRow') {
30228 this.rowCtrl.startRowEditing(key, charPress, this);
30229 }
30230 else {
30231 this.startEditing(key, charPress, true, event);
30232 }
30233 };
30234 CellCtrl.prototype.getRowCtrl = function () {
30235 return this.rowCtrl;
30236 };
30237 CellCtrl.prototype.getRowPosition = function () {
30238 return {
30239 rowIndex: this.cellPosition.rowIndex,
30240 rowPinned: this.cellPosition.rowPinned
30241 };
30242 };
30243 CellCtrl.prototype.updateRangeBordersIfRangeCount = function () {
30244 if (!this.cellComp) {
30245 return;
30246 }
30247 if (this.cellRangeFeature) {
30248 this.cellRangeFeature.updateRangeBordersIfRangeCount();
30249 }
30250 };
30251 CellCtrl.prototype.onRangeSelectionChanged = function () {
30252 if (!this.cellComp) {
30253 return;
30254 }
30255 if (this.cellRangeFeature) {
30256 this.cellRangeFeature.onRangeSelectionChanged();
30257 }
30258 };
30259 CellCtrl.prototype.isRangeSelectionEnabled = function () {
30260 return this.cellRangeFeature != null;
30261 };
30262 CellCtrl.prototype.focusCell = function (forceBrowserFocus) {
30263 if (forceBrowserFocus === void 0) { forceBrowserFocus = false; }
30264 this.beans.focusService.setFocusedCell({
30265 rowIndex: this.getCellPosition().rowIndex,
30266 column: this.column,
30267 rowPinned: this.rowNode.rowPinned,
30268 forceBrowserFocus: forceBrowserFocus
30269 });
30270 };
30271 CellCtrl.prototype.onRowIndexChanged = function () {
30272 // when index changes, this influences items that need the index, so we update the
30273 // grid cell so they are working off the new index.
30274 this.createCellPosition();
30275 // when the index of the row changes, ie means the cell may have lost or gained focus
30276 this.onCellFocused();
30277 // check range selection
30278 if (this.cellRangeFeature) {
30279 this.cellRangeFeature.onRangeSelectionChanged();
30280 }
30281 };
30282 CellCtrl.prototype.onFirstRightPinnedChanged = function () {
30283 if (!this.cellComp) {
30284 return;
30285 }
30286 var firstRightPinned = this.column.isFirstRightPinned();
30287 this.cellComp.addOrRemoveCssClass(CSS_CELL_FIRST_RIGHT_PINNED, firstRightPinned);
30288 };
30289 CellCtrl.prototype.onLastLeftPinnedChanged = function () {
30290 if (!this.cellComp) {
30291 return;
30292 }
30293 var lastLeftPinned = this.column.isLastLeftPinned();
30294 this.cellComp.addOrRemoveCssClass(CSS_CELL_LAST_LEFT_PINNED, lastLeftPinned);
30295 };
30296 CellCtrl.prototype.onCellFocused = function (event) {
30297 if (!this.cellComp || this.beans.gridOptionsService.is('suppressCellFocus')) {
30298 return;
30299 }
30300 var cellFocused = this.beans.focusService.isCellFocused(this.cellPosition);
30301 this.cellComp.addOrRemoveCssClass(CSS_CELL_FOCUS, cellFocused);
30302 // see if we need to force browser focus - this can happen if focus is programmatically set
30303 if (cellFocused && event && event.forceBrowserFocus) {
30304 var focusEl = this.cellComp.getFocusableElement();
30305 focusEl.focus({ preventScroll: !!event.preventScrollOnBrowserFocus });
30306 }
30307 // if another cell was focused, and we are editing, then stop editing
30308 var fullRowEdit = this.beans.gridOptionsService.get('editType') === 'fullRow';
30309 if (!cellFocused && !fullRowEdit && this.editing) {
30310 this.stopRowOrCellEdit();
30311 }
30312 };
30313 CellCtrl.prototype.createCellPosition = function () {
30314 this.cellPosition = {
30315 rowIndex: this.rowNode.rowIndex,
30316 rowPinned: Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["makeNull"])(this.rowNode.rowPinned),
30317 column: this.column
30318 };
30319 };
30320 // CSS Classes that only get applied once, they never change
30321 CellCtrl.prototype.applyStaticCssClasses = function () {
30322 this.cellComp.addOrRemoveCssClass(CSS_CELL, true);
30323 this.cellComp.addOrRemoveCssClass(CSS_CELL_NOT_INLINE_EDITING, true);
30324 // normal cells fill the height of the row. autoHeight cells have no height to let them
30325 // fit the height of content.
30326 var autoHeight = this.column.isAutoHeight() == true;
30327 this.cellComp.addOrRemoveCssClass(CSS_AUTO_HEIGHT, autoHeight);
30328 this.cellComp.addOrRemoveCssClass(CSS_NORMAL_HEIGHT, !autoHeight);
30329 };
30330 CellCtrl.prototype.onColumnHover = function () {
30331 if (!this.cellComp) {
30332 return;
30333 }
30334 if (!this.beans.gridOptionsService.is('columnHoverHighlight')) {
30335 return;
30336 }
30337 var isHovered = this.beans.columnHoverService.isHovered(this.column);
30338 this.cellComp.addOrRemoveCssClass(CSS_COLUMN_HOVER, isHovered);
30339 };
30340 CellCtrl.prototype.onColDefChanged = function () {
30341 if (!this.cellComp) {
30342 return;
30343 }
30344 this.setWrapText();
30345 if (!this.editing) {
30346 this.refreshCell({ forceRefresh: true, suppressFlash: true });
30347 }
30348 };
30349 CellCtrl.prototype.setWrapText = function () {
30350 var value = this.column.getColDef().wrapText == true;
30351 this.cellComp.addOrRemoveCssClass(CSS_CELL_WRAP_TEXT, value);
30352 };
30353 CellCtrl.prototype.dispatchCellContextMenuEvent = function (event) {
30354 var colDef = this.column.getColDef();
30355 var cellContextMenuEvent = this.createEvent(event, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_CONTEXT_MENU);
30356 this.beans.eventService.dispatchEvent(cellContextMenuEvent);
30357 if (colDef.onCellContextMenu) {
30358 // to make the callback async, do in a timeout
30359 window.setTimeout(function () { return colDef.onCellContextMenu(cellContextMenuEvent); }, 0);
30360 }
30361 };
30362 CellCtrl.prototype.getCellRenderer = function () {
30363 return this.cellComp ? this.cellComp.getCellRenderer() : null;
30364 };
30365 CellCtrl.prototype.getCellEditor = function () {
30366 return this.cellComp ? this.cellComp.getCellEditor() : null;
30367 };
30368 CellCtrl.prototype.destroy = function () {
30369 this.onCellCompAttachedFuncs = [];
30370 _super.prototype.destroy.call(this);
30371 };
30372 CellCtrl.prototype.createSelectionCheckbox = function () {
30373 var cbSelectionComponent = new _checkboxSelectionComponent__WEBPACK_IMPORTED_MODULE_11__["CheckboxSelectionComponent"]();
30374 this.beans.context.createBean(cbSelectionComponent);
30375 cbSelectionComponent.init({ rowNode: this.rowNode, column: this.column });
30376 // put the checkbox in before the value
30377 return cbSelectionComponent;
30378 };
30379 CellCtrl.prototype.createDndSource = function () {
30380 var dndSourceComp = new _dndSourceComp__WEBPACK_IMPORTED_MODULE_12__["DndSourceComp"](this.rowNode, this.column, this.beans, this.eGui);
30381 this.beans.context.createBean(dndSourceComp);
30382 return dndSourceComp;
30383 };
30384 CellCtrl.prototype.registerRowDragger = function (customElement, dragStartPixels, suppressVisibilityChange) {
30385 var _this = this;
30386 // if previously existed, then we are only updating
30387 if (this.customRowDragComp) {
30388 this.customRowDragComp.setDragElement(customElement, dragStartPixels);
30389 return;
30390 }
30391 var newComp = this.createRowDragComp(customElement, dragStartPixels, suppressVisibilityChange);
30392 if (newComp) {
30393 this.customRowDragComp = newComp;
30394 this.addDestroyFunc(function () { _this.beans.context.destroyBean(newComp); _this.customRowDragComp = null; });
30395 }
30396 };
30397 CellCtrl.prototype.createRowDragComp = function (customElement, dragStartPixels, suppressVisibilityChange) {
30398 var _this = this;
30399 var pagination = this.beans.gridOptionsService.is('pagination');
30400 var rowDragManaged = this.beans.gridOptionsService.is('rowDragManaged');
30401 var clientSideRowModelActive = this.beans.gridOptionsService.isRowModelType('clientSide');
30402 if (rowDragManaged) {
30403 // row dragging only available in default row model
30404 if (!clientSideRowModelActive) {
30405 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');
30406 return;
30407 }
30408 if (pagination) {
30409 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');
30410 return;
30411 }
30412 }
30413 // otherwise (normal case) we are creating a RowDraggingComp for the first time
30414 var rowDragComp = new _row_rowDragComp__WEBPACK_IMPORTED_MODULE_14__["RowDragComp"](function () { return _this.value; }, this.rowNode, this.column, customElement, dragStartPixels, suppressVisibilityChange);
30415 this.beans.context.createBean(rowDragComp);
30416 return rowDragComp;
30417 };
30418 CellCtrl.DOM_DATA_KEY_CELL_CTRL = 'cellCtrl';
30419 return CellCtrl;
30420}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
30421
30422
30423
30424/***/ }),
30425/* 126 */
30426/***/ (function(module, __webpack_exports__, __webpack_require__) {
30427
30428"use strict";
30429__webpack_require__.r(__webpack_exports__);
30430/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellRangeFeature", function() { return CellRangeFeature; });
30431/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
30432/* harmony import */ var _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(127);
30433/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
30434/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41);
30435/**
30436 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30437 * @version v29.2.0
30438 * @link https://www.ag-grid.com/
30439 * @license MIT
30440 */
30441
30442
30443
30444
30445var CSS_CELL_RANGE_SELECTED = 'ag-cell-range-selected';
30446var CSS_CELL_RANGE_CHART = 'ag-cell-range-chart';
30447var CSS_CELL_RANGE_SINGLE_CELL = 'ag-cell-range-single-cell';
30448var CSS_CELL_RANGE_CHART_CATEGORY = 'ag-cell-range-chart-category';
30449var CSS_CELL_RANGE_HANDLE = 'ag-cell-range-handle';
30450var CSS_CELL_RANGE_TOP = 'ag-cell-range-top';
30451var CSS_CELL_RANGE_RIGHT = 'ag-cell-range-right';
30452var CSS_CELL_RANGE_BOTTOM = 'ag-cell-range-bottom';
30453var CSS_CELL_RANGE_LEFT = 'ag-cell-range-left';
30454var CellRangeFeature = /** @class */ (function () {
30455 function CellRangeFeature(beans, ctrl) {
30456 this.beans = beans;
30457 this.cellCtrl = ctrl;
30458 }
30459 CellRangeFeature.prototype.setComp = function (cellComp, eGui) {
30460 this.cellComp = cellComp;
30461 this.eGui = eGui;
30462 this.onRangeSelectionChanged();
30463 };
30464 CellRangeFeature.prototype.onRangeSelectionChanged = function () {
30465 // when using reactUi, given UI is async, it's possible this method is called before the comp is registered
30466 if (!this.cellComp) {
30467 return;
30468 }
30469 this.rangeCount = this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition());
30470 this.hasChartRange = this.getHasChartRange();
30471 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED, this.rangeCount !== 0);
30472 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + "-1", this.rangeCount === 1);
30473 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + "-2", this.rangeCount === 2);
30474 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + "-3", this.rangeCount === 3);
30475 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + "-4", this.rangeCount >= 4);
30476 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_CHART, this.hasChartRange);
30477 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaSelected"])(this.eGui, this.rangeCount > 0 ? true : undefined);
30478 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SINGLE_CELL, this.isSingleCell());
30479 this.updateRangeBorders();
30480 this.refreshHandle();
30481 };
30482 CellRangeFeature.prototype.updateRangeBorders = function () {
30483 var rangeBorders = this.getRangeBorders();
30484 var isSingleCell = this.isSingleCell();
30485 var isTop = !isSingleCell && rangeBorders.top;
30486 var isRight = !isSingleCell && rangeBorders.right;
30487 var isBottom = !isSingleCell && rangeBorders.bottom;
30488 var isLeft = !isSingleCell && rangeBorders.left;
30489 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_TOP, isTop);
30490 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_RIGHT, isRight);
30491 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_BOTTOM, isBottom);
30492 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_LEFT, isLeft);
30493 };
30494 CellRangeFeature.prototype.isSingleCell = function () {
30495 var rangeService = this.beans.rangeService;
30496 return this.rangeCount === 1 && rangeService && !rangeService.isMoreThanOneCell();
30497 };
30498 CellRangeFeature.prototype.getHasChartRange = function () {
30499 var rangeService = this.beans.rangeService;
30500 if (!this.rangeCount || !rangeService) {
30501 return false;
30502 }
30503 var cellRanges = rangeService.getCellRanges();
30504 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); });
30505 };
30506 CellRangeFeature.prototype.updateRangeBordersIfRangeCount = function () {
30507 // we only need to update range borders if we are in a range
30508 if (this.rangeCount > 0) {
30509 this.updateRangeBorders();
30510 this.refreshHandle();
30511 }
30512 };
30513 CellRangeFeature.prototype.getRangeBorders = function () {
30514 var _this = this;
30515 var isRtl = this.beans.gridOptionsService.is('enableRtl');
30516 var top = false;
30517 var right = false;
30518 var bottom = false;
30519 var left = false;
30520 var thisCol = this.cellCtrl.getCellPosition().column;
30521 var _a = this.beans, rangeService = _a.rangeService, columnModel = _a.columnModel;
30522 var leftCol;
30523 var rightCol;
30524 if (isRtl) {
30525 leftCol = columnModel.getDisplayedColAfter(thisCol);
30526 rightCol = columnModel.getDisplayedColBefore(thisCol);
30527 }
30528 else {
30529 leftCol = columnModel.getDisplayedColBefore(thisCol);
30530 rightCol = columnModel.getDisplayedColAfter(thisCol);
30531 }
30532 var ranges = rangeService.getCellRanges().filter(function (range) { return rangeService.isCellInSpecificRange(_this.cellCtrl.getCellPosition(), range); });
30533 // this means we are the first column in the grid
30534 if (!leftCol) {
30535 left = true;
30536 }
30537 // this means we are the last column in the grid
30538 if (!rightCol) {
30539 right = true;
30540 }
30541 for (var i = 0; i < ranges.length; i++) {
30542 if (top && right && bottom && left) {
30543 break;
30544 }
30545 var range = ranges[i];
30546 var startRow = rangeService.getRangeStartRow(range);
30547 var endRow = rangeService.getRangeEndRow(range);
30548 if (!top && this.beans.rowPositionUtils.sameRow(startRow, this.cellCtrl.getCellPosition())) {
30549 top = true;
30550 }
30551 if (!bottom && this.beans.rowPositionUtils.sameRow(endRow, this.cellCtrl.getCellPosition())) {
30552 bottom = true;
30553 }
30554 if (!left && leftCol && range.columns.indexOf(leftCol) < 0) {
30555 left = true;
30556 }
30557 if (!right && rightCol && range.columns.indexOf(rightCol) < 0) {
30558 right = true;
30559 }
30560 }
30561 return { top: top, right: right, bottom: bottom, left: left };
30562 };
30563 CellRangeFeature.prototype.refreshHandle = function () {
30564 if (!this.beans.rangeService) {
30565 return;
30566 }
30567 var shouldHaveSelectionHandle = this.shouldHaveSelectionHandle();
30568 if (this.selectionHandle && !shouldHaveSelectionHandle) {
30569 this.selectionHandle = this.beans.context.destroyBean(this.selectionHandle);
30570 }
30571 if (shouldHaveSelectionHandle) {
30572 this.addSelectionHandle();
30573 }
30574 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_HANDLE, !!this.selectionHandle);
30575 };
30576 CellRangeFeature.prototype.shouldHaveSelectionHandle = function () {
30577 var _a = this.beans, gridOptionsService = _a.gridOptionsService, rangeService = _a.rangeService;
30578 var cellRanges = rangeService.getCellRanges();
30579 var rangesLen = cellRanges.length;
30580 if (this.rangeCount < 1 || rangesLen < 1) {
30581 return false;
30582 }
30583 var cellRange = Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["last"])(cellRanges);
30584 var cellPosition = this.cellCtrl.getCellPosition();
30585 var isFillHandleAvailable = gridOptionsService.is('enableFillHandle') && !this.cellCtrl.isSuppressFillHandle();
30586 var isRangeHandleAvailable = gridOptionsService.is('enableRangeHandle');
30587 var handleIsAvailable = rangesLen === 1 && !this.cellCtrl.isEditing() && (isFillHandleAvailable || isRangeHandleAvailable);
30588 if (this.hasChartRange) {
30589 var hasCategoryRange = cellRanges[0].type === _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__["CellRangeType"].DIMENSION;
30590 var isCategoryCell = hasCategoryRange && rangeService.isCellInSpecificRange(cellPosition, cellRanges[0]);
30591 this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_CHART_CATEGORY, isCategoryCell);
30592 handleIsAvailable = cellRange.type === _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__["CellRangeType"].VALUE;
30593 }
30594 return handleIsAvailable &&
30595 cellRange.endRow != null &&
30596 rangeService.isContiguousRange(cellRange) &&
30597 rangeService.isBottomRightCell(cellRange, cellPosition);
30598 };
30599 CellRangeFeature.prototype.addSelectionHandle = function () {
30600 var _a = this.beans, gridOptionsService = _a.gridOptionsService, rangeService = _a.rangeService;
30601 var cellRangeType = Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["last"])(rangeService.getCellRanges()).type;
30602 var selectionHandleFill = gridOptionsService.is('enableFillHandle') && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["missing"])(cellRangeType);
30603 var type = selectionHandleFill ? _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__["SelectionHandleType"].FILL : _interfaces_IRangeService__WEBPACK_IMPORTED_MODULE_1__["SelectionHandleType"].RANGE;
30604 if (this.selectionHandle && this.selectionHandle.getType() !== type) {
30605 this.selectionHandle = this.beans.context.destroyBean(this.selectionHandle);
30606 }
30607 if (!this.selectionHandle) {
30608 this.selectionHandle = this.beans.selectionHandleFactory.createSelectionHandle(type);
30609 }
30610 this.selectionHandle.refresh(this.cellCtrl);
30611 };
30612 CellRangeFeature.prototype.destroy = function () {
30613 this.beans.context.destroyBean(this.selectionHandle);
30614 };
30615 return CellRangeFeature;
30616}());
30617
30618
30619
30620/***/ }),
30621/* 127 */
30622/***/ (function(module, __webpack_exports__, __webpack_require__) {
30623
30624"use strict";
30625__webpack_require__.r(__webpack_exports__);
30626/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionHandleType", function() { return SelectionHandleType; });
30627/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellRangeType", function() { return CellRangeType; });
30628/**
30629 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30630 * @version v29.2.0
30631 * @link https://www.ag-grid.com/
30632 * @license MIT
30633 */
30634var SelectionHandleType;
30635(function (SelectionHandleType) {
30636 SelectionHandleType[SelectionHandleType["FILL"] = 0] = "FILL";
30637 SelectionHandleType[SelectionHandleType["RANGE"] = 1] = "RANGE";
30638})(SelectionHandleType || (SelectionHandleType = {}));
30639var CellRangeType;
30640(function (CellRangeType) {
30641 CellRangeType[CellRangeType["VALUE"] = 0] = "VALUE";
30642 CellRangeType[CellRangeType["DIMENSION"] = 1] = "DIMENSION";
30643})(CellRangeType || (CellRangeType = {}));
30644
30645
30646/***/ }),
30647/* 128 */
30648/***/ (function(module, __webpack_exports__, __webpack_require__) {
30649
30650"use strict";
30651__webpack_require__.r(__webpack_exports__);
30652/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellPositionFeature", function() { return CellPositionFeature; });
30653/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
30654/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26);
30655/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
30656/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
30657/**
30658 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30659 * @version v29.2.0
30660 * @link https://www.ag-grid.com/
30661 * @license MIT
30662 */
30663var __extends = (undefined && undefined.__extends) || (function () {
30664 var extendStatics = function (d, b) {
30665 extendStatics = Object.setPrototypeOf ||
30666 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30667 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
30668 return extendStatics(d, b);
30669 };
30670 return function (d, b) {
30671 extendStatics(d, b);
30672 function __() { this.constructor = d; }
30673 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30674 };
30675})();
30676
30677
30678
30679
30680/**
30681 * Takes care of:
30682 * #) Cell Width (including when doing cell spanning, which makes width cover many columns)
30683 * #) Cell Height (when doing row span, otherwise we don't touch the height as it's just row height)
30684 * #) Cell Left (the horizontal positioning of the cell, the vertical positioning is on the row)
30685 */
30686var CellPositionFeature = /** @class */ (function (_super) {
30687 __extends(CellPositionFeature, _super);
30688 function CellPositionFeature(ctrl, beans) {
30689 var _this = _super.call(this) || this;
30690 _this.cellCtrl = ctrl;
30691 _this.beans = beans;
30692 _this.column = ctrl.getColumn();
30693 _this.rowNode = ctrl.getRowNode();
30694 _this.setupColSpan();
30695 _this.setupRowSpan();
30696 return _this;
30697 }
30698 CellPositionFeature.prototype.setupRowSpan = function () {
30699 this.rowSpan = this.column.getRowSpan(this.rowNode);
30700 };
30701 CellPositionFeature.prototype.setComp = function (eGui) {
30702 this.eGui = eGui;
30703 this.onLeftChanged();
30704 this.onWidthChanged();
30705 this.applyRowSpan();
30706 };
30707 CellPositionFeature.prototype.onDisplayColumnsChanged = function () {
30708 var colsSpanning = this.getColSpanningList();
30709 if (!Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["areEqual"])(this.colsSpanning, colsSpanning)) {
30710 this.colsSpanning = colsSpanning;
30711 this.onWidthChanged();
30712 this.onLeftChanged(); // left changes when doing RTL
30713 }
30714 };
30715 CellPositionFeature.prototype.setupColSpan = function () {
30716 // if no col span is active, then we don't set it up, as it would be wasteful of CPU
30717 if (this.column.getColDef().colSpan == null) {
30718 return;
30719 }
30720 this.colsSpanning = this.getColSpanningList();
30721 // because we are col spanning, a reorder of the cols can change what cols we are spanning over
30722 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayColumnsChanged.bind(this));
30723 // because we are spanning over multiple cols, we check for width any time any cols width changes.
30724 // this is expensive - really we should be explicitly checking only the cols we are spanning over
30725 // instead of every col, however it would be tricky code to track the cols we are spanning over, so
30726 // because hardly anyone will be using colSpan, am favouring this easier way for more maintainable code.
30727 this.addManagedListener(this.beans.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onWidthChanged.bind(this));
30728 };
30729 CellPositionFeature.prototype.onWidthChanged = function () {
30730 if (!this.eGui) {
30731 return;
30732 }
30733 var width = this.getCellWidth();
30734 this.eGui.style.width = width + "px";
30735 };
30736 CellPositionFeature.prototype.getCellWidth = function () {
30737 if (!this.colsSpanning) {
30738 return this.column.getActualWidth();
30739 }
30740 return this.colsSpanning.reduce(function (width, col) { return width + col.getActualWidth(); }, 0);
30741 };
30742 CellPositionFeature.prototype.getColSpanningList = function () {
30743 var colSpan = this.column.getColSpan(this.rowNode);
30744 var colsSpanning = [];
30745 // if just one col, the col span is just the column we are in
30746 if (colSpan === 1) {
30747 colsSpanning.push(this.column);
30748 }
30749 else {
30750 var pointer = this.column;
30751 var pinned = this.column.getPinned();
30752 for (var i = 0; pointer && i < colSpan; i++) {
30753 colsSpanning.push(pointer);
30754 pointer = this.beans.columnModel.getDisplayedColAfter(pointer);
30755 if (!pointer || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["missing"])(pointer)) {
30756 break;
30757 }
30758 // we do not allow col spanning to span outside of pinned areas
30759 if (pinned !== pointer.getPinned()) {
30760 break;
30761 }
30762 }
30763 }
30764 return colsSpanning;
30765 };
30766 CellPositionFeature.prototype.onLeftChanged = function () {
30767 if (!this.eGui) {
30768 return;
30769 }
30770 var left = this.modifyLeftForPrintLayout(this.getCellLeft());
30771 this.eGui.style.left = left + 'px';
30772 };
30773 CellPositionFeature.prototype.getCellLeft = function () {
30774 var mostLeftCol;
30775 if (this.beans.gridOptionsService.is('enableRtl') && this.colsSpanning) {
30776 mostLeftCol = Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["last"])(this.colsSpanning);
30777 }
30778 else {
30779 mostLeftCol = this.column;
30780 }
30781 return mostLeftCol.getLeft();
30782 };
30783 CellPositionFeature.prototype.modifyLeftForPrintLayout = function (leftPosition) {
30784 if (!this.cellCtrl.isPrintLayout() || this.column.getPinned() === 'left') {
30785 return leftPosition;
30786 }
30787 var leftWidth = this.beans.columnModel.getDisplayedColumnsLeftWidth();
30788 if (this.column.getPinned() === 'right') {
30789 var bodyWidth = this.beans.columnModel.getBodyContainerWidth();
30790 return leftWidth + bodyWidth + (leftPosition || 0);
30791 }
30792 // is in body
30793 return leftWidth + (leftPosition || 0);
30794 };
30795 CellPositionFeature.prototype.applyRowSpan = function () {
30796 if (this.rowSpan === 1) {
30797 return;
30798 }
30799 var singleRowHeight = this.beans.gridOptionsService.getRowHeightAsNumber();
30800 var totalRowHeight = singleRowHeight * this.rowSpan;
30801 this.eGui.style.height = totalRowHeight + "px";
30802 this.eGui.style.zIndex = '1';
30803 };
30804 // overriding to make public, as we don't dispose this bean via context
30805 CellPositionFeature.prototype.destroy = function () {
30806 _super.prototype.destroy.call(this);
30807 };
30808 return CellPositionFeature;
30809}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
30810
30811
30812
30813/***/ }),
30814/* 129 */
30815/***/ (function(module, __webpack_exports__, __webpack_require__) {
30816
30817"use strict";
30818__webpack_require__.r(__webpack_exports__);
30819/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellCustomStyleFeature", function() { return CellCustomStyleFeature; });
30820/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
30821/**
30822 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30823 * @version v29.2.0
30824 * @link https://www.ag-grid.com/
30825 * @license MIT
30826 */
30827var __extends = (undefined && undefined.__extends) || (function () {
30828 var extendStatics = function (d, b) {
30829 extendStatics = Object.setPrototypeOf ||
30830 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30831 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
30832 return extendStatics(d, b);
30833 };
30834 return function (d, b) {
30835 extendStatics(d, b);
30836 function __() { this.constructor = d; }
30837 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30838 };
30839})();
30840
30841var CellCustomStyleFeature = /** @class */ (function (_super) {
30842 __extends(CellCustomStyleFeature, _super);
30843 function CellCustomStyleFeature(ctrl, beans) {
30844 var _this = _super.call(this) || this;
30845 _this.staticClasses = [];
30846 _this.cellCtrl = ctrl;
30847 _this.beans = beans;
30848 _this.column = ctrl.getColumn();
30849 _this.rowNode = ctrl.getRowNode();
30850 return _this;
30851 }
30852 CellCustomStyleFeature.prototype.setComp = function (comp) {
30853 this.cellComp = comp;
30854 this.applyUserStyles();
30855 this.applyCellClassRules();
30856 this.applyClassesFromColDef();
30857 };
30858 CellCustomStyleFeature.prototype.applyCellClassRules = function () {
30859 var _this = this;
30860 var colDef = this.column.getColDef();
30861 var cellClassParams = {
30862 value: this.cellCtrl.getValue(),
30863 data: this.rowNode.data,
30864 node: this.rowNode,
30865 colDef: colDef,
30866 column: this.column,
30867 rowIndex: this.rowNode.rowIndex,
30868 api: this.beans.gridOptionsService.api,
30869 columnApi: this.beans.gridOptionsService.columnApi,
30870 context: this.beans.gridOptionsService.context
30871 };
30872 this.beans.stylingService.processClassRules(colDef.cellClassRules, cellClassParams, function (className) { return _this.cellComp.addOrRemoveCssClass(className, true); }, function (className) { return _this.cellComp.addOrRemoveCssClass(className, false); });
30873 };
30874 CellCustomStyleFeature.prototype.applyUserStyles = function () {
30875 var colDef = this.column.getColDef();
30876 if (!colDef.cellStyle) {
30877 return;
30878 }
30879 var styles;
30880 if (typeof colDef.cellStyle === 'function') {
30881 var cellStyleParams = {
30882 column: this.column,
30883 value: this.cellCtrl.getValue(),
30884 colDef: colDef,
30885 data: this.rowNode.data,
30886 node: this.rowNode,
30887 rowIndex: this.rowNode.rowIndex,
30888 api: this.beans.gridOptionsService.api,
30889 columnApi: this.beans.gridOptionsService.columnApi,
30890 context: this.beans.gridOptionsService.context,
30891 };
30892 var cellStyleFunc = colDef.cellStyle;
30893 styles = cellStyleFunc(cellStyleParams);
30894 }
30895 else {
30896 styles = colDef.cellStyle;
30897 }
30898 if (styles) {
30899 this.cellComp.setUserStyles(styles);
30900 }
30901 };
30902 CellCustomStyleFeature.prototype.applyClassesFromColDef = function () {
30903 var _this = this;
30904 var colDef = this.column.getColDef();
30905 var cellClassParams = {
30906 value: this.cellCtrl.getValue(),
30907 data: this.rowNode.data,
30908 node: this.rowNode,
30909 column: this.column,
30910 colDef: colDef,
30911 rowIndex: this.rowNode.rowIndex,
30912 api: this.beans.gridOptionsService.api,
30913 columnApi: this.beans.gridOptionsService.columnApi,
30914 context: this.beans.gridOptionsService.context
30915 };
30916 if (this.staticClasses.length) {
30917 this.staticClasses.forEach(function (className) { return _this.cellComp.addOrRemoveCssClass(className, false); });
30918 }
30919 this.staticClasses = this.beans.stylingService.getStaticCellClasses(colDef, cellClassParams);
30920 if (this.staticClasses.length) {
30921 this.staticClasses.forEach(function (className) { return _this.cellComp.addOrRemoveCssClass(className, true); });
30922 }
30923 };
30924 // overriding to make public, as we don't dispose this bean via context
30925 CellCustomStyleFeature.prototype.destroy = function () {
30926 _super.prototype.destroy.call(this);
30927 };
30928 return CellCustomStyleFeature;
30929}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
30930
30931
30932
30933/***/ }),
30934/* 130 */
30935/***/ (function(module, __webpack_exports__, __webpack_require__) {
30936
30937"use strict";
30938__webpack_require__.r(__webpack_exports__);
30939/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipFeature", function() { return TooltipFeature; });
30940/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
30941/* harmony import */ var _customTooltipFeature__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55);
30942/**
30943 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30944 * @version v29.2.0
30945 * @link https://www.ag-grid.com/
30946 * @license MIT
30947 */
30948var __extends = (undefined && undefined.__extends) || (function () {
30949 var extendStatics = function (d, b) {
30950 extendStatics = Object.setPrototypeOf ||
30951 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30952 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
30953 return extendStatics(d, b);
30954 };
30955 return function (d, b) {
30956 extendStatics(d, b);
30957 function __() { this.constructor = d; }
30958 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30959 };
30960})();
30961
30962
30963var TooltipFeature = /** @class */ (function (_super) {
30964 __extends(TooltipFeature, _super);
30965 function TooltipFeature(ctrl, beans) {
30966 var _this = _super.call(this) || this;
30967 _this.ctrl = ctrl;
30968 _this.beans = beans;
30969 return _this;
30970 }
30971 TooltipFeature.prototype.setComp = function (comp) {
30972 this.comp = comp;
30973 this.setupTooltip();
30974 };
30975 TooltipFeature.prototype.setupTooltip = function () {
30976 this.browserTooltips = this.beans.gridOptionsService.is('enableBrowserTooltips');
30977 this.updateTooltipText();
30978 if (this.browserTooltips) {
30979 this.comp.setTitle(this.tooltip != null ? this.tooltip : undefined);
30980 }
30981 else {
30982 this.createTooltipFeatureIfNeeded();
30983 }
30984 };
30985 TooltipFeature.prototype.updateTooltipText = function () {
30986 this.tooltip = this.ctrl.getTooltipValue();
30987 };
30988 TooltipFeature.prototype.createTooltipFeatureIfNeeded = function () {
30989 var _this = this;
30990 if (this.genericTooltipFeature != null) {
30991 return;
30992 }
30993 var parent = {
30994 getTooltipParams: function () { return _this.getTooltipParams(); },
30995 getGui: function () { return _this.ctrl.getGui(); }
30996 };
30997 this.genericTooltipFeature = this.createManagedBean(new _customTooltipFeature__WEBPACK_IMPORTED_MODULE_1__["CustomTooltipFeature"](parent), this.beans.context);
30998 };
30999 TooltipFeature.prototype.refreshToolTip = function () {
31000 this.updateTooltipText();
31001 if (this.browserTooltips) {
31002 this.comp.setTitle(this.tooltip != null ? this.tooltip : undefined);
31003 }
31004 };
31005 TooltipFeature.prototype.getTooltipParams = function () {
31006 var ctrl = this.ctrl;
31007 var column = ctrl.getColumn ? ctrl.getColumn() : undefined;
31008 var colDef = ctrl.getColDef ? ctrl.getColDef() : undefined;
31009 var rowNode = ctrl.getRowNode ? ctrl.getRowNode() : undefined;
31010 return {
31011 location: ctrl.getLocation(),
31012 colDef: colDef,
31013 column: column,
31014 rowIndex: ctrl.getRowIndex ? ctrl.getRowIndex() : undefined,
31015 node: rowNode,
31016 data: rowNode ? rowNode.data : undefined,
31017 value: this.getTooltipText(),
31018 valueFormatted: ctrl.getValueFormatted ? ctrl.getValueFormatted() : undefined,
31019 };
31020 };
31021 TooltipFeature.prototype.getTooltipText = function () {
31022 return this.tooltip;
31023 };
31024 // overriding to make public, as we don't dispose this bean via context
31025 TooltipFeature.prototype.destroy = function () {
31026 _super.prototype.destroy.call(this);
31027 };
31028 return TooltipFeature;
31029}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
31030
31031
31032
31033/***/ }),
31034/* 131 */
31035/***/ (function(module, __webpack_exports__, __webpack_require__) {
31036
31037"use strict";
31038__webpack_require__.r(__webpack_exports__);
31039/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellMouseListenerFeature", function() { return CellMouseListenerFeature; });
31040/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
31041/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42);
31042/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
31043/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
31044/* harmony import */ var _beans__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(132);
31045/**
31046 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
31047 * @version v29.2.0
31048 * @link https://www.ag-grid.com/
31049 * @license MIT
31050 */
31051var __extends = (undefined && undefined.__extends) || (function () {
31052 var extendStatics = function (d, b) {
31053 extendStatics = Object.setPrototypeOf ||
31054 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31055 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
31056 return extendStatics(d, b);
31057 };
31058 return function (d, b) {
31059 extendStatics(d, b);
31060 function __() { this.constructor = d; }
31061 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31062 };
31063})();
31064
31065
31066
31067
31068
31069var CellMouseListenerFeature = /** @class */ (function (_super) {
31070 __extends(CellMouseListenerFeature, _super);
31071 function CellMouseListenerFeature(ctrl, beans, column) {
31072 var _this = _super.call(this) || this;
31073 _this.cellCtrl = ctrl;
31074 _this.beans = beans;
31075 _this.column = column;
31076 return _this;
31077 }
31078 CellMouseListenerFeature.prototype.onMouseEvent = function (eventName, mouseEvent) {
31079 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_3__["isStopPropagationForAgGrid"])(mouseEvent)) {
31080 return;
31081 }
31082 switch (eventName) {
31083 case 'click':
31084 this.onCellClicked(mouseEvent);
31085 break;
31086 case 'mousedown':
31087 case 'touchstart':
31088 this.onMouseDown(mouseEvent);
31089 break;
31090 case 'dblclick':
31091 this.onCellDoubleClicked(mouseEvent);
31092 break;
31093 case 'mouseout':
31094 this.onMouseOut(mouseEvent);
31095 break;
31096 case 'mouseover':
31097 this.onMouseOver(mouseEvent);
31098 break;
31099 }
31100 };
31101 CellMouseListenerFeature.prototype.onCellClicked = function (mouseEvent) {
31102 // iPad doesn't have double click - so we need to mimic it to enable editing for iPad.
31103 if (this.isDoubleClickOnIPad()) {
31104 this.onCellDoubleClicked(mouseEvent);
31105 mouseEvent.preventDefault(); // if we don't do this, then iPad zooms in
31106 return;
31107 }
31108 var _a = this.beans, eventService = _a.eventService, rangeService = _a.rangeService, gridOptionsService = _a.gridOptionsService;
31109 var multiKeyPressed = mouseEvent.ctrlKey || mouseEvent.metaKey;
31110 if (rangeService && multiKeyPressed) {
31111 // the mousedown event has created the range already, so we only intersect if there is more than one
31112 // range on this cell
31113 if (rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()) > 1) {
31114 rangeService.intersectLastRange(true);
31115 }
31116 }
31117 var cellClickedEvent = this.cellCtrl.createEvent(mouseEvent, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_CLICKED);
31118 eventService.dispatchEvent(cellClickedEvent);
31119 var colDef = this.column.getColDef();
31120 if (colDef.onCellClicked) {
31121 // to make callback async, do in a timeout
31122 window.setTimeout(function () { return colDef.onCellClicked(cellClickedEvent); }, 0);
31123 }
31124 var editOnSingleClick = (gridOptionsService.is('singleClickEdit') || colDef.singleClickEdit)
31125 && !gridOptionsService.is('suppressClickEdit');
31126 if (editOnSingleClick) {
31127 this.cellCtrl.startRowOrCellEdit();
31128 }
31129 };
31130 // returns true if on iPad and this is second 'click' event in 200ms
31131 CellMouseListenerFeature.prototype.isDoubleClickOnIPad = function () {
31132 if (!Object(_utils_browser__WEBPACK_IMPORTED_MODULE_1__["isIOSUserAgent"])() || Object(_utils_event__WEBPACK_IMPORTED_MODULE_3__["isEventSupported"])('dblclick')) {
31133 return false;
31134 }
31135 var nowMillis = new Date().getTime();
31136 var res = nowMillis - this.lastIPadMouseClickEvent < 200;
31137 this.lastIPadMouseClickEvent = nowMillis;
31138 return res;
31139 };
31140 CellMouseListenerFeature.prototype.onCellDoubleClicked = function (mouseEvent) {
31141 var colDef = this.column.getColDef();
31142 // always dispatch event to eventService
31143 var cellDoubleClickedEvent = this.cellCtrl.createEvent(mouseEvent, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_DOUBLE_CLICKED);
31144 this.beans.eventService.dispatchEvent(cellDoubleClickedEvent);
31145 // check if colDef also wants to handle event
31146 if (typeof colDef.onCellDoubleClicked === 'function') {
31147 // to make the callback async, do in a timeout
31148 window.setTimeout(function () { return colDef.onCellDoubleClicked(cellDoubleClickedEvent); }, 0);
31149 }
31150 var editOnDoubleClick = !this.beans.gridOptionsService.is('singleClickEdit')
31151 && !this.beans.gridOptionsService.is('suppressClickEdit');
31152 if (editOnDoubleClick) {
31153 this.cellCtrl.startRowOrCellEdit(null, null, mouseEvent);
31154 }
31155 };
31156 CellMouseListenerFeature.prototype.onMouseDown = function (mouseEvent) {
31157 var ctrlKey = mouseEvent.ctrlKey, metaKey = mouseEvent.metaKey, shiftKey = mouseEvent.shiftKey;
31158 var target = mouseEvent.target;
31159 var _a = this.beans, eventService = _a.eventService, rangeService = _a.rangeService;
31160 // do not change the range for right-clicks inside an existing range
31161 if (this.isRightClickInExistingRange(mouseEvent)) {
31162 return;
31163 }
31164 var ranges = rangeService && rangeService.getCellRanges().length != 0;
31165 if (!shiftKey || !ranges) {
31166 // We only need to pass true to focusCell when the browser is Safari and we are trying
31167 // to focus the cell itself. This should never be true if the mousedown was triggered
31168 // due to a click on a cell editor for example.
31169 var forceBrowserFocus = (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_1__["isBrowserSafari"])()) && !this.cellCtrl.isEditing() && !Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isFocusableFormField"])(target);
31170 this.cellCtrl.focusCell(forceBrowserFocus);
31171 }
31172 // if shift clicking, and a range exists, we keep the focus on the cell that started the
31173 // range as the user then changes the range selection.
31174 if (shiftKey && ranges) {
31175 // this stops the cell from getting focused
31176 mouseEvent.preventDefault();
31177 }
31178 // if we are clicking on a checkbox, we need to make sure the cell wrapping that checkbox
31179 // is focused but we don't want to change the range selection, so return here.
31180 if (this.containsWidget(target)) {
31181 return;
31182 }
31183 if (rangeService) {
31184 var thisCell = this.cellCtrl.getCellPosition();
31185 if (shiftKey) {
31186 rangeService.extendLatestRangeToCell(thisCell);
31187 }
31188 else {
31189 var ctrlKeyPressed = ctrlKey || metaKey;
31190 rangeService.setRangeToCell(thisCell, ctrlKeyPressed);
31191 }
31192 }
31193 eventService.dispatchEvent(this.cellCtrl.createEvent(mouseEvent, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_MOUSE_DOWN));
31194 };
31195 CellMouseListenerFeature.prototype.isRightClickInExistingRange = function (mouseEvent) {
31196 var rangeService = this.beans.rangeService;
31197 if (rangeService) {
31198 var cellInRange = rangeService.isCellInAnyRange(this.cellCtrl.getCellPosition());
31199 if (cellInRange && mouseEvent.button === 2) {
31200 return true;
31201 }
31202 }
31203 return false;
31204 };
31205 CellMouseListenerFeature.prototype.containsWidget = function (target) {
31206 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isElementChildOfClass"])(target, 'ag-selection-checkbox', 3);
31207 };
31208 CellMouseListenerFeature.prototype.onMouseOut = function (mouseEvent) {
31209 if (this.mouseStayingInsideCell(mouseEvent)) {
31210 return;
31211 }
31212 var cellMouseOutEvent = this.cellCtrl.createEvent(mouseEvent, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_MOUSE_OUT);
31213 this.beans.eventService.dispatchEvent(cellMouseOutEvent);
31214 this.beans.columnHoverService.clearMouseOver();
31215 };
31216 CellMouseListenerFeature.prototype.onMouseOver = function (mouseEvent) {
31217 if (this.mouseStayingInsideCell(mouseEvent)) {
31218 return;
31219 }
31220 var cellMouseOverEvent = this.cellCtrl.createEvent(mouseEvent, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_CELL_MOUSE_OVER);
31221 this.beans.eventService.dispatchEvent(cellMouseOverEvent);
31222 this.beans.columnHoverService.setMouseOver([this.column]);
31223 };
31224 CellMouseListenerFeature.prototype.mouseStayingInsideCell = function (e) {
31225 if (!e.target || !e.relatedTarget) {
31226 return false;
31227 }
31228 var eGui = this.cellCtrl.getGui();
31229 var cellContainsTarget = eGui.contains(e.target);
31230 var cellContainsRelatedTarget = eGui.contains(e.relatedTarget);
31231 return cellContainsTarget && cellContainsRelatedTarget;
31232 };
31233 CellMouseListenerFeature.prototype.destroy = function () {
31234 };
31235 return CellMouseListenerFeature;
31236}(_beans__WEBPACK_IMPORTED_MODULE_4__["Beans"]));
31237
31238
31239
31240/***/ }),
31241/* 132 */
31242/***/ (function(module, __webpack_exports__, __webpack_require__) {
31243
31244"use strict";
31245__webpack_require__.r(__webpack_exports__);
31246/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Beans", function() { return Beans; });
31247/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
31248/**
31249 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
31250 * @version v29.2.0
31251 * @link https://www.ag-grid.com/
31252 * @license MIT
31253 */
31254var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
31255 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
31256 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
31257 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;
31258 return c > 3 && r && Object.defineProperty(target, key, r), r;
31259};
31260
31261/** Using the IoC has a slight performance consideration, which is no problem most of the
31262 * time, unless we are trashing objects - which is the case when scrolling and rowComp
31263 * and cellComp. So for performance reasons, RowComp and CellComp do not get autowired
31264 * with the IoC. Instead they get passed this object which is all the beans the RowComp
31265 * and CellComp need. Not autowiring all the cells gives performance improvement. */
31266var Beans = /** @class */ (function () {
31267 function Beans() {
31268 }
31269 Beans.prototype.postConstruct = function () {
31270 this.doingMasterDetail = this.gridOptionsService.isMasterDetail();
31271 if (this.gridOptionsService.isRowModelType('clientSide')) {
31272 this.clientSideRowModel = this.rowModel;
31273 }
31274 if (this.gridOptionsService.isRowModelType('serverSide')) {
31275 this.serverSideRowModel = this.rowModel;
31276 }
31277 };
31278 __decorate([
31279 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('resizeObserverService')
31280 ], Beans.prototype, "resizeObserverService", void 0);
31281 __decorate([
31282 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
31283 ], Beans.prototype, "paginationProxy", void 0);
31284 __decorate([
31285 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('context')
31286 ], Beans.prototype, "context", void 0);
31287 __decorate([
31288 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnApi')
31289 ], Beans.prototype, "columnApi", void 0);
31290 __decorate([
31291 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
31292 ], Beans.prototype, "gridApi", void 0);
31293 __decorate([
31294 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridOptionsService')
31295 ], Beans.prototype, "gridOptionsService", void 0);
31296 __decorate([
31297 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('expressionService')
31298 ], Beans.prototype, "expressionService", void 0);
31299 __decorate([
31300 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('environment')
31301 ], Beans.prototype, "environment", void 0);
31302 __decorate([
31303 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
31304 ], Beans.prototype, "rowRenderer", void 0);
31305 __decorate([
31306 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('templateService')
31307 ], Beans.prototype, "templateService", void 0);
31308 __decorate([
31309 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueService')
31310 ], Beans.prototype, "valueService", void 0);
31311 __decorate([
31312 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('eventService')
31313 ], Beans.prototype, "eventService", void 0);
31314 __decorate([
31315 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
31316 ], Beans.prototype, "columnModel", void 0);
31317 __decorate([
31318 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('headerNavigationService')
31319 ], Beans.prototype, "headerNavigationService", void 0);
31320 __decorate([
31321 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('navigationService')
31322 ], Beans.prototype, "navigationService", void 0);
31323 __decorate([
31324 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnAnimationService')
31325 ], Beans.prototype, "columnAnimationService", void 0);
31326 __decorate([
31327 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('rangeService')
31328 ], Beans.prototype, "rangeService", void 0);
31329 __decorate([
31330 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
31331 ], Beans.prototype, "focusService", void 0);
31332 __decorate([
31333 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('contextMenuFactory')
31334 ], Beans.prototype, "contextMenuFactory", void 0);
31335 __decorate([
31336 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('popupService')
31337 ], Beans.prototype, "popupService", void 0);
31338 __decorate([
31339 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueFormatterService')
31340 ], Beans.prototype, "valueFormatterService", void 0);
31341 __decorate([
31342 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('stylingService')
31343 ], Beans.prototype, "stylingService", void 0);
31344 __decorate([
31345 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnHoverService')
31346 ], Beans.prototype, "columnHoverService", void 0);
31347 __decorate([
31348 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('userComponentFactory')
31349 ], Beans.prototype, "userComponentFactory", void 0);
31350 __decorate([
31351 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('userComponentRegistry')
31352 ], Beans.prototype, "userComponentRegistry", void 0);
31353 __decorate([
31354 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('animationFrameService')
31355 ], Beans.prototype, "animationFrameService", void 0);
31356 __decorate([
31357 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('dragService')
31358 ], Beans.prototype, "dragService", void 0);
31359 __decorate([
31360 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('dragAndDropService')
31361 ], Beans.prototype, "dragAndDropService", void 0);
31362 __decorate([
31363 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortController')
31364 ], Beans.prototype, "sortController", void 0);
31365 __decorate([
31366 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
31367 ], Beans.prototype, "filterManager", void 0);
31368 __decorate([
31369 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowContainerHeightService')
31370 ], Beans.prototype, "rowContainerHeightService", void 0);
31371 __decorate([
31372 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('frameworkOverrides')
31373 ], Beans.prototype, "frameworkOverrides", void 0);
31374 __decorate([
31375 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('cellPositionUtils')
31376 ], Beans.prototype, "cellPositionUtils", void 0);
31377 __decorate([
31378 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowPositionUtils')
31379 ], Beans.prototype, "rowPositionUtils", void 0);
31380 __decorate([
31381 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('selectionService')
31382 ], Beans.prototype, "selectionService", void 0);
31383 __decorate([
31384 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('selectionHandleFactory')
31385 ], Beans.prototype, "selectionHandleFactory", void 0);
31386 __decorate([
31387 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowCssClassCalculator')
31388 ], Beans.prototype, "rowCssClassCalculator", void 0);
31389 __decorate([
31390 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
31391 ], Beans.prototype, "rowModel", void 0);
31392 __decorate([
31393 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
31394 ], Beans.prototype, "ctrlsService", void 0);
31395 __decorate([
31396 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsFactory')
31397 ], Beans.prototype, "ctrlsFactory", void 0);
31398 __decorate([
31399 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('agStackComponentsRegistry')
31400 ], Beans.prototype, "agStackComponentsRegistry", void 0);
31401 __decorate([
31402 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueCache')
31403 ], Beans.prototype, "valueCache", void 0);
31404 __decorate([
31405 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowNodeEventThrottle')
31406 ], Beans.prototype, "rowNodeEventThrottle", void 0);
31407 __decorate([
31408 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('localeService')
31409 ], Beans.prototype, "localeService", void 0);
31410 __decorate([
31411 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
31412 ], Beans.prototype, "postConstruct", null);
31413 Beans = __decorate([
31414 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('beans')
31415 ], Beans);
31416 return Beans;
31417}());
31418
31419
31420
31421/***/ }),
31422/* 133 */
31423/***/ (function(module, __webpack_exports__, __webpack_require__) {
31424
31425"use strict";
31426__webpack_require__.r(__webpack_exports__);
31427/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellKeyboardListenerFeature", function() { return CellKeyboardListenerFeature; });
31428/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
31429/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
31430/* harmony import */ var _utils_keyboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47);
31431/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
31432/**
31433 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
31434 * @version v29.2.0
31435 * @link https://www.ag-grid.com/
31436 * @license MIT
31437 */
31438var __extends = (undefined && undefined.__extends) || (function () {
31439 var extendStatics = function (d, b) {
31440 extendStatics = Object.setPrototypeOf ||
31441 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31442 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
31443 return extendStatics(d, b);
31444 };
31445 return function (d, b) {
31446 extendStatics(d, b);
31447 function __() { this.constructor = d; }
31448 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31449 };
31450})();
31451
31452
31453
31454
31455var CellKeyboardListenerFeature = /** @class */ (function (_super) {
31456 __extends(CellKeyboardListenerFeature, _super);
31457 function CellKeyboardListenerFeature(ctrl, beans, column, rowNode, rowCtrl) {
31458 var _this = _super.call(this) || this;
31459 _this.cellCtrl = ctrl;
31460 _this.beans = beans;
31461 _this.rowNode = rowNode;
31462 _this.rowCtrl = rowCtrl;
31463 return _this;
31464 }
31465 CellKeyboardListenerFeature.prototype.setComp = function (eGui) {
31466 this.eGui = eGui;
31467 };
31468 CellKeyboardListenerFeature.prototype.onKeyDown = function (event) {
31469 var key = event.key;
31470 switch (key) {
31471 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ENTER:
31472 this.onEnterKeyDown(event);
31473 break;
31474 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].F2:
31475 this.onF2KeyDown(event);
31476 break;
31477 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ESCAPE:
31478 this.onEscapeKeyDown(event);
31479 break;
31480 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].TAB:
31481 this.onTabKeyDown(event);
31482 break;
31483 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].BACKSPACE:
31484 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].DELETE:
31485 this.onBackspaceOrDeleteKeyPressed(key, event);
31486 break;
31487 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].DOWN:
31488 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].UP:
31489 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].RIGHT:
31490 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].LEFT:
31491 this.onNavigationKeyPressed(event, key);
31492 break;
31493 }
31494 };
31495 CellKeyboardListenerFeature.prototype.onNavigationKeyPressed = function (event, key) {
31496 if (this.cellCtrl.isEditing()) {
31497 return;
31498 }
31499 if (event.shiftKey && this.cellCtrl.isRangeSelectionEnabled()) {
31500 this.onShiftRangeSelect(event);
31501 }
31502 else {
31503 this.beans.navigationService.navigateToNextCell(event, key, this.cellCtrl.getCellPosition(), true);
31504 }
31505 // if we don't prevent default, the grid will scroll with the navigation keys
31506 event.preventDefault();
31507 };
31508 CellKeyboardListenerFeature.prototype.onShiftRangeSelect = function (event) {
31509 if (!this.beans.rangeService) {
31510 return;
31511 }
31512 var endCell = this.beans.rangeService.extendLatestRangeInDirection(event);
31513 if (endCell) {
31514 this.beans.navigationService.ensureCellVisible(endCell);
31515 }
31516 };
31517 CellKeyboardListenerFeature.prototype.onTabKeyDown = function (event) {
31518 this.beans.navigationService.onTabKeyDown(this.cellCtrl, event);
31519 };
31520 CellKeyboardListenerFeature.prototype.onBackspaceOrDeleteKeyPressed = function (key, event) {
31521 var _a = this, cellCtrl = _a.cellCtrl, beans = _a.beans, rowNode = _a.rowNode;
31522 var gridOptionsService = beans.gridOptionsService, rangeService = beans.rangeService, eventService = beans.eventService;
31523 if (cellCtrl.isEditing()) {
31524 return;
31525 }
31526 eventService.dispatchEvent({ type: _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_KEY_SHORTCUT_CHANGED_CELL_START });
31527 if (Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_2__["isDeleteKey"])(key, gridOptionsService.is('enableCellEditingOnBackspace'))) {
31528 if (rangeService && gridOptionsService.isEnableRangeSelection()) {
31529 rangeService.clearCellRangeCellValues();
31530 }
31531 else if (cellCtrl.isCellEditable()) {
31532 rowNode.setDataValue(cellCtrl.getColumn(), null, 'cellClear');
31533 }
31534 }
31535 else {
31536 cellCtrl.startRowOrCellEdit(key, undefined, event);
31537 }
31538 eventService.dispatchEvent({ type: _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_KEY_SHORTCUT_CHANGED_CELL_END });
31539 };
31540 CellKeyboardListenerFeature.prototype.onEnterKeyDown = function (e) {
31541 if (this.cellCtrl.isEditing() || this.rowCtrl.isEditing()) {
31542 this.cellCtrl.stopEditingAndFocus();
31543 }
31544 else {
31545 if (this.beans.gridOptionsService.is('enterMovesDown')) {
31546 this.beans.navigationService.navigateToNextCell(null, _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].DOWN, this.cellCtrl.getCellPosition(), false);
31547 }
31548 else {
31549 this.cellCtrl.startRowOrCellEdit(_constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ENTER, undefined, e);
31550 if (this.cellCtrl.isEditing()) {
31551 // if we started editing, then we need to prevent default, otherwise the Enter action can get
31552 // applied to the cell editor. this happened, for example, with largeTextCellEditor where not
31553 // preventing default results in a 'new line' character getting inserted in the text area
31554 // when the editing was started
31555 e.preventDefault();
31556 }
31557 }
31558 }
31559 };
31560 CellKeyboardListenerFeature.prototype.onF2KeyDown = function (event) {
31561 if (!this.cellCtrl.isEditing()) {
31562 this.cellCtrl.startRowOrCellEdit(_constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].F2, undefined, event);
31563 }
31564 };
31565 CellKeyboardListenerFeature.prototype.onEscapeKeyDown = function (event) {
31566 if (this.cellCtrl.isEditing()) {
31567 this.cellCtrl.stopRowOrCellEdit(true);
31568 this.cellCtrl.focusCell(true);
31569 }
31570 };
31571 CellKeyboardListenerFeature.prototype.onKeyPress = function (event) {
31572 // check this, in case focus is on a (for example) a text field inside the cell,
31573 // in which cse we should not be listening for these key pressed
31574 var eventTarget = event.target;
31575 var eventOnChildComponent = eventTarget !== this.eGui;
31576 if (eventOnChildComponent || this.cellCtrl.isEditing()) {
31577 return;
31578 }
31579 var pressedChar = String.fromCharCode(event.charCode);
31580 if (pressedChar === ' ') {
31581 this.onSpaceKeyPressed(event);
31582 }
31583 else if (Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_2__["isEventFromPrintableCharacter"])(event)) {
31584 this.cellCtrl.startRowOrCellEdit(null, pressedChar, event);
31585 // if we don't prevent default, then the keypress also gets applied to the text field
31586 // (at least when doing the default editor), but we need to allow the editor to decide
31587 // what it wants to do. we only do this IF editing was started - otherwise it messes
31588 // up when the use is not doing editing, but using rendering with text fields in cellRenderer
31589 // (as it would block the the user from typing into text fields).
31590 event.preventDefault();
31591 }
31592 };
31593 CellKeyboardListenerFeature.prototype.onSpaceKeyPressed = function (event) {
31594 var gridOptionsService = this.beans.gridOptionsService;
31595 if (!this.cellCtrl.isEditing() && gridOptionsService.isRowSelection()) {
31596 var currentSelection = this.rowNode.isSelected();
31597 var newSelection = !currentSelection;
31598 if (newSelection || !gridOptionsService.is('suppressRowDeselection')) {
31599 var groupSelectsFiltered = this.beans.gridOptionsService.is('groupSelectsFiltered');
31600 var updatedCount = this.rowNode.setSelectedParams({
31601 newValue: newSelection,
31602 rangeSelect: event.shiftKey,
31603 groupSelectsFiltered: groupSelectsFiltered,
31604 event: event,
31605 source: 'spacePressed'
31606 });
31607 if (currentSelection === undefined && updatedCount === 0) {
31608 this.rowNode.setSelectedParams({
31609 newValue: false,
31610 rangeSelect: event.shiftKey,
31611 groupSelectsFiltered: groupSelectsFiltered,
31612 event: event,
31613 source: 'spacePressed'
31614 });
31615 }
31616 }
31617 }
31618 // prevent default as space key, by default, moves browser scroll down
31619 event.preventDefault();
31620 };
31621 CellKeyboardListenerFeature.prototype.destroy = function () {
31622 _super.prototype.destroy.call(this);
31623 };
31624 return CellKeyboardListenerFeature;
31625}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
31626
31627
31628
31629/***/ }),
31630/* 134 */
31631/***/ (function(module, __webpack_exports__, __webpack_require__) {
31632
31633"use strict";
31634__webpack_require__.r(__webpack_exports__);
31635/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DndSourceComp", function() { return DndSourceComp; });
31636/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
31637/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
31638/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46);
31639/**
31640 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
31641 * @version v29.2.0
31642 * @link https://www.ag-grid.com/
31643 * @license MIT
31644 */
31645var __extends = (undefined && undefined.__extends) || (function () {
31646 var extendStatics = function (d, b) {
31647 extendStatics = Object.setPrototypeOf ||
31648 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31649 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
31650 return extendStatics(d, b);
31651 };
31652 return function (d, b) {
31653 extendStatics(d, b);
31654 function __() { this.constructor = d; }
31655 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31656 };
31657})();
31658var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
31659 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
31660 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
31661 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;
31662 return c > 3 && r && Object.defineProperty(target, key, r), r;
31663};
31664
31665
31666
31667var DndSourceComp = /** @class */ (function (_super) {
31668 __extends(DndSourceComp, _super);
31669 function DndSourceComp(rowNode, column, beans, eCell) {
31670 var _this = _super.call(this, "<div class=\"ag-drag-handle ag-row-drag\" draggable=\"true\"></div>") || this;
31671 _this.rowNode = rowNode;
31672 _this.column = column;
31673 _this.beans = beans;
31674 _this.eCell = eCell;
31675 return _this;
31676 }
31677 DndSourceComp.prototype.postConstruct = function () {
31678 var eGui = this.getGui();
31679 eGui.appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_2__["createIconNoSpan"])('rowDrag', this.beans.gridOptionsService, null));
31680 // we need to stop the event propagation here to avoid starting a range selection while dragging
31681 this.addGuiEventListener('mousedown', function (e) {
31682 e.stopPropagation();
31683 });
31684 this.addDragSource();
31685 this.checkVisibility();
31686 };
31687 DndSourceComp.prototype.addDragSource = function () {
31688 this.addGuiEventListener('dragstart', this.onDragStart.bind(this));
31689 };
31690 DndSourceComp.prototype.onDragStart = function (dragEvent) {
31691 var _this = this;
31692 var providedOnRowDrag = this.column.getColDef().dndSourceOnRowDrag;
31693 dragEvent.dataTransfer.setDragImage(this.eCell, 0, 0);
31694 // default behaviour is to convert data to json and set into drag component
31695 var defaultOnRowDrag = function () {
31696 try {
31697 var jsonData = JSON.stringify(_this.rowNode.data);
31698 dragEvent.dataTransfer.setData('application/json', jsonData);
31699 dragEvent.dataTransfer.setData('text/plain', jsonData);
31700 }
31701 catch (e) {
31702 // if we cannot convert the data to json, then we do not set the type
31703 }
31704 };
31705 if (providedOnRowDrag) {
31706 var params = {
31707 rowNode: this.rowNode, dragEvent: dragEvent,
31708 api: this.gridOptionsService.api,
31709 columnApi: this.gridOptionsService.columnApi,
31710 context: this.gridOptionsService.context
31711 };
31712 providedOnRowDrag(params);
31713 }
31714 else {
31715 defaultOnRowDrag();
31716 }
31717 };
31718 DndSourceComp.prototype.checkVisibility = function () {
31719 var visible = this.column.isDndSource(this.rowNode);
31720 this.setDisplayed(visible);
31721 };
31722 __decorate([
31723 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
31724 ], DndSourceComp.prototype, "postConstruct", null);
31725 return DndSourceComp;
31726}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
31727
31728
31729
31730/***/ }),
31731/* 135 */
31732/***/ (function(module, __webpack_exports__, __webpack_require__) {
31733
31734"use strict";
31735__webpack_require__.r(__webpack_exports__);
31736/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewportSizeFeature", function() { return ViewportSizeFeature; });
31737/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
31738/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
31739/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
31740/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45);
31741/**
31742 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
31743 * @version v29.2.0
31744 * @link https://www.ag-grid.com/
31745 * @license MIT
31746 */
31747var __extends = (undefined && undefined.__extends) || (function () {
31748 var extendStatics = function (d, b) {
31749 extendStatics = Object.setPrototypeOf ||
31750 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31751 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
31752 return extendStatics(d, b);
31753 };
31754 return function (d, b) {
31755 extendStatics(d, b);
31756 function __() { this.constructor = d; }
31757 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31758 };
31759})();
31760var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
31761 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
31762 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
31763 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;
31764 return c > 3 && r && Object.defineProperty(target, key, r), r;
31765};
31766
31767
31768
31769
31770// listens to changes in the center viewport size, for column and row virtualisation,
31771// and adjusts grid as necessary. there are two viewports, one for horizontal and one for
31772// vertical scrolling.
31773var ViewportSizeFeature = /** @class */ (function (_super) {
31774 __extends(ViewportSizeFeature, _super);
31775 function ViewportSizeFeature(centerContainerCtrl) {
31776 var _this = _super.call(this) || this;
31777 _this.centerContainerCtrl = centerContainerCtrl;
31778 return _this;
31779 }
31780 ViewportSizeFeature.prototype.postConstruct = function () {
31781 var _this = this;
31782 this.ctrlsService.whenReady(function () {
31783 _this.gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();
31784 _this.listenForResize();
31785 });
31786 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SCROLLBAR_WIDTH_CHANGED, this.onScrollbarWidthChanged.bind(this));
31787 };
31788 ViewportSizeFeature.prototype.listenForResize = function () {
31789 var _this = this;
31790 var listener = function () { return _this.onCenterViewportResized(); };
31791 // centerContainer gets horizontal resizes
31792 this.centerContainerCtrl.registerViewportResizeListener(listener);
31793 // eBodyViewport gets vertical resizes
31794 this.gridBodyCtrl.registerBodyViewportResizeListener(listener);
31795 };
31796 ViewportSizeFeature.prototype.onScrollbarWidthChanged = function () {
31797 this.checkViewportAndScrolls();
31798 };
31799 ViewportSizeFeature.prototype.onCenterViewportResized = function () {
31800 if (this.centerContainerCtrl.isViewportVisible()) {
31801 this.checkViewportAndScrolls();
31802 var newWidth = this.centerContainerCtrl.getCenterWidth();
31803 if (newWidth !== this.centerWidth) {
31804 this.centerWidth = newWidth;
31805 this.columnModel.refreshFlexedColumns({ viewportWidth: this.centerWidth, updateBodyWidths: true, fireResizedEvent: true });
31806 }
31807 }
31808 else {
31809 this.bodyHeight = 0;
31810 }
31811 };
31812 // gets called every time the viewport size changes. we use this to check visibility of scrollbars
31813 // in the grid panel, and also to check size and position of viewport for row and column virtualisation.
31814 ViewportSizeFeature.prototype.checkViewportAndScrolls = function () {
31815 // results in updating anything that depends on scroll showing
31816 this.updateScrollVisibleService();
31817 // fires event if height changes, used by PaginationService, HeightScalerService, RowRenderer
31818 this.checkBodyHeight();
31819 // check for virtual columns for ColumnController
31820 this.onHorizontalViewportChanged();
31821 this.gridBodyCtrl.getScrollFeature().checkScrollLeft();
31822 };
31823 ViewportSizeFeature.prototype.getBodyHeight = function () {
31824 return this.bodyHeight;
31825 };
31826 ViewportSizeFeature.prototype.checkBodyHeight = function () {
31827 var eBodyViewport = this.gridBodyCtrl.getBodyViewportElement();
31828 var bodyHeight = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["getInnerHeight"])(eBodyViewport);
31829 if (this.bodyHeight !== bodyHeight) {
31830 this.bodyHeight = bodyHeight;
31831 var event_1 = {
31832 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_BODY_HEIGHT_CHANGED
31833 };
31834 this.eventService.dispatchEvent(event_1);
31835 }
31836 };
31837 ViewportSizeFeature.prototype.updateScrollVisibleService = function () {
31838 // because of column animation (which takes 200ms), we have to do this twice.
31839 // eg if user removes cols anywhere except at the RHS, then the cols on the RHS
31840 // will animate to the left to fill the gap. this animation means just after
31841 // the cols are removed, the remaining cols are still in the original location
31842 // at the start of the animation, so pre animation the H scrollbar is still needed,
31843 // but post animation it is not.
31844 this.updateScrollVisibleServiceImpl();
31845 setTimeout(this.updateScrollVisibleServiceImpl.bind(this), 500);
31846 };
31847 ViewportSizeFeature.prototype.updateScrollVisibleServiceImpl = function () {
31848 var params = {
31849 horizontalScrollShowing: this.isHorizontalScrollShowing(),
31850 verticalScrollShowing: this.gridBodyCtrl.isVerticalScrollShowing()
31851 };
31852 this.scrollVisibleService.setScrollsVisible(params);
31853 // fix - gridComp should just listen to event from above
31854 this.gridBodyCtrl.setVerticalScrollPaddingVisible(params.verticalScrollShowing);
31855 };
31856 ViewportSizeFeature.prototype.isHorizontalScrollShowing = function () {
31857 var isAlwaysShowHorizontalScroll = this.gridOptionsService.is('alwaysShowHorizontalScroll');
31858 return isAlwaysShowHorizontalScroll || this.centerContainerCtrl.isViewportHScrollShowing();
31859 };
31860 // this gets called whenever a change in the viewport, so we can inform column controller it has to work
31861 // out the virtual columns again. gets called from following locations:
31862 // + ensureColVisible, scroll, init, layoutChanged, displayedColumnsChanged
31863 ViewportSizeFeature.prototype.onHorizontalViewportChanged = function () {
31864 var scrollWidth = this.centerContainerCtrl.getCenterWidth();
31865 var scrollPosition = this.centerContainerCtrl.getViewportScrollLeft();
31866 this.columnModel.setViewportPosition(scrollWidth, scrollPosition);
31867 };
31868 __decorate([
31869 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
31870 ], ViewportSizeFeature.prototype, "ctrlsService", void 0);
31871 __decorate([
31872 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
31873 ], ViewportSizeFeature.prototype, "columnModel", void 0);
31874 __decorate([
31875 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('scrollVisibleService')
31876 ], ViewportSizeFeature.prototype, "scrollVisibleService", void 0);
31877 __decorate([
31878 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
31879 ], ViewportSizeFeature.prototype, "postConstruct", null);
31880 return ViewportSizeFeature;
31881}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
31882
31883
31884
31885/***/ }),
31886/* 136 */
31887/***/ (function(module, __webpack_exports__, __webpack_require__) {
31888
31889"use strict";
31890__webpack_require__.r(__webpack_exports__);
31891/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetPinnedLeftWidthFeature", function() { return SetPinnedLeftWidthFeature; });
31892/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
31893/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
31894/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26);
31895/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45);
31896/**
31897 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
31898 * @version v29.2.0
31899 * @link https://www.ag-grid.com/
31900 * @license MIT
31901 */
31902var __extends = (undefined && undefined.__extends) || (function () {
31903 var extendStatics = function (d, b) {
31904 extendStatics = Object.setPrototypeOf ||
31905 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31906 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
31907 return extendStatics(d, b);
31908 };
31909 return function (d, b) {
31910 extendStatics(d, b);
31911 function __() { this.constructor = d; }
31912 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31913 };
31914})();
31915var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
31916 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
31917 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
31918 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;
31919 return c > 3 && r && Object.defineProperty(target, key, r), r;
31920};
31921
31922
31923
31924
31925var SetPinnedLeftWidthFeature = /** @class */ (function (_super) {
31926 __extends(SetPinnedLeftWidthFeature, _super);
31927 function SetPinnedLeftWidthFeature(element) {
31928 var _this = _super.call(this) || this;
31929 _this.element = element;
31930 return _this;
31931 }
31932 SetPinnedLeftWidthFeature.prototype.postConstruct = function () {
31933 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_LEFT_PINNED_WIDTH_CHANGED, this.onPinnedLeftWidthChanged.bind(this));
31934 };
31935 SetPinnedLeftWidthFeature.prototype.onPinnedLeftWidthChanged = function () {
31936 var leftWidth = this.pinnedWidthService.getPinnedLeftWidth();
31937 var displayed = leftWidth > 0;
31938 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setDisplayed"])(this.element, displayed);
31939 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setFixedWidth"])(this.element, leftWidth);
31940 };
31941 SetPinnedLeftWidthFeature.prototype.getWidth = function () {
31942 return this.pinnedWidthService.getPinnedLeftWidth();
31943 };
31944 __decorate([
31945 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('pinnedWidthService')
31946 ], SetPinnedLeftWidthFeature.prototype, "pinnedWidthService", void 0);
31947 __decorate([
31948 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
31949 ], SetPinnedLeftWidthFeature.prototype, "postConstruct", null);
31950 return SetPinnedLeftWidthFeature;
31951}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
31952
31953
31954
31955/***/ }),
31956/* 137 */
31957/***/ (function(module, __webpack_exports__, __webpack_require__) {
31958
31959"use strict";
31960__webpack_require__.r(__webpack_exports__);
31961/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetPinnedRightWidthFeature", function() { return SetPinnedRightWidthFeature; });
31962/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
31963/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26);
31964/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
31965/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
31966/**
31967 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
31968 * @version v29.2.0
31969 * @link https://www.ag-grid.com/
31970 * @license MIT
31971 */
31972var __extends = (undefined && undefined.__extends) || (function () {
31973 var extendStatics = function (d, b) {
31974 extendStatics = Object.setPrototypeOf ||
31975 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31976 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
31977 return extendStatics(d, b);
31978 };
31979 return function (d, b) {
31980 extendStatics(d, b);
31981 function __() { this.constructor = d; }
31982 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31983 };
31984})();
31985var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
31986 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
31987 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
31988 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;
31989 return c > 3 && r && Object.defineProperty(target, key, r), r;
31990};
31991
31992
31993
31994
31995var SetPinnedRightWidthFeature = /** @class */ (function (_super) {
31996 __extends(SetPinnedRightWidthFeature, _super);
31997 function SetPinnedRightWidthFeature(element) {
31998 var _this = _super.call(this) || this;
31999 _this.element = element;
32000 return _this;
32001 }
32002 SetPinnedRightWidthFeature.prototype.postConstruct = function () {
32003 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_RIGHT_PINNED_WIDTH_CHANGED, this.onPinnedRightWidthChanged.bind(this));
32004 };
32005 SetPinnedRightWidthFeature.prototype.onPinnedRightWidthChanged = function () {
32006 var rightWidth = this.pinnedWidthService.getPinnedRightWidth();
32007 var displayed = rightWidth > 0;
32008 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(this.element, displayed);
32009 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedWidth"])(this.element, rightWidth);
32010 };
32011 SetPinnedRightWidthFeature.prototype.getWidth = function () {
32012 return this.pinnedWidthService.getPinnedRightWidth();
32013 };
32014 __decorate([
32015 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedWidthService')
32016 ], SetPinnedRightWidthFeature.prototype, "pinnedWidthService", void 0);
32017 __decorate([
32018 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
32019 ], SetPinnedRightWidthFeature.prototype, "postConstruct", null);
32020 return SetPinnedRightWidthFeature;
32021}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
32022
32023
32024
32025/***/ }),
32026/* 138 */
32027/***/ (function(module, __webpack_exports__, __webpack_require__) {
32028
32029"use strict";
32030__webpack_require__.r(__webpack_exports__);
32031/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetHeightFeature", function() { return SetHeightFeature; });
32032/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
32033/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
32034/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26);
32035/**
32036 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32037 * @version v29.2.0
32038 * @link https://www.ag-grid.com/
32039 * @license MIT
32040 */
32041var __extends = (undefined && undefined.__extends) || (function () {
32042 var extendStatics = function (d, b) {
32043 extendStatics = Object.setPrototypeOf ||
32044 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32045 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
32046 return extendStatics(d, b);
32047 };
32048 return function (d, b) {
32049 extendStatics(d, b);
32050 function __() { this.constructor = d; }
32051 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32052 };
32053})();
32054var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32055 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32056 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32057 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;
32058 return c > 3 && r && Object.defineProperty(target, key, r), r;
32059};
32060
32061
32062
32063var SetHeightFeature = /** @class */ (function (_super) {
32064 __extends(SetHeightFeature, _super);
32065 function SetHeightFeature(eContainer, eWrapper) {
32066 var _this = _super.call(this) || this;
32067 _this.eContainer = eContainer;
32068 _this.eWrapper = eWrapper;
32069 return _this;
32070 }
32071 SetHeightFeature.prototype.postConstruct = function () {
32072 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_CONTAINER_HEIGHT_CHANGED, this.onHeightChanged.bind(this));
32073 };
32074 SetHeightFeature.prototype.onHeightChanged = function () {
32075 var height = this.maxDivHeightScaler.getUiContainerHeight();
32076 var heightString = height != null ? height + "px" : "";
32077 this.eContainer.style.height = heightString;
32078 if (this.eWrapper) {
32079 this.eWrapper.style.height = heightString;
32080 }
32081 };
32082 __decorate([
32083 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])("rowContainerHeightService")
32084 ], SetHeightFeature.prototype, "maxDivHeightScaler", void 0);
32085 __decorate([
32086 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
32087 ], SetHeightFeature.prototype, "postConstruct", null);
32088 return SetHeightFeature;
32089}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
32090
32091
32092
32093/***/ }),
32094/* 139 */
32095/***/ (function(module, __webpack_exports__, __webpack_require__) {
32096
32097"use strict";
32098__webpack_require__.r(__webpack_exports__);
32099/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragListenerFeature", function() { return DragListenerFeature; });
32100/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
32101/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
32102/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
32103/**
32104 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32105 * @version v29.2.0
32106 * @link https://www.ag-grid.com/
32107 * @license MIT
32108 */
32109var __extends = (undefined && undefined.__extends) || (function () {
32110 var extendStatics = function (d, b) {
32111 extendStatics = Object.setPrototypeOf ||
32112 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32113 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
32114 return extendStatics(d, b);
32115 };
32116 return function (d, b) {
32117 extendStatics(d, b);
32118 function __() { this.constructor = d; }
32119 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32120 };
32121})();
32122var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32123 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32124 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32125 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;
32126 return c > 3 && r && Object.defineProperty(target, key, r), r;
32127};
32128
32129
32130
32131var DragListenerFeature = /** @class */ (function (_super) {
32132 __extends(DragListenerFeature, _super);
32133 function DragListenerFeature(eContainer) {
32134 var _this = _super.call(this) || this;
32135 _this.eContainer = eContainer;
32136 return _this;
32137 }
32138 DragListenerFeature.prototype.postConstruct = function () {
32139 var _this = this;
32140 if (!this.gridOptionsService.isEnableRangeSelection() || // no range selection if no property
32141 Object(_utils_generic__WEBPACK_IMPORTED_MODULE_1__["missing"])(this.rangeService) // no range selection if not enterprise version
32142 ) {
32143 return;
32144 }
32145 var params = {
32146 eElement: this.eContainer,
32147 onDragStart: this.rangeService.onDragStart.bind(this.rangeService),
32148 onDragStop: this.rangeService.onDragStop.bind(this.rangeService),
32149 onDragging: this.rangeService.onDragging.bind(this.rangeService)
32150 };
32151 this.dragService.addDragSource(params);
32152 this.addDestroyFunc(function () { return _this.dragService.removeDragSource(params); });
32153 };
32154 __decorate([
32155 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Optional"])('rangeService')
32156 ], DragListenerFeature.prototype, "rangeService", void 0);
32157 __decorate([
32158 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('dragService')
32159 ], DragListenerFeature.prototype, "dragService", void 0);
32160 __decorate([
32161 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
32162 ], DragListenerFeature.prototype, "postConstruct", null);
32163 return DragListenerFeature;
32164}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
32165
32166
32167
32168/***/ }),
32169/* 140 */
32170/***/ (function(module, __webpack_exports__, __webpack_require__) {
32171
32172"use strict";
32173__webpack_require__.r(__webpack_exports__);
32174/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CenterWidthFeature", function() { return CenterWidthFeature; });
32175/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
32176/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
32177/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26);
32178/**
32179 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32180 * @version v29.2.0
32181 * @link https://www.ag-grid.com/
32182 * @license MIT
32183 */
32184var __extends = (undefined && undefined.__extends) || (function () {
32185 var extendStatics = function (d, b) {
32186 extendStatics = Object.setPrototypeOf ||
32187 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32188 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
32189 return extendStatics(d, b);
32190 };
32191 return function (d, b) {
32192 extendStatics(d, b);
32193 function __() { this.constructor = d; }
32194 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32195 };
32196})();
32197var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32198 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32199 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32200 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;
32201 return c > 3 && r && Object.defineProperty(target, key, r), r;
32202};
32203
32204
32205
32206var CenterWidthFeature = /** @class */ (function (_super) {
32207 __extends(CenterWidthFeature, _super);
32208 function CenterWidthFeature(callback) {
32209 var _this = _super.call(this) || this;
32210 _this.callback = callback;
32211 return _this;
32212 }
32213 CenterWidthFeature.prototype.postConstruct = function () {
32214 var listener = this.setWidth.bind(this);
32215 this.addManagedPropertyListener('domLayout', listener);
32216 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, listener);
32217 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, listener);
32218 this.setWidth();
32219 };
32220 CenterWidthFeature.prototype.setWidth = function () {
32221 var columnModel = this.columnModel;
32222 var printLayout = this.gridOptionsService.isDomLayout('print');
32223 var centerWidth = columnModel.getBodyContainerWidth();
32224 var leftWidth = columnModel.getDisplayedColumnsLeftWidth();
32225 var rightWidth = columnModel.getDisplayedColumnsRightWidth();
32226 var totalWidth = printLayout ? centerWidth + leftWidth + rightWidth : centerWidth;
32227 this.callback(totalWidth);
32228 };
32229 __decorate([
32230 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
32231 ], CenterWidthFeature.prototype, "columnModel", void 0);
32232 __decorate([
32233 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
32234 ], CenterWidthFeature.prototype, "postConstruct", null);
32235 return CenterWidthFeature;
32236}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
32237
32238
32239
32240/***/ }),
32241/* 141 */
32242/***/ (function(module, __webpack_exports__, __webpack_require__) {
32243
32244"use strict";
32245__webpack_require__.r(__webpack_exports__);
32246/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollVisibleService", function() { return ScrollVisibleService; });
32247/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
32248/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
32249/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
32250/**
32251 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32252 * @version v29.2.0
32253 * @link https://www.ag-grid.com/
32254 * @license MIT
32255 */
32256var __extends = (undefined && undefined.__extends) || (function () {
32257 var extendStatics = function (d, b) {
32258 extendStatics = Object.setPrototypeOf ||
32259 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32260 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
32261 return extendStatics(d, b);
32262 };
32263 return function (d, b) {
32264 extendStatics(d, b);
32265 function __() { this.constructor = d; }
32266 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32267 };
32268})();
32269var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32270 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32271 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32272 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;
32273 return c > 3 && r && Object.defineProperty(target, key, r), r;
32274};
32275
32276
32277
32278var ScrollVisibleService = /** @class */ (function (_super) {
32279 __extends(ScrollVisibleService, _super);
32280 function ScrollVisibleService() {
32281 return _super !== null && _super.apply(this, arguments) || this;
32282 }
32283 ScrollVisibleService.prototype.postConstruct = function () {
32284 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));
32285 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onDisplayedColumnsWidthChanged.bind(this));
32286 };
32287 ScrollVisibleService.prototype.onDisplayedColumnsChanged = function () {
32288 this.update();
32289 };
32290 ScrollVisibleService.prototype.onDisplayedColumnsWidthChanged = function () {
32291 this.update();
32292 };
32293 ScrollVisibleService.prototype.update = function () {
32294 // because of column animation (which takes 200ms), we have to do this twice.
32295 // eg if user removes cols anywhere except at the RHS, then the cols on the RHS
32296 // will animate to the left to fill the gap. this animation means just after
32297 // the cols are removed, the remaining cols are still in the original location
32298 // at the start of the animation, so pre animation the H scrollbar is still needed,
32299 // but post animation it is not.
32300 this.updateImpl();
32301 setTimeout(this.updateImpl.bind(this), 500);
32302 };
32303 ScrollVisibleService.prototype.updateImpl = function () {
32304 var centerRowCtrl = this.ctrlsService.getCenterRowContainerCtrl();
32305 if (!centerRowCtrl) {
32306 return;
32307 }
32308 var params = {
32309 horizontalScrollShowing: centerRowCtrl.isHorizontalScrollShowing(),
32310 verticalScrollShowing: this.isVerticalScrollShowing()
32311 };
32312 this.setScrollsVisible(params);
32313 };
32314 ScrollVisibleService.prototype.setScrollsVisible = function (params) {
32315 var atLeastOneDifferent = this.horizontalScrollShowing !== params.horizontalScrollShowing ||
32316 this.verticalScrollShowing !== params.verticalScrollShowing;
32317 if (atLeastOneDifferent) {
32318 this.horizontalScrollShowing = params.horizontalScrollShowing;
32319 this.verticalScrollShowing = params.verticalScrollShowing;
32320 var event_1 = {
32321 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED
32322 };
32323 this.eventService.dispatchEvent(event_1);
32324 }
32325 };
32326 // used by pagination service - to know page height
32327 ScrollVisibleService.prototype.isHorizontalScrollShowing = function () {
32328 return this.horizontalScrollShowing;
32329 };
32330 // used by header container
32331 ScrollVisibleService.prototype.isVerticalScrollShowing = function () {
32332 return this.verticalScrollShowing;
32333 };
32334 __decorate([
32335 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
32336 ], ScrollVisibleService.prototype, "ctrlsService", void 0);
32337 __decorate([
32338 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
32339 ], ScrollVisibleService.prototype, "postConstruct", null);
32340 ScrollVisibleService = __decorate([
32341 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('scrollVisibleService')
32342 ], ScrollVisibleService);
32343 return ScrollVisibleService;
32344}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
32345
32346
32347
32348/***/ }),
32349/* 142 */
32350/***/ (function(module, __webpack_exports__, __webpack_require__) {
32351
32352"use strict";
32353__webpack_require__.r(__webpack_exports__);
32354/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MouseEventService", function() { return MouseEventService; });
32355/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
32356/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
32357/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
32358/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
32359/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
32360/* harmony import */ var _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(125);
32361/**
32362 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32363 * @version v29.2.0
32364 * @link https://www.ag-grid.com/
32365 * @license MIT
32366 */
32367var __extends = (undefined && undefined.__extends) || (function () {
32368 var extendStatics = function (d, b) {
32369 extendStatics = Object.setPrototypeOf ||
32370 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32371 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
32372 return extendStatics(d, b);
32373 };
32374 return function (d, b) {
32375 extendStatics(d, b);
32376 function __() { this.constructor = d; }
32377 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32378 };
32379})();
32380var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32381 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32382 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32383 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;
32384 return c > 3 && r && Object.defineProperty(target, key, r), r;
32385};
32386
32387
32388
32389
32390
32391
32392
32393var MouseEventService = /** @class */ (function (_super) {
32394 __extends(MouseEventService, _super);
32395 function MouseEventService() {
32396 var _this = _super !== null && _super.apply(this, arguments) || this;
32397 _this.gridInstanceId = MouseEventService_1.gridInstanceSequence.next();
32398 return _this;
32399 }
32400 MouseEventService_1 = MouseEventService;
32401 // we put the instance id onto the main DOM element. this is used for events, when grids are inside grids,
32402 // so the grid can work out if the even came from this grid or a grid inside this one. see the ctrl+v logic
32403 // for where this is used.
32404 MouseEventService.prototype.stampTopLevelGridCompWithGridInstance = function (eGridDiv) {
32405 eGridDiv[MouseEventService_1.GRID_DOM_KEY] = this.gridInstanceId;
32406 };
32407 MouseEventService.prototype.getRenderedCellForEvent = function (event) {
32408 return Object(_utils_event__WEBPACK_IMPORTED_MODULE_3__["getCtrlForEvent"])(this.gridOptionsService, event, _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_5__["CellCtrl"].DOM_DATA_KEY_CELL_CTRL);
32409 };
32410 // walks the path of the event, and returns true if this grid is the first one that it finds. if doing
32411 // master / detail grids, and a child grid is found, then it returns false. this stops things like copy/paste
32412 // getting executed on many grids at the same time.
32413 MouseEventService.prototype.isEventFromThisGrid = function (event) {
32414 var res = this.isElementInThisGrid(event.target);
32415 return res;
32416 };
32417 MouseEventService.prototype.isElementInThisGrid = function (element) {
32418 var pointer = element;
32419 while (pointer) {
32420 var instanceId = pointer[MouseEventService_1.GRID_DOM_KEY];
32421 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(instanceId)) {
32422 var eventFromThisGrid = instanceId === this.gridInstanceId;
32423 return eventFromThisGrid;
32424 }
32425 pointer = pointer.parentElement;
32426 }
32427 return false;
32428 };
32429 MouseEventService.prototype.getCellPositionForEvent = function (event) {
32430 var cellComp = this.getRenderedCellForEvent(event);
32431 return cellComp ? cellComp.getCellPosition() : null;
32432 };
32433 MouseEventService.prototype.getNormalisedPosition = function (event) {
32434 var gridPanelHasScrolls = this.gridOptionsService.isDomLayout('normal');
32435 var e = event;
32436 var x;
32437 var y;
32438 if (e.clientX != null || e.clientY != null) {
32439 x = e.clientX;
32440 y = e.clientY;
32441 }
32442 else {
32443 x = e.x;
32444 y = e.y;
32445 }
32446 if (gridPanelHasScrolls) {
32447 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
32448 var vRange = gridBodyCon.getScrollFeature().getVScrollPosition();
32449 var hRange = gridBodyCon.getScrollFeature().getHScrollPosition();
32450 x += hRange.left;
32451 y += vRange.top;
32452 }
32453 return { x: x, y: y };
32454 };
32455 var MouseEventService_1;
32456 MouseEventService.gridInstanceSequence = new _utils__WEBPACK_IMPORTED_MODULE_1__["NumberSequence"]();
32457 MouseEventService.GRID_DOM_KEY = '__ag_grid_instance';
32458 __decorate([
32459 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
32460 ], MouseEventService.prototype, "ctrlsService", void 0);
32461 MouseEventService = MouseEventService_1 = __decorate([
32462 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('mouseEventService')
32463 ], MouseEventService);
32464 return MouseEventService;
32465}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
32466
32467
32468
32469/***/ }),
32470/* 143 */
32471/***/ (function(module, __webpack_exports__, __webpack_require__) {
32472
32473"use strict";
32474__webpack_require__.r(__webpack_exports__);
32475/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationService", function() { return NavigationService; });
32476/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
32477/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
32478/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
32479/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
32480/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48);
32481/* harmony import */ var _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(125);
32482/* harmony import */ var _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(124);
32483/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(13);
32484/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(26);
32485/**
32486 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
32487 * @version v29.2.0
32488 * @link https://www.ag-grid.com/
32489 * @license MIT
32490 */
32491var __extends = (undefined && undefined.__extends) || (function () {
32492 var extendStatics = function (d, b) {
32493 extendStatics = Object.setPrototypeOf ||
32494 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32495 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
32496 return extendStatics(d, b);
32497 };
32498 return function (d, b) {
32499 extendStatics(d, b);
32500 function __() { this.constructor = d; }
32501 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32502 };
32503})();
32504var __assign = (undefined && undefined.__assign) || function () {
32505 __assign = Object.assign || function(t) {
32506 for (var s, i = 1, n = arguments.length; i < n; i++) {
32507 s = arguments[i];
32508 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
32509 t[p] = s[p];
32510 }
32511 return t;
32512 };
32513 return __assign.apply(this, arguments);
32514};
32515var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32516 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32517 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32518 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;
32519 return c > 3 && r && Object.defineProperty(target, key, r), r;
32520};
32521
32522
32523
32524
32525
32526
32527
32528
32529
32530var NavigationService = /** @class */ (function (_super) {
32531 __extends(NavigationService, _super);
32532 function NavigationService() {
32533 var _this = _super.call(this) || this;
32534 _this.onPageDown = Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["throttle"])(_this.onPageDown, 100);
32535 _this.onPageUp = Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["throttle"])(_this.onPageUp, 100);
32536 return _this;
32537 }
32538 NavigationService.prototype.postConstruct = function () {
32539 var _this = this;
32540 this.ctrlsService.whenReady(function (p) {
32541 _this.gridBodyCon = p.gridBodyCtrl;
32542 });
32543 };
32544 NavigationService.prototype.handlePageScrollingKey = function (event) {
32545 var key = event.key;
32546 var alt = event.altKey;
32547 var ctrl = event.ctrlKey || event.metaKey;
32548 var rangeServiceShouldHandleShift = !!this.rangeService && event.shiftKey;
32549 // home and end can be processed without knowing the currently selected cell, this can occur for full width rows.
32550 var currentCell = this.mouseEventService.getCellPositionForEvent(event);
32551 var processed = false;
32552 switch (key) {
32553 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_HOME:
32554 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_END:
32555 // handle home and end when ctrl & alt are NOT pressed
32556 if (!ctrl && !alt) {
32557 this.onHomeOrEndKey(key);
32558 processed = true;
32559 }
32560 break;
32561 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].LEFT:
32562 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].RIGHT:
32563 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].UP:
32564 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].DOWN:
32565 if (!currentCell) {
32566 return false;
32567 }
32568 // handle when ctrl is pressed only, if shift is pressed
32569 // it will be handled by the rangeService
32570 if (ctrl && !alt && !rangeServiceShouldHandleShift) {
32571 this.onCtrlUpDownLeftRight(key, currentCell);
32572 processed = true;
32573 }
32574 break;
32575 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_DOWN:
32576 if (!currentCell) {
32577 return false;
32578 }
32579 // handle page up and page down when ctrl & alt are NOT pressed
32580 if (!ctrl && !alt) {
32581 this.onPageDown(currentCell);
32582 processed = true;
32583 }
32584 break;
32585 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_UP:
32586 if (!currentCell) {
32587 return false;
32588 }
32589 // handle page up and page down when ctrl & alt are NOT pressed
32590 if (!ctrl && !alt) {
32591 this.onPageUp(currentCell);
32592 processed = true;
32593 }
32594 break;
32595 }
32596 if (processed) {
32597 event.preventDefault();
32598 }
32599 return processed;
32600 };
32601 NavigationService.prototype.navigateTo = function (navigateParams) {
32602 var scrollIndex = navigateParams.scrollIndex, scrollType = navigateParams.scrollType, scrollColumn = navigateParams.scrollColumn, focusIndex = navigateParams.focusIndex, focusColumn = navigateParams.focusColumn;
32603 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(scrollColumn) && !scrollColumn.isPinned()) {
32604 this.gridBodyCon.getScrollFeature().ensureColumnVisible(scrollColumn);
32605 }
32606 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(scrollIndex)) {
32607 this.gridBodyCon.getScrollFeature().ensureIndexVisible(scrollIndex, scrollType);
32608 }
32609 // setFocusedCell relies on the browser default focus behavior to scroll the focused cell into view,
32610 // however, this behavior will cause the cell border to be cut off, or if we have sticky rows, the
32611 // cell will be completely hidden, so we call ensureIndexVisible without a position to guarantee
32612 // minimal scroll to get the row into view.
32613 if (!navigateParams.isAsync) {
32614 this.gridBodyCon.getScrollFeature().ensureIndexVisible(focusIndex);
32615 }
32616 // if we don't do this, the range will be left on the last cell, which will leave the last focused cell
32617 // highlighted.
32618 this.focusService.setFocusedCell({ rowIndex: focusIndex, column: focusColumn, rowPinned: null, forceBrowserFocus: true });
32619 if (this.rangeService) {
32620 var cellPosition = { rowIndex: focusIndex, rowPinned: null, column: focusColumn };
32621 this.rangeService.setRangeToCell(cellPosition);
32622 }
32623 };
32624 NavigationService.prototype.onPageDown = function (gridCell) {
32625 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
32626 var scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();
32627 var pixelsInOnePage = this.getViewportHeight();
32628 var pagingPixelOffset = this.paginationProxy.getPixelOffset();
32629 var currentPageBottomPixel = scrollPosition.top + pixelsInOnePage;
32630 var currentPageBottomRow = this.paginationProxy.getRowIndexAtPixel(currentPageBottomPixel + pagingPixelOffset);
32631 if (this.columnModel.isAutoRowHeightActive()) {
32632 this.navigateToNextPageWithAutoHeight(gridCell, currentPageBottomRow);
32633 }
32634 else {
32635 this.navigateToNextPage(gridCell, currentPageBottomRow);
32636 }
32637 };
32638 NavigationService.prototype.onPageUp = function (gridCell) {
32639 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
32640 var scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();
32641 var pagingPixelOffset = this.paginationProxy.getPixelOffset();
32642 var currentPageTopPixel = scrollPosition.top;
32643 var currentPageTopRow = this.paginationProxy.getRowIndexAtPixel(currentPageTopPixel + pagingPixelOffset);
32644 if (this.columnModel.isAutoRowHeightActive()) {
32645 this.navigateToNextPageWithAutoHeight(gridCell, currentPageTopRow, true);
32646 }
32647 else {
32648 this.navigateToNextPage(gridCell, currentPageTopRow, true);
32649 }
32650 };
32651 NavigationService.prototype.navigateToNextPage = function (gridCell, scrollIndex, up) {
32652 if (up === void 0) { up = false; }
32653 var pixelsInOnePage = this.getViewportHeight();
32654 var firstRow = this.paginationProxy.getPageFirstRow();
32655 var lastRow = this.paginationProxy.getPageLastRow();
32656 var pagingPixelOffset = this.paginationProxy.getPixelOffset();
32657 var currentRowNode = this.paginationProxy.getRow(gridCell.rowIndex);
32658 var rowPixelDiff = up
32659 ? ((currentRowNode === null || currentRowNode === void 0 ? void 0 : currentRowNode.rowHeight) - pixelsInOnePage - pagingPixelOffset)
32660 : (pixelsInOnePage - pagingPixelOffset);
32661 var nextCellPixel = (currentRowNode === null || currentRowNode === void 0 ? void 0 : currentRowNode.rowTop) + rowPixelDiff;
32662 var focusIndex = this.paginationProxy.getRowIndexAtPixel(nextCellPixel + pagingPixelOffset);
32663 if (focusIndex === gridCell.rowIndex) {
32664 var diff = up ? -1 : 1;
32665 scrollIndex = focusIndex = gridCell.rowIndex + diff;
32666 }
32667 var scrollType;
32668 if (up) {
32669 scrollType = 'bottom';
32670 if (focusIndex < firstRow) {
32671 focusIndex = firstRow;
32672 }
32673 if (scrollIndex < firstRow) {
32674 scrollIndex = firstRow;
32675 }
32676 }
32677 else {
32678 scrollType = 'top';
32679 if (focusIndex > lastRow) {
32680 focusIndex = lastRow;
32681 }
32682 if (scrollIndex > lastRow) {
32683 scrollIndex = lastRow;
32684 }
32685 }
32686 if (this.isRowTallerThanView(focusIndex)) {
32687 scrollIndex = focusIndex;
32688 scrollType = 'top';
32689 }
32690 this.navigateTo({
32691 scrollIndex: scrollIndex,
32692 scrollType: scrollType,
32693 scrollColumn: null,
32694 focusIndex: focusIndex,
32695 focusColumn: gridCell.column
32696 });
32697 };
32698 NavigationService.prototype.navigateToNextPageWithAutoHeight = function (gridCell, scrollIndex, up) {
32699 var _this = this;
32700 if (up === void 0) { up = false; }
32701 // because autoHeight will calculate the height of rows after scroll
32702 // first we scroll towards the required point, then we add a small
32703 // delay to allow the height to be recalculated, check which index
32704 // should be focused and then finally navigate to that index.
32705 // TODO: we should probably have an event fired once to scrollbar has
32706 // settled and all rowHeights have been calculated instead of relying
32707 // on a setTimeout of 50ms.
32708 this.navigateTo({
32709 scrollIndex: scrollIndex,
32710 scrollType: up ? 'bottom' : 'top',
32711 scrollColumn: null,
32712 focusIndex: scrollIndex,
32713 focusColumn: gridCell.column
32714 });
32715 setTimeout(function () {
32716 var focusIndex = _this.getNextFocusIndexForAutoHeight(gridCell, up);
32717 _this.navigateTo({
32718 scrollIndex: scrollIndex,
32719 scrollType: up ? 'bottom' : 'top',
32720 scrollColumn: null,
32721 focusIndex: focusIndex,
32722 focusColumn: gridCell.column,
32723 isAsync: true
32724 });
32725 }, 50);
32726 };
32727 NavigationService.prototype.getNextFocusIndexForAutoHeight = function (gridCell, up) {
32728 var _a;
32729 if (up === void 0) { up = false; }
32730 var step = up ? -1 : 1;
32731 var pixelsInOnePage = this.getViewportHeight();
32732 var lastRowIndex = this.paginationProxy.getPageLastRow();
32733 var pixelSum = 0;
32734 var currentIndex = gridCell.rowIndex;
32735 while (currentIndex >= 0 && currentIndex <= lastRowIndex) {
32736 var currentCell = this.paginationProxy.getRow(currentIndex);
32737 if (currentCell) {
32738 var currentCellHeight = (_a = currentCell.rowHeight) !== null && _a !== void 0 ? _a : 0;
32739 if (pixelSum + currentCellHeight > pixelsInOnePage) {
32740 break;
32741 }
32742 pixelSum += currentCellHeight;
32743 }
32744 currentIndex += step;
32745 }
32746 return Math.max(0, Math.min(currentIndex, lastRowIndex));
32747 };
32748 NavigationService.prototype.getViewportHeight = function () {
32749 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
32750 var scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();
32751 var scrollbarWidth = this.gridOptionsService.getScrollbarWidth();
32752 var pixelsInOnePage = scrollPosition.bottom - scrollPosition.top;
32753 if (this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()) {
32754 pixelsInOnePage -= scrollbarWidth;
32755 }
32756 return pixelsInOnePage;
32757 };
32758 NavigationService.prototype.isRowTallerThanView = function (rowIndex) {
32759 var rowNode = this.paginationProxy.getRow(rowIndex);
32760 if (!rowNode) {
32761 return false;
32762 }
32763 var rowHeight = rowNode.rowHeight;
32764 if (typeof rowHeight !== 'number') {
32765 return false;
32766 }
32767 return rowHeight > this.getViewportHeight();
32768 };
32769 NavigationService.prototype.onCtrlUpDownLeftRight = function (key, gridCell) {
32770 var cellToFocus = this.cellNavigationService.getNextCellToFocus(key, gridCell, true);
32771 var rowIndex = cellToFocus.rowIndex, column = cellToFocus.column;
32772 this.navigateTo({
32773 scrollIndex: rowIndex,
32774 scrollType: null,
32775 scrollColumn: column,
32776 focusIndex: rowIndex,
32777 focusColumn: column
32778 });
32779 };
32780 // home brings focus to top left cell, end brings focus to bottom right, grid scrolled to bring
32781 // same cell into view (which means either scroll all the way up, or all the way down).
32782 NavigationService.prototype.onHomeOrEndKey = function (key) {
32783 var homeKey = key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].PAGE_HOME;
32784 var allColumns = this.columnModel.getAllDisplayedColumns();
32785 var columnToSelect = homeKey ? allColumns[0] : Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(allColumns);
32786 var scrollIndex = homeKey ? this.paginationProxy.getPageFirstRow() : this.paginationProxy.getPageLastRow();
32787 this.navigateTo({
32788 scrollIndex: scrollIndex,
32789 scrollType: null,
32790 scrollColumn: columnToSelect,
32791 focusIndex: scrollIndex,
32792 focusColumn: columnToSelect
32793 });
32794 };
32795 // result of keyboard event
32796 NavigationService.prototype.onTabKeyDown = function (previous, keyboardEvent) {
32797 var backwards = keyboardEvent.shiftKey;
32798 var movedToNextCell = this.tabToNextCellCommon(previous, backwards, keyboardEvent);
32799 if (movedToNextCell) {
32800 // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default
32801 // to the normal tabbing so user can exit the grid.
32802 keyboardEvent.preventDefault();
32803 return;
32804 }
32805 // if we didn't move to next cell, then need to tab out of the cells, ie to the header (if going
32806 // backwards)
32807 if (backwards) {
32808 var _a = previous.getRowPosition(), rowIndex = _a.rowIndex, rowPinned = _a.rowPinned;
32809 var firstRow = rowPinned ? rowIndex === 0 : rowIndex === this.paginationProxy.getPageFirstRow();
32810 if (firstRow) {
32811 keyboardEvent.preventDefault();
32812 this.focusService.focusLastHeader(keyboardEvent);
32813 }
32814 }
32815 else {
32816 // if the case it's a popup editor, the focus is on the editor and not the previous cell.
32817 // in order for the tab navigation to work, we need to focus the browser back onto the
32818 // previous cell.
32819 if (previous instanceof _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_5__["CellCtrl"]) {
32820 previous.focusCell(true);
32821 }
32822 if (this.focusService.focusNextGridCoreContainer(backwards)) {
32823 keyboardEvent.preventDefault();
32824 }
32825 }
32826 };
32827 // comes from API
32828 NavigationService.prototype.tabToNextCell = function (backwards, event) {
32829 var focusedCell = this.focusService.getFocusedCell();
32830 // if no focus, then cannot navigate
32831 if (!focusedCell) {
32832 return false;
32833 }
32834 var cellOrRow = this.getCellByPosition(focusedCell);
32835 // if cell is not rendered, means user has scrolled away from the cell
32836 // or that the focusedCell is a Full Width Row
32837 if (!cellOrRow) {
32838 cellOrRow = this.rowRenderer.getRowByPosition(focusedCell);
32839 if (!cellOrRow || !cellOrRow.isFullWidth()) {
32840 return false;
32841 }
32842 }
32843 return this.tabToNextCellCommon(cellOrRow, backwards, event);
32844 };
32845 NavigationService.prototype.tabToNextCellCommon = function (previous, backwards, event) {
32846 var editing = previous.isEditing();
32847 // if cell is not editing, there is still chance row is editing if it's Full Row Editing
32848 if (!editing && previous instanceof _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_5__["CellCtrl"]) {
32849 var cell = previous;
32850 var row = cell.getRowCtrl();
32851 if (row) {
32852 editing = row.isEditing();
32853 }
32854 }
32855 var res;
32856 if (editing) {
32857 // if we are editing, we know it's not a Full Width Row (RowComp)
32858 if (this.gridOptionsService.get('editType') === 'fullRow') {
32859 res = this.moveToNextEditingRow(previous, backwards, event);
32860 }
32861 else {
32862 res = this.moveToNextEditingCell(previous, backwards, event);
32863 }
32864 }
32865 else {
32866 res = this.moveToNextCellNotEditing(previous, backwards);
32867 }
32868 // if a cell wasn't found, it's possible that focus was moved to the header
32869 return res || !!this.focusService.getFocusedHeader();
32870 };
32871 NavigationService.prototype.moveToNextEditingCell = function (previousCell, backwards, event) {
32872 if (event === void 0) { event = null; }
32873 var previousPos = previousCell.getCellPosition();
32874 // before we stop editing, we need to focus the cell element
32875 // so the grid doesn't detect that focus has left the grid
32876 previousCell.getGui().focus();
32877 // need to do this before getting next cell to edit, in case the next cell
32878 // has editable function (eg colDef.editable=func() ) and it depends on the
32879 // result of this cell, so need to save updates from the first edit, in case
32880 // the value is referenced in the function.
32881 previousCell.stopEditing();
32882 // find the next cell to start editing
32883 var nextCell = this.findNextCellToFocusOn(previousPos, backwards, true);
32884 if (nextCell == null) {
32885 return false;
32886 }
32887 // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default
32888 // to the normal tabbing so user can exit the grid.
32889 nextCell.startEditing(null, null, true, event);
32890 nextCell.focusCell(false);
32891 return true;
32892 };
32893 NavigationService.prototype.moveToNextEditingRow = function (previousCell, backwards, event) {
32894 if (event === void 0) { event = null; }
32895 var previousPos = previousCell.getCellPosition();
32896 // find the next cell to start editing
32897 var nextCell = this.findNextCellToFocusOn(previousPos, backwards, true);
32898 if (nextCell == null) {
32899 return false;
32900 }
32901 var nextPos = nextCell.getCellPosition();
32902 var previousEditable = this.isCellEditable(previousPos);
32903 var nextEditable = this.isCellEditable(nextPos);
32904 var rowsMatch = nextPos && previousPos.rowIndex === nextPos.rowIndex && previousPos.rowPinned === nextPos.rowPinned;
32905 if (previousEditable) {
32906 previousCell.setFocusOutOnEditor();
32907 }
32908 if (!rowsMatch) {
32909 var pRow = previousCell.getRowCtrl();
32910 pRow.stopEditing();
32911 var nRow = nextCell.getRowCtrl();
32912 nRow.startRowEditing(undefined, undefined, undefined, event);
32913 }
32914 if (nextEditable) {
32915 nextCell.setFocusInOnEditor();
32916 nextCell.focusCell();
32917 }
32918 else {
32919 nextCell.focusCell(true);
32920 }
32921 return true;
32922 };
32923 NavigationService.prototype.moveToNextCellNotEditing = function (previousCell, backwards) {
32924 var displayedColumns = this.columnModel.getAllDisplayedColumns();
32925 var cellPos;
32926 if (previousCell instanceof _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_6__["RowCtrl"]) {
32927 cellPos = __assign(__assign({}, previousCell.getRowPosition()), { column: backwards ? displayedColumns[0] : Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(displayedColumns) });
32928 }
32929 else {
32930 cellPos = previousCell.getCellPosition();
32931 }
32932 // find the next cell to start editing
32933 var nextCell = this.findNextCellToFocusOn(cellPos, backwards, false);
32934 // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default
32935 // to the normal tabbing so user can exit the grid.
32936 if (nextCell instanceof _rendering_cell_cellCtrl__WEBPACK_IMPORTED_MODULE_5__["CellCtrl"]) {
32937 nextCell.focusCell(true);
32938 }
32939 else if (nextCell) {
32940 return this.tryToFocusFullWidthRow(nextCell.getRowPosition(), backwards);
32941 }
32942 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(nextCell);
32943 };
32944 // called by the cell, when tab is pressed while editing.
32945 // @return: RenderedCell when navigation successful, otherwise null
32946 NavigationService.prototype.findNextCellToFocusOn = function (previousPosition, backwards, startEditing) {
32947 var nextPosition = previousPosition;
32948 while (true) {
32949 if (previousPosition !== nextPosition) {
32950 previousPosition = nextPosition;
32951 }
32952 if (!backwards) {
32953 nextPosition = this.getLastCellOfColSpan(nextPosition);
32954 }
32955 nextPosition = this.cellNavigationService.getNextTabbedCell(nextPosition, backwards);
32956 // allow user to override what cell to go to next
32957 var userFunc = this.gridOptionsService.getCallback('tabToNextCell');
32958 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(userFunc)) {
32959 var params = {
32960 backwards: backwards,
32961 editing: startEditing,
32962 previousCellPosition: previousPosition,
32963 nextCellPosition: nextPosition ? nextPosition : null
32964 };
32965 var userCell = userFunc(params);
32966 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(userCell)) {
32967 if (userCell.floating) {
32968 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');
32969 userCell.rowPinned = userCell.floating;
32970 }
32971 nextPosition = {
32972 rowIndex: userCell.rowIndex,
32973 column: userCell.column,
32974 rowPinned: userCell.rowPinned
32975 };
32976 }
32977 else {
32978 nextPosition = null;
32979 }
32980 }
32981 // if no 'next cell', means we have got to last cell of grid, so nothing to move to,
32982 // so bottom right cell going forwards, or top left going backwards
32983 if (!nextPosition) {
32984 return null;
32985 }
32986 if (nextPosition.rowIndex < 0) {
32987 var headerLen = this.headerNavigationService.getHeaderRowCount();
32988 this.focusService.focusHeaderPosition({
32989 headerPosition: {
32990 headerRowIndex: headerLen + (nextPosition.rowIndex),
32991 column: nextPosition.column
32992 }
32993 });
32994 return null;
32995 }
32996 // if editing, but cell not editable, skip cell. we do this before we do all of
32997 // the 'ensure index visible' and 'flush all frames', otherwise if we are skipping
32998 // a bunch of cells (eg 10 rows) then all the work on ensuring cell visible is useless
32999 // (except for the last one) which causes grid to stall for a while.
33000 // note - for full row edit, we do focus non-editable cells, as the row stays in edit mode.
33001 var fullRowEdit = this.gridOptionsService.get('editType') === 'fullRow';
33002 if (startEditing && !fullRowEdit) {
33003 var cellIsEditable = this.isCellEditable(nextPosition);
33004 if (!cellIsEditable) {
33005 continue;
33006 }
33007 }
33008 this.ensureCellVisible(nextPosition);
33009 // we have to call this after ensureColumnVisible - otherwise it could be a virtual column
33010 // or row that is not currently in view, hence the renderedCell would not exist
33011 var nextCell = this.getCellByPosition(nextPosition);
33012 // if next cell is fullWidth row, then no rendered cell,
33013 // as fullWidth rows have no cells, so we skip it
33014 if (!nextCell) {
33015 var row = this.rowRenderer.getRowByPosition(nextPosition);
33016 if (!row || !row.isFullWidth() || startEditing) {
33017 continue;
33018 }
33019 return row;
33020 }
33021 if (nextCell.isSuppressNavigable()) {
33022 continue;
33023 }
33024 // by default, when we click a cell, it gets selected into a range, so to keep keyboard navigation
33025 // consistent, we set into range here also.
33026 if (this.rangeService) {
33027 this.rangeService.setRangeToCell(nextPosition);
33028 }
33029 // we successfully tabbed onto a grid cell, so return true
33030 return nextCell;
33031 }
33032 };
33033 NavigationService.prototype.isCellEditable = function (cell) {
33034 var rowNode = this.lookupRowNodeForCell(cell);
33035 if (rowNode) {
33036 return cell.column.isCellEditable(rowNode);
33037 }
33038 return false;
33039 };
33040 NavigationService.prototype.getCellByPosition = function (cellPosition) {
33041 var rowCtrl = this.rowRenderer.getRowByPosition(cellPosition);
33042 if (!rowCtrl) {
33043 return null;
33044 }
33045 return rowCtrl.getCellCtrl(cellPosition.column);
33046 };
33047 NavigationService.prototype.lookupRowNodeForCell = function (cell) {
33048 if (cell.rowPinned === 'top') {
33049 return this.pinnedRowModel.getPinnedTopRow(cell.rowIndex);
33050 }
33051 if (cell.rowPinned === 'bottom') {
33052 return this.pinnedRowModel.getPinnedBottomRow(cell.rowIndex);
33053 }
33054 return this.paginationProxy.getRow(cell.rowIndex);
33055 };
33056 // we use index for rows, but column object for columns, as the next column (by index) might not
33057 // be visible (header grouping) so it's not reliable, so using the column object instead.
33058 NavigationService.prototype.navigateToNextCell = function (event, key, currentCell, allowUserOverride) {
33059 // we keep searching for a next cell until we find one. this is how the group rows get skipped
33060 var nextCell = currentCell;
33061 var hitEdgeOfGrid = false;
33062 while (nextCell && (nextCell === currentCell || !this.isValidNavigateCell(nextCell))) {
33063 // if the current cell is spanning across multiple columns, we need to move
33064 // our current position to be the last cell on the right before finding the
33065 // the next target.
33066 if (this.gridOptionsService.is('enableRtl')) {
33067 if (key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].LEFT) {
33068 nextCell = this.getLastCellOfColSpan(nextCell);
33069 }
33070 }
33071 else if (key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].RIGHT) {
33072 nextCell = this.getLastCellOfColSpan(nextCell);
33073 }
33074 nextCell = this.cellNavigationService.getNextCellToFocus(key, nextCell);
33075 // eg if going down, and nextCell=undefined, means we are gone past the last row
33076 hitEdgeOfGrid = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["missing"])(nextCell);
33077 }
33078 if (hitEdgeOfGrid && event && event.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].UP) {
33079 nextCell = {
33080 rowIndex: -1,
33081 rowPinned: null,
33082 column: currentCell.column
33083 };
33084 }
33085 // allow user to override what cell to go to next. when doing normal cell navigation (with keys)
33086 // we allow this, however if processing 'enter after edit' we don't allow override
33087 if (allowUserOverride) {
33088 var userFunc = this.gridOptionsService.getCallback('navigateToNextCell');
33089 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(userFunc)) {
33090 var params = {
33091 key: key,
33092 previousCellPosition: currentCell,
33093 nextCellPosition: nextCell ? nextCell : null,
33094 event: event
33095 };
33096 var userCell = userFunc(params);
33097 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(userCell)) {
33098 if (userCell.floating) {
33099 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');
33100 userCell.rowPinned = userCell.floating;
33101 }
33102 nextCell = {
33103 rowPinned: userCell.rowPinned,
33104 rowIndex: userCell.rowIndex,
33105 column: userCell.column
33106 };
33107 }
33108 else {
33109 nextCell = null;
33110 }
33111 }
33112 }
33113 // no next cell means we have reached a grid boundary, eg left, right, top or bottom of grid
33114 if (!nextCell) {
33115 return;
33116 }
33117 if (nextCell.rowIndex < 0) {
33118 var headerLen = this.headerNavigationService.getHeaderRowCount();
33119 this.focusService.focusHeaderPosition({
33120 headerPosition: { headerRowIndex: headerLen + (nextCell.rowIndex), column: currentCell.column },
33121 event: event || undefined
33122 });
33123 return;
33124 }
33125 // in case we have col spanning we get the cellComp and use it to get the
33126 // position. This was we always focus the first cell inside the spanning.
33127 var normalisedPosition = this.getNormalisedPosition(nextCell);
33128 if (normalisedPosition) {
33129 this.focusPosition(normalisedPosition);
33130 }
33131 else {
33132 this.tryToFocusFullWidthRow(nextCell);
33133 }
33134 };
33135 NavigationService.prototype.getNormalisedPosition = function (cellPosition) {
33136 // ensureCellVisible first, to make sure cell at position is rendered.
33137 this.ensureCellVisible(cellPosition);
33138 var cellCtrl = this.getCellByPosition(cellPosition);
33139 // not guaranteed to have a cellComp when using the SSRM as blocks are loading.
33140 if (!cellCtrl) {
33141 return null;
33142 }
33143 cellPosition = cellCtrl.getCellPosition();
33144 // we call this again, as nextCell can be different to it's previous value due to Column Spanning
33145 // (ie if cursor moving from right to left, and cell is spanning columns, then nextCell was the
33146 // last column in the group, however now it's the first column in the group). if we didn't do
33147 // ensureCellVisible again, then we could only be showing the last portion (last column) of the
33148 // merged cells.
33149 this.ensureCellVisible(cellPosition);
33150 return cellPosition;
33151 };
33152 NavigationService.prototype.tryToFocusFullWidthRow = function (position, backwards) {
33153 if (backwards === void 0) { backwards = false; }
33154 var displayedColumns = this.columnModel.getAllDisplayedColumns();
33155 var rowComp = this.rowRenderer.getRowByPosition(position);
33156 if (!rowComp || !rowComp.isFullWidth()) {
33157 return false;
33158 }
33159 var currentCellFocused = this.focusService.getFocusedCell();
33160 var cellPosition = {
33161 rowIndex: position.rowIndex,
33162 rowPinned: position.rowPinned,
33163 column: position.column || (backwards ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(displayedColumns) : displayedColumns[0])
33164 };
33165 this.focusPosition(cellPosition);
33166 var fromBelow = currentCellFocused != null ? this.rowPositionUtils.before(cellPosition, currentCellFocused) : false;
33167 var focusEvent = {
33168 type: _eventKeys__WEBPACK_IMPORTED_MODULE_8__["Events"].EVENT_FULL_WIDTH_ROW_FOCUSED,
33169 rowIndex: cellPosition.rowIndex,
33170 rowPinned: cellPosition.rowPinned,
33171 column: cellPosition.column,
33172 isFullWidthCell: true,
33173 floating: cellPosition.rowPinned,
33174 fromBelow: fromBelow
33175 };
33176 this.eventService.dispatchEvent(focusEvent);
33177 return true;
33178 };
33179 NavigationService.prototype.focusPosition = function (cellPosition) {
33180 this.focusService.setFocusedCell({
33181 rowIndex: cellPosition.rowIndex,
33182 column: cellPosition.column,
33183 rowPinned: cellPosition.rowPinned,
33184 forceBrowserFocus: true
33185 });
33186 if (this.rangeService) {
33187 this.rangeService.setRangeToCell(cellPosition);
33188 }
33189 };
33190 NavigationService.prototype.isValidNavigateCell = function (cell) {
33191 var rowNode = this.rowPositionUtils.getRowNode(cell);
33192 // we do not allow focusing on detail rows and full width rows
33193 return !!rowNode;
33194 };
33195 NavigationService.prototype.getLastCellOfColSpan = function (cell) {
33196 var cellCtrl = this.getCellByPosition(cell);
33197 if (!cellCtrl) {
33198 return cell;
33199 }
33200 var colSpanningList = cellCtrl.getColSpanningList();
33201 if (colSpanningList.length === 1) {
33202 return cell;
33203 }
33204 return {
33205 rowIndex: cell.rowIndex,
33206 column: Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(colSpanningList),
33207 rowPinned: cell.rowPinned
33208 };
33209 };
33210 NavigationService.prototype.ensureCellVisible = function (gridCell) {
33211 var isGroupStickyEnabled = this.gridOptionsService.is('groupRowsSticky');
33212 var rowNode = this.rowModel.getRow(gridCell.rowIndex);
33213 // sticky rows are always visible, so the grid shouldn't scroll to focus them.
33214 var skipScrollToRow = isGroupStickyEnabled && (rowNode === null || rowNode === void 0 ? void 0 : rowNode.sticky);
33215 // this scrolls the row into view
33216 if (!skipScrollToRow && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["missing"])(gridCell.rowPinned)) {
33217 this.gridBodyCon.getScrollFeature().ensureIndexVisible(gridCell.rowIndex);
33218 }
33219 if (!gridCell.column.isPinned()) {
33220 this.gridBodyCon.getScrollFeature().ensureColumnVisible(gridCell.column);
33221 }
33222 };
33223 __decorate([
33224 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('mouseEventService')
33225 ], NavigationService.prototype, "mouseEventService", void 0);
33226 __decorate([
33227 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
33228 ], NavigationService.prototype, "paginationProxy", void 0);
33229 __decorate([
33230 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
33231 ], NavigationService.prototype, "focusService", void 0);
33232 __decorate([
33233 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('rangeService')
33234 ], NavigationService.prototype, "rangeService", void 0);
33235 __decorate([
33236 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
33237 ], NavigationService.prototype, "columnModel", void 0);
33238 __decorate([
33239 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
33240 ], NavigationService.prototype, "rowModel", void 0);
33241 __decorate([
33242 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
33243 ], NavigationService.prototype, "ctrlsService", void 0);
33244 __decorate([
33245 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
33246 ], NavigationService.prototype, "rowRenderer", void 0);
33247 __decorate([
33248 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('headerNavigationService')
33249 ], NavigationService.prototype, "headerNavigationService", void 0);
33250 __decorate([
33251 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("rowPositionUtils")
33252 ], NavigationService.prototype, "rowPositionUtils", void 0);
33253 __decorate([
33254 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("cellNavigationService")
33255 ], NavigationService.prototype, "cellNavigationService", void 0);
33256 __decorate([
33257 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("pinnedRowModel")
33258 ], NavigationService.prototype, "pinnedRowModel", void 0);
33259 __decorate([
33260 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
33261 ], NavigationService.prototype, "postConstruct", null);
33262 NavigationService = __decorate([
33263 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('navigationService')
33264 ], NavigationService);
33265 return NavigationService;
33266}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
33267
33268
33269
33270/***/ }),
33271/* 144 */
33272/***/ (function(module, __webpack_exports__, __webpack_require__) {
33273
33274"use strict";
33275__webpack_require__.r(__webpack_exports__);
33276/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerComp", function() { return RowContainerComp; });
33277/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
33278/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
33279/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
33280/* harmony import */ var _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(122);
33281/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45);
33282/* harmony import */ var _rendering_row_rowComp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(145);
33283/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(12);
33284/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(41);
33285/**
33286 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
33287 * @version v29.2.0
33288 * @link https://www.ag-grid.com/
33289 * @license MIT
33290 */
33291var __extends = (undefined && undefined.__extends) || (function () {
33292 var extendStatics = function (d, b) {
33293 extendStatics = Object.setPrototypeOf ||
33294 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33295 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
33296 return extendStatics(d, b);
33297 };
33298 return function (d, b) {
33299 extendStatics(d, b);
33300 function __() { this.constructor = d; }
33301 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33302 };
33303})();
33304var __assign = (undefined && undefined.__assign) || function () {
33305 __assign = Object.assign || function(t) {
33306 for (var s, i = 1, n = arguments.length; i < n; i++) {
33307 s = arguments[i];
33308 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
33309 t[p] = s[p];
33310 }
33311 return t;
33312 };
33313 return __assign.apply(this, arguments);
33314};
33315var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33316 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33317 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33318 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;
33319 return c > 3 && r && Object.defineProperty(target, key, r), r;
33320};
33321
33322
33323
33324
33325
33326
33327
33328
33329function templateFactory() {
33330 var name = _widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"].elementGettingCreated.getAttribute('name');
33331 var cssClasses = _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerCtrl"].getRowContainerCssClasses(name);
33332 var res;
33333 var template1 = name === _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerName"].CENTER;
33334 var template2 = name === _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerName"].TOP_CENTER
33335 || name === _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerName"].STICKY_TOP_CENTER
33336 || name === _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerName"].BOTTOM_CENTER;
33337 if (template1) {
33338 res = /* html */
33339 "<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>";
33340 }
33341 else if (template2) {
33342 res = /* html */
33343 "<div class=\"" + cssClasses.viewport + "\" ref=\"eViewport\" role=\"presentation\">\n <div class=\"" + cssClasses.container + "\" ref=\"eContainer\"></div>\n </div>";
33344 }
33345 else {
33346 res = /* html */
33347 "<div class=\"" + cssClasses.container + "\" ref=\"eContainer\"></div>";
33348 }
33349 return res;
33350}
33351var RowContainerComp = /** @class */ (function (_super) {
33352 __extends(RowContainerComp, _super);
33353 function RowContainerComp() {
33354 var _this = _super.call(this, templateFactory()) || this;
33355 _this.rowComps = {};
33356 _this.name = _widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"].elementGettingCreated.getAttribute('name');
33357 _this.type = Object(_rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["getRowContainerTypeForName"])(_this.name);
33358 return _this;
33359 }
33360 RowContainerComp.prototype.postConstruct = function () {
33361 var _this = this;
33362 var compProxy = {
33363 setViewportHeight: function (height) { return _this.eViewport.style.height = height; },
33364 setRowCtrls: function (rowCtrls) { return _this.setRowCtrls(rowCtrls); },
33365 setDomOrder: function (domOrder) {
33366 _this.domOrder = domOrder;
33367 },
33368 setContainerWidth: function (width) { return _this.eContainer.style.width = width; }
33369 };
33370 var ctrl = this.createManagedBean(new _rowContainerCtrl__WEBPACK_IMPORTED_MODULE_3__["RowContainerCtrl"](this.name));
33371 ctrl.setComp(compProxy, this.eContainer, this.eViewport, this.eWrapper);
33372 };
33373 RowContainerComp.prototype.preDestroy = function () {
33374 // destroys all row comps
33375 this.setRowCtrls([]);
33376 };
33377 RowContainerComp.prototype.setRowCtrls = function (rowCtrls) {
33378 var _this = this;
33379 var oldRows = __assign({}, this.rowComps);
33380 this.rowComps = {};
33381 this.lastPlacedElement = null;
33382 var processRow = function (rowCon) {
33383 var instanceId = rowCon.getInstanceId();
33384 var existingRowComp = oldRows[instanceId];
33385 if (existingRowComp) {
33386 _this.rowComps[instanceId] = existingRowComp;
33387 delete oldRows[instanceId];
33388 _this.ensureDomOrder(existingRowComp.getGui());
33389 }
33390 else {
33391 var rowComp = new _rendering_row_rowComp__WEBPACK_IMPORTED_MODULE_5__["RowComp"](rowCon, _this.beans, _this.type);
33392 _this.rowComps[instanceId] = rowComp;
33393 _this.appendRow(rowComp.getGui());
33394 }
33395 };
33396 rowCtrls.forEach(processRow);
33397 Object(_utils_object__WEBPACK_IMPORTED_MODULE_6__["getAllValuesInObject"])(oldRows).forEach(function (oldRowComp) {
33398 _this.eContainer.removeChild(oldRowComp.getGui());
33399 oldRowComp.destroy();
33400 });
33401 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_7__["setAriaRole"])(this.eContainer, rowCtrls.length ? "rowgroup" : "presentation");
33402 };
33403 RowContainerComp.prototype.appendRow = function (element) {
33404 if (this.domOrder) {
33405 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["insertWithDomOrder"])(this.eContainer, element, this.lastPlacedElement);
33406 }
33407 else {
33408 this.eContainer.appendChild(element);
33409 }
33410 this.lastPlacedElement = element;
33411 };
33412 RowContainerComp.prototype.ensureDomOrder = function (eRow) {
33413 if (this.domOrder) {
33414 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["ensureDomOrder"])(this.eContainer, eRow, this.lastPlacedElement);
33415 this.lastPlacedElement = eRow;
33416 }
33417 };
33418 __decorate([
33419 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('beans')
33420 ], RowContainerComp.prototype, "beans", void 0);
33421 __decorate([
33422 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eViewport')
33423 ], RowContainerComp.prototype, "eViewport", void 0);
33424 __decorate([
33425 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eContainer')
33426 ], RowContainerComp.prototype, "eContainer", void 0);
33427 __decorate([
33428 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eWrapper')
33429 ], RowContainerComp.prototype, "eWrapper", void 0);
33430 __decorate([
33431 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
33432 ], RowContainerComp.prototype, "postConstruct", null);
33433 __decorate([
33434 _context_context__WEBPACK_IMPORTED_MODULE_2__["PreDestroy"]
33435 ], RowContainerComp.prototype, "preDestroy", null);
33436 return RowContainerComp;
33437}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
33438
33439
33440
33441/***/ }),
33442/* 145 */
33443/***/ (function(module, __webpack_exports__, __webpack_require__) {
33444
33445"use strict";
33446__webpack_require__.r(__webpack_exports__);
33447/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowComp", function() { return RowComp; });
33448/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
33449/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
33450/* harmony import */ var _cell_cellComp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(146);
33451/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
33452/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41);
33453/**
33454 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
33455 * @version v29.2.0
33456 * @link https://www.ag-grid.com/
33457 * @license MIT
33458 */
33459var __extends = (undefined && undefined.__extends) || (function () {
33460 var extendStatics = function (d, b) {
33461 extendStatics = Object.setPrototypeOf ||
33462 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33463 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
33464 return extendStatics(d, b);
33465 };
33466 return function (d, b) {
33467 extendStatics(d, b);
33468 function __() { this.constructor = d; }
33469 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33470 };
33471})();
33472
33473
33474
33475
33476
33477var RowComp = /** @class */ (function (_super) {
33478 __extends(RowComp, _super);
33479 function RowComp(ctrl, beans, containerType) {
33480 var _this = _super.call(this) || this;
33481 _this.cellComps = {};
33482 _this.beans = beans;
33483 _this.rowCtrl = ctrl;
33484 _this.setTemplate(/* html */ "<div comp-id=\"" + _this.getCompId() + "\" style=\"" + _this.getInitialStyle(containerType) + "\"/>");
33485 var eGui = _this.getGui();
33486 var style = eGui.style;
33487 var compProxy = {
33488 setDomOrder: function (domOrder) { return _this.domOrder = domOrder; },
33489 setCellCtrls: function (cellCtrls) { return _this.setCellCtrls(cellCtrls); },
33490 showFullWidth: function (compDetails) { return _this.showFullWidth(compDetails); },
33491 getFullWidthCellRenderer: function () { return _this.getFullWidthCellRenderer(); },
33492 addOrRemoveCssClass: function (name, on) { return _this.addOrRemoveCssClass(name, on); },
33493 setUserStyles: function (styles) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["addStylesToElement"])(eGui, styles); },
33494 setTop: function (top) { return style.top = top; },
33495 setTransform: function (transform) { return style.transform = transform; },
33496 setRowIndex: function (rowIndex) { return eGui.setAttribute('row-index', rowIndex); },
33497 setRole: function (role) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_4__["setAriaRole"])(eGui, role); },
33498 setRowId: function (rowId) { return eGui.setAttribute('row-id', rowId); },
33499 setRowBusinessKey: function (businessKey) { return eGui.setAttribute('row-business-key', businessKey); },
33500 setTabIndex: function (tabIndex) { return eGui.setAttribute('tabindex', tabIndex.toString()); }
33501 };
33502 ctrl.setComp(compProxy, _this.getGui(), containerType);
33503 _this.addDestroyFunc(function () {
33504 ctrl.unsetComp(containerType);
33505 });
33506 return _this;
33507 }
33508 RowComp.prototype.getInitialStyle = function (containerType) {
33509 var transform = this.rowCtrl.getInitialTransform(containerType);
33510 var top = this.rowCtrl.getInitialRowTop(containerType);
33511 return transform ? "transform: " + transform : "top: " + top;
33512 };
33513 RowComp.prototype.showFullWidth = function (compDetails) {
33514 var _this = this;
33515 var callback = function (cellRenderer) {
33516 if (_this.isAlive()) {
33517 var eGui = cellRenderer.getGui();
33518 _this.getGui().appendChild(eGui);
33519 _this.rowCtrl.setupDetailRowAutoHeight(eGui);
33520 _this.setFullWidthRowComp(cellRenderer);
33521 }
33522 else {
33523 _this.beans.context.destroyBean(cellRenderer);
33524 }
33525 };
33526 // if not in cache, create new one
33527 var res = compDetails.newAgStackInstance();
33528 if (!res) {
33529 return;
33530 }
33531 res.then(callback);
33532 };
33533 RowComp.prototype.setCellCtrls = function (cellCtrls) {
33534 var _this = this;
33535 var cellsToRemove = Object.assign({}, this.cellComps);
33536 cellCtrls.forEach(function (cellCtrl) {
33537 var key = cellCtrl.getInstanceId();
33538 var existingCellComp = _this.cellComps[key];
33539 if (existingCellComp == null) {
33540 _this.newCellComp(cellCtrl);
33541 }
33542 else {
33543 cellsToRemove[key] = null;
33544 }
33545 });
33546 var cellCompsToRemove = Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["getAllValuesInObject"])(cellsToRemove)
33547 .filter(function (cellComp) { return cellComp != null; });
33548 this.destroyCells(cellCompsToRemove);
33549 this.ensureDomOrder(cellCtrls);
33550 };
33551 RowComp.prototype.ensureDomOrder = function (cellCtrls) {
33552 var _this = this;
33553 if (!this.domOrder) {
33554 return;
33555 }
33556 var elementsInOrder = [];
33557 cellCtrls.forEach(function (cellCtrl) {
33558 var cellComp = _this.cellComps[cellCtrl.getInstanceId()];
33559 if (cellComp) {
33560 elementsInOrder.push(cellComp.getGui());
33561 }
33562 });
33563 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDomChildOrder"])(this.getGui(), elementsInOrder);
33564 };
33565 RowComp.prototype.newCellComp = function (cellCtrl) {
33566 var cellComp = new _cell_cellComp__WEBPACK_IMPORTED_MODULE_2__["CellComp"](this.beans, cellCtrl, this.rowCtrl.isPrintLayout(), this.getGui(), this.rowCtrl.isEditing());
33567 this.cellComps[cellCtrl.getInstanceId()] = cellComp;
33568 this.getGui().appendChild(cellComp.getGui());
33569 };
33570 RowComp.prototype.destroy = function () {
33571 _super.prototype.destroy.call(this);
33572 this.destroyAllCells();
33573 };
33574 RowComp.prototype.destroyAllCells = function () {
33575 var cellsToDestroy = Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["getAllValuesInObject"])(this.cellComps).filter(function (cp) { return cp != null; });
33576 this.destroyCells(cellsToDestroy);
33577 };
33578 RowComp.prototype.setFullWidthRowComp = function (fullWidthRowComponent) {
33579 var _this = this;
33580 if (this.fullWidthCellRenderer) {
33581 console.error('AG Grid - should not be setting fullWidthRowComponent twice');
33582 }
33583 this.fullWidthCellRenderer = fullWidthRowComponent;
33584 this.addDestroyFunc(function () {
33585 _this.fullWidthCellRenderer = _this.beans.context.destroyBean(_this.fullWidthCellRenderer);
33586 });
33587 };
33588 RowComp.prototype.getFullWidthCellRenderer = function () {
33589 return this.fullWidthCellRenderer;
33590 };
33591 RowComp.prototype.destroyCells = function (cellComps) {
33592 var _this = this;
33593 cellComps.forEach(function (cellComp) {
33594 // could be old reference, ie removed cell
33595 if (!cellComp) {
33596 return;
33597 }
33598 // check cellComp belongs in this container
33599 var instanceId = cellComp.getCtrl().getInstanceId();
33600 if (_this.cellComps[instanceId] !== cellComp) {
33601 return;
33602 }
33603 cellComp.detach();
33604 cellComp.destroy();
33605 _this.cellComps[instanceId] = null;
33606 });
33607 };
33608 return RowComp;
33609}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
33610
33611
33612
33613/***/ }),
33614/* 146 */
33615/***/ (function(module, __webpack_exports__, __webpack_require__) {
33616
33617"use strict";
33618__webpack_require__.r(__webpack_exports__);
33619/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellComp", function() { return CellComp; });
33620/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
33621/* harmony import */ var _cellEditors_popupEditorWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(147);
33622/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41);
33623/* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31);
33624/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
33625/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45);
33626/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42);
33627/**
33628 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
33629 * @version v29.2.0
33630 * @link https://www.ag-grid.com/
33631 * @license MIT
33632 */
33633var __extends = (undefined && undefined.__extends) || (function () {
33634 var extendStatics = function (d, b) {
33635 extendStatics = Object.setPrototypeOf ||
33636 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33637 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
33638 return extendStatics(d, b);
33639 };
33640 return function (d, b) {
33641 extendStatics(d, b);
33642 function __() { this.constructor = d; }
33643 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33644 };
33645})();
33646
33647
33648
33649
33650
33651
33652
33653var CellComp = /** @class */ (function (_super) {
33654 __extends(CellComp, _super);
33655 function CellComp(beans, cellCtrl, printLayout, eRow, editingRow) {
33656 var _this = _super.call(this) || this;
33657 // every time we go into edit mode, or back again, this gets incremented.
33658 // it's the components way of dealing with the async nature of framework components,
33659 // so if a framework component takes a while to be created, we know if the object
33660 // is still relevant when creating is finished. eg we could click edit / un-edit 20
33661 // times before the first React edit component comes back - we should discard
33662 // the first 19.
33663 _this.rendererVersion = 0;
33664 _this.editorVersion = 0;
33665 _this.beans = beans;
33666 _this.column = cellCtrl.getColumn();
33667 _this.rowNode = cellCtrl.getRowNode();
33668 _this.rowCtrl = cellCtrl.getRowCtrl();
33669 _this.eRow = eRow;
33670 _this.setTemplate(/* html */ "<div comp-id=\"" + _this.getCompId() + "\"/>");
33671 var eGui = _this.getGui();
33672 _this.forceWrapper = cellCtrl.isForceWrapper();
33673 _this.refreshWrapper(false);
33674 var setAttribute = function (name, value, element) {
33675 var actualElement = element ? element : eGui;
33676 if (value != null && value != '') {
33677 actualElement.setAttribute(name, value);
33678 }
33679 else {
33680 actualElement.removeAttribute(name);
33681 }
33682 };
33683 var compProxy = {
33684 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
33685 setUserStyles: function (styles) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["addStylesToElement"])(eGui, styles); },
33686 getFocusableElement: function () { return _this.getFocusableElement(); },
33687 setTabIndex: function (tabIndex) { return setAttribute('tabindex', tabIndex.toString()); },
33688 setRole: function (role) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaRole"])(eGui, role); },
33689 setColId: function (colId) { return setAttribute('col-id', colId); },
33690 setTitle: function (title) { return setAttribute('title', title); },
33691 setIncludeSelection: function (include) { return _this.includeSelection = include; },
33692 setIncludeRowDrag: function (include) { return _this.includeRowDrag = include; },
33693 setIncludeDndSource: function (include) { return _this.includeDndSource = include; },
33694 setRenderDetails: function (compDetails, valueToDisplay, force) {
33695 return _this.setRenderDetails(compDetails, valueToDisplay, force);
33696 },
33697 setEditDetails: function (compDetails, popup, position) {
33698 return _this.setEditDetails(compDetails, popup, position);
33699 },
33700 getCellEditor: function () { return _this.cellEditor || null; },
33701 getCellRenderer: function () { return _this.cellRenderer || null; },
33702 getParentOfValue: function () { return _this.getParentOfValue(); }
33703 };
33704 _this.cellCtrl = cellCtrl;
33705 cellCtrl.setComp(compProxy, _this.getGui(), _this.eCellWrapper, printLayout, editingRow);
33706 return _this;
33707 }
33708 CellComp.prototype.getParentOfValue = function () {
33709 if (this.eCellValue) {
33710 // if not editing, and using wrapper, then value goes in eCellValue
33711 return this.eCellValue;
33712 }
33713 if (this.eCellWrapper) {
33714 // if editing, and using wrapper, value (cell editor) goes in eCellWrapper
33715 return this.eCellWrapper;
33716 }
33717 // if editing or rendering, and not using wrapper, value (or comp) is directly inside cell
33718 return this.getGui();
33719 };
33720 CellComp.prototype.setRenderDetails = function (compDetails, valueToDisplay, forceNewCellRendererInstance) {
33721 // this can happen if the users asks for the cell to refresh, but we are not showing the vale as we are editing
33722 var isInlineEditing = this.cellEditor && !this.cellEditorPopupWrapper;
33723 if (isInlineEditing) {
33724 return;
33725 }
33726 // this means firstRender will be true for one pass only, as it's initialised to undefined
33727 this.firstRender = this.firstRender == null;
33728 // if display template has changed, means any previous Cell Renderer is in the wrong location
33729 var controlWrapperChanged = this.refreshWrapper(false);
33730 this.refreshEditStyles(false);
33731 // all of these have dependencies on the eGui, so only do them after eGui is set
33732 if (compDetails) {
33733 var neverRefresh = forceNewCellRendererInstance || controlWrapperChanged;
33734 var cellRendererRefreshSuccessful = neverRefresh ? false : this.refreshCellRenderer(compDetails);
33735 if (!cellRendererRefreshSuccessful) {
33736 this.destroyRenderer();
33737 this.createCellRendererInstance(compDetails);
33738 }
33739 }
33740 else {
33741 this.destroyRenderer();
33742 this.insertValueWithoutCellRenderer(valueToDisplay);
33743 }
33744 };
33745 CellComp.prototype.setEditDetails = function (compDetails, popup, position) {
33746 if (compDetails) {
33747 this.createCellEditorInstance(compDetails, popup, position);
33748 }
33749 else {
33750 this.destroyEditor();
33751 }
33752 };
33753 CellComp.prototype.removeControls = function () {
33754 this.checkboxSelectionComp = this.beans.context.destroyBean(this.checkboxSelectionComp);
33755 this.dndSourceComp = this.beans.context.destroyBean(this.dndSourceComp);
33756 this.rowDraggingComp = this.beans.context.destroyBean(this.rowDraggingComp);
33757 };
33758 // returns true if wrapper was changed
33759 CellComp.prototype.refreshWrapper = function (editing) {
33760 var providingControls = this.includeRowDrag || this.includeDndSource || this.includeSelection;
33761 var usingWrapper = providingControls || this.forceWrapper;
33762 var putWrapperIn = usingWrapper && this.eCellWrapper == null;
33763 if (putWrapperIn) {
33764 this.eCellWrapper = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["loadTemplate"])(/* html */ "<div class=\"ag-cell-wrapper\" role=\"presentation\"></div>");
33765 this.getGui().appendChild(this.eCellWrapper);
33766 }
33767 var takeWrapperOut = !usingWrapper && this.eCellWrapper != null;
33768 if (takeWrapperOut) {
33769 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.eCellWrapper);
33770 this.eCellWrapper = undefined;
33771 }
33772 this.addOrRemoveCssClass('ag-cell-value', !usingWrapper);
33773 var usingCellValue = !editing && usingWrapper;
33774 var putCellValueIn = usingCellValue && this.eCellValue == null;
33775 if (putCellValueIn) {
33776 this.eCellValue = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["loadTemplate"])(/* html */ "<span class=\"ag-cell-value\" role=\"presentation\"></span>");
33777 this.eCellWrapper.appendChild(this.eCellValue);
33778 }
33779 var takeCellValueOut = !usingCellValue && this.eCellValue != null;
33780 if (takeCellValueOut) {
33781 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.eCellValue);
33782 this.eCellValue = undefined;
33783 }
33784 var templateChanged = putWrapperIn || takeWrapperOut || putCellValueIn || takeCellValueOut;
33785 if (templateChanged) {
33786 this.removeControls();
33787 }
33788 if (!editing) {
33789 if (providingControls) {
33790 this.addControls();
33791 }
33792 }
33793 return templateChanged;
33794 };
33795 CellComp.prototype.addControls = function () {
33796 if (this.includeRowDrag) {
33797 if (this.rowDraggingComp == null) {
33798 this.rowDraggingComp = this.cellCtrl.createRowDragComp();
33799 if (this.rowDraggingComp) {
33800 // put the checkbox in before the value
33801 this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(), this.eCellValue);
33802 }
33803 }
33804 }
33805 if (this.includeDndSource) {
33806 if (this.dndSourceComp == null) {
33807 this.dndSourceComp = this.cellCtrl.createDndSource();
33808 // put the checkbox in before the value
33809 this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(), this.eCellValue);
33810 }
33811 }
33812 if (this.includeSelection) {
33813 if (this.checkboxSelectionComp == null) {
33814 this.checkboxSelectionComp = this.cellCtrl.createSelectionCheckbox();
33815 this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(), this.eCellValue);
33816 }
33817 }
33818 };
33819 CellComp.prototype.createCellEditorInstance = function (compDetails, popup, position) {
33820 var _this = this;
33821 var versionCopy = this.editorVersion;
33822 var cellEditorPromise = compDetails.newAgStackInstance();
33823 if (!cellEditorPromise) {
33824 return;
33825 } // if empty, userComponentFactory already did a console message
33826 var params = compDetails.params;
33827 cellEditorPromise.then(function (c) { return _this.afterCellEditorCreated(versionCopy, c, params, popup, position); });
33828 // if we don't do this, and editor component is async, then there will be a period
33829 // when the component isn't present and keyboard navigation won't work - so example
33830 // of user hitting tab quickly (more quickly than renderers getting created) won't work
33831 var cellEditorAsync = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(this.cellEditor);
33832 if (cellEditorAsync && params.cellStartedEdit) {
33833 this.cellCtrl.focusCell(true);
33834 }
33835 };
33836 CellComp.prototype.insertValueWithoutCellRenderer = function (valueToDisplay) {
33837 var eParent = this.getParentOfValue();
33838 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["clearElement"])(eParent);
33839 var escapedValue = valueToDisplay != null ? Object(_utils_string__WEBPACK_IMPORTED_MODULE_3__["escapeString"])(valueToDisplay) : null;
33840 if (escapedValue != null) {
33841 eParent.innerHTML = escapedValue;
33842 }
33843 };
33844 CellComp.prototype.destroyEditorAndRenderer = function () {
33845 this.destroyRenderer();
33846 this.destroyEditor();
33847 };
33848 CellComp.prototype.destroyRenderer = function () {
33849 var context = this.beans.context;
33850 this.cellRenderer = context.destroyBean(this.cellRenderer);
33851 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.cellRendererGui);
33852 this.cellRendererGui = null;
33853 this.rendererVersion++;
33854 };
33855 CellComp.prototype.destroyEditor = function () {
33856 var context = this.beans.context;
33857 if (this.hideEditorPopup) {
33858 this.hideEditorPopup();
33859 }
33860 this.hideEditorPopup = undefined;
33861 this.cellEditor = context.destroyBean(this.cellEditor);
33862 this.cellEditorPopupWrapper = context.destroyBean(this.cellEditorPopupWrapper);
33863 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["removeFromParent"])(this.cellEditorGui);
33864 this.cellEditorGui = null;
33865 this.editorVersion++;
33866 };
33867 CellComp.prototype.refreshCellRenderer = function (compClassAndParams) {
33868 if (this.cellRenderer == null || this.cellRenderer.refresh == null) {
33869 return false;
33870 }
33871 // if different Cell Renderer configured this time (eg user is using selector, and
33872 // returns different component) then don't refresh, force recreate of Cell Renderer
33873 if (this.cellRendererClass !== compClassAndParams.componentClass) {
33874 return false;
33875 }
33876 // take any custom params off of the user
33877 var result = this.cellRenderer.refresh(compClassAndParams.params);
33878 // NOTE on undefined: previous version of the cellRenderer.refresh() interface
33879 // returned nothing, if the method existed, we assumed it refreshed. so for
33880 // backwards compatibility, we assume if method exists and returns nothing,
33881 // that it was successful.
33882 return result === true || result === undefined;
33883 };
33884 CellComp.prototype.createCellRendererInstance = function (compDetails) {
33885 var _this = this;
33886 // never use task service if animation frame service is turned off.
33887 // and lastly we never use it if doing auto-height, as the auto-height service checks the
33888 // row height directly after the cell is created, it doesn't wait around for the tasks to complete
33889 var suppressAnimationFrame = this.beans.gridOptionsService.is('suppressAnimationFrame');
33890 var useTaskService = !suppressAnimationFrame;
33891 var displayComponentVersionCopy = this.rendererVersion;
33892 var componentClass = compDetails.componentClass;
33893 var createCellRendererFunc = function () {
33894 var staleTask = _this.rendererVersion !== displayComponentVersionCopy || !_this.isAlive();
33895 if (staleTask) {
33896 return;
33897 }
33898 // this can return null in the event that the user has switched from a renderer component to nothing, for example
33899 // when using a cellRendererSelect to return a component or null depending on row data etc
33900 var componentPromise = compDetails.newAgStackInstance();
33901 var callback = _this.afterCellRendererCreated.bind(_this, displayComponentVersionCopy, componentClass);
33902 if (componentPromise) {
33903 componentPromise.then(callback);
33904 }
33905 };
33906 // we only use task service when rendering for first time, which means it is not used when doing edits.
33907 // if we changed this (always use task service) would make sense, however it would break tests, possibly
33908 // test of users.
33909 if (useTaskService && this.firstRender) {
33910 this.beans.animationFrameService.createTask(createCellRendererFunc, this.rowNode.rowIndex, 'createTasksP2');
33911 }
33912 else {
33913 createCellRendererFunc();
33914 }
33915 };
33916 CellComp.prototype.getCtrl = function () {
33917 return this.cellCtrl;
33918 };
33919 CellComp.prototype.getRowCtrl = function () {
33920 return this.rowCtrl;
33921 };
33922 CellComp.prototype.getCellRenderer = function () {
33923 return this.cellRenderer;
33924 };
33925 CellComp.prototype.getCellEditor = function () {
33926 return this.cellEditor;
33927 };
33928 CellComp.prototype.afterCellRendererCreated = function (cellRendererVersion, cellRendererClass, cellRenderer) {
33929 var staleTask = !this.isAlive() || cellRendererVersion !== this.rendererVersion;
33930 if (staleTask) {
33931 this.beans.context.destroyBean(cellRenderer);
33932 return;
33933 }
33934 this.cellRenderer = cellRenderer;
33935 this.cellRendererClass = cellRendererClass;
33936 this.cellRendererGui = this.cellRenderer.getGui();
33937 if (this.cellRendererGui != null) {
33938 var eParent = this.getParentOfValue();
33939 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["clearElement"])(eParent);
33940 eParent.appendChild(this.cellRendererGui);
33941 }
33942 };
33943 CellComp.prototype.afterCellEditorCreated = function (requestVersion, cellEditor, params, popup, position) {
33944 // if editingCell=false, means user cancelled the editor before component was ready.
33945 // if versionMismatch, then user cancelled the edit, then started the edit again, and this
33946 // is the first editor which is now stale.
33947 var staleComp = requestVersion !== this.editorVersion;
33948 if (staleComp) {
33949 this.beans.context.destroyBean(cellEditor);
33950 return;
33951 }
33952 var editingCancelledByUserComp = cellEditor.isCancelBeforeStart && cellEditor.isCancelBeforeStart();
33953 if (editingCancelledByUserComp) {
33954 this.beans.context.destroyBean(cellEditor);
33955 this.cellCtrl.stopEditing(true);
33956 return;
33957 }
33958 if (!cellEditor.getGui) {
33959 console.warn("AG Grid: cellEditor for column " + this.column.getId() + " is missing getGui() method");
33960 this.beans.context.destroyBean(cellEditor);
33961 return;
33962 }
33963 this.cellEditor = cellEditor;
33964 this.cellEditorGui = cellEditor.getGui();
33965 var cellEditorInPopup = popup || (cellEditor.isPopup !== undefined && cellEditor.isPopup());
33966 if (cellEditorInPopup) {
33967 this.addPopupCellEditor(params, position);
33968 }
33969 else {
33970 this.addInCellEditor();
33971 }
33972 this.refreshEditStyles(true, cellEditorInPopup);
33973 if (cellEditor.afterGuiAttached) {
33974 cellEditor.afterGuiAttached();
33975 }
33976 };
33977 CellComp.prototype.refreshEditStyles = function (editing, isPopup) {
33978 var _a;
33979 this.addOrRemoveCssClass('ag-cell-inline-editing', editing && !isPopup);
33980 this.addOrRemoveCssClass('ag-cell-popup-editing', editing && !!isPopup);
33981 this.addOrRemoveCssClass('ag-cell-not-inline-editing', !editing || !!isPopup);
33982 (_a = this.rowCtrl) === null || _a === void 0 ? void 0 : _a.setInlineEditingCss(editing);
33983 };
33984 CellComp.prototype.addInCellEditor = function () {
33985 var eGui = this.getGui();
33986 // if focus is inside the cell, we move focus to the cell itself
33987 // before removing it's contents, otherwise errors could be thrown.
33988 var eDocument = this.beans.gridOptionsService.getDocument();
33989 if (eGui.contains(eDocument.activeElement)) {
33990 eGui.focus();
33991 }
33992 this.destroyRenderer();
33993 this.refreshWrapper(true);
33994 this.clearParentOfValue();
33995 if (this.cellEditorGui) {
33996 var eParent = this.getParentOfValue();
33997 eParent.appendChild(this.cellEditorGui);
33998 }
33999 };
34000 CellComp.prototype.addPopupCellEditor = function (params, position) {
34001 var _this = this;
34002 if (this.beans.gridOptionsService.get('editType') === 'fullRow') {
34003 console.warn('AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both ' +
34004 '- either turn off fullRowEdit, or stop using popup editors.');
34005 }
34006 var cellEditor = this.cellEditor;
34007 // if a popup, then we wrap in a popup editor and return the popup
34008 this.cellEditorPopupWrapper = this.beans.context.createBean(new _cellEditors_popupEditorWrapper__WEBPACK_IMPORTED_MODULE_1__["PopupEditorWrapper"](params));
34009 var ePopupGui = this.cellEditorPopupWrapper.getGui();
34010 if (this.cellEditorGui) {
34011 ePopupGui.appendChild(this.cellEditorGui);
34012 }
34013 var popupService = this.beans.popupService;
34014 var useModelPopup = this.beans.gridOptionsService.is('stopEditingWhenCellsLoseFocus');
34015 // see if position provided by colDef, if not then check old way of method on cellComp
34016 var positionToUse = position != null
34017 ? position
34018 : cellEditor.getPopupPosition
34019 ? cellEditor.getPopupPosition()
34020 : 'over';
34021 var isRtl = this.beans.gridOptionsService.is('enableRtl');
34022 var positionParams = {
34023 ePopup: ePopupGui,
34024 column: this.column,
34025 rowNode: this.rowNode,
34026 type: 'popupCellEditor',
34027 eventSource: this.getGui(),
34028 position: positionToUse,
34029 alignSide: isRtl ? 'right' : 'left',
34030 keepWithinBounds: true
34031 };
34032 var positionCallback = popupService.positionPopupByComponent.bind(popupService, positionParams);
34033 var translate = this.beans.localeService.getLocaleTextFunc();
34034 var addPopupRes = popupService.addPopup({
34035 modal: useModelPopup,
34036 eChild: ePopupGui,
34037 closeOnEsc: true,
34038 closedCallback: function () { _this.cellCtrl.onPopupEditorClosed(); },
34039 anchorToElement: this.getGui(),
34040 positionCallback: positionCallback,
34041 ariaLabel: translate('ariaLabelCellEditor', 'Cell Editor')
34042 });
34043 if (addPopupRes) {
34044 this.hideEditorPopup = addPopupRes.hideFunc;
34045 }
34046 };
34047 CellComp.prototype.detach = function () {
34048 this.eRow.removeChild(this.getGui());
34049 };
34050 // if the row is also getting destroyed, then we don't need to remove from dom,
34051 // as the row will also get removed, so no need to take out the cells from the row
34052 // if the row is going (removing is an expensive operation, so only need to remove
34053 // the top part)
34054 //
34055 // note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.
34056 CellComp.prototype.destroy = function () {
34057 this.cellCtrl.stopEditing();
34058 this.destroyEditorAndRenderer();
34059 this.removeControls();
34060 _super.prototype.destroy.call(this);
34061 };
34062 CellComp.prototype.clearParentOfValue = function () {
34063 var eGui = this.getGui();
34064 // if focus is inside the cell, we move focus to the cell itself
34065 // before removing it's contents, otherwise errors could be thrown.
34066 var eDocument = this.beans.gridOptionsService.getDocument();
34067 if (eGui.contains(eDocument.activeElement) && Object(_utils_browser__WEBPACK_IMPORTED_MODULE_6__["browserSupportsPreventScroll"])()) {
34068 eGui.focus({ preventScroll: true });
34069 }
34070 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_5__["clearElement"])(this.getParentOfValue());
34071 };
34072 return CellComp;
34073}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
34074
34075
34076
34077/***/ }),
34078/* 147 */
34079/***/ (function(module, __webpack_exports__, __webpack_require__) {
34080
34081"use strict";
34082__webpack_require__.r(__webpack_exports__);
34083/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupEditorWrapper", function() { return PopupEditorWrapper; });
34084/* harmony import */ var _widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
34085/* harmony import */ var _utils_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(47);
34086/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
34087/**
34088 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
34089 * @version v29.2.0
34090 * @link https://www.ag-grid.com/
34091 * @license MIT
34092 */
34093var __extends = (undefined && undefined.__extends) || (function () {
34094 var extendStatics = function (d, b) {
34095 extendStatics = Object.setPrototypeOf ||
34096 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34097 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
34098 return extendStatics(d, b);
34099 };
34100 return function (d, b) {
34101 extendStatics(d, b);
34102 function __() { this.constructor = d; }
34103 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34104 };
34105})();
34106var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34107 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34108 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34109 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;
34110 return c > 3 && r && Object.defineProperty(target, key, r), r;
34111};
34112
34113
34114
34115var PopupEditorWrapper = /** @class */ (function (_super) {
34116 __extends(PopupEditorWrapper, _super);
34117 function PopupEditorWrapper(params) {
34118 var _this = _super.call(this, /* html */ "<div class=\"ag-popup-editor\" tabindex=\"-1\"/>") || this;
34119 _this.params = params;
34120 return _this;
34121 }
34122 PopupEditorWrapper.prototype.postConstruct = function () {
34123 this.gridOptionsService.setDomData(this.getGui(), PopupEditorWrapper.DOM_KEY_POPUP_EDITOR_WRAPPER, true);
34124 this.addKeyDownListener();
34125 };
34126 PopupEditorWrapper.prototype.addKeyDownListener = function () {
34127 var _this = this;
34128 var eGui = this.getGui();
34129 var params = this.params;
34130 var listener = function (event) {
34131 if (!Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_1__["isUserSuppressingKeyboardEvent"])(_this.gridOptionsService, event, params.node, params.column, true)) {
34132 params.onKeyDown(event);
34133 }
34134 };
34135 this.addManagedListener(eGui, 'keydown', listener);
34136 };
34137 PopupEditorWrapper.DOM_KEY_POPUP_EDITOR_WRAPPER = 'popupEditorWrapper';
34138 __decorate([
34139 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
34140 ], PopupEditorWrapper.prototype, "postConstruct", null);
34141 return PopupEditorWrapper;
34142}(_widgets_popupComponent__WEBPACK_IMPORTED_MODULE_0__["PopupComponent"]));
34143
34144
34145
34146/***/ }),
34147/* 148 */
34148/***/ (function(module, __webpack_exports__, __webpack_require__) {
34149
34150"use strict";
34151__webpack_require__.r(__webpack_exports__);
34152/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BodyDropPivotTarget", function() { return BodyDropPivotTarget; });
34153/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(100);
34154/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
34155/**
34156 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
34157 * @version v29.2.0
34158 * @link https://www.ag-grid.com/
34159 * @license MIT
34160 */
34161var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34162 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34163 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34164 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;
34165 return c > 3 && r && Object.defineProperty(target, key, r), r;
34166};
34167
34168
34169var BodyDropPivotTarget = /** @class */ (function () {
34170 function BodyDropPivotTarget(pinned) {
34171 this.columnsToAggregate = [];
34172 this.columnsToGroup = [];
34173 this.columnsToPivot = [];
34174 this.pinned = pinned;
34175 }
34176 /** Callback for when drag enters */
34177 BodyDropPivotTarget.prototype.onDragEnter = function (draggingEvent) {
34178 var _this = this;
34179 this.clearColumnsList();
34180 // in pivot mode, we don't accept any drops if functions are read only
34181 if (this.gridOptionsService.is('functionsReadOnly')) {
34182 return;
34183 }
34184 var dragColumns = draggingEvent.dragItem.columns;
34185 if (!dragColumns) {
34186 return;
34187 }
34188 dragColumns.forEach(function (column) {
34189 // we don't allow adding secondary columns
34190 if (!column.isPrimary()) {
34191 return;
34192 }
34193 if (column.isAnyFunctionActive()) {
34194 return;
34195 }
34196 if (column.isAllowValue()) {
34197 _this.columnsToAggregate.push(column);
34198 }
34199 else if (column.isAllowRowGroup()) {
34200 _this.columnsToGroup.push(column);
34201 }
34202 else if (column.isAllowPivot()) {
34203 _this.columnsToPivot.push(column);
34204 }
34205 });
34206 };
34207 BodyDropPivotTarget.prototype.getIconName = function () {
34208 var totalColumns = this.columnsToAggregate.length + this.columnsToGroup.length + this.columnsToPivot.length;
34209 if (totalColumns > 0) {
34210 return this.pinned ? _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragAndDropService"].ICON_PINNED : _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragAndDropService"].ICON_MOVE;
34211 }
34212 return null;
34213 };
34214 /** Callback for when drag leaves */
34215 BodyDropPivotTarget.prototype.onDragLeave = function (draggingEvent) {
34216 // if we are taking columns out of the center, then we remove them from the report
34217 this.clearColumnsList();
34218 };
34219 BodyDropPivotTarget.prototype.clearColumnsList = function () {
34220 this.columnsToAggregate.length = 0;
34221 this.columnsToGroup.length = 0;
34222 this.columnsToPivot.length = 0;
34223 };
34224 /** Callback for when dragging */
34225 BodyDropPivotTarget.prototype.onDragging = function (draggingEvent) {
34226 };
34227 /** Callback for when drag stops */
34228 BodyDropPivotTarget.prototype.onDragStop = function (draggingEvent) {
34229 if (this.columnsToAggregate.length > 0) {
34230 this.columnModel.addValueColumns(this.columnsToAggregate, "toolPanelDragAndDrop");
34231 }
34232 if (this.columnsToGroup.length > 0) {
34233 this.columnModel.addRowGroupColumns(this.columnsToGroup, "toolPanelDragAndDrop");
34234 }
34235 if (this.columnsToPivot.length > 0) {
34236 this.columnModel.addPivotColumns(this.columnsToPivot, "toolPanelDragAndDrop");
34237 }
34238 };
34239 __decorate([
34240 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
34241 ], BodyDropPivotTarget.prototype, "columnModel", void 0);
34242 __decorate([
34243 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptionsService')
34244 ], BodyDropPivotTarget.prototype, "gridOptionsService", void 0);
34245 return BodyDropPivotTarget;
34246}());
34247
34248
34249
34250/***/ }),
34251/* 149 */
34252/***/ (function(module, __webpack_exports__, __webpack_require__) {
34253
34254"use strict";
34255__webpack_require__.r(__webpack_exports__);
34256/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BodyDropTarget", function() { return BodyDropTarget; });
34257/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(100);
34258/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
34259/* harmony import */ var _moveColumnFeature__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(150);
34260/* harmony import */ var _bodyDropPivotTarget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(148);
34261/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17);
34262/**
34263 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
34264 * @version v29.2.0
34265 * @link https://www.ag-grid.com/
34266 * @license MIT
34267 */
34268var __extends = (undefined && undefined.__extends) || (function () {
34269 var extendStatics = function (d, b) {
34270 extendStatics = Object.setPrototypeOf ||
34271 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34272 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
34273 return extendStatics(d, b);
34274 };
34275 return function (d, b) {
34276 extendStatics(d, b);
34277 function __() { this.constructor = d; }
34278 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34279 };
34280})();
34281var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34282 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34283 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34284 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;
34285 return c > 3 && r && Object.defineProperty(target, key, r), r;
34286};
34287
34288
34289
34290
34291
34292var BodyDropTarget = /** @class */ (function (_super) {
34293 __extends(BodyDropTarget, _super);
34294 function BodyDropTarget(pinned, eContainer) {
34295 var _this = _super.call(this) || this;
34296 _this.pinned = pinned;
34297 _this.eContainer = eContainer;
34298 return _this;
34299 }
34300 BodyDropTarget.prototype.postConstruct = function () {
34301 var _this = this;
34302 this.ctrlsService.whenReady(function (p) {
34303 switch (_this.pinned) {
34304 case 'left':
34305 _this.eSecondaryContainers = [
34306 [p.gridBodyCtrl.getBodyViewportElement(), p.leftRowContainerCtrl.getContainerElement()],
34307 [p.bottomLeftRowContainerCtrl.getContainerElement()],
34308 [p.topLeftRowContainerCtrl.getContainerElement()]
34309 ];
34310 break;
34311 case 'right':
34312 _this.eSecondaryContainers = [
34313 [p.gridBodyCtrl.getBodyViewportElement(), p.rightRowContainerCtrl.getContainerElement()],
34314 [p.bottomRightRowContainerCtrl.getContainerElement()],
34315 [p.topRightRowContainerCtrl.getContainerElement()]
34316 ];
34317 break;
34318 default:
34319 _this.eSecondaryContainers = [
34320 [p.gridBodyCtrl.getBodyViewportElement(), p.centerRowContainerCtrl.getViewportElement()],
34321 [p.bottomCenterRowContainerCtrl.getViewportElement()],
34322 [p.topCenterRowContainerCtrl.getViewportElement()]
34323 ];
34324 break;
34325 }
34326 });
34327 };
34328 BodyDropTarget.prototype.isInterestedIn = function (type) {
34329 return type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragSourceType"].HeaderCell ||
34330 (type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragSourceType"].ToolPanel && this.gridOptionsService.is('allowDragFromColumnsToolPanel'));
34331 };
34332 BodyDropTarget.prototype.getSecondaryContainers = function () {
34333 return this.eSecondaryContainers;
34334 };
34335 BodyDropTarget.prototype.getContainer = function () {
34336 return this.eContainer;
34337 };
34338 BodyDropTarget.prototype.init = function () {
34339 this.moveColumnFeature = this.createManagedBean(new _moveColumnFeature__WEBPACK_IMPORTED_MODULE_2__["MoveColumnFeature"](this.pinned, this.eContainer));
34340 this.bodyDropPivotTarget = this.createManagedBean(new _bodyDropPivotTarget__WEBPACK_IMPORTED_MODULE_3__["BodyDropPivotTarget"](this.pinned));
34341 this.dragAndDropService.addDropTarget(this);
34342 };
34343 BodyDropTarget.prototype.getIconName = function () {
34344 return this.currentDropListener.getIconName();
34345 };
34346 // we want to use the bodyPivotTarget if the user is dragging columns in from the toolPanel
34347 // and we are in pivot mode, as it has to logic to set pivot/value/group on the columns when
34348 // dropped into the grid's body.
34349 BodyDropTarget.prototype.isDropColumnInPivotMode = function (draggingEvent) {
34350 // in pivot mode, then if moving a column (ie didn't come from toolpanel) then it's
34351 // a standard column move, however if it came from the toolpanel, then we are introducing
34352 // dimensions or values to the grid
34353 return this.columnModel.isPivotMode() && draggingEvent.dragSource.type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_0__["DragSourceType"].ToolPanel;
34354 };
34355 BodyDropTarget.prototype.onDragEnter = function (draggingEvent) {
34356 // we pick the drop listener depending on whether we are in pivot mode are not. if we are
34357 // in pivot mode, then dropping cols changes the row group, pivot, value stats. otherwise
34358 // we change visibility state and position.
34359 this.currentDropListener = this.isDropColumnInPivotMode(draggingEvent) ? this.bodyDropPivotTarget : this.moveColumnFeature;
34360 this.currentDropListener.onDragEnter(draggingEvent);
34361 };
34362 BodyDropTarget.prototype.onDragLeave = function (params) {
34363 this.currentDropListener.onDragLeave(params);
34364 };
34365 BodyDropTarget.prototype.onDragging = function (params) {
34366 this.currentDropListener.onDragging(params);
34367 };
34368 BodyDropTarget.prototype.onDragStop = function (params) {
34369 this.currentDropListener.onDragStop(params);
34370 };
34371 __decorate([
34372 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragAndDropService')
34373 ], BodyDropTarget.prototype, "dragAndDropService", void 0);
34374 __decorate([
34375 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
34376 ], BodyDropTarget.prototype, "columnModel", void 0);
34377 __decorate([
34378 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
34379 ], BodyDropTarget.prototype, "ctrlsService", void 0);
34380 __decorate([
34381 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
34382 ], BodyDropTarget.prototype, "postConstruct", null);
34383 __decorate([
34384 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
34385 ], BodyDropTarget.prototype, "init", null);
34386 return BodyDropTarget;
34387}(_context_beanStub__WEBPACK_IMPORTED_MODULE_4__["BeanStub"]));
34388
34389
34390
34391/***/ }),
34392/* 150 */
34393/***/ (function(module, __webpack_exports__, __webpack_require__) {
34394
34395"use strict";
34396__webpack_require__.r(__webpack_exports__);
34397/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MoveColumnFeature", function() { return MoveColumnFeature; });
34398/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
34399/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(100);
34400/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
34401/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
34402/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39);
34403/**
34404 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
34405 * @version v29.2.0
34406 * @link https://www.ag-grid.com/
34407 * @license MIT
34408 */
34409var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34410 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34411 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34412 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;
34413 return c > 3 && r && Object.defineProperty(target, key, r), r;
34414};
34415var __read = (undefined && undefined.__read) || function (o, n) {
34416 var m = typeof Symbol === "function" && o[Symbol.iterator];
34417 if (!m) return o;
34418 var i = m.call(o), r, ar = [], e;
34419 try {
34420 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
34421 }
34422 catch (error) { e = { error: error }; }
34423 finally {
34424 try {
34425 if (r && !r.done && (m = i["return"])) m.call(i);
34426 }
34427 finally { if (e) throw e.error; }
34428 }
34429 return ar;
34430};
34431
34432
34433
34434
34435
34436var MoveColumnFeature = /** @class */ (function () {
34437 function MoveColumnFeature(pinned, eContainer) {
34438 this.needToMoveLeft = false;
34439 this.needToMoveRight = false;
34440 this.lastMovedInfo = null;
34441 this.pinned = pinned;
34442 this.eContainer = eContainer;
34443 this.centerContainer = !Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(pinned);
34444 }
34445 MoveColumnFeature.prototype.init = function () {
34446 var _this = this;
34447 this.ctrlsService.whenReady(function () {
34448 _this.gridBodyCon = _this.ctrlsService.getGridBodyCtrl();
34449 });
34450 };
34451 MoveColumnFeature.prototype.getIconName = function () {
34452 return this.pinned ? _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["DragAndDropService"].ICON_PINNED : _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["DragAndDropService"].ICON_MOVE;
34453 };
34454 MoveColumnFeature.prototype.onDragEnter = function (draggingEvent) {
34455 // we do dummy drag, so make sure column appears in the right location when first placed
34456 var columns = draggingEvent.dragItem.columns;
34457 var dragCameFromToolPanel = draggingEvent.dragSource.type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["DragSourceType"].ToolPanel;
34458 if (dragCameFromToolPanel) {
34459 // the if statement doesn't work if drag leaves grid, then enters again
34460 this.setColumnsVisible(columns, true, "uiColumnDragged");
34461 }
34462 else {
34463 // restore previous state of visible columns upon re-entering. this means if the user drags
34464 // a group out, and then drags the group back in, only columns that were originally visible
34465 // will be visible again. otherwise a group with three columns (but only two visible) could
34466 // be dragged out, then when it's dragged in again, all three are visible. this stops that.
34467 var visibleState_1 = draggingEvent.dragItem.visibleState;
34468 var visibleColumns = (columns || []).filter(function (column) { return visibleState_1[column.getId()]; });
34469 this.setColumnsVisible(visibleColumns, true, "uiColumnDragged");
34470 }
34471 this.setColumnsPinned(columns, this.pinned, "uiColumnDragged");
34472 this.onDragging(draggingEvent, true, true);
34473 };
34474 MoveColumnFeature.prototype.onDragLeave = function () {
34475 this.ensureIntervalCleared();
34476 this.lastMovedInfo = null;
34477 };
34478 MoveColumnFeature.prototype.setColumnsVisible = function (columns, visible, source) {
34479 if (source === void 0) { source = "api"; }
34480 if (columns) {
34481 var allowedCols = columns.filter(function (c) { return !c.getColDef().lockVisible; });
34482 this.columnModel.setColumnsVisible(allowedCols, visible, source);
34483 }
34484 };
34485 MoveColumnFeature.prototype.setColumnsPinned = function (columns, pinned, source) {
34486 if (source === void 0) { source = "api"; }
34487 if (columns) {
34488 var allowedCols = columns.filter(function (c) { return !c.getColDef().lockPinned; });
34489 this.columnModel.setColumnsPinned(allowedCols, pinned, source);
34490 }
34491 };
34492 MoveColumnFeature.prototype.onDragStop = function () {
34493 this.onDragging(this.lastDraggingEvent, false, true, true);
34494 this.ensureIntervalCleared();
34495 this.lastMovedInfo = null;
34496 };
34497 MoveColumnFeature.prototype.normaliseX = function (x) {
34498 // flip the coordinate if doing RTL
34499 if (this.gridOptionsService.is('enableRtl')) {
34500 var clientWidth = this.eContainer.clientWidth;
34501 x = clientWidth - x;
34502 }
34503 // adjust for scroll only if centre container (the pinned containers don't scroll)
34504 if (this.centerContainer) {
34505 x += this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft();
34506 }
34507 return x;
34508 };
34509 MoveColumnFeature.prototype.checkCenterForScrolling = function (xAdjustedForScroll) {
34510 if (this.centerContainer) {
34511 // scroll if the mouse has gone outside the grid (or just outside the scrollable part if pinning)
34512 // putting in 50 buffer, so even if user gets to edge of grid, a scroll will happen
34513 var firstVisiblePixel = this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft();
34514 var lastVisiblePixel = firstVisiblePixel + this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();
34515 if (this.gridOptionsService.is('enableRtl')) {
34516 this.needToMoveRight = xAdjustedForScroll < (firstVisiblePixel + 50);
34517 this.needToMoveLeft = xAdjustedForScroll > (lastVisiblePixel - 50);
34518 }
34519 else {
34520 this.needToMoveLeft = xAdjustedForScroll < (firstVisiblePixel + 50);
34521 this.needToMoveRight = xAdjustedForScroll > (lastVisiblePixel - 50);
34522 }
34523 if (this.needToMoveLeft || this.needToMoveRight) {
34524 this.ensureIntervalStarted();
34525 }
34526 else {
34527 this.ensureIntervalCleared();
34528 }
34529 }
34530 };
34531 MoveColumnFeature.prototype.onDragging = function (draggingEvent, fromEnter, fakeEvent, finished) {
34532 var _this = this;
34533 var _a;
34534 if (draggingEvent === void 0) { draggingEvent = this.lastDraggingEvent; }
34535 if (fromEnter === void 0) { fromEnter = false; }
34536 if (fakeEvent === void 0) { fakeEvent = false; }
34537 if (finished === void 0) { finished = false; }
34538 if (finished) {
34539 if (this.lastMovedInfo) {
34540 var _b = this.lastMovedInfo, columns = _b.columns, toIndex = _b.toIndex;
34541 this.moveColumns(columns, toIndex, 'uiColumnMoved', true);
34542 }
34543 return;
34544 }
34545 this.lastDraggingEvent = draggingEvent;
34546 // if moving up or down (ie not left or right) then do nothing
34547 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["missing"])(draggingEvent.hDirection)) {
34548 return;
34549 }
34550 var mouseX = this.normaliseX(draggingEvent.x);
34551 // if the user is dragging into the panel, ie coming from the side panel into the main grid,
34552 // we don't want to scroll the grid this time, it would appear like the table is jumping
34553 // each time a column is dragged in.
34554 if (!fromEnter) {
34555 this.checkCenterForScrolling(mouseX);
34556 }
34557 var hDirection = this.normaliseDirection(draggingEvent.hDirection);
34558 var dragSourceType = draggingEvent.dragSource.type;
34559 var allMovingColumns = ((_a = draggingEvent.dragSource.getDragItem().columns) === null || _a === void 0 ? void 0 : _a.filter(function (col) {
34560 if (col.getColDef().lockPinned) {
34561 // if locked return true only if both col and container are same pin type.
34562 // double equals (==) here on purpose so that null==undefined is true (for not pinned options)
34563 return col.getPinned() == _this.pinned;
34564 }
34565 // if not pin locked, then always allowed to be in this container
34566 return true;
34567 })) || [];
34568 this.attemptMoveColumns({ dragSourceType: dragSourceType, allMovingColumns: allMovingColumns, hDirection: hDirection, mouseX: mouseX, fromEnter: fromEnter, fakeEvent: fakeEvent });
34569 };
34570 MoveColumnFeature.prototype.normaliseDirection = function (hDirection) {
34571 if (this.gridOptionsService.is('enableRtl')) {
34572 switch (hDirection) {
34573 case _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["HorizontalDirection"].Left: return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["HorizontalDirection"].Right;
34574 case _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["HorizontalDirection"].Right: return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["HorizontalDirection"].Left;
34575 default: console.error("AG Grid: Unknown direction " + hDirection);
34576 }
34577 }
34578 else {
34579 return hDirection;
34580 }
34581 };
34582 MoveColumnFeature.prototype.attemptMoveColumns = function (params) {
34583 var dragSourceType = params.dragSourceType, hDirection = params.hDirection, mouseX = params.mouseX, fromEnter = params.fromEnter, fakeEvent = params.fakeEvent;
34584 var draggingLeft = hDirection === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["HorizontalDirection"].Left;
34585 var draggingRight = hDirection === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["HorizontalDirection"].Right;
34586 var allMovingColumns = params.allMovingColumns;
34587 if (dragSourceType === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["DragSourceType"].HeaderCell) {
34588 // If the columns we're dragging are the only visible columns of their group, move the hidden ones too
34589 var newCols_1 = [];
34590 allMovingColumns.forEach(function (col) {
34591 var movingGroup = null;
34592 var parent = col.getParent();
34593 while (parent != null && parent.getDisplayedLeafColumns().length === 1) {
34594 movingGroup = parent;
34595 parent = parent.getParent();
34596 }
34597 if (movingGroup != null) {
34598 movingGroup.getLeafColumns().forEach(function (newCol) {
34599 if (!newCols_1.includes(newCol)) {
34600 newCols_1.push(newCol);
34601 }
34602 });
34603 }
34604 else if (!newCols_1.includes(col)) {
34605 newCols_1.push(col);
34606 }
34607 });
34608 allMovingColumns = newCols_1;
34609 }
34610 // it is important to sort the moving columns as they are in grid columns, as the list of moving columns
34611 // could themselves be part of 'married children' groups, which means we need to maintain the order within
34612 // the moving list.
34613 var allMovingColumnsOrdered = allMovingColumns.slice();
34614 this.columnModel.sortColumnsLikeGridColumns(allMovingColumnsOrdered);
34615 var validMoves = this.calculateValidMoves(allMovingColumnsOrdered, draggingRight, mouseX);
34616 // if cols are not adjacent, then this returns null. when moving, we constrain the direction of the move
34617 // (ie left or right) to the mouse direction. however
34618 var oldIndex = this.calculateOldIndex(allMovingColumnsOrdered);
34619 if (validMoves.length === 0) {
34620 return;
34621 }
34622 var firstValidMove = validMoves[0];
34623 // the two check below stop an error when the user grabs a group my a middle column, then
34624 // it is possible the mouse pointer is to the right of a column while been dragged left.
34625 // so we need to make sure that the mouse pointer is actually left of the left most column
34626 // if moving left, and right of the right most column if moving right
34627 // we check 'fromEnter' below so we move the column to the new spot if the mouse is coming from
34628 // outside the grid, eg if the column is moving from side panel, mouse is moving left, then we should
34629 // place the column to the RHS even if the mouse is moving left and the column is already on
34630 // the LHS. otherwise we stick to the rule described above.
34631 var constrainDirection = oldIndex !== null && !fromEnter;
34632 // don't consider 'fromEnter' when dragging header cells, otherwise group can jump to opposite direction of drag
34633 if (dragSourceType == _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["DragSourceType"].HeaderCell) {
34634 constrainDirection = oldIndex !== null;
34635 }
34636 // if the event was faked by a change in column pin state, then the original location of the column
34637 // is not reliable for dictating where the column may now be placed.
34638 if (constrainDirection && !fakeEvent) {
34639 // only allow left drag if this column is moving left
34640 if (draggingLeft && firstValidMove >= oldIndex) {
34641 return;
34642 }
34643 // only allow right drag if this column is moving right
34644 if (draggingRight && firstValidMove <= oldIndex) {
34645 return;
34646 }
34647 }
34648 // From when we find a move that passes all the rules
34649 // Remember what that move would look like in terms of displayed cols
34650 // keep going with further moves until we find a different result in displayed output
34651 // In this way potentialMoves contains all potential moves over 'hidden' columns
34652 var displayedCols = this.columnModel.getAllDisplayedColumns();
34653 var potentialMoves = [];
34654 var targetOrder = null;
34655 for (var i = 0; i < validMoves.length; i++) {
34656 var move = validMoves[i];
34657 var order = this.columnModel.getProposedColumnOrder(allMovingColumnsOrdered, move);
34658 if (!this.columnModel.doesOrderPassRules(order)) {
34659 continue;
34660 }
34661 var displayedOrder = order.filter(function (col) { return displayedCols.includes(col); });
34662 if (targetOrder === null) {
34663 targetOrder = displayedOrder;
34664 }
34665 else if (!_utils__WEBPACK_IMPORTED_MODULE_4__["_"].areEqual(displayedOrder, targetOrder)) {
34666 break; // Stop looking for potential moves if the displayed result changes from the target
34667 }
34668 var fragCount = this.groupFragCount(order);
34669 potentialMoves.push({ move: move, fragCount: fragCount });
34670 }
34671 if (potentialMoves.length === 0) {
34672 return;
34673 }
34674 // The best move is the move with least group fragmentation
34675 potentialMoves.sort(function (a, b) { return a.fragCount - b.fragCount; });
34676 this.moveColumns(allMovingColumns, potentialMoves[0].move, 'uiColumnMoved', false);
34677 };
34678 // returns the index of the first column in the list ONLY if the cols are all beside
34679 // each other. if the cols are not beside each other, then returns null
34680 MoveColumnFeature.prototype.calculateOldIndex = function (movingCols) {
34681 var gridCols = this.columnModel.getAllGridColumns();
34682 var indexes = Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["sortNumerically"])(movingCols.map(function (col) { return gridCols.indexOf(col); }));
34683 var firstIndex = indexes[0];
34684 var lastIndex = Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(indexes);
34685 var spread = lastIndex - firstIndex;
34686 var gapsExist = spread !== indexes.length - 1;
34687 return gapsExist ? null : firstIndex;
34688 };
34689 MoveColumnFeature.prototype.moveColumns = function (columns, toIndex, source, finished) {
34690 this.columnModel.moveColumns(columns, toIndex, source, finished);
34691 this.lastMovedInfo = finished ? null : { columns: columns, toIndex: toIndex };
34692 };
34693 // A measure of how fragmented in terms of groups an order of columns is
34694 MoveColumnFeature.prototype.groupFragCount = function (columns) {
34695 function parents(col) {
34696 var result = [];
34697 var parent = col.getOriginalParent();
34698 while (parent != null) {
34699 result.push(parent);
34700 parent = parent.getOriginalParent();
34701 }
34702 return result;
34703 }
34704 var count = 0;
34705 var _loop_1 = function (i) {
34706 var _a;
34707 var a = parents(columns[i]);
34708 var b = parents(columns[i + 1]);
34709 // iterate over the longest one
34710 _a = __read(a.length > b.length ? [a, b] : [b, a], 2), a = _a[0], b = _a[1];
34711 a.forEach(function (parent) {
34712 if (b.indexOf(parent) === -1) {
34713 count++; // More fragmented if other column doesn't share the parent
34714 }
34715 });
34716 };
34717 for (var i = 0; i < columns.length - 1; i++) {
34718 _loop_1(i);
34719 }
34720 return count;
34721 };
34722 MoveColumnFeature.prototype.calculateValidMoves = function (movingCols, draggingRight, mouseX) {
34723 var isMoveBlocked = this.gridOptionsService.is('suppressMovableColumns') || movingCols.some(function (col) { return col.getColDef().suppressMovable; });
34724 if (isMoveBlocked) {
34725 return [];
34726 }
34727 // this is the list of cols on the screen, so it's these we use when comparing the x mouse position
34728 var allDisplayedCols = this.columnModel.getDisplayedColumns(this.pinned);
34729 // but this list is the list of all cols, when we move a col it's the index within this list that gets used,
34730 // so the result we return has to be and index location for this list
34731 var allGridCols = this.columnModel.getAllGridColumns();
34732 var movingDisplayedCols = allDisplayedCols.filter(function (col) { return Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["includes"])(movingCols, col); });
34733 var otherDisplayedCols = allDisplayedCols.filter(function (col) { return !Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["includes"])(movingCols, col); });
34734 var otherGridCols = allGridCols.filter(function (col) { return !Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["includes"])(movingCols, col); });
34735 // work out how many DISPLAYED columns fit before the 'x' position. this gives us the displayIndex.
34736 // for example, if cols are a,b,c,d and we find a,b fit before 'x', then we want to place the moving
34737 // col between b and c (so that it is under the mouse position).
34738 var displayIndex = 0;
34739 var availableWidth = mouseX;
34740 // if we are dragging right, then the columns will be to the left of the mouse, so we also want to
34741 // include the width of the moving columns
34742 if (draggingRight) {
34743 var widthOfMovingDisplayedCols_1 = 0;
34744 movingDisplayedCols.forEach(function (col) { return widthOfMovingDisplayedCols_1 += col.getActualWidth(); });
34745 availableWidth -= widthOfMovingDisplayedCols_1;
34746 }
34747 if (availableWidth > 0) {
34748 // now count how many of the displayed columns will fit to the left
34749 for (var i = 0; i < otherDisplayedCols.length; i++) {
34750 var col = otherDisplayedCols[i];
34751 availableWidth -= col.getActualWidth();
34752 if (availableWidth < 0) {
34753 break;
34754 }
34755 displayIndex++;
34756 }
34757 // trial and error, if going right, we adjust by one, i didn't manage to quantify why, but it works
34758 if (draggingRight) {
34759 displayIndex++;
34760 }
34761 }
34762 // the display index is with respect to all the showing columns, however when we move, it's with
34763 // respect to all grid columns, so we need to translate from display index to grid index
34764 var firstValidMove;
34765 if (displayIndex > 0) {
34766 var leftColumn = otherDisplayedCols[displayIndex - 1];
34767 firstValidMove = otherGridCols.indexOf(leftColumn) + 1;
34768 }
34769 else {
34770 firstValidMove = otherGridCols.indexOf(otherDisplayedCols[0]);
34771 if (firstValidMove === -1) {
34772 firstValidMove = 0;
34773 }
34774 }
34775 var validMoves = [firstValidMove];
34776 var numberComparator = function (a, b) { return a - b; };
34777 // add in other valid moves due to hidden columns and married children. for example, a particular
34778 // move might break a group that has married children (so move isn't valid), however there could
34779 // be hidden columns (not displayed) that we could jump over to make the move valid. because
34780 // they are hidden, user doesn't see any different, however it allows moves that would otherwise
34781 // not work. for example imagine a group with 9 columns and all columns are hidden except the
34782 // middle one (so 4 hidden to left, 4 hidden to right), then when moving 'firstValidMove' will
34783 // be relative to the not-shown column, however we need to consider the move jumping over all the
34784 // hidden children. if we didn't do this, then if the group just described was at the end (RHS) of the
34785 // grid, there would be no way to put a column after it (as the grid would only consider beside the
34786 // visible column, which would fail valid move rules).
34787 if (draggingRight) {
34788 // if dragging right, then we add all the additional moves to the right. so in other words
34789 // if the next move is not valid, find the next move to the right that is valid.
34790 var pointer = firstValidMove + 1;
34791 var lastIndex = allGridCols.length - 1;
34792 while (pointer <= lastIndex) {
34793 validMoves.push(pointer);
34794 pointer++;
34795 }
34796 // adding columns here means the order is now messed up
34797 validMoves.sort(numberComparator);
34798 }
34799 else {
34800 // if dragging left we do the reverse of dragging right, we add in all the valid moves to the
34801 // left. however we also have to consider moves to the right for all hidden columns first.
34802 // (this logic is hard to reason with, it was worked out with trial and error,
34803 // more observation rather than science).
34804 // add moves to the right
34805 var pointer = firstValidMove;
34806 var lastIndex = allGridCols.length - 1;
34807 var displacedCol = allGridCols[pointer];
34808 while (pointer <= lastIndex && this.isColumnHidden(allDisplayedCols, displacedCol)) {
34809 pointer++;
34810 validMoves.push(pointer);
34811 displacedCol = allGridCols[pointer];
34812 }
34813 // add moves to the left
34814 pointer = firstValidMove - 1;
34815 var firstDisplayIndex = 0;
34816 while (pointer >= firstDisplayIndex) {
34817 validMoves.push(pointer);
34818 pointer--;
34819 }
34820 // adding columns here means the order is now messed up
34821 validMoves.sort(numberComparator).reverse();
34822 }
34823 return validMoves;
34824 };
34825 // isHidden takes into account visible=false and group=closed, ie it is not displayed
34826 MoveColumnFeature.prototype.isColumnHidden = function (displayedColumns, col) {
34827 return displayedColumns.indexOf(col) < 0;
34828 };
34829 MoveColumnFeature.prototype.ensureIntervalStarted = function () {
34830 if (!this.movingIntervalId) {
34831 this.intervalCount = 0;
34832 this.failedMoveAttempts = 0;
34833 this.movingIntervalId = window.setInterval(this.moveInterval.bind(this), 100);
34834 if (this.needToMoveLeft) {
34835 this.dragAndDropService.setGhostIcon(_dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["DragAndDropService"].ICON_LEFT, true);
34836 }
34837 else {
34838 this.dragAndDropService.setGhostIcon(_dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["DragAndDropService"].ICON_RIGHT, true);
34839 }
34840 }
34841 };
34842 MoveColumnFeature.prototype.ensureIntervalCleared = function () {
34843 if (this.movingIntervalId) {
34844 window.clearInterval(this.movingIntervalId);
34845 this.movingIntervalId = null;
34846 this.dragAndDropService.setGhostIcon(_dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["DragAndDropService"].ICON_MOVE);
34847 }
34848 };
34849 MoveColumnFeature.prototype.moveInterval = function () {
34850 // the amounts we move get bigger at each interval, so the speed accelerates, starting a bit slow
34851 // and getting faster. this is to give smoother user experience. we max at 100px to limit the speed.
34852 var pixelsToMove;
34853 this.intervalCount++;
34854 pixelsToMove = 10 + (this.intervalCount * 5);
34855 if (pixelsToMove > 100) {
34856 pixelsToMove = 100;
34857 }
34858 var pixelsMoved = null;
34859 var scrollFeature = this.gridBodyCon.getScrollFeature();
34860 if (this.needToMoveLeft) {
34861 pixelsMoved = scrollFeature.scrollHorizontally(-pixelsToMove);
34862 }
34863 else if (this.needToMoveRight) {
34864 pixelsMoved = scrollFeature.scrollHorizontally(pixelsToMove);
34865 }
34866 if (pixelsMoved !== 0) {
34867 this.onDragging(this.lastDraggingEvent);
34868 this.failedMoveAttempts = 0;
34869 }
34870 else {
34871 // we count the failed move attempts. if we fail to move 7 times, then we pin the column.
34872 // this is how we achieve pining by dragging the column to the edge of the grid.
34873 this.failedMoveAttempts++;
34874 var columns = this.lastDraggingEvent.dragItem.columns;
34875 var columnsThatCanPin = columns.filter(function (c) { return !c.getColDef().lockPinned; });
34876 if (columnsThatCanPin.length > 0) {
34877 this.dragAndDropService.setGhostIcon(_dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_1__["DragAndDropService"].ICON_PINNED);
34878 if (this.failedMoveAttempts > 7) {
34879 var pinType = this.needToMoveLeft ? 'left' : 'right';
34880 this.setColumnsPinned(columnsThatCanPin, pinType, "uiColumnDragged");
34881 this.dragAndDropService.nudge();
34882 }
34883 }
34884 }
34885 };
34886 __decorate([
34887 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
34888 ], MoveColumnFeature.prototype, "columnModel", void 0);
34889 __decorate([
34890 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('dragAndDropService')
34891 ], MoveColumnFeature.prototype, "dragAndDropService", void 0);
34892 __decorate([
34893 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridOptionsService')
34894 ], MoveColumnFeature.prototype, "gridOptionsService", void 0);
34895 __decorate([
34896 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
34897 ], MoveColumnFeature.prototype, "ctrlsService", void 0);
34898 __decorate([
34899 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
34900 ], MoveColumnFeature.prototype, "init", null);
34901 return MoveColumnFeature;
34902}());
34903
34904
34905
34906/***/ }),
34907/* 151 */
34908/***/ (function(module, __webpack_exports__, __webpack_require__) {
34909
34910"use strict";
34911__webpack_require__.r(__webpack_exports__);
34912/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CssClassApplier", function() { return CssClassApplier; });
34913/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
34914/**
34915 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
34916 * @version v29.2.0
34917 * @link https://www.ag-grid.com/
34918 * @license MIT
34919 */
34920var __read = (undefined && undefined.__read) || function (o, n) {
34921 var m = typeof Symbol === "function" && o[Symbol.iterator];
34922 if (!m) return o;
34923 var i = m.call(o), r, ar = [], e;
34924 try {
34925 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
34926 }
34927 catch (error) { e = { error: error }; }
34928 finally {
34929 try {
34930 if (r && !r.done && (m = i["return"])) m.call(i);
34931 }
34932 finally { if (e) throw e.error; }
34933 }
34934 return ar;
34935};
34936var __spread = (undefined && undefined.__spread) || function () {
34937 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
34938 return ar;
34939};
34940
34941var CssClassApplier = /** @class */ (function () {
34942 function CssClassApplier() {
34943 }
34944 CssClassApplier.getHeaderClassesFromColDef = function (abstractColDef, gridOptionsService, column, columnGroup) {
34945 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["missing"])(abstractColDef)) {
34946 return [];
34947 }
34948 return this.getColumnClassesFromCollDef(abstractColDef.headerClass, abstractColDef, gridOptionsService, column, columnGroup);
34949 };
34950 CssClassApplier.getToolPanelClassesFromColDef = function (abstractColDef, gridOptionsService, column, columnGroup) {
34951 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["missing"])(abstractColDef)) {
34952 return [];
34953 }
34954 return this.getColumnClassesFromCollDef(abstractColDef.toolPanelClass, abstractColDef, gridOptionsService, column, columnGroup);
34955 };
34956 CssClassApplier.getClassParams = function (abstractColDef, gridOptionsService, column, columnGroup) {
34957 return {
34958 // bad naming, as colDef here can be a group or a column,
34959 // however most people won't appreciate the difference,
34960 // so keeping it as colDef to avoid confusion.
34961 colDef: abstractColDef,
34962 column: column,
34963 columnGroup: columnGroup,
34964 api: gridOptionsService.api,
34965 columnApi: gridOptionsService.columnApi,
34966 context: gridOptionsService.context
34967 };
34968 };
34969 CssClassApplier.getColumnClassesFromCollDef = function (classesOrFunc, abstractColDef, gridOptionsService, column, columnGroup) {
34970 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["missing"])(classesOrFunc)) {
34971 return [];
34972 }
34973 var classToUse;
34974 if (typeof classesOrFunc === 'function') {
34975 var params = this.getClassParams(abstractColDef, gridOptionsService, column, columnGroup);
34976 classToUse = classesOrFunc(params);
34977 }
34978 else {
34979 classToUse = classesOrFunc;
34980 }
34981 if (typeof classToUse === 'string') {
34982 return [classToUse];
34983 }
34984 if (Array.isArray(classToUse)) {
34985 return __spread(classToUse);
34986 }
34987 return [];
34988 };
34989 return CssClassApplier;
34990}());
34991
34992
34993
34994/***/ }),
34995/* 152 */
34996/***/ (function(module, __webpack_exports__, __webpack_require__) {
34997
34998"use strict";
34999__webpack_require__.r(__webpack_exports__);
35000/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerComp", function() { return HeaderRowContainerComp; });
35001/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
35002/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
35003/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
35004/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38);
35005/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57);
35006/* harmony import */ var _row_headerRowComp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(153);
35007/* harmony import */ var _headerRowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(156);
35008/**
35009 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
35010 * @version v29.2.0
35011 * @link https://www.ag-grid.com/
35012 * @license MIT
35013 */
35014var __extends = (undefined && undefined.__extends) || (function () {
35015 var extendStatics = function (d, b) {
35016 extendStatics = Object.setPrototypeOf ||
35017 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
35018 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
35019 return extendStatics(d, b);
35020 };
35021 return function (d, b) {
35022 extendStatics(d, b);
35023 function __() { this.constructor = d; }
35024 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
35025 };
35026})();
35027var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
35028 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
35029 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
35030 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;
35031 return c > 3 && r && Object.defineProperty(target, key, r), r;
35032};
35033
35034
35035
35036
35037
35038
35039
35040var HeaderRowContainerComp = /** @class */ (function (_super) {
35041 __extends(HeaderRowContainerComp, _super);
35042 function HeaderRowContainerComp(pinned) {
35043 var _this = _super.call(this) || this;
35044 _this.headerRowComps = {};
35045 _this.rowCompsList = [];
35046 _this.pinned = pinned;
35047 return _this;
35048 }
35049 HeaderRowContainerComp.prototype.init = function () {
35050 var _this = this;
35051 this.selectAndSetTemplate();
35052 var compProxy = {
35053 setDisplayed: function (displayed) { return _this.setDisplayed(displayed); },
35054 setCtrls: function (ctrls) { return _this.setCtrls(ctrls); },
35055 // only gets called for center section
35056 setCenterWidth: function (width) { return _this.eCenterContainer.style.width = width; },
35057 setContainerTransform: function (transform) { return _this.eCenterContainer.style.transform = transform; },
35058 // only gets called for pinned sections
35059 setPinnedContainerWidth: function (width) {
35060 var eGui = _this.getGui();
35061 eGui.style.width = width;
35062 eGui.style.maxWidth = width;
35063 eGui.style.minWidth = width;
35064 }
35065 };
35066 var ctrl = this.createManagedBean(new _headerRowContainerCtrl__WEBPACK_IMPORTED_MODULE_6__["HeaderRowContainerCtrl"](this.pinned));
35067 ctrl.setComp(compProxy, this.getGui());
35068 };
35069 HeaderRowContainerComp.prototype.selectAndSetTemplate = function () {
35070 var pinnedLeft = this.pinned == 'left';
35071 var pinnedRight = this.pinned == 'right';
35072 var template = pinnedLeft ? HeaderRowContainerComp.PINNED_LEFT_TEMPLATE :
35073 pinnedRight ? HeaderRowContainerComp.PINNED_RIGHT_TEMPLATE : HeaderRowContainerComp.CENTER_TEMPLATE;
35074 this.setTemplate(template);
35075 // for left and right, we add rows directly to the root element,
35076 // but for center container we add elements to the child container.
35077 this.eRowContainer = this.eCenterContainer ? this.eCenterContainer : this.getGui();
35078 };
35079 HeaderRowContainerComp.prototype.destroyRowComps = function () {
35080 this.setCtrls([]);
35081 };
35082 HeaderRowContainerComp.prototype.destroyRowComp = function (rowComp) {
35083 this.destroyBean(rowComp);
35084 this.eRowContainer.removeChild(rowComp.getGui());
35085 };
35086 HeaderRowContainerComp.prototype.setCtrls = function (ctrls) {
35087 var _this = this;
35088 var oldRowComps = this.headerRowComps;
35089 this.headerRowComps = {};
35090 this.rowCompsList = [];
35091 var prevGui;
35092 var appendEnsuringDomOrder = function (rowComp) {
35093 var eGui = rowComp.getGui();
35094 var notAlreadyIn = eGui.parentElement != _this.eRowContainer;
35095 if (notAlreadyIn) {
35096 _this.eRowContainer.appendChild(eGui);
35097 }
35098 if (prevGui) {
35099 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["ensureDomOrder"])(_this.eRowContainer, eGui, prevGui);
35100 }
35101 prevGui = eGui;
35102 };
35103 ctrls.forEach(function (ctrl) {
35104 var ctrlId = ctrl.getInstanceId();
35105 var existingComp = oldRowComps[ctrlId];
35106 delete oldRowComps[ctrlId];
35107 var rowComp = existingComp ? existingComp : _this.createBean(new _row_headerRowComp__WEBPACK_IMPORTED_MODULE_5__["HeaderRowComp"](ctrl));
35108 _this.headerRowComps[ctrlId] = rowComp;
35109 _this.rowCompsList.push(rowComp);
35110 appendEnsuringDomOrder(rowComp);
35111 });
35112 Object(_utils_object__WEBPACK_IMPORTED_MODULE_2__["getAllValuesInObject"])(oldRowComps).forEach(function (c) { return _this.destroyRowComp(c); });
35113 };
35114 HeaderRowContainerComp.PINNED_LEFT_TEMPLATE = "<div class=\"ag-pinned-left-header\" role=\"presentation\"></div>";
35115 HeaderRowContainerComp.PINNED_RIGHT_TEMPLATE = "<div class=\"ag-pinned-right-header\" role=\"presentation\"></div>";
35116 HeaderRowContainerComp.CENTER_TEMPLATE = "<div class=\"ag-header-viewport\" role=\"presentation\">\n <div class=\"ag-header-container\" ref=\"eCenterContainer\" role=\"rowgroup\"></div>\n </div>";
35117 __decorate([
35118 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eCenterContainer')
35119 ], HeaderRowContainerComp.prototype, "eCenterContainer", void 0);
35120 __decorate([
35121 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
35122 ], HeaderRowContainerComp.prototype, "init", null);
35123 __decorate([
35124 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
35125 ], HeaderRowContainerComp.prototype, "destroyRowComps", null);
35126 return HeaderRowContainerComp;
35127}(_widgets_component__WEBPACK_IMPORTED_MODULE_3__["Component"]));
35128
35129
35130
35131/***/ }),
35132/* 153 */
35133/***/ (function(module, __webpack_exports__, __webpack_require__) {
35134
35135"use strict";
35136__webpack_require__.r(__webpack_exports__);
35137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRowType", function() { return HeaderRowType; });
35138/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRowComp", function() { return HeaderRowComp; });
35139/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
35140/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
35141/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
35142/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
35143/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(38);
35144/* harmony import */ var _cells_column_headerCellComp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(154);
35145/* harmony import */ var _cells_columnGroup_headerGroupCellComp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(155);
35146/* harmony import */ var _cells_floatingFilter_headerFilterCellComp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(114);
35147/**
35148 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
35149 * @version v29.2.0
35150 * @link https://www.ag-grid.com/
35151 * @license MIT
35152 */
35153var __extends = (undefined && undefined.__extends) || (function () {
35154 var extendStatics = function (d, b) {
35155 extendStatics = Object.setPrototypeOf ||
35156 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
35157 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
35158 return extendStatics(d, b);
35159 };
35160 return function (d, b) {
35161 extendStatics(d, b);
35162 function __() { this.constructor = d; }
35163 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
35164 };
35165})();
35166var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
35167 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
35168 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
35169 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;
35170 return c > 3 && r && Object.defineProperty(target, key, r), r;
35171};
35172
35173
35174
35175
35176
35177
35178
35179
35180var HeaderRowType;
35181(function (HeaderRowType) {
35182 HeaderRowType["COLUMN_GROUP"] = "group";
35183 HeaderRowType["COLUMN"] = "column";
35184 HeaderRowType["FLOATING_FILTER"] = "filter";
35185})(HeaderRowType || (HeaderRowType = {}));
35186var HeaderRowComp = /** @class */ (function (_super) {
35187 __extends(HeaderRowComp, _super);
35188 function HeaderRowComp(ctrl) {
35189 var _this = _super.call(this) || this;
35190 _this.headerComps = {};
35191 var extraClass = ctrl.getType() == HeaderRowType.COLUMN_GROUP ? "ag-header-row-column-group" :
35192 ctrl.getType() == HeaderRowType.FLOATING_FILTER ? "ag-header-row-column-filter" : "ag-header-row-column";
35193 _this.setTemplate(/* html */ "<div class=\"ag-header-row " + extraClass + "\" role=\"row\"></div>");
35194 _this.ctrl = ctrl;
35195 return _this;
35196 }
35197 //noinspection JSUnusedLocalSymbols
35198 HeaderRowComp.prototype.init = function () {
35199 var _this = this;
35200 var compProxy = {
35201 setTransform: function (transform) { return _this.getGui().style.transform = transform; },
35202 setHeight: function (height) { return _this.getGui().style.height = height; },
35203 setTop: function (top) { return _this.getGui().style.top = top; },
35204 setHeaderCtrls: function (ctrls) { return _this.setHeaderCtrls(ctrls); },
35205 setWidth: function (width) { return _this.getGui().style.width = width; },
35206 setAriaRowIndex: function (rowIndex) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_1__["setAriaRowIndex"])(_this.getGui(), rowIndex); }
35207 };
35208 this.ctrl.setComp(compProxy);
35209 };
35210 HeaderRowComp.prototype.destroyHeaderCtrls = function () {
35211 this.setHeaderCtrls([]);
35212 };
35213 HeaderRowComp.prototype.setHeaderCtrls = function (ctrls) {
35214 var _this = this;
35215 if (!this.isAlive()) {
35216 return;
35217 }
35218 var oldComps = this.headerComps;
35219 this.headerComps = {};
35220 ctrls.forEach(function (ctrl) {
35221 var id = ctrl.getInstanceId();
35222 var comp = oldComps[id];
35223 delete oldComps[id];
35224 if (comp == null) {
35225 comp = _this.createHeaderComp(ctrl);
35226 _this.getGui().appendChild(comp.getGui());
35227 }
35228 _this.headerComps[id] = comp;
35229 });
35230 Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["iterateObject"])(oldComps, function (id, comp) {
35231 _this.getGui().removeChild(comp.getGui());
35232 _this.destroyBean(comp);
35233 });
35234 var isEnsureDomOrder = this.gridOptionsService.is('ensureDomOrder');
35235 var isPrintLayout = this.gridOptionsService.isDomLayout('print');
35236 if (isEnsureDomOrder || isPrintLayout) {
35237 var comps = Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["getAllValuesInObject"])(this.headerComps);
35238 // ordering the columns by left position orders them in the order they appear on the screen
35239 comps.sort(function (a, b) {
35240 var leftA = a.getCtrl().getColumnGroupChild().getLeft();
35241 var leftB = b.getCtrl().getColumnGroupChild().getLeft();
35242 return leftA - leftB;
35243 });
35244 var elementsInOrder = comps.map(function (c) { return c.getGui(); });
35245 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDomChildOrder"])(this.getGui(), elementsInOrder);
35246 }
35247 };
35248 HeaderRowComp.prototype.createHeaderComp = function (headerCtrl) {
35249 var result;
35250 switch (this.ctrl.getType()) {
35251 case HeaderRowType.COLUMN_GROUP:
35252 result = new _cells_columnGroup_headerGroupCellComp__WEBPACK_IMPORTED_MODULE_6__["HeaderGroupCellComp"](headerCtrl);
35253 break;
35254 case HeaderRowType.FLOATING_FILTER:
35255 result = new _cells_floatingFilter_headerFilterCellComp__WEBPACK_IMPORTED_MODULE_7__["HeaderFilterCellComp"](headerCtrl);
35256 break;
35257 default:
35258 result = new _cells_column_headerCellComp__WEBPACK_IMPORTED_MODULE_5__["HeaderCellComp"](headerCtrl);
35259 break;
35260 }
35261 this.createBean(result);
35262 result.setParentComponent(this);
35263 return result;
35264 };
35265 __decorate([
35266 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
35267 ], HeaderRowComp.prototype, "init", null);
35268 __decorate([
35269 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
35270 ], HeaderRowComp.prototype, "destroyHeaderCtrls", null);
35271 return HeaderRowComp;
35272}(_widgets_component__WEBPACK_IMPORTED_MODULE_4__["Component"]));
35273
35274
35275
35276/***/ }),
35277/* 154 */
35278/***/ (function(module, __webpack_exports__, __webpack_require__) {
35279
35280"use strict";
35281__webpack_require__.r(__webpack_exports__);
35282/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderCellComp", function() { return HeaderCellComp; });
35283/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
35284/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
35285/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
35286/* harmony import */ var _abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(115);
35287/**
35288 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
35289 * @version v29.2.0
35290 * @link https://www.ag-grid.com/
35291 * @license MIT
35292 */
35293var __extends = (undefined && undefined.__extends) || (function () {
35294 var extendStatics = function (d, b) {
35295 extendStatics = Object.setPrototypeOf ||
35296 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
35297 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
35298 return extendStatics(d, b);
35299 };
35300 return function (d, b) {
35301 extendStatics(d, b);
35302 function __() { this.constructor = d; }
35303 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
35304 };
35305})();
35306var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
35307 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
35308 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
35309 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;
35310 return c > 3 && r && Object.defineProperty(target, key, r), r;
35311};
35312
35313
35314
35315
35316var HeaderCellComp = /** @class */ (function (_super) {
35317 __extends(HeaderCellComp, _super);
35318 function HeaderCellComp(ctrl) {
35319 var _this = _super.call(this, HeaderCellComp.TEMPLATE, ctrl) || this;
35320 _this.headerCompVersion = 0;
35321 _this.column = ctrl.getColumnGroupChild();
35322 _this.pinned = ctrl.getPinned();
35323 return _this;
35324 }
35325 HeaderCellComp.prototype.postConstruct = function () {
35326 var _this = this;
35327 var eGui = this.getGui();
35328 var setAttribute = function (name, value, element) {
35329 var actualElement = element ? element : eGui;
35330 if (value != null && value != '') {
35331 actualElement.setAttribute(name, value);
35332 }
35333 else {
35334 actualElement.removeAttribute(name);
35335 }
35336 };
35337 var compProxy = {
35338 setWidth: function (width) { return eGui.style.width = width; },
35339 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
35340 setColId: function (id) { return setAttribute('col-id', id); },
35341 setTitle: function (title) { return setAttribute('title', title); },
35342 setAriaDescription: function (label) { return Object(_utils_aria__WEBPACK_IMPORTED_MODULE_1__["setAriaDescription"])(eGui, label); },
35343 setAriaSort: function (sort) { return sort ? Object(_utils_aria__WEBPACK_IMPORTED_MODULE_1__["setAriaSort"])(eGui, sort) : Object(_utils_aria__WEBPACK_IMPORTED_MODULE_1__["removeAriaSort"])(eGui); },
35344 setUserCompDetails: function (compDetails) { return _this.setUserCompDetails(compDetails); },
35345 getUserCompInstance: function () { return _this.headerComp; }
35346 };
35347 this.ctrl.setComp(compProxy, this.getGui(), this.eResize, this.eHeaderCompWrapper);
35348 var selectAllGui = this.ctrl.getSelectAllGui();
35349 this.eResize.insertAdjacentElement('afterend', selectAllGui);
35350 };
35351 HeaderCellComp.prototype.destroyHeaderComp = function () {
35352 if (this.headerComp) {
35353 this.eHeaderCompWrapper.removeChild(this.headerCompGui);
35354 this.headerComp = this.destroyBean(this.headerComp);
35355 this.headerCompGui = undefined;
35356 }
35357 };
35358 HeaderCellComp.prototype.setUserCompDetails = function (compDetails) {
35359 var _this = this;
35360 this.headerCompVersion++;
35361 var versionCopy = this.headerCompVersion;
35362 compDetails.newAgStackInstance().then(function (comp) { return _this.afterCompCreated(versionCopy, comp); });
35363 };
35364 HeaderCellComp.prototype.afterCompCreated = function (version, headerComp) {
35365 if (version != this.headerCompVersion || !this.isAlive()) {
35366 this.destroyBean(headerComp);
35367 return;
35368 }
35369 this.destroyHeaderComp();
35370 this.headerComp = headerComp;
35371 this.headerCompGui = headerComp.getGui();
35372 this.eHeaderCompWrapper.appendChild(this.headerCompGui);
35373 this.ctrl.setDragSource(this.getGui());
35374 };
35375 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 ref=\"eHeaderCompWrapper\" class=\"ag-header-cell-comp-wrapper\" role=\"presentation\"></div>\n </div>";
35376 __decorate([
35377 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('eResize')
35378 ], HeaderCellComp.prototype, "eResize", void 0);
35379 __decorate([
35380 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('eHeaderCompWrapper')
35381 ], HeaderCellComp.prototype, "eHeaderCompWrapper", void 0);
35382 __decorate([
35383 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
35384 ], HeaderCellComp.prototype, "postConstruct", null);
35385 __decorate([
35386 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
35387 ], HeaderCellComp.prototype, "destroyHeaderComp", null);
35388 return HeaderCellComp;
35389}(_abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_3__["AbstractHeaderCellComp"]));
35390
35391
35392
35393/***/ }),
35394/* 155 */
35395/***/ (function(module, __webpack_exports__, __webpack_require__) {
35396
35397"use strict";
35398__webpack_require__.r(__webpack_exports__);
35399/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupCellComp", function() { return HeaderGroupCellComp; });
35400/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
35401/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
35402/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
35403/* harmony import */ var _abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(115);
35404/**
35405 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
35406 * @version v29.2.0
35407 * @link https://www.ag-grid.com/
35408 * @license MIT
35409 */
35410var __extends = (undefined && undefined.__extends) || (function () {
35411 var extendStatics = function (d, b) {
35412 extendStatics = Object.setPrototypeOf ||
35413 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
35414 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
35415 return extendStatics(d, b);
35416 };
35417 return function (d, b) {
35418 extendStatics(d, b);
35419 function __() { this.constructor = d; }
35420 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
35421 };
35422})();
35423var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
35424 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
35425 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
35426 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;
35427 return c > 3 && r && Object.defineProperty(target, key, r), r;
35428};
35429
35430
35431
35432
35433var HeaderGroupCellComp = /** @class */ (function (_super) {
35434 __extends(HeaderGroupCellComp, _super);
35435 function HeaderGroupCellComp(ctrl) {
35436 return _super.call(this, HeaderGroupCellComp.TEMPLATE, ctrl) || this;
35437 }
35438 HeaderGroupCellComp.prototype.postConstruct = function () {
35439 var _this = this;
35440 var eGui = this.getGui();
35441 var setAttribute = function (key, value) {
35442 return value != undefined ? eGui.setAttribute(key, value) : eGui.removeAttribute(key);
35443 };
35444 var compProxy = {
35445 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
35446 setResizableDisplayed: function (displayed) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["setDisplayed"])(_this.eResize, displayed); },
35447 setWidth: function (width) { return eGui.style.width = width; },
35448 setColId: function (id) { return eGui.setAttribute("col-id", id); },
35449 setAriaExpanded: function (expanded) { return setAttribute('aria-expanded', expanded); },
35450 setTitle: function (title) { return setAttribute("title", title); },
35451 setUserCompDetails: function (details) { return _this.setUserCompDetails(details); }
35452 };
35453 this.ctrl.setComp(compProxy, eGui, this.eResize);
35454 };
35455 HeaderGroupCellComp.prototype.setUserCompDetails = function (details) {
35456 var _this = this;
35457 details.newAgStackInstance().then(function (comp) { return _this.afterHeaderCompCreated(comp); });
35458 };
35459 HeaderGroupCellComp.prototype.afterHeaderCompCreated = function (headerGroupComp) {
35460 var _this = this;
35461 var destroyFunc = function () { return _this.destroyBean(headerGroupComp); };
35462 if (!this.isAlive()) {
35463 destroyFunc();
35464 return;
35465 }
35466 this.getGui().appendChild(headerGroupComp.getGui());
35467 this.addDestroyFunc(destroyFunc);
35468 this.ctrl.setDragSource(headerGroupComp.getGui());
35469 };
35470 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>";
35471 __decorate([
35472 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('userComponentFactory')
35473 ], HeaderGroupCellComp.prototype, "userComponentFactory", void 0);
35474 __decorate([
35475 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('eResize')
35476 ], HeaderGroupCellComp.prototype, "eResize", void 0);
35477 __decorate([
35478 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
35479 ], HeaderGroupCellComp.prototype, "postConstruct", null);
35480 return HeaderGroupCellComp;
35481}(_abstractCell_abstractHeaderCellComp__WEBPACK_IMPORTED_MODULE_3__["AbstractHeaderCellComp"]));
35482
35483
35484
35485/***/ }),
35486/* 156 */
35487/***/ (function(module, __webpack_exports__, __webpack_require__) {
35488
35489"use strict";
35490__webpack_require__.r(__webpack_exports__);
35491/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerCtrl", function() { return HeaderRowContainerCtrl; });
35492/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
35493/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
35494/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
35495/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
35496/* harmony import */ var _gridBodyComp_centerWidthFeature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(140);
35497/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39);
35498/* harmony import */ var _columnDrag_bodyDropTarget__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(149);
35499/* harmony import */ var _row_headerRowComp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(153);
35500/* harmony import */ var _row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(157);
35501/**
35502 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
35503 * @version v29.2.0
35504 * @link https://www.ag-grid.com/
35505 * @license MIT
35506 */
35507var __extends = (undefined && undefined.__extends) || (function () {
35508 var extendStatics = function (d, b) {
35509 extendStatics = Object.setPrototypeOf ||
35510 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
35511 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
35512 return extendStatics(d, b);
35513 };
35514 return function (d, b) {
35515 extendStatics(d, b);
35516 function __() { this.constructor = d; }
35517 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
35518 };
35519})();
35520var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
35521 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
35522 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
35523 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;
35524 return c > 3 && r && Object.defineProperty(target, key, r), r;
35525};
35526var __read = (undefined && undefined.__read) || function (o, n) {
35527 var m = typeof Symbol === "function" && o[Symbol.iterator];
35528 if (!m) return o;
35529 var i = m.call(o), r, ar = [], e;
35530 try {
35531 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
35532 }
35533 catch (error) { e = { error: error }; }
35534 finally {
35535 try {
35536 if (r && !r.done && (m = i["return"])) m.call(i);
35537 }
35538 finally { if (e) throw e.error; }
35539 }
35540 return ar;
35541};
35542var __spread = (undefined && undefined.__spread) || function () {
35543 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
35544 return ar;
35545};
35546
35547
35548
35549
35550
35551
35552
35553
35554
35555var HeaderRowContainerCtrl = /** @class */ (function (_super) {
35556 __extends(HeaderRowContainerCtrl, _super);
35557 function HeaderRowContainerCtrl(pinned) {
35558 var _this = _super.call(this) || this;
35559 _this.hidden = false;
35560 _this.groupsRowCtrls = [];
35561 _this.pinned = pinned;
35562 return _this;
35563 }
35564 HeaderRowContainerCtrl.prototype.setComp = function (comp, eGui) {
35565 this.comp = comp;
35566 this.eViewport = eGui;
35567 this.setupCenterWidth();
35568 this.setupPinnedWidth();
35569 this.setupDragAndDrop(this.eViewport);
35570 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_GRID_COLUMNS_CHANGED, this.onGridColumnsChanged.bind(this));
35571 this.addManagedListener(this.eViewport, 'scroll', this.resetScrollLeft.bind(this));
35572 this.ctrlsService.registerHeaderContainer(this, this.pinned);
35573 if (this.columnModel.isReady()) {
35574 this.refresh();
35575 }
35576 };
35577 HeaderRowContainerCtrl.prototype.setupDragAndDrop = function (dropContainer) {
35578 var bodyDropTarget = new _columnDrag_bodyDropTarget__WEBPACK_IMPORTED_MODULE_6__["BodyDropTarget"](this.pinned, dropContainer);
35579 this.createManagedBean(bodyDropTarget);
35580 };
35581 HeaderRowContainerCtrl.prototype.refresh = function (keepColumns) {
35582 var _this = this;
35583 if (keepColumns === void 0) { keepColumns = false; }
35584 var sequence = new _utils__WEBPACK_IMPORTED_MODULE_5__["NumberSequence"]();
35585 var focusedHeaderPosition = this.focusService.getFocusHeaderToUseAfterRefresh();
35586 var refreshColumnGroups = function () {
35587 var groupRowCount = _this.columnModel.getHeaderRowCount() - 1;
35588 _this.groupsRowCtrls = _this.destroyBeans(_this.groupsRowCtrls);
35589 for (var i = 0; i < groupRowCount; i++) {
35590 var ctrl = _this.createBean(new _row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_8__["HeaderRowCtrl"](sequence.next(), _this.pinned, _row_headerRowComp__WEBPACK_IMPORTED_MODULE_7__["HeaderRowType"].COLUMN_GROUP));
35591 _this.groupsRowCtrls.push(ctrl);
35592 }
35593 };
35594 var refreshColumns = function () {
35595 var rowIndex = sequence.next();
35596 var needNewInstance = !_this.hidden && (_this.columnsRowCtrl == null || !keepColumns || _this.columnsRowCtrl.getRowIndex() !== rowIndex);
35597 var shouldDestroyInstance = needNewInstance || _this.hidden;
35598 if (shouldDestroyInstance) {
35599 _this.columnsRowCtrl = _this.destroyBean(_this.columnsRowCtrl);
35600 }
35601 if (needNewInstance) {
35602 _this.columnsRowCtrl = _this.createBean(new _row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_8__["HeaderRowCtrl"](rowIndex, _this.pinned, _row_headerRowComp__WEBPACK_IMPORTED_MODULE_7__["HeaderRowType"].COLUMN));
35603 }
35604 };
35605 var refreshFilters = function () {
35606 var includeFloatingFilter = _this.columnModel.hasFloatingFilters() && !_this.hidden;
35607 var destroyPreviousComp = function () {
35608 _this.filtersRowCtrl = _this.destroyBean(_this.filtersRowCtrl);
35609 };
35610 if (!includeFloatingFilter) {
35611 destroyPreviousComp();
35612 return;
35613 }
35614 var rowIndex = sequence.next();
35615 if (_this.filtersRowCtrl) {
35616 var rowIndexMismatch = _this.filtersRowCtrl.getRowIndex() !== rowIndex;
35617 if (!keepColumns || rowIndexMismatch) {
35618 destroyPreviousComp();
35619 }
35620 }
35621 if (!_this.filtersRowCtrl) {
35622 _this.filtersRowCtrl = _this.createBean(new _row_headerRowCtrl__WEBPACK_IMPORTED_MODULE_8__["HeaderRowCtrl"](rowIndex, _this.pinned, _row_headerRowComp__WEBPACK_IMPORTED_MODULE_7__["HeaderRowType"].FLOATING_FILTER));
35623 }
35624 };
35625 refreshColumnGroups();
35626 refreshColumns();
35627 refreshFilters();
35628 var allCtrls = this.getAllCtrls();
35629 this.comp.setCtrls(allCtrls);
35630 this.restoreFocusOnHeader(focusedHeaderPosition);
35631 };
35632 HeaderRowContainerCtrl.prototype.restoreFocusOnHeader = function (position) {
35633 if (position == null || position.column.getPinned() != this.pinned) {
35634 return;
35635 }
35636 this.focusService.focusHeaderPosition({ headerPosition: position });
35637 };
35638 HeaderRowContainerCtrl.prototype.getAllCtrls = function () {
35639 var res = __spread(this.groupsRowCtrls);
35640 if (this.columnsRowCtrl) {
35641 res.push(this.columnsRowCtrl);
35642 }
35643 if (this.filtersRowCtrl) {
35644 res.push(this.filtersRowCtrl);
35645 }
35646 return res;
35647 };
35648 // grid cols have changed - this also means the number of rows in the header can have
35649 // changed. so we remove all the old rows and insert new ones for a complete refresh
35650 HeaderRowContainerCtrl.prototype.onGridColumnsChanged = function () {
35651 this.refresh(true);
35652 };
35653 HeaderRowContainerCtrl.prototype.setupCenterWidth = function () {
35654 var _this = this;
35655 if (this.pinned != null) {
35656 return;
35657 }
35658 this.createManagedBean(new _gridBodyComp_centerWidthFeature__WEBPACK_IMPORTED_MODULE_4__["CenterWidthFeature"](function (width) { return _this.comp.setCenterWidth(width + "px"); }));
35659 };
35660 HeaderRowContainerCtrl.prototype.setHorizontalScroll = function (offset) {
35661 this.comp.setContainerTransform("translateX(" + offset + "px)");
35662 };
35663 HeaderRowContainerCtrl.prototype.resetScrollLeft = function () {
35664 this.eViewport.scrollLeft = 0;
35665 };
35666 HeaderRowContainerCtrl.prototype.setupPinnedWidth = function () {
35667 var _this = this;
35668 if (this.pinned == null) {
35669 return;
35670 }
35671 var pinningLeft = this.pinned === 'left';
35672 var pinningRight = this.pinned === 'right';
35673 this.hidden = true;
35674 var listener = function () {
35675 var width = pinningLeft ? _this.pinnedWidthService.getPinnedLeftWidth() : _this.pinnedWidthService.getPinnedRightWidth();
35676 if (width == null) {
35677 return;
35678 } // can happen at initialisation, width not yet set
35679 var hidden = (width == 0);
35680 var hiddenChanged = _this.hidden !== hidden;
35681 var isRtl = _this.gridOptionsService.is('enableRtl');
35682 var scrollbarWidth = _this.gridOptionsService.getScrollbarWidth();
35683 // if there is a scroll showing (and taking up space, so Windows, and not iOS)
35684 // in the body, then we add extra space to keep header aligned with the body,
35685 // as body width fits the cols and the scrollbar
35686 var addPaddingForScrollbar = _this.scrollVisibleService.isVerticalScrollShowing() && ((isRtl && pinningLeft) || (!isRtl && pinningRight));
35687 var widthWithPadding = addPaddingForScrollbar ? width + scrollbarWidth : width;
35688 _this.comp.setPinnedContainerWidth(widthWithPadding + "px");
35689 _this.comp.setDisplayed(!hidden);
35690 if (hiddenChanged) {
35691 _this.hidden = hidden;
35692 _this.refresh();
35693 }
35694 };
35695 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_LEFT_PINNED_WIDTH_CHANGED, listener);
35696 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_RIGHT_PINNED_WIDTH_CHANGED, listener);
35697 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED, listener);
35698 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_SCROLLBAR_WIDTH_CHANGED, listener);
35699 };
35700 HeaderRowContainerCtrl.prototype.getHeaderCtrlForColumn = function (column) {
35701 if (column instanceof _entities_column__WEBPACK_IMPORTED_MODULE_2__["Column"]) {
35702 if (!this.columnsRowCtrl) {
35703 return;
35704 }
35705 return this.columnsRowCtrl.getHeaderCellCtrl(column);
35706 }
35707 if (this.groupsRowCtrls.length === 0) {
35708 return;
35709 }
35710 for (var i = 0; i < this.groupsRowCtrls.length; i++) {
35711 var ctrl = this.groupsRowCtrls[i].getHeaderCellCtrl(column);
35712 if (ctrl) {
35713 return ctrl;
35714 }
35715 }
35716 };
35717 HeaderRowContainerCtrl.prototype.getHtmlElementForColumnHeader = function (column) {
35718 /* tslint:enable */
35719 var cellCtrl = this.getHeaderCtrlForColumn(column);
35720 if (!cellCtrl) {
35721 return null;
35722 }
35723 return cellCtrl.getGui();
35724 };
35725 HeaderRowContainerCtrl.prototype.getRowType = function (rowIndex) {
35726 var allCtrls = this.getAllCtrls();
35727 var ctrl = allCtrls[rowIndex];
35728 return ctrl ? ctrl.getType() : undefined;
35729 };
35730 HeaderRowContainerCtrl.prototype.focusHeader = function (rowIndex, column, event) {
35731 var allCtrls = this.getAllCtrls();
35732 var ctrl = allCtrls[rowIndex];
35733 if (!ctrl) {
35734 return false;
35735 }
35736 return ctrl.focusHeader(column, event);
35737 };
35738 HeaderRowContainerCtrl.prototype.getRowCount = function () {
35739 return this.getAllCtrls().length;
35740 };
35741 HeaderRowContainerCtrl.prototype.destroy = function () {
35742 if (this.filtersRowCtrl) {
35743 this.filtersRowCtrl = this.destroyBean(this.filtersRowCtrl);
35744 }
35745 if (this.columnsRowCtrl) {
35746 this.columnsRowCtrl = this.destroyBean(this.columnsRowCtrl);
35747 }
35748 if (this.groupsRowCtrls && this.groupsRowCtrls.length) {
35749 this.groupsRowCtrls = this.destroyBeans(this.groupsRowCtrls);
35750 }
35751 _super.prototype.destroy.call(this);
35752 };
35753 __decorate([
35754 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
35755 ], HeaderRowContainerCtrl.prototype, "ctrlsService", void 0);
35756 __decorate([
35757 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('scrollVisibleService')
35758 ], HeaderRowContainerCtrl.prototype, "scrollVisibleService", void 0);
35759 __decorate([
35760 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('pinnedWidthService')
35761 ], HeaderRowContainerCtrl.prototype, "pinnedWidthService", void 0);
35762 __decorate([
35763 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
35764 ], HeaderRowContainerCtrl.prototype, "columnModel", void 0);
35765 __decorate([
35766 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('focusService')
35767 ], HeaderRowContainerCtrl.prototype, "focusService", void 0);
35768 return HeaderRowContainerCtrl;
35769}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
35770
35771
35772
35773/***/ }),
35774/* 157 */
35775/***/ (function(module, __webpack_exports__, __webpack_require__) {
35776
35777"use strict";
35778__webpack_require__.r(__webpack_exports__);
35779/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRowCtrl", function() { return HeaderRowCtrl; });
35780/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
35781/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
35782/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26);
35783/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
35784/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12);
35785/* harmony import */ var _cells_floatingFilter_headerFilterCellCtrl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(158);
35786/* harmony import */ var _cells_column_headerCellCtrl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(162);
35787/* harmony import */ var _cells_columnGroup_headerGroupCellCtrl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(165);
35788/* harmony import */ var _headerRowComp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(153);
35789/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7);
35790/**
35791 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
35792 * @version v29.2.0
35793 * @link https://www.ag-grid.com/
35794 * @license MIT
35795 */
35796var __extends = (undefined && undefined.__extends) || (function () {
35797 var extendStatics = function (d, b) {
35798 extendStatics = Object.setPrototypeOf ||
35799 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
35800 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
35801 return extendStatics(d, b);
35802 };
35803 return function (d, b) {
35804 extendStatics(d, b);
35805 function __() { this.constructor = d; }
35806 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
35807 };
35808})();
35809var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
35810 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
35811 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
35812 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;
35813 return c > 3 && r && Object.defineProperty(target, key, r), r;
35814};
35815
35816
35817
35818
35819
35820
35821
35822
35823
35824
35825var instanceIdSequence = 0;
35826var HeaderRowCtrl = /** @class */ (function (_super) {
35827 __extends(HeaderRowCtrl, _super);
35828 function HeaderRowCtrl(rowIndex, pinned, type) {
35829 var _this = _super.call(this) || this;
35830 _this.instanceId = instanceIdSequence++;
35831 _this.headerCellCtrls = {};
35832 _this.rowIndex = rowIndex;
35833 _this.pinned = pinned;
35834 _this.type = type;
35835 return _this;
35836 }
35837 HeaderRowCtrl.prototype.getInstanceId = function () {
35838 return this.instanceId;
35839 };
35840 HeaderRowCtrl.prototype.setComp = function (comp) {
35841 this.comp = comp;
35842 this.onRowHeightChanged();
35843 this.onVirtualColumnsChanged();
35844 this.setWidth();
35845 this.addEventListeners();
35846 if (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["isBrowserSafari"])()) {
35847 // fix for a Safari rendering bug that caused the header to flicker above chart panels
35848 // as you move the mouse over the header
35849 this.comp.setTransform('translateZ(0)');
35850 }
35851 comp.setAriaRowIndex(this.rowIndex + 1);
35852 };
35853 HeaderRowCtrl.prototype.addEventListeners = function () {
35854 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_RESIZED, this.onColumnResized.bind(this));
35855 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));
35856 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_VIRTUAL_COLUMNS_CHANGED, this.onVirtualColumnsChanged.bind(this));
35857 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_HEADER_HEIGHT_CHANGED, this.onRowHeightChanged.bind(this));
35858 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_GRID_STYLES_CHANGED, this.onRowHeightChanged.bind(this));
35859 // when print layout changes, it changes what columns are in what section
35860 this.addManagedPropertyListener('domLayout', this.onDisplayedColumnsChanged.bind(this));
35861 this.addManagedPropertyListener('headerHeight', this.onRowHeightChanged.bind(this));
35862 this.addManagedPropertyListener('pivotHeaderHeight', this.onRowHeightChanged.bind(this));
35863 this.addManagedPropertyListener('groupHeaderHeight', this.onRowHeightChanged.bind(this));
35864 this.addManagedPropertyListener('pivotGroupHeaderHeight', this.onRowHeightChanged.bind(this));
35865 this.addManagedPropertyListener('floatingFiltersHeight', this.onRowHeightChanged.bind(this));
35866 };
35867 HeaderRowCtrl.prototype.getHeaderCellCtrl = function (column) {
35868 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_9__["values"])(this.headerCellCtrls).find(function (cellCtrl) { return cellCtrl.getColumnGroupChild() === column; });
35869 };
35870 HeaderRowCtrl.prototype.onDisplayedColumnsChanged = function () {
35871 this.onVirtualColumnsChanged();
35872 this.setWidth();
35873 this.onRowHeightChanged();
35874 };
35875 HeaderRowCtrl.prototype.getType = function () {
35876 return this.type;
35877 };
35878 HeaderRowCtrl.prototype.onColumnResized = function () {
35879 this.setWidth();
35880 };
35881 HeaderRowCtrl.prototype.setWidth = function () {
35882 var width = this.getWidthForRow();
35883 this.comp.setWidth(width + "px");
35884 };
35885 HeaderRowCtrl.prototype.getWidthForRow = function () {
35886 var printLayout = this.gridOptionsService.isDomLayout('print');
35887 if (printLayout) {
35888 var pinned = this.pinned != null;
35889 if (pinned) {
35890 return 0;
35891 }
35892 return this.columnModel.getContainerWidth('right')
35893 + this.columnModel.getContainerWidth('left')
35894 + this.columnModel.getContainerWidth(null);
35895 }
35896 // if not printing, just return the width as normal
35897 return this.columnModel.getContainerWidth(this.pinned);
35898 };
35899 HeaderRowCtrl.prototype.onRowHeightChanged = function () {
35900 var headerRowCount = this.columnModel.getHeaderRowCount();
35901 var sizes = [];
35902 var numberOfFloating = 0;
35903 if (this.columnModel.hasFloatingFilters()) {
35904 headerRowCount++;
35905 numberOfFloating = 1;
35906 }
35907 var groupHeight = this.columnModel.getColumnGroupHeaderRowHeight();
35908 var headerHeight = this.columnModel.getColumnHeaderRowHeight();
35909 var numberOfNonGroups = 1 + numberOfFloating;
35910 var numberOfGroups = headerRowCount - numberOfNonGroups;
35911 for (var i = 0; i < numberOfGroups; i++) {
35912 sizes.push(groupHeight);
35913 }
35914 sizes.push(headerHeight);
35915 for (var i = 0; i < numberOfFloating; i++) {
35916 sizes.push(this.columnModel.getFloatingFiltersHeight());
35917 }
35918 var topOffset = 0;
35919 for (var i = 0; i < this.rowIndex; i++) {
35920 topOffset += sizes[i];
35921 }
35922 var thisRowHeight = sizes[this.rowIndex] + 'px';
35923 this.comp.setTop(topOffset + 'px');
35924 this.comp.setHeight(thisRowHeight);
35925 };
35926 HeaderRowCtrl.prototype.getPinned = function () {
35927 return this.pinned;
35928 };
35929 HeaderRowCtrl.prototype.getRowIndex = function () {
35930 return this.rowIndex;
35931 };
35932 HeaderRowCtrl.prototype.onVirtualColumnsChanged = function () {
35933 var _this = this;
35934 var oldCtrls = this.headerCellCtrls;
35935 this.headerCellCtrls = {};
35936 var columns = this.getColumnsInViewport();
35937 columns.forEach(function (child) {
35938 // skip groups that have no displayed children. this can happen when the group is broken,
35939 // and this section happens to have nothing to display for the open / closed state.
35940 // (a broken group is one that is split, ie columns in the group have a non-group column
35941 // in between them)
35942 if (child.isEmptyGroup()) {
35943 return;
35944 }
35945 var idOfChild = child.getUniqueId();
35946 // if we already have this cell rendered, do nothing
35947 var headerCtrl = oldCtrls[idOfChild];
35948 delete oldCtrls[idOfChild];
35949 // it's possible there is a new Column with the same ID, but it's for a different Column.
35950 // this is common with pivoting, where the pivot cols change, but the id's are still pivot_0,
35951 // pivot_1 etc. so if new col but same ID, need to remove the old col here first as we are
35952 // about to replace it in the this.headerComps map.
35953 var forOldColumn = headerCtrl && headerCtrl.getColumnGroupChild() != child;
35954 if (forOldColumn) {
35955 _this.destroyBean(headerCtrl);
35956 headerCtrl = undefined;
35957 }
35958 if (headerCtrl == null) {
35959 switch (_this.type) {
35960 case _headerRowComp__WEBPACK_IMPORTED_MODULE_8__["HeaderRowType"].FLOATING_FILTER:
35961 headerCtrl = _this.createBean(new _cells_floatingFilter_headerFilterCellCtrl__WEBPACK_IMPORTED_MODULE_5__["HeaderFilterCellCtrl"](child, _this));
35962 break;
35963 case _headerRowComp__WEBPACK_IMPORTED_MODULE_8__["HeaderRowType"].COLUMN_GROUP:
35964 headerCtrl = _this.createBean(new _cells_columnGroup_headerGroupCellCtrl__WEBPACK_IMPORTED_MODULE_7__["HeaderGroupCellCtrl"](child, _this));
35965 break;
35966 default:
35967 headerCtrl = _this.createBean(new _cells_column_headerCellCtrl__WEBPACK_IMPORTED_MODULE_6__["HeaderCellCtrl"](child, _this));
35968 break;
35969 }
35970 }
35971 _this.headerCellCtrls[idOfChild] = headerCtrl;
35972 });
35973 // we want to keep columns that are focused, otherwise keyboard navigation breaks
35974 var isFocusedAndDisplayed = function (ctrl) {
35975 var isFocused = _this.focusService.isHeaderWrapperFocused(ctrl);
35976 if (!isFocused) {
35977 return false;
35978 }
35979 var isDisplayed = _this.columnModel.isDisplayed(ctrl.getColumnGroupChild());
35980 return isDisplayed;
35981 };
35982 Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["iterateObject"])(oldCtrls, function (id, oldCtrl) {
35983 var keepCtrl = isFocusedAndDisplayed(oldCtrl);
35984 if (keepCtrl) {
35985 _this.headerCellCtrls[id] = oldCtrl;
35986 }
35987 else {
35988 _this.destroyBean(oldCtrl);
35989 }
35990 });
35991 var ctrlsToDisplay = Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["getAllValuesInObject"])(this.headerCellCtrls);
35992 this.comp.setHeaderCtrls(ctrlsToDisplay);
35993 };
35994 HeaderRowCtrl.prototype.getColumnsInViewport = function () {
35995 var printLayout = this.gridOptionsService.isDomLayout('print');
35996 return printLayout ? this.getColumnsInViewportPrintLayout() : this.getColumnsInViewportNormalLayout();
35997 };
35998 HeaderRowCtrl.prototype.getColumnsInViewportPrintLayout = function () {
35999 var _this = this;
36000 // for print layout, we add all columns into the center
36001 if (this.pinned != null) {
36002 return [];
36003 }
36004 var viewportColumns = [];
36005 var actualDepth = this.getActualDepth();
36006 ['left', null, 'right'].forEach(function (pinned) {
36007 var items = _this.columnModel.getVirtualHeaderGroupRow(pinned, actualDepth);
36008 viewportColumns = viewportColumns.concat(items);
36009 });
36010 return viewportColumns;
36011 };
36012 HeaderRowCtrl.prototype.getActualDepth = function () {
36013 return this.type == _headerRowComp__WEBPACK_IMPORTED_MODULE_8__["HeaderRowType"].FLOATING_FILTER ? this.rowIndex - 1 : this.rowIndex;
36014 };
36015 HeaderRowCtrl.prototype.getColumnsInViewportNormalLayout = function () {
36016 // when in normal layout, we add the columns for that container only
36017 return this.columnModel.getVirtualHeaderGroupRow(this.pinned, this.getActualDepth());
36018 };
36019 HeaderRowCtrl.prototype.focusHeader = function (column, event) {
36020 var allCtrls = Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["getAllValuesInObject"])(this.headerCellCtrls);
36021 var ctrl = allCtrls.find(function (ctrl) { return ctrl.getColumnGroupChild() == column; });
36022 if (!ctrl) {
36023 return false;
36024 }
36025 ctrl.focus(event);
36026 return true;
36027 };
36028 HeaderRowCtrl.prototype.destroy = function () {
36029 var _this = this;
36030 Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["iterateObject"])(this.headerCellCtrls, function (key, ctrl) {
36031 _this.destroyBean(ctrl);
36032 });
36033 this.headerCellCtrls = {};
36034 _super.prototype.destroy.call(this);
36035 };
36036 __decorate([
36037 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
36038 ], HeaderRowCtrl.prototype, "columnModel", void 0);
36039 __decorate([
36040 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('focusService')
36041 ], HeaderRowCtrl.prototype, "focusService", void 0);
36042 return HeaderRowCtrl;
36043}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
36044
36045
36046
36047/***/ }),
36048/* 158 */
36049/***/ (function(module, __webpack_exports__, __webpack_require__) {
36050
36051"use strict";
36052__webpack_require__.r(__webpack_exports__);
36053/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellCtrl", function() { return HeaderFilterCellCtrl; });
36054/* harmony import */ var _abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(159);
36055/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
36056/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
36057/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
36058/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(25);
36059/* harmony import */ var _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(160);
36060/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45);
36061/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(46);
36062/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(64);
36063/* harmony import */ var _hoverFeature__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(161);
36064/**
36065 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
36066 * @version v29.2.0
36067 * @link https://www.ag-grid.com/
36068 * @license MIT
36069 */
36070var __extends = (undefined && undefined.__extends) || (function () {
36071 var extendStatics = function (d, b) {
36072 extendStatics = Object.setPrototypeOf ||
36073 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36074 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
36075 return extendStatics(d, b);
36076 };
36077 return function (d, b) {
36078 extendStatics(d, b);
36079 function __() { this.constructor = d; }
36080 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36081 };
36082})();
36083var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
36084 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36085 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
36086 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;
36087 return c > 3 && r && Object.defineProperty(target, key, r), r;
36088};
36089
36090
36091
36092
36093
36094
36095
36096
36097
36098
36099var HeaderFilterCellCtrl = /** @class */ (function (_super) {
36100 __extends(HeaderFilterCellCtrl, _super);
36101 function HeaderFilterCellCtrl(column, parentRowCtrl) {
36102 var _this = _super.call(this, column, parentRowCtrl) || this;
36103 _this.column = column;
36104 return _this;
36105 }
36106 HeaderFilterCellCtrl.prototype.setComp = function (comp, eGui, eButtonShowMainFilter, eFloatingFilterBody) {
36107 _super.prototype.setGui.call(this, eGui);
36108 this.comp = comp;
36109 this.eButtonShowMainFilter = eButtonShowMainFilter;
36110 this.eFloatingFilterBody = eFloatingFilterBody;
36111 var colDef = this.column.getColDef();
36112 var filterExists = !!colDef.filter || !!colDef.filterFramework;
36113 var floatingFilterExists = !!colDef.floatingFilter;
36114 this.active = filterExists && floatingFilterExists;
36115 this.setupWidth();
36116 this.setupLeft();
36117 this.setupHover();
36118 this.setupFocus();
36119 this.setupUserComp();
36120 this.setupSyncWithFilter();
36121 this.setupUi();
36122 this.addManagedListener(this.eButtonShowMainFilter, 'click', this.showParentFilter.bind(this));
36123 if (this.active) {
36124 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_FILTER_CHANGED, this.updateFilterButton.bind(this));
36125 }
36126 };
36127 HeaderFilterCellCtrl.prototype.setupUi = function () {
36128 this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton && this.active);
36129 if (!this.active) {
36130 return;
36131 }
36132 this.comp.addOrRemoveBodyCssClass('ag-floating-filter-full-body', this.suppressFilterButton);
36133 this.comp.addOrRemoveBodyCssClass('ag-floating-filter-body', !this.suppressFilterButton);
36134 var eMenuIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_7__["createIconNoSpan"])('filter', this.gridOptionsService, this.column);
36135 if (eMenuIcon) {
36136 this.eButtonShowMainFilter.appendChild(eMenuIcon);
36137 }
36138 };
36139 HeaderFilterCellCtrl.prototype.setupFocus = function () {
36140 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_8__["ManagedFocusFeature"](this.eGui, {
36141 shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),
36142 onTabKeyDown: this.onTabKeyDown.bind(this),
36143 handleKeyDown: this.handleKeyDown.bind(this),
36144 onFocusIn: this.onFocusIn.bind(this)
36145 }));
36146 };
36147 HeaderFilterCellCtrl.prototype.onTabKeyDown = function (e) {
36148 var eDocument = this.gridOptionsService.getDocument();
36149 var activeEl = eDocument.activeElement;
36150 var wrapperHasFocus = activeEl === this.eGui;
36151 if (wrapperHasFocus) {
36152 return;
36153 }
36154 var nextFocusableEl = this.focusService.findNextFocusableElement(this.eGui, null, e.shiftKey);
36155 if (nextFocusableEl) {
36156 this.beans.headerNavigationService.scrollToColumn(this.column);
36157 e.preventDefault();
36158 nextFocusableEl.focus();
36159 return;
36160 }
36161 var nextFocusableColumn = this.findNextColumnWithFloatingFilter(e.shiftKey);
36162 if (!nextFocusableColumn) {
36163 return;
36164 }
36165 if (this.focusService.focusHeaderPosition({
36166 headerPosition: {
36167 headerRowIndex: this.getParentRowCtrl().getRowIndex(),
36168 column: nextFocusableColumn
36169 },
36170 event: e
36171 })) {
36172 e.preventDefault();
36173 }
36174 };
36175 HeaderFilterCellCtrl.prototype.findNextColumnWithFloatingFilter = function (backwards) {
36176 var columModel = this.beans.columnModel;
36177 var nextCol = this.column;
36178 do {
36179 nextCol = backwards
36180 ? columModel.getDisplayedColBefore(nextCol)
36181 : columModel.getDisplayedColAfter(nextCol);
36182 if (!nextCol) {
36183 break;
36184 }
36185 } while (!nextCol.getColDef().filter || !nextCol.getColDef().floatingFilter);
36186 return nextCol;
36187 };
36188 HeaderFilterCellCtrl.prototype.handleKeyDown = function (e) {
36189 _super.prototype.handleKeyDown.call(this, e);
36190 var wrapperHasFocus = this.getWrapperHasFocus();
36191 switch (e.key) {
36192 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].UP:
36193 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].DOWN:
36194 if (!wrapperHasFocus) {
36195 e.preventDefault();
36196 }
36197 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].LEFT:
36198 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].RIGHT:
36199 if (wrapperHasFocus) {
36200 return;
36201 }
36202 e.stopPropagation();
36203 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ENTER:
36204 if (wrapperHasFocus) {
36205 if (this.focusService.focusInto(this.eGui)) {
36206 e.preventDefault();
36207 }
36208 }
36209 break;
36210 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ESCAPE:
36211 if (!wrapperHasFocus) {
36212 this.eGui.focus();
36213 }
36214 }
36215 };
36216 HeaderFilterCellCtrl.prototype.onFocusIn = function (e) {
36217 var isRelatedWithin = this.eGui.contains(e.relatedTarget);
36218 // when the focus is already within the component,
36219 // we default to the browser's behavior
36220 if (isRelatedWithin) {
36221 return;
36222 }
36223 var notFromHeaderWrapper = !!e.relatedTarget && !e.relatedTarget.classList.contains('ag-floating-filter');
36224 var fromWithinHeader = !!e.relatedTarget && Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["isElementChildOfClass"])(e.relatedTarget, 'ag-floating-filter');
36225 if (notFromHeaderWrapper && fromWithinHeader && e.target === this.eGui) {
36226 var lastFocusEvent = this.lastFocusEvent;
36227 var fromTab = !!(lastFocusEvent && lastFocusEvent.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].TAB);
36228 if (lastFocusEvent && fromTab) {
36229 var shouldFocusLast = lastFocusEvent.shiftKey;
36230 this.focusService.focusInto(this.eGui, shouldFocusLast);
36231 }
36232 }
36233 var rowIndex = this.getRowIndex();
36234 this.beans.focusService.setFocusedHeader(rowIndex, this.column);
36235 };
36236 HeaderFilterCellCtrl.prototype.setupHover = function () {
36237 var _this = this;
36238 this.createManagedBean(new _hoverFeature__WEBPACK_IMPORTED_MODULE_9__["HoverFeature"]([this.column], this.eGui));
36239 var listener = function () {
36240 if (!_this.gridOptionsService.is('columnHoverHighlight')) {
36241 return;
36242 }
36243 var hovered = _this.columnHoverService.isHovered(_this.column);
36244 _this.comp.addOrRemoveCssClass('ag-column-hover', hovered);
36245 };
36246 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_HOVER_CHANGED, listener);
36247 listener();
36248 };
36249 HeaderFilterCellCtrl.prototype.setupLeft = function () {
36250 var setLeftFeature = new _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_5__["SetLeftFeature"](this.column, this.eGui, this.beans);
36251 this.createManagedBean(setLeftFeature);
36252 };
36253 HeaderFilterCellCtrl.prototype.setupUserComp = function () {
36254 var _this = this;
36255 if (!this.active) {
36256 return;
36257 }
36258 var colDef = this.column.getColDef();
36259 // this is unusual - we need a params value OUTSIDE the component the params are for.
36260 // the params are for the floating filter component, but this property is actually for the wrapper.
36261 this.suppressFilterButton = colDef.floatingFilterComponentParams ? !!colDef.floatingFilterComponentParams.suppressFilterButton : false;
36262 var compDetails = this.filterManager.getFloatingFilterCompDetails(this.column, function () { return _this.showParentFilter(); });
36263 if (compDetails) {
36264 this.comp.setCompDetails(compDetails);
36265 }
36266 };
36267 HeaderFilterCellCtrl.prototype.showParentFilter = function () {
36268 var eventSource = this.suppressFilterButton ? this.eFloatingFilterBody : this.eButtonShowMainFilter;
36269 this.menuFactory.showMenuAfterButtonClick(this.column, eventSource, 'floatingFilter', 'filterMenuTab', ['filterMenuTab']);
36270 };
36271 HeaderFilterCellCtrl.prototype.setupSyncWithFilter = function () {
36272 var _this = this;
36273 if (!this.active) {
36274 return;
36275 }
36276 var syncWithFilter = function (filterChangedEvent) {
36277 var compPromise = _this.comp.getFloatingFilterComp();
36278 if (!compPromise) {
36279 return;
36280 }
36281 var parentModel = _this.filterManager.getCurrentFloatingFilterParentModel(_this.column);
36282 compPromise.then(function (comp) {
36283 if (comp) {
36284 comp.onParentModelChanged(parentModel, filterChangedEvent);
36285 }
36286 });
36287 };
36288 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_FILTER_CHANGED, syncWithFilter);
36289 if (this.filterManager.isFilterActive(this.column)) {
36290 syncWithFilter(null);
36291 }
36292 };
36293 HeaderFilterCellCtrl.prototype.setupWidth = function () {
36294 var _this = this;
36295 var listener = function () {
36296 var width = _this.column.getActualWidth() + "px";
36297 _this.comp.setWidth(width);
36298 };
36299 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_WIDTH_CHANGED, listener);
36300 listener();
36301 };
36302 HeaderFilterCellCtrl.prototype.updateFilterButton = function () {
36303 if (!this.suppressFilterButton && this.comp) {
36304 this.comp.setButtonWrapperDisplayed(this.filterManager.isFilterAllowed(this.column));
36305 }
36306 };
36307 __decorate([
36308 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('filterManager')
36309 ], HeaderFilterCellCtrl.prototype, "filterManager", void 0);
36310 __decorate([
36311 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnHoverService')
36312 ], HeaderFilterCellCtrl.prototype, "columnHoverService", void 0);
36313 __decorate([
36314 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('menuFactory')
36315 ], HeaderFilterCellCtrl.prototype, "menuFactory", void 0);
36316 return HeaderFilterCellCtrl;
36317}(_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_0__["AbstractHeaderCellCtrl"]));
36318
36319
36320
36321/***/ }),
36322/* 159 */
36323/***/ (function(module, __webpack_exports__, __webpack_require__) {
36324
36325"use strict";
36326__webpack_require__.r(__webpack_exports__);
36327/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractHeaderCellCtrl", function() { return AbstractHeaderCellCtrl; });
36328/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
36329/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
36330/* harmony import */ var _utils_keyboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47);
36331/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48);
36332/**
36333 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
36334 * @version v29.2.0
36335 * @link https://www.ag-grid.com/
36336 * @license MIT
36337 */
36338var __extends = (undefined && undefined.__extends) || (function () {
36339 var extendStatics = function (d, b) {
36340 extendStatics = Object.setPrototypeOf ||
36341 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36342 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
36343 return extendStatics(d, b);
36344 };
36345 return function (d, b) {
36346 extendStatics(d, b);
36347 function __() { this.constructor = d; }
36348 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36349 };
36350})();
36351var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
36352 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36353 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
36354 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;
36355 return c > 3 && r && Object.defineProperty(target, key, r), r;
36356};
36357
36358
36359
36360
36361var instanceIdSequence = 0;
36362var AbstractHeaderCellCtrl = /** @class */ (function (_super) {
36363 __extends(AbstractHeaderCellCtrl, _super);
36364 function AbstractHeaderCellCtrl(columnGroupChild, parentRowCtrl) {
36365 var _this = _super.call(this) || this;
36366 _this.lastFocusEvent = null;
36367 _this.columnGroupChild = columnGroupChild;
36368 _this.parentRowCtrl = parentRowCtrl;
36369 // unique id to this instance, including the column ID to help with debugging in React as it's used in 'key'
36370 _this.instanceId = columnGroupChild.getUniqueId() + '-' + instanceIdSequence++;
36371 return _this;
36372 }
36373 AbstractHeaderCellCtrl.prototype.shouldStopEventPropagation = function (e) {
36374 var _a = this.focusService.getFocusedHeader(), headerRowIndex = _a.headerRowIndex, column = _a.column;
36375 return Object(_utils_keyboard__WEBPACK_IMPORTED_MODULE_2__["isUserSuppressingHeaderKeyboardEvent"])(this.gridOptionsService, e, headerRowIndex, column);
36376 };
36377 AbstractHeaderCellCtrl.prototype.getWrapperHasFocus = function () {
36378 var eDocument = this.gridOptionsService.getDocument();
36379 var activeEl = eDocument.activeElement;
36380 return activeEl === this.eGui;
36381 };
36382 AbstractHeaderCellCtrl.prototype.setGui = function (eGui) {
36383 this.eGui = eGui;
36384 this.addDomData();
36385 };
36386 AbstractHeaderCellCtrl.prototype.handleKeyDown = function (e) {
36387 var wrapperHasFocus = this.getWrapperHasFocus();
36388 switch (e.key) {
36389 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].PAGE_DOWN:
36390 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].PAGE_UP:
36391 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].PAGE_HOME:
36392 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].PAGE_END:
36393 if (wrapperHasFocus) {
36394 e.preventDefault();
36395 }
36396 }
36397 };
36398 AbstractHeaderCellCtrl.prototype.addDomData = function () {
36399 var _this = this;
36400 var key = AbstractHeaderCellCtrl.DOM_DATA_KEY_HEADER_CTRL;
36401 this.gridOptionsService.setDomData(this.eGui, key, this);
36402 this.addDestroyFunc(function () { return _this.gridOptionsService.setDomData(_this.eGui, key, null); });
36403 };
36404 AbstractHeaderCellCtrl.prototype.getGui = function () {
36405 return this.eGui;
36406 };
36407 AbstractHeaderCellCtrl.prototype.focus = function (event) {
36408 if (!this.eGui) {
36409 return false;
36410 }
36411 this.lastFocusEvent = event || null;
36412 this.eGui.focus();
36413 return true;
36414 };
36415 AbstractHeaderCellCtrl.prototype.getRowIndex = function () {
36416 return this.parentRowCtrl.getRowIndex();
36417 };
36418 AbstractHeaderCellCtrl.prototype.getParentRowCtrl = function () {
36419 return this.parentRowCtrl;
36420 };
36421 AbstractHeaderCellCtrl.prototype.getPinned = function () {
36422 return this.parentRowCtrl.getPinned();
36423 };
36424 AbstractHeaderCellCtrl.prototype.getInstanceId = function () {
36425 return this.instanceId;
36426 };
36427 AbstractHeaderCellCtrl.prototype.getColumnGroupChild = function () {
36428 return this.columnGroupChild;
36429 };
36430 AbstractHeaderCellCtrl.DOM_DATA_KEY_HEADER_CTRL = 'headerCtrl';
36431 __decorate([
36432 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('focusService')
36433 ], AbstractHeaderCellCtrl.prototype, "focusService", void 0);
36434 __decorate([
36435 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('beans')
36436 ], AbstractHeaderCellCtrl.prototype, "beans", void 0);
36437 __decorate([
36438 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('userComponentFactory')
36439 ], AbstractHeaderCellCtrl.prototype, "userComponentFactory", void 0);
36440 return AbstractHeaderCellCtrl;
36441}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
36442
36443
36444
36445/***/ }),
36446/* 160 */
36447/***/ (function(module, __webpack_exports__, __webpack_require__) {
36448
36449"use strict";
36450__webpack_require__.r(__webpack_exports__);
36451/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetLeftFeature", function() { return SetLeftFeature; });
36452/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
36453/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
36454/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
36455/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41);
36456/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19);
36457/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
36458/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(26);
36459/**
36460 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
36461 * @version v29.2.0
36462 * @link https://www.ag-grid.com/
36463 * @license MIT
36464 */
36465var __extends = (undefined && undefined.__extends) || (function () {
36466 var extendStatics = function (d, b) {
36467 extendStatics = Object.setPrototypeOf ||
36468 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36469 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
36470 return extendStatics(d, b);
36471 };
36472 return function (d, b) {
36473 extendStatics(d, b);
36474 function __() { this.constructor = d; }
36475 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36476 };
36477})();
36478var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
36479 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36480 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
36481 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;
36482 return c > 3 && r && Object.defineProperty(target, key, r), r;
36483};
36484
36485
36486
36487
36488
36489
36490
36491var SetLeftFeature = /** @class */ (function (_super) {
36492 __extends(SetLeftFeature, _super);
36493 function SetLeftFeature(columnOrGroup, eCell, beans, colsSpanning) {
36494 var _this = _super.call(this) || this;
36495 _this.columnOrGroup = columnOrGroup;
36496 _this.eCell = eCell;
36497 _this.ariaEl = _this.eCell.querySelector('[role=columnheader]') || _this.eCell;
36498 _this.colsSpanning = colsSpanning;
36499 _this.beans = beans;
36500 return _this;
36501 }
36502 SetLeftFeature.prototype.setColsSpanning = function (colsSpanning) {
36503 this.colsSpanning = colsSpanning;
36504 this.onLeftChanged();
36505 };
36506 SetLeftFeature.prototype.getColumnOrGroup = function () {
36507 if (this.beans.gridOptionsService.is('enableRtl') && this.colsSpanning) {
36508 return Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(this.colsSpanning);
36509 }
36510 return this.columnOrGroup;
36511 };
36512 SetLeftFeature.prototype.postConstruct = function () {
36513 this.addManagedListener(this.columnOrGroup, _entities_column__WEBPACK_IMPORTED_MODULE_0__["Column"].EVENT_LEFT_CHANGED, this.onLeftChanged.bind(this));
36514 this.setLeftFirstTime();
36515 // when in print layout, the left position is also dependent on the width of the pinned sections.
36516 // so additionally update left if any column width changes.
36517 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_6__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onLeftChanged.bind(this));
36518 // setting left has a dependency on print layout
36519 this.addManagedPropertyListener('domLayout', this.onLeftChanged.bind(this));
36520 };
36521 SetLeftFeature.prototype.setLeftFirstTime = function () {
36522 var suppressMoveAnimation = this.beans.gridOptionsService.is('suppressColumnMoveAnimation');
36523 var oldLeftExists = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(this.columnOrGroup.getOldLeft());
36524 var animateColumnMove = this.beans.columnAnimationService.isActive() && oldLeftExists && !suppressMoveAnimation;
36525 if (animateColumnMove) {
36526 this.animateInLeft();
36527 }
36528 else {
36529 this.onLeftChanged();
36530 }
36531 };
36532 SetLeftFeature.prototype.animateInLeft = function () {
36533 var _this = this;
36534 var colOrGroup = this.getColumnOrGroup();
36535 var left = colOrGroup.getLeft();
36536 var oldLeft = colOrGroup.getOldLeft();
36537 var oldActualLeft = this.modifyLeftForPrintLayout(colOrGroup, oldLeft);
36538 var actualLeft = this.modifyLeftForPrintLayout(colOrGroup, left);
36539 this.setLeft(oldActualLeft);
36540 // we must keep track of the left we want to set to, as this would otherwise lead to a race
36541 // condition, if the user changed the left value many times in one VM turn, then we want to make
36542 // make sure the actualLeft we set in the timeout below (in the next VM turn) is the correct left
36543 // position. eg if user changes column position twice, then setLeft() below executes twice in next
36544 // VM turn, but only one (the correct one) should get applied.
36545 this.actualLeft = actualLeft;
36546 this.beans.columnAnimationService.executeNextVMTurn(function () {
36547 // test this left value is the latest one to be applied, and if not, do nothing
36548 if (_this.actualLeft === actualLeft) {
36549 _this.setLeft(actualLeft);
36550 }
36551 });
36552 };
36553 SetLeftFeature.prototype.onLeftChanged = function () {
36554 var colOrGroup = this.getColumnOrGroup();
36555 var left = colOrGroup.getLeft();
36556 this.actualLeft = this.modifyLeftForPrintLayout(colOrGroup, left);
36557 this.setLeft(this.actualLeft);
36558 };
36559 SetLeftFeature.prototype.modifyLeftForPrintLayout = function (colOrGroup, leftPosition) {
36560 var printLayout = this.beans.gridOptionsService.isDomLayout('print');
36561 if (!printLayout) {
36562 return leftPosition;
36563 }
36564 if (colOrGroup.getPinned() === 'left') {
36565 return leftPosition;
36566 }
36567 var leftWidth = this.beans.columnModel.getDisplayedColumnsLeftWidth();
36568 if (colOrGroup.getPinned() === 'right') {
36569 var bodyWidth = this.beans.columnModel.getBodyContainerWidth();
36570 return leftWidth + bodyWidth + leftPosition;
36571 }
36572 // is in body
36573 return leftWidth + leftPosition;
36574 };
36575 SetLeftFeature.prototype.setLeft = function (value) {
36576 // if the value is null, then that means the column is no longer
36577 // displayed. there is logic in the rendering to fade these columns
36578 // out, so we don't try and change their left positions.
36579 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(value)) {
36580 this.eCell.style.left = value + "px";
36581 }
36582 var indexColumn;
36583 if (this.columnOrGroup instanceof _entities_column__WEBPACK_IMPORTED_MODULE_0__["Column"]) {
36584 indexColumn = this.columnOrGroup;
36585 }
36586 else {
36587 var columnGroup = this.columnOrGroup;
36588 var children = columnGroup.getLeafColumns();
36589 if (!children.length) {
36590 return;
36591 }
36592 if (children.length > 1) {
36593 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaColSpan"])(this.ariaEl, children.length);
36594 }
36595 indexColumn = children[0];
36596 }
36597 var index = this.beans.columnModel.getAriaColumnIndex(indexColumn);
36598 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaColIndex"])(this.ariaEl, index);
36599 };
36600 __decorate([
36601 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
36602 ], SetLeftFeature.prototype, "postConstruct", null);
36603 return SetLeftFeature;
36604}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
36605
36606
36607
36608/***/ }),
36609/* 161 */
36610/***/ (function(module, __webpack_exports__, __webpack_require__) {
36611
36612"use strict";
36613__webpack_require__.r(__webpack_exports__);
36614/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HoverFeature", function() { return HoverFeature; });
36615/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
36616/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
36617/**
36618 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
36619 * @version v29.2.0
36620 * @link https://www.ag-grid.com/
36621 * @license MIT
36622 */
36623var __extends = (undefined && undefined.__extends) || (function () {
36624 var extendStatics = function (d, b) {
36625 extendStatics = Object.setPrototypeOf ||
36626 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36627 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
36628 return extendStatics(d, b);
36629 };
36630 return function (d, b) {
36631 extendStatics(d, b);
36632 function __() { this.constructor = d; }
36633 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36634 };
36635})();
36636var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
36637 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36638 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
36639 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;
36640 return c > 3 && r && Object.defineProperty(target, key, r), r;
36641};
36642
36643
36644var HoverFeature = /** @class */ (function (_super) {
36645 __extends(HoverFeature, _super);
36646 function HoverFeature(columns, element) {
36647 var _this = _super.call(this) || this;
36648 _this.columns = columns;
36649 _this.element = element;
36650 return _this;
36651 }
36652 HoverFeature.prototype.postConstruct = function () {
36653 if (this.gridOptionsService.is('columnHoverHighlight')) {
36654 this.addMouseHoverListeners();
36655 }
36656 };
36657 HoverFeature.prototype.addMouseHoverListeners = function () {
36658 this.addManagedListener(this.element, 'mouseout', this.onMouseOut.bind(this));
36659 this.addManagedListener(this.element, 'mouseover', this.onMouseOver.bind(this));
36660 };
36661 HoverFeature.prototype.onMouseOut = function () {
36662 this.columnHoverService.clearMouseOver();
36663 };
36664 HoverFeature.prototype.onMouseOver = function () {
36665 this.columnHoverService.setMouseOver(this.columns);
36666 };
36667 __decorate([
36668 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnHoverService')
36669 ], HoverFeature.prototype, "columnHoverService", void 0);
36670 __decorate([
36671 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
36672 ], HoverFeature.prototype, "postConstruct", null);
36673 return HoverFeature;
36674}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
36675
36676
36677
36678/***/ }),
36679/* 162 */
36680/***/ (function(module, __webpack_exports__, __webpack_require__) {
36681
36682"use strict";
36683__webpack_require__.r(__webpack_exports__);
36684/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderCellCtrl", function() { return HeaderCellCtrl; });
36685/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(48);
36686/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
36687/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(100);
36688/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
36689/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26);
36690/* harmony import */ var _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(160);
36691/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41);
36692/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(64);
36693/* harmony import */ var _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(130);
36694/* harmony import */ var _abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(159);
36695/* harmony import */ var _cssClassApplier__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(151);
36696/* harmony import */ var _hoverFeature__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(161);
36697/* harmony import */ var _resizeFeature__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(163);
36698/* harmony import */ var _selectAllFeature__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(164);
36699/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(45);
36700/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(13);
36701/**
36702 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
36703 * @version v29.2.0
36704 * @link https://www.ag-grid.com/
36705 * @license MIT
36706 */
36707var __extends = (undefined && undefined.__extends) || (function () {
36708 var extendStatics = function (d, b) {
36709 extendStatics = Object.setPrototypeOf ||
36710 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36711 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
36712 return extendStatics(d, b);
36713 };
36714 return function (d, b) {
36715 extendStatics(d, b);
36716 function __() { this.constructor = d; }
36717 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36718 };
36719})();
36720var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
36721 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36722 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
36723 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;
36724 return c > 3 && r && Object.defineProperty(target, key, r), r;
36725};
36726
36727
36728
36729
36730
36731
36732
36733
36734
36735
36736
36737
36738
36739
36740
36741
36742var HeaderCellCtrl = /** @class */ (function (_super) {
36743 __extends(HeaderCellCtrl, _super);
36744 function HeaderCellCtrl(column, parentRowCtrl) {
36745 var _this = _super.call(this, column, parentRowCtrl) || this;
36746 _this.refreshFunctions = [];
36747 _this.userHeaderClasses = new Set();
36748 _this.ariaDescriptionProperties = new Map();
36749 _this.column = column;
36750 return _this;
36751 }
36752 HeaderCellCtrl.prototype.setComp = function (comp, eGui, eResize, eHeaderCompWrapper) {
36753 var _this = this;
36754 _super.prototype.setGui.call(this, eGui);
36755 this.comp = comp;
36756 this.updateState();
36757 this.setupWidth();
36758 this.setupMovingCss();
36759 this.setupMenuClass();
36760 this.setupSortableClass();
36761 this.setupWrapTextClass();
36762 this.refreshSpanHeaderHeight();
36763 this.setupAutoHeight(eHeaderCompWrapper);
36764 this.addColumnHoverListener();
36765 this.setupFilterCss();
36766 this.setupColId();
36767 this.setupClassesFromColDef();
36768 this.setupTooltip();
36769 this.addActiveHeaderMouseListeners();
36770 this.setupSelectAll();
36771 this.setupUserComp();
36772 this.refreshAria();
36773 this.createManagedBean(new _resizeFeature__WEBPACK_IMPORTED_MODULE_12__["ResizeFeature"](this.getPinned(), this.column, eResize, comp, this));
36774 this.createManagedBean(new _hoverFeature__WEBPACK_IMPORTED_MODULE_11__["HoverFeature"]([this.column], eGui));
36775 this.createManagedBean(new _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_5__["SetLeftFeature"](this.column, eGui, this.beans));
36776 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_7__["ManagedFocusFeature"](eGui, {
36777 shouldStopEventPropagation: function (e) { return _this.shouldStopEventPropagation(e); },
36778 onTabKeyDown: function () { return null; },
36779 handleKeyDown: this.handleKeyDown.bind(this),
36780 onFocusIn: this.onFocusIn.bind(this),
36781 onFocusOut: this.onFocusOut.bind(this)
36782 }));
36783 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_COL_DEF_CHANGED, this.onColDefChanged.bind(this));
36784 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_VALUE_CHANGED, this.onColumnValueChanged.bind(this));
36785 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, this.onColumnRowGroupChanged.bind(this));
36786 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_PIVOT_CHANGED, this.onColumnPivotChanged.bind(this));
36787 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_HEADER_HEIGHT_CHANGED, this.onHeaderHeightChanged.bind(this));
36788 };
36789 HeaderCellCtrl.prototype.setupUserComp = function () {
36790 var compDetails = this.lookupUserCompDetails();
36791 this.setCompDetails(compDetails);
36792 };
36793 HeaderCellCtrl.prototype.setCompDetails = function (compDetails) {
36794 this.userCompDetails = compDetails;
36795 this.comp.setUserCompDetails(compDetails);
36796 };
36797 HeaderCellCtrl.prototype.lookupUserCompDetails = function () {
36798 var params = this.createParams();
36799 var colDef = this.column.getColDef();
36800 return this.userComponentFactory.getHeaderCompDetails(colDef, params);
36801 };
36802 HeaderCellCtrl.prototype.createParams = function () {
36803 var _this = this;
36804 var colDef = this.column.getColDef();
36805 var params = {
36806 column: this.column,
36807 displayName: this.displayName,
36808 enableSorting: colDef.sortable,
36809 enableMenu: this.menuEnabled,
36810 showColumnMenu: function (source) {
36811 _this.gridApi.showColumnMenuAfterButtonClick(_this.column, source);
36812 },
36813 progressSort: function (multiSort) {
36814 _this.sortController.progressSort(_this.column, !!multiSort, "uiColumnSorted");
36815 },
36816 setSort: function (sort, multiSort) {
36817 _this.sortController.setSortForColumn(_this.column, sort, !!multiSort, "uiColumnSorted");
36818 },
36819 api: this.gridApi,
36820 columnApi: this.columnApi,
36821 context: this.gridOptionsService.context,
36822 eGridHeader: this.getGui()
36823 };
36824 return params;
36825 };
36826 HeaderCellCtrl.prototype.setupSelectAll = function () {
36827 this.selectAllFeature = this.createManagedBean(new _selectAllFeature__WEBPACK_IMPORTED_MODULE_13__["SelectAllFeature"](this.column));
36828 this.selectAllFeature.setComp(this);
36829 };
36830 HeaderCellCtrl.prototype.getSelectAllGui = function () {
36831 return this.selectAllFeature.getCheckboxGui();
36832 };
36833 HeaderCellCtrl.prototype.handleKeyDown = function (e) {
36834 _super.prototype.handleKeyDown.call(this, e);
36835 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].SPACE) {
36836 this.selectAllFeature.onSpaceKeyPressed(e);
36837 }
36838 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].ENTER) {
36839 this.onEnterKeyPressed(e);
36840 }
36841 };
36842 HeaderCellCtrl.prototype.onEnterKeyPressed = function (e) {
36843 /// THIS IS BAD - we are assuming the header is not a user provided comp
36844 var headerComp = this.comp.getUserCompInstance();
36845 if (!headerComp) {
36846 return;
36847 }
36848 if (e.ctrlKey || e.metaKey) {
36849 if (this.menuEnabled && headerComp.showMenu) {
36850 e.preventDefault();
36851 headerComp.showMenu();
36852 }
36853 }
36854 else if (this.sortable) {
36855 var multiSort = e.shiftKey;
36856 this.sortController.progressSort(this.column, multiSort, "uiColumnSorted");
36857 }
36858 };
36859 HeaderCellCtrl.prototype.isMenuEnabled = function () {
36860 return this.menuEnabled;
36861 };
36862 HeaderCellCtrl.prototype.onFocusIn = function (e) {
36863 if (!this.getGui().contains(e.relatedTarget)) {
36864 var rowIndex = this.getRowIndex();
36865 this.focusService.setFocusedHeader(rowIndex, this.column);
36866 }
36867 this.setActiveHeader(true);
36868 };
36869 HeaderCellCtrl.prototype.onFocusOut = function (e) {
36870 if (this.getGui().contains(e.relatedTarget)) {
36871 return;
36872 }
36873 this.setActiveHeader(false);
36874 };
36875 HeaderCellCtrl.prototype.setupTooltip = function () {
36876 var _this = this;
36877 var tooltipCtrl = {
36878 getColumn: function () { return _this.column; },
36879 getColDef: function () { return _this.column.getColDef(); },
36880 getGui: function () { return _this.eGui; },
36881 getLocation: function () { return 'header'; },
36882 getTooltipValue: function () {
36883 var res = _this.column.getColDef().headerTooltip;
36884 return res;
36885 },
36886 };
36887 var tooltipFeature = this.createManagedBean(new _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_8__["TooltipFeature"](tooltipCtrl, this.beans));
36888 tooltipFeature.setComp(this.comp);
36889 this.refreshFunctions.push(function () { return tooltipFeature.refreshToolTip(); });
36890 };
36891 HeaderCellCtrl.prototype.setupClassesFromColDef = function () {
36892 var _this = this;
36893 var refreshHeaderClasses = function () {
36894 var colDef = _this.column.getColDef();
36895 var classes = _cssClassApplier__WEBPACK_IMPORTED_MODULE_10__["CssClassApplier"].getHeaderClassesFromColDef(colDef, _this.gridOptionsService, _this.column, null);
36896 var oldClasses = _this.userHeaderClasses;
36897 _this.userHeaderClasses = new Set(classes);
36898 classes.forEach(function (c) {
36899 if (oldClasses.has(c)) {
36900 // class already added, no need to apply it, but remove from old set
36901 oldClasses.delete(c);
36902 }
36903 else {
36904 // class new since last time, so apply it
36905 _this.comp.addOrRemoveCssClass(c, true);
36906 }
36907 });
36908 // now old set only has classes that were applied last time, but not this time, so remove them
36909 oldClasses.forEach(function (c) { return _this.comp.addOrRemoveCssClass(c, false); });
36910 };
36911 this.refreshFunctions.push(refreshHeaderClasses);
36912 refreshHeaderClasses();
36913 };
36914 HeaderCellCtrl.prototype.setDragSource = function (eSource) {
36915 var _this = this;
36916 this.dragSourceElement = eSource;
36917 this.removeDragSource();
36918 if (!eSource) {
36919 return;
36920 }
36921 if (!this.draggable) {
36922 return;
36923 }
36924 var hideColumnOnExit = !this.gridOptionsService.is('suppressDragLeaveHidesColumns');
36925 this.moveDragSource = {
36926 type: _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragSourceType"].HeaderCell,
36927 eElement: eSource,
36928 defaultIconName: hideColumnOnExit ? _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_HIDE : _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_NOT_ALLOWED,
36929 getDragItem: function () { return _this.createDragItem(); },
36930 dragItemName: this.displayName,
36931 onDragStarted: function () { return _this.column.setMoving(true, "uiColumnMoved"); },
36932 onDragStopped: function () { return _this.column.setMoving(false, "uiColumnMoved"); },
36933 onGridEnter: function (dragItem) {
36934 var _a;
36935 if (hideColumnOnExit) {
36936 var unlockedColumns = ((_a = dragItem === null || dragItem === void 0 ? void 0 : dragItem.columns) === null || _a === void 0 ? void 0 : _a.filter(function (col) { return !col.getColDef().lockVisible; })) || [];
36937 _this.columnModel.setColumnsVisible(unlockedColumns, true, "uiColumnMoved");
36938 }
36939 },
36940 onGridExit: function (dragItem) {
36941 var _a;
36942 if (hideColumnOnExit) {
36943 var unlockedColumns = ((_a = dragItem === null || dragItem === void 0 ? void 0 : dragItem.columns) === null || _a === void 0 ? void 0 : _a.filter(function (col) { return !col.getColDef().lockVisible; })) || [];
36944 _this.columnModel.setColumnsVisible(unlockedColumns, false, "uiColumnMoved");
36945 }
36946 },
36947 };
36948 this.dragAndDropService.addDragSource(this.moveDragSource, true);
36949 };
36950 HeaderCellCtrl.prototype.createDragItem = function () {
36951 var visibleState = {};
36952 visibleState[this.column.getId()] = this.column.isVisible();
36953 return {
36954 columns: [this.column],
36955 visibleState: visibleState
36956 };
36957 };
36958 HeaderCellCtrl.prototype.removeDragSource = function () {
36959 if (this.moveDragSource) {
36960 this.dragAndDropService.removeDragSource(this.moveDragSource);
36961 this.moveDragSource = undefined;
36962 }
36963 };
36964 HeaderCellCtrl.prototype.onColDefChanged = function () {
36965 this.refresh();
36966 };
36967 HeaderCellCtrl.prototype.updateState = function () {
36968 var colDef = this.column.getColDef();
36969 this.menuEnabled = this.menuFactory.isMenuEnabled(this.column) && !colDef.suppressMenu;
36970 this.sortable = colDef.sortable;
36971 this.displayName = this.calculateDisplayName();
36972 this.draggable = this.workOutDraggable();
36973 };
36974 HeaderCellCtrl.prototype.addRefreshFunction = function (func) {
36975 this.refreshFunctions.push(func);
36976 };
36977 HeaderCellCtrl.prototype.refresh = function () {
36978 this.updateState();
36979 this.refreshHeaderComp();
36980 this.refreshAria();
36981 this.refreshFunctions.forEach(function (f) { return f(); });
36982 };
36983 HeaderCellCtrl.prototype.refreshHeaderComp = function () {
36984 var newCompDetails = this.lookupUserCompDetails();
36985 var compInstance = this.comp.getUserCompInstance();
36986 // only try refresh if old comp exists adn it is the correct type
36987 var attemptRefresh = compInstance != null && this.userCompDetails.componentClass == newCompDetails.componentClass;
36988 var headerCompRefreshed = attemptRefresh ? this.attemptHeaderCompRefresh(newCompDetails.params) : false;
36989 if (headerCompRefreshed) {
36990 // we do this as a refresh happens after colDefs change, and it's possible the column has had it's
36991 // draggable property toggled. no need to call this if not refreshing, as setDragSource is done
36992 // as part of appendHeaderComp
36993 this.setDragSource(this.dragSourceElement);
36994 }
36995 else {
36996 this.setCompDetails(newCompDetails);
36997 }
36998 };
36999 HeaderCellCtrl.prototype.attemptHeaderCompRefresh = function (params) {
37000 var headerComp = this.comp.getUserCompInstance();
37001 if (!headerComp) {
37002 return false;
37003 }
37004 // if no refresh method, then we want to replace the headerComp
37005 if (!headerComp.refresh) {
37006 return false;
37007 }
37008 var res = headerComp.refresh(params);
37009 return res;
37010 };
37011 HeaderCellCtrl.prototype.calculateDisplayName = function () {
37012 return this.columnModel.getDisplayNameForColumn(this.column, 'header', true);
37013 };
37014 HeaderCellCtrl.prototype.checkDisplayName = function () {
37015 // display name can change if aggFunc different, eg sum(Gold) is now max(Gold)
37016 if (this.displayName !== this.calculateDisplayName()) {
37017 this.refresh();
37018 }
37019 };
37020 HeaderCellCtrl.prototype.workOutDraggable = function () {
37021 var colDef = this.column.getColDef();
37022 var isSuppressMovableColumns = this.gridOptionsService.is('suppressMovableColumns');
37023 var colCanMove = !isSuppressMovableColumns && !colDef.suppressMovable && !colDef.lockPosition;
37024 // we should still be allowed drag the column, even if it can't be moved, if the column
37025 // can be dragged to a rowGroup or pivot drop zone
37026 return !!colCanMove || !!colDef.enableRowGroup || !!colDef.enablePivot;
37027 };
37028 HeaderCellCtrl.prototype.onColumnRowGroupChanged = function () {
37029 this.checkDisplayName();
37030 };
37031 HeaderCellCtrl.prototype.onColumnPivotChanged = function () {
37032 this.checkDisplayName();
37033 };
37034 HeaderCellCtrl.prototype.onColumnValueChanged = function () {
37035 this.checkDisplayName();
37036 };
37037 HeaderCellCtrl.prototype.setupWidth = function () {
37038 var _this = this;
37039 var listener = function () {
37040 var columnWidth = _this.column.getActualWidth();
37041 _this.comp.setWidth(columnWidth + "px");
37042 };
37043 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_WIDTH_CHANGED, listener);
37044 listener();
37045 };
37046 HeaderCellCtrl.prototype.setupMovingCss = function () {
37047 var _this = this;
37048 var listener = function () {
37049 // this is what makes the header go dark when it is been moved (gives impression to
37050 // user that the column was picked up).
37051 _this.comp.addOrRemoveCssClass('ag-header-cell-moving', _this.column.isMoving());
37052 };
37053 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_MOVING_CHANGED, listener);
37054 listener();
37055 };
37056 HeaderCellCtrl.prototype.setupMenuClass = function () {
37057 var _this = this;
37058 var listener = function () {
37059 _this.comp.addOrRemoveCssClass('ag-column-menu-visible', _this.column.isMenuVisible());
37060 };
37061 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_MENU_VISIBLE_CHANGED, listener);
37062 listener();
37063 };
37064 HeaderCellCtrl.prototype.setupSortableClass = function () {
37065 var _this = this;
37066 var updateSortableCssClass = function () {
37067 _this.comp.addOrRemoveCssClass('ag-header-cell-sortable', !!_this.sortable);
37068 };
37069 updateSortableCssClass();
37070 this.addRefreshFunction(updateSortableCssClass);
37071 this.addManagedListener(this.eventService, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_SORT_CHANGED, this.refreshAriaSort.bind(this));
37072 };
37073 HeaderCellCtrl.prototype.setupWrapTextClass = function () {
37074 var _this = this;
37075 var listener = function () {
37076 var wrapText = !!_this.column.getColDef().wrapHeaderText;
37077 _this.comp.addOrRemoveCssClass('ag-header-cell-wrap-text', wrapText);
37078 };
37079 listener();
37080 this.addRefreshFunction(listener);
37081 };
37082 HeaderCellCtrl.prototype.onHeaderHeightChanged = function () {
37083 this.refreshSpanHeaderHeight();
37084 };
37085 HeaderCellCtrl.prototype.refreshSpanHeaderHeight = function () {
37086 var _a = this, eGui = _a.eGui, column = _a.column, comp = _a.comp, columnModel = _a.columnModel, gridOptionsService = _a.gridOptionsService;
37087 if (!column.isSpanHeaderHeight()) {
37088 return;
37089 }
37090 var _b = this.getColumnGroupPaddingInfo(), numberOfParents = _b.numberOfParents, isSpanningTotal = _b.isSpanningTotal;
37091 comp.addOrRemoveCssClass('ag-header-span-height', numberOfParents > 0);
37092 if (numberOfParents === 0) {
37093 return;
37094 }
37095 comp.addOrRemoveCssClass('ag-header-span-total', isSpanningTotal);
37096 var pivotMode = gridOptionsService.is('pivotMode');
37097 var groupHeaderHeight = pivotMode
37098 ? columnModel.getPivotGroupHeaderHeight()
37099 : columnModel.getGroupHeaderHeight();
37100 var headerHeight = columnModel.getColumnHeaderRowHeight();
37101 var extraHeight = numberOfParents * groupHeaderHeight;
37102 eGui.style.setProperty('top', -extraHeight + "px");
37103 eGui.style.setProperty('height', headerHeight + extraHeight + "px");
37104 };
37105 HeaderCellCtrl.prototype.getColumnGroupPaddingInfo = function () {
37106 var parent = this.column.getParent();
37107 if (!parent || !parent.isPadding()) {
37108 return { numberOfParents: 0, isSpanningTotal: false };
37109 }
37110 var numberOfParents = parent.getPaddingLevel() + 1;
37111 var isSpanningTotal = true;
37112 while (parent) {
37113 if (!parent.isPadding()) {
37114 isSpanningTotal = false;
37115 break;
37116 }
37117 parent = parent.getParent();
37118 }
37119 return { numberOfParents: numberOfParents, isSpanningTotal: isSpanningTotal };
37120 };
37121 HeaderCellCtrl.prototype.setupAutoHeight = function (wrapperElement) {
37122 var _this = this;
37123 var measureHeight = function (timesCalled) {
37124 if (!_this.isAlive()) {
37125 return;
37126 }
37127 var _a = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_14__["getElementSize"])(_this.getGui()), paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom, borderBottomWidth = _a.borderBottomWidth, borderTopWidth = _a.borderTopWidth;
37128 var extraHeight = paddingTop + paddingBottom + borderBottomWidth + borderTopWidth;
37129 var wrapperHeight = wrapperElement.offsetHeight;
37130 var autoHeight = wrapperHeight + extraHeight;
37131 if (timesCalled < 5) {
37132 // if not in doc yet, means framework not yet inserted, so wait for next VM turn,
37133 // maybe it will be ready next VM turn
37134 var doc = _this.beans.gridOptionsService.getDocument();
37135 var notYetInDom = !doc || !doc.contains(wrapperElement);
37136 // this happens in React, where React hasn't put any content in. we say 'possibly'
37137 // as a) may not be React and b) the cell could be empty anyway
37138 var possiblyNoContentYet = autoHeight == 0;
37139 if (notYetInDom || possiblyNoContentYet) {
37140 _this.beans.frameworkOverrides.setTimeout(function () { return measureHeight(timesCalled + 1); }, 0);
37141 return;
37142 }
37143 }
37144 _this.columnModel.setColumnHeaderHeight(_this.column, autoHeight);
37145 };
37146 var isMeasuring = false;
37147 var stopResizeObserver;
37148 var checkMeasuring = function () {
37149 var isSpanHeaderHeight = _this.column.isSpanHeaderHeight();
37150 var newValue = _this.column.isAutoHeaderHeight();
37151 if (isSpanHeaderHeight) {
37152 stopMeasuring();
37153 if (newValue) {
37154 var message_1 = "AG Grid: The properties `spanHeaderHeight` and `autoHeaderHeight` cannot be used together in the same column.";
37155 Object(_utils_function__WEBPACK_IMPORTED_MODULE_15__["doOnce"])(function () { return console.warn(message_1); }, 'HeaderCellCtrl.spanHeaderHeightAndAutoHeaderHeight');
37156 }
37157 return;
37158 }
37159 if (newValue && !isMeasuring) {
37160 startMeasuring();
37161 }
37162 if (!newValue && isMeasuring) {
37163 stopMeasuring();
37164 }
37165 };
37166 var startMeasuring = function () {
37167 isMeasuring = true;
37168 measureHeight(0);
37169 _this.comp.addOrRemoveCssClass('ag-header-cell-auto-height', true);
37170 stopResizeObserver = _this.resizeObserverService.observeResize(wrapperElement, function () { return measureHeight(0); });
37171 };
37172 var stopMeasuring = function () {
37173 isMeasuring = false;
37174 if (stopResizeObserver) {
37175 stopResizeObserver();
37176 }
37177 _this.comp.addOrRemoveCssClass('ag-header-cell-auto-height', false);
37178 stopResizeObserver = undefined;
37179 };
37180 checkMeasuring();
37181 this.addDestroyFunc(function () { return stopMeasuring(); });
37182 // In theory we could rely on the resize observer for everything - but since it's debounced
37183 // it can be a little janky for smooth movement. in this case its better to react to our own events
37184 // And unfortunately we cant _just_ rely on our own events, since custom components can change whenever
37185 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_WIDTH_CHANGED, function () { return isMeasuring && measureHeight(0); });
37186 // Displaying the sort icon changes the available area for text, so sort changes can affect height
37187 this.addManagedListener(this.eventService, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_SORT_CHANGED, function () {
37188 // Rendering changes for sort, happen after the event... not ideal
37189 if (isMeasuring) {
37190 _this.beans.frameworkOverrides.setTimeout(function () { return measureHeight(0); });
37191 }
37192 });
37193 this.addRefreshFunction(checkMeasuring);
37194 };
37195 HeaderCellCtrl.prototype.refreshAriaSort = function () {
37196 if (this.sortable) {
37197 var translate = this.localeService.getLocaleTextFunc();
37198 var sort = this.sortController.getDisplaySortForColumn(this.column) || null;
37199 this.comp.setAriaSort(Object(_utils_aria__WEBPACK_IMPORTED_MODULE_6__["getAriaSortState"])(sort));
37200 this.setAriaDescriptionProperty('sort', translate('ariaSortableColumn', 'Press ENTER to sort.'));
37201 }
37202 else {
37203 this.comp.setAriaSort();
37204 this.setAriaDescriptionProperty('sort', null);
37205 }
37206 };
37207 HeaderCellCtrl.prototype.refreshAriaMenu = function () {
37208 if (this.menuEnabled) {
37209 var translate = this.localeService.getLocaleTextFunc();
37210 this.setAriaDescriptionProperty('menu', translate('ariaMenuColumn', 'Press CTRL ENTER to open column menu.'));
37211 }
37212 else {
37213 this.setAriaDescriptionProperty('menu', null);
37214 }
37215 };
37216 HeaderCellCtrl.prototype.setAriaDescriptionProperty = function (property, value) {
37217 if (value != null) {
37218 this.ariaDescriptionProperties.set(property, value);
37219 }
37220 else {
37221 this.ariaDescriptionProperties.delete(property);
37222 }
37223 };
37224 HeaderCellCtrl.prototype.refreshAriaDescription = function () {
37225 var descriptionArray = Array.from(this.ariaDescriptionProperties.values());
37226 this.comp.setAriaDescription(descriptionArray.length ? descriptionArray.join(' ') : undefined);
37227 };
37228 HeaderCellCtrl.prototype.refreshAria = function () {
37229 this.refreshAriaSort();
37230 this.refreshAriaMenu();
37231 this.refreshAriaDescription();
37232 };
37233 HeaderCellCtrl.prototype.addColumnHoverListener = function () {
37234 var _this = this;
37235 var listener = function () {
37236 if (!_this.gridOptionsService.is('columnHoverHighlight')) {
37237 return;
37238 }
37239 var isHovered = _this.columnHoverService.isHovered(_this.column);
37240 _this.comp.addOrRemoveCssClass('ag-column-hover', isHovered);
37241 };
37242 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_4__["Events"].EVENT_COLUMN_HOVER_CHANGED, listener);
37243 listener();
37244 };
37245 HeaderCellCtrl.prototype.setupFilterCss = function () {
37246 var _this = this;
37247 var listener = function () {
37248 _this.comp.addOrRemoveCssClass('ag-header-cell-filtered', _this.column.isFilterActive());
37249 };
37250 this.addManagedListener(this.column, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_FILTER_ACTIVE_CHANGED, listener);
37251 listener();
37252 };
37253 HeaderCellCtrl.prototype.setupColId = function () {
37254 this.comp.setColId(this.column.getColId());
37255 };
37256 HeaderCellCtrl.prototype.addActiveHeaderMouseListeners = function () {
37257 var _this = this;
37258 var listener = function (e) { return _this.setActiveHeader(e.type === 'mouseenter'); };
37259 this.addManagedListener(this.getGui(), 'mouseenter', listener);
37260 this.addManagedListener(this.getGui(), 'mouseleave', listener);
37261 };
37262 HeaderCellCtrl.prototype.setActiveHeader = function (active) {
37263 this.comp.addOrRemoveCssClass('ag-header-active', active);
37264 };
37265 __decorate([
37266 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
37267 ], HeaderCellCtrl.prototype, "columnModel", void 0);
37268 __decorate([
37269 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnHoverService')
37270 ], HeaderCellCtrl.prototype, "columnHoverService", void 0);
37271 __decorate([
37272 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('sortController')
37273 ], HeaderCellCtrl.prototype, "sortController", void 0);
37274 __decorate([
37275 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('menuFactory')
37276 ], HeaderCellCtrl.prototype, "menuFactory", void 0);
37277 __decorate([
37278 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragAndDropService')
37279 ], HeaderCellCtrl.prototype, "dragAndDropService", void 0);
37280 __decorate([
37281 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('resizeObserverService')
37282 ], HeaderCellCtrl.prototype, "resizeObserverService", void 0);
37283 __decorate([
37284 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridApi')
37285 ], HeaderCellCtrl.prototype, "gridApi", void 0);
37286 __decorate([
37287 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnApi')
37288 ], HeaderCellCtrl.prototype, "columnApi", void 0);
37289 __decorate([
37290 _context_context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
37291 ], HeaderCellCtrl.prototype, "removeDragSource", null);
37292 return HeaderCellCtrl;
37293}(_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_9__["AbstractHeaderCellCtrl"]));
37294
37295
37296
37297/***/ }),
37298/* 163 */
37299/***/ (function(module, __webpack_exports__, __webpack_require__) {
37300
37301"use strict";
37302__webpack_require__.r(__webpack_exports__);
37303/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResizeFeature", function() { return ResizeFeature; });
37304/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
37305/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
37306/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
37307/* harmony import */ var _widgets_touchListener__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(86);
37308/**
37309 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
37310 * @version v29.2.0
37311 * @link https://www.ag-grid.com/
37312 * @license MIT
37313 */
37314var __extends = (undefined && undefined.__extends) || (function () {
37315 var extendStatics = function (d, b) {
37316 extendStatics = Object.setPrototypeOf ||
37317 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
37318 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
37319 return extendStatics(d, b);
37320 };
37321 return function (d, b) {
37322 extendStatics(d, b);
37323 function __() { this.constructor = d; }
37324 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
37325 };
37326})();
37327var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
37328 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
37329 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37330 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;
37331 return c > 3 && r && Object.defineProperty(target, key, r), r;
37332};
37333
37334
37335
37336
37337var ResizeFeature = /** @class */ (function (_super) {
37338 __extends(ResizeFeature, _super);
37339 function ResizeFeature(pinned, column, eResize, comp, ctrl) {
37340 var _this = _super.call(this) || this;
37341 _this.pinned = pinned;
37342 _this.column = column;
37343 _this.eResize = eResize;
37344 _this.comp = comp;
37345 _this.ctrl = ctrl;
37346 return _this;
37347 }
37348 ResizeFeature.prototype.postConstruct = function () {
37349 var _this = this;
37350 var colDef = this.column.getColDef();
37351 var destroyResizeFuncs = [];
37352 var canResize;
37353 var canAutosize;
37354 var addResize = function () {
37355 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setDisplayed"])(_this.eResize, canResize);
37356 if (!canResize) {
37357 return;
37358 }
37359 var finishedWithResizeFunc = _this.horizontalResizeService.addResizeBar({
37360 eResizeBar: _this.eResize,
37361 onResizeStart: _this.onResizeStart.bind(_this),
37362 onResizing: _this.onResizing.bind(_this, false),
37363 onResizeEnd: _this.onResizing.bind(_this, true)
37364 });
37365 destroyResizeFuncs.push(finishedWithResizeFunc);
37366 if (canAutosize) {
37367 var skipHeaderOnAutoSize_1 = _this.gridOptionsService.is('skipHeaderOnAutoSize');
37368 var autoSizeColListener_1 = function () {
37369 _this.columnModel.autoSizeColumn(_this.column, skipHeaderOnAutoSize_1, "uiColumnResized");
37370 };
37371 _this.eResize.addEventListener('dblclick', autoSizeColListener_1);
37372 var touchListener_1 = new _widgets_touchListener__WEBPACK_IMPORTED_MODULE_3__["TouchListener"](_this.eResize);
37373 touchListener_1.addEventListener(_widgets_touchListener__WEBPACK_IMPORTED_MODULE_3__["TouchListener"].EVENT_DOUBLE_TAP, autoSizeColListener_1);
37374 _this.addDestroyFunc(function () {
37375 _this.eResize.removeEventListener('dblclick', autoSizeColListener_1);
37376 touchListener_1.removeEventListener(_widgets_touchListener__WEBPACK_IMPORTED_MODULE_3__["TouchListener"].EVENT_DOUBLE_TAP, autoSizeColListener_1);
37377 touchListener_1.destroy();
37378 });
37379 }
37380 };
37381 var removeResize = function () {
37382 destroyResizeFuncs.forEach(function (f) { return f(); });
37383 destroyResizeFuncs.length = 0;
37384 };
37385 var refresh = function () {
37386 var resize = _this.column.isResizable();
37387 var autoSize = !_this.gridOptionsService.is('suppressAutoSize') && !colDef.suppressAutoSize;
37388 var propertyChange = resize !== canResize || autoSize !== canAutosize;
37389 if (propertyChange) {
37390 canResize = resize;
37391 canAutosize = autoSize;
37392 removeResize();
37393 addResize();
37394 }
37395 };
37396 refresh();
37397 this.addDestroyFunc(removeResize);
37398 this.ctrl.addRefreshFunction(refresh);
37399 };
37400 ResizeFeature.prototype.onResizing = function (finished, resizeAmount) {
37401 var resizeAmountNormalised = this.normaliseResizeAmount(resizeAmount);
37402 var columnWidths = [{ key: this.column, newWidth: this.resizeStartWidth + resizeAmountNormalised }];
37403 this.columnModel.setColumnWidths(columnWidths, this.resizeWithShiftKey, finished, "uiColumnDragged");
37404 if (finished) {
37405 this.comp.addOrRemoveCssClass('ag-column-resizing', false);
37406 }
37407 };
37408 ResizeFeature.prototype.onResizeStart = function (shiftKey) {
37409 this.resizeStartWidth = this.column.getActualWidth();
37410 this.resizeWithShiftKey = shiftKey;
37411 this.comp.addOrRemoveCssClass('ag-column-resizing', true);
37412 };
37413 // optionally inverts the drag, depending on pinned and RTL
37414 // note - this method is duplicated in RenderedHeaderGroupCell - should refactor out?
37415 ResizeFeature.prototype.normaliseResizeAmount = function (dragChange) {
37416 var result = dragChange;
37417 var notPinningLeft = this.pinned !== 'left';
37418 var pinningRight = this.pinned === 'right';
37419 if (this.gridOptionsService.is('enableRtl')) {
37420 // for RTL, dragging left makes the col bigger, except when pinning left
37421 if (notPinningLeft) {
37422 result *= -1;
37423 }
37424 }
37425 else {
37426 // for LTR (ie normal), dragging left makes the col smaller, except when pinning right
37427 if (pinningRight) {
37428 result *= -1;
37429 }
37430 }
37431 return result;
37432 };
37433 __decorate([
37434 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('horizontalResizeService')
37435 ], ResizeFeature.prototype, "horizontalResizeService", void 0);
37436 __decorate([
37437 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
37438 ], ResizeFeature.prototype, "columnModel", void 0);
37439 __decorate([
37440 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
37441 ], ResizeFeature.prototype, "postConstruct", null);
37442 return ResizeFeature;
37443}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
37444
37445
37446
37447/***/ }),
37448/* 164 */
37449/***/ (function(module, __webpack_exports__, __webpack_require__) {
37450
37451"use strict";
37452__webpack_require__.r(__webpack_exports__);
37453/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectAllFeature", function() { return SelectAllFeature; });
37454/* harmony import */ var _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72);
37455/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
37456/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
37457/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25);
37458/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41);
37459/**
37460 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
37461 * @version v29.2.0
37462 * @link https://www.ag-grid.com/
37463 * @license MIT
37464 */
37465var __extends = (undefined && undefined.__extends) || (function () {
37466 var extendStatics = function (d, b) {
37467 extendStatics = Object.setPrototypeOf ||
37468 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
37469 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
37470 return extendStatics(d, b);
37471 };
37472 return function (d, b) {
37473 extendStatics(d, b);
37474 function __() { this.constructor = d; }
37475 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
37476 };
37477})();
37478var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
37479 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
37480 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37481 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;
37482 return c > 3 && r && Object.defineProperty(target, key, r), r;
37483};
37484
37485
37486
37487
37488
37489var SelectAllFeature = /** @class */ (function (_super) {
37490 __extends(SelectAllFeature, _super);
37491 function SelectAllFeature(column) {
37492 var _this = _super.call(this) || this;
37493 _this.cbSelectAllVisible = false;
37494 _this.processingEventFromCheckbox = false;
37495 _this.column = column;
37496 var colDef = column.getColDef();
37497 _this.filteredOnly = !!(colDef === null || colDef === void 0 ? void 0 : colDef.headerCheckboxSelectionFilteredOnly);
37498 _this.currentPageOnly = !!(colDef === null || colDef === void 0 ? void 0 : colDef.headerCheckboxSelectionCurrentPageOnly);
37499 return _this;
37500 }
37501 SelectAllFeature.prototype.onSpaceKeyPressed = function (e) {
37502 var checkbox = this.cbSelectAll;
37503 var eDocument = this.gridOptionsService.getDocument();
37504 if (checkbox.isDisplayed() && !checkbox.getGui().contains(eDocument.activeElement)) {
37505 e.preventDefault();
37506 checkbox.setValue(!checkbox.getValue());
37507 }
37508 };
37509 SelectAllFeature.prototype.getCheckboxGui = function () {
37510 return this.cbSelectAll.getGui();
37511 };
37512 SelectAllFeature.prototype.setComp = function (ctrl) {
37513 this.headerCellCtrl = ctrl;
37514 this.cbSelectAll = this.createManagedBean(new _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_0__["AgCheckbox"]());
37515 this.cbSelectAll.addCssClass('ag-header-select-all');
37516 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_4__["setAriaRole"])(this.cbSelectAll.getGui(), 'presentation');
37517 this.showOrHideSelectAll();
37518 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_NEW_COLUMNS_LOADED, this.showOrHideSelectAll.bind(this));
37519 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.showOrHideSelectAll.bind(this));
37520 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_SELECTION_CHANGED, this.onSelectionChanged.bind(this));
37521 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_PAGINATION_CHANGED, this.onSelectionChanged.bind(this));
37522 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_MODEL_UPDATED, this.onModelChanged.bind(this));
37523 this.addManagedListener(this.cbSelectAll, _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_0__["AgCheckbox"].EVENT_CHANGED, this.onCbSelectAll.bind(this));
37524 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_4__["setAriaHidden"])(this.cbSelectAll.getGui(), true);
37525 this.cbSelectAll.getInputElement().setAttribute('tabindex', '-1');
37526 this.refreshSelectAllLabel();
37527 };
37528 SelectAllFeature.prototype.showOrHideSelectAll = function () {
37529 this.cbSelectAllVisible = this.isCheckboxSelection();
37530 this.cbSelectAll.setDisplayed(this.cbSelectAllVisible, { skipAriaHidden: true });
37531 if (this.cbSelectAllVisible) {
37532 // in case user is trying this feature with the wrong model type
37533 this.checkRightRowModelType('selectAllCheckbox');
37534 // make sure checkbox is showing the right state
37535 this.updateStateOfCheckbox();
37536 }
37537 this.refreshSelectAllLabel();
37538 };
37539 SelectAllFeature.prototype.onModelChanged = function () {
37540 if (!this.cbSelectAllVisible) {
37541 return;
37542 }
37543 this.updateStateOfCheckbox();
37544 };
37545 SelectAllFeature.prototype.onSelectionChanged = function () {
37546 if (!this.cbSelectAllVisible) {
37547 return;
37548 }
37549 this.updateStateOfCheckbox();
37550 };
37551 SelectAllFeature.prototype.updateStateOfCheckbox = function () {
37552 if (this.processingEventFromCheckbox) {
37553 return;
37554 }
37555 this.processingEventFromCheckbox = true;
37556 var allSelected = this.selectionService.getSelectAllState();
37557 this.cbSelectAll.setValue(allSelected);
37558 this.refreshSelectAllLabel();
37559 this.processingEventFromCheckbox = false;
37560 };
37561 SelectAllFeature.prototype.refreshSelectAllLabel = function () {
37562 if (!this.cbSelectAllVisible) {
37563 this.headerCellCtrl.setAriaDescriptionProperty('selectAll', null);
37564 this.cbSelectAll.setInputAriaLabel(null);
37565 }
37566 else {
37567 var translate = this.localeService.getLocaleTextFunc();
37568 var checked = this.cbSelectAll.getValue();
37569 var ariaStatus = checked ? translate('ariaChecked', 'checked') : translate('ariaUnchecked', 'unchecked');
37570 var ariaLabel = translate('ariaRowSelectAll', 'Press Space to toggle all rows selection');
37571 this.headerCellCtrl.setAriaDescriptionProperty('selectAll', ariaLabel + " (" + ariaStatus + ")");
37572 this.cbSelectAll.setInputAriaLabel(ariaLabel + " (" + ariaStatus + ")");
37573 }
37574 this.headerCellCtrl.refreshAriaDescription();
37575 };
37576 SelectAllFeature.prototype.checkRightRowModelType = function (feature) {
37577 var rowModelType = this.rowModel.getType();
37578 var rowModelMatches = rowModelType === 'clientSide' || rowModelType === 'serverSide';
37579 if (!rowModelMatches) {
37580 console.warn("AG Grid: " + feature + " is only available if using 'clientSide' or 'serverSide' rowModelType, you are using " + rowModelType + ".");
37581 return false;
37582 }
37583 return true;
37584 };
37585 SelectAllFeature.prototype.onCbSelectAll = function () {
37586 if (this.processingEventFromCheckbox) {
37587 return;
37588 }
37589 if (!this.cbSelectAllVisible) {
37590 return;
37591 }
37592 var value = this.cbSelectAll.getValue();
37593 var source = 'uiSelectAll';
37594 if (this.currentPageOnly)
37595 source = 'uiSelectAllCurrentPage';
37596 else if (this.filteredOnly)
37597 source = 'uiSelectAllFiltered';
37598 var params = {
37599 source: source,
37600 justFiltered: this.filteredOnly,
37601 justCurrentPage: this.currentPageOnly,
37602 };
37603 if (value) {
37604 this.selectionService.selectAllRowNodes(params);
37605 }
37606 else {
37607 this.selectionService.deselectAllRowNodes(params);
37608 }
37609 };
37610 SelectAllFeature.prototype.isCheckboxSelection = function () {
37611 var result = this.column.getColDef().headerCheckboxSelection;
37612 if (typeof result === 'function') {
37613 var func = result;
37614 var params = {
37615 column: this.column,
37616 colDef: this.column.getColDef(),
37617 columnApi: this.columnApi,
37618 api: this.gridApi,
37619 context: this.gridOptionsService.context
37620 };
37621 result = func(params);
37622 }
37623 if (result) {
37624 return this.checkRightRowModelType('headerCheckboxSelection');
37625 }
37626 return false;
37627 };
37628 __decorate([
37629 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('gridApi')
37630 ], SelectAllFeature.prototype, "gridApi", void 0);
37631 __decorate([
37632 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnApi')
37633 ], SelectAllFeature.prototype, "columnApi", void 0);
37634 __decorate([
37635 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('rowModel')
37636 ], SelectAllFeature.prototype, "rowModel", void 0);
37637 __decorate([
37638 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('selectionService')
37639 ], SelectAllFeature.prototype, "selectionService", void 0);
37640 return SelectAllFeature;
37641}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
37642
37643
37644
37645/***/ }),
37646/* 165 */
37647/***/ (function(module, __webpack_exports__, __webpack_require__) {
37648
37649"use strict";
37650__webpack_require__.r(__webpack_exports__);
37651/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupCellCtrl", function() { return HeaderGroupCellCtrl; });
37652/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(48);
37653/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
37654/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(100);
37655/* harmony import */ var _entities_column__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
37656/* harmony import */ var _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
37657/* harmony import */ var _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(160);
37658/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(19);
37659/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(64);
37660/* harmony import */ var _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(130);
37661/* harmony import */ var _abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(159);
37662/* harmony import */ var _cssClassApplier__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(151);
37663/* harmony import */ var _hoverFeature__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(161);
37664/* harmony import */ var _groupResizeFeature__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(166);
37665/* harmony import */ var _groupWidthFeature__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(167);
37666/**
37667 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
37668 * @version v29.2.0
37669 * @link https://www.ag-grid.com/
37670 * @license MIT
37671 */
37672var __extends = (undefined && undefined.__extends) || (function () {
37673 var extendStatics = function (d, b) {
37674 extendStatics = Object.setPrototypeOf ||
37675 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
37676 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
37677 return extendStatics(d, b);
37678 };
37679 return function (d, b) {
37680 extendStatics(d, b);
37681 function __() { this.constructor = d; }
37682 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
37683 };
37684})();
37685var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
37686 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
37687 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37688 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;
37689 return c > 3 && r && Object.defineProperty(target, key, r), r;
37690};
37691
37692
37693
37694
37695
37696
37697
37698
37699
37700
37701
37702
37703
37704
37705var HeaderGroupCellCtrl = /** @class */ (function (_super) {
37706 __extends(HeaderGroupCellCtrl, _super);
37707 function HeaderGroupCellCtrl(columnGroup, parentRowCtrl) {
37708 var _this = _super.call(this, columnGroup, parentRowCtrl) || this;
37709 _this.columnGroup = columnGroup;
37710 return _this;
37711 }
37712 HeaderGroupCellCtrl.prototype.setComp = function (comp, eGui, eResize) {
37713 _super.prototype.setGui.call(this, eGui);
37714 this.comp = comp;
37715 this.displayName = this.columnModel.getDisplayNameForColumnGroup(this.columnGroup, 'header');
37716 this.addClasses();
37717 this.addAttributes();
37718 this.setupMovingCss();
37719 this.setupExpandable();
37720 this.setupTooltip();
37721 this.setupUserComp();
37722 var pinned = this.getParentRowCtrl().getPinned();
37723 var leafCols = this.columnGroup.getProvidedColumnGroup().getLeafColumns();
37724 this.createManagedBean(new _hoverFeature__WEBPACK_IMPORTED_MODULE_11__["HoverFeature"](leafCols, eGui));
37725 this.createManagedBean(new _rendering_features_setLeftFeature__WEBPACK_IMPORTED_MODULE_5__["SetLeftFeature"](this.columnGroup, eGui, this.beans));
37726 this.createManagedBean(new _groupWidthFeature__WEBPACK_IMPORTED_MODULE_13__["GroupWidthFeature"](comp, this.columnGroup));
37727 this.groupResizeFeature = this.createManagedBean(new _groupResizeFeature__WEBPACK_IMPORTED_MODULE_12__["GroupResizeFeature"](comp, eResize, pinned, this.columnGroup));
37728 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_7__["ManagedFocusFeature"](eGui, {
37729 shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),
37730 onTabKeyDown: function () { return undefined; },
37731 handleKeyDown: this.handleKeyDown.bind(this),
37732 onFocusIn: this.onFocusIn.bind(this)
37733 }));
37734 };
37735 HeaderGroupCellCtrl.prototype.resizeLeafColumnsToFit = function () {
37736 var _a, _b;
37737 // AG-8205 Temp null check to avoid throwing when a component has not been setup yet (React 18)
37738 (_a = this.groupResizeFeature) === null || _a === void 0 ? void 0 : _a.onResizeStart(false);
37739 (_b = this.groupResizeFeature) === null || _b === void 0 ? void 0 : _b.resizeLeafColumnsToFit();
37740 };
37741 HeaderGroupCellCtrl.prototype.setupUserComp = function () {
37742 var _this = this;
37743 var displayName = this.displayName;
37744 var params = {
37745 displayName: this.displayName,
37746 columnGroup: this.columnGroup,
37747 setExpanded: function (expanded) {
37748 _this.columnModel.setColumnGroupOpened(_this.columnGroup.getProvidedColumnGroup(), expanded, "gridInitializing");
37749 },
37750 api: this.gridApi,
37751 columnApi: this.columnApi,
37752 context: this.gridOptionsService.context
37753 };
37754 if (!displayName) {
37755 var columnGroup = this.columnGroup;
37756 var leafCols = columnGroup.getLeafColumns();
37757 // find the top most column group that represents the same columns. so if we are dragging a group, we also
37758 // want to visually show the parent groups dragging for the same column set. for example imaging 5 levels
37759 // of grouping, with each group only containing the next group, and the last group containing three columns,
37760 // then when you move any group (even the lowest level group) you are in-fact moving all the groups, as all
37761 // the groups represent the same column set.
37762 while (columnGroup.getParent() && columnGroup.getParent().getLeafColumns().length === leafCols.length) {
37763 columnGroup = columnGroup.getParent();
37764 }
37765 var colGroupDef = columnGroup.getColGroupDef();
37766 if (colGroupDef) {
37767 displayName = colGroupDef.headerName;
37768 }
37769 if (!displayName) {
37770 displayName = leafCols ? this.columnModel.getDisplayNameForColumn(leafCols[0], 'header', true) : '';
37771 }
37772 }
37773 var compDetails = this.userComponentFactory.getHeaderGroupCompDetails(params);
37774 this.comp.setUserCompDetails(compDetails);
37775 };
37776 HeaderGroupCellCtrl.prototype.setupTooltip = function () {
37777 var _this = this;
37778 var colGroupDef = this.columnGroup.getColGroupDef();
37779 var tooltipCtrl = {
37780 getColumn: function () { return _this.columnGroup; },
37781 getGui: function () { return _this.eGui; },
37782 getLocation: function () { return 'headerGroup'; },
37783 getTooltipValue: function () { return colGroupDef && colGroupDef.headerTooltip; }
37784 };
37785 if (colGroupDef) {
37786 tooltipCtrl.getColDef = function () { return colGroupDef; };
37787 }
37788 var tooltipFeature = this.createManagedBean(new _widgets_tooltipFeature__WEBPACK_IMPORTED_MODULE_8__["TooltipFeature"](tooltipCtrl, this.beans));
37789 tooltipFeature.setComp(this.comp);
37790 };
37791 HeaderGroupCellCtrl.prototype.setupExpandable = function () {
37792 var providedColGroup = this.columnGroup.getProvidedColumnGroup();
37793 this.refreshExpanded();
37794 this.addManagedListener(providedColGroup, _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"].EVENT_EXPANDABLE_CHANGED, this.refreshExpanded.bind(this));
37795 this.addManagedListener(providedColGroup, _entities_providedColumnGroup__WEBPACK_IMPORTED_MODULE_4__["ProvidedColumnGroup"].EVENT_EXPANDED_CHANGED, this.refreshExpanded.bind(this));
37796 };
37797 HeaderGroupCellCtrl.prototype.refreshExpanded = function () {
37798 var column = this.columnGroup;
37799 this.expandable = column.isExpandable();
37800 var expanded = column.isExpanded();
37801 if (this.expandable) {
37802 this.comp.setAriaExpanded(expanded ? 'true' : 'false');
37803 }
37804 else {
37805 this.comp.setAriaExpanded(undefined);
37806 }
37807 };
37808 HeaderGroupCellCtrl.prototype.addAttributes = function () {
37809 this.comp.setColId(this.columnGroup.getUniqueId());
37810 };
37811 HeaderGroupCellCtrl.prototype.addClasses = function () {
37812 var _this = this;
37813 var colGroupDef = this.columnGroup.getColGroupDef();
37814 var classes = _cssClassApplier__WEBPACK_IMPORTED_MODULE_10__["CssClassApplier"].getHeaderClassesFromColDef(colGroupDef, this.gridOptionsService, null, this.columnGroup);
37815 // having different classes below allows the style to not have a bottom border
37816 // on the group header, if no group is specified
37817 if (this.columnGroup.isPadding()) {
37818 classes.push('ag-header-group-cell-no-group');
37819 var leafCols = this.columnGroup.getLeafColumns();
37820 if (leafCols.every(function (col) { return col.isSpanHeaderHeight(); })) {
37821 classes.push('ag-header-span-height');
37822 }
37823 }
37824 else {
37825 classes.push('ag-header-group-cell-with-group');
37826 }
37827 classes.forEach(function (c) { return _this.comp.addOrRemoveCssClass(c, true); });
37828 };
37829 HeaderGroupCellCtrl.prototype.setupMovingCss = function () {
37830 var _this = this;
37831 var providedColumnGroup = this.columnGroup.getProvidedColumnGroup();
37832 var leafColumns = providedColumnGroup.getLeafColumns();
37833 // this function adds or removes the moving css, based on if the col is moving.
37834 // this is what makes the header go dark when it is been moved (gives impression to
37835 // user that the column was picked up).
37836 var listener = function () { return _this.comp.addOrRemoveCssClass('ag-header-cell-moving', _this.columnGroup.isMoving()); };
37837 leafColumns.forEach(function (col) {
37838 _this.addManagedListener(col, _entities_column__WEBPACK_IMPORTED_MODULE_3__["Column"].EVENT_MOVING_CHANGED, listener);
37839 });
37840 listener();
37841 };
37842 HeaderGroupCellCtrl.prototype.onFocusIn = function (e) {
37843 if (!this.eGui.contains(e.relatedTarget)) {
37844 var rowIndex = this.getRowIndex();
37845 this.beans.focusService.setFocusedHeader(rowIndex, this.columnGroup);
37846 }
37847 };
37848 HeaderGroupCellCtrl.prototype.handleKeyDown = function (e) {
37849 _super.prototype.handleKeyDown.call(this, e);
37850 var wrapperHasFocus = this.getWrapperHasFocus();
37851 if (!this.expandable || !wrapperHasFocus) {
37852 return;
37853 }
37854 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].ENTER) {
37855 var column = this.columnGroup;
37856 var newExpandedValue = !column.isExpanded();
37857 this.columnModel.setColumnGroupOpened(column.getProvidedColumnGroup(), newExpandedValue, "uiColumnExpanded");
37858 }
37859 };
37860 // unlike columns, this will only get called once, as we don't react on props on column groups
37861 // (we will always destroy and recreate this comp if something changes)
37862 HeaderGroupCellCtrl.prototype.setDragSource = function (eHeaderGroup) {
37863 var _this = this;
37864 if (this.isSuppressMoving()) {
37865 return;
37866 }
37867 var allLeafColumns = this.columnGroup.getProvidedColumnGroup().getLeafColumns();
37868 var hideColumnOnExit = !this.gridOptionsService.is('suppressDragLeaveHidesColumns');
37869 var dragSource = {
37870 type: _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragSourceType"].HeaderCell,
37871 eElement: eHeaderGroup,
37872 defaultIconName: hideColumnOnExit ? _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_HIDE : _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_2__["DragAndDropService"].ICON_NOT_ALLOWED,
37873 dragItemName: this.displayName,
37874 // we add in the original group leaf columns, so we move both visible and non-visible items
37875 getDragItem: this.getDragItemForGroup.bind(this),
37876 onDragStarted: function () { return allLeafColumns.forEach(function (col) { return col.setMoving(true, "uiColumnDragged"); }); },
37877 onDragStopped: function () { return allLeafColumns.forEach(function (col) { return col.setMoving(false, "uiColumnDragged"); }); },
37878 onGridEnter: function (dragItem) {
37879 var _a;
37880 if (hideColumnOnExit) {
37881 var unlockedColumns = ((_a = dragItem === null || dragItem === void 0 ? void 0 : dragItem.columns) === null || _a === void 0 ? void 0 : _a.filter(function (col) { return !col.getColDef().lockVisible; })) || [];
37882 _this.columnModel.setColumnsVisible(unlockedColumns, true, "uiColumnMoved");
37883 }
37884 },
37885 onGridExit: function (dragItem) {
37886 var _a;
37887 if (hideColumnOnExit) {
37888 var unlockedColumns = ((_a = dragItem === null || dragItem === void 0 ? void 0 : dragItem.columns) === null || _a === void 0 ? void 0 : _a.filter(function (col) { return !col.getColDef().lockVisible; })) || [];
37889 _this.columnModel.setColumnsVisible(unlockedColumns, false, "uiColumnMoved");
37890 }
37891 },
37892 };
37893 this.dragAndDropService.addDragSource(dragSource, true);
37894 this.addDestroyFunc(function () { return _this.dragAndDropService.removeDragSource(dragSource); });
37895 };
37896 // when moving the columns, we want to move all the columns (contained within the DragItem) in this group in one go,
37897 // and in the order they are currently in the screen.
37898 HeaderGroupCellCtrl.prototype.getDragItemForGroup = function () {
37899 var allColumnsOriginalOrder = this.columnGroup.getProvidedColumnGroup().getLeafColumns();
37900 // capture visible state, used when re-entering grid to dictate which columns should be visible
37901 var visibleState = {};
37902 allColumnsOriginalOrder.forEach(function (column) { return visibleState[column.getId()] = column.isVisible(); });
37903 var allColumnsCurrentOrder = [];
37904 this.columnModel.getAllDisplayedColumns().forEach(function (column) {
37905 if (allColumnsOriginalOrder.indexOf(column) >= 0) {
37906 allColumnsCurrentOrder.push(column);
37907 Object(_utils_array__WEBPACK_IMPORTED_MODULE_6__["removeFromArray"])(allColumnsOriginalOrder, column);
37908 }
37909 });
37910 // we are left with non-visible columns, stick these in at the end
37911 allColumnsOriginalOrder.forEach(function (column) { return allColumnsCurrentOrder.push(column); });
37912 // create and return dragItem
37913 return {
37914 columns: allColumnsCurrentOrder,
37915 visibleState: visibleState
37916 };
37917 };
37918 HeaderGroupCellCtrl.prototype.isSuppressMoving = function () {
37919 // if any child is fixed, then don't allow moving
37920 var childSuppressesMoving = false;
37921 this.columnGroup.getLeafColumns().forEach(function (column) {
37922 if (column.getColDef().suppressMovable || column.getColDef().lockPosition) {
37923 childSuppressesMoving = true;
37924 }
37925 });
37926 var result = childSuppressesMoving || this.gridOptionsService.is('suppressMovableColumns');
37927 return result;
37928 };
37929 __decorate([
37930 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
37931 ], HeaderGroupCellCtrl.prototype, "columnModel", void 0);
37932 __decorate([
37933 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('dragAndDropService')
37934 ], HeaderGroupCellCtrl.prototype, "dragAndDropService", void 0);
37935 __decorate([
37936 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridApi')
37937 ], HeaderGroupCellCtrl.prototype, "gridApi", void 0);
37938 __decorate([
37939 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnApi')
37940 ], HeaderGroupCellCtrl.prototype, "columnApi", void 0);
37941 return HeaderGroupCellCtrl;
37942}(_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_9__["AbstractHeaderCellCtrl"]));
37943
37944
37945
37946/***/ }),
37947/* 166 */
37948/***/ (function(module, __webpack_exports__, __webpack_require__) {
37949
37950"use strict";
37951__webpack_require__.r(__webpack_exports__);
37952/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupResizeFeature", function() { return GroupResizeFeature; });
37953/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
37954/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
37955/**
37956 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
37957 * @version v29.2.0
37958 * @link https://www.ag-grid.com/
37959 * @license MIT
37960 */
37961var __extends = (undefined && undefined.__extends) || (function () {
37962 var extendStatics = function (d, b) {
37963 extendStatics = Object.setPrototypeOf ||
37964 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
37965 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
37966 return extendStatics(d, b);
37967 };
37968 return function (d, b) {
37969 extendStatics(d, b);
37970 function __() { this.constructor = d; }
37971 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
37972 };
37973})();
37974var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
37975 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
37976 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37977 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;
37978 return c > 3 && r && Object.defineProperty(target, key, r), r;
37979};
37980
37981
37982var GroupResizeFeature = /** @class */ (function (_super) {
37983 __extends(GroupResizeFeature, _super);
37984 function GroupResizeFeature(comp, eResize, pinned, columnGroup) {
37985 var _this = _super.call(this) || this;
37986 _this.eResize = eResize;
37987 _this.comp = comp;
37988 _this.pinned = pinned;
37989 _this.columnGroup = columnGroup;
37990 return _this;
37991 }
37992 GroupResizeFeature.prototype.postConstruct = function () {
37993 var _this = this;
37994 if (!this.columnGroup.isResizable()) {
37995 this.comp.setResizableDisplayed(false);
37996 return;
37997 }
37998 var finishedWithResizeFunc = this.horizontalResizeService.addResizeBar({
37999 eResizeBar: this.eResize,
38000 onResizeStart: this.onResizeStart.bind(this),
38001 onResizing: this.onResizing.bind(this, false),
38002 onResizeEnd: this.onResizing.bind(this, true)
38003 });
38004 this.addDestroyFunc(finishedWithResizeFunc);
38005 if (!this.gridOptionsService.is('suppressAutoSize')) {
38006 var skipHeaderOnAutoSize_1 = this.gridOptionsService.is('skipHeaderOnAutoSize');
38007 this.eResize.addEventListener('dblclick', function () {
38008 // get list of all the column keys we are responsible for
38009 var keys = [];
38010 var leafCols = _this.columnGroup.getDisplayedLeafColumns();
38011 leafCols.forEach(function (column) {
38012 // not all cols in the group may be participating with auto-resize
38013 if (!column.getColDef().suppressAutoSize) {
38014 keys.push(column.getColId());
38015 }
38016 });
38017 if (keys.length > 0) {
38018 _this.columnModel.autoSizeColumns({
38019 columns: keys,
38020 skipHeader: skipHeaderOnAutoSize_1,
38021 stopAtGroup: _this.columnGroup,
38022 source: 'uiColumnResized'
38023 });
38024 }
38025 _this.resizeLeafColumnsToFit();
38026 });
38027 }
38028 };
38029 GroupResizeFeature.prototype.onResizeStart = function (shiftKey) {
38030 var _this = this;
38031 this.calculateInitialValues();
38032 var takeFromGroup = null;
38033 if (shiftKey) {
38034 takeFromGroup = this.columnModel.getDisplayedGroupAfter(this.columnGroup);
38035 }
38036 if (takeFromGroup) {
38037 var takeFromLeafCols = takeFromGroup.getDisplayedLeafColumns();
38038 this.resizeTakeFromCols = takeFromLeafCols.filter(function (col) { return col.isResizable(); });
38039 this.resizeTakeFromStartWidth = 0;
38040 this.resizeTakeFromCols.forEach(function (col) { return _this.resizeTakeFromStartWidth += col.getActualWidth(); });
38041 this.resizeTakeFromRatios = [];
38042 this.resizeTakeFromCols.forEach(function (col) { return _this.resizeTakeFromRatios.push(col.getActualWidth() / _this.resizeTakeFromStartWidth); });
38043 }
38044 else {
38045 this.resizeTakeFromCols = null;
38046 this.resizeTakeFromStartWidth = null;
38047 this.resizeTakeFromRatios = null;
38048 }
38049 this.comp.addOrRemoveCssClass('ag-column-resizing', true);
38050 };
38051 GroupResizeFeature.prototype.onResizing = function (finished, resizeAmount) {
38052 var resizeAmountNormalised = this.normaliseDragChange(resizeAmount);
38053 var width = this.resizeStartWidth + resizeAmountNormalised;
38054 this.resizeColumns(width, finished);
38055 };
38056 GroupResizeFeature.prototype.resizeLeafColumnsToFit = function () {
38057 var preferredSize = this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup);
38058 this.calculateInitialValues();
38059 if (preferredSize > this.resizeStartWidth) {
38060 this.resizeColumns(preferredSize, true);
38061 }
38062 };
38063 GroupResizeFeature.prototype.resizeColumns = function (totalWidth, finished) {
38064 if (finished === void 0) { finished = true; }
38065 var resizeSets = [];
38066 resizeSets.push({
38067 columns: this.resizeCols,
38068 ratios: this.resizeRatios,
38069 width: totalWidth
38070 });
38071 if (this.resizeTakeFromCols) {
38072 var diff = totalWidth - this.resizeStartWidth;
38073 resizeSets.push({
38074 columns: this.resizeTakeFromCols,
38075 ratios: this.resizeTakeFromRatios,
38076 width: this.resizeTakeFromStartWidth - diff
38077 });
38078 }
38079 this.columnModel.resizeColumnSets({
38080 resizeSets: resizeSets,
38081 finished: finished,
38082 source: 'uiColumnDragged'
38083 });
38084 if (finished) {
38085 this.comp.addOrRemoveCssClass('ag-column-resizing', false);
38086 }
38087 };
38088 GroupResizeFeature.prototype.calculateInitialValues = function () {
38089 var _this = this;
38090 var leafCols = this.columnGroup.getDisplayedLeafColumns();
38091 this.resizeCols = leafCols.filter(function (col) { return col.isResizable(); });
38092 this.resizeStartWidth = 0;
38093 this.resizeCols.forEach(function (col) { return _this.resizeStartWidth += col.getActualWidth(); });
38094 this.resizeRatios = [];
38095 this.resizeCols.forEach(function (col) { return _this.resizeRatios.push(col.getActualWidth() / _this.resizeStartWidth); });
38096 };
38097 // optionally inverts the drag, depending on pinned and RTL
38098 // note - this method is duplicated in RenderedHeaderCell - should refactor out?
38099 GroupResizeFeature.prototype.normaliseDragChange = function (dragChange) {
38100 var result = dragChange;
38101 if (this.gridOptionsService.is('enableRtl')) {
38102 // for RTL, dragging left makes the col bigger, except when pinning left
38103 if (this.pinned !== 'left') {
38104 result *= -1;
38105 }
38106 }
38107 else if (this.pinned === 'right') {
38108 // for LTR (ie normal), dragging left makes the col smaller, except when pinning right
38109 result *= -1;
38110 }
38111 return result;
38112 };
38113 __decorate([
38114 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('horizontalResizeService')
38115 ], GroupResizeFeature.prototype, "horizontalResizeService", void 0);
38116 __decorate([
38117 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('autoWidthCalculator')
38118 ], GroupResizeFeature.prototype, "autoWidthCalculator", void 0);
38119 __decorate([
38120 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
38121 ], GroupResizeFeature.prototype, "columnModel", void 0);
38122 __decorate([
38123 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
38124 ], GroupResizeFeature.prototype, "postConstruct", null);
38125 return GroupResizeFeature;
38126}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
38127
38128
38129
38130/***/ }),
38131/* 167 */
38132/***/ (function(module, __webpack_exports__, __webpack_require__) {
38133
38134"use strict";
38135__webpack_require__.r(__webpack_exports__);
38136/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupWidthFeature", function() { return GroupWidthFeature; });
38137/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
38138/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
38139/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21);
38140/**
38141 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38142 * @version v29.2.0
38143 * @link https://www.ag-grid.com/
38144 * @license MIT
38145 */
38146var __extends = (undefined && undefined.__extends) || (function () {
38147 var extendStatics = function (d, b) {
38148 extendStatics = Object.setPrototypeOf ||
38149 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38150 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
38151 return extendStatics(d, b);
38152 };
38153 return function (d, b) {
38154 extendStatics(d, b);
38155 function __() { this.constructor = d; }
38156 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38157 };
38158})();
38159var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38160 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38161 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38162 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;
38163 return c > 3 && r && Object.defineProperty(target, key, r), r;
38164};
38165
38166
38167
38168var GroupWidthFeature = /** @class */ (function (_super) {
38169 __extends(GroupWidthFeature, _super);
38170 function GroupWidthFeature(comp, columnGroup) {
38171 var _this = _super.call(this) || this;
38172 // the children can change, we keep destroy functions related to listening to the children here
38173 _this.removeChildListenersFuncs = [];
38174 _this.columnGroup = columnGroup;
38175 _this.comp = comp;
38176 return _this;
38177 }
38178 GroupWidthFeature.prototype.postConstruct = function () {
38179 // we need to listen to changes in child columns, as they impact our width
38180 this.addListenersToChildrenColumns();
38181 // the children belonging to this group can change, so we need to add and remove listeners as they change
38182 this.addManagedListener(this.columnGroup, _entities_columnGroup__WEBPACK_IMPORTED_MODULE_2__["ColumnGroup"].EVENT_DISPLAYED_CHILDREN_CHANGED, this.onDisplayedChildrenChanged.bind(this));
38183 this.onWidthChanged();
38184 // the child listeners are not tied to this components life-cycle, as children can get added and removed
38185 // to the group - hence they are on a different life-cycle. so we must make sure the existing children
38186 // listeners are removed when we finally get destroyed
38187 this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this));
38188 };
38189 GroupWidthFeature.prototype.addListenersToChildrenColumns = function () {
38190 var _this = this;
38191 // first destroy any old listeners
38192 this.removeListenersOnChildrenColumns();
38193 // now add new listeners to the new set of children
38194 var widthChangedListener = this.onWidthChanged.bind(this);
38195 this.columnGroup.getLeafColumns().forEach(function (column) {
38196 column.addEventListener('widthChanged', widthChangedListener);
38197 column.addEventListener('visibleChanged', widthChangedListener);
38198 _this.removeChildListenersFuncs.push(function () {
38199 column.removeEventListener('widthChanged', widthChangedListener);
38200 column.removeEventListener('visibleChanged', widthChangedListener);
38201 });
38202 });
38203 };
38204 GroupWidthFeature.prototype.removeListenersOnChildrenColumns = function () {
38205 this.removeChildListenersFuncs.forEach(function (func) { return func(); });
38206 this.removeChildListenersFuncs = [];
38207 };
38208 GroupWidthFeature.prototype.onDisplayedChildrenChanged = function () {
38209 this.addListenersToChildrenColumns();
38210 this.onWidthChanged();
38211 };
38212 GroupWidthFeature.prototype.onWidthChanged = function () {
38213 var columnWidth = this.columnGroup.getActualWidth();
38214 this.comp.setWidth(columnWidth + "px");
38215 this.comp.addOrRemoveCssClass('ag-hidden', columnWidth === 0);
38216 };
38217 __decorate([
38218 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
38219 ], GroupWidthFeature.prototype, "postConstruct", null);
38220 return GroupWidthFeature;
38221}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
38222
38223
38224
38225/***/ }),
38226/* 168 */
38227/***/ (function(module, __webpack_exports__, __webpack_require__) {
38228
38229"use strict";
38230__webpack_require__.r(__webpack_exports__);
38231/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridHeaderComp", function() { return GridHeaderComp; });
38232/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
38233/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38);
38234/* harmony import */ var _gridHeaderCtrl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(169);
38235/* harmony import */ var _rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(152);
38236/**
38237 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38238 * @version v29.2.0
38239 * @link https://www.ag-grid.com/
38240 * @license MIT
38241 */
38242var __extends = (undefined && undefined.__extends) || (function () {
38243 var extendStatics = function (d, b) {
38244 extendStatics = Object.setPrototypeOf ||
38245 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38246 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
38247 return extendStatics(d, b);
38248 };
38249 return function (d, b) {
38250 extendStatics(d, b);
38251 function __() { this.constructor = d; }
38252 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38253 };
38254})();
38255var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38256 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38257 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38258 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;
38259 return c > 3 && r && Object.defineProperty(target, key, r), r;
38260};
38261
38262
38263
38264
38265var GridHeaderComp = /** @class */ (function (_super) {
38266 __extends(GridHeaderComp, _super);
38267 function GridHeaderComp() {
38268 return _super.call(this, GridHeaderComp.TEMPLATE) || this;
38269 }
38270 GridHeaderComp.prototype.postConstruct = function () {
38271 var _this = this;
38272 var compProxy = {
38273 addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },
38274 setHeightAndMinHeight: function (height) {
38275 _this.getGui().style.height = height;
38276 _this.getGui().style.minHeight = height;
38277 }
38278 };
38279 var ctrl = this.createManagedBean(new _gridHeaderCtrl__WEBPACK_IMPORTED_MODULE_2__["GridHeaderCtrl"]());
38280 ctrl.setComp(compProxy, this.getGui(), this.getFocusableElement());
38281 var addContainer = function (container) {
38282 _this.createManagedBean(container);
38283 _this.appendChild(container);
38284 };
38285 addContainer(new _rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_3__["HeaderRowContainerComp"]('left'));
38286 addContainer(new _rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_3__["HeaderRowContainerComp"](null));
38287 addContainer(new _rowContainer_headerRowContainerComp__WEBPACK_IMPORTED_MODULE_3__["HeaderRowContainerComp"]('right'));
38288 };
38289 GridHeaderComp.TEMPLATE = "<div class=\"ag-header\" role=\"presentation\"/>";
38290 __decorate([
38291 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
38292 ], GridHeaderComp.prototype, "postConstruct", null);
38293 return GridHeaderComp;
38294}(_widgets_component__WEBPACK_IMPORTED_MODULE_1__["Component"]));
38295
38296
38297
38298/***/ }),
38299/* 169 */
38300/***/ (function(module, __webpack_exports__, __webpack_require__) {
38301
38302"use strict";
38303__webpack_require__.r(__webpack_exports__);
38304/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridHeaderCtrl", function() { return GridHeaderCtrl; });
38305/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(48);
38306/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
38307/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
38308/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
38309/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
38310/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(64);
38311/* harmony import */ var _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(170);
38312/**
38313 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38314 * @version v29.2.0
38315 * @link https://www.ag-grid.com/
38316 * @license MIT
38317 */
38318var __extends = (undefined && undefined.__extends) || (function () {
38319 var extendStatics = function (d, b) {
38320 extendStatics = Object.setPrototypeOf ||
38321 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38322 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
38323 return extendStatics(d, b);
38324 };
38325 return function (d, b) {
38326 extendStatics(d, b);
38327 function __() { this.constructor = d; }
38328 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38329 };
38330})();
38331var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38332 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38333 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38334 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;
38335 return c > 3 && r && Object.defineProperty(target, key, r), r;
38336};
38337
38338
38339
38340
38341
38342
38343
38344var GridHeaderCtrl = /** @class */ (function (_super) {
38345 __extends(GridHeaderCtrl, _super);
38346 function GridHeaderCtrl() {
38347 return _super !== null && _super.apply(this, arguments) || this;
38348 }
38349 GridHeaderCtrl.prototype.setComp = function (comp, eGui, eFocusableElement) {
38350 this.comp = comp;
38351 this.eGui = eGui;
38352 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_5__["ManagedFocusFeature"](eFocusableElement, {
38353 onTabKeyDown: this.onTabKeyDown.bind(this),
38354 handleKeyDown: this.handleKeyDown.bind(this),
38355 onFocusOut: this.onFocusOut.bind(this)
38356 }));
38357 // for setting ag-pivot-on / ag-pivot-off CSS classes
38358 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onPivotModeChanged.bind(this));
38359 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));
38360 this.onPivotModeChanged();
38361 this.setupHeaderHeight();
38362 this.ctrlsService.registerGridHeaderCtrl(this);
38363 };
38364 GridHeaderCtrl.prototype.setupHeaderHeight = function () {
38365 var listener = this.setHeaderHeight.bind(this);
38366 listener();
38367 this.addManagedPropertyListener('headerHeight', listener);
38368 this.addManagedPropertyListener('pivotHeaderHeight', listener);
38369 this.addManagedPropertyListener('groupHeaderHeight', listener);
38370 this.addManagedPropertyListener('pivotGroupHeaderHeight', listener);
38371 this.addManagedPropertyListener('floatingFiltersHeight', listener);
38372 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, listener);
38373 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_COLUMN_HEADER_HEIGHT_CHANGED, listener);
38374 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_GRID_STYLES_CHANGED, listener);
38375 };
38376 GridHeaderCtrl.prototype.getHeaderHeight = function () {
38377 return this.headerHeight;
38378 };
38379 GridHeaderCtrl.prototype.setHeaderHeight = function () {
38380 var columnModel = this.columnModel;
38381 var numberOfFloating = 0;
38382 var headerRowCount = columnModel.getHeaderRowCount();
38383 var totalHeaderHeight;
38384 var hasFloatingFilters = columnModel.hasFloatingFilters();
38385 if (hasFloatingFilters) {
38386 headerRowCount++;
38387 numberOfFloating = 1;
38388 }
38389 var groupHeight = this.columnModel.getColumnGroupHeaderRowHeight();
38390 var headerHeight = this.columnModel.getColumnHeaderRowHeight();
38391 var numberOfNonGroups = 1 + numberOfFloating;
38392 var numberOfGroups = headerRowCount - numberOfNonGroups;
38393 totalHeaderHeight = numberOfFloating * columnModel.getFloatingFiltersHeight();
38394 totalHeaderHeight += numberOfGroups * groupHeight;
38395 totalHeaderHeight += headerHeight;
38396 if (this.headerHeight === totalHeaderHeight) {
38397 return;
38398 }
38399 this.headerHeight = totalHeaderHeight;
38400 // one extra pixel is needed here to account for the
38401 // height of the border
38402 var px = totalHeaderHeight + 1 + "px";
38403 this.comp.setHeightAndMinHeight(px);
38404 this.eventService.dispatchEvent({
38405 type: _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_HEADER_HEIGHT_CHANGED
38406 });
38407 };
38408 GridHeaderCtrl.prototype.onPivotModeChanged = function () {
38409 var pivotMode = this.columnModel.isPivotMode();
38410 this.comp.addOrRemoveCssClass('ag-pivot-on', pivotMode);
38411 this.comp.addOrRemoveCssClass('ag-pivot-off', !pivotMode);
38412 };
38413 GridHeaderCtrl.prototype.onDisplayedColumnsChanged = function () {
38414 var columns = this.columnModel.getAllDisplayedColumns();
38415 var shouldAllowOverflow = columns.some(function (col) { return col.isSpanHeaderHeight(); });
38416 this.comp.addOrRemoveCssClass('ag-header-allow-overflow', shouldAllowOverflow);
38417 };
38418 GridHeaderCtrl.prototype.onTabKeyDown = function (e) {
38419 var isRtl = this.gridOptionsService.is('enableRtl');
38420 var direction = e.shiftKey !== isRtl
38421 ? _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_6__["HeaderNavigationDirection"].LEFT
38422 : _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_6__["HeaderNavigationDirection"].RIGHT;
38423 if (this.headerNavigationService.navigateHorizontally(direction, true, e) ||
38424 this.focusService.focusNextGridCoreContainer(e.shiftKey)) {
38425 e.preventDefault();
38426 }
38427 };
38428 GridHeaderCtrl.prototype.handleKeyDown = function (e) {
38429 var direction = null;
38430 switch (e.key) {
38431 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].LEFT:
38432 direction = _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_6__["HeaderNavigationDirection"].LEFT;
38433 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].RIGHT:
38434 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(direction)) {
38435 direction = _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_6__["HeaderNavigationDirection"].RIGHT;
38436 }
38437 this.headerNavigationService.navigateHorizontally(direction, false, e);
38438 break;
38439 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].UP:
38440 direction = _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_6__["HeaderNavigationDirection"].UP;
38441 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_0__["KeyCode"].DOWN:
38442 if (!Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(direction)) {
38443 direction = _common_headerNavigationService__WEBPACK_IMPORTED_MODULE_6__["HeaderNavigationDirection"].DOWN;
38444 }
38445 if (this.headerNavigationService.navigateVertically(direction, null, e)) {
38446 e.preventDefault();
38447 }
38448 break;
38449 default:
38450 return;
38451 }
38452 };
38453 GridHeaderCtrl.prototype.onFocusOut = function (e) {
38454 var eDocument = this.gridOptionsService.getDocument();
38455 var relatedTarget = e.relatedTarget;
38456 if (!relatedTarget && this.eGui.contains(eDocument.activeElement)) {
38457 return;
38458 }
38459 if (!this.eGui.contains(relatedTarget)) {
38460 this.focusService.clearFocusedHeader();
38461 }
38462 };
38463 __decorate([
38464 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('headerNavigationService')
38465 ], GridHeaderCtrl.prototype, "headerNavigationService", void 0);
38466 __decorate([
38467 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('focusService')
38468 ], GridHeaderCtrl.prototype, "focusService", void 0);
38469 __decorate([
38470 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('columnModel')
38471 ], GridHeaderCtrl.prototype, "columnModel", void 0);
38472 __decorate([
38473 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('ctrlsService')
38474 ], GridHeaderCtrl.prototype, "ctrlsService", void 0);
38475 return GridHeaderCtrl;
38476}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
38477
38478
38479
38480/***/ }),
38481/* 170 */
38482/***/ (function(module, __webpack_exports__, __webpack_require__) {
38483
38484"use strict";
38485__webpack_require__.r(__webpack_exports__);
38486/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationDirection", function() { return HeaderNavigationDirection; });
38487/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationService", function() { return HeaderNavigationService; });
38488/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
38489/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
38490/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21);
38491/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
38492/**
38493 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38494 * @version v29.2.0
38495 * @link https://www.ag-grid.com/
38496 * @license MIT
38497 */
38498var __extends = (undefined && undefined.__extends) || (function () {
38499 var extendStatics = function (d, b) {
38500 extendStatics = Object.setPrototypeOf ||
38501 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38502 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
38503 return extendStatics(d, b);
38504 };
38505 return function (d, b) {
38506 extendStatics(d, b);
38507 function __() { this.constructor = d; }
38508 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38509 };
38510})();
38511var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38512 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38513 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38514 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;
38515 return c > 3 && r && Object.defineProperty(target, key, r), r;
38516};
38517
38518
38519
38520
38521var HeaderNavigationDirection;
38522(function (HeaderNavigationDirection) {
38523 HeaderNavigationDirection[HeaderNavigationDirection["UP"] = 0] = "UP";
38524 HeaderNavigationDirection[HeaderNavigationDirection["DOWN"] = 1] = "DOWN";
38525 HeaderNavigationDirection[HeaderNavigationDirection["LEFT"] = 2] = "LEFT";
38526 HeaderNavigationDirection[HeaderNavigationDirection["RIGHT"] = 3] = "RIGHT";
38527})(HeaderNavigationDirection || (HeaderNavigationDirection = {}));
38528var HeaderNavigationService = /** @class */ (function (_super) {
38529 __extends(HeaderNavigationService, _super);
38530 function HeaderNavigationService() {
38531 return _super !== null && _super.apply(this, arguments) || this;
38532 }
38533 HeaderNavigationService.prototype.postConstruct = function () {
38534 var _this = this;
38535 this.ctrlsService.whenReady(function (p) {
38536 _this.gridBodyCon = p.gridBodyCtrl;
38537 });
38538 };
38539 HeaderNavigationService.prototype.getHeaderRowCount = function () {
38540 var centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();
38541 return centerHeaderContainer ? centerHeaderContainer.getRowCount() : 0;
38542 };
38543 /*
38544 * This method navigates grid header vertically
38545 * @return {boolean} true to preventDefault on the event that caused this navigation.
38546 */
38547 HeaderNavigationService.prototype.navigateVertically = function (direction, fromHeader, event) {
38548 if (!fromHeader) {
38549 fromHeader = this.focusService.getFocusedHeader();
38550 }
38551 if (!fromHeader) {
38552 return false;
38553 }
38554 var headerRowIndex = fromHeader.headerRowIndex, column = fromHeader.column;
38555 var rowLen = this.getHeaderRowCount();
38556 var isUp = direction === HeaderNavigationDirection.UP;
38557 var _a = isUp
38558 ? this.headerPositionUtils.getColumnVisibleParent(column, headerRowIndex)
38559 : this.headerPositionUtils.getColumnVisibleChild(column, headerRowIndex), nextRow = _a.nextRow, nextFocusColumn = _a.nextFocusColumn;
38560 var skipColumn = false;
38561 if (nextRow < 0) {
38562 nextRow = 0;
38563 nextFocusColumn = column;
38564 skipColumn = true;
38565 }
38566 if (nextRow >= rowLen) {
38567 nextRow = -1; // -1 indicates the focus should move to grid rows.
38568 }
38569 if (!skipColumn && !nextFocusColumn) {
38570 return false;
38571 }
38572 return this.focusService.focusHeaderPosition({
38573 headerPosition: { headerRowIndex: nextRow, column: nextFocusColumn },
38574 allowUserOverride: true,
38575 event: event
38576 });
38577 };
38578 /*
38579 * This method navigates grid header horizontally
38580 * @return {boolean} true to preventDefault on the event that caused this navigation.
38581 */
38582 HeaderNavigationService.prototype.navigateHorizontally = function (direction, fromTab, event) {
38583 if (fromTab === void 0) { fromTab = false; }
38584 var focusedHeader = this.focusService.getFocusedHeader();
38585 var isLeft = direction === HeaderNavigationDirection.LEFT;
38586 var isRtl = this.gridOptionsService.is('enableRtl');
38587 var nextHeader;
38588 var normalisedDirection;
38589 // either navigating to the left or isRtl (cannot be both)
38590 if (isLeft !== isRtl) {
38591 normalisedDirection = 'Before';
38592 nextHeader = this.headerPositionUtils.findHeader(focusedHeader, normalisedDirection);
38593 }
38594 else {
38595 normalisedDirection = 'After';
38596 nextHeader = this.headerPositionUtils.findHeader(focusedHeader, normalisedDirection);
38597 }
38598 if (nextHeader || !fromTab) {
38599 return this.focusService.focusHeaderPosition({
38600 headerPosition: nextHeader,
38601 direction: normalisedDirection,
38602 fromTab: fromTab,
38603 allowUserOverride: true,
38604 event: event
38605 });
38606 }
38607 return this.focusNextHeaderRow(focusedHeader, normalisedDirection, event);
38608 };
38609 HeaderNavigationService.prototype.focusNextHeaderRow = function (focusedHeader, direction, event) {
38610 var currentIndex = focusedHeader.headerRowIndex;
38611 var nextPosition = null;
38612 var nextRowIndex;
38613 if (direction === 'Before') {
38614 if (currentIndex > 0) {
38615 nextRowIndex = currentIndex - 1;
38616 nextPosition = this.headerPositionUtils.findColAtEdgeForHeaderRow(nextRowIndex, 'end');
38617 }
38618 }
38619 else {
38620 nextRowIndex = currentIndex + 1;
38621 nextPosition = this.headerPositionUtils.findColAtEdgeForHeaderRow(nextRowIndex, 'start');
38622 }
38623 return this.focusService.focusHeaderPosition({
38624 headerPosition: nextPosition,
38625 direction: direction,
38626 fromTab: true,
38627 allowUserOverride: true,
38628 event: event
38629 });
38630 };
38631 HeaderNavigationService.prototype.scrollToColumn = function (column, direction) {
38632 if (direction === void 0) { direction = 'After'; }
38633 if (column.getPinned()) {
38634 return;
38635 }
38636 var columnToScrollTo;
38637 if (column instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_2__["ColumnGroup"]) {
38638 var columns = column.getDisplayedLeafColumns();
38639 columnToScrollTo = direction === 'Before' ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(columns) : columns[0];
38640 }
38641 else {
38642 columnToScrollTo = column;
38643 }
38644 this.gridBodyCon.getScrollFeature().ensureColumnVisible(columnToScrollTo);
38645 };
38646 __decorate([
38647 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('focusService')
38648 ], HeaderNavigationService.prototype, "focusService", void 0);
38649 __decorate([
38650 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('headerPositionUtils')
38651 ], HeaderNavigationService.prototype, "headerPositionUtils", void 0);
38652 __decorate([
38653 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
38654 ], HeaderNavigationService.prototype, "ctrlsService", void 0);
38655 __decorate([
38656 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
38657 ], HeaderNavigationService.prototype, "postConstruct", null);
38658 HeaderNavigationService = __decorate([
38659 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('headerNavigationService')
38660 ], HeaderNavigationService);
38661 return HeaderNavigationService;
38662}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
38663
38664
38665
38666/***/ }),
38667/* 171 */
38668/***/ (function(module, __webpack_exports__, __webpack_require__) {
38669
38670"use strict";
38671__webpack_require__.r(__webpack_exports__);
38672/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HorizontalResizeService", function() { return HorizontalResizeService; });
38673/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
38674/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
38675/**
38676 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38677 * @version v29.2.0
38678 * @link https://www.ag-grid.com/
38679 * @license MIT
38680 */
38681var __extends = (undefined && undefined.__extends) || (function () {
38682 var extendStatics = function (d, b) {
38683 extendStatics = Object.setPrototypeOf ||
38684 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38685 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
38686 return extendStatics(d, b);
38687 };
38688 return function (d, b) {
38689 extendStatics(d, b);
38690 function __() { this.constructor = d; }
38691 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38692 };
38693})();
38694var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38695 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38696 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38697 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;
38698 return c > 3 && r && Object.defineProperty(target, key, r), r;
38699};
38700
38701
38702var HorizontalResizeService = /** @class */ (function (_super) {
38703 __extends(HorizontalResizeService, _super);
38704 function HorizontalResizeService() {
38705 return _super !== null && _super.apply(this, arguments) || this;
38706 }
38707 HorizontalResizeService.prototype.addResizeBar = function (params) {
38708 var _this = this;
38709 var dragSource = {
38710 dragStartPixels: params.dragStartPixels || 0,
38711 eElement: params.eResizeBar,
38712 onDragStart: this.onDragStart.bind(this, params),
38713 onDragStop: this.onDragStop.bind(this, params),
38714 onDragging: this.onDragging.bind(this, params)
38715 };
38716 this.dragService.addDragSource(dragSource, true);
38717 // we pass remove func back to the caller, so call can tell us when they
38718 // are finished, and then we remove the listener from the drag source
38719 var finishedWithResizeFunc = function () { return _this.dragService.removeDragSource(dragSource); };
38720 return finishedWithResizeFunc;
38721 };
38722 HorizontalResizeService.prototype.onDragStart = function (params, mouseEvent) {
38723 this.dragStartX = mouseEvent.clientX;
38724 this.setResizeIcons();
38725 var shiftKey = mouseEvent instanceof MouseEvent && mouseEvent.shiftKey === true;
38726 params.onResizeStart(shiftKey);
38727 };
38728 HorizontalResizeService.prototype.setResizeIcons = function () {
38729 var ctrl = this.ctrlsService.getGridCtrl();
38730 // change the body cursor, so when drag moves out of the drag bar, the cursor is still 'resize' (or 'move'
38731 ctrl.setResizeCursor(true);
38732 // we don't want text selection outside the grid (otherwise it looks weird as text highlights when we move)
38733 ctrl.disableUserSelect(true);
38734 };
38735 HorizontalResizeService.prototype.onDragStop = function (params, mouseEvent) {
38736 params.onResizeEnd(this.resizeAmount);
38737 this.resetIcons();
38738 };
38739 HorizontalResizeService.prototype.resetIcons = function () {
38740 var ctrl = this.ctrlsService.getGridCtrl();
38741 ctrl.setResizeCursor(false);
38742 ctrl.disableUserSelect(false);
38743 };
38744 HorizontalResizeService.prototype.onDragging = function (params, mouseEvent) {
38745 this.resizeAmount = mouseEvent.clientX - this.dragStartX;
38746 params.onResizing(this.resizeAmount);
38747 };
38748 __decorate([
38749 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('dragService')
38750 ], HorizontalResizeService.prototype, "dragService", void 0);
38751 __decorate([
38752 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
38753 ], HorizontalResizeService.prototype, "ctrlsService", void 0);
38754 HorizontalResizeService = __decorate([
38755 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('horizontalResizeService')
38756 ], HorizontalResizeService);
38757 return HorizontalResizeService;
38758}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
38759
38760
38761
38762/***/ }),
38763/* 172 */
38764/***/ (function(module, __webpack_exports__, __webpack_require__) {
38765
38766"use strict";
38767__webpack_require__.r(__webpack_exports__);
38768/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandardMenuFactory", function() { return StandardMenuFactory; });
38769/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
38770/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
38771/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
38772/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48);
38773/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41);
38774/**
38775 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38776 * @version v29.2.0
38777 * @link https://www.ag-grid.com/
38778 * @license MIT
38779 */
38780var __extends = (undefined && undefined.__extends) || (function () {
38781 var extendStatics = function (d, b) {
38782 extendStatics = Object.setPrototypeOf ||
38783 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38784 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
38785 return extendStatics(d, b);
38786 };
38787 return function (d, b) {
38788 extendStatics(d, b);
38789 function __() { this.constructor = d; }
38790 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38791 };
38792})();
38793var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38794 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38795 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38796 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;
38797 return c > 3 && r && Object.defineProperty(target, key, r), r;
38798};
38799
38800
38801
38802
38803
38804var StandardMenuFactory = /** @class */ (function (_super) {
38805 __extends(StandardMenuFactory, _super);
38806 function StandardMenuFactory() {
38807 return _super !== null && _super.apply(this, arguments) || this;
38808 }
38809 StandardMenuFactory.prototype.hideActiveMenu = function () {
38810 if (this.hidePopup) {
38811 this.hidePopup();
38812 }
38813 };
38814 StandardMenuFactory.prototype.showMenuAfterMouseEvent = function (column, mouseEvent) {
38815 var _this = this;
38816 this.showPopup(column, function (eMenu) {
38817 _this.popupService.positionPopupUnderMouseEvent({
38818 column: column,
38819 type: 'columnMenu',
38820 mouseEvent: mouseEvent,
38821 ePopup: eMenu
38822 });
38823 }, 'columnMenu', mouseEvent.target);
38824 };
38825 StandardMenuFactory.prototype.showMenuAfterButtonClick = function (column, eventSource, containerType) {
38826 var _this = this;
38827 this.showPopup(column, function (eMenu) {
38828 _this.popupService.positionPopupByComponent({
38829 type: containerType,
38830 eventSource: eventSource,
38831 ePopup: eMenu,
38832 keepWithinBounds: true,
38833 position: 'under',
38834 column: column,
38835 shouldSetMaxHeight: true
38836 });
38837 }, containerType, eventSource);
38838 };
38839 StandardMenuFactory.prototype.showPopup = function (column, positionCallback, containerType, eventSource) {
38840 var _this = this;
38841 var filterWrapper = this.filterManager.getOrCreateFilterWrapper(column, 'COLUMN_MENU');
38842 if (!filterWrapper) {
38843 throw new Error('AG Grid - unable to show popup filter, filter instantiation failed');
38844 }
38845 var eMenu = document.createElement('div');
38846 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_4__["setAriaRole"])(eMenu, 'presentation');
38847 eMenu.classList.add('ag-menu');
38848 this.tabListener = this.addManagedListener(eMenu, 'keydown', function (e) { return _this.trapFocusWithin(e, eMenu); });
38849 filterWrapper.guiPromise.then(function (gui) { return eMenu.appendChild(gui); });
38850 var hidePopup;
38851 var afterGuiDetached = function () { var _a; return (_a = filterWrapper.filterPromise) === null || _a === void 0 ? void 0 : _a.then(function (filter) { var _a; return (_a = filter === null || filter === void 0 ? void 0 : filter.afterGuiDetached) === null || _a === void 0 ? void 0 : _a.call(filter); }); };
38852 var anchorToElement = eventSource || this.ctrlsService.getGridBodyCtrl().getGui();
38853 var closedCallback = function (e) {
38854 column.setMenuVisible(false, 'contextMenu');
38855 var isKeyboardEvent = e instanceof KeyboardEvent;
38856 if (_this.tabListener) {
38857 _this.tabListener = _this.tabListener();
38858 }
38859 if (isKeyboardEvent && eventSource && Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isVisible"])(eventSource)) {
38860 var focusableEl = _this.focusService.findTabbableParent(eventSource);
38861 if (focusableEl) {
38862 focusableEl.focus();
38863 }
38864 }
38865 afterGuiDetached();
38866 };
38867 var translate = this.localeService.getLocaleTextFunc();
38868 var addPopupRes = this.popupService.addPopup({
38869 modal: true,
38870 eChild: eMenu,
38871 closeOnEsc: true,
38872 closedCallback: closedCallback,
38873 positionCallback: function () { return positionCallback(eMenu); },
38874 anchorToElement: anchorToElement,
38875 ariaLabel: translate('ariaLabelColumnMenu', 'Column Menu')
38876 });
38877 if (addPopupRes) {
38878 this.hidePopup = hidePopup = addPopupRes.hideFunc;
38879 }
38880 filterWrapper.filterPromise.then(function (filter) {
38881 // need to make sure the filter is present before positioning, as only
38882 // after filter it is visible can we find out what the width of it is
38883 positionCallback(eMenu);
38884 if (filter.afterGuiAttached) {
38885 filter.afterGuiAttached({ container: containerType, hidePopup: hidePopup });
38886 }
38887 });
38888 column.setMenuVisible(true, 'contextMenu');
38889 };
38890 StandardMenuFactory.prototype.trapFocusWithin = function (e, menu) {
38891 if (e.key !== _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].TAB ||
38892 e.defaultPrevented ||
38893 this.focusService.findNextFocusableElement(menu, false, e.shiftKey)) {
38894 return;
38895 }
38896 e.preventDefault();
38897 this.focusService.focusInto(menu, e.shiftKey);
38898 };
38899 StandardMenuFactory.prototype.isMenuEnabled = function (column) {
38900 // for standard, we show menu if filter is enabled, and the menu is not suppressed
38901 return column.isFilterAllowed();
38902 };
38903 __decorate([
38904 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
38905 ], StandardMenuFactory.prototype, "filterManager", void 0);
38906 __decorate([
38907 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('popupService')
38908 ], StandardMenuFactory.prototype, "popupService", void 0);
38909 __decorate([
38910 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
38911 ], StandardMenuFactory.prototype, "focusService", void 0);
38912 __decorate([
38913 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
38914 ], StandardMenuFactory.prototype, "ctrlsService", void 0);
38915 StandardMenuFactory = __decorate([
38916 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('menuFactory')
38917 ], StandardMenuFactory);
38918 return StandardMenuFactory;
38919}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
38920
38921
38922
38923/***/ }),
38924/* 173 */
38925/***/ (function(module, __webpack_exports__, __webpack_require__) {
38926
38927"use strict";
38928__webpack_require__.r(__webpack_exports__);
38929/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabbedLayout", function() { return TabbedLayout; });
38930/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
38931/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64);
38932/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
38933/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41);
38934/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
38935/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(48);
38936/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38);
38937/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11);
38938/**
38939 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38940 * @version v29.2.0
38941 * @link https://www.ag-grid.com/
38942 * @license MIT
38943 */
38944var __extends = (undefined && undefined.__extends) || (function () {
38945 var extendStatics = function (d, b) {
38946 extendStatics = Object.setPrototypeOf ||
38947 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38948 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
38949 return extendStatics(d, b);
38950 };
38951 return function (d, b) {
38952 extendStatics(d, b);
38953 function __() { this.constructor = d; }
38954 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38955 };
38956})();
38957var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
38958 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38959 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38960 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;
38961 return c > 3 && r && Object.defineProperty(target, key, r), r;
38962};
38963
38964
38965
38966
38967
38968
38969
38970
38971var TabbedLayout = /** @class */ (function (_super) {
38972 __extends(TabbedLayout, _super);
38973 function TabbedLayout(params) {
38974 var _this = _super.call(this, TabbedLayout.getTemplate(params.cssClass)) || this;
38975 _this.items = [];
38976 _this.tabbedItemScrollMap = new Map();
38977 _this.params = params;
38978 if (params.items) {
38979 params.items.forEach(function (item) { return _this.addItem(item); });
38980 }
38981 return _this;
38982 }
38983 TabbedLayout.prototype.postConstruct = function () {
38984 var _this = this;
38985 this.createManagedBean(new _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_1__["ManagedFocusFeature"](this.getFocusableElement(), {
38986 onTabKeyDown: this.onTabKeyDown.bind(this),
38987 handleKeyDown: this.handleKeyDown.bind(this)
38988 }));
38989 this.addDestroyFunc(function () { var _a, _b, _c; return (_c = (_b = (_a = _this.activeItem) === null || _a === void 0 ? void 0 : _a.tabbedItem) === null || _b === void 0 ? void 0 : _b.afterDetachedCallback) === null || _c === void 0 ? void 0 : _c.call(_b); });
38990 };
38991 TabbedLayout.getTemplate = function (cssClass) {
38992 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>";
38993 };
38994 TabbedLayout.prototype.handleKeyDown = function (e) {
38995 var eDocument = this.gridOptionsService.getDocument();
38996 switch (e.key) {
38997 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].RIGHT:
38998 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].LEFT:
38999 if (!this.eHeader.contains(eDocument.activeElement)) {
39000 return;
39001 }
39002 var isRightKey = e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].RIGHT;
39003 var isRtl = this.gridOptionsService.is('enableRtl');
39004 var currentPosition = this.items.indexOf(this.activeItem);
39005 var nextPosition = isRightKey !== isRtl ? Math.min(currentPosition + 1, this.items.length - 1) : Math.max(currentPosition - 1, 0);
39006 if (currentPosition === nextPosition) {
39007 return;
39008 }
39009 e.preventDefault();
39010 var nextItem = this.items[nextPosition];
39011 this.showItemWrapper(nextItem);
39012 nextItem.eHeaderButton.focus();
39013 break;
39014 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].UP:
39015 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].DOWN:
39016 e.stopPropagation();
39017 break;
39018 }
39019 };
39020 TabbedLayout.prototype.onTabKeyDown = function (e) {
39021 if (e.defaultPrevented) {
39022 return;
39023 }
39024 var _a = this, focusService = _a.focusService, eHeader = _a.eHeader, eBody = _a.eBody, activeItem = _a.activeItem;
39025 var eDocument = this.gridOptionsService.getDocument();
39026 var activeElement = eDocument.activeElement;
39027 var target = e.target;
39028 e.preventDefault();
39029 if (eHeader.contains(activeElement)) {
39030 // focus is in header, move into body of popup
39031 focusService.focusInto(eBody, e.shiftKey);
39032 return;
39033 }
39034 var nextEl = null;
39035 if (focusService.isTargetUnderManagedComponent(eBody, target)) {
39036 if (e.shiftKey) {
39037 nextEl = this.focusService.findFocusableElementBeforeTabGuard(eBody, target);
39038 }
39039 if (!nextEl) {
39040 nextEl = activeItem.eHeaderButton;
39041 }
39042 }
39043 if (!nextEl && eBody.contains(activeElement)) {
39044 nextEl = focusService.findNextFocusableElement(eBody, false, e.shiftKey);
39045 if (!nextEl) {
39046 nextEl = activeItem.eHeaderButton;
39047 }
39048 }
39049 if (nextEl) {
39050 nextEl.focus();
39051 }
39052 };
39053 TabbedLayout.prototype.setAfterAttachedParams = function (params) {
39054 this.afterAttachedParams = params;
39055 };
39056 TabbedLayout.prototype.showFirstItem = function () {
39057 if (this.items.length > 0) {
39058 this.showItemWrapper(this.items[0]);
39059 }
39060 };
39061 TabbedLayout.prototype.addItem = function (item) {
39062 var eHeaderButton = document.createElement('span');
39063 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaRole"])(eHeaderButton, 'tab');
39064 eHeaderButton.setAttribute('tabIndex', '-1');
39065 eHeaderButton.appendChild(item.title);
39066 eHeaderButton.classList.add('ag-tab');
39067 this.eHeader.appendChild(eHeaderButton);
39068 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaLabel"])(eHeaderButton, item.titleLabel);
39069 var wrapper = {
39070 tabbedItem: item,
39071 eHeaderButton: eHeaderButton
39072 };
39073 this.items.push(wrapper);
39074 eHeaderButton.addEventListener('click', this.showItemWrapper.bind(this, wrapper));
39075 };
39076 TabbedLayout.prototype.showItem = function (tabbedItem) {
39077 var itemWrapper = this.items.find(function (wrapper) { return wrapper.tabbedItem === tabbedItem; });
39078 if (itemWrapper) {
39079 this.showItemWrapper(itemWrapper);
39080 }
39081 };
39082 TabbedLayout.prototype.showItemWrapper = function (wrapper) {
39083 var _this = this;
39084 var _a, _b;
39085 var tabbedItem = wrapper.tabbedItem, eHeaderButton = wrapper.eHeaderButton;
39086 if (this.params.onItemClicked) {
39087 this.params.onItemClicked({ item: tabbedItem });
39088 }
39089 if (this.activeItem === wrapper) {
39090 Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["callIfPresent"])(this.params.onActiveItemClicked);
39091 return;
39092 }
39093 if (this.lastScrollListener) {
39094 this.lastScrollListener = this.lastScrollListener();
39095 }
39096 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["clearElement"])(this.eBody);
39097 tabbedItem.bodyPromise.then(function (body) {
39098 _this.eBody.appendChild(body);
39099 var onlyUnmanaged = !_this.focusService.isKeyboardMode();
39100 _this.focusService.focusInto(_this.eBody, false, onlyUnmanaged);
39101 if (tabbedItem.afterAttachedCallback) {
39102 tabbedItem.afterAttachedCallback(_this.afterAttachedParams);
39103 }
39104 if (_this.params.keepScrollPosition) {
39105 var scrollableContainer_1 = (tabbedItem.getScrollableContainer && tabbedItem.getScrollableContainer()) || body;
39106 _this.lastScrollListener = _this.addManagedListener(scrollableContainer_1, 'scroll', function () {
39107 _this.tabbedItemScrollMap.set(tabbedItem.name, scrollableContainer_1.scrollTop);
39108 });
39109 var scrollPosition_1 = _this.tabbedItemScrollMap.get(tabbedItem.name);
39110 if (scrollPosition_1 !== undefined) {
39111 // Safari needs a small timeout or it will fire a scroll event to position 0
39112 setTimeout(function () {
39113 scrollableContainer_1.scrollTop = scrollPosition_1;
39114 }, 0);
39115 }
39116 }
39117 });
39118 if (this.activeItem) {
39119 this.activeItem.eHeaderButton.classList.remove('ag-tab-selected');
39120 (_b = (_a = this.activeItem.tabbedItem).afterDetachedCallback) === null || _b === void 0 ? void 0 : _b.call(_a);
39121 }
39122 eHeaderButton.classList.add('ag-tab-selected');
39123 this.activeItem = wrapper;
39124 };
39125 __decorate([
39126 Object(_context_context__WEBPACK_IMPORTED_MODULE_7__["Autowired"])('focusService')
39127 ], TabbedLayout.prototype, "focusService", void 0);
39128 __decorate([
39129 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eHeader')
39130 ], TabbedLayout.prototype, "eHeader", void 0);
39131 __decorate([
39132 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eBody')
39133 ], TabbedLayout.prototype, "eBody", void 0);
39134 __decorate([
39135 _context_context__WEBPACK_IMPORTED_MODULE_7__["PostConstruct"]
39136 ], TabbedLayout.prototype, "postConstruct", null);
39137 return TabbedLayout;
39138}(_widgets_component__WEBPACK_IMPORTED_MODULE_6__["Component"]));
39139
39140
39141
39142/***/ }),
39143/* 174 */
39144/***/ (function(module, __webpack_exports__, __webpack_require__) {
39145
39146"use strict";
39147__webpack_require__.r(__webpack_exports__);
39148/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simpleHttpRequest", function() { return simpleHttpRequest; });
39149/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39);
39150/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
39151/**
39152 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
39153 * @version v29.2.0
39154 * @link https://www.ag-grid.com/
39155 * @license MIT
39156 */
39157
39158
39159/**
39160 * @deprecated Since v29 simpleHttpRequest has been deprecated as it was only meant for use in internal AG Grid documentation examples. Please use the browser fetch api directly.
39161 */
39162function simpleHttpRequest(params) {
39163 Object(_utils_function__WEBPACK_IMPORTED_MODULE_1__["doOnce"])(function () { return console.warn("AG Grid: Since v29 simpleHttpRequest has been deprecated as it was only meant for use in internal AG Grid documentation examples. Please use the browser fetch api directly."); }, 'simpleHttpRequest');
39164 return new _utils__WEBPACK_IMPORTED_MODULE_0__["AgPromise"](function (resolve) {
39165 var httpRequest = new XMLHttpRequest();
39166 httpRequest.open('GET', params.url);
39167 httpRequest.send();
39168 httpRequest.onreadystatechange = function () {
39169 if (httpRequest.readyState === 4 && httpRequest.status === 200) {
39170 resolve(JSON.parse(httpRequest.responseText));
39171 }
39172 };
39173 });
39174}
39175
39176
39177/***/ }),
39178/* 175 */
39179/***/ (function(module, __webpack_exports__, __webpack_require__) {
39180
39181"use strict";
39182__webpack_require__.r(__webpack_exports__);
39183/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResizeObserverService", function() { return ResizeObserverService; });
39184/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
39185/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
39186/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
39187/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45);
39188/**
39189 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
39190 * @version v29.2.0
39191 * @link https://www.ag-grid.com/
39192 * @license MIT
39193 */
39194var __extends = (undefined && undefined.__extends) || (function () {
39195 var extendStatics = function (d, b) {
39196 extendStatics = Object.setPrototypeOf ||
39197 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
39198 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
39199 return extendStatics(d, b);
39200 };
39201 return function (d, b) {
39202 extendStatics(d, b);
39203 function __() { this.constructor = d; }
39204 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
39205 };
39206})();
39207var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
39208 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
39209 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
39210 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;
39211 return c > 3 && r && Object.defineProperty(target, key, r), r;
39212};
39213
39214
39215
39216
39217var DEBOUNCE_DELAY = 50;
39218var ResizeObserverService = /** @class */ (function (_super) {
39219 __extends(ResizeObserverService, _super);
39220 function ResizeObserverService() {
39221 var _this = _super !== null && _super.apply(this, arguments) || this;
39222 _this.polyfillFunctions = [];
39223 return _this;
39224 }
39225 ResizeObserverService.prototype.observeResize = function (element, callback) {
39226 var _this = this;
39227 var eDocument = this.gridOptionsService.getDocument();
39228 var win = (eDocument.defaultView || window);
39229 // this gets fired too often and might cause some relayout issues
39230 // so we add a debounce to the callback here to avoid the flashing effect.
39231 var debouncedCallback = Object(_utils_function__WEBPACK_IMPORTED_MODULE_2__["debounce"])(callback, DEBOUNCE_DELAY);
39232 var useBrowserResizeObserver = function () {
39233 var resizeObserver = new win.ResizeObserver(debouncedCallback);
39234 resizeObserver.observe(element);
39235 return function () { return resizeObserver.disconnect(); };
39236 };
39237 var usePolyfill = function () {
39238 // initialise to the current width and height, so first call will have no changes
39239 var widthLastTime = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["offsetWidth"])(element);
39240 var heightLastTime = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["offsetHeight"])(element);
39241 // when finished, this gets turned to false.
39242 var running = true;
39243 var periodicallyCheckWidthAndHeight = function () {
39244 if (running) {
39245 var newWidth = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["offsetWidth"])(element);
39246 var newHeight = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["offsetHeight"])(element);
39247 var changed = newWidth !== widthLastTime || newHeight !== heightLastTime;
39248 if (changed) {
39249 widthLastTime = newWidth;
39250 heightLastTime = newHeight;
39251 callback();
39252 }
39253 _this.doNextPolyfillTurn(periodicallyCheckWidthAndHeight);
39254 }
39255 };
39256 periodicallyCheckWidthAndHeight();
39257 // the callback function we return sets running to false
39258 return function () { return running = false; };
39259 };
39260 var suppressResize = this.gridOptionsService.is('suppressBrowserResizeObserver');
39261 var resizeObserverExists = !!win.ResizeObserver;
39262 if (resizeObserverExists && !suppressResize) {
39263 return useBrowserResizeObserver();
39264 }
39265 return usePolyfill();
39266 };
39267 ResizeObserverService.prototype.doNextPolyfillTurn = function (func) {
39268 this.polyfillFunctions.push(func);
39269 this.schedulePolyfill();
39270 };
39271 ResizeObserverService.prototype.schedulePolyfill = function () {
39272 var _this = this;
39273 if (this.polyfillScheduled) {
39274 return;
39275 }
39276 var executeAllFuncs = function () {
39277 var funcs = _this.polyfillFunctions;
39278 // make sure set scheduled to false and clear clear array
39279 // before executing the funcs, as the funcs could add more funcs
39280 _this.polyfillScheduled = false;
39281 _this.polyfillFunctions = [];
39282 funcs.forEach(function (f) { return f(); });
39283 };
39284 this.polyfillScheduled = true;
39285 this.getFrameworkOverrides().setTimeout(executeAllFuncs, DEBOUNCE_DELAY);
39286 };
39287 ResizeObserverService = __decorate([
39288 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('resizeObserverService')
39289 ], ResizeObserverService);
39290 return ResizeObserverService;
39291}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
39292
39293
39294
39295/***/ }),
39296/* 176 */
39297/***/ (function(module, __webpack_exports__, __webpack_require__) {
39298
39299"use strict";
39300__webpack_require__.r(__webpack_exports__);
39301/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameService", function() { return AnimationFrameService; });
39302/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
39303/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
39304/**
39305 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
39306 * @version v29.2.0
39307 * @link https://www.ag-grid.com/
39308 * @license MIT
39309 */
39310var __extends = (undefined && undefined.__extends) || (function () {
39311 var extendStatics = function (d, b) {
39312 extendStatics = Object.setPrototypeOf ||
39313 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
39314 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
39315 return extendStatics(d, b);
39316 };
39317 return function (d, b) {
39318 extendStatics(d, b);
39319 function __() { this.constructor = d; }
39320 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
39321 };
39322})();
39323var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
39324 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
39325 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
39326 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;
39327 return c > 3 && r && Object.defineProperty(target, key, r), r;
39328};
39329
39330
39331var AnimationFrameService = /** @class */ (function (_super) {
39332 __extends(AnimationFrameService, _super);
39333 function AnimationFrameService() {
39334 var _this = _super !== null && _super.apply(this, arguments) || this;
39335 // p1 and p2 are create tasks are to do with row and cell creation.
39336 // for them we want to execute according to row order, so we use
39337 // TaskItem so we know what index the item is for.
39338 _this.createTasksP1 = { list: [], sorted: false }; // eg drawing back-ground of rows
39339 _this.createTasksP2 = { list: [], sorted: false }; // eg cell renderers, adding hover functionality
39340 // destroy tasks are to do with row removal. they are done after row creation as the user will need to see new
39341 // rows first (as blank is scrolled into view), when we remove the old rows (no longer in view) is not as
39342 // important.
39343 _this.destroyTasks = [];
39344 _this.ticking = false;
39345 // we need to know direction of scroll, to build up rows in the direction of
39346 // the scroll. eg if user scrolls down, we extend the rows by building down.
39347 _this.scrollGoingDown = true;
39348 _this.lastPage = 0;
39349 _this.lastScrollTop = 0;
39350 _this.taskCount = 0;
39351 _this.cancelledTasks = new Set();
39352 return _this;
39353 }
39354 AnimationFrameService.prototype.setScrollTop = function (scrollTop) {
39355 var isPaginationActive = this.gridOptionsService.is('pagination');
39356 this.scrollGoingDown = scrollTop >= this.lastScrollTop;
39357 if (isPaginationActive && scrollTop === 0) {
39358 var currentPage = this.paginationProxy.getCurrentPage();
39359 if (currentPage !== this.lastPage) {
39360 this.lastPage = currentPage;
39361 this.scrollGoingDown = true;
39362 }
39363 }
39364 this.lastScrollTop = scrollTop;
39365 };
39366 AnimationFrameService.prototype.init = function () {
39367 this.useAnimationFrame = !this.gridOptionsService.is('suppressAnimationFrame');
39368 };
39369 AnimationFrameService.prototype.isOn = function () {
39370 return this.useAnimationFrame;
39371 };
39372 // this method is for our AG Grid sanity only - if animation frames are turned off,
39373 // then no place in the code should be looking to add any work to be done in animation
39374 // frames. this stops bugs - where some code is asking for a frame to be executed
39375 // when it should not.
39376 AnimationFrameService.prototype.verifyAnimationFrameOn = function (methodName) {
39377 if (this.useAnimationFrame === false) {
39378 console.warn("AG Grid: AnimationFrameService." + methodName + " called but animation frames are off");
39379 }
39380 };
39381 AnimationFrameService.prototype.createTask = function (task, index, list) {
39382 this.verifyAnimationFrameOn(list);
39383 var taskItem = { task: task, index: index, createOrder: ++this.taskCount };
39384 this.addTaskToList(this[list], taskItem);
39385 this.schedule();
39386 };
39387 AnimationFrameService.prototype.cancelTask = function (task) {
39388 this.cancelledTasks.add(task);
39389 };
39390 AnimationFrameService.prototype.addTaskToList = function (taskList, task) {
39391 taskList.list.push(task);
39392 taskList.sorted = false;
39393 };
39394 AnimationFrameService.prototype.sortTaskList = function (taskList) {
39395 if (taskList.sorted) {
39396 return;
39397 }
39398 var sortDirection = this.scrollGoingDown ? 1 : -1;
39399 // sort first by row index (taking into account scroll direction), then by
39400 // order of task creation (always ascending, so cells will render left-to-right)
39401 taskList.list.sort(function (a, b) { return a.index !== b.index ? sortDirection * (b.index - a.index) : b.createOrder - a.createOrder; });
39402 taskList.sorted = true;
39403 };
39404 AnimationFrameService.prototype.addDestroyTask = function (task) {
39405 this.verifyAnimationFrameOn('createTasksP3');
39406 this.destroyTasks.push(task);
39407 this.schedule();
39408 };
39409 AnimationFrameService.prototype.executeFrame = function (millis) {
39410 this.verifyAnimationFrameOn('executeFrame');
39411 var p1TaskList = this.createTasksP1;
39412 var p1Tasks = p1TaskList.list;
39413 var p2TaskList = this.createTasksP2;
39414 var p2Tasks = p2TaskList.list;
39415 var destroyTasks = this.destroyTasks;
39416 var frameStart = new Date().getTime();
39417 var duration = (new Date().getTime()) - frameStart;
39418 // 16ms is 60 fps
39419 var noMaxMillis = millis <= 0;
39420 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
39421 while (noMaxMillis || duration < millis) {
39422 var gridBodyDidSomething = gridBodyCon.getScrollFeature().scrollGridIfNeeded();
39423 if (!gridBodyDidSomething) {
39424 var task = void 0;
39425 if (p1Tasks.length) {
39426 this.sortTaskList(p1TaskList);
39427 task = p1Tasks.pop().task;
39428 }
39429 else if (p2Tasks.length) {
39430 this.sortTaskList(p2TaskList);
39431 task = p2Tasks.pop().task;
39432 }
39433 else if (destroyTasks.length) {
39434 task = destroyTasks.pop();
39435 }
39436 else {
39437 this.cancelledTasks.clear();
39438 break;
39439 }
39440 if (!this.cancelledTasks.has(task)) {
39441 task();
39442 }
39443 }
39444 duration = (new Date().getTime()) - frameStart;
39445 }
39446 if (p1Tasks.length || p2Tasks.length || destroyTasks.length) {
39447 this.requestFrame();
39448 }
39449 else {
39450 this.stopTicking();
39451 }
39452 };
39453 AnimationFrameService.prototype.stopTicking = function () {
39454 this.ticking = false;
39455 };
39456 AnimationFrameService.prototype.flushAllFrames = function () {
39457 if (!this.useAnimationFrame) {
39458 return;
39459 }
39460 this.executeFrame(-1);
39461 };
39462 AnimationFrameService.prototype.schedule = function () {
39463 if (!this.useAnimationFrame) {
39464 return;
39465 }
39466 if (!this.ticking) {
39467 this.ticking = true;
39468 this.requestFrame();
39469 }
39470 };
39471 AnimationFrameService.prototype.requestFrame = function () {
39472 // check for the existence of requestAnimationFrame, and if
39473 // it's missing, then we polyfill it with setTimeout()
39474 var callback = this.executeFrame.bind(this, 60);
39475 var eDocument = this.gridOptionsService.getDocument();
39476 var win = (eDocument.defaultView || window);
39477 if (win.requestAnimationFrame) {
39478 win.requestAnimationFrame(callback);
39479 }
39480 else if (win.webkitRequestAnimationFrame) {
39481 win.webkitRequestAnimationFrame(callback);
39482 }
39483 else {
39484 win.setTimeout(callback, 0);
39485 }
39486 };
39487 AnimationFrameService.prototype.isQueueEmpty = function () {
39488 return !this.ticking;
39489 };
39490 // a debounce utility used for parts of the app involved with rendering.
39491 // the advantage over normal debounce is the client can call flushAllFrames()
39492 // to make sure all rendering is complete. we don't wait any milliseconds,
39493 // as this is intended to batch calls in one VM turn.
39494 AnimationFrameService.prototype.debounce = function (func) {
39495 var _this = this;
39496 var pending = false;
39497 return function () {
39498 if (!_this.isOn()) {
39499 _this.getFrameworkOverrides().setTimeout(func, 0);
39500 return;
39501 }
39502 if (pending) {
39503 return;
39504 }
39505 pending = true;
39506 _this.addDestroyTask(function () {
39507 pending = false;
39508 func();
39509 });
39510 };
39511 };
39512 __decorate([
39513 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
39514 ], AnimationFrameService.prototype, "ctrlsService", void 0);
39515 __decorate([
39516 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
39517 ], AnimationFrameService.prototype, "paginationProxy", void 0);
39518 __decorate([
39519 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
39520 ], AnimationFrameService.prototype, "init", null);
39521 AnimationFrameService = __decorate([
39522 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('animationFrameService')
39523 ], AnimationFrameService);
39524 return AnimationFrameService;
39525}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
39526
39527
39528
39529/***/ }),
39530/* 177 */
39531/***/ (function(module, __webpack_exports__, __webpack_require__) {
39532
39533"use strict";
39534__webpack_require__.r(__webpack_exports__);
39535/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutoWidthCalculator", function() { return AutoWidthCalculator; });
39536/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
39537/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
39538/**
39539 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
39540 * @version v29.2.0
39541 * @link https://www.ag-grid.com/
39542 * @license MIT
39543 */
39544var __extends = (undefined && undefined.__extends) || (function () {
39545 var extendStatics = function (d, b) {
39546 extendStatics = Object.setPrototypeOf ||
39547 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
39548 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
39549 return extendStatics(d, b);
39550 };
39551 return function (d, b) {
39552 extendStatics(d, b);
39553 function __() { this.constructor = d; }
39554 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
39555 };
39556})();
39557var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
39558 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
39559 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
39560 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;
39561 return c > 3 && r && Object.defineProperty(target, key, r), r;
39562};
39563
39564
39565var AutoWidthCalculator = /** @class */ (function (_super) {
39566 __extends(AutoWidthCalculator, _super);
39567 function AutoWidthCalculator() {
39568 return _super !== null && _super.apply(this, arguments) || this;
39569 }
39570 AutoWidthCalculator.prototype.postConstruct = function () {
39571 var _this = this;
39572 this.ctrlsService.whenReady(function (p) {
39573 _this.centerRowContainerCtrl = p.centerRowContainerCtrl;
39574 });
39575 };
39576 // this is the trick: we create a dummy container and clone all the cells
39577 // into the dummy, then check the dummy's width. then destroy the dummy
39578 // as we don't need it any more.
39579 // drawback: only the cells visible on the screen are considered
39580 AutoWidthCalculator.prototype.getPreferredWidthForColumn = function (column, skipHeader) {
39581 var eHeaderCell = this.getHeaderCellForColumn(column);
39582 // cell isn't visible
39583 if (!eHeaderCell) {
39584 return -1;
39585 }
39586 var elements = this.rowRenderer.getAllCellsForColumn(column);
39587 if (!skipHeader) {
39588 // we only consider the lowest level cell, not the group cell. in 99% of the time, this
39589 // will be enough. if we consider groups, then it gets too complicated for what it's worth,
39590 // as the groups can span columns and this class only considers one column at a time.
39591 elements.push(eHeaderCell);
39592 }
39593 return this.addElementsToContainerAndGetWidth(elements);
39594 };
39595 AutoWidthCalculator.prototype.getPreferredWidthForColumnGroup = function (columnGroup) {
39596 var eHeaderCell = this.getHeaderCellForColumn(columnGroup);
39597 if (!eHeaderCell) {
39598 return -1;
39599 }
39600 return this.addElementsToContainerAndGetWidth([eHeaderCell]);
39601 };
39602 AutoWidthCalculator.prototype.addElementsToContainerAndGetWidth = function (elements) {
39603 var _this = this;
39604 // this element has to be a form, otherwise form elements within a cell
39605 // will be validated while being cloned. This can cause issues such as
39606 // radio buttons being reset and losing their values.
39607 var eDummyContainer = document.createElement('form');
39608 // position fixed, so it isn't restricted to the boundaries of the parent
39609 eDummyContainer.style.position = 'fixed';
39610 // we put the dummy into the body container, so it will inherit all the
39611 // css styles that the real cells are inheriting
39612 var eBodyContainer = this.centerRowContainerCtrl.getContainerElement();
39613 eBodyContainer.appendChild(eDummyContainer);
39614 elements.forEach(function (el) { return _this.cloneItemIntoDummy(el, eDummyContainer); });
39615 // at this point, all the clones are lined up vertically with natural widths. the dummy
39616 // container will have a width wide enough just to fit the largest.
39617 var dummyContainerWidth = eDummyContainer.offsetWidth;
39618 // we are finished with the dummy container, so get rid of it
39619 eBodyContainer.removeChild(eDummyContainer);
39620 // we add padding as I found sometimes the gui still put '...' after some of the texts. so the
39621 // user can configure the grid to add a few more pixels after the calculated width
39622 var autoSizePadding = this.getAutoSizePadding();
39623 return dummyContainerWidth + autoSizePadding;
39624 };
39625 AutoWidthCalculator.prototype.getAutoSizePadding = function () {
39626 var value = this.gridOptionsService.getNum('autoSizePadding');
39627 return value != null && value >= 0 ? value : 20;
39628 };
39629 AutoWidthCalculator.prototype.getHeaderCellForColumn = function (column) {
39630 /* tslint:enable */
39631 var element = null;
39632 this.ctrlsService.getHeaderRowContainerCtrls().forEach(function (container) {
39633 var res = container.getHtmlElementForColumnHeader(column);
39634 if (res != null) {
39635 element = res;
39636 }
39637 });
39638 return element;
39639 };
39640 AutoWidthCalculator.prototype.cloneItemIntoDummy = function (eCell, eDummyContainer) {
39641 // make a deep clone of the cell
39642 var eCellClone = eCell.cloneNode(true);
39643 // the original has a fixed width, we remove this to allow the natural width based on content
39644 eCellClone.style.width = '';
39645 // the original has position = absolute, we need to remove this so it's positioned normally
39646 eCellClone.style.position = 'static';
39647 eCellClone.style.left = '';
39648 // we put the cell into a containing div, as otherwise the cells would just line up
39649 // on the same line, standard flow layout, by putting them into divs, they are laid
39650 // out one per line
39651 var eCloneParent = document.createElement('div');
39652 var eCloneParentClassList = eCloneParent.classList;
39653 var isHeader = ['ag-header-cell', 'ag-header-group-cell'].some(function (cls) { return eCellClone.classList.contains(cls); });
39654 if (isHeader) {
39655 eCloneParentClassList.add('ag-header', 'ag-header-row');
39656 eCloneParent.style.position = 'static';
39657 }
39658 else {
39659 eCloneParentClassList.add('ag-row');
39660 }
39661 // find parent using classes (headers have ag-header-cell, rows have ag-row), and copy classes from it.
39662 // if we didn't do this, things like ag-row-level-2 would be missing if present, which sets indents
39663 // onto group items.
39664 var pointer = eCell.parentElement;
39665 while (pointer) {
39666 var isRow = ['ag-header-row', 'ag-row'].some(function (cls) { return pointer.classList.contains(cls); });
39667 if (isRow) {
39668 for (var i = 0; i < pointer.classList.length; i++) {
39669 var item = pointer.classList[i];
39670 // we skip ag-row-position-absolute, as this has structural CSS applied that stops the
39671 // element from fitting into it's parent, and we need the element to stretch the parent
39672 // as we are measuring the parents width
39673 if (item != 'ag-row-position-absolute') {
39674 eCloneParentClassList.add(item);
39675 }
39676 }
39677 break;
39678 }
39679 pointer = pointer.parentElement;
39680 }
39681 // the twig on the branch, the branch on the tree, the tree in the hole,
39682 // the hole in the bog, the bog in the clone, the clone in the parent,
39683 // the parent in the dummy, and the dummy down in the vall-e-ooo, OOOOOOOOO! Oh row the rattling bog....
39684 eCloneParent.appendChild(eCellClone);
39685 eDummyContainer.appendChild(eCloneParent);
39686 };
39687 __decorate([
39688 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
39689 ], AutoWidthCalculator.prototype, "rowRenderer", void 0);
39690 __decorate([
39691 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
39692 ], AutoWidthCalculator.prototype, "ctrlsService", void 0);
39693 __decorate([
39694 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowCssClassCalculator')
39695 ], AutoWidthCalculator.prototype, "rowCssClassCalculator", void 0);
39696 __decorate([
39697 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
39698 ], AutoWidthCalculator.prototype, "postConstruct", null);
39699 AutoWidthCalculator = __decorate([
39700 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('autoWidthCalculator')
39701 ], AutoWidthCalculator);
39702 return AutoWidthCalculator;
39703}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
39704
39705
39706
39707/***/ }),
39708/* 178 */
39709/***/ (function(module, __webpack_exports__, __webpack_require__) {
39710
39711"use strict";
39712__webpack_require__.r(__webpack_exports__);
39713/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowRenderer", function() { return RowRenderer; });
39714/* harmony import */ var _row_rowCtrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(124);
39715/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
39716/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
39717/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
39718/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
39719/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12);
39720/* harmony import */ var _utils_number__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44);
39721/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(13);
39722/* harmony import */ var _cell_cellCtrl__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(125);
39723/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(19);
39724/* harmony import */ var _features_stickyRowFeature__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(179);
39725/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(42);
39726/**
39727 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
39728 * @version v29.2.0
39729 * @link https://www.ag-grid.com/
39730 * @license MIT
39731 */
39732var __extends = (undefined && undefined.__extends) || (function () {
39733 var extendStatics = function (d, b) {
39734 extendStatics = Object.setPrototypeOf ||
39735 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
39736 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
39737 return extendStatics(d, b);
39738 };
39739 return function (d, b) {
39740 extendStatics(d, b);
39741 function __() { this.constructor = d; }
39742 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
39743 };
39744})();
39745var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
39746 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
39747 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
39748 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;
39749 return c > 3 && r && Object.defineProperty(target, key, r), r;
39750};
39751var __read = (undefined && undefined.__read) || function (o, n) {
39752 var m = typeof Symbol === "function" && o[Symbol.iterator];
39753 if (!m) return o;
39754 var i = m.call(o), r, ar = [], e;
39755 try {
39756 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
39757 }
39758 catch (error) { e = { error: error }; }
39759 finally {
39760 try {
39761 if (r && !r.done && (m = i["return"])) m.call(i);
39762 }
39763 finally { if (e) throw e.error; }
39764 }
39765 return ar;
39766};
39767var __spread = (undefined && undefined.__spread) || function () {
39768 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
39769 return ar;
39770};
39771var __values = (undefined && undefined.__values) || function(o) {
39772 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
39773 if (m) return m.call(o);
39774 if (o && typeof o.length === "number") return {
39775 next: function () {
39776 if (o && i >= o.length) o = void 0;
39777 return { value: o && o[i++], done: !o };
39778 }
39779 };
39780 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
39781};
39782
39783
39784
39785
39786
39787
39788
39789
39790
39791
39792
39793
39794var DEFAULT_KEEP_DETAIL_ROW_COUNT = 10;
39795var RowRenderer = /** @class */ (function (_super) {
39796 __extends(RowRenderer, _super);
39797 function RowRenderer() {
39798 var _this = _super !== null && _super.apply(this, arguments) || this;
39799 _this.destroyFuncsForColumnListeners = [];
39800 // map of row ids to row objects. keeps track of which elements
39801 // are rendered for which rows in the dom.
39802 _this.rowCtrlsByRowIndex = {};
39803 _this.zombieRowCtrls = {};
39804 _this.allRowCtrls = [];
39805 _this.topRowCtrls = [];
39806 _this.bottomRowCtrls = [];
39807 // we only allow one refresh at a time, otherwise the internal memory structure here
39808 // will get messed up. this can happen if the user has a cellRenderer, and inside the
39809 // renderer they call an API method that results in another pass of the refresh,
39810 // then it will be trying to draw rows in the middle of a refresh.
39811 _this.refreshInProgress = false;
39812 _this.dataFirstRenderedFired = false;
39813 return _this;
39814 }
39815 RowRenderer.prototype.postConstruct = function () {
39816 var _this = this;
39817 this.ctrlsService.whenReady(function () {
39818 _this.gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();
39819 _this.initialise();
39820 });
39821 };
39822 RowRenderer.prototype.initialise = function () {
39823 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PAGINATION_CHANGED, this.onPageLoaded.bind(this));
39824 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PINNED_ROW_DATA_CHANGED, this.onPinnedRowDataChanged.bind(this));
39825 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));
39826 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_BODY_SCROLL, this.onBodyScroll.bind(this));
39827 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_BODY_HEIGHT_CHANGED, this.redrawAfterScroll.bind(this));
39828 this.addManagedPropertyListener('domLayout', this.onDomLayoutChanged.bind(this));
39829 this.addManagedPropertyListener('rowClass', this.redrawRows.bind(this));
39830 if (this.gridOptionsService.is('groupRowsSticky')) {
39831 if (this.rowModel.getType() != 'clientSide') {
39832 Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["doOnce"])(function () { return console.warn('AG Grid: The feature Sticky Row Groups only works with the Client Side Row Model'); }, 'rowRenderer.stickyWorksWithCsrmOnly');
39833 }
39834 else if (this.gridOptionsService.isTreeData()) {
39835 Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["doOnce"])(function () { return console.warn('AG Grid: The feature Sticky Row Groups does not work with Tree Data.'); }, 'rowRenderer.stickyDoesNotWorkWithTreeData');
39836 }
39837 else {
39838 this.stickyRowFeature = this.createManagedBean(new _features_stickyRowFeature__WEBPACK_IMPORTED_MODULE_10__["StickyRowFeature"](this.createRowCon.bind(this), this.destroyRowCtrls.bind(this)));
39839 }
39840 }
39841 this.registerCellEventListeners();
39842 this.initialiseCache();
39843 this.printLayout = this.gridOptionsService.isDomLayout('print');
39844 this.embedFullWidthRows = this.printLayout || this.gridOptionsService.is('embedFullWidthRows');
39845 this.redrawAfterModelUpdate();
39846 };
39847 RowRenderer.prototype.initialiseCache = function () {
39848 if (this.gridOptionsService.is('keepDetailRows')) {
39849 var countProp = this.getKeepDetailRowsCount();
39850 var count = countProp != null ? countProp : 3;
39851 this.cachedRowCtrls = new RowCtrlCache(count);
39852 }
39853 };
39854 RowRenderer.prototype.getKeepDetailRowsCount = function () {
39855 var keepDetailRowsCount = this.gridOptionsService.getNum('keepDetailRowsCount');
39856 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(keepDetailRowsCount) && keepDetailRowsCount > 0) {
39857 return keepDetailRowsCount;
39858 }
39859 return DEFAULT_KEEP_DETAIL_ROW_COUNT;
39860 };
39861 RowRenderer.prototype.getRowCtrls = function () {
39862 return this.allRowCtrls;
39863 };
39864 RowRenderer.prototype.getStickyTopRowCtrls = function () {
39865 if (!this.stickyRowFeature) {
39866 return [];
39867 }
39868 return this.stickyRowFeature.getStickyRowCtrls();
39869 };
39870 RowRenderer.prototype.updateAllRowCtrls = function () {
39871 var liveList = Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["getAllValuesInObject"])(this.rowCtrlsByRowIndex);
39872 var isEnsureDomOrder = this.gridOptionsService.is('ensureDomOrder');
39873 var isPrintLayout = this.gridOptionsService.isDomLayout('print');
39874 if (isEnsureDomOrder || isPrintLayout) {
39875 liveList.sort(function (a, b) { return a.getRowNode().rowIndex - b.getRowNode.rowIndex; });
39876 }
39877 var zombieList = Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["getAllValuesInObject"])(this.zombieRowCtrls);
39878 var cachedList = this.cachedRowCtrls ? this.cachedRowCtrls.getEntries() : [];
39879 this.allRowCtrls = __spread(liveList, zombieList, cachedList);
39880 };
39881 RowRenderer.prototype.onCellFocusChanged = function (event) {
39882 this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onCellFocused(event); });
39883 this.getFullWidthRowCtrls().forEach(function (rowCtrl) { return rowCtrl.onFullWidthRowFocused(event); });
39884 };
39885 // in a clean design, each cell would register for each of these events. however when scrolling, all the cells
39886 // registering and de-registering for events is a performance bottleneck. so we register here once and inform
39887 // all active cells.
39888 RowRenderer.prototype.registerCellEventListeners = function () {
39889 var _this = this;
39890 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_FOCUSED, function (event) {
39891 _this.onCellFocusChanged(event);
39892 });
39893 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_FOCUS_CLEARED, function () {
39894 _this.onCellFocusChanged();
39895 });
39896 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_FLASH_CELLS, function (event) {
39897 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onFlashCells(event); });
39898 });
39899 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_HOVER_CHANGED, function () {
39900 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onColumnHover(); });
39901 });
39902 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, function () {
39903 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onDisplayedColumnsChanged(); });
39904 });
39905 // only for printLayout - because we are rendering all the cells in the same row, regardless of pinned state,
39906 // then changing the width of the containers will impact left position. eg the center cols all have their
39907 // left position adjusted by the width of the left pinned column, so if the pinned left column width changes,
39908 // all the center cols need to be shifted to accommodate this. when in normal layout, the pinned cols are
39909 // in different containers so doesn't impact.
39910 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, function () {
39911 if (_this.printLayout) {
39912 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onLeftChanged(); });
39913 }
39914 });
39915 var rangeSelectionEnabled = this.gridOptionsService.isEnableRangeSelection();
39916 if (rangeSelectionEnabled) {
39917 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_RANGE_SELECTION_CHANGED, function () {
39918 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onRangeSelectionChanged(); });
39919 });
39920 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_MOVED, function () {
39921 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });
39922 });
39923 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_PINNED, function () {
39924 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });
39925 });
39926 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_VISIBLE, function () {
39927 _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });
39928 });
39929 }
39930 // add listeners to the grid columns
39931 this.refreshListenersToColumnsForCellComps();
39932 // if the grid columns change, then refresh the listeners again
39933 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_GRID_COLUMNS_CHANGED, this.refreshListenersToColumnsForCellComps.bind(this));
39934 this.addDestroyFunc(this.removeGridColumnListeners.bind(this));
39935 };
39936 // executes all functions in destroyFuncsForColumnListeners and then clears the list
39937 RowRenderer.prototype.removeGridColumnListeners = function () {
39938 this.destroyFuncsForColumnListeners.forEach(function (func) { return func(); });
39939 this.destroyFuncsForColumnListeners.length = 0;
39940 };
39941 // this function adds listeners onto all the grid columns, which are the column that we could have cellComps for.
39942 // when the grid columns change, we add listeners again. in an ideal design, each CellComp would just register to
39943 // the column it belongs to on creation, however this was a bottleneck with the number of cells, so do it here
39944 // once instead.
39945 RowRenderer.prototype.refreshListenersToColumnsForCellComps = function () {
39946 var _this = this;
39947 this.removeGridColumnListeners();
39948 var cols = this.columnModel.getAllGridColumns();
39949 if (!cols) {
39950 return;
39951 }
39952 cols.forEach(function (col) {
39953 var forEachCellWithThisCol = function (callback) {
39954 _this.getAllCellCtrls().forEach(function (cellCtrl) {
39955 if (cellCtrl.getColumn() === col) {
39956 callback(cellCtrl);
39957 }
39958 });
39959 };
39960 var leftChangedListener = function () {
39961 forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onLeftChanged(); });
39962 };
39963 var widthChangedListener = function () {
39964 forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onWidthChanged(); });
39965 };
39966 var firstRightPinnedChangedListener = function () {
39967 forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onFirstRightPinnedChanged(); });
39968 };
39969 var lastLeftPinnedChangedListener = function () {
39970 forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onLastLeftPinnedChanged(); });
39971 };
39972 var colDefChangedListener = function () {
39973 forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onColDefChanged(); });
39974 };
39975 col.addEventListener('leftChanged', leftChangedListener);
39976 col.addEventListener('widthChanged', widthChangedListener);
39977 col.addEventListener('firstRightPinnedChanged', firstRightPinnedChangedListener);
39978 col.addEventListener('lastLeftPinnedChanged', lastLeftPinnedChangedListener);
39979 col.addEventListener('colDefChanged', colDefChangedListener);
39980 _this.destroyFuncsForColumnListeners.push(function () {
39981 col.removeEventListener('leftChanged', leftChangedListener);
39982 col.removeEventListener('widthChanged', widthChangedListener);
39983 col.removeEventListener('firstRightPinnedChanged', firstRightPinnedChangedListener);
39984 col.removeEventListener('lastLeftPinnedChanged', lastLeftPinnedChangedListener);
39985 col.removeEventListener('colDefChanged', colDefChangedListener);
39986 });
39987 });
39988 };
39989 RowRenderer.prototype.onDomLayoutChanged = function () {
39990 var printLayout = this.gridOptionsService.isDomLayout('print');
39991 var embedFullWidthRows = printLayout || this.gridOptionsService.is('embedFullWidthRows');
39992 // if moving towards or away from print layout, means we need to destroy all rows, as rows are not laid
39993 // out using absolute positioning when doing print layout
39994 var destroyRows = embedFullWidthRows !== this.embedFullWidthRows || this.printLayout !== printLayout;
39995 this.printLayout = printLayout;
39996 this.embedFullWidthRows = embedFullWidthRows;
39997 if (destroyRows) {
39998 this.redrawAfterModelUpdate({ domLayoutChanged: true });
39999 }
40000 };
40001 // for row models that have datasources, when we update the datasource, we need to force the rowRenderer
40002 // to redraw all rows. otherwise the old rows from the old datasource will stay displayed.
40003 RowRenderer.prototype.datasourceChanged = function () {
40004 this.firstRenderedRow = 0;
40005 this.lastRenderedRow = -1;
40006 var rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);
40007 this.removeRowCtrls(rowIndexesToRemove);
40008 };
40009 RowRenderer.prototype.onPageLoaded = function (event) {
40010 var params = {
40011 recycleRows: event.keepRenderedRows,
40012 animate: event.animate,
40013 newData: event.newData,
40014 newPage: event.newPage,
40015 // because this is a model updated event (not pinned rows), we
40016 // can skip updating the pinned rows. this is needed so that if user
40017 // is doing transaction updates, the pinned rows are not getting constantly
40018 // trashed - or editing cells in pinned rows are not refreshed and put into read mode
40019 onlyBody: true
40020 };
40021 this.redrawAfterModelUpdate(params);
40022 };
40023 RowRenderer.prototype.getAllCellsForColumn = function (column) {
40024 var res = [];
40025 this.getAllRowCtrls().forEach(function (rowCtrl) {
40026 var eCell = rowCtrl.getCellElement(column);
40027 if (eCell) {
40028 res.push(eCell);
40029 }
40030 });
40031 return res;
40032 };
40033 RowRenderer.prototype.refreshFloatingRowComps = function () {
40034 this.refreshFloatingRows(this.topRowCtrls, this.pinnedRowModel.getPinnedTopRowData());
40035 this.refreshFloatingRows(this.bottomRowCtrls, this.pinnedRowModel.getPinnedBottomRowData());
40036 };
40037 RowRenderer.prototype.getTopRowCtrls = function () {
40038 return this.topRowCtrls;
40039 };
40040 RowRenderer.prototype.getBottomRowCtrls = function () {
40041 return this.bottomRowCtrls;
40042 };
40043 RowRenderer.prototype.refreshFloatingRows = function (rowComps, rowNodes) {
40044 var _this = this;
40045 rowComps.forEach(function (row) {
40046 row.destroyFirstPass();
40047 row.destroySecondPass();
40048 });
40049 rowComps.length = 0;
40050 if (!rowNodes) {
40051 return;
40052 }
40053 rowNodes.forEach(function (rowNode) {
40054 var rowCtrl = new _row_rowCtrl__WEBPACK_IMPORTED_MODULE_0__["RowCtrl"](rowNode, _this.beans, false, false, _this.printLayout);
40055 rowComps.push(rowCtrl);
40056 });
40057 };
40058 RowRenderer.prototype.onPinnedRowDataChanged = function () {
40059 // recycling rows in order to ensure cell editing is not cancelled
40060 var params = {
40061 recycleRows: true
40062 };
40063 this.redrawAfterModelUpdate(params);
40064 };
40065 // if the row nodes are not rendered, no index is returned
40066 RowRenderer.prototype.getRenderedIndexesForRowNodes = function (rowNodes) {
40067 var result = [];
40068 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(rowNodes)) {
40069 return result;
40070 }
40071 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(this.rowCtrlsByRowIndex, function (index, renderedRow) {
40072 var rowNode = renderedRow.getRowNode();
40073 if (rowNodes.indexOf(rowNode) >= 0) {
40074 result.push(index);
40075 }
40076 });
40077 return result;
40078 };
40079 RowRenderer.prototype.redrawRows = function (rowNodes) {
40080 // if no row nodes provided, then refresh everything
40081 var partialRefresh = rowNodes != null && rowNodes.length > 0;
40082 if (partialRefresh) {
40083 var indexesToRemove = this.getRenderedIndexesForRowNodes(rowNodes);
40084 // remove the rows
40085 this.removeRowCtrls(indexesToRemove);
40086 }
40087 // add draw them again
40088 this.redrawAfterModelUpdate({
40089 recycleRows: partialRefresh
40090 });
40091 };
40092 RowRenderer.prototype.getCellToRestoreFocusToAfterRefresh = function (params) {
40093 var focusedCell = (params === null || params === void 0 ? void 0 : params.suppressKeepFocus) ? null : this.focusService.getFocusCellToUseAfterRefresh();
40094 if (focusedCell == null) {
40095 return null;
40096 }
40097 // if the dom is not actually focused on a cell, then we don't try to refocus. the problem this
40098 // solves is with editing - if the user is editing, eg focus is on a text field, and not on the
40099 // cell itself, then the cell can be registered as having focus, however it's the text field that
40100 // has the focus and not the cell div. therefore, when the refresh is finished, the grid will focus
40101 // the cell, and not the textfield. that means if the user is in a text field, and the grid refreshes,
40102 // the focus is lost from the text field. we do not want this.
40103 var eDocument = this.gridOptionsService.getDocument();
40104 var activeElement = eDocument.activeElement;
40105 var cellDomData = this.gridOptionsService.getDomData(activeElement, _cell_cellCtrl__WEBPACK_IMPORTED_MODULE_8__["CellCtrl"].DOM_DATA_KEY_CELL_CTRL);
40106 var rowDomData = this.gridOptionsService.getDomData(activeElement, _row_rowCtrl__WEBPACK_IMPORTED_MODULE_0__["RowCtrl"].DOM_DATA_KEY_ROW_CTRL);
40107 var gridElementFocused = cellDomData || rowDomData;
40108 return gridElementFocused ? focusedCell : null;
40109 };
40110 // gets called from:
40111 // +) initialisation (in registerGridComp) params = null
40112 // +) onDomLayoutChanged, params = null
40113 // +) onPageLoaded, recycleRows, animate, newData, newPage from event, onlyBody=true
40114 // +) onPinnedRowDataChanged, recycleRows = true
40115 // +) redrawRows (from Grid API), recycleRows = true/false
40116 RowRenderer.prototype.redrawAfterModelUpdate = function (params) {
40117 if (params === void 0) { params = {}; }
40118 this.getLockOnRefresh();
40119 var focusedCell = this.getCellToRestoreFocusToAfterRefresh(params);
40120 this.updateContainerHeights();
40121 this.scrollToTopIfNewData(params);
40122 // never recycle rows on layout change as rows could change from normal DOM layout
40123 // back to the grid's row positioning.
40124 var recycleRows = !params.domLayoutChanged && !!params.recycleRows;
40125 var animate = params.animate && this.gridOptionsService.isAnimateRows();
40126 // after modelUpdate, row indexes can change, so we clear out the rowsByIndex map,
40127 // however we can reuse the rows, so we keep them but index by rowNode.id
40128 var rowsToRecycle = recycleRows ? this.recycleRows() : null;
40129 if (!recycleRows) {
40130 this.removeAllRowComps();
40131 }
40132 this.redraw(rowsToRecycle, animate);
40133 this.gridBodyCtrl.updateRowCount();
40134 if (!params.onlyBody) {
40135 this.refreshFloatingRowComps();
40136 }
40137 this.dispatchDisplayedRowsChanged();
40138 // if a cell was focused before, ensure focus now.
40139 if (focusedCell != null) {
40140 this.restoreFocusedCell(focusedCell);
40141 }
40142 this.releaseLockOnRefresh();
40143 };
40144 RowRenderer.prototype.scrollToTopIfNewData = function (params) {
40145 var scrollToTop = params.newData || params.newPage;
40146 var suppressScrollToTop = this.gridOptionsService.is('suppressScrollOnNewData');
40147 if (scrollToTop && !suppressScrollToTop) {
40148 this.gridBodyCtrl.getScrollFeature().scrollToTop();
40149 }
40150 };
40151 RowRenderer.prototype.updateContainerHeights = function () {
40152 // when doing print layout, we don't explicitly set height on the containers
40153 if (this.printLayout) {
40154 this.rowContainerHeightService.setModelHeight(null);
40155 return;
40156 }
40157 var containerHeight = this.paginationProxy.getCurrentPageHeight();
40158 // we need at least 1 pixel for the horizontal scroll to work. so if there are now rows,
40159 // we still want the scroll to be present, otherwise there would be no way to scroll the header
40160 // which might be needed us user wants to access columns
40161 // on the RHS - and if that was where the filter was that cause no rows to be presented, there
40162 // is no way to remove the filter.
40163 if (containerHeight === 0) {
40164 containerHeight = 1;
40165 }
40166 this.rowContainerHeightService.setModelHeight(containerHeight);
40167 };
40168 RowRenderer.prototype.getLockOnRefresh = function () {
40169 if (this.refreshInProgress) {
40170 throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. " +
40171 "Your code probably called a grid API method while the grid was in the render stage. To overcome " +
40172 "this, put the API call into a timeout, e.g. instead of api.redrawRows(), " +
40173 "call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code " +
40174 "that caused the refresh check this stacktrace.");
40175 }
40176 this.refreshInProgress = true;
40177 };
40178 RowRenderer.prototype.releaseLockOnRefresh = function () {
40179 this.refreshInProgress = false;
40180 };
40181 RowRenderer.prototype.isRefreshInProgress = function () {
40182 return this.refreshInProgress;
40183 };
40184 // sets the focus to the provided cell, if the cell is provided. this way, the user can call refresh without
40185 // worry about the focus been lost. this is important when the user is using keyboard navigation to do edits
40186 // and the cellEditor is calling 'refresh' to get other cells to update (as other cells might depend on the
40187 // edited cell).
40188 RowRenderer.prototype.restoreFocusedCell = function (cellPosition) {
40189 if (cellPosition) {
40190 // we don't wish to dispatch an event as the rowRenderer is not capable of changing the selected cell,
40191 // so we mock a change event for the full width rows and cells to ensure they update to the newly selected
40192 // state
40193 this.onCellFocusChanged({
40194 rowIndex: cellPosition.rowIndex,
40195 column: cellPosition.column,
40196 rowPinned: cellPosition.rowPinned,
40197 forceBrowserFocus: true,
40198 preventScrollOnBrowserFocus: true,
40199 api: this.beans.gridApi,
40200 columnApi: this.beans.columnApi,
40201 context: this.beans.gridOptionsService.context,
40202 type: 'mock',
40203 });
40204 }
40205 };
40206 RowRenderer.prototype.stopEditing = function (cancel) {
40207 if (cancel === void 0) { cancel = false; }
40208 this.getAllRowCtrls().forEach(function (rowCtrl) {
40209 rowCtrl.stopEditing(cancel);
40210 });
40211 };
40212 RowRenderer.prototype.getAllCellCtrls = function () {
40213 var res = [];
40214 var rowCtrls = this.getAllRowCtrls();
40215 var rowCtrlsLength = rowCtrls.length;
40216 for (var i = 0; i < rowCtrlsLength; i++) {
40217 var cellCtrls = rowCtrls[i].getAllCellCtrls();
40218 var cellCtrlsLength = cellCtrls.length;
40219 for (var j = 0; j < cellCtrlsLength; j++) {
40220 res.push(cellCtrls[j]);
40221 }
40222 }
40223 return res;
40224 };
40225 RowRenderer.prototype.getAllRowCtrls = function () {
40226 var e_1, _a;
40227 var stickyRowCtrls = (this.stickyRowFeature && this.stickyRowFeature.getStickyRowCtrls()) || [];
40228 var res = __spread(this.topRowCtrls, this.bottomRowCtrls, stickyRowCtrls);
40229 try {
40230 for (var _b = __values(Object.keys(this.rowCtrlsByRowIndex)), _c = _b.next(); !_c.done; _c = _b.next()) {
40231 var key = _c.value;
40232 res.push(this.rowCtrlsByRowIndex[key]);
40233 }
40234 }
40235 catch (e_1_1) { e_1 = { error: e_1_1 }; }
40236 finally {
40237 try {
40238 if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
40239 }
40240 finally { if (e_1) throw e_1.error; }
40241 }
40242 return res;
40243 };
40244 RowRenderer.prototype.addRenderedRowListener = function (eventName, rowIndex, callback) {
40245 var rowComp = this.rowCtrlsByRowIndex[rowIndex];
40246 if (rowComp) {
40247 rowComp.addEventListener(eventName, callback);
40248 }
40249 };
40250 RowRenderer.prototype.flashCells = function (params) {
40251 if (params === void 0) { params = {}; }
40252 var flashDelay = params.flashDelay, fadeDelay = params.fadeDelay;
40253 this.getCellCtrls(params.rowNodes, params.columns)
40254 .forEach(function (cellCtrl) { return cellCtrl.flashCell({ flashDelay: flashDelay, fadeDelay: fadeDelay }); });
40255 };
40256 RowRenderer.prototype.refreshCells = function (params) {
40257 if (params === void 0) { params = {}; }
40258 var refreshCellParams = {
40259 forceRefresh: params.force,
40260 newData: false,
40261 suppressFlash: params.suppressFlash
40262 };
40263 this.getCellCtrls(params.rowNodes, params.columns)
40264 .forEach(function (cellCtrl) {
40265 if (cellCtrl.refreshShouldDestroy()) {
40266 var rowCtrl = cellCtrl.getRowCtrl();
40267 if (rowCtrl) {
40268 rowCtrl.refreshCell(cellCtrl);
40269 }
40270 }
40271 else {
40272 cellCtrl.refreshCell(refreshCellParams);
40273 }
40274 });
40275 this.getFullWidthRowCtrls(params.rowNodes).forEach(function (fullWidthRowCtrl) {
40276 fullWidthRowCtrl.refreshFullWidth();
40277 });
40278 };
40279 RowRenderer.prototype.getCellRendererInstances = function (params) {
40280 var _this = this;
40281 var _a;
40282 var cellRenderers = this.getCellCtrls(params.rowNodes, params.columns)
40283 .map(function (cellCtrl) { return cellCtrl.getCellRenderer(); })
40284 .filter(function (renderer) { return renderer != null; });
40285 if ((_a = params.columns) === null || _a === void 0 ? void 0 : _a.length) {
40286 return cellRenderers;
40287 }
40288 var fullWidthRenderers = [];
40289 var rowIdMap = this.mapRowNodes(params.rowNodes);
40290 this.getAllRowCtrls().forEach(function (rowCtrl) {
40291 if (rowIdMap && !_this.isRowInMap(rowCtrl.getRowNode(), rowIdMap)) {
40292 return;
40293 }
40294 if (!rowCtrl.isFullWidth()) {
40295 return;
40296 }
40297 var fullWidthRenderer = rowCtrl.getFullWidthCellRenderer();
40298 if (fullWidthRenderer) {
40299 fullWidthRenderers.push(fullWidthRenderer);
40300 }
40301 });
40302 return __spread(fullWidthRenderers, cellRenderers);
40303 };
40304 RowRenderer.prototype.getCellEditorInstances = function (params) {
40305 var res = [];
40306 this.getCellCtrls(params.rowNodes, params.columns).forEach(function (cellCtrl) {
40307 var cellEditor = cellCtrl.getCellEditor();
40308 if (cellEditor) {
40309 res.push(cellEditor);
40310 }
40311 });
40312 return res;
40313 };
40314 RowRenderer.prototype.getEditingCells = function () {
40315 var res = [];
40316 this.getAllCellCtrls().forEach(function (cellCtrl) {
40317 if (cellCtrl.isEditing()) {
40318 var cellPosition = cellCtrl.getCellPosition();
40319 res.push(cellPosition);
40320 }
40321 });
40322 return res;
40323 };
40324 RowRenderer.prototype.mapRowNodes = function (rowNodes) {
40325 if (!rowNodes) {
40326 return;
40327 }
40328 var res = {
40329 top: {},
40330 bottom: {},
40331 normal: {}
40332 };
40333 rowNodes.forEach(function (rowNode) {
40334 var id = rowNode.id;
40335 if (rowNode.rowPinned === 'top') {
40336 res.top[id] = rowNode;
40337 }
40338 else if (rowNode.rowPinned === 'bottom') {
40339 res.bottom[id] = rowNode;
40340 }
40341 else {
40342 res.normal[id] = rowNode;
40343 }
40344 });
40345 return res;
40346 };
40347 RowRenderer.prototype.isRowInMap = function (rowNode, rowIdsMap) {
40348 // skip this row if it is missing from the provided list
40349 var id = rowNode.id;
40350 var floating = rowNode.rowPinned;
40351 if (floating === 'bottom') {
40352 return rowIdsMap.bottom[id] != null;
40353 }
40354 if (floating === 'top') {
40355 return rowIdsMap.top[id] != null;
40356 }
40357 return rowIdsMap.normal[id] != null;
40358 };
40359 // returns CellCtrl's that match the provided rowNodes and columns. eg if one row node
40360 // and two columns provided, that identifies 4 cells, so 4 CellCtrl's returned.
40361 RowRenderer.prototype.getCellCtrls = function (rowNodes, columns) {
40362 var _this = this;
40363 var rowIdsMap = this.mapRowNodes(rowNodes);
40364 var res = [];
40365 var colIdsMap;
40366 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(columns)) {
40367 colIdsMap = {};
40368 columns.forEach(function (colKey) {
40369 var column = _this.columnModel.getGridColumn(colKey);
40370 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(column)) {
40371 colIdsMap[column.getId()] = true;
40372 }
40373 });
40374 }
40375 var processRow = function (rowCtrl) {
40376 var rowNode = rowCtrl.getRowNode();
40377 // skip this row if it is missing from the provided list
40378 if (rowIdsMap != null && !_this.isRowInMap(rowNode, rowIdsMap)) {
40379 return;
40380 }
40381 rowCtrl.getAllCellCtrls().forEach(function (cellCtrl) {
40382 var colId = cellCtrl.getColumn().getId();
40383 var excludeColFromRefresh = colIdsMap && !colIdsMap[colId];
40384 if (excludeColFromRefresh) {
40385 return;
40386 }
40387 res.push(cellCtrl);
40388 });
40389 };
40390 this.getAllRowCtrls().forEach(function (row) { return processRow(row); });
40391 return res;
40392 };
40393 RowRenderer.prototype.destroy = function () {
40394 this.removeAllRowComps();
40395 _super.prototype.destroy.call(this);
40396 };
40397 RowRenderer.prototype.removeAllRowComps = function () {
40398 var rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);
40399 this.removeRowCtrls(rowIndexesToRemove);
40400 };
40401 RowRenderer.prototype.recycleRows = function () {
40402 // remove all stub nodes, they can't be reused, as no rowNode id
40403 var stubNodeIndexes = [];
40404 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(this.rowCtrlsByRowIndex, function (index, rowComp) {
40405 var stubNode = rowComp.getRowNode().id == null;
40406 if (stubNode) {
40407 stubNodeIndexes.push(index);
40408 }
40409 });
40410 this.removeRowCtrls(stubNodeIndexes);
40411 // then clear out rowCompsByIndex, but before that take a copy, but index by id, not rowIndex
40412 var ctrlsByIdMap = {};
40413 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(this.rowCtrlsByRowIndex, function (index, rowComp) {
40414 var rowNode = rowComp.getRowNode();
40415 ctrlsByIdMap[rowNode.id] = rowComp;
40416 });
40417 this.rowCtrlsByRowIndex = {};
40418 return ctrlsByIdMap;
40419 };
40420 // takes array of row indexes
40421 RowRenderer.prototype.removeRowCtrls = function (rowsToRemove) {
40422 var _this = this;
40423 // if no fromIndex then set to -1, which will refresh everything
40424 // let realFromIndex = -1;
40425 rowsToRemove.forEach(function (indexToRemove) {
40426 var rowCtrl = _this.rowCtrlsByRowIndex[indexToRemove];
40427 if (rowCtrl) {
40428 rowCtrl.destroyFirstPass();
40429 rowCtrl.destroySecondPass();
40430 }
40431 delete _this.rowCtrlsByRowIndex[indexToRemove];
40432 });
40433 };
40434 RowRenderer.prototype.onBodyScroll = function (e) {
40435 if (e.direction !== 'vertical') {
40436 return;
40437 }
40438 this.redrawAfterScroll();
40439 };
40440 // gets called when rows don't change, but viewport does, so after:
40441 // 1) height of grid body changes, ie number of displayed rows has changed
40442 // 2) grid scrolled to new position
40443 // 3) ensure index visible (which is a scroll)
40444 RowRenderer.prototype.redrawAfterScroll = function () {
40445 var cellFocused;
40446 // only try to refocus cells shifting in and out of sticky container
40447 // if the browser supports focus ({ preventScroll })
40448 if (this.stickyRowFeature && Object(_utils_browser__WEBPACK_IMPORTED_MODULE_11__["browserSupportsPreventScroll"])()) {
40449 cellFocused = this.getCellToRestoreFocusToAfterRefresh() || undefined;
40450 }
40451 this.getLockOnRefresh();
40452 this.redraw(null, false, true);
40453 this.releaseLockOnRefresh();
40454 this.dispatchDisplayedRowsChanged();
40455 if (cellFocused != null) {
40456 var newFocusedCell = this.getCellToRestoreFocusToAfterRefresh();
40457 if (cellFocused != null && newFocusedCell == null) {
40458 this.animationFrameService.flushAllFrames();
40459 this.restoreFocusedCell(cellFocused);
40460 }
40461 }
40462 };
40463 RowRenderer.prototype.removeRowCompsNotToDraw = function (indexesToDraw) {
40464 // for speedy lookup, dump into map
40465 var indexesToDrawMap = {};
40466 indexesToDraw.forEach(function (index) { return (indexesToDrawMap[index] = true); });
40467 var existingIndexes = Object.keys(this.rowCtrlsByRowIndex);
40468 var indexesNotToDraw = existingIndexes.filter(function (index) { return !indexesToDrawMap[index]; });
40469 this.removeRowCtrls(indexesNotToDraw);
40470 };
40471 RowRenderer.prototype.calculateIndexesToDraw = function (rowsToRecycle) {
40472 var _this = this;
40473 // all in all indexes in the viewport
40474 var indexesToDraw = Object(_utils_number__WEBPACK_IMPORTED_MODULE_6__["createArrayOfNumbers"])(this.firstRenderedRow, this.lastRenderedRow);
40475 var checkRowToDraw = function (indexStr, rowComp) {
40476 var index = rowComp.getRowNode().rowIndex;
40477 if (index == null) {
40478 return;
40479 }
40480 if (index < _this.firstRenderedRow || index > _this.lastRenderedRow) {
40481 if (_this.doNotUnVirtualiseRow(rowComp)) {
40482 indexesToDraw.push(index);
40483 }
40484 }
40485 };
40486 // if we are redrawing due to scrolling change, then old rows are in this.rowCompsByIndex
40487 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(this.rowCtrlsByRowIndex, checkRowToDraw);
40488 // if we are redrawing due to model update, then old rows are in rowsToRecycle
40489 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(rowsToRecycle, checkRowToDraw);
40490 indexesToDraw.sort(function (a, b) { return a - b; });
40491 indexesToDraw = indexesToDraw.filter(function (index) {
40492 var rowNode = _this.paginationProxy.getRow(index);
40493 return rowNode && !rowNode.sticky;
40494 });
40495 return indexesToDraw;
40496 };
40497 RowRenderer.prototype.redraw = function (rowsToRecycle, animate, afterScroll) {
40498 var _this = this;
40499 if (animate === void 0) { animate = false; }
40500 if (afterScroll === void 0) { afterScroll = false; }
40501 this.rowContainerHeightService.updateOffset();
40502 this.workOutFirstAndLastRowsToRender();
40503 if (this.stickyRowFeature) {
40504 this.stickyRowFeature.checkStickyRows();
40505 }
40506 // the row can already exist and be in the following:
40507 // rowsToRecycle -> if model change, then the index may be different, however row may
40508 // exist here from previous time (mapped by id).
40509 // this.rowCompsByIndex -> if just a scroll, then this will contain what is currently in the viewport
40510 // this is all the indexes we want, including those that already exist, so this method
40511 // will end up going through each index and drawing only if the row doesn't already exist
40512 var indexesToDraw = this.calculateIndexesToDraw(rowsToRecycle);
40513 this.removeRowCompsNotToDraw(indexesToDraw);
40514 // never animate when doing print layout - as we want to get things ready to print as quickly as possible,
40515 // otherwise we risk the printer printing a row that's half faded (half way through fading in)
40516 if (this.printLayout) {
40517 animate = false;
40518 }
40519 // add in new rows
40520 var rowCtrls = [];
40521 indexesToDraw.forEach(function (rowIndex) {
40522 var rowCtrl = _this.createOrUpdateRowCtrl(rowIndex, rowsToRecycle, animate, afterScroll);
40523 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(rowCtrl)) {
40524 rowCtrls.push(rowCtrl);
40525 }
40526 });
40527 if (rowsToRecycle) {
40528 var useAnimationFrame = afterScroll && !this.gridOptionsService.is('suppressAnimationFrame') && !this.printLayout;
40529 if (useAnimationFrame) {
40530 this.beans.animationFrameService.addDestroyTask(function () {
40531 _this.destroyRowCtrls(rowsToRecycle, animate);
40532 _this.updateAllRowCtrls();
40533 _this.dispatchDisplayedRowsChanged();
40534 });
40535 }
40536 else {
40537 this.destroyRowCtrls(rowsToRecycle, animate);
40538 }
40539 }
40540 this.updateAllRowCtrls();
40541 };
40542 RowRenderer.prototype.dispatchDisplayedRowsChanged = function () {
40543 var event = { type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DISPLAYED_ROWS_CHANGED };
40544 this.eventService.dispatchEvent(event);
40545 };
40546 RowRenderer.prototype.onDisplayedColumnsChanged = function () {
40547 var pinningLeft = this.columnModel.isPinningLeft();
40548 var pinningRight = this.columnModel.isPinningRight();
40549 var atLeastOneChanged = this.pinningLeft !== pinningLeft || pinningRight !== this.pinningRight;
40550 if (atLeastOneChanged) {
40551 this.pinningLeft = pinningLeft;
40552 this.pinningRight = pinningRight;
40553 if (this.embedFullWidthRows) {
40554 this.redrawFullWidthEmbeddedRows();
40555 }
40556 }
40557 };
40558 // when embedding, what gets showed in each section depends on what is pinned. eg if embedding group expand / collapse,
40559 // then it should go into the pinned left area if pinning left, or the center area if not pinning.
40560 RowRenderer.prototype.redrawFullWidthEmbeddedRows = function () {
40561 // if either of the pinned panels has shown / hidden, then need to redraw the fullWidth bits when
40562 // embedded, as what appears in each section depends on whether we are pinned or not
40563 var rowsToRemove = [];
40564 this.getFullWidthRowCtrls().forEach(function (fullWidthCtrl) {
40565 var rowIndex = fullWidthCtrl.getRowNode().rowIndex;
40566 rowsToRemove.push(rowIndex.toString());
40567 });
40568 this.refreshFloatingRowComps();
40569 this.removeRowCtrls(rowsToRemove);
40570 this.redrawAfterScroll();
40571 };
40572 RowRenderer.prototype.getFullWidthRowCtrls = function (rowNodes) {
40573 var _this = this;
40574 var rowNodesMap = this.mapRowNodes(rowNodes);
40575 return Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["getAllValuesInObject"])(this.rowCtrlsByRowIndex).filter(function (rowCtrl) {
40576 // include just full width
40577 if (!rowCtrl.isFullWidth()) {
40578 return false;
40579 }
40580 // if Row Nodes provided, we exclude where Row Node is missing
40581 var rowNode = rowCtrl.getRowNode();
40582 if (rowNodesMap != null && !_this.isRowInMap(rowNode, rowNodesMap)) {
40583 return false;
40584 }
40585 return true;
40586 });
40587 };
40588 RowRenderer.prototype.refreshFullWidthRows = function (rowNodesToRefresh) {
40589 var rowsToRemove = [];
40590 var selectivelyRefreshing = !!rowNodesToRefresh;
40591 var idsToRefresh = selectivelyRefreshing ? {} : undefined;
40592 if (selectivelyRefreshing && idsToRefresh) {
40593 rowNodesToRefresh.forEach(function (r) { return idsToRefresh[r.id] = true; });
40594 }
40595 this.getFullWidthRowCtrls().forEach(function (fullWidthRowCtrl) {
40596 var rowNode = fullWidthRowCtrl.getRowNode();
40597 if (selectivelyRefreshing && idsToRefresh) {
40598 // we refresh if a) this node is present or b) this parents nodes is present. checking parent
40599 // node is important for master/detail, as we want detail to refresh on changes to parent node.
40600 // it's also possible, if user is provider their own fullWidth, that details panels contain
40601 // some info on the parent, eg if in tree data and child row shows some data from parent row also.
40602 var parentId = (rowNode.level > 0 && rowNode.parent) ? rowNode.parent.id : undefined;
40603 var skipThisNode = !idsToRefresh[rowNode.id] && !idsToRefresh[parentId];
40604 if (skipThisNode) {
40605 return;
40606 }
40607 }
40608 var fullWidthRowsRefreshed = fullWidthRowCtrl.refreshFullWidth();
40609 if (!fullWidthRowsRefreshed) {
40610 var rowIndex = fullWidthRowCtrl.getRowNode().rowIndex;
40611 rowsToRemove.push(rowIndex.toString());
40612 }
40613 });
40614 this.removeRowCtrls(rowsToRemove);
40615 this.redrawAfterScroll();
40616 };
40617 RowRenderer.prototype.createOrUpdateRowCtrl = function (rowIndex, rowsToRecycle, animate, afterScroll) {
40618 var rowNode;
40619 var rowCtrl = this.rowCtrlsByRowIndex[rowIndex];
40620 // if no row comp, see if we can get it from the previous rowComps
40621 if (!rowCtrl) {
40622 rowNode = this.paginationProxy.getRow(rowIndex);
40623 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(rowNode) && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(rowsToRecycle) && rowsToRecycle[rowNode.id] && rowNode.alreadyRendered) {
40624 rowCtrl = rowsToRecycle[rowNode.id];
40625 rowsToRecycle[rowNode.id] = null;
40626 }
40627 }
40628 var creatingNewRowCtrl = !rowCtrl;
40629 if (creatingNewRowCtrl) {
40630 // create a new one
40631 if (!rowNode) {
40632 rowNode = this.paginationProxy.getRow(rowIndex);
40633 }
40634 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(rowNode)) {
40635 rowCtrl = this.createRowCon(rowNode, animate, afterScroll);
40636 }
40637 else {
40638 // this should never happen - if somehow we are trying to create
40639 // a row for a rowNode that does not exist.
40640 return;
40641 }
40642 }
40643 if (rowNode) {
40644 // set node as 'alreadyRendered' to ensure we only recycle rowComps that have been rendered, this ensures
40645 // we don't reuse rowComps that have been removed and then re-added in the same batch transaction.
40646 rowNode.alreadyRendered = true;
40647 }
40648 this.rowCtrlsByRowIndex[rowIndex] = rowCtrl;
40649 return rowCtrl;
40650 };
40651 RowRenderer.prototype.destroyRowCtrls = function (rowCtrlsMap, animate) {
40652 var _this = this;
40653 var executeInAWhileFuncs = [];
40654 Object(_utils_object__WEBPACK_IMPORTED_MODULE_5__["iterateObject"])(rowCtrlsMap, function (nodeId, rowCtrl) {
40655 // if row was used, then it's null
40656 if (!rowCtrl) {
40657 return;
40658 }
40659 if (_this.cachedRowCtrls && rowCtrl.isCacheable()) {
40660 _this.cachedRowCtrls.addRow(rowCtrl);
40661 return;
40662 }
40663 rowCtrl.destroyFirstPass();
40664 if (animate) {
40665 _this.zombieRowCtrls[rowCtrl.getInstanceId()] = rowCtrl;
40666 executeInAWhileFuncs.push(function () {
40667 rowCtrl.destroySecondPass();
40668 delete _this.zombieRowCtrls[rowCtrl.getInstanceId()];
40669 });
40670 }
40671 else {
40672 rowCtrl.destroySecondPass();
40673 }
40674 });
40675 if (animate) {
40676 // this ensures we fire displayedRowsChanged AFTER all the 'executeInAWhileFuncs' get
40677 // executed, as we added it to the end of the list.
40678 executeInAWhileFuncs.push(function () {
40679 _this.updateAllRowCtrls();
40680 _this.dispatchDisplayedRowsChanged();
40681 });
40682 Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["executeInAWhile"])(executeInAWhileFuncs);
40683 }
40684 };
40685 RowRenderer.prototype.getRowBuffer = function () {
40686 var rowBuffer = this.gridOptionsService.getNum('rowBuffer');
40687 if (typeof rowBuffer === 'number') {
40688 if (rowBuffer < 0) {
40689 Object(_utils_function__WEBPACK_IMPORTED_MODULE_7__["doOnce"])(function () { return console.warn("AG Grid: rowBuffer should not be negative"); }, 'warn rowBuffer negative');
40690 rowBuffer = 0;
40691 this.gridOptionsService.set('rowBuffer', 0);
40692 }
40693 }
40694 else {
40695 rowBuffer = 10;
40696 }
40697 return rowBuffer;
40698 };
40699 RowRenderer.prototype.getRowBufferInPixels = function () {
40700 var rowsToBuffer = this.getRowBuffer();
40701 var defaultRowHeight = this.gridOptionsService.getRowHeightAsNumber();
40702 return rowsToBuffer * defaultRowHeight;
40703 };
40704 RowRenderer.prototype.workOutFirstAndLastRowsToRender = function () {
40705 var newFirst;
40706 var newLast;
40707 if (!this.paginationProxy.isRowsToRender()) {
40708 newFirst = 0;
40709 newLast = -1; // setting to -1 means nothing in range
40710 }
40711 else if (this.printLayout) {
40712 newFirst = this.paginationProxy.getPageFirstRow();
40713 newLast = this.paginationProxy.getPageLastRow();
40714 }
40715 else {
40716 var bufferPixels = this.getRowBufferInPixels();
40717 var gridBodyCtrl = this.ctrlsService.getGridBodyCtrl();
40718 var suppressRowVirtualisation = this.gridOptionsService.is('suppressRowVirtualisation');
40719 var rowHeightsChanged = false;
40720 var firstPixel = void 0;
40721 var lastPixel = void 0;
40722 do {
40723 var paginationOffset = this.paginationProxy.getPixelOffset();
40724 var _a = this.paginationProxy.getCurrentPagePixelRange(), pageFirstPixel = _a.pageFirstPixel, pageLastPixel = _a.pageLastPixel;
40725 var divStretchOffset = this.rowContainerHeightService.getDivStretchOffset();
40726 var bodyVRange = gridBodyCtrl.getScrollFeature().getVScrollPosition();
40727 var bodyTopPixel = bodyVRange.top;
40728 var bodyBottomPixel = bodyVRange.bottom;
40729 if (suppressRowVirtualisation) {
40730 firstPixel = pageFirstPixel + divStretchOffset;
40731 lastPixel = pageLastPixel + divStretchOffset;
40732 }
40733 else {
40734 firstPixel = Math.max(bodyTopPixel + paginationOffset - bufferPixels, pageFirstPixel) + divStretchOffset;
40735 lastPixel = Math.min(bodyBottomPixel + paginationOffset + bufferPixels, pageLastPixel) + divStretchOffset;
40736 }
40737 this.firstVisibleVPixel = Math.max(bodyTopPixel + paginationOffset, pageFirstPixel) + divStretchOffset;
40738 // if the rows we are about to display get their heights changed, then that upsets the calcs from above.
40739 rowHeightsChanged = this.ensureAllRowsInRangeHaveHeightsCalculated(firstPixel, lastPixel);
40740 } while (rowHeightsChanged);
40741 var firstRowIndex = this.paginationProxy.getRowIndexAtPixel(firstPixel);
40742 var lastRowIndex = this.paginationProxy.getRowIndexAtPixel(lastPixel);
40743 var pageFirstRow = this.paginationProxy.getPageFirstRow();
40744 var pageLastRow = this.paginationProxy.getPageLastRow();
40745 // adjust, in case buffer extended actual size
40746 if (firstRowIndex < pageFirstRow) {
40747 firstRowIndex = pageFirstRow;
40748 }
40749 if (lastRowIndex > pageLastRow) {
40750 lastRowIndex = pageLastRow;
40751 }
40752 newFirst = firstRowIndex;
40753 newLast = lastRowIndex;
40754 }
40755 // sometimes user doesn't set CSS right and ends up with grid with no height and grid ends up
40756 // trying to render all the rows, eg 10,000+ rows. this will kill the browser. so instead of
40757 // killing the browser, we limit the number of rows. just in case some use case we didn't think
40758 // of, we also have a property to not do this operation.
40759 var rowLayoutNormal = this.gridOptionsService.isDomLayout('normal');
40760 var suppressRowCountRestriction = this.gridOptionsService.is('suppressMaxRenderedRowRestriction');
40761 var rowBufferMaxSize = Math.max(this.getRowBuffer(), 500);
40762 if (rowLayoutNormal && !suppressRowCountRestriction) {
40763 if (newLast - newFirst > rowBufferMaxSize) {
40764 newLast = newFirst + rowBufferMaxSize;
40765 }
40766 }
40767 var firstDiffers = newFirst !== this.firstRenderedRow;
40768 var lastDiffers = newLast !== this.lastRenderedRow;
40769 if (firstDiffers || lastDiffers) {
40770 this.firstRenderedRow = newFirst;
40771 this.lastRenderedRow = newLast;
40772 var event_1 = {
40773 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_VIEWPORT_CHANGED,
40774 firstRow: newFirst,
40775 lastRow: newLast
40776 };
40777 this.eventService.dispatchEvent(event_1);
40778 }
40779 };
40780 /**
40781 * This event will only be fired once, and is queued until after the browser next renders.
40782 * This allows us to fire an event during the start of the render cycle, when we first see data being rendered
40783 * but not execute the event until all of the data has finished being rendered to the dom.
40784 */
40785 RowRenderer.prototype.dispatchFirstDataRenderedEvent = function () {
40786 var _this = this;
40787 if (this.dataFirstRenderedFired) {
40788 return;
40789 }
40790 this.dataFirstRenderedFired = true;
40791 var event = {
40792 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_FIRST_DATA_RENDERED,
40793 firstRow: this.firstRenderedRow,
40794 lastRow: this.lastRenderedRow,
40795 };
40796 // See AG-7018
40797 window.requestAnimationFrame(function () {
40798 _this.beans.eventService.dispatchEvent(event);
40799 });
40800 };
40801 RowRenderer.prototype.ensureAllRowsInRangeHaveHeightsCalculated = function (topPixel, bottomPixel) {
40802 // ensureRowHeightsVisible only works with CSRM, as it's the only row model that allows lazy row height calcs.
40803 // all the other row models just hard code so the method just returns back false
40804 var res = this.paginationProxy.ensureRowHeightsValid(topPixel, bottomPixel, -1, -1);
40805 if (res) {
40806 this.updateContainerHeights();
40807 }
40808 return res;
40809 };
40810 RowRenderer.prototype.getFirstVisibleVerticalPixel = function () {
40811 return this.firstVisibleVPixel;
40812 };
40813 RowRenderer.prototype.getFirstVirtualRenderedRow = function () {
40814 return this.firstRenderedRow;
40815 };
40816 RowRenderer.prototype.getLastVirtualRenderedRow = function () {
40817 return this.lastRenderedRow;
40818 };
40819 // check that none of the rows to remove are editing or focused as:
40820 // a) if editing, we want to keep them, otherwise the user will loose the context of the edit,
40821 // eg user starts editing, enters some text, then scrolls down and then up, next time row rendered
40822 // the edit is reset - so we want to keep it rendered.
40823 // b) if focused, we want ot keep keyboard focus, so if user ctrl+c, it goes to clipboard,
40824 // otherwise the user can range select and drag (with focus cell going out of the viewport)
40825 // and then ctrl+c, nothing will happen if cell is removed from dom.
40826 // c) if detail record of master detail, as users complained that the context of detail rows
40827 // was getting lost when detail row out of view. eg user expands to show detail row,
40828 // then manipulates the detail panel (eg sorts the detail grid), then context is lost
40829 // after detail panel is scrolled out of / into view.
40830 RowRenderer.prototype.doNotUnVirtualiseRow = function (rowComp) {
40831 var REMOVE_ROW = false;
40832 var KEEP_ROW = true;
40833 var rowNode = rowComp.getRowNode();
40834 var rowHasFocus = this.focusService.isRowNodeFocused(rowNode);
40835 var rowIsEditing = rowComp.isEditing();
40836 var rowIsDetail = rowNode.detail;
40837 var mightWantToKeepRow = rowHasFocus || rowIsEditing || rowIsDetail;
40838 // if we deffo don't want to keep it,
40839 if (!mightWantToKeepRow) {
40840 return REMOVE_ROW;
40841 }
40842 // editing row, only remove if it is no longer rendered, eg filtered out or new data set.
40843 // the reason we want to keep is if user is scrolling up and down, we don't want to loose
40844 // the context of the editing in process.
40845 var rowNodePresent = this.paginationProxy.isRowPresent(rowNode);
40846 return rowNodePresent ? KEEP_ROW : REMOVE_ROW;
40847 };
40848 RowRenderer.prototype.createRowCon = function (rowNode, animate, afterScroll) {
40849 var rowCtrlFromCache = this.cachedRowCtrls ? this.cachedRowCtrls.getRow(rowNode) : null;
40850 if (rowCtrlFromCache) {
40851 return rowCtrlFromCache;
40852 }
40853 // we don't use animations frames for printing, so the user can put the grid into print mode
40854 // and immediately print - otherwise the user would have to wait for the rows to draw in the background
40855 // (via the animation frames) which is awkward to do from code.
40856 // we only do the animation frames after scrolling, as this is where we want the smooth user experience.
40857 // having animation frames for other times makes the grid look 'jumpy'.
40858 var suppressAnimationFrame = this.gridOptionsService.is('suppressAnimationFrame');
40859 var useAnimationFrameForCreate = afterScroll && !suppressAnimationFrame && !this.printLayout;
40860 var res = new _row_rowCtrl__WEBPACK_IMPORTED_MODULE_0__["RowCtrl"](rowNode, this.beans, animate, useAnimationFrameForCreate, this.printLayout);
40861 return res;
40862 };
40863 RowRenderer.prototype.getRenderedNodes = function () {
40864 var renderedRows = this.rowCtrlsByRowIndex;
40865 return Object.keys(renderedRows).map(function (key) { return renderedRows[key].getRowNode(); });
40866 };
40867 RowRenderer.prototype.getRowByPosition = function (rowPosition) {
40868 var rowCtrl;
40869 var rowIndex = rowPosition.rowIndex;
40870 switch (rowPosition.rowPinned) {
40871 case 'top':
40872 rowCtrl = this.topRowCtrls[rowIndex];
40873 break;
40874 case 'bottom':
40875 rowCtrl = this.bottomRowCtrls[rowIndex];
40876 break;
40877 default:
40878 rowCtrl = this.rowCtrlsByRowIndex[rowIndex];
40879 if (!rowCtrl) {
40880 rowCtrl = this.getStickyTopRowCtrls().find(function (ctrl) { return ctrl.getRowNode().rowIndex === rowIndex; }) || null;
40881 }
40882 break;
40883 }
40884 return rowCtrl;
40885 };
40886 RowRenderer.prototype.getRowNode = function (gridRow) {
40887 switch (gridRow.rowPinned) {
40888 case 'top':
40889 return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];
40890 case 'bottom':
40891 return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];
40892 default:
40893 return this.rowModel.getRow(gridRow.rowIndex);
40894 }
40895 };
40896 // returns true if any row between startIndex and endIndex is rendered. used by
40897 // SSRM or IRM, as they don't want to purge visible blocks from cache.
40898 RowRenderer.prototype.isRangeInRenderedViewport = function (startIndex, endIndex) {
40899 // parent closed means the parent node is not expanded, thus these blocks are not visible
40900 var parentClosed = startIndex == null || endIndex == null;
40901 if (parentClosed) {
40902 return false;
40903 }
40904 var blockAfterViewport = startIndex > this.lastRenderedRow;
40905 var blockBeforeViewport = endIndex < this.firstRenderedRow;
40906 var blockInsideViewport = !blockBeforeViewport && !blockAfterViewport;
40907 return blockInsideViewport;
40908 };
40909 __decorate([
40910 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])("animationFrameService")
40911 ], RowRenderer.prototype, "animationFrameService", void 0);
40912 __decorate([
40913 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])("paginationProxy")
40914 ], RowRenderer.prototype, "paginationProxy", void 0);
40915 __decorate([
40916 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])("columnModel")
40917 ], RowRenderer.prototype, "columnModel", void 0);
40918 __decorate([
40919 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])("pinnedRowModel")
40920 ], RowRenderer.prototype, "pinnedRowModel", void 0);
40921 __decorate([
40922 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])("rowModel")
40923 ], RowRenderer.prototype, "rowModel", void 0);
40924 __decorate([
40925 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])("focusService")
40926 ], RowRenderer.prototype, "focusService", void 0);
40927 __decorate([
40928 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])("beans")
40929 ], RowRenderer.prototype, "beans", void 0);
40930 __decorate([
40931 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])("rowContainerHeightService")
40932 ], RowRenderer.prototype, "rowContainerHeightService", void 0);
40933 __decorate([
40934 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])("ctrlsService")
40935 ], RowRenderer.prototype, "ctrlsService", void 0);
40936 __decorate([
40937 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
40938 ], RowRenderer.prototype, "postConstruct", null);
40939 RowRenderer = __decorate([
40940 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])("rowRenderer")
40941 ], RowRenderer);
40942 return RowRenderer;
40943}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
40944
40945var RowCtrlCache = /** @class */ (function () {
40946 function RowCtrlCache(maxCount) {
40947 // map for fast access
40948 this.entriesMap = {};
40949 // list for keeping order
40950 this.entriesList = [];
40951 this.maxCount = maxCount;
40952 }
40953 RowCtrlCache.prototype.addRow = function (rowCtrl) {
40954 this.entriesMap[rowCtrl.getRowNode().id] = rowCtrl;
40955 this.entriesList.push(rowCtrl);
40956 rowCtrl.setCached(true);
40957 if (this.entriesList.length > this.maxCount) {
40958 var rowCtrlToDestroy = this.entriesList[0];
40959 rowCtrlToDestroy.destroyFirstPass();
40960 rowCtrlToDestroy.destroySecondPass();
40961 this.removeFromCache(rowCtrlToDestroy);
40962 }
40963 };
40964 RowCtrlCache.prototype.getRow = function (rowNode) {
40965 if (rowNode == null || rowNode.id == null) {
40966 return null;
40967 }
40968 var res = this.entriesMap[rowNode.id];
40969 if (!res) {
40970 return null;
40971 }
40972 this.removeFromCache(res);
40973 res.setCached(false);
40974 // this can happen if user reloads data, and a new RowNode is reusing
40975 // the same ID as the old one
40976 var rowNodeMismatch = res.getRowNode() != rowNode;
40977 return rowNodeMismatch ? null : res;
40978 };
40979 RowCtrlCache.prototype.removeFromCache = function (rowCtrl) {
40980 var rowNodeId = rowCtrl.getRowNode().id;
40981 delete this.entriesMap[rowNodeId];
40982 Object(_utils_array__WEBPACK_IMPORTED_MODULE_9__["removeFromArray"])(this.entriesList, rowCtrl);
40983 };
40984 RowCtrlCache.prototype.getEntries = function () {
40985 return this.entriesList;
40986 };
40987 return RowCtrlCache;
40988}());
40989
40990
40991/***/ }),
40992/* 179 */
40993/***/ (function(module, __webpack_exports__, __webpack_require__) {
40994
40995"use strict";
40996__webpack_require__.r(__webpack_exports__);
40997/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StickyRowFeature", function() { return StickyRowFeature; });
40998/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
40999/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
41000/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19);
41001/**
41002 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41003 * @version v29.2.0
41004 * @link https://www.ag-grid.com/
41005 * @license MIT
41006 */
41007var __extends = (undefined && undefined.__extends) || (function () {
41008 var extendStatics = function (d, b) {
41009 extendStatics = Object.setPrototypeOf ||
41010 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41011 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
41012 return extendStatics(d, b);
41013 };
41014 return function (d, b) {
41015 extendStatics(d, b);
41016 function __() { this.constructor = d; }
41017 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41018 };
41019})();
41020var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
41021 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41022 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41023 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;
41024 return c > 3 && r && Object.defineProperty(target, key, r), r;
41025};
41026var __values = (undefined && undefined.__values) || function(o) {
41027 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
41028 if (m) return m.call(o);
41029 if (o && typeof o.length === "number") return {
41030 next: function () {
41031 if (o && i >= o.length) o = void 0;
41032 return { value: o && o[i++], done: !o };
41033 }
41034 };
41035 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
41036};
41037var __read = (undefined && undefined.__read) || function (o, n) {
41038 var m = typeof Symbol === "function" && o[Symbol.iterator];
41039 if (!m) return o;
41040 var i = m.call(o), r, ar = [], e;
41041 try {
41042 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
41043 }
41044 catch (error) { e = { error: error }; }
41045 finally {
41046 try {
41047 if (r && !r.done && (m = i["return"])) m.call(i);
41048 }
41049 finally { if (e) throw e.error; }
41050 }
41051 return ar;
41052};
41053var __spread = (undefined && undefined.__spread) || function () {
41054 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
41055 return ar;
41056};
41057
41058
41059
41060var StickyRowFeature = /** @class */ (function (_super) {
41061 __extends(StickyRowFeature, _super);
41062 function StickyRowFeature(createRowCon, destroyRowCtrls) {
41063 var _this = _super.call(this) || this;
41064 _this.createRowCon = createRowCon;
41065 _this.destroyRowCtrls = destroyRowCtrls;
41066 _this.stickyRowCtrls = [];
41067 _this.containerHeight = 0;
41068 return _this;
41069 }
41070 StickyRowFeature.prototype.postConstruct = function () {
41071 var _this = this;
41072 this.ctrlsService.whenReady(function (params) {
41073 _this.gridBodyCtrl = params.gridBodyCtrl;
41074 });
41075 };
41076 StickyRowFeature.prototype.getStickyRowCtrls = function () {
41077 return this.stickyRowCtrls;
41078 };
41079 StickyRowFeature.prototype.checkStickyRows = function () {
41080 var height = 0;
41081 if (!this.gridOptionsService.is('groupRowsSticky')) {
41082 this.refreshNodesAndContainerHeight([], height);
41083 return;
41084 }
41085 var stickyRows = [];
41086 var firstPixel = this.rowRenderer.getFirstVisibleVerticalPixel();
41087 var addStickyRow = function (stickyRow) {
41088 stickyRows.push(stickyRow);
41089 var lastAncester = stickyRow;
41090 while (lastAncester.expanded) {
41091 lastAncester = Object(_utils_array__WEBPACK_IMPORTED_MODULE_2__["last"])(lastAncester.childrenAfterSort);
41092 }
41093 var lastChildBottom = lastAncester.rowTop + lastAncester.rowHeight;
41094 var stickRowBottom = firstPixel + height + stickyRow.rowHeight;
41095 if (lastChildBottom < stickRowBottom) {
41096 stickyRow.stickyRowTop = height + (lastChildBottom - stickRowBottom);
41097 }
41098 else {
41099 stickyRow.stickyRowTop = height;
41100 }
41101 height = 0;
41102 stickyRows.forEach(function (rowNode) {
41103 var thisRowLastPx = rowNode.stickyRowTop + rowNode.rowHeight;
41104 if (height < thisRowLastPx) {
41105 height = thisRowLastPx;
41106 }
41107 });
41108 };
41109 while (true) {
41110 var firstPixelAfterStickyRows = firstPixel + height;
41111 var firstIndex = this.rowModel.getRowIndexAtPixel(firstPixelAfterStickyRows);
41112 var firstRow = this.rowModel.getRow(firstIndex);
41113 if (firstRow == null) {
41114 break;
41115 }
41116 // only happens when pivoting, and we are showing root node
41117 if (firstRow.level < 0) {
41118 break;
41119 }
41120 var parents = [];
41121 var p = firstRow.parent;
41122 while (p.level >= 0) {
41123 parents.push(p);
41124 p = p.parent;
41125 }
41126 var firstMissingParent = parents.reverse().find(function (parent) { return stickyRows.indexOf(parent) < 0 && parent.displayed; });
41127 if (firstMissingParent) {
41128 addStickyRow(firstMissingParent);
41129 continue;
41130 }
41131 // if first row is an open group, and practically shown, it needs
41132 // to be stuck
41133 if (firstRow.group && firstRow.expanded && !firstRow.footer && firstRow.rowTop < firstPixelAfterStickyRows) {
41134 addStickyRow(firstRow);
41135 continue;
41136 }
41137 break;
41138 }
41139 this.refreshNodesAndContainerHeight(stickyRows, height);
41140 };
41141 StickyRowFeature.prototype.refreshNodesAndContainerHeight = function (allStickyNodes, height) {
41142 var e_1, _a, _b;
41143 var _this = this;
41144 var removedCtrls = this.stickyRowCtrls.filter(function (ctrl) { return allStickyNodes.indexOf(ctrl.getRowNode()) === -1; });
41145 var addedNodes = allStickyNodes.filter(function (rowNode) { return _this.stickyRowCtrls.findIndex(function (ctrl) { return ctrl.getRowNode() === rowNode; }) === -1; });
41146 var ctrlsToDestroy = {};
41147 removedCtrls.forEach(function (removedCtrl) {
41148 ctrlsToDestroy[removedCtrl.getRowNode().id] = removedCtrl;
41149 _this.stickyRowCtrls = _this.stickyRowCtrls.filter(function (ctrl) { return ctrl !== removedCtrl; });
41150 });
41151 try {
41152 for (var _c = __values(Object.values(ctrlsToDestroy)), _d = _c.next(); !_d.done; _d = _c.next()) {
41153 var ctrl = _d.value;
41154 ctrl.getRowNode().sticky = false;
41155 }
41156 }
41157 catch (e_1_1) { e_1 = { error: e_1_1 }; }
41158 finally {
41159 try {
41160 if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
41161 }
41162 finally { if (e_1) throw e_1.error; }
41163 }
41164 this.destroyRowCtrls(ctrlsToDestroy, false);
41165 var newCtrls = addedNodes.map(function (rowNode) {
41166 rowNode.sticky = true;
41167 return _this.createRowCon(rowNode, false, false);
41168 });
41169 (_b = this.stickyRowCtrls).push.apply(_b, __spread(newCtrls));
41170 this.stickyRowCtrls.forEach(function (ctrl) { return ctrl.setRowTop(ctrl.getRowNode().stickyRowTop); });
41171 this.stickyRowCtrls.sort(function (a, b) { return b.getRowNode().rowIndex - a.getRowNode().rowIndex; });
41172 if (this.containerHeight !== height) {
41173 this.containerHeight = height;
41174 this.gridBodyCtrl.setStickyTopHeight(height);
41175 }
41176 };
41177 __decorate([
41178 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])("rowModel")
41179 ], StickyRowFeature.prototype, "rowModel", void 0);
41180 __decorate([
41181 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])("rowRenderer")
41182 ], StickyRowFeature.prototype, "rowRenderer", void 0);
41183 __decorate([
41184 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])("ctrlsService")
41185 ], StickyRowFeature.prototype, "ctrlsService", void 0);
41186 __decorate([
41187 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
41188 ], StickyRowFeature.prototype, "postConstruct", null);
41189 return StickyRowFeature;
41190}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
41191
41192
41193
41194/***/ }),
41195/* 180 */
41196/***/ (function(module, __webpack_exports__, __webpack_require__) {
41197
41198"use strict";
41199__webpack_require__.r(__webpack_exports__);
41200/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValueFormatterService", function() { return ValueFormatterService; });
41201/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
41202/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
41203/**
41204 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41205 * @version v29.2.0
41206 * @link https://www.ag-grid.com/
41207 * @license MIT
41208 */
41209var __extends = (undefined && undefined.__extends) || (function () {
41210 var extendStatics = function (d, b) {
41211 extendStatics = Object.setPrototypeOf ||
41212 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41213 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
41214 return extendStatics(d, b);
41215 };
41216 return function (d, b) {
41217 extendStatics(d, b);
41218 function __() { this.constructor = d; }
41219 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41220 };
41221})();
41222var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
41223 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41224 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41225 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;
41226 return c > 3 && r && Object.defineProperty(target, key, r), r;
41227};
41228
41229
41230var ValueFormatterService = /** @class */ (function (_super) {
41231 __extends(ValueFormatterService, _super);
41232 function ValueFormatterService() {
41233 return _super !== null && _super.apply(this, arguments) || this;
41234 }
41235 ValueFormatterService.prototype.formatValue = function (column, node, value, suppliedFormatter, useFormatterFromColumn) {
41236 if (useFormatterFromColumn === void 0) { useFormatterFromColumn = true; }
41237 var result = null;
41238 var formatter;
41239 var colDef = column.getColDef();
41240 if (suppliedFormatter) {
41241 // use supplied formatter if provided, e.g. set filter items can have their own value formatters
41242 formatter = suppliedFormatter;
41243 }
41244 else if (useFormatterFromColumn) {
41245 formatter = colDef.valueFormatter;
41246 }
41247 if (formatter) {
41248 var params = {
41249 value: value,
41250 node: node,
41251 data: node ? node.data : null,
41252 colDef: colDef,
41253 column: column,
41254 api: this.gridOptionsService.api,
41255 columnApi: this.gridOptionsService.columnApi,
41256 context: this.gridOptionsService.context
41257 };
41258 if (typeof formatter === 'function') {
41259 result = formatter(params);
41260 }
41261 else {
41262 result = this.expressionService.evaluate(formatter, params);
41263 }
41264 }
41265 else if (colDef.refData) {
41266 return colDef.refData[value] || '';
41267 }
41268 // if we don't do this, then arrays get displayed as 1,2,3, but we want 1, 2, 3 (i.e. with spaces)
41269 if (result == null && Array.isArray(value)) {
41270 result = value.join(', ');
41271 }
41272 return result;
41273 };
41274 __decorate([
41275 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('expressionService')
41276 ], ValueFormatterService.prototype, "expressionService", void 0);
41277 ValueFormatterService = __decorate([
41278 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('valueFormatterService')
41279 ], ValueFormatterService);
41280 return ValueFormatterService;
41281}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
41282
41283
41284
41285/***/ }),
41286/* 181 */
41287/***/ (function(module, __webpack_exports__, __webpack_require__) {
41288
41289"use strict";
41290__webpack_require__.r(__webpack_exports__);
41291/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PinnedRowModel", function() { return PinnedRowModel; });
41292/* harmony import */ var _entities_rowNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97);
41293/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
41294/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
41295/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
41296/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
41297/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(19);
41298/**
41299 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41300 * @version v29.2.0
41301 * @link https://www.ag-grid.com/
41302 * @license MIT
41303 */
41304var __extends = (undefined && undefined.__extends) || (function () {
41305 var extendStatics = function (d, b) {
41306 extendStatics = Object.setPrototypeOf ||
41307 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41308 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
41309 return extendStatics(d, b);
41310 };
41311 return function (d, b) {
41312 extendStatics(d, b);
41313 function __() { this.constructor = d; }
41314 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41315 };
41316})();
41317var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
41318 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41319 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41320 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;
41321 return c > 3 && r && Object.defineProperty(target, key, r), r;
41322};
41323
41324
41325
41326
41327
41328
41329var PinnedRowModel = /** @class */ (function (_super) {
41330 __extends(PinnedRowModel, _super);
41331 function PinnedRowModel() {
41332 return _super !== null && _super.apply(this, arguments) || this;
41333 }
41334 PinnedRowModel.prototype.init = function () {
41335 this.setPinnedTopRowData(this.gridOptionsService.get('pinnedTopRowData'));
41336 this.setPinnedBottomRowData(this.gridOptionsService.get('pinnedBottomRowData'));
41337 };
41338 PinnedRowModel.prototype.isEmpty = function (floating) {
41339 var rows = floating === 'top' ? this.pinnedTopRows : this.pinnedBottomRows;
41340 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missingOrEmpty"])(rows);
41341 };
41342 PinnedRowModel.prototype.isRowsToRender = function (floating) {
41343 return !this.isEmpty(floating);
41344 };
41345 PinnedRowModel.prototype.getRowAtPixel = function (pixel, floating) {
41346 var rows = floating === 'top' ? this.pinnedTopRows : this.pinnedBottomRows;
41347 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missingOrEmpty"])(rows)) {
41348 return 0; // this should never happen, just in case, 0 is graceful failure
41349 }
41350 for (var i = 0; i < rows.length; i++) {
41351 var rowNode = rows[i];
41352 var rowTopPixel = rowNode.rowTop + rowNode.rowHeight - 1;
41353 // only need to range check against the top pixel, as we are going through the list
41354 // in order, first row to hit the pixel wins
41355 if (rowTopPixel >= pixel) {
41356 return i;
41357 }
41358 }
41359 return rows.length - 1;
41360 };
41361 PinnedRowModel.prototype.setPinnedTopRowData = function (rowData) {
41362 this.pinnedTopRows = this.createNodesFromData(rowData, true);
41363 var event = {
41364 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_PINNED_ROW_DATA_CHANGED
41365 };
41366 this.eventService.dispatchEvent(event);
41367 };
41368 PinnedRowModel.prototype.setPinnedBottomRowData = function (rowData) {
41369 this.pinnedBottomRows = this.createNodesFromData(rowData, false);
41370 var event = {
41371 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_PINNED_ROW_DATA_CHANGED
41372 };
41373 this.eventService.dispatchEvent(event);
41374 };
41375 PinnedRowModel.prototype.createNodesFromData = function (allData, isTop) {
41376 var _this = this;
41377 var rowNodes = [];
41378 if (allData) {
41379 var nextRowTop_1 = 0;
41380 allData.forEach(function (dataItem, index) {
41381 var rowNode = new _entities_rowNode__WEBPACK_IMPORTED_MODULE_0__["RowNode"](_this.beans);
41382 rowNode.data = dataItem;
41383 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;
41384 rowNode.id = idPrefix + index;
41385 rowNode.rowPinned = isTop ? 'top' : 'bottom';
41386 rowNode.setRowTop(nextRowTop_1);
41387 rowNode.setRowHeight(_this.gridOptionsService.getRowHeightForNode(rowNode).height);
41388 rowNode.setRowIndex(index);
41389 nextRowTop_1 += rowNode.rowHeight;
41390 rowNodes.push(rowNode);
41391 });
41392 }
41393 return rowNodes;
41394 };
41395 PinnedRowModel.prototype.getPinnedTopRowData = function () {
41396 return this.pinnedTopRows;
41397 };
41398 PinnedRowModel.prototype.getPinnedBottomRowData = function () {
41399 return this.pinnedBottomRows;
41400 };
41401 PinnedRowModel.prototype.getPinnedTopTotalHeight = function () {
41402 return this.getTotalHeight(this.pinnedTopRows);
41403 };
41404 PinnedRowModel.prototype.getPinnedTopRowCount = function () {
41405 return this.pinnedTopRows ? this.pinnedTopRows.length : 0;
41406 };
41407 PinnedRowModel.prototype.getPinnedBottomRowCount = function () {
41408 return this.pinnedBottomRows ? this.pinnedBottomRows.length : 0;
41409 };
41410 PinnedRowModel.prototype.getPinnedTopRow = function (index) {
41411 return this.pinnedTopRows[index];
41412 };
41413 PinnedRowModel.prototype.getPinnedBottomRow = function (index) {
41414 return this.pinnedBottomRows[index];
41415 };
41416 PinnedRowModel.prototype.forEachPinnedTopRow = function (callback) {
41417 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missingOrEmpty"])(this.pinnedTopRows)) {
41418 return;
41419 }
41420 this.pinnedTopRows.forEach(callback);
41421 };
41422 PinnedRowModel.prototype.forEachPinnedBottomRow = function (callback) {
41423 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missingOrEmpty"])(this.pinnedBottomRows)) {
41424 return;
41425 }
41426 this.pinnedBottomRows.forEach(callback);
41427 };
41428 PinnedRowModel.prototype.getPinnedBottomTotalHeight = function () {
41429 return this.getTotalHeight(this.pinnedBottomRows);
41430 };
41431 PinnedRowModel.prototype.getTotalHeight = function (rowNodes) {
41432 if (!rowNodes || rowNodes.length === 0) {
41433 return 0;
41434 }
41435 var lastNode = Object(_utils_array__WEBPACK_IMPORTED_MODULE_5__["last"])(rowNodes);
41436 return lastNode.rowTop + lastNode.rowHeight;
41437 };
41438 __decorate([
41439 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('beans')
41440 ], PinnedRowModel.prototype, "beans", void 0);
41441 __decorate([
41442 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
41443 ], PinnedRowModel.prototype, "init", null);
41444 PinnedRowModel = __decorate([
41445 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('pinnedRowModel')
41446 ], PinnedRowModel);
41447 return PinnedRowModel;
41448}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
41449
41450
41451
41452/***/ }),
41453/* 182 */
41454/***/ (function(module, __webpack_exports__, __webpack_require__) {
41455
41456"use strict";
41457__webpack_require__.r(__webpack_exports__);
41458/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServerSideTransactionResultStatus", function() { return ServerSideTransactionResultStatus; });
41459/**
41460 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41461 * @version v29.2.0
41462 * @link https://www.ag-grid.com/
41463 * @license MIT
41464 */
41465var ServerSideTransactionResultStatus;
41466(function (ServerSideTransactionResultStatus) {
41467 /** Transaction was successfully applied */
41468 ServerSideTransactionResultStatus["Applied"] = "Applied";
41469 /**
41470 * Store was not found, transaction not applied.
41471 * Either invalid route, or the parent row has not yet been expanded.
41472 */
41473 ServerSideTransactionResultStatus["StoreNotFound"] = "StoreNotFound";
41474 /**
41475 * Store is loading, transaction not applied.
41476 */
41477 ServerSideTransactionResultStatus["StoreLoading"] = "StoreLoading";
41478 /**
41479 * Store is loading (as max loads exceeded), transaction not applied.
41480 */
41481 ServerSideTransactionResultStatus["StoreWaitingToLoad"] = "StoreWaitingToLoad";
41482 /**
41483 * Store load attempt failed, transaction not applied.
41484 */
41485 ServerSideTransactionResultStatus["StoreLoadingFailed"] = "StoreLoadingFailed";
41486 /**
41487 * Store is type Partial, which doesn't accept transactions
41488 */
41489 ServerSideTransactionResultStatus["StoreWrongType"] = "StoreWrongType";
41490 /**
41491 * Transaction was cancelled, due to grid.
41492 * Callback isApplyServerSideTransaction() returning false
41493 */
41494 ServerSideTransactionResultStatus["Cancelled"] = "Cancelled";
41495})(ServerSideTransactionResultStatus || (ServerSideTransactionResultStatus = {}));
41496
41497
41498/***/ }),
41499/* 183 */
41500/***/ (function(module, __webpack_exports__, __webpack_require__) {
41501
41502"use strict";
41503__webpack_require__.r(__webpack_exports__);
41504/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangedPath", function() { return ChangedPath; });
41505/**
41506 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41507 * @version v29.2.0
41508 * @link https://www.ag-grid.com/
41509 * @license MIT
41510 */
41511// when doing transactions, or change detection, and grouping is present
41512// in the data, there is no need for the ClientSideRowModel to update each
41513// group after an update, ony parts that were impacted by the change.
41514// this class keeps track of all groups that were impacted by a transaction.
41515// the the different CSRM operations (filter, sort etc) use the forEach method
41516// to visit each group that was changed.
41517var ChangedPath = /** @class */ (function () {
41518 function ChangedPath(keepingColumns, rootNode) {
41519 // whether changed path is active of not. it is active when a) doing
41520 // a transaction update or b) doing change detection. if we are doing
41521 // a CSRM refresh for other reasons (after sort or filter, or user calling
41522 // setRowData() without delta mode) then we are not active. we are also
41523 // marked as not active if secondary columns change in pivot (as this impacts
41524 // aggregations)
41525 this.active = true;
41526 // for each node in the change path, we also store which columns need
41527 // to be re-aggregated.
41528 this.nodeIdsToColumns = {};
41529 // for quick lookup, all items in the change path are mapped by nodeId
41530 this.mapToItems = {};
41531 this.keepingColumns = keepingColumns;
41532 this.pathRoot = {
41533 rowNode: rootNode,
41534 children: null
41535 };
41536 this.mapToItems[rootNode.id] = this.pathRoot;
41537 }
41538 // can be set inactive by:
41539 // a) ClientSideRowModel, if no transactions or
41540 // b) PivotService, if secondary columns changed
41541 ChangedPath.prototype.setInactive = function () {
41542 this.active = false;
41543 };
41544 ChangedPath.prototype.isActive = function () {
41545 return this.active;
41546 };
41547 ChangedPath.prototype.depthFirstSearchChangedPath = function (pathItem, callback) {
41548 if (pathItem.children) {
41549 for (var i = 0; i < pathItem.children.length; i++) {
41550 this.depthFirstSearchChangedPath(pathItem.children[i], callback);
41551 }
41552 }
41553 callback(pathItem.rowNode);
41554 };
41555 ChangedPath.prototype.depthFirstSearchEverything = function (rowNode, callback, traverseEverything) {
41556 if (rowNode.childrenAfterGroup) {
41557 for (var i = 0; i < rowNode.childrenAfterGroup.length; i++) {
41558 var childNode = rowNode.childrenAfterGroup[i];
41559 if (childNode.childrenAfterGroup) {
41560 this.depthFirstSearchEverything(rowNode.childrenAfterGroup[i], callback, traverseEverything);
41561 }
41562 else if (traverseEverything) {
41563 callback(childNode);
41564 }
41565 }
41566 }
41567 callback(rowNode);
41568 };
41569 // traverseLeafNodes -> used when NOT doing changed path, ie traversing everything. the callback
41570 // will be called for child nodes in addition to parent nodes.
41571 ChangedPath.prototype.forEachChangedNodeDepthFirst = function (callback, traverseLeafNodes, includeUnchangedNodes) {
41572 if (traverseLeafNodes === void 0) { traverseLeafNodes = false; }
41573 if (includeUnchangedNodes === void 0) { includeUnchangedNodes = false; }
41574 if (this.active && !includeUnchangedNodes) {
41575 // if we are active, then use the change path to callback
41576 // only for updated groups
41577 this.depthFirstSearchChangedPath(this.pathRoot, callback);
41578 }
41579 else {
41580 // we are not active, so callback for everything, walk the entire path
41581 this.depthFirstSearchEverything(this.pathRoot.rowNode, callback, traverseLeafNodes);
41582 }
41583 };
41584 ChangedPath.prototype.executeFromRootNode = function (callback) {
41585 callback(this.pathRoot.rowNode);
41586 };
41587 ChangedPath.prototype.createPathItems = function (rowNode) {
41588 var pointer = rowNode;
41589 var newEntryCount = 0;
41590 while (!this.mapToItems[pointer.id]) {
41591 var newEntry = {
41592 rowNode: pointer,
41593 children: null
41594 };
41595 this.mapToItems[pointer.id] = newEntry;
41596 newEntryCount++;
41597 pointer = pointer.parent;
41598 }
41599 return newEntryCount;
41600 };
41601 ChangedPath.prototype.populateColumnsMap = function (rowNode, columns) {
41602 var _this = this;
41603 if (!this.keepingColumns || !columns) {
41604 return;
41605 }
41606 var pointer = rowNode;
41607 while (pointer) {
41608 // if columns, add the columns in all the way to parent, merging
41609 // in any other columns that might be there already
41610 if (!this.nodeIdsToColumns[pointer.id]) {
41611 this.nodeIdsToColumns[pointer.id] = {};
41612 }
41613 columns.forEach(function (col) { return _this.nodeIdsToColumns[pointer.id][col.getId()] = true; });
41614 pointer = pointer.parent;
41615 }
41616 };
41617 ChangedPath.prototype.linkPathItems = function (rowNode, newEntryCount) {
41618 var pointer = rowNode;
41619 for (var i = 0; i < newEntryCount; i++) {
41620 var thisItem = this.mapToItems[pointer.id];
41621 var parentItem = this.mapToItems[pointer.parent.id];
41622 if (!parentItem.children) {
41623 parentItem.children = [];
41624 }
41625 parentItem.children.push(thisItem);
41626 pointer = pointer.parent;
41627 }
41628 };
41629 // called by
41630 // 1) change detection (provides cols) and
41631 // 2) groupStage if doing transaction update (doesn't provide cols)
41632 ChangedPath.prototype.addParentNode = function (rowNode, columns) {
41633 if (!rowNode || rowNode.isRowPinned()) {
41634 return;
41635 }
41636 // we cannot do both steps below in the same loop as
41637 // the second loop has a dependency on the first loop.
41638 // ie the hierarchy cannot be stitched up yet because
41639 // we don't have it built yet
41640 // create the new PathItem objects.
41641 var newEntryCount = this.createPathItems(rowNode);
41642 // link in the node items
41643 this.linkPathItems(rowNode, newEntryCount);
41644 // update columns
41645 this.populateColumnsMap(rowNode, columns);
41646 };
41647 ChangedPath.prototype.canSkip = function (rowNode) {
41648 return this.active && !this.mapToItems[rowNode.id];
41649 };
41650 ChangedPath.prototype.getValueColumnsForNode = function (rowNode, valueColumns) {
41651 if (!this.keepingColumns) {
41652 return valueColumns;
41653 }
41654 var colsForThisNode = this.nodeIdsToColumns[rowNode.id];
41655 var result = valueColumns.filter(function (col) { return colsForThisNode[col.getId()]; });
41656 return result;
41657 };
41658 ChangedPath.prototype.getNotValueColumnsForNode = function (rowNode, valueColumns) {
41659 if (!this.keepingColumns) {
41660 return null;
41661 }
41662 var colsForThisNode = this.nodeIdsToColumns[rowNode.id];
41663 var result = valueColumns.filter(function (col) { return !colsForThisNode[col.getId()]; });
41664 return result;
41665 };
41666 return ChangedPath;
41667}());
41668
41669
41670
41671/***/ }),
41672/* 184 */
41673/***/ (function(module, __webpack_exports__, __webpack_require__) {
41674
41675"use strict";
41676__webpack_require__.r(__webpack_exports__);
41677/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlock", function() { return RowNodeBlock; });
41678/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
41679/**
41680 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41681 * @version v29.2.0
41682 * @link https://www.ag-grid.com/
41683 * @license MIT
41684 */
41685var __extends = (undefined && undefined.__extends) || (function () {
41686 var extendStatics = function (d, b) {
41687 extendStatics = Object.setPrototypeOf ||
41688 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41689 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
41690 return extendStatics(d, b);
41691 };
41692 return function (d, b) {
41693 extendStatics(d, b);
41694 function __() { this.constructor = d; }
41695 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41696 };
41697})();
41698
41699var RowNodeBlock = /** @class */ (function (_super) {
41700 __extends(RowNodeBlock, _super);
41701 function RowNodeBlock(id) {
41702 var _this = _super.call(this) || this;
41703 _this.state = RowNodeBlock.STATE_WAITING_TO_LOAD;
41704 _this.version = 0;
41705 _this.id = id;
41706 return _this;
41707 }
41708 RowNodeBlock.prototype.getId = function () {
41709 return this.id;
41710 };
41711 RowNodeBlock.prototype.load = function () {
41712 this.state = RowNodeBlock.STATE_LOADING;
41713 this.loadFromDatasource();
41714 };
41715 RowNodeBlock.prototype.getVersion = function () {
41716 return this.version;
41717 };
41718 RowNodeBlock.prototype.setStateWaitingToLoad = function () {
41719 // in case any current loads in progress, this will have their results ignored
41720 this.version++;
41721 this.state = RowNodeBlock.STATE_WAITING_TO_LOAD;
41722 };
41723 RowNodeBlock.prototype.getState = function () {
41724 return this.state;
41725 };
41726 RowNodeBlock.prototype.pageLoadFailed = function (version) {
41727 var requestMostRecentAndLive = this.isRequestMostRecentAndLive(version);
41728 if (requestMostRecentAndLive) {
41729 this.state = RowNodeBlock.STATE_FAILED;
41730 this.processServerFail();
41731 }
41732 this.dispatchLoadCompleted(false);
41733 };
41734 RowNodeBlock.prototype.success = function (version, params) {
41735 this.successCommon(version, params);
41736 };
41737 RowNodeBlock.prototype.pageLoaded = function (version, rows, lastRow) {
41738 this.successCommon(version, { rowData: rows, rowCount: lastRow });
41739 };
41740 RowNodeBlock.prototype.isRequestMostRecentAndLive = function (version) {
41741 // thisIsMostRecentRequest - if block was refreshed, then another request
41742 // could of been sent after this one.
41743 var thisIsMostRecentRequest = version === this.version;
41744 // weAreNotDestroyed - if InfiniteStore is purged, then blocks are destroyed
41745 // and new blocks created. so data loads of old blocks are discarded.
41746 var weAreNotDestroyed = this.isAlive();
41747 return thisIsMostRecentRequest && weAreNotDestroyed;
41748 };
41749 RowNodeBlock.prototype.successCommon = function (version, params) {
41750 // need to dispatch load complete before processing the data, as PaginationComp checks
41751 // RowNodeBlockLoader to see if it is still loading, so the RowNodeBlockLoader needs to
41752 // be updated first (via LoadComplete event) before PaginationComp updates (via processServerResult method)
41753 this.dispatchLoadCompleted();
41754 var requestMostRecentAndLive = this.isRequestMostRecentAndLive(version);
41755 if (requestMostRecentAndLive) {
41756 this.state = RowNodeBlock.STATE_LOADED;
41757 this.processServerResult(params);
41758 }
41759 };
41760 RowNodeBlock.prototype.dispatchLoadCompleted = function (success) {
41761 if (success === void 0) { success = true; }
41762 // we fire event regardless of processing data or now, as we want
41763 // the concurrentLoadRequests count to be reduced in BlockLoader
41764 var event = {
41765 type: RowNodeBlock.EVENT_LOAD_COMPLETE,
41766 success: success,
41767 block: this
41768 };
41769 this.dispatchEvent(event);
41770 };
41771 RowNodeBlock.EVENT_LOAD_COMPLETE = 'loadComplete';
41772 RowNodeBlock.STATE_WAITING_TO_LOAD = 'needsLoading';
41773 RowNodeBlock.STATE_LOADING = 'loading';
41774 RowNodeBlock.STATE_LOADED = 'loaded';
41775 RowNodeBlock.STATE_FAILED = 'failed';
41776 return RowNodeBlock;
41777}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
41778
41779
41780
41781/***/ }),
41782/* 185 */
41783/***/ (function(module, __webpack_exports__, __webpack_require__) {
41784
41785"use strict";
41786__webpack_require__.r(__webpack_exports__);
41787/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlockLoader", function() { return RowNodeBlockLoader; });
41788/* harmony import */ var _rowNodeBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(184);
41789/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
41790/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
41791/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39);
41792/**
41793 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41794 * @version v29.2.0
41795 * @link https://www.ag-grid.com/
41796 * @license MIT
41797 */
41798var __extends = (undefined && undefined.__extends) || (function () {
41799 var extendStatics = function (d, b) {
41800 extendStatics = Object.setPrototypeOf ||
41801 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41802 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
41803 return extendStatics(d, b);
41804 };
41805 return function (d, b) {
41806 extendStatics(d, b);
41807 function __() { this.constructor = d; }
41808 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41809 };
41810})();
41811var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
41812 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41813 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41814 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;
41815 return c > 3 && r && Object.defineProperty(target, key, r), r;
41816};
41817var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
41818 return function (target, key) { decorator(target, key, paramIndex); }
41819};
41820
41821
41822
41823
41824var RowNodeBlockLoader = /** @class */ (function (_super) {
41825 __extends(RowNodeBlockLoader, _super);
41826 function RowNodeBlockLoader() {
41827 var _this = _super !== null && _super.apply(this, arguments) || this;
41828 _this.activeBlockLoadsCount = 0;
41829 _this.blocks = [];
41830 _this.active = true;
41831 return _this;
41832 }
41833 RowNodeBlockLoader_1 = RowNodeBlockLoader;
41834 RowNodeBlockLoader.prototype.postConstruct = function () {
41835 this.maxConcurrentRequests = this.getMaxConcurrentDatasourceRequests();
41836 var blockLoadDebounceMillis = this.gridOptionsService.getNum('blockLoadDebounceMillis');
41837 if (blockLoadDebounceMillis && blockLoadDebounceMillis > 0) {
41838 this.checkBlockToLoadDebounce = _utils__WEBPACK_IMPORTED_MODULE_3__["_"].debounce(this.performCheckBlocksToLoad.bind(this), blockLoadDebounceMillis);
41839 }
41840 };
41841 RowNodeBlockLoader.prototype.setBeans = function (loggerFactory) {
41842 this.logger = loggerFactory.create('RowNodeBlockLoader');
41843 };
41844 RowNodeBlockLoader.prototype.getMaxConcurrentDatasourceRequests = function () {
41845 var res = this.gridOptionsService.getNum('maxConcurrentDatasourceRequests');
41846 if (res == null) {
41847 return 2;
41848 } // 2 is the default
41849 if (res <= 0) {
41850 return;
41851 } // negative number, eg -1, means no max restriction
41852 return res;
41853 };
41854 RowNodeBlockLoader.prototype.addBlock = function (block) {
41855 this.blocks.push(block);
41856 // note that we do not remove this listener when removing the block. this is because the
41857 // cache can get destroyed (and containing blocks) when a block is loading. however the loading block
41858 // is still counted as an active loading block and we must decrement activeBlockLoadsCount when it finishes.
41859 block.addEventListener(_rowNodeBlock__WEBPACK_IMPORTED_MODULE_0__["RowNodeBlock"].EVENT_LOAD_COMPLETE, this.loadComplete.bind(this));
41860 this.checkBlockToLoad();
41861 };
41862 RowNodeBlockLoader.prototype.removeBlock = function (block) {
41863 _utils__WEBPACK_IMPORTED_MODULE_3__["_"].removeFromArray(this.blocks, block);
41864 };
41865 RowNodeBlockLoader.prototype.destroy = function () {
41866 _super.prototype.destroy.call(this);
41867 this.active = false;
41868 };
41869 RowNodeBlockLoader.prototype.loadComplete = function () {
41870 this.activeBlockLoadsCount--;
41871 this.checkBlockToLoad();
41872 this.dispatchEvent({ type: RowNodeBlockLoader_1.BLOCK_LOADED_EVENT });
41873 if (this.activeBlockLoadsCount == 0) {
41874 this.dispatchEvent({ type: RowNodeBlockLoader_1.BLOCK_LOADER_FINISHED_EVENT });
41875 }
41876 };
41877 RowNodeBlockLoader.prototype.checkBlockToLoad = function () {
41878 if (this.checkBlockToLoadDebounce) {
41879 this.checkBlockToLoadDebounce();
41880 }
41881 else {
41882 this.performCheckBlocksToLoad();
41883 }
41884 };
41885 RowNodeBlockLoader.prototype.performCheckBlocksToLoad = function () {
41886 if (!this.active) {
41887 return;
41888 }
41889 this.printCacheStatus();
41890 if (this.maxConcurrentRequests != null && this.activeBlockLoadsCount >= this.maxConcurrentRequests) {
41891 this.logger.log("checkBlockToLoad: max loads exceeded");
41892 return;
41893 }
41894 var loadAvailability = this.getAvailableLoadingCount();
41895 var blocksToLoad = this.blocks.filter(function (block) { return (block.getState() === _rowNodeBlock__WEBPACK_IMPORTED_MODULE_0__["RowNodeBlock"].STATE_WAITING_TO_LOAD); }).slice(0, loadAvailability);
41896 this.registerLoads(blocksToLoad.length);
41897 blocksToLoad.forEach(function (block) { return block.load(); });
41898 this.printCacheStatus();
41899 };
41900 RowNodeBlockLoader.prototype.getBlockState = function () {
41901 if (this.gridOptionsService.isRowModelType('serverSide')) {
41902 var ssrm = this.rowModel;
41903 return ssrm.getBlockStates();
41904 }
41905 var result = {};
41906 this.blocks.forEach(function (block) {
41907 var _a = block.getBlockStateJson(), id = _a.id, state = _a.state;
41908 result[id] = state;
41909 });
41910 return result;
41911 };
41912 RowNodeBlockLoader.prototype.printCacheStatus = function () {
41913 if (this.logger.isLogging()) {
41914 this.logger.log("printCacheStatus: activePageLoadsCount = " + this.activeBlockLoadsCount + ","
41915 + (" blocks = " + JSON.stringify(this.getBlockState())));
41916 }
41917 };
41918 RowNodeBlockLoader.prototype.isLoading = function () {
41919 return this.activeBlockLoadsCount > 0;
41920 };
41921 RowNodeBlockLoader.prototype.registerLoads = function (count) {
41922 this.activeBlockLoadsCount += count;
41923 };
41924 RowNodeBlockLoader.prototype.getAvailableLoadingCount = function () {
41925 return this.maxConcurrentRequests !== undefined ? this.maxConcurrentRequests - this.activeBlockLoadsCount : undefined;
41926 };
41927 var RowNodeBlockLoader_1;
41928 RowNodeBlockLoader.BLOCK_LOADED_EVENT = 'blockLoaded';
41929 RowNodeBlockLoader.BLOCK_LOADER_FINISHED_EVENT = 'blockLoaderFinished';
41930 __decorate([
41931 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowModel')
41932 ], RowNodeBlockLoader.prototype, "rowModel", void 0);
41933 __decorate([
41934 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
41935 ], RowNodeBlockLoader.prototype, "postConstruct", null);
41936 __decorate([
41937 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Qualifier"])('loggerFactory'))
41938 ], RowNodeBlockLoader.prototype, "setBeans", null);
41939 RowNodeBlockLoader = RowNodeBlockLoader_1 = __decorate([
41940 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('rowNodeBlockLoader')
41941 ], RowNodeBlockLoader);
41942 return RowNodeBlockLoader;
41943}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
41944
41945
41946
41947/***/ }),
41948/* 186 */
41949/***/ (function(module, __webpack_exports__, __webpack_require__) {
41950
41951"use strict";
41952__webpack_require__.r(__webpack_exports__);
41953/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PaginationProxy", function() { return PaginationProxy; });
41954/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
41955/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
41956/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
41957/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
41958/**
41959 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41960 * @version v29.2.0
41961 * @link https://www.ag-grid.com/
41962 * @license MIT
41963 */
41964var __extends = (undefined && undefined.__extends) || (function () {
41965 var extendStatics = function (d, b) {
41966 extendStatics = Object.setPrototypeOf ||
41967 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41968 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
41969 return extendStatics(d, b);
41970 };
41971 return function (d, b) {
41972 extendStatics(d, b);
41973 function __() { this.constructor = d; }
41974 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41975 };
41976})();
41977var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
41978 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41979 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41980 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;
41981 return c > 3 && r && Object.defineProperty(target, key, r), r;
41982};
41983
41984
41985
41986
41987var PaginationProxy = /** @class */ (function (_super) {
41988 __extends(PaginationProxy, _super);
41989 function PaginationProxy() {
41990 var _this = _super !== null && _super.apply(this, arguments) || this;
41991 _this.currentPage = 0;
41992 _this.topDisplayedRowIndex = 0;
41993 _this.bottomDisplayedRowIndex = 0;
41994 _this.pixelOffset = 0;
41995 _this.masterRowCount = 0;
41996 return _this;
41997 }
41998 PaginationProxy.prototype.postConstruct = function () {
41999 this.active = this.gridOptionsService.is('pagination');
42000 this.paginateChildRows = this.isPaginateChildRows();
42001 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_MODEL_UPDATED, this.onModelUpdated.bind(this));
42002 this.addManagedPropertyListener('pagination', this.onPaginationPageSizeChanged.bind(this));
42003 this.addManagedPropertyListener('paginationPageSize', this.onPaginationPageSizeChanged.bind(this));
42004 this.onModelUpdated();
42005 };
42006 PaginationProxy.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) {
42007 var res = this.rowModel.ensureRowHeightsValid(startPixel, endPixel, this.getPageFirstRow(), this.getPageLastRow());
42008 if (res) {
42009 this.calculatePages();
42010 }
42011 return res;
42012 };
42013 PaginationProxy.prototype.isPaginateChildRows = function () {
42014 var shouldPaginate = this.gridOptionsService.is('groupRemoveSingleChildren') || this.gridOptionsService.is('groupRemoveLowestSingleChildren');
42015 if (shouldPaginate) {
42016 return true;
42017 }
42018 return this.gridOptionsService.is('paginateChildRows');
42019 };
42020 PaginationProxy.prototype.onModelUpdated = function (modelUpdatedEvent) {
42021 this.calculatePages();
42022 var paginationChangedEvent = {
42023 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PAGINATION_CHANGED,
42024 animate: modelUpdatedEvent ? modelUpdatedEvent.animate : false,
42025 newData: modelUpdatedEvent ? modelUpdatedEvent.newData : false,
42026 newPage: modelUpdatedEvent ? modelUpdatedEvent.newPage : false,
42027 keepRenderedRows: modelUpdatedEvent ? modelUpdatedEvent.keepRenderedRows : false
42028 };
42029 this.eventService.dispatchEvent(paginationChangedEvent);
42030 };
42031 PaginationProxy.prototype.onPaginationPageSizeChanged = function () {
42032 this.active = this.gridOptionsService.is('pagination');
42033 this.calculatePages();
42034 var paginationChangedEvent = {
42035 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PAGINATION_CHANGED,
42036 animate: false,
42037 newData: false,
42038 newPage: false,
42039 // important to keep rendered rows, otherwise every time grid is resized,
42040 // we would destroy all the rows.
42041 keepRenderedRows: true
42042 };
42043 this.eventService.dispatchEvent(paginationChangedEvent);
42044 };
42045 PaginationProxy.prototype.goToPage = function (page) {
42046 if (!this.active || this.currentPage === page || typeof this.currentPage !== 'number') {
42047 return;
42048 }
42049 this.currentPage = page;
42050 var event = {
42051 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_MODEL_UPDATED,
42052 animate: false,
42053 keepRenderedRows: false,
42054 newData: false,
42055 newPage: true
42056 };
42057 this.onModelUpdated(event);
42058 };
42059 PaginationProxy.prototype.getPixelOffset = function () {
42060 return this.pixelOffset;
42061 };
42062 PaginationProxy.prototype.getRow = function (index) {
42063 return this.rowModel.getRow(index);
42064 };
42065 PaginationProxy.prototype.getRowNode = function (id) {
42066 return this.rowModel.getRowNode(id);
42067 };
42068 PaginationProxy.prototype.getRowIndexAtPixel = function (pixel) {
42069 return this.rowModel.getRowIndexAtPixel(pixel);
42070 };
42071 PaginationProxy.prototype.getCurrentPageHeight = function () {
42072 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(this.topRowBounds) || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["missing"])(this.bottomRowBounds)) {
42073 return 0;
42074 }
42075 return Math.max(this.bottomRowBounds.rowTop + this.bottomRowBounds.rowHeight - this.topRowBounds.rowTop, 0);
42076 };
42077 PaginationProxy.prototype.getCurrentPagePixelRange = function () {
42078 var pageFirstPixel = this.topRowBounds ? this.topRowBounds.rowTop : 0;
42079 var pageLastPixel = this.bottomRowBounds ? this.bottomRowBounds.rowTop + this.bottomRowBounds.rowHeight : 0;
42080 return { pageFirstPixel: pageFirstPixel, pageLastPixel: pageLastPixel };
42081 };
42082 PaginationProxy.prototype.isRowPresent = function (rowNode) {
42083 if (!this.rowModel.isRowPresent(rowNode)) {
42084 return false;
42085 }
42086 var nodeIsInPage = rowNode.rowIndex >= this.topDisplayedRowIndex && rowNode.rowIndex <= this.bottomDisplayedRowIndex;
42087 return nodeIsInPage;
42088 };
42089 PaginationProxy.prototype.isEmpty = function () {
42090 return this.rowModel.isEmpty();
42091 };
42092 PaginationProxy.prototype.isRowsToRender = function () {
42093 return this.rowModel.isRowsToRender();
42094 };
42095 PaginationProxy.prototype.forEachNode = function (callback) {
42096 return this.rowModel.forEachNode(callback);
42097 };
42098 PaginationProxy.prototype.forEachNodeOnPage = function (callback) {
42099 var firstRow = this.getPageFirstRow();
42100 var lastRow = this.getPageLastRow();
42101 for (var i = firstRow; i <= lastRow; i++) {
42102 var node = this.getRow(i);
42103 if (node) {
42104 callback(node);
42105 }
42106 }
42107 };
42108 PaginationProxy.prototype.getType = function () {
42109 return this.rowModel.getType();
42110 };
42111 PaginationProxy.prototype.getRowBounds = function (index) {
42112 var res = this.rowModel.getRowBounds(index);
42113 res.rowIndex = index;
42114 return res;
42115 };
42116 PaginationProxy.prototype.getPageFirstRow = function () {
42117 return this.topRowBounds ? this.topRowBounds.rowIndex : -1;
42118 };
42119 PaginationProxy.prototype.getPageLastRow = function () {
42120 return this.bottomRowBounds ? this.bottomRowBounds.rowIndex : -1;
42121 };
42122 PaginationProxy.prototype.getRowCount = function () {
42123 return this.rowModel.getRowCount();
42124 };
42125 PaginationProxy.prototype.getPageForIndex = function (index) {
42126 return Math.floor(index / this.pageSize);
42127 };
42128 PaginationProxy.prototype.goToPageWithIndex = function (index) {
42129 if (!this.active) {
42130 return;
42131 }
42132 var pageNumber = this.getPageForIndex(index);
42133 this.goToPage(pageNumber);
42134 };
42135 PaginationProxy.prototype.isRowInPage = function (row) {
42136 if (!this.active) {
42137 return true;
42138 }
42139 var rowPage = this.getPageForIndex(row.rowIndex);
42140 return rowPage === this.currentPage;
42141 };
42142 PaginationProxy.prototype.isLastPageFound = function () {
42143 return this.rowModel.isLastRowIndexKnown();
42144 };
42145 PaginationProxy.prototype.getCurrentPage = function () {
42146 return this.currentPage;
42147 };
42148 PaginationProxy.prototype.goToNextPage = function () {
42149 this.goToPage(this.currentPage + 1);
42150 };
42151 PaginationProxy.prototype.goToPreviousPage = function () {
42152 this.goToPage(this.currentPage - 1);
42153 };
42154 PaginationProxy.prototype.goToFirstPage = function () {
42155 this.goToPage(0);
42156 };
42157 PaginationProxy.prototype.goToLastPage = function () {
42158 var rowCount = this.rowModel.getRowCount();
42159 var lastPage = Math.floor(rowCount / this.pageSize);
42160 this.goToPage(lastPage);
42161 };
42162 PaginationProxy.prototype.getPageSize = function () {
42163 return this.pageSize;
42164 };
42165 PaginationProxy.prototype.getTotalPages = function () {
42166 return this.totalPages;
42167 };
42168 PaginationProxy.prototype.setPageSize = function () {
42169 // show put this into super class
42170 this.pageSize = this.gridOptionsService.getNum('paginationPageSize');
42171 if (this.pageSize == null || this.pageSize < 1) {
42172 this.pageSize = 100;
42173 }
42174 };
42175 PaginationProxy.prototype.calculatePages = function () {
42176 if (this.active) {
42177 this.setPageSize();
42178 if (this.paginateChildRows) {
42179 this.calculatePagesAllRows();
42180 }
42181 else {
42182 this.calculatePagesMasterRowsOnly();
42183 }
42184 }
42185 else {
42186 this.calculatedPagesNotActive();
42187 }
42188 this.topRowBounds = this.rowModel.getRowBounds(this.topDisplayedRowIndex);
42189 if (this.topRowBounds) {
42190 this.topRowBounds.rowIndex = this.topDisplayedRowIndex;
42191 }
42192 this.bottomRowBounds = this.rowModel.getRowBounds(this.bottomDisplayedRowIndex);
42193 if (this.bottomRowBounds) {
42194 this.bottomRowBounds.rowIndex = this.bottomDisplayedRowIndex;
42195 }
42196 this.setPixelOffset(Object(_utils_generic__WEBPACK_IMPORTED_MODULE_3__["exists"])(this.topRowBounds) ? this.topRowBounds.rowTop : 0);
42197 };
42198 PaginationProxy.prototype.setPixelOffset = function (value) {
42199 if (this.pixelOffset === value) {
42200 return;
42201 }
42202 this.pixelOffset = value;
42203 this.eventService.dispatchEvent({ type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PAGINATION_PIXEL_OFFSET_CHANGED });
42204 };
42205 PaginationProxy.prototype.setZeroRows = function () {
42206 this.masterRowCount = 0;
42207 this.topDisplayedRowIndex = 0;
42208 this.bottomDisplayedRowIndex = -1;
42209 this.currentPage = 0;
42210 this.totalPages = 0;
42211 };
42212 PaginationProxy.prototype.adjustCurrentPageIfInvalid = function () {
42213 if (this.currentPage >= this.totalPages) {
42214 this.currentPage = this.totalPages - 1;
42215 }
42216 if (!isFinite(this.currentPage) || isNaN(this.currentPage) || this.currentPage < 0) {
42217 this.currentPage = 0;
42218 }
42219 };
42220 PaginationProxy.prototype.calculatePagesMasterRowsOnly = function () {
42221 // const csrm = <ClientSideRowModel> this.rowModel;
42222 // const rootNode = csrm.getRootNode();
42223 // const masterRows = rootNode.childrenAfterSort;
42224 this.masterRowCount = this.rowModel.getTopLevelRowCount();
42225 // we say <=0 (rather than =0) as viewport returns -1 when no rows
42226 if (this.masterRowCount <= 0) {
42227 this.setZeroRows();
42228 return;
42229 }
42230 var masterLastRowIndex = this.masterRowCount - 1;
42231 this.totalPages = Math.floor((masterLastRowIndex) / this.pageSize) + 1;
42232 this.adjustCurrentPageIfInvalid();
42233 var masterPageStartIndex = this.pageSize * this.currentPage;
42234 var masterPageEndIndex = (this.pageSize * (this.currentPage + 1)) - 1;
42235 if (masterPageEndIndex > masterLastRowIndex) {
42236 masterPageEndIndex = masterLastRowIndex;
42237 }
42238 this.topDisplayedRowIndex = this.rowModel.getTopLevelRowDisplayedIndex(masterPageStartIndex);
42239 // masterRows[masterPageStartIndex].rowIndex;
42240 if (masterPageEndIndex === masterLastRowIndex) {
42241 // if showing the last master row, then we want to show the very last row of the model
42242 this.bottomDisplayedRowIndex = this.rowModel.getRowCount() - 1;
42243 }
42244 else {
42245 var firstIndexNotToShow = this.rowModel.getTopLevelRowDisplayedIndex(masterPageEndIndex + 1);
42246 //masterRows[masterPageEndIndex + 1].rowIndex;
42247 // this gets the index of the last child - eg current row is open, we want to display all children,
42248 // the index of the last child is one less than the index of the next parent row.
42249 this.bottomDisplayedRowIndex = firstIndexNotToShow - 1;
42250 }
42251 };
42252 PaginationProxy.prototype.getMasterRowCount = function () {
42253 return this.masterRowCount;
42254 };
42255 PaginationProxy.prototype.calculatePagesAllRows = function () {
42256 this.masterRowCount = this.rowModel.getRowCount();
42257 if (this.masterRowCount === 0) {
42258 this.setZeroRows();
42259 return;
42260 }
42261 var maxRowIndex = this.masterRowCount - 1;
42262 this.totalPages = Math.floor((maxRowIndex) / this.pageSize) + 1;
42263 this.adjustCurrentPageIfInvalid();
42264 this.topDisplayedRowIndex = this.pageSize * this.currentPage;
42265 this.bottomDisplayedRowIndex = (this.pageSize * (this.currentPage + 1)) - 1;
42266 if (this.bottomDisplayedRowIndex > maxRowIndex) {
42267 this.bottomDisplayedRowIndex = maxRowIndex;
42268 }
42269 };
42270 PaginationProxy.prototype.calculatedPagesNotActive = function () {
42271 this.pageSize = this.rowModel.getRowCount();
42272 this.totalPages = 1;
42273 this.currentPage = 0;
42274 this.topDisplayedRowIndex = 0;
42275 this.bottomDisplayedRowIndex = this.rowModel.getRowCount() - 1;
42276 };
42277 __decorate([
42278 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('rowModel')
42279 ], PaginationProxy.prototype, "rowModel", void 0);
42280 __decorate([
42281 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
42282 ], PaginationProxy.prototype, "postConstruct", null);
42283 PaginationProxy = __decorate([
42284 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('paginationProxy')
42285 ], PaginationProxy);
42286 return PaginationProxy;
42287}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
42288
42289
42290
42291/***/ }),
42292/* 187 */
42293/***/ (function(module, __webpack_exports__, __webpack_require__) {
42294
42295"use strict";
42296__webpack_require__.r(__webpack_exports__);
42297/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StylingService", function() { return StylingService; });
42298/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
42299/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
42300/**
42301 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42302 * @version v29.2.0
42303 * @link https://www.ag-grid.com/
42304 * @license MIT
42305 */
42306var __extends = (undefined && undefined.__extends) || (function () {
42307 var extendStatics = function (d, b) {
42308 extendStatics = Object.setPrototypeOf ||
42309 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42310 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
42311 return extendStatics(d, b);
42312 };
42313 return function (d, b) {
42314 extendStatics(d, b);
42315 function __() { this.constructor = d; }
42316 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42317 };
42318})();
42319var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
42320 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
42321 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
42322 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;
42323 return c > 3 && r && Object.defineProperty(target, key, r), r;
42324};
42325
42326
42327var StylingService = /** @class */ (function (_super) {
42328 __extends(StylingService, _super);
42329 function StylingService() {
42330 return _super !== null && _super.apply(this, arguments) || this;
42331 }
42332 StylingService.prototype.processAllCellClasses = function (colDef, params, onApplicableClass, onNotApplicableClass) {
42333 this.processClassRules(colDef.cellClassRules, params, onApplicableClass, onNotApplicableClass);
42334 this.processStaticCellClasses(colDef, params, onApplicableClass);
42335 };
42336 StylingService.prototype.processClassRules = function (classRules, params, onApplicableClass, onNotApplicableClass) {
42337 if (classRules == null) {
42338 return;
42339 }
42340 var classNames = Object.keys(classRules);
42341 var classesToApply = {};
42342 var classesToRemove = {};
42343 var _loop_1 = function (i) {
42344 var className = classNames[i];
42345 var rule = classRules[className];
42346 var resultOfRule;
42347 if (typeof rule === 'string') {
42348 resultOfRule = this_1.expressionService.evaluate(rule, params);
42349 }
42350 else if (typeof rule === 'function') {
42351 resultOfRule = rule(params);
42352 }
42353 // in case className = 'my-class1 my-class2', we need to split into individual class names
42354 className.split(' ').forEach(function (singleClass) {
42355 if (singleClass == null || singleClass.trim() == '') {
42356 return;
42357 }
42358 resultOfRule ? classesToApply[singleClass] = true : classesToRemove[singleClass] = true;
42359 });
42360 };
42361 var this_1 = this;
42362 for (var i = 0; i < classNames.length; i++) {
42363 _loop_1(i);
42364 }
42365 // we remove all classes first, then add all classes second,
42366 // in case a class appears in more than one rule, this means it will be added
42367 // if appears in at least one truthy rule
42368 if (onNotApplicableClass) {
42369 Object.keys(classesToRemove).forEach(onNotApplicableClass);
42370 }
42371 Object.keys(classesToApply).forEach(onApplicableClass);
42372 };
42373 StylingService.prototype.getStaticCellClasses = function (colDef, params) {
42374 var cellClass = colDef.cellClass;
42375 if (!cellClass) {
42376 return [];
42377 }
42378 var classOrClasses;
42379 if (typeof cellClass === 'function') {
42380 var cellClassFunc = cellClass;
42381 classOrClasses = cellClassFunc(params);
42382 }
42383 else {
42384 classOrClasses = cellClass;
42385 }
42386 if (typeof classOrClasses === 'string') {
42387 classOrClasses = [classOrClasses];
42388 }
42389 return classOrClasses || [];
42390 };
42391 StylingService.prototype.processStaticCellClasses = function (colDef, params, onApplicableClass) {
42392 var classOrClasses = this.getStaticCellClasses(colDef, params);
42393 classOrClasses.forEach(function (cssClassItem) {
42394 onApplicableClass(cssClassItem);
42395 });
42396 };
42397 __decorate([
42398 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('expressionService')
42399 ], StylingService.prototype, "expressionService", void 0);
42400 StylingService = __decorate([
42401 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('stylingService')
42402 ], StylingService);
42403 return StylingService;
42404}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
42405
42406
42407
42408/***/ }),
42409/* 188 */
42410/***/ (function(module, __webpack_exports__, __webpack_require__) {
42411
42412"use strict";
42413__webpack_require__.r(__webpack_exports__);
42414/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgToggleButton", function() { return AgToggleButton; });
42415/* harmony import */ var _agCheckbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72);
42416/**
42417 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42418 * @version v29.2.0
42419 * @link https://www.ag-grid.com/
42420 * @license MIT
42421 */
42422var __extends = (undefined && undefined.__extends) || (function () {
42423 var extendStatics = function (d, b) {
42424 extendStatics = Object.setPrototypeOf ||
42425 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42426 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
42427 return extendStatics(d, b);
42428 };
42429 return function (d, b) {
42430 extendStatics(d, b);
42431 function __() { this.constructor = d; }
42432 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42433 };
42434})();
42435
42436var AgToggleButton = /** @class */ (function (_super) {
42437 __extends(AgToggleButton, _super);
42438 function AgToggleButton(config) {
42439 return _super.call(this, config, 'ag-toggle-button') || this;
42440 }
42441 AgToggleButton.prototype.setValue = function (value, silent) {
42442 _super.prototype.setValue.call(this, value, silent);
42443 this.addOrRemoveCssClass('ag-selected', this.getValue());
42444 return this;
42445 };
42446 return AgToggleButton;
42447}(_agCheckbox__WEBPACK_IMPORTED_MODULE_0__["AgCheckbox"]));
42448
42449
42450
42451/***/ }),
42452/* 189 */
42453/***/ (function(module, __webpack_exports__, __webpack_require__) {
42454
42455"use strict";
42456__webpack_require__.r(__webpack_exports__);
42457/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgInputTextArea", function() { return AgInputTextArea; });
42458/* harmony import */ var _agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73);
42459/**
42460 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42461 * @version v29.2.0
42462 * @link https://www.ag-grid.com/
42463 * @license MIT
42464 */
42465var __extends = (undefined && undefined.__extends) || (function () {
42466 var extendStatics = function (d, b) {
42467 extendStatics = Object.setPrototypeOf ||
42468 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42469 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
42470 return extendStatics(d, b);
42471 };
42472 return function (d, b) {
42473 extendStatics(d, b);
42474 function __() { this.constructor = d; }
42475 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42476 };
42477})();
42478
42479var AgInputTextArea = /** @class */ (function (_super) {
42480 __extends(AgInputTextArea, _super);
42481 function AgInputTextArea(config) {
42482 return _super.call(this, config, 'ag-text-area', null, 'textarea') || this;
42483 }
42484 AgInputTextArea.prototype.setValue = function (value, silent) {
42485 var ret = _super.prototype.setValue.call(this, value, silent);
42486 this.eInput.value = value;
42487 return ret;
42488 };
42489 AgInputTextArea.prototype.setCols = function (cols) {
42490 this.eInput.cols = cols;
42491 return this;
42492 };
42493 AgInputTextArea.prototype.setRows = function (rows) {
42494 this.eInput.rows = rows;
42495 return this;
42496 };
42497 return AgInputTextArea;
42498}(_agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractInputField"]));
42499
42500
42501
42502/***/ }),
42503/* 190 */
42504/***/ (function(module, __webpack_exports__, __webpack_require__) {
42505
42506"use strict";
42507__webpack_require__.r(__webpack_exports__);
42508/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgInputRange", function() { return AgInputRange; });
42509/* harmony import */ var _agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73);
42510/**
42511 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42512 * @version v29.2.0
42513 * @link https://www.ag-grid.com/
42514 * @license MIT
42515 */
42516var __extends = (undefined && undefined.__extends) || (function () {
42517 var extendStatics = function (d, b) {
42518 extendStatics = Object.setPrototypeOf ||
42519 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42520 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
42521 return extendStatics(d, b);
42522 };
42523 return function (d, b) {
42524 extendStatics(d, b);
42525 function __() { this.constructor = d; }
42526 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42527 };
42528})();
42529
42530var AgInputRange = /** @class */ (function (_super) {
42531 __extends(AgInputRange, _super);
42532 function AgInputRange(config) {
42533 return _super.call(this, config, 'ag-range-field', 'range') || this;
42534 }
42535 AgInputRange.prototype.postConstruct = function () {
42536 _super.prototype.postConstruct.call(this);
42537 var _a = this.config, min = _a.min, max = _a.max, step = _a.step;
42538 if (min != null) {
42539 this.setMinValue(min);
42540 }
42541 if (max != null) {
42542 this.setMaxValue(max);
42543 }
42544 this.setStep(step || 1);
42545 };
42546 AgInputRange.prototype.addInputListeners = function () {
42547 var _this = this;
42548 this.addManagedListener(this.eInput, 'input', function (e) {
42549 var value = e.target.value;
42550 _this.setValue(value);
42551 });
42552 };
42553 AgInputRange.prototype.setMinValue = function (value) {
42554 this.min = value;
42555 this.eInput.setAttribute('min', value.toString());
42556 return this;
42557 };
42558 AgInputRange.prototype.setMaxValue = function (value) {
42559 this.max = value;
42560 this.eInput.setAttribute('max', value.toString());
42561 return this;
42562 };
42563 AgInputRange.prototype.setStep = function (value) {
42564 this.eInput.setAttribute('step', value.toString());
42565 return this;
42566 };
42567 AgInputRange.prototype.setValue = function (value, silent) {
42568 if (this.min != null) {
42569 value = Math.max(parseFloat(value), this.min).toString();
42570 }
42571 if (this.max != null) {
42572 value = Math.min(parseFloat(value), this.max).toString();
42573 }
42574 var ret = _super.prototype.setValue.call(this, value, silent);
42575 this.eInput.value = value;
42576 return ret;
42577 };
42578 return AgInputRange;
42579}(_agAbstractInputField__WEBPACK_IMPORTED_MODULE_0__["AgAbstractInputField"]));
42580
42581
42582
42583/***/ }),
42584/* 191 */
42585/***/ (function(module, __webpack_exports__, __webpack_require__) {
42586
42587"use strict";
42588__webpack_require__.r(__webpack_exports__);
42589/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgSlider", function() { return AgSlider; });
42590/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
42591/* harmony import */ var _agAbstractLabel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68);
42592/* harmony import */ var _agAbstractField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67);
42593/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11);
42594/**
42595 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42596 * @version v29.2.0
42597 * @link https://www.ag-grid.com/
42598 * @license MIT
42599 */
42600var __extends = (undefined && undefined.__extends) || (function () {
42601 var extendStatics = function (d, b) {
42602 extendStatics = Object.setPrototypeOf ||
42603 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42604 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
42605 return extendStatics(d, b);
42606 };
42607 return function (d, b) {
42608 extendStatics(d, b);
42609 function __() { this.constructor = d; }
42610 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42611 };
42612})();
42613var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
42614 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
42615 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
42616 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;
42617 return c > 3 && r && Object.defineProperty(target, key, r), r;
42618};
42619
42620
42621
42622
42623var AgSlider = /** @class */ (function (_super) {
42624 __extends(AgSlider, _super);
42625 function AgSlider(config) {
42626 var _this = _super.call(this, config, AgSlider.TEMPLATE) || this;
42627 _this.labelAlignment = 'top';
42628 return _this;
42629 }
42630 AgSlider.prototype.init = function () {
42631 this.eSlider.addCssClass('ag-slider-field');
42632 };
42633 AgSlider.prototype.onValueChange = function (callbackFn) {
42634 var _this = this;
42635 var eventChanged = _agAbstractField__WEBPACK_IMPORTED_MODULE_2__["AgAbstractField"].EVENT_CHANGED;
42636 this.addManagedListener(this.eText, eventChanged, function () {
42637 var textValue = parseFloat(_this.eText.getValue());
42638 _this.eSlider.setValue(textValue.toString(), true);
42639 callbackFn(textValue || 0);
42640 });
42641 this.addManagedListener(this.eSlider, eventChanged, function () {
42642 var sliderValue = _this.eSlider.getValue();
42643 _this.eText.setValue(sliderValue, true);
42644 callbackFn(parseFloat(sliderValue));
42645 });
42646 return this;
42647 };
42648 AgSlider.prototype.setSliderWidth = function (width) {
42649 this.eSlider.setWidth(width);
42650 return this;
42651 };
42652 AgSlider.prototype.setTextFieldWidth = function (width) {
42653 this.eText.setWidth(width);
42654 return this;
42655 };
42656 AgSlider.prototype.setMinValue = function (minValue) {
42657 this.eSlider.setMinValue(minValue);
42658 this.eText.setMin(minValue);
42659 return this;
42660 };
42661 AgSlider.prototype.setMaxValue = function (maxValue) {
42662 this.eSlider.setMaxValue(maxValue);
42663 this.eText.setMax(maxValue);
42664 return this;
42665 };
42666 AgSlider.prototype.getValue = function () {
42667 return this.eText.getValue();
42668 };
42669 AgSlider.prototype.setValue = function (value) {
42670 if (this.getValue() === value) {
42671 return this;
42672 }
42673 this.eText.setValue(value, true);
42674 this.eSlider.setValue(value, true);
42675 this.dispatchEvent({ type: _agAbstractField__WEBPACK_IMPORTED_MODULE_2__["AgAbstractField"].EVENT_CHANGED });
42676 return this;
42677 };
42678 AgSlider.prototype.setStep = function (step) {
42679 this.eSlider.setStep(step);
42680 this.eText.setStep(step);
42681 return this;
42682 };
42683 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>";
42684 __decorate([
42685 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eLabel')
42686 ], AgSlider.prototype, "eLabel", void 0);
42687 __decorate([
42688 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eSlider')
42689 ], AgSlider.prototype, "eSlider", void 0);
42690 __decorate([
42691 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eText')
42692 ], AgSlider.prototype, "eText", void 0);
42693 __decorate([
42694 _context_context__WEBPACK_IMPORTED_MODULE_3__["PostConstruct"]
42695 ], AgSlider.prototype, "init", null);
42696 return AgSlider;
42697}(_agAbstractLabel__WEBPACK_IMPORTED_MODULE_1__["AgAbstractLabel"]));
42698
42699
42700
42701/***/ }),
42702/* 192 */
42703/***/ (function(module, __webpack_exports__, __webpack_require__) {
42704
42705"use strict";
42706__webpack_require__.r(__webpack_exports__);
42707/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgGroupComponent", function() { return AgGroupComponent; });
42708/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
42709/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
42710/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
42711/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46);
42712/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45);
42713/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(48);
42714/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41);
42715/**
42716 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42717 * @version v29.2.0
42718 * @link https://www.ag-grid.com/
42719 * @license MIT
42720 */
42721var __extends = (undefined && undefined.__extends) || (function () {
42722 var extendStatics = function (d, b) {
42723 extendStatics = Object.setPrototypeOf ||
42724 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42725 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
42726 return extendStatics(d, b);
42727 };
42728 return function (d, b) {
42729 extendStatics(d, b);
42730 function __() { this.constructor = d; }
42731 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42732 };
42733})();
42734var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
42735 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
42736 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
42737 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;
42738 return c > 3 && r && Object.defineProperty(target, key, r), r;
42739};
42740
42741
42742
42743
42744
42745
42746
42747var AgGroupComponent = /** @class */ (function (_super) {
42748 __extends(AgGroupComponent, _super);
42749 function AgGroupComponent(params) {
42750 if (params === void 0) { params = {}; }
42751 var _this = _super.call(this, AgGroupComponent.getTemplate(params)) || this;
42752 _this.suppressEnabledCheckbox = true;
42753 _this.suppressOpenCloseIcons = false;
42754 var title = params.title, enabled = params.enabled, items = params.items, suppressEnabledCheckbox = params.suppressEnabledCheckbox, suppressOpenCloseIcons = params.suppressOpenCloseIcons;
42755 _this.title = title;
42756 _this.cssIdentifier = params.cssIdentifier || 'default';
42757 _this.enabled = enabled != null ? enabled : true;
42758 _this.items = items || [];
42759 _this.alignItems = params.alignItems || 'center';
42760 if (suppressEnabledCheckbox != null) {
42761 _this.suppressEnabledCheckbox = suppressEnabledCheckbox;
42762 }
42763 if (suppressOpenCloseIcons != null) {
42764 _this.suppressOpenCloseIcons = suppressOpenCloseIcons;
42765 }
42766 return _this;
42767 }
42768 AgGroupComponent.getTemplate = function (params) {
42769 var cssIdentifier = params.cssIdentifier || 'default';
42770 var direction = params.direction || 'vertical';
42771 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>";
42772 };
42773 AgGroupComponent.prototype.postConstruct = function () {
42774 if (this.items.length) {
42775 var initialItems = this.items;
42776 this.items = [];
42777 this.addItems(initialItems);
42778 }
42779 var localeTextFunc = this.localeService.getLocaleTextFunc();
42780 this.cbGroupEnabled.setLabel(localeTextFunc('enabled', 'Enabled'));
42781 if (this.title) {
42782 this.setTitle(this.title);
42783 }
42784 if (this.enabled) {
42785 this.setEnabled(this.enabled);
42786 }
42787 this.setAlignItems(this.alignItems);
42788 this.hideEnabledCheckbox(this.suppressEnabledCheckbox);
42789 this.hideOpenCloseIcons(this.suppressOpenCloseIcons);
42790 this.setupExpandContract();
42791 this.refreshAriaStatus();
42792 this.refreshChildDisplay();
42793 };
42794 AgGroupComponent.prototype.setupExpandContract = function () {
42795 var _this = this;
42796 this.eGroupClosedIcon.appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnSelectClosed', this.gridOptionsService, null));
42797 this.eGroupOpenedIcon.appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_3__["createIcon"])('columnSelectOpen', this.gridOptionsService, null));
42798 this.addManagedListener(this.eTitleBar, 'click', function () { return _this.toggleGroupExpand(); });
42799 this.addManagedListener(this.eTitleBar, 'keydown', function (e) {
42800 switch (e.key) {
42801 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].ENTER:
42802 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].SPACE:
42803 e.preventDefault();
42804 _this.toggleGroupExpand();
42805 break;
42806 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].RIGHT:
42807 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].LEFT:
42808 e.preventDefault();
42809 _this.toggleGroupExpand(e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_5__["KeyCode"].RIGHT);
42810 break;
42811 }
42812 });
42813 };
42814 AgGroupComponent.prototype.refreshAriaStatus = function () {
42815 if (!this.suppressOpenCloseIcons) {
42816 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_6__["setAriaExpanded"])(this.eTitleBar, this.expanded);
42817 }
42818 };
42819 AgGroupComponent.prototype.refreshChildDisplay = function () {
42820 var showIcon = !this.suppressOpenCloseIcons;
42821 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(this.eToolbar, this.expanded && !this.suppressEnabledCheckbox);
42822 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(this.eGroupOpenedIcon, showIcon && this.expanded);
42823 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(this.eGroupClosedIcon, showIcon && !this.expanded);
42824 };
42825 AgGroupComponent.prototype.isExpanded = function () {
42826 return this.expanded;
42827 };
42828 AgGroupComponent.prototype.setAlignItems = function (alignment) {
42829 if (this.alignItems !== alignment) {
42830 this.removeCssClass("ag-group-item-alignment-" + this.alignItems);
42831 }
42832 this.alignItems = alignment;
42833 var newCls = "ag-group-item-alignment-" + this.alignItems;
42834 this.addCssClass(newCls);
42835 return this;
42836 };
42837 AgGroupComponent.prototype.toggleGroupExpand = function (expanded) {
42838 if (this.suppressOpenCloseIcons) {
42839 this.expanded = true;
42840 this.refreshChildDisplay();
42841 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(this.eContainer, true);
42842 return this;
42843 }
42844 expanded = expanded != null ? expanded : !this.expanded;
42845 if (this.expanded === expanded) {
42846 return this;
42847 }
42848 this.expanded = expanded;
42849 this.refreshAriaStatus();
42850 this.refreshChildDisplay();
42851 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(this.eContainer, expanded);
42852 this.dispatchEvent({ type: this.expanded ? AgGroupComponent.EVENT_EXPANDED : AgGroupComponent.EVENT_COLLAPSED });
42853 return this;
42854 };
42855 AgGroupComponent.prototype.addItems = function (items) {
42856 var _this = this;
42857 items.forEach(function (item) { return _this.addItem(item); });
42858 };
42859 AgGroupComponent.prototype.addItem = function (item) {
42860 var container = this.eContainer;
42861 var el = item instanceof _component__WEBPACK_IMPORTED_MODULE_0__["Component"] ? item.getGui() : item;
42862 el.classList.add('ag-group-item', "ag-" + this.cssIdentifier + "-group-item");
42863 container.appendChild(el);
42864 this.items.push(el);
42865 };
42866 AgGroupComponent.prototype.hideItem = function (hide, index) {
42867 var itemToHide = this.items[index];
42868 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["setDisplayed"])(itemToHide, !hide);
42869 };
42870 AgGroupComponent.prototype.setTitle = function (title) {
42871 this.eTitle.innerText = title;
42872 return this;
42873 };
42874 AgGroupComponent.prototype.addCssClassToTitleBar = function (cssClass) {
42875 this.eTitleBar.classList.add(cssClass);
42876 };
42877 AgGroupComponent.prototype.setEnabled = function (enabled, skipToggle) {
42878 this.enabled = enabled;
42879 this.refreshDisabledStyles();
42880 this.toggleGroupExpand(enabled);
42881 if (!skipToggle) {
42882 this.cbGroupEnabled.setValue(enabled);
42883 }
42884 return this;
42885 };
42886 AgGroupComponent.prototype.isEnabled = function () {
42887 return this.enabled;
42888 };
42889 AgGroupComponent.prototype.onEnableChange = function (callbackFn) {
42890 var _this = this;
42891 this.cbGroupEnabled.onValueChange(function (newSelection) {
42892 _this.setEnabled(newSelection, true);
42893 callbackFn(newSelection);
42894 });
42895 return this;
42896 };
42897 AgGroupComponent.prototype.hideEnabledCheckbox = function (hide) {
42898 this.suppressEnabledCheckbox = hide;
42899 this.refreshChildDisplay();
42900 this.refreshDisabledStyles();
42901 return this;
42902 };
42903 AgGroupComponent.prototype.hideOpenCloseIcons = function (hide) {
42904 this.suppressOpenCloseIcons = hide;
42905 if (hide) {
42906 this.toggleGroupExpand(true);
42907 }
42908 return this;
42909 };
42910 AgGroupComponent.prototype.refreshDisabledStyles = function () {
42911 this.addOrRemoveCssClass('ag-disabled', !this.enabled);
42912 if (this.suppressEnabledCheckbox && !this.enabled) {
42913 this.eTitleBar.classList.add('ag-disabled-group-title-bar');
42914 this.eTitleBar.removeAttribute('tabindex');
42915 }
42916 else {
42917 this.eTitleBar.classList.remove('ag-disabled-group-title-bar');
42918 this.eTitleBar.setAttribute('tabindex', '0');
42919 }
42920 this.eContainer.classList.toggle('ag-disabled-group-container', !this.enabled);
42921 };
42922 AgGroupComponent.EVENT_EXPANDED = 'expanded';
42923 AgGroupComponent.EVENT_COLLAPSED = 'collapsed';
42924 __decorate([
42925 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eTitleBar')
42926 ], AgGroupComponent.prototype, "eTitleBar", void 0);
42927 __decorate([
42928 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eGroupOpenedIcon')
42929 ], AgGroupComponent.prototype, "eGroupOpenedIcon", void 0);
42930 __decorate([
42931 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eGroupClosedIcon')
42932 ], AgGroupComponent.prototype, "eGroupClosedIcon", void 0);
42933 __decorate([
42934 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eToolbar')
42935 ], AgGroupComponent.prototype, "eToolbar", void 0);
42936 __decorate([
42937 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('cbGroupEnabled')
42938 ], AgGroupComponent.prototype, "cbGroupEnabled", void 0);
42939 __decorate([
42940 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eTitle')
42941 ], AgGroupComponent.prototype, "eTitle", void 0);
42942 __decorate([
42943 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eContainer')
42944 ], AgGroupComponent.prototype, "eContainer", void 0);
42945 __decorate([
42946 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
42947 ], AgGroupComponent.prototype, "postConstruct", null);
42948 return AgGroupComponent;
42949}(_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
42950
42951
42952
42953/***/ }),
42954/* 193 */
42955/***/ (function(module, __webpack_exports__, __webpack_require__) {
42956
42957"use strict";
42958__webpack_require__.r(__webpack_exports__);
42959/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgMenuItemComponent", function() { return AgMenuItemComponent; });
42960/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
42961/* harmony import */ var _agMenuList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
42962/* harmony import */ var _agMenuPanel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(197);
42963/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38);
42964/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48);
42965/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(46);
42966/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45);
42967/* harmony import */ var _customTooltipFeature__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(55);
42968/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(41);
42969/**
42970 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
42971 * @version v29.2.0
42972 * @link https://www.ag-grid.com/
42973 * @license MIT
42974 */
42975var __extends = (undefined && undefined.__extends) || (function () {
42976 var extendStatics = function (d, b) {
42977 extendStatics = Object.setPrototypeOf ||
42978 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42979 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
42980 return extendStatics(d, b);
42981 };
42982 return function (d, b) {
42983 extendStatics(d, b);
42984 function __() { this.constructor = d; }
42985 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42986 };
42987})();
42988var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
42989 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
42990 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
42991 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;
42992 return c > 3 && r && Object.defineProperty(target, key, r), r;
42993};
42994
42995
42996
42997
42998
42999
43000
43001
43002
43003
43004var AgMenuItemComponent = /** @class */ (function (_super) {
43005 __extends(AgMenuItemComponent, _super);
43006 function AgMenuItemComponent(params) {
43007 var _this = _super.call(this) || this;
43008 _this.params = params;
43009 _this.isActive = false;
43010 _this.subMenuIsOpen = false;
43011 _this.setTemplate(/* html */ "<div class=\"" + _this.getClassName() + "\" tabindex=\"-1\" role=\"treeitem\"></div>");
43012 return _this;
43013 }
43014 AgMenuItemComponent.prototype.init = function () {
43015 var _this = this;
43016 this.addIcon();
43017 this.addName();
43018 this.addShortcut();
43019 this.addSubMenu();
43020 this.addTooltip();
43021 var eGui = this.getGui();
43022 if (this.params.disabled) {
43023 this.addCssClass(this.getClassName('disabled'));
43024 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["setAriaDisabled"])(eGui, true);
43025 }
43026 else {
43027 this.addGuiEventListener('click', function (e) { return _this.onItemSelected(e); });
43028 this.addGuiEventListener('keydown', function (e) {
43029 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].ENTER || e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].SPACE) {
43030 e.preventDefault();
43031 _this.onItemSelected(e);
43032 }
43033 });
43034 this.addGuiEventListener('mousedown', function (e) {
43035 // Prevent event bubbling to other event handlers such as PopupService triggering
43036 // premature closing of any open sub-menu popup.
43037 e.stopPropagation();
43038 e.preventDefault();
43039 });
43040 this.addGuiEventListener('mouseenter', function () { return _this.onMouseEnter(); });
43041 this.addGuiEventListener('mouseleave', function () { return _this.onMouseLeave(); });
43042 }
43043 if (this.params.cssClasses) {
43044 this.params.cssClasses.forEach(function (it) { return _this.addCssClass(it); });
43045 }
43046 };
43047 AgMenuItemComponent.prototype.isDisabled = function () {
43048 return !!this.params.disabled;
43049 };
43050 AgMenuItemComponent.prototype.openSubMenu = function (activateFirstItem) {
43051 var _this = this;
43052 if (activateFirstItem === void 0) { activateFirstItem = false; }
43053 this.closeSubMenu();
43054 if (!this.params.subMenu) {
43055 return;
43056 }
43057 var ePopup = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["loadTemplate"])(/* html */ "<div class=\"ag-menu\" role=\"presentation\"></div>");
43058 var destroySubMenu;
43059 if (this.params.subMenu instanceof Array) {
43060 var currentLevel = Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["getAriaLevel"])(this.getGui());
43061 var nextLevel = isNaN(currentLevel) ? 1 : (currentLevel + 1);
43062 var childMenu_1 = this.createBean(new _agMenuList__WEBPACK_IMPORTED_MODULE_1__["AgMenuList"](nextLevel));
43063 childMenu_1.setParentComponent(this);
43064 childMenu_1.addMenuItems(this.params.subMenu);
43065 ePopup.appendChild(childMenu_1.getGui());
43066 // bubble menu item selected events
43067 this.addManagedListener(childMenu_1, AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED, function (e) { return _this.dispatchEvent(e); });
43068 childMenu_1.addGuiEventListener('mouseenter', function () { return _this.cancelDeactivate(); });
43069 destroySubMenu = function () { return _this.destroyBean(childMenu_1); };
43070 if (activateFirstItem) {
43071 setTimeout(function () { return childMenu_1.activateFirstItem(); }, 0);
43072 }
43073 }
43074 else {
43075 var subMenu_1 = this.params.subMenu;
43076 var menuPanel = this.createBean(new _agMenuPanel__WEBPACK_IMPORTED_MODULE_2__["AgMenuPanel"](subMenu_1));
43077 menuPanel.setParentComponent(this);
43078 var subMenuGui_1 = menuPanel.getGui();
43079 var mouseEvent_1 = 'mouseenter';
43080 var mouseEnterListener_1 = function () { return _this.cancelDeactivate(); };
43081 subMenuGui_1.addEventListener(mouseEvent_1, mouseEnterListener_1);
43082 destroySubMenu = function () { return subMenuGui_1.removeEventListener(mouseEvent_1, mouseEnterListener_1); };
43083 ePopup.appendChild(subMenuGui_1);
43084 if (subMenu_1.afterGuiAttached) {
43085 setTimeout(function () { return subMenu_1.afterGuiAttached(); }, 0);
43086 }
43087 }
43088 var eGui = this.getGui();
43089 var positionCallback = this.popupService.positionPopupForMenu.bind(this.popupService, { eventSource: eGui, ePopup: ePopup, shouldSetMaxHeight: this.params.shouldSetMaxHeight });
43090 var translate = this.localeService.getLocaleTextFunc();
43091 var addPopupRes = this.popupService.addPopup({
43092 modal: true,
43093 eChild: ePopup,
43094 positionCallback: positionCallback,
43095 anchorToElement: eGui,
43096 ariaLabel: translate('ariaLabelSubMenu', 'SubMenu')
43097 });
43098 this.subMenuIsOpen = true;
43099 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["setAriaExpanded"])(eGui, true);
43100 this.hideSubMenu = function () {
43101 if (addPopupRes) {
43102 addPopupRes.hideFunc();
43103 }
43104 _this.subMenuIsOpen = false;
43105 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["setAriaExpanded"])(eGui, false);
43106 destroySubMenu();
43107 };
43108 };
43109 AgMenuItemComponent.prototype.closeSubMenu = function () {
43110 if (!this.hideSubMenu) {
43111 return;
43112 }
43113 this.hideSubMenu();
43114 this.hideSubMenu = null;
43115 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["setAriaExpanded"])(this.getGui(), false);
43116 };
43117 AgMenuItemComponent.prototype.isSubMenuOpen = function () {
43118 return this.subMenuIsOpen;
43119 };
43120 AgMenuItemComponent.prototype.activate = function (openSubMenu) {
43121 var _this = this;
43122 this.cancelActivate();
43123 if (this.params.disabled) {
43124 return;
43125 }
43126 this.isActive = true;
43127 this.addCssClass(this.getClassName('active'));
43128 this.getGui().focus();
43129 if (openSubMenu && this.params.subMenu) {
43130 window.setTimeout(function () {
43131 if (_this.isAlive() && _this.isActive) {
43132 _this.openSubMenu();
43133 }
43134 }, 300);
43135 }
43136 this.onItemActivated();
43137 };
43138 AgMenuItemComponent.prototype.deactivate = function () {
43139 this.cancelDeactivate();
43140 this.removeCssClass(this.getClassName('active'));
43141 this.isActive = false;
43142 if (this.subMenuIsOpen) {
43143 this.hideSubMenu();
43144 }
43145 };
43146 AgMenuItemComponent.prototype.addIcon = function () {
43147 if (!this.params.checked && !this.params.icon && this.params.isCompact) {
43148 return;
43149 }
43150 var icon = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["loadTemplate"])(/* html */ "<span ref=\"eIcon\" class=\"" + this.getClassName('part') + " " + this.getClassName('icon') + "\" role=\"presentation\"></span>");
43151 if (this.params.checked) {
43152 icon.appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_5__["createIconNoSpan"])('check', this.gridOptionsService));
43153 }
43154 else if (this.params.icon) {
43155 if (Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["isNodeOrElement"])(this.params.icon)) {
43156 icon.appendChild(this.params.icon);
43157 }
43158 else if (typeof this.params.icon === 'string') {
43159 icon.innerHTML = this.params.icon;
43160 }
43161 else {
43162 console.warn('AG Grid: menu item icon must be DOM node or string');
43163 }
43164 }
43165 this.getGui().appendChild(icon);
43166 };
43167 AgMenuItemComponent.prototype.addName = function () {
43168 if (!this.params.name && this.params.isCompact) {
43169 return;
43170 }
43171 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>");
43172 this.getGui().appendChild(name);
43173 };
43174 AgMenuItemComponent.prototype.addTooltip = function () {
43175 if (!this.params.tooltip) {
43176 return;
43177 }
43178 this.tooltip = this.params.tooltip;
43179 if (this.gridOptionsService.is('enableBrowserTooltips')) {
43180 this.getGui().setAttribute('title', this.tooltip);
43181 }
43182 else {
43183 this.createManagedBean(new _customTooltipFeature__WEBPACK_IMPORTED_MODULE_7__["CustomTooltipFeature"](this));
43184 }
43185 };
43186 AgMenuItemComponent.prototype.getTooltipParams = function () {
43187 return {
43188 location: 'menu',
43189 value: this.tooltip
43190 };
43191 };
43192 AgMenuItemComponent.prototype.addShortcut = function () {
43193 if (!this.params.shortcut && this.params.isCompact) {
43194 return;
43195 }
43196 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>");
43197 this.getGui().appendChild(shortcut);
43198 };
43199 AgMenuItemComponent.prototype.addSubMenu = function () {
43200 if (!this.params.subMenu && this.params.isCompact) {
43201 return;
43202 }
43203 var pointer = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_6__["loadTemplate"])(/* html */ "<span ref=\"ePopupPointer\" class=\"" + this.getClassName('part') + " " + this.getClassName('popup-pointer') + "\"></span>");
43204 var eGui = this.getGui();
43205 if (this.params.subMenu) {
43206 var iconName = this.gridOptionsService.is('enableRtl') ? 'smallLeft' : 'smallRight';
43207 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_8__["setAriaExpanded"])(eGui, false);
43208 pointer.appendChild(Object(_utils_icon__WEBPACK_IMPORTED_MODULE_5__["createIconNoSpan"])(iconName, this.gridOptionsService));
43209 }
43210 eGui.appendChild(pointer);
43211 };
43212 AgMenuItemComponent.prototype.onItemSelected = function (event) {
43213 if (this.params.action) {
43214 this.params.action();
43215 }
43216 else {
43217 this.openSubMenu(event && event.type === 'keydown');
43218 }
43219 if (this.params.subMenu && !this.params.action) {
43220 return;
43221 }
43222 var e = {
43223 type: AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,
43224 action: this.params.action,
43225 checked: this.params.checked,
43226 cssClasses: this.params.cssClasses,
43227 disabled: this.params.disabled,
43228 icon: this.params.icon,
43229 name: this.params.name,
43230 shortcut: this.params.shortcut,
43231 subMenu: this.params.subMenu,
43232 tooltip: this.params.tooltip,
43233 event: event
43234 };
43235 this.dispatchEvent(e);
43236 };
43237 AgMenuItemComponent.prototype.onItemActivated = function () {
43238 var event = {
43239 type: AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED,
43240 menuItem: this,
43241 };
43242 this.dispatchEvent(event);
43243 };
43244 AgMenuItemComponent.prototype.cancelActivate = function () {
43245 if (this.activateTimeoutId) {
43246 window.clearTimeout(this.activateTimeoutId);
43247 this.activateTimeoutId = 0;
43248 }
43249 };
43250 AgMenuItemComponent.prototype.cancelDeactivate = function () {
43251 if (this.deactivateTimeoutId) {
43252 window.clearTimeout(this.deactivateTimeoutId);
43253 this.deactivateTimeoutId = 0;
43254 }
43255 };
43256 AgMenuItemComponent.prototype.onMouseEnter = function () {
43257 var _this = this;
43258 this.cancelDeactivate();
43259 if (this.params.isAnotherSubMenuOpen()) {
43260 // wait to see if the user enters the open sub-menu
43261 this.activateTimeoutId = window.setTimeout(function () { return _this.activate(true); }, AgMenuItemComponent.ACTIVATION_DELAY);
43262 }
43263 else {
43264 // activate immediately
43265 this.activate(true);
43266 }
43267 };
43268 AgMenuItemComponent.prototype.onMouseLeave = function () {
43269 var _this = this;
43270 this.cancelActivate();
43271 if (this.isSubMenuOpen()) {
43272 // wait to see if the user enters the sub-menu
43273 this.deactivateTimeoutId = window.setTimeout(function () { return _this.deactivate(); }, AgMenuItemComponent.ACTIVATION_DELAY);
43274 }
43275 else {
43276 // de-activate immediately
43277 this.deactivate();
43278 }
43279 };
43280 AgMenuItemComponent.prototype.getClassName = function (suffix) {
43281 var prefix = this.params.isCompact ? 'ag-compact-menu-option' : 'ag-menu-option';
43282 return suffix ? prefix + "-" + suffix : prefix;
43283 };
43284 AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED = 'menuItemSelected';
43285 AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED = 'menuItemActivated';
43286 AgMenuItemComponent.ACTIVATION_DELAY = 80;
43287 __decorate([
43288 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('popupService')
43289 ], AgMenuItemComponent.prototype, "popupService", void 0);
43290 __decorate([
43291 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
43292 ], AgMenuItemComponent.prototype, "init", null);
43293 return AgMenuItemComponent;
43294}(_component__WEBPACK_IMPORTED_MODULE_3__["Component"]));
43295
43296
43297
43298/***/ }),
43299/* 194 */
43300/***/ (function(module, __webpack_exports__, __webpack_require__) {
43301
43302"use strict";
43303__webpack_require__.r(__webpack_exports__);
43304/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgMenuList", function() { return AgMenuList; });
43305/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
43306/* harmony import */ var _agMenuItemComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(193);
43307/* harmony import */ var _tabGuardComp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(195);
43308/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48);
43309/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45);
43310/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(19);
43311/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41);
43312/**
43313 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
43314 * @version v29.2.0
43315 * @link https://www.ag-grid.com/
43316 * @license MIT
43317 */
43318var __extends = (undefined && undefined.__extends) || (function () {
43319 var extendStatics = function (d, b) {
43320 extendStatics = Object.setPrototypeOf ||
43321 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43322 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
43323 return extendStatics(d, b);
43324 };
43325 return function (d, b) {
43326 extendStatics(d, b);
43327 function __() { this.constructor = d; }
43328 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43329 };
43330})();
43331var __assign = (undefined && undefined.__assign) || function () {
43332 __assign = Object.assign || function(t) {
43333 for (var s, i = 1, n = arguments.length; i < n; i++) {
43334 s = arguments[i];
43335 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
43336 t[p] = s[p];
43337 }
43338 return t;
43339 };
43340 return __assign.apply(this, arguments);
43341};
43342var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
43343 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43344 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43345 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;
43346 return c > 3 && r && Object.defineProperty(target, key, r), r;
43347};
43348
43349
43350
43351
43352
43353
43354
43355var AgMenuList = /** @class */ (function (_super) {
43356 __extends(AgMenuList, _super);
43357 function AgMenuList(level) {
43358 if (level === void 0) { level = 1; }
43359 var _this = _super.call(this, /* html */ "<div class=\"ag-menu-list\" role=\"tree\"></div>") || this;
43360 _this.level = level;
43361 _this.menuItems = [];
43362 return _this;
43363 }
43364 AgMenuList.prototype.postConstruct = function () {
43365 var _this = this;
43366 this.initialiseTabGuard({
43367 onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },
43368 handleKeyDown: function (e) { return _this.handleKeyDown(e); }
43369 });
43370 };
43371 AgMenuList.prototype.onTabKeyDown = function (e) {
43372 var parent = this.getParentComponent();
43373 var parentGui = parent && parent.getGui();
43374 var isManaged = parentGui && parentGui.classList.contains('ag-focus-managed');
43375 if (!isManaged) {
43376 e.preventDefault();
43377 }
43378 if (e.shiftKey) {
43379 this.closeIfIsChild(e);
43380 }
43381 };
43382 AgMenuList.prototype.handleKeyDown = function (e) {
43383 switch (e.key) {
43384 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP:
43385 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].RIGHT:
43386 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].DOWN:
43387 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].LEFT:
43388 e.preventDefault();
43389 this.handleNavKey(e.key);
43390 break;
43391 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].ESCAPE:
43392 var topMenu = this.findTopMenu();
43393 if (topMenu) {
43394 this.focusService.focusInto(topMenu.getGui());
43395 }
43396 break;
43397 }
43398 };
43399 AgMenuList.prototype.clearActiveItem = function () {
43400 if (this.activeMenuItem) {
43401 this.activeMenuItem.deactivate();
43402 this.activeMenuItem = null;
43403 }
43404 };
43405 AgMenuList.prototype.addMenuItems = function (menuItems) {
43406 var _this = this;
43407 if (menuItems == null) {
43408 return;
43409 }
43410 menuItems.forEach(function (menuItemOrString) {
43411 if (menuItemOrString === 'separator') {
43412 _this.addSeparator();
43413 }
43414 else if (typeof menuItemOrString === 'string') {
43415 console.warn("AG Grid: unrecognised menu item " + menuItemOrString);
43416 }
43417 else {
43418 _this.addItem(menuItemOrString);
43419 }
43420 });
43421 };
43422 AgMenuList.prototype.addItem = function (menuItemDef) {
43423 var _this = this;
43424 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(); }); } })));
43425 menuItem.setParentComponent(this);
43426 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_6__["setAriaLevel"])(menuItem.getGui(), this.level);
43427 this.menuItems.push(menuItem);
43428 this.appendChild(menuItem.getGui());
43429 this.addManagedListener(menuItem, _agMenuItemComponent__WEBPACK_IMPORTED_MODULE_1__["AgMenuItemComponent"].EVENT_MENU_ITEM_SELECTED, function (event) {
43430 _this.dispatchEvent(event);
43431 });
43432 this.addManagedListener(menuItem, _agMenuItemComponent__WEBPACK_IMPORTED_MODULE_1__["AgMenuItemComponent"].EVENT_MENU_ITEM_ACTIVATED, function (event) {
43433 if (_this.activeMenuItem && _this.activeMenuItem !== event.menuItem) {
43434 _this.activeMenuItem.deactivate();
43435 }
43436 _this.activeMenuItem = event.menuItem;
43437 });
43438 };
43439 AgMenuList.prototype.activateFirstItem = function () {
43440 var item = this.menuItems.filter(function (currentItem) { return !currentItem.isDisabled(); })[0];
43441 if (!item) {
43442 return;
43443 }
43444 item.activate();
43445 };
43446 AgMenuList.prototype.addSeparator = function () {
43447 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>";
43448 this.appendChild(Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__["loadTemplate"])(separatorHtml));
43449 };
43450 AgMenuList.prototype.findTopMenu = function () {
43451 var parent = this.getParentComponent();
43452 if (!parent && this instanceof AgMenuList) {
43453 return this;
43454 }
43455 while (true) {
43456 var nextParent = parent && parent.getParentComponent && parent.getParentComponent();
43457 if (!nextParent || (!(nextParent instanceof AgMenuList || nextParent instanceof _agMenuItemComponent__WEBPACK_IMPORTED_MODULE_1__["AgMenuItemComponent"]))) {
43458 break;
43459 }
43460 parent = nextParent;
43461 }
43462 return parent instanceof AgMenuList ? parent : undefined;
43463 };
43464 AgMenuList.prototype.handleNavKey = function (key) {
43465 switch (key) {
43466 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP:
43467 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].DOWN:
43468 var nextItem = this.findNextItem(key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP);
43469 if (nextItem && nextItem !== this.activeMenuItem) {
43470 nextItem.activate();
43471 }
43472 return;
43473 }
43474 var left = this.gridOptionsService.is('enableRtl') ? _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].RIGHT : _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].LEFT;
43475 if (key === left) {
43476 this.closeIfIsChild();
43477 }
43478 else {
43479 this.openChild();
43480 }
43481 };
43482 AgMenuList.prototype.closeIfIsChild = function (e) {
43483 var parentItem = this.getParentComponent();
43484 if (parentItem && parentItem instanceof _agMenuItemComponent__WEBPACK_IMPORTED_MODULE_1__["AgMenuItemComponent"]) {
43485 if (e) {
43486 e.preventDefault();
43487 }
43488 parentItem.closeSubMenu();
43489 parentItem.getGui().focus();
43490 }
43491 };
43492 AgMenuList.prototype.openChild = function () {
43493 if (this.activeMenuItem) {
43494 this.activeMenuItem.openSubMenu(true);
43495 }
43496 };
43497 AgMenuList.prototype.findNextItem = function (up) {
43498 var items = this.menuItems.filter(function (item) { return !item.isDisabled(); });
43499 if (!items.length) {
43500 return;
43501 }
43502 if (!this.activeMenuItem) {
43503 return up ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_5__["last"])(items) : items[0];
43504 }
43505 if (up) {
43506 items.reverse();
43507 }
43508 var nextItem;
43509 var foundCurrent = false;
43510 for (var i = 0; i < items.length; i++) {
43511 var item = items[i];
43512 if (!foundCurrent) {
43513 if (item === this.activeMenuItem) {
43514 foundCurrent = true;
43515 }
43516 continue;
43517 }
43518 nextItem = item;
43519 break;
43520 }
43521 return nextItem || this.activeMenuItem;
43522 };
43523 AgMenuList.prototype.destroy = function () {
43524 this.clearActiveItem();
43525 _super.prototype.destroy.call(this);
43526 };
43527 __decorate([
43528 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
43529 ], AgMenuList.prototype, "focusService", void 0);
43530 __decorate([
43531 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
43532 ], AgMenuList.prototype, "postConstruct", null);
43533 return AgMenuList;
43534}(_tabGuardComp__WEBPACK_IMPORTED_MODULE_2__["TabGuardComp"]));
43535
43536
43537
43538/***/ }),
43539/* 195 */
43540/***/ (function(module, __webpack_exports__, __webpack_require__) {
43541
43542"use strict";
43543__webpack_require__.r(__webpack_exports__);
43544/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabGuardComp", function() { return TabGuardComp; });
43545/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
43546/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
43547/* harmony import */ var _tabGuardCtrl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(196);
43548/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41);
43549/**
43550 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
43551 * @version v29.2.0
43552 * @link https://www.ag-grid.com/
43553 * @license MIT
43554 */
43555var __extends = (undefined && undefined.__extends) || (function () {
43556 var extendStatics = function (d, b) {
43557 extendStatics = Object.setPrototypeOf ||
43558 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43559 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
43560 return extendStatics(d, b);
43561 };
43562 return function (d, b) {
43563 extendStatics(d, b);
43564 function __() { this.constructor = d; }
43565 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43566 };
43567})();
43568var __read = (undefined && undefined.__read) || function (o, n) {
43569 var m = typeof Symbol === "function" && o[Symbol.iterator];
43570 if (!m) return o;
43571 var i = m.call(o), r, ar = [], e;
43572 try {
43573 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
43574 }
43575 catch (error) { e = { error: error }; }
43576 finally {
43577 try {
43578 if (r && !r.done && (m = i["return"])) m.call(i);
43579 }
43580 finally { if (e) throw e.error; }
43581 }
43582 return ar;
43583};
43584var __spread = (undefined && undefined.__spread) || function () {
43585 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
43586 return ar;
43587};
43588
43589
43590
43591
43592var TabGuardComp = /** @class */ (function (_super) {
43593 __extends(TabGuardComp, _super);
43594 function TabGuardComp() {
43595 return _super !== null && _super.apply(this, arguments) || this;
43596 }
43597 TabGuardComp.prototype.initialiseTabGuard = function (params) {
43598 this.eTopGuard = this.createTabGuard('top');
43599 this.eBottomGuard = this.createTabGuard('bottom');
43600 this.eFocusableElement = this.getFocusableElement();
43601 var tabGuards = [this.eTopGuard, this.eBottomGuard];
43602 var compProxy = {
43603 setTabIndex: function (tabIndex) {
43604 tabGuards.forEach(function (tabGuard) { return tabIndex != null ? tabGuard.setAttribute('tabIndex', tabIndex) : tabGuard.removeAttribute('tabIndex'); });
43605 }
43606 };
43607 this.addTabGuards(this.eTopGuard, this.eBottomGuard);
43608 this.tabGuardCtrl = this.createManagedBean(new _tabGuardCtrl__WEBPACK_IMPORTED_MODULE_2__["TabGuardCtrl"]({
43609 comp: compProxy,
43610 eTopGuard: this.eTopGuard,
43611 eBottomGuard: this.eBottomGuard,
43612 eFocusableElement: this.eFocusableElement,
43613 onFocusIn: params.onFocusIn,
43614 onFocusOut: params.onFocusOut,
43615 focusInnerElement: params.focusInnerElement,
43616 handleKeyDown: params.handleKeyDown,
43617 onTabKeyDown: params.onTabKeyDown,
43618 shouldStopEventPropagation: params.shouldStopEventPropagation
43619 }));
43620 };
43621 TabGuardComp.prototype.createTabGuard = function (side) {
43622 var tabGuard = document.createElement('div');
43623 var cls = side === 'top' ? _tabGuardCtrl__WEBPACK_IMPORTED_MODULE_2__["TabGuardClassNames"].TAB_GUARD_TOP : _tabGuardCtrl__WEBPACK_IMPORTED_MODULE_2__["TabGuardClassNames"].TAB_GUARD_BOTTOM;
43624 tabGuard.classList.add(_tabGuardCtrl__WEBPACK_IMPORTED_MODULE_2__["TabGuardClassNames"].TAB_GUARD, cls);
43625 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_3__["setAriaRole"])(tabGuard, 'presentation');
43626 return tabGuard;
43627 };
43628 TabGuardComp.prototype.addTabGuards = function (topTabGuard, bottomTabGuard) {
43629 this.eFocusableElement.insertAdjacentElement('afterbegin', topTabGuard);
43630 this.eFocusableElement.insertAdjacentElement('beforeend', bottomTabGuard);
43631 };
43632 TabGuardComp.prototype.removeAllChildrenExceptTabGuards = function () {
43633 var tabGuards = [this.eTopGuard, this.eBottomGuard];
43634 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["clearElement"])(this.getFocusableElement());
43635 this.addTabGuards.apply(this, __spread(tabGuards));
43636 };
43637 TabGuardComp.prototype.forceFocusOutOfContainer = function (up) {
43638 if (up === void 0) { up = false; }
43639 this.tabGuardCtrl.forceFocusOutOfContainer(up);
43640 };
43641 TabGuardComp.prototype.appendChild = function (newChild, container) {
43642 if (!Object(_utils_dom__WEBPACK_IMPORTED_MODULE_1__["isNodeOrElement"])(newChild)) {
43643 newChild = newChild.getGui();
43644 }
43645 var bottomTabGuard = this.eBottomGuard;
43646 if (bottomTabGuard) {
43647 bottomTabGuard.insertAdjacentElement('beforebegin', newChild);
43648 }
43649 else {
43650 _super.prototype.appendChild.call(this, newChild, container);
43651 }
43652 };
43653 return TabGuardComp;
43654}(_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
43655
43656
43657
43658/***/ }),
43659/* 196 */
43660/***/ (function(module, __webpack_exports__, __webpack_require__) {
43661
43662"use strict";
43663__webpack_require__.r(__webpack_exports__);
43664/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabGuardClassNames", function() { return TabGuardClassNames; });
43665/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabGuardCtrl", function() { return TabGuardCtrl; });
43666/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
43667/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
43668/* harmony import */ var _managedFocusFeature__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(64);
43669/**
43670 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
43671 * @version v29.2.0
43672 * @link https://www.ag-grid.com/
43673 * @license MIT
43674 */
43675var __extends = (undefined && undefined.__extends) || (function () {
43676 var extendStatics = function (d, b) {
43677 extendStatics = Object.setPrototypeOf ||
43678 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43679 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
43680 return extendStatics(d, b);
43681 };
43682 return function (d, b) {
43683 extendStatics(d, b);
43684 function __() { this.constructor = d; }
43685 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43686 };
43687})();
43688var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
43689 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43690 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43691 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;
43692 return c > 3 && r && Object.defineProperty(target, key, r), r;
43693};
43694
43695
43696
43697var TabGuardClassNames;
43698(function (TabGuardClassNames) {
43699 TabGuardClassNames["TAB_GUARD"] = "ag-tab-guard";
43700 TabGuardClassNames["TAB_GUARD_TOP"] = "ag-tab-guard-top";
43701 TabGuardClassNames["TAB_GUARD_BOTTOM"] = "ag-tab-guard-bottom";
43702})(TabGuardClassNames || (TabGuardClassNames = {}));
43703;
43704var TabGuardCtrl = /** @class */ (function (_super) {
43705 __extends(TabGuardCtrl, _super);
43706 function TabGuardCtrl(params) {
43707 var _this = _super.call(this) || this;
43708 _this.skipTabGuardFocus = false;
43709 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;
43710 _this.comp = comp;
43711 _this.eTopGuard = eTopGuard;
43712 _this.eBottomGuard = eBottomGuard;
43713 _this.providedFocusInnerElement = focusInnerElement;
43714 _this.eFocusableElement = eFocusableElement;
43715 _this.providedFocusIn = onFocusIn;
43716 _this.providedFocusOut = onFocusOut;
43717 _this.providedShouldStopEventPropagation = shouldStopEventPropagation;
43718 _this.providedOnTabKeyDown = onTabKeyDown;
43719 _this.providedHandleKeyDown = handleKeyDown;
43720 return _this;
43721 }
43722 TabGuardCtrl.prototype.postConstruct = function () {
43723 var _this = this;
43724 this.createManagedBean(new _managedFocusFeature__WEBPACK_IMPORTED_MODULE_2__["ManagedFocusFeature"](this.eFocusableElement, {
43725 shouldStopEventPropagation: function () { return _this.shouldStopEventPropagation(); },
43726 onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },
43727 handleKeyDown: function (e) { return _this.handleKeyDown(e); },
43728 onFocusIn: function (e) { return _this.onFocusIn(e); },
43729 onFocusOut: function (e) { return _this.onFocusOut(e); }
43730 }));
43731 this.activateTabGuards();
43732 [this.eTopGuard, this.eBottomGuard].forEach(function (guard) { return _this.addManagedListener(guard, 'focus', _this.onFocus.bind(_this)); });
43733 };
43734 TabGuardCtrl.prototype.handleKeyDown = function (e) {
43735 if (this.providedHandleKeyDown) {
43736 this.providedHandleKeyDown(e);
43737 }
43738 };
43739 TabGuardCtrl.prototype.tabGuardsAreActive = function () {
43740 return !!this.eTopGuard && this.eTopGuard.hasAttribute('tabIndex');
43741 };
43742 TabGuardCtrl.prototype.shouldStopEventPropagation = function () {
43743 if (this.providedShouldStopEventPropagation) {
43744 return this.providedShouldStopEventPropagation();
43745 }
43746 return false;
43747 };
43748 TabGuardCtrl.prototype.activateTabGuards = function () {
43749 this.comp.setTabIndex(this.getGridTabIndex());
43750 };
43751 TabGuardCtrl.prototype.deactivateTabGuards = function () {
43752 this.comp.setTabIndex();
43753 };
43754 TabGuardCtrl.prototype.onFocus = function (e) {
43755 if (this.skipTabGuardFocus) {
43756 this.skipTabGuardFocus = false;
43757 return;
43758 }
43759 var fromBottom = e.target === this.eBottomGuard;
43760 if (this.providedFocusInnerElement) {
43761 this.providedFocusInnerElement(fromBottom);
43762 }
43763 else {
43764 this.focusInnerElement(fromBottom);
43765 }
43766 };
43767 TabGuardCtrl.prototype.onFocusIn = function (e) {
43768 if (this.providedFocusIn && this.providedFocusIn(e)) {
43769 return;
43770 }
43771 this.deactivateTabGuards();
43772 };
43773 TabGuardCtrl.prototype.onFocusOut = function (e) {
43774 if (this.providedFocusOut && this.providedFocusOut(e)) {
43775 return;
43776 }
43777 if (!this.eFocusableElement.contains(e.relatedTarget)) {
43778 this.activateTabGuards();
43779 }
43780 };
43781 TabGuardCtrl.prototype.onTabKeyDown = function (e) {
43782 var _this = this;
43783 if (this.providedOnTabKeyDown) {
43784 this.providedOnTabKeyDown(e);
43785 return;
43786 }
43787 if (e.defaultPrevented) {
43788 return;
43789 }
43790 var tabGuardsAreActive = this.tabGuardsAreActive();
43791 if (tabGuardsAreActive) {
43792 this.deactivateTabGuards();
43793 }
43794 var nextRoot = this.getNextFocusableElement(e.shiftKey);
43795 if (tabGuardsAreActive) {
43796 // ensure the tab guards are only re-instated once the event has finished processing, to avoid the browser
43797 // tabbing to the tab guard from inside the component
43798 setTimeout(function () { return _this.activateTabGuards(); }, 0);
43799 }
43800 if (!nextRoot) {
43801 return;
43802 }
43803 nextRoot.focus();
43804 e.preventDefault();
43805 };
43806 TabGuardCtrl.prototype.getGridTabIndex = function () {
43807 return (this.gridOptionsService.getNum('tabIndex') || 0).toString();
43808 };
43809 TabGuardCtrl.prototype.focusInnerElement = function (fromBottom) {
43810 if (fromBottom === void 0) { fromBottom = false; }
43811 var focusable = this.focusService.findFocusableElements(this.eFocusableElement);
43812 if (this.tabGuardsAreActive()) {
43813 // remove tab guards from this component from list of focusable elements
43814 focusable.splice(0, 1);
43815 focusable.splice(focusable.length - 1, 1);
43816 }
43817 if (!focusable.length) {
43818 return;
43819 }
43820 focusable[fromBottom ? focusable.length - 1 : 0].focus();
43821 };
43822 TabGuardCtrl.prototype.getNextFocusableElement = function (backwards) {
43823 return this.focusService.findNextFocusableElement(this.eFocusableElement, false, backwards);
43824 };
43825 TabGuardCtrl.prototype.forceFocusOutOfContainer = function (up) {
43826 if (up === void 0) { up = false; }
43827 var tabGuardToFocus = up ? this.eTopGuard : this.eBottomGuard;
43828 this.activateTabGuards();
43829 this.skipTabGuardFocus = true;
43830 tabGuardToFocus.focus();
43831 };
43832 __decorate([
43833 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('focusService')
43834 ], TabGuardCtrl.prototype, "focusService", void 0);
43835 __decorate([
43836 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
43837 ], TabGuardCtrl.prototype, "postConstruct", null);
43838 return TabGuardCtrl;
43839}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
43840
43841
43842
43843/***/ }),
43844/* 197 */
43845/***/ (function(module, __webpack_exports__, __webpack_require__) {
43846
43847"use strict";
43848__webpack_require__.r(__webpack_exports__);
43849/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgMenuPanel", function() { return AgMenuPanel; });
43850/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
43851/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
43852/* harmony import */ var _tabGuardComp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(195);
43853/**
43854 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
43855 * @version v29.2.0
43856 * @link https://www.ag-grid.com/
43857 * @license MIT
43858 */
43859var __extends = (undefined && undefined.__extends) || (function () {
43860 var extendStatics = function (d, b) {
43861 extendStatics = Object.setPrototypeOf ||
43862 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43863 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
43864 return extendStatics(d, b);
43865 };
43866 return function (d, b) {
43867 extendStatics(d, b);
43868 function __() { this.constructor = d; }
43869 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43870 };
43871})();
43872var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
43873 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43874 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43875 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;
43876 return c > 3 && r && Object.defineProperty(target, key, r), r;
43877};
43878
43879
43880
43881var AgMenuPanel = /** @class */ (function (_super) {
43882 __extends(AgMenuPanel, _super);
43883 function AgMenuPanel(wrappedComponent) {
43884 var _this = _super.call(this) || this;
43885 _this.wrappedComponent = wrappedComponent;
43886 _this.setTemplateFromElement(wrappedComponent.getGui());
43887 return _this;
43888 }
43889 AgMenuPanel.prototype.postConstruct = function () {
43890 var _this = this;
43891 this.initialiseTabGuard({
43892 onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },
43893 handleKeyDown: function (e) { return _this.handleKeyDown(e); }
43894 });
43895 };
43896 AgMenuPanel.prototype.handleKeyDown = function (e) {
43897 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_1__["KeyCode"].ESCAPE) {
43898 this.closePanel();
43899 }
43900 };
43901 AgMenuPanel.prototype.onTabKeyDown = function (e) {
43902 if (e.defaultPrevented) {
43903 return;
43904 }
43905 this.closePanel();
43906 e.preventDefault();
43907 };
43908 AgMenuPanel.prototype.closePanel = function () {
43909 var menuItem = this.parentComponent;
43910 menuItem.closeSubMenu();
43911 setTimeout(function () { return menuItem.getGui().focus(); }, 0);
43912 };
43913 __decorate([
43914 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
43915 ], AgMenuPanel.prototype, "postConstruct", null);
43916 return AgMenuPanel;
43917}(_tabGuardComp__WEBPACK_IMPORTED_MODULE_2__["TabGuardComp"]));
43918
43919
43920
43921/***/ }),
43922/* 198 */
43923/***/ (function(module, __webpack_exports__, __webpack_require__) {
43924
43925"use strict";
43926__webpack_require__.r(__webpack_exports__);
43927/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgDialog", function() { return AgDialog; });
43928/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
43929/* harmony import */ var _agPanel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
43930/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38);
43931/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45);
43932/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46);
43933/**
43934 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
43935 * @version v29.2.0
43936 * @link https://www.ag-grid.com/
43937 * @license MIT
43938 */
43939var __extends = (undefined && undefined.__extends) || (function () {
43940 var extendStatics = function (d, b) {
43941 extendStatics = Object.setPrototypeOf ||
43942 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43943 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
43944 return extendStatics(d, b);
43945 };
43946 return function (d, b) {
43947 extendStatics(d, b);
43948 function __() { this.constructor = d; }
43949 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43950 };
43951})();
43952var __assign = (undefined && undefined.__assign) || function () {
43953 __assign = Object.assign || function(t) {
43954 for (var s, i = 1, n = arguments.length; i < n; i++) {
43955 s = arguments[i];
43956 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
43957 t[p] = s[p];
43958 }
43959 return t;
43960 };
43961 return __assign.apply(this, arguments);
43962};
43963var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
43964 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43965 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43966 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;
43967 return c > 3 && r && Object.defineProperty(target, key, r), r;
43968};
43969
43970
43971
43972
43973
43974var AgDialog = /** @class */ (function (_super) {
43975 __extends(AgDialog, _super);
43976 function AgDialog(config) {
43977 var _this = _super.call(this, __assign(__assign({}, config), { popup: true })) || this;
43978 _this.isMaximizable = false;
43979 _this.isMaximized = false;
43980 _this.maximizeListeners = [];
43981 _this.resizeListenerDestroy = null;
43982 _this.lastPosition = {
43983 x: 0,
43984 y: 0,
43985 width: 0,
43986 height: 0
43987 };
43988 return _this;
43989 }
43990 AgDialog.prototype.postConstruct = function () {
43991 var _this = this;
43992 var eGui = this.getGui();
43993 var _a = this.config, movable = _a.movable, resizable = _a.resizable, maximizable = _a.maximizable;
43994 this.addCssClass('ag-dialog');
43995 _super.prototype.postConstruct.call(this);
43996 this.addManagedListener(eGui, 'focusin', function (e) {
43997 if (eGui.contains(e.relatedTarget)) {
43998 return;
43999 }
44000 _this.popupService.bringPopupToFront(eGui);
44001 });
44002 if (movable) {
44003 this.setMovable(movable);
44004 }
44005 if (maximizable) {
44006 this.setMaximizable(maximizable);
44007 }
44008 if (resizable) {
44009 this.setResizable(resizable);
44010 }
44011 };
44012 AgDialog.prototype.renderComponent = function () {
44013 var eGui = this.getGui();
44014 var _a = this.config, alwaysOnTop = _a.alwaysOnTop, modal = _a.modal, title = _a.title;
44015 var translate = this.localeService.getLocaleTextFunc();
44016 var addPopupRes = this.popupService.addPopup({
44017 modal: modal,
44018 eChild: eGui,
44019 closeOnEsc: true,
44020 closedCallback: this.destroy.bind(this),
44021 alwaysOnTop: alwaysOnTop,
44022 ariaLabel: title || translate('ariaLabelDialog', 'Dialog')
44023 });
44024 if (addPopupRes) {
44025 this.close = addPopupRes.hideFunc;
44026 }
44027 };
44028 AgDialog.prototype.toggleMaximize = function () {
44029 var position = this.positionableFeature.getPosition();
44030 if (this.isMaximized) {
44031 var _a = this.lastPosition, x = _a.x, y = _a.y, width = _a.width, height = _a.height;
44032 this.setWidth(width);
44033 this.setHeight(height);
44034 this.positionableFeature.offsetElement(x, y);
44035 }
44036 else {
44037 this.lastPosition.width = this.getWidth();
44038 this.lastPosition.height = this.getHeight();
44039 this.lastPosition.x = position.x;
44040 this.lastPosition.y = position.y;
44041 this.positionableFeature.offsetElement(0, 0);
44042 this.setHeight('100%');
44043 this.setWidth('100%');
44044 }
44045 this.isMaximized = !this.isMaximized;
44046 this.refreshMaximizeIcon();
44047 };
44048 AgDialog.prototype.refreshMaximizeIcon = function () {
44049 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setDisplayed"])(this.maximizeIcon, !this.isMaximized);
44050 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setDisplayed"])(this.minimizeIcon, this.isMaximized);
44051 };
44052 AgDialog.prototype.clearMaximizebleListeners = function () {
44053 if (this.maximizeListeners.length) {
44054 this.maximizeListeners.forEach(function (destroyListener) { return destroyListener(); });
44055 this.maximizeListeners.length = 0;
44056 }
44057 if (this.resizeListenerDestroy) {
44058 this.resizeListenerDestroy();
44059 this.resizeListenerDestroy = null;
44060 }
44061 };
44062 AgDialog.prototype.destroy = function () {
44063 this.maximizeButtonComp = this.destroyBean(this.maximizeButtonComp);
44064 this.clearMaximizebleListeners();
44065 _super.prototype.destroy.call(this);
44066 };
44067 AgDialog.prototype.setResizable = function (resizable) {
44068 this.positionableFeature.setResizable(resizable);
44069 };
44070 AgDialog.prototype.setMovable = function (movable) {
44071 this.positionableFeature.setMovable(movable, this.eTitleBar);
44072 };
44073 AgDialog.prototype.setMaximizable = function (maximizable) {
44074 var _this = this;
44075 if (!maximizable) {
44076 this.clearMaximizebleListeners();
44077 if (this.maximizeButtonComp) {
44078 this.destroyBean(this.maximizeButtonComp);
44079 this.maximizeButtonComp = this.maximizeIcon = this.minimizeIcon = undefined;
44080 }
44081 return;
44082 }
44083 var eTitleBar = this.eTitleBar;
44084 if (!eTitleBar || maximizable === this.isMaximizable) {
44085 return;
44086 }
44087 var maximizeButtonComp = this.buildMaximizeAndMinimizeElements();
44088 this.refreshMaximizeIcon();
44089 maximizeButtonComp.addManagedListener(maximizeButtonComp.getGui(), 'click', this.toggleMaximize.bind(this));
44090 this.addTitleBarButton(maximizeButtonComp, 0);
44091 this.maximizeListeners.push(this.addManagedListener(eTitleBar, 'dblclick', this.toggleMaximize.bind(this)));
44092 this.resizeListenerDestroy = this.addManagedListener(this, 'resize', function () {
44093 _this.isMaximized = false;
44094 _this.refreshMaximizeIcon();
44095 });
44096 };
44097 AgDialog.prototype.buildMaximizeAndMinimizeElements = function () {
44098 var maximizeButtonComp = this.maximizeButtonComp =
44099 this.createBean(new _component__WEBPACK_IMPORTED_MODULE_2__["Component"](/* html */ "<div class=\"ag-dialog-button\"></span>"));
44100 var eGui = maximizeButtonComp.getGui();
44101 this.maximizeIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])('maximize', this.gridOptionsService);
44102 eGui.appendChild(this.maximizeIcon);
44103 this.maximizeIcon.classList.add('ag-panel-title-bar-button-icon');
44104 this.minimizeIcon = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])('minimize', this.gridOptionsService);
44105 eGui.appendChild(this.minimizeIcon);
44106 this.minimizeIcon.classList.add('ag-panel-title-bar-button-icon');
44107 return maximizeButtonComp;
44108 };
44109 __decorate([
44110 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('popupService')
44111 ], AgDialog.prototype, "popupService", void 0);
44112 return AgDialog;
44113}(_agPanel__WEBPACK_IMPORTED_MODULE_1__["AgPanel"]));
44114
44115
44116
44117/***/ }),
44118/* 199 */
44119/***/ (function(module, __webpack_exports__, __webpack_require__) {
44120
44121"use strict";
44122__webpack_require__.r(__webpack_exports__);
44123/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgPanel", function() { return AgPanel; });
44124/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
44125/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
44126/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38);
44127/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45);
44128/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46);
44129/* harmony import */ var _rendering_features_positionableFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65);
44130/**
44131 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
44132 * @version v29.2.0
44133 * @link https://www.ag-grid.com/
44134 * @license MIT
44135 */
44136var __extends = (undefined && undefined.__extends) || (function () {
44137 var extendStatics = function (d, b) {
44138 extendStatics = Object.setPrototypeOf ||
44139 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
44140 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
44141 return extendStatics(d, b);
44142 };
44143 return function (d, b) {
44144 extendStatics(d, b);
44145 function __() { this.constructor = d; }
44146 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44147 };
44148})();
44149var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
44150 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
44151 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
44152 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;
44153 return c > 3 && r && Object.defineProperty(target, key, r), r;
44154};
44155
44156
44157
44158
44159
44160
44161var AgPanel = /** @class */ (function (_super) {
44162 __extends(AgPanel, _super);
44163 function AgPanel(config) {
44164 var _this = _super.call(this, AgPanel.getTemplate(config)) || this;
44165 _this.closable = true;
44166 _this.config = config;
44167 return _this;
44168 }
44169 AgPanel.getTemplate = function (config) {
44170 var cssIdentifier = (config && config.cssIdentifier) || 'default';
44171 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>";
44172 };
44173 AgPanel.prototype.postConstruct = function () {
44174 var _this = this;
44175 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;
44176 this.positionableFeature = new _rendering_features_positionableFeature__WEBPACK_IMPORTED_MODULE_5__["PositionableFeature"](this.getGui(), {
44177 minWidth: minWidth, width: width, minHeight: minHeight, height: height, centered: centered, x: x, y: y, popup: popup,
44178 calculateTopBuffer: function () { return _this.positionableFeature.getHeight() - _this.getBodyHeight(); }
44179 });
44180 this.createManagedBean(this.positionableFeature);
44181 var eGui = this.getGui();
44182 if (component) {
44183 this.setBodyComponent(component);
44184 }
44185 if (!hideTitleBar) {
44186 if (title) {
44187 this.setTitle(title);
44188 }
44189 this.setClosable(closable != null ? closable : this.closable);
44190 }
44191 else {
44192 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["setDisplayed"])(this.eTitleBar, false);
44193 }
44194 this.addManagedListener(this.eTitleBar, 'mousedown', function (e) {
44195 var eDocument = _this.gridOptionsService.getDocument();
44196 if (eGui.contains(e.relatedTarget) ||
44197 eGui.contains(eDocument.activeElement) ||
44198 _this.eTitleBarButtons.contains(e.target)) {
44199 e.preventDefault();
44200 return;
44201 }
44202 var focusEl = _this.eContentWrapper.querySelector('button, [href], input, select, textarea, [tabindex]');
44203 if (focusEl) {
44204 focusEl.focus();
44205 }
44206 });
44207 if (popup && this.positionableFeature.isPositioned()) {
44208 return;
44209 }
44210 if (this.renderComponent) {
44211 this.renderComponent();
44212 }
44213 this.positionableFeature.initialisePosition();
44214 this.eContentWrapper.style.height = '0';
44215 };
44216 AgPanel.prototype.renderComponent = function () {
44217 var _this = this;
44218 var eGui = this.getGui();
44219 eGui.focus();
44220 this.close = function () {
44221 eGui.parentElement.removeChild(eGui);
44222 _this.destroy();
44223 };
44224 };
44225 AgPanel.prototype.getHeight = function () {
44226 return this.positionableFeature.getHeight();
44227 };
44228 AgPanel.prototype.setHeight = function (height) {
44229 this.positionableFeature.setHeight(height);
44230 };
44231 AgPanel.prototype.getWidth = function () {
44232 return this.positionableFeature.getWidth();
44233 };
44234 AgPanel.prototype.setWidth = function (width) {
44235 this.positionableFeature.setWidth(width);
44236 };
44237 AgPanel.prototype.setClosable = function (closable) {
44238 if (closable !== this.closable) {
44239 this.closable = closable;
44240 }
44241 if (closable) {
44242 var closeButtonComp = this.closeButtonComp = new _component__WEBPACK_IMPORTED_MODULE_2__["Component"](AgPanel.CLOSE_BTN_TEMPLATE);
44243 this.getContext().createBean(closeButtonComp);
44244 var eGui = closeButtonComp.getGui();
44245 var child = Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])('close', this.gridOptionsService);
44246 child.classList.add('ag-panel-title-bar-button-icon');
44247 eGui.appendChild(child);
44248 this.addTitleBarButton(closeButtonComp);
44249 closeButtonComp.addManagedListener(eGui, 'click', this.onBtClose.bind(this));
44250 }
44251 else if (this.closeButtonComp) {
44252 var eGui = this.closeButtonComp.getGui();
44253 eGui.parentElement.removeChild(eGui);
44254 this.closeButtonComp = this.destroyBean(this.closeButtonComp);
44255 }
44256 };
44257 AgPanel.prototype.setBodyComponent = function (bodyComponent) {
44258 bodyComponent.setParentComponent(this);
44259 this.eContentWrapper.appendChild(bodyComponent.getGui());
44260 };
44261 AgPanel.prototype.addTitleBarButton = function (button, position) {
44262 var eTitleBarButtons = this.eTitleBarButtons;
44263 var buttons = eTitleBarButtons.children;
44264 var len = buttons.length;
44265 if (position == null) {
44266 position = len;
44267 }
44268 position = Math.max(0, Math.min(position, len));
44269 button.addCssClass('ag-panel-title-bar-button');
44270 var eGui = button.getGui();
44271 if (position === 0) {
44272 eTitleBarButtons.insertAdjacentElement('afterbegin', eGui);
44273 }
44274 else if (position === len) {
44275 eTitleBarButtons.insertAdjacentElement('beforeend', eGui);
44276 }
44277 else {
44278 buttons[position - 1].insertAdjacentElement('afterend', eGui);
44279 }
44280 button.setParentComponent(this);
44281 };
44282 AgPanel.prototype.getBodyHeight = function () {
44283 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["getInnerHeight"])(this.eContentWrapper);
44284 };
44285 AgPanel.prototype.getBodyWidth = function () {
44286 return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["getInnerWidth"])(this.eContentWrapper);
44287 };
44288 AgPanel.prototype.setTitle = function (title) {
44289 this.eTitle.innerText = title;
44290 };
44291 // called when user hits the 'x' in the top right
44292 AgPanel.prototype.onBtClose = function () {
44293 this.close();
44294 };
44295 AgPanel.prototype.destroy = function () {
44296 if (this.closeButtonComp) {
44297 this.closeButtonComp = this.destroyBean(this.closeButtonComp);
44298 }
44299 var eGui = this.getGui();
44300 if (eGui && eGui.offsetParent) {
44301 this.close();
44302 }
44303 _super.prototype.destroy.call(this);
44304 };
44305 AgPanel.CLOSE_BTN_TEMPLATE = "<div class=\"ag-button\"></div>";
44306 __decorate([
44307 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eContentWrapper')
44308 ], AgPanel.prototype, "eContentWrapper", void 0);
44309 __decorate([
44310 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eTitleBar')
44311 ], AgPanel.prototype, "eTitleBar", void 0);
44312 __decorate([
44313 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eTitleBarButtons')
44314 ], AgPanel.prototype, "eTitleBarButtons", void 0);
44315 __decorate([
44316 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_0__["RefSelector"])('eTitle')
44317 ], AgPanel.prototype, "eTitle", void 0);
44318 __decorate([
44319 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
44320 ], AgPanel.prototype, "postConstruct", null);
44321 return AgPanel;
44322}(_component__WEBPACK_IMPORTED_MODULE_2__["Component"]));
44323
44324
44325
44326/***/ }),
44327/* 200 */
44328/***/ (function(module, __webpack_exports__, __webpack_require__) {
44329
44330"use strict";
44331__webpack_require__.r(__webpack_exports__);
44332/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupService", function() { return PopupService; });
44333/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
44334/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
44335/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
44336/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45);
44337/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19);
44338/* harmony import */ var _utils_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18);
44339/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48);
44340/* harmony import */ var _focusService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(201);
44341/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(39);
44342/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(41);
44343/**
44344 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
44345 * @version v29.2.0
44346 * @link https://www.ag-grid.com/
44347 * @license MIT
44348 */
44349var __extends = (undefined && undefined.__extends) || (function () {
44350 var extendStatics = function (d, b) {
44351 extendStatics = Object.setPrototypeOf ||
44352 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
44353 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
44354 return extendStatics(d, b);
44355 };
44356 return function (d, b) {
44357 extendStatics(d, b);
44358 function __() { this.constructor = d; }
44359 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44360 };
44361})();
44362var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
44363 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
44364 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
44365 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;
44366 return c > 3 && r && Object.defineProperty(target, key, r), r;
44367};
44368var __read = (undefined && undefined.__read) || function (o, n) {
44369 var m = typeof Symbol === "function" && o[Symbol.iterator];
44370 if (!m) return o;
44371 var i = m.call(o), r, ar = [], e;
44372 try {
44373 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
44374 }
44375 catch (error) { e = { error: error }; }
44376 finally {
44377 try {
44378 if (r && !r.done && (m = i["return"])) m.call(i);
44379 }
44380 finally { if (e) throw e.error; }
44381 }
44382 return ar;
44383};
44384var __spread = (undefined && undefined.__spread) || function () {
44385 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
44386 return ar;
44387};
44388
44389
44390
44391
44392
44393
44394
44395
44396
44397
44398var DIRECTION;
44399(function (DIRECTION) {
44400 DIRECTION[DIRECTION["vertical"] = 0] = "vertical";
44401 DIRECTION[DIRECTION["horizontal"] = 1] = "horizontal";
44402})(DIRECTION || (DIRECTION = {}));
44403var instanceIdSeq = 0;
44404var PopupService = /** @class */ (function (_super) {
44405 __extends(PopupService, _super);
44406 function PopupService() {
44407 var _this = _super !== null && _super.apply(this, arguments) || this;
44408 _this.popupList = [];
44409 return _this;
44410 }
44411 PopupService_1 = PopupService;
44412 PopupService.prototype.postConstruct = function () {
44413 var _this = this;
44414 this.ctrlsService.whenReady(function (p) {
44415 _this.gridCtrl = p.gridCtrl;
44416 _this.addManagedListener(_this.gridCtrl, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_KEYBOARD_FOCUS, function () {
44417 _this.popupList.forEach(function (popup) { return popup.element.classList.add(_focusService__WEBPACK_IMPORTED_MODULE_7__["FocusService"].AG_KEYBOARD_FOCUS); });
44418 });
44419 _this.addManagedListener(_this.gridCtrl, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_MOUSE_FOCUS, function () {
44420 _this.popupList.forEach(function (popup) { return popup.element.classList.remove(_focusService__WEBPACK_IMPORTED_MODULE_7__["FocusService"].AG_KEYBOARD_FOCUS); });
44421 });
44422 });
44423 };
44424 PopupService.prototype.getPopupParent = function () {
44425 var ePopupParent = this.gridOptionsService.get('popupParent');
44426 if (ePopupParent) {
44427 return ePopupParent;
44428 }
44429 return this.gridCtrl.getGui();
44430 };
44431 PopupService.prototype.positionPopupForMenu = function (params) {
44432 var sourceRect = params.eventSource.getBoundingClientRect();
44433 var parentRect = this.getParentRect();
44434 this.checkClearMaxHeight(params.ePopup, params.shouldSetMaxHeight);
44435 var y = this.keepXYWithinBounds(params.ePopup, sourceRect.top - parentRect.top, DIRECTION.vertical);
44436 var minWidth = (params.ePopup.clientWidth > 0) ? params.ePopup.clientWidth : 200;
44437 params.ePopup.style.minWidth = minWidth + "px";
44438 var widthOfParent = parentRect.right - parentRect.left;
44439 var maxX = widthOfParent - minWidth;
44440 // the x position of the popup depends on RTL or LTR. for normal cases, LTR, we put the child popup
44441 // to the right, unless it doesn't fit and we then put it to the left. for RTL it's the other way around,
44442 // we try place it first to the left, and then if not to the right.
44443 var x;
44444 if (this.gridOptionsService.is('enableRtl')) {
44445 // for RTL, try left first
44446 x = xLeftPosition();
44447 if (x < 0) {
44448 x = xRightPosition();
44449 }
44450 if (x > maxX) {
44451 x = 0;
44452 }
44453 }
44454 else {
44455 // for LTR, try right first
44456 x = xRightPosition();
44457 if (x > maxX) {
44458 x = xLeftPosition();
44459 }
44460 if (x < 0) {
44461 x = 0;
44462 }
44463 }
44464 params.ePopup.style.left = x + "px";
44465 params.ePopup.style.top = y + "px";
44466 this.checkSetMaxHeight(params.ePopup, y, params.shouldSetMaxHeight);
44467 function xRightPosition() {
44468 return sourceRect.right - parentRect.left - 2;
44469 }
44470 function xLeftPosition() {
44471 return sourceRect.left - parentRect.left - minWidth;
44472 }
44473 };
44474 PopupService.prototype.positionPopupUnderMouseEvent = function (params) {
44475 var _this = this;
44476 var ePopup = params.ePopup, nudgeX = params.nudgeX, nudgeY = params.nudgeY, skipObserver = params.skipObserver, shouldSetMaxHeight = params.shouldSetMaxHeight;
44477 this.positionPopup({
44478 ePopup: ePopup,
44479 nudgeX: nudgeX,
44480 nudgeY: nudgeY,
44481 keepWithinBounds: true,
44482 skipObserver: skipObserver,
44483 shouldSetMaxHeight: shouldSetMaxHeight,
44484 updatePosition: function () { return _this.calculatePointerAlign(params.mouseEvent); },
44485 postProcessCallback: function () { return _this.callPostProcessPopup(params.type, params.ePopup, null, params.mouseEvent, params.column, params.rowNode); }
44486 });
44487 };
44488 PopupService.prototype.calculatePointerAlign = function (e) {
44489 var parentRect = this.getParentRect();
44490 return {
44491 x: e.clientX - parentRect.left,
44492 y: e.clientY - parentRect.top
44493 };
44494 };
44495 PopupService.prototype.positionPopupByComponent = function (params) {
44496 var _this = this;
44497 var sourceRect = params.eventSource.getBoundingClientRect();
44498 var alignSide = params.alignSide || 'left';
44499 var position = params.position || 'over';
44500 var parentRect = this.getParentRect();
44501 var updatePosition = function () {
44502 var x = sourceRect.left - parentRect.left;
44503 if (alignSide === 'right') {
44504 x -= (params.ePopup.offsetWidth - sourceRect.width);
44505 }
44506 var y = position === 'over'
44507 ? (sourceRect.top - parentRect.top)
44508 : (sourceRect.top - parentRect.top + sourceRect.height);
44509 return { x: x, y: y };
44510 };
44511 this.positionPopup({
44512 ePopup: params.ePopup,
44513 nudgeX: params.nudgeX,
44514 nudgeY: params.nudgeY,
44515 keepWithinBounds: params.keepWithinBounds,
44516 shouldSetMaxHeight: params.shouldSetMaxHeight,
44517 updatePosition: updatePosition,
44518 postProcessCallback: function () { return _this.callPostProcessPopup(params.type, params.ePopup, params.eventSource, null, params.column, params.rowNode); }
44519 });
44520 };
44521 PopupService.prototype.callPostProcessPopup = function (type, ePopup, eventSource, mouseEvent, column, rowNode) {
44522 var callback = this.gridOptionsService.getCallback('postProcessPopup');
44523 if (callback) {
44524 var params = {
44525 column: column,
44526 rowNode: rowNode,
44527 ePopup: ePopup,
44528 type: type,
44529 eventSource: eventSource,
44530 mouseEvent: mouseEvent
44531 };
44532 callback(params);
44533 }
44534 };
44535 PopupService.prototype.positionPopup = function (params) {
44536 var _this = this;
44537 var ePopup = params.ePopup, keepWithinBounds = params.keepWithinBounds, nudgeX = params.nudgeX, nudgeY = params.nudgeY, skipObserver = params.skipObserver, shouldSetMaxHeight = params.shouldSetMaxHeight, updatePosition = params.updatePosition;
44538 var lastSize = { width: 0, height: 0 };
44539 var updatePopupPosition = function (fromResizeObserver) {
44540 if (fromResizeObserver === void 0) { fromResizeObserver = false; }
44541 var _a = updatePosition(), x = _a.x, y = _a.y;
44542 if (fromResizeObserver &&
44543 ePopup.clientWidth === lastSize.width &&
44544 ePopup.clientHeight === lastSize.height) {
44545 return;
44546 }
44547 lastSize.width = ePopup.clientWidth;
44548 lastSize.height = ePopup.clientHeight;
44549 if (nudgeX) {
44550 x += nudgeX;
44551 }
44552 if (nudgeY) {
44553 y += nudgeY;
44554 }
44555 _this.checkClearMaxHeight(ePopup, shouldSetMaxHeight);
44556 // if popup is overflowing to the bottom, move it up
44557 if (keepWithinBounds) {
44558 x = _this.keepXYWithinBounds(ePopup, x, DIRECTION.horizontal);
44559 y = _this.keepXYWithinBounds(ePopup, y, DIRECTION.vertical);
44560 }
44561 ePopup.style.left = x + "px";
44562 ePopup.style.top = y + "px";
44563 _this.checkSetMaxHeight(ePopup, y, shouldSetMaxHeight);
44564 if (params.postProcessCallback) {
44565 params.postProcessCallback();
44566 }
44567 };
44568 updatePopupPosition();
44569 // Mouse tracking will recalculate positioning when moving, so won't need to recalculate here
44570 if (!skipObserver) {
44571 // Since rendering popup contents can be asynchronous, use a resize observer to
44572 // reposition the popup after initial updates to the size of the contents
44573 var resizeObserverDestroyFunc_1 = this.resizeObserverService.observeResize(ePopup, function () { return updatePopupPosition(true); });
44574 // Only need to reposition when first open, so can clean up after a bit of time
44575 setTimeout(function () { return resizeObserverDestroyFunc_1(); }, PopupService_1.WAIT_FOR_POPUP_CONTENT_RESIZE);
44576 }
44577 };
44578 PopupService.prototype.getActivePopups = function () {
44579 return this.popupList.map(function (popup) { return popup.element; });
44580 };
44581 PopupService.prototype.getPopupList = function () {
44582 return this.popupList;
44583 };
44584 PopupService.prototype.getParentRect = function () {
44585 // subtract the popup parent borders, because popupParent.getBoundingClientRect
44586 // returns the rect outside the borders, but the 0,0 coordinate for absolute
44587 // positioning is inside the border, leading the popup to be off by the width
44588 // of the border
44589 var eDocument = this.gridOptionsService.getDocument();
44590 var popupParent = this.getPopupParent();
44591 if (popupParent === eDocument.body) {
44592 popupParent = eDocument.documentElement;
44593 }
44594 else if (getComputedStyle(popupParent).position === 'static') {
44595 popupParent = popupParent.offsetParent;
44596 }
44597 var style = getComputedStyle(popupParent);
44598 var bounds = popupParent.getBoundingClientRect();
44599 return {
44600 top: bounds.top + parseFloat(style.borderTopWidth) || 0,
44601 left: bounds.left + parseFloat(style.borderLeftWidth) || 0,
44602 right: bounds.right + parseFloat(style.borderRightWidth) || 0,
44603 bottom: bounds.bottom + parseFloat(style.borderBottomWidth) || 0,
44604 };
44605 };
44606 PopupService.prototype.keepXYWithinBounds = function (ePopup, position, direction) {
44607 var isVertical = direction === DIRECTION.vertical;
44608 var sizeProperty = isVertical ? 'clientHeight' : 'clientWidth';
44609 var anchorProperty = isVertical ? 'top' : 'left';
44610 var offsetProperty = isVertical ? 'offsetHeight' : 'offsetWidth';
44611 var scrollPositionProperty = isVertical ? 'scrollTop' : 'scrollLeft';
44612 var eDocument = this.gridOptionsService.getDocument();
44613 var docElement = eDocument.documentElement;
44614 var popupParent = this.getPopupParent();
44615 var parentRect = popupParent.getBoundingClientRect();
44616 var documentRect = eDocument.documentElement.getBoundingClientRect();
44617 var isBody = popupParent === eDocument.body;
44618 var offsetSize = ePopup[offsetProperty];
44619 var getSize = isVertical ? _utils_dom__WEBPACK_IMPORTED_MODULE_3__["getAbsoluteHeight"] : _utils_dom__WEBPACK_IMPORTED_MODULE_3__["getAbsoluteWidth"];
44620 var sizeOfParent = isBody ? (getSize(docElement) + docElement[scrollPositionProperty]) : popupParent[sizeProperty];
44621 if (isBody) {
44622 sizeOfParent -= Math.abs(documentRect[anchorProperty] - parentRect[anchorProperty]);
44623 }
44624 var max = sizeOfParent - offsetSize;
44625 return Math.min(Math.max(position, 0), Math.abs(max));
44626 };
44627 PopupService.prototype.keepPopupPositionedRelativeTo = function (params) {
44628 var _this = this;
44629 var eParent = this.getPopupParent();
44630 var parentRect = eParent.getBoundingClientRect();
44631 var sourceRect = params.element.getBoundingClientRect();
44632 var initialDiffTop = parentRect.top - sourceRect.top;
44633 var initialDiffLeft = parentRect.left - sourceRect.left;
44634 var lastDiffTop = initialDiffTop;
44635 var lastDiffLeft = initialDiffLeft;
44636 var topPx = params.ePopup.style.top;
44637 var top = parseInt(topPx.substring(0, topPx.length - 1), 10);
44638 var leftPx = params.ePopup.style.left;
44639 var left = parseInt(leftPx.substring(0, leftPx.length - 1), 10);
44640 return new _utils__WEBPACK_IMPORTED_MODULE_8__["AgPromise"](function (resolve) {
44641 _this.getFrameworkOverrides().setInterval(function () {
44642 var pRect = eParent.getBoundingClientRect();
44643 var sRect = params.element.getBoundingClientRect();
44644 var elementNotInDom = sRect.top == 0 && sRect.left == 0 && sRect.height == 0 && sRect.width == 0;
44645 if (elementNotInDom) {
44646 params.hidePopup();
44647 return;
44648 }
44649 var currentDiffTop = pRect.top - sRect.top;
44650 if (currentDiffTop != lastDiffTop) {
44651 var newTop = _this.keepXYWithinBounds(params.ePopup, top + initialDiffTop - currentDiffTop, DIRECTION.vertical);
44652 params.ePopup.style.top = newTop + "px";
44653 }
44654 lastDiffTop = currentDiffTop;
44655 var currentDiffLeft = pRect.left - sRect.left;
44656 if (currentDiffLeft != lastDiffLeft) {
44657 var newLeft = _this.keepXYWithinBounds(params.ePopup, left + initialDiffLeft - currentDiffLeft, DIRECTION.horizontal);
44658 params.ePopup.style.left = newLeft + "px";
44659 }
44660 lastDiffLeft = currentDiffLeft;
44661 }, 200).then(function (intervalId) {
44662 var result = function () {
44663 if (intervalId != null) {
44664 window.clearInterval(intervalId);
44665 }
44666 };
44667 resolve(result);
44668 });
44669 });
44670 };
44671 PopupService.prototype.addPopup = function (params) {
44672 var _a;
44673 var _this = this;
44674 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;
44675 var eDocument = this.gridOptionsService.getDocument();
44676 var destroyPositionTracker = new _utils__WEBPACK_IMPORTED_MODULE_8__["AgPromise"](function (resolve) { return resolve(function () { }); });
44677 if (!eDocument) {
44678 console.warn('AG Grid: could not find the document, document is empty');
44679 return { hideFunc: function () { }, stopAnchoringPromise: destroyPositionTracker };
44680 }
44681 var pos = this.popupList.findIndex(function (popup) { return popup.element === eChild; });
44682 if (pos !== -1) {
44683 var popup = this.popupList[pos];
44684 return { hideFunc: popup.hideFunc, stopAnchoringPromise: popup.stopAnchoringPromise };
44685 }
44686 var ePopupParent = this.getPopupParent();
44687 if (eChild.style.top == null) {
44688 eChild.style.top = '0px';
44689 }
44690 if (eChild.style.left == null) {
44691 eChild.style.left = '0px';
44692 }
44693 // add env CSS class to child, in case user provided a popup parent, which means
44694 // theme class may be missing
44695 var eWrapper = document.createElement('div');
44696 var allThemes = this.environment.getTheme().allThemes;
44697 if (allThemes.length) {
44698 (_a = eWrapper.classList).add.apply(_a, __spread(allThemes));
44699 }
44700 eWrapper.classList.add('ag-popup');
44701 eChild.classList.add(this.gridOptionsService.is('enableRtl') ? 'ag-rtl' : 'ag-ltr', 'ag-popup-child');
44702 if (!eChild.hasAttribute('role')) {
44703 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_9__["setAriaRole"])(eChild, 'dialog');
44704 }
44705 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_9__["setAriaLabel"])(eChild, ariaLabel);
44706 if (this.focusService.isKeyboardMode()) {
44707 eChild.classList.add(_focusService__WEBPACK_IMPORTED_MODULE_7__["FocusService"].AG_KEYBOARD_FOCUS);
44708 }
44709 eWrapper.appendChild(eChild);
44710 ePopupParent.appendChild(eWrapper);
44711 if (alwaysOnTop) {
44712 this.setAlwaysOnTop(eWrapper, true);
44713 }
44714 else {
44715 this.bringPopupToFront(eWrapper);
44716 }
44717 var popupHidden = false;
44718 var hidePopupOnKeyboardEvent = function (event) {
44719 if (!eWrapper.contains(eDocument.activeElement)) {
44720 return;
44721 }
44722 var key = event.key;
44723 if (key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_6__["KeyCode"].ESCAPE) {
44724 hidePopup({ keyboardEvent: event });
44725 }
44726 };
44727 var hidePopupOnMouseEvent = function (event) { return hidePopup({ mouseEvent: event }); };
44728 var hidePopupOnTouchEvent = function (event) { return hidePopup({ touchEvent: event }); };
44729 var hidePopup = function (popupParams) {
44730 if (popupParams === void 0) { popupParams = {}; }
44731 var mouseEvent = popupParams.mouseEvent, touchEvent = popupParams.touchEvent, keyboardEvent = popupParams.keyboardEvent;
44732 if (
44733 // we don't hide popup if the event was on the child, or any
44734 // children of this child
44735 _this.isEventFromCurrentPopup({ mouseEvent: mouseEvent, touchEvent: touchEvent }, eChild) ||
44736 // if the event to close is actually the open event, then ignore it
44737 _this.isEventSameChainAsOriginalEvent({ originalMouseEvent: click, mouseEvent: mouseEvent, touchEvent: touchEvent }) ||
44738 // this method should only be called once. the client can have different
44739 // paths, each one wanting to close, so this method may be called multiple times.
44740 popupHidden) {
44741 return;
44742 }
44743 popupHidden = true;
44744 ePopupParent.removeChild(eWrapper);
44745 eDocument.removeEventListener('keydown', hidePopupOnKeyboardEvent);
44746 eDocument.removeEventListener('mousedown', hidePopupOnMouseEvent);
44747 eDocument.removeEventListener('touchstart', hidePopupOnTouchEvent);
44748 eDocument.removeEventListener('contextmenu', hidePopupOnMouseEvent);
44749 _this.eventService.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DRAG_STARTED, hidePopupOnMouseEvent);
44750 if (closedCallback) {
44751 closedCallback(mouseEvent || touchEvent || keyboardEvent);
44752 }
44753 _this.popupList = _this.popupList.filter(function (popup) { return popup.element !== eChild; });
44754 if (destroyPositionTracker) {
44755 destroyPositionTracker.then(function (destroyFunc) { return destroyFunc && destroyFunc(); });
44756 }
44757 };
44758 if (afterGuiAttached) {
44759 afterGuiAttached({ hidePopup: hidePopup });
44760 }
44761 // if we add these listeners now, then the current mouse
44762 // click will be included, which we don't want
44763 window.setTimeout(function () {
44764 if (closeOnEsc) {
44765 eDocument.addEventListener('keydown', hidePopupOnKeyboardEvent);
44766 }
44767 if (modal) {
44768 eDocument.addEventListener('mousedown', hidePopupOnMouseEvent);
44769 _this.eventService.addEventListener(_events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_DRAG_STARTED, hidePopupOnMouseEvent);
44770 eDocument.addEventListener('touchstart', hidePopupOnTouchEvent);
44771 eDocument.addEventListener('contextmenu', hidePopupOnMouseEvent);
44772 }
44773 }, 0);
44774 if (positionCallback) {
44775 positionCallback();
44776 }
44777 if (anchorToElement) {
44778 // keeps popup positioned under created, eg if context menu, if user scrolls
44779 // using touchpad and the cell moves, it moves the popup to keep it with the cell.
44780 destroyPositionTracker = this.keepPopupPositionedRelativeTo({
44781 element: anchorToElement,
44782 ePopup: eChild,
44783 hidePopup: hidePopup
44784 });
44785 }
44786 this.popupList.push({
44787 element: eChild,
44788 wrapper: eWrapper,
44789 hideFunc: hidePopup,
44790 stopAnchoringPromise: destroyPositionTracker,
44791 instanceId: instanceIdSeq++,
44792 isAnchored: !!anchorToElement
44793 });
44794 return {
44795 hideFunc: hidePopup,
44796 stopAnchoringPromise: destroyPositionTracker
44797 };
44798 };
44799 PopupService.prototype.hasAnchoredPopup = function () {
44800 return this.popupList.some(function (popup) { return popup.isAnchored; });
44801 };
44802 PopupService.prototype.isEventFromCurrentPopup = function (params, target) {
44803 var mouseEvent = params.mouseEvent, touchEvent = params.touchEvent;
44804 var event = mouseEvent ? mouseEvent : touchEvent;
44805 if (!event) {
44806 return false;
44807 }
44808 var indexOfThisChild = this.popupList.findIndex(function (popup) { return popup.element === target; });
44809 if (indexOfThisChild === -1) {
44810 return false;
44811 }
44812 for (var i = indexOfThisChild; i < this.popupList.length; i++) {
44813 var popup = this.popupList[i];
44814 if (Object(_utils_event__WEBPACK_IMPORTED_MODULE_5__["isElementInEventPath"])(popup.element, event)) {
44815 return true;
44816 }
44817 }
44818 // if the user did not write their own Custom Element to be rendered as popup
44819 // and this component has an additional popup element, they should have the
44820 // `ag-custom-component-popup` class to be detected as part of the Custom Component
44821 return this.isElementWithinCustomPopup(event.target);
44822 };
44823 PopupService.prototype.isElementWithinCustomPopup = function (el) {
44824 var eDocument = this.gridOptionsService.getDocument();
44825 while (el && el !== eDocument.body) {
44826 if (el.classList.contains('ag-custom-component-popup') || el.parentElement === null) {
44827 return true;
44828 }
44829 el = el.parentElement;
44830 }
44831 return false;
44832 };
44833 // in some browsers, the context menu event can be fired before the click event, which means
44834 // the context menu event could open the popup, but then the click event closes it straight away.
44835 PopupService.prototype.isEventSameChainAsOriginalEvent = function (params) {
44836 var originalMouseEvent = params.originalMouseEvent, mouseEvent = params.mouseEvent, touchEvent = params.touchEvent;
44837 // we check the coordinates of the event, to see if it's the same event. there is a 1 / 1000 chance that
44838 // the event is a different event, however that is an edge case that is not very relevant (the user clicking
44839 // twice on the same location isn't a normal path).
44840 // event could be mouse event or touch event.
44841 var mouseEventOrTouch = null;
44842 if (mouseEvent) {
44843 // mouse event can be used direction, it has coordinates
44844 mouseEventOrTouch = mouseEvent;
44845 }
44846 else if (touchEvent) {
44847 // touch event doesn't have coordinates, need it's touch object
44848 mouseEventOrTouch = touchEvent.touches[0];
44849 }
44850 if (mouseEventOrTouch && originalMouseEvent) {
44851 // for x, allow 4px margin, to cover iPads, where touch (which opens menu) is followed
44852 // by browser click (when you finger up, touch is interrupted as click in browser)
44853 var screenX_1 = mouseEvent ? mouseEvent.screenX : 0;
44854 var screenY_1 = mouseEvent ? mouseEvent.screenY : 0;
44855 var xMatch = Math.abs(originalMouseEvent.screenX - screenX_1) < 5;
44856 var yMatch = Math.abs(originalMouseEvent.screenY - screenY_1) < 5;
44857 if (xMatch && yMatch) {
44858 return true;
44859 }
44860 }
44861 return false;
44862 };
44863 PopupService.prototype.getWrapper = function (ePopup) {
44864 while (!ePopup.classList.contains('ag-popup') && ePopup.parentElement) {
44865 ePopup = ePopup.parentElement;
44866 }
44867 return ePopup.classList.contains('ag-popup') ? ePopup : null;
44868 };
44869 PopupService.prototype.setAlwaysOnTop = function (ePopup, alwaysOnTop) {
44870 var eWrapper = this.getWrapper(ePopup);
44871 if (!eWrapper) {
44872 return;
44873 }
44874 eWrapper.classList.toggle('ag-always-on-top', !!alwaysOnTop);
44875 if (alwaysOnTop) {
44876 this.bringPopupToFront(eWrapper);
44877 }
44878 };
44879 PopupService.prototype.bringPopupToFront = function (ePopup) {
44880 var parent = this.getPopupParent();
44881 var popupList = Array.prototype.slice.call(parent.querySelectorAll('.ag-popup'));
44882 var popupLen = popupList.length;
44883 var alwaysOnTopList = Array.prototype.slice.call(parent.querySelectorAll('.ag-popup.ag-always-on-top'));
44884 var onTopLength = alwaysOnTopList.length;
44885 var eWrapper = this.getWrapper(ePopup);
44886 if (!eWrapper || popupLen <= 1 || !parent.contains(ePopup)) {
44887 return;
44888 }
44889 var pos = popupList.indexOf(eWrapper);
44890 var innerEls = eWrapper.querySelectorAll('div');
44891 var innerElsScrollMap = [];
44892 innerEls.forEach(function (el) {
44893 if (el.scrollTop !== 0) {
44894 innerElsScrollMap.push([el, el.scrollTop]);
44895 }
44896 });
44897 if (onTopLength) {
44898 var isPopupAlwaysOnTop = eWrapper.classList.contains('ag-always-on-top');
44899 if (isPopupAlwaysOnTop) {
44900 if (pos !== popupLen - 1) {
44901 Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(alwaysOnTopList).insertAdjacentElement('afterend', eWrapper);
44902 }
44903 }
44904 else if (pos !== popupLen - onTopLength - 1) {
44905 alwaysOnTopList[0].insertAdjacentElement('beforebegin', eWrapper);
44906 }
44907 }
44908 else if (pos !== popupLen - 1) {
44909 Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(popupList).insertAdjacentElement('afterend', eWrapper);
44910 }
44911 while (innerElsScrollMap.length) {
44912 var currentEl = innerElsScrollMap.pop();
44913 currentEl[0].scrollTop = currentEl[1];
44914 }
44915 var params = {
44916 type: 'popupToFront',
44917 api: this.gridOptionsService.api,
44918 columnApi: this.gridOptionsService.columnApi,
44919 eWrapper: eWrapper
44920 };
44921 this.eventService.dispatchEvent(params);
44922 };
44923 PopupService.prototype.checkClearMaxHeight = function (ePopup, shouldSetMaxHeight) {
44924 if (shouldSetMaxHeight) {
44925 // positionPopup can be called multiple times, so need to clear before bounds check
44926 ePopup.style.removeProperty('max-height');
44927 }
44928 };
44929 PopupService.prototype.checkSetMaxHeight = function (ePopup, y, shouldSetMaxHeight) {
44930 if (shouldSetMaxHeight && getComputedStyle(ePopup).maxHeight === '100%') {
44931 // max height could be overridden, so only set if the default (100%)
44932 ePopup.style.maxHeight = "calc(100% - " + y + "px)";
44933 }
44934 };
44935 var PopupService_1;
44936 PopupService.WAIT_FOR_POPUP_CONTENT_RESIZE = 200;
44937 __decorate([
44938 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
44939 ], PopupService.prototype, "focusService", void 0);
44940 __decorate([
44941 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
44942 ], PopupService.prototype, "ctrlsService", void 0);
44943 __decorate([
44944 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('resizeObserverService')
44945 ], PopupService.prototype, "resizeObserverService", void 0);
44946 __decorate([
44947 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
44948 ], PopupService.prototype, "postConstruct", null);
44949 PopupService = PopupService_1 = __decorate([
44950 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('popupService')
44951 ], PopupService);
44952 return PopupService;
44953}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
44954
44955
44956
44957/***/ }),
44958/* 201 */
44959/***/ (function(module, __webpack_exports__, __webpack_require__) {
44960
44961"use strict";
44962__webpack_require__.r(__webpack_exports__);
44963/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FocusService", function() { return FocusService; });
44964/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
44965/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
44966/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
44967/* harmony import */ var _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(64);
44968/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
44969/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
44970/* harmony import */ var _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(124);
44971/* harmony import */ var _headerRendering_cells_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(159);
44972/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(19);
44973/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(45);
44974/* harmony import */ var _widgets_tabGuardCtrl__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(196);
44975/**
44976 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
44977 * @version v29.2.0
44978 * @link https://www.ag-grid.com/
44979 * @license MIT
44980 */
44981var __extends = (undefined && undefined.__extends) || (function () {
44982 var extendStatics = function (d, b) {
44983 extendStatics = Object.setPrototypeOf ||
44984 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
44985 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
44986 return extendStatics(d, b);
44987 };
44988 return function (d, b) {
44989 extendStatics(d, b);
44990 function __() { this.constructor = d; }
44991 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44992 };
44993})();
44994var __assign = (undefined && undefined.__assign) || function () {
44995 __assign = Object.assign || function(t) {
44996 for (var s, i = 1, n = arguments.length; i < n; i++) {
44997 s = arguments[i];
44998 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
44999 t[p] = s[p];
45000 }
45001 return t;
45002 };
45003 return __assign.apply(this, arguments);
45004};
45005var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
45006 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
45007 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
45008 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;
45009 return c > 3 && r && Object.defineProperty(target, key, r), r;
45010};
45011var __read = (undefined && undefined.__read) || function (o, n) {
45012 var m = typeof Symbol === "function" && o[Symbol.iterator];
45013 if (!m) return o;
45014 var i = m.call(o), r, ar = [], e;
45015 try {
45016 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
45017 }
45018 catch (error) { e = { error: error }; }
45019 finally {
45020 try {
45021 if (r && !r.done && (m = i["return"])) m.call(i);
45022 }
45023 finally { if (e) throw e.error; }
45024 }
45025 return ar;
45026};
45027var __spread = (undefined && undefined.__spread) || function () {
45028 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
45029 return ar;
45030};
45031
45032
45033
45034
45035
45036
45037
45038
45039
45040
45041
45042var FocusService = /** @class */ (function (_super) {
45043 __extends(FocusService, _super);
45044 function FocusService() {
45045 return _super !== null && _super.apply(this, arguments) || this;
45046 }
45047 FocusService_1 = FocusService;
45048 /**
45049 * Adds a gridCore to the list of the gridCores monitoring Keyboard Mode
45050 * in a specific HTMLDocument.
45051 *
45052 * @param doc {Document} - The Document containing the gridCore.
45053 * @param gridCore {GridComp} - The GridCore to be monitored.
45054 */
45055 FocusService.addKeyboardModeEvents = function (doc, controller) {
45056 var docControllers = FocusService_1.instancesMonitored.get(doc);
45057 if (docControllers && docControllers.length > 0) {
45058 if (docControllers.indexOf(controller) === -1) {
45059 docControllers.push(controller);
45060 }
45061 }
45062 else {
45063 FocusService_1.instancesMonitored.set(doc, [controller]);
45064 doc.addEventListener('keydown', FocusService_1.toggleKeyboardMode);
45065 doc.addEventListener('mousedown', FocusService_1.toggleKeyboardMode);
45066 }
45067 };
45068 /**
45069 * Removes a gridCore from the list of the gridCores monitoring Keyboard Mode
45070 * in a specific HTMLDocument.
45071 *
45072 * @param doc {Document} - The Document containing the gridCore.
45073 * @param gridCore {GridComp} - The GridCore to be removed.
45074 */
45075 FocusService.removeKeyboardModeEvents = function (doc, controller) {
45076 var docControllers = FocusService_1.instancesMonitored.get(doc);
45077 var newControllers = [];
45078 if (docControllers && docControllers.length) {
45079 newControllers = __spread(docControllers).filter(function (currentGridCore) { return currentGridCore !== controller; });
45080 FocusService_1.instancesMonitored.set(doc, newControllers);
45081 }
45082 if (newControllers.length === 0) {
45083 doc.removeEventListener('keydown', FocusService_1.toggleKeyboardMode);
45084 doc.removeEventListener('mousedown', FocusService_1.toggleKeyboardMode);
45085 }
45086 };
45087 /**
45088 * This method will be called by `keydown` and `mousedown` events on all Documents monitoring
45089 * KeyboardMode. It will then fire a KEYBOARD_FOCUS, MOUSE_FOCUS on each gridCore present in
45090 * the Document allowing each gridCore to maintain a state for KeyboardMode.
45091 *
45092 * @param event {KeyboardEvent | MouseEvent | TouchEvent} - The event triggered.
45093 */
45094 FocusService.toggleKeyboardMode = function (event) {
45095 var isKeyboardActive = FocusService_1.keyboardModeActive;
45096 var isKeyboardEvent = event.type === 'keydown';
45097 if (isKeyboardEvent) {
45098 // the following keys should not toggle keyboard mode.
45099 if (event.ctrlKey || event.metaKey || event.altKey) {
45100 return;
45101 }
45102 }
45103 if (isKeyboardActive && isKeyboardEvent || !isKeyboardActive && !isKeyboardEvent) {
45104 return;
45105 }
45106 FocusService_1.keyboardModeActive = isKeyboardEvent;
45107 var doc = event.target.ownerDocument;
45108 if (!doc) {
45109 return;
45110 }
45111 var controllersForDoc = FocusService_1.instancesMonitored.get(doc);
45112 if (controllersForDoc) {
45113 controllersForDoc.forEach(function (controller) {
45114 controller.dispatchEvent({ type: isKeyboardEvent ? _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_KEYBOARD_FOCUS : _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_MOUSE_FOCUS });
45115 });
45116 }
45117 };
45118 FocusService.prototype.init = function () {
45119 var _this = this;
45120 var clearFocusedCellListener = this.clearFocusedCell.bind(this);
45121 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED, clearFocusedCellListener);
45122 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_NEW_COLUMNS_LOADED, this.onColumnEverythingChanged.bind(this));
45123 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_GROUP_OPENED, clearFocusedCellListener);
45124 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, clearFocusedCellListener);
45125 this.ctrlsService.whenReady(function (p) {
45126 _this.gridCtrl = p.gridCtrl;
45127 var doc = _this.gridOptionsService.getDocument();
45128 FocusService_1.addKeyboardModeEvents(doc, _this.gridCtrl);
45129 _this.addDestroyFunc(function () { return _this.unregisterGridCompController(_this.gridCtrl); });
45130 });
45131 };
45132 FocusService.prototype.unregisterGridCompController = function (gridCompController) {
45133 var doc = this.gridOptionsService.getDocument();
45134 FocusService_1.removeKeyboardModeEvents(doc, gridCompController);
45135 };
45136 FocusService.prototype.onColumnEverythingChanged = function () {
45137 // if the columns change, check and see if this column still exists. if it does, then
45138 // we can keep the focused cell. if it doesn't, then we need to drop the focused cell.
45139 if (!this.focusedCellPosition) {
45140 return;
45141 }
45142 var col = this.focusedCellPosition.column;
45143 var colFromColumnModel = this.columnModel.getGridColumn(col.getId());
45144 if (col !== colFromColumnModel) {
45145 this.clearFocusedCell();
45146 }
45147 };
45148 FocusService.prototype.isKeyboardMode = function () {
45149 return FocusService_1.keyboardModeActive;
45150 };
45151 // we check if the browser is focusing something, and if it is, and
45152 // it's the cell we think is focused, then return the cell. so this
45153 // methods returns the cell if a) we think it has focus and b) the
45154 // browser thinks it has focus. this then returns nothing if we
45155 // first focus a cell, then second click outside the grid, as then the
45156 // grid cell will still be focused as far as the grid is concerned,
45157 // however the browser focus will have moved somewhere else.
45158 FocusService.prototype.getFocusCellToUseAfterRefresh = function () {
45159 var eDocument = this.gridOptionsService.getDocument();
45160 if (this.gridOptionsService.is('suppressFocusAfterRefresh') || !this.focusedCellPosition) {
45161 return null;
45162 }
45163 // we check that the browser is actually focusing on the grid, if it is not, then
45164 // we have nothing to worry about. we check for ROW data, as this covers both focused Rows (for Full Width Rows)
45165 // and Cells (covers cells as cells live in rows)
45166 if (this.isDomDataMissingInHierarchy(eDocument.activeElement, _rendering_row_rowCtrl__WEBPACK_IMPORTED_MODULE_6__["RowCtrl"].DOM_DATA_KEY_ROW_CTRL)) {
45167 return null;
45168 }
45169 return this.focusedCellPosition;
45170 };
45171 FocusService.prototype.getFocusHeaderToUseAfterRefresh = function () {
45172 var eDocument = this.gridOptionsService.getDocument();
45173 if (this.gridOptionsService.is('suppressFocusAfterRefresh') || !this.focusedHeaderPosition) {
45174 return null;
45175 }
45176 // we check that the browser is actually focusing on the grid, if it is not, then
45177 // we have nothing to worry about
45178 if (this.isDomDataMissingInHierarchy(eDocument.activeElement, _headerRendering_cells_abstractCell_abstractHeaderCellCtrl__WEBPACK_IMPORTED_MODULE_7__["AbstractHeaderCellCtrl"].DOM_DATA_KEY_HEADER_CTRL)) {
45179 return null;
45180 }
45181 return this.focusedHeaderPosition;
45182 };
45183 FocusService.prototype.isDomDataMissingInHierarchy = function (eBrowserCell, key) {
45184 var ePointer = eBrowserCell;
45185 while (ePointer) {
45186 var data = this.gridOptionsService.getDomData(ePointer, key);
45187 if (data) {
45188 return false;
45189 }
45190 ePointer = ePointer.parentNode;
45191 }
45192 return true;
45193 };
45194 FocusService.prototype.getFocusedCell = function () {
45195 return this.focusedCellPosition;
45196 };
45197 FocusService.prototype.getFocusEventParams = function () {
45198 var _a = this.focusedCellPosition, rowIndex = _a.rowIndex, rowPinned = _a.rowPinned, column = _a.column;
45199 var params = {
45200 rowIndex: rowIndex,
45201 rowPinned: rowPinned,
45202 column: column,
45203 isFullWidthCell: false
45204 };
45205 var rowCtrl = this.rowRenderer.getRowByPosition({ rowIndex: rowIndex, rowPinned: rowPinned });
45206 if (rowCtrl) {
45207 params.isFullWidthCell = rowCtrl.isFullWidth();
45208 }
45209 return params;
45210 };
45211 FocusService.prototype.clearFocusedCell = function () {
45212 if (this.focusedCellPosition == null) {
45213 return;
45214 }
45215 var event = __assign({ type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_CELL_FOCUS_CLEARED }, this.getFocusEventParams());
45216 this.focusedCellPosition = null;
45217 this.eventService.dispatchEvent(event);
45218 };
45219 FocusService.prototype.setFocusedCell = function (params) {
45220 var column = params.column, rowIndex = params.rowIndex, rowPinned = params.rowPinned, _a = params.forceBrowserFocus, forceBrowserFocus = _a === void 0 ? false : _a, _b = params.preventScrollOnBrowserFocus, preventScrollOnBrowserFocus = _b === void 0 ? false : _b;
45221 var gridColumn = this.columnModel.getGridColumn(column);
45222 // if column doesn't exist, then blank the focused cell and return. this can happen when user sets new columns,
45223 // and the focused cell is in a column that no longer exists. after columns change, the grid refreshes and tries
45224 // to re-focus the focused cell.
45225 if (!gridColumn) {
45226 this.focusedCellPosition = null;
45227 return;
45228 }
45229 this.focusedCellPosition = gridColumn ? {
45230 rowIndex: rowIndex,
45231 rowPinned: Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["makeNull"])(rowPinned),
45232 column: gridColumn
45233 } : null;
45234 var event = __assign(__assign({ type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_CELL_FOCUSED }, this.getFocusEventParams()), { forceBrowserFocus: forceBrowserFocus,
45235 preventScrollOnBrowserFocus: preventScrollOnBrowserFocus, floating: null });
45236 this.eventService.dispatchEvent(event);
45237 };
45238 FocusService.prototype.isCellFocused = function (cellPosition) {
45239 if (this.focusedCellPosition == null) {
45240 return false;
45241 }
45242 return this.focusedCellPosition.column === cellPosition.column &&
45243 this.isRowFocused(cellPosition.rowIndex, cellPosition.rowPinned);
45244 };
45245 FocusService.prototype.isRowNodeFocused = function (rowNode) {
45246 return this.isRowFocused(rowNode.rowIndex, rowNode.rowPinned);
45247 };
45248 FocusService.prototype.isHeaderWrapperFocused = function (headerCtrl) {
45249 if (this.focusedHeaderPosition == null) {
45250 return false;
45251 }
45252 var column = headerCtrl.getColumnGroupChild();
45253 var headerRowIndex = headerCtrl.getRowIndex();
45254 var pinned = headerCtrl.getPinned();
45255 var _a = this.focusedHeaderPosition, focusedColumn = _a.column, focusedHeaderRowIndex = _a.headerRowIndex;
45256 return column === focusedColumn &&
45257 headerRowIndex === focusedHeaderRowIndex &&
45258 pinned == focusedColumn.getPinned();
45259 };
45260 FocusService.prototype.clearFocusedHeader = function () {
45261 this.focusedHeaderPosition = null;
45262 };
45263 FocusService.prototype.getFocusedHeader = function () {
45264 return this.focusedHeaderPosition;
45265 };
45266 FocusService.prototype.setFocusedHeader = function (headerRowIndex, column) {
45267 this.focusedHeaderPosition = { headerRowIndex: headerRowIndex, column: column };
45268 };
45269 FocusService.prototype.focusHeaderPosition = function (params) {
45270 var direction = params.direction, fromTab = params.fromTab, allowUserOverride = params.allowUserOverride, event = params.event;
45271 var headerPosition = params.headerPosition;
45272 if (allowUserOverride) {
45273 var currentPosition = this.getFocusedHeader();
45274 var headerRowCount = this.headerNavigationService.getHeaderRowCount();
45275 if (fromTab) {
45276 var userFunc = this.gridOptionsService.getCallback('tabToNextHeader');
45277 if (userFunc) {
45278 var params_1 = {
45279 backwards: direction === 'Before',
45280 previousHeaderPosition: currentPosition,
45281 nextHeaderPosition: headerPosition,
45282 headerRowCount: headerRowCount,
45283 };
45284 headerPosition = userFunc(params_1);
45285 }
45286 }
45287 else {
45288 var userFunc = this.gridOptionsService.getCallback('navigateToNextHeader');
45289 if (userFunc && event) {
45290 var params_2 = {
45291 key: event.key,
45292 previousHeaderPosition: currentPosition,
45293 nextHeaderPosition: headerPosition,
45294 headerRowCount: headerRowCount,
45295 event: event,
45296 };
45297 headerPosition = userFunc(params_2);
45298 }
45299 }
45300 }
45301 if (!headerPosition) {
45302 return false;
45303 }
45304 if (headerPosition.headerRowIndex === -1) {
45305 return this.focusGridView(headerPosition.column);
45306 }
45307 this.headerNavigationService.scrollToColumn(headerPosition.column, direction);
45308 var headerRowContainerCtrl = this.ctrlsService.getHeaderRowContainerCtrl(headerPosition.column.getPinned());
45309 // this will automatically call the setFocusedHeader method above
45310 var focusSuccess = headerRowContainerCtrl.focusHeader(headerPosition.headerRowIndex, headerPosition.column, event);
45311 return focusSuccess;
45312 };
45313 FocusService.prototype.focusFirstHeader = function () {
45314 var firstColumn = this.columnModel.getAllDisplayedColumns()[0];
45315 if (!firstColumn) {
45316 return false;
45317 }
45318 if (firstColumn.getParent()) {
45319 firstColumn = this.columnModel.getColumnGroupAtLevel(firstColumn, 0);
45320 }
45321 return this.focusHeaderPosition({
45322 headerPosition: { headerRowIndex: 0, column: firstColumn }
45323 });
45324 };
45325 FocusService.prototype.focusLastHeader = function (event) {
45326 var headerRowIndex = this.headerNavigationService.getHeaderRowCount() - 1;
45327 var column = Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["last"])(this.columnModel.getAllDisplayedColumns());
45328 return this.focusHeaderPosition({
45329 headerPosition: { headerRowIndex: headerRowIndex, column: column },
45330 event: event
45331 });
45332 };
45333 FocusService.prototype.isAnyCellFocused = function () {
45334 return !!this.focusedCellPosition;
45335 };
45336 FocusService.prototype.isRowFocused = function (rowIndex, floating) {
45337 if (this.focusedCellPosition == null) {
45338 return false;
45339 }
45340 return this.focusedCellPosition.rowIndex === rowIndex && this.focusedCellPosition.rowPinned === Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["makeNull"])(floating);
45341 };
45342 FocusService.prototype.findFocusableElements = function (rootNode, exclude, onlyUnmanaged) {
45343 if (onlyUnmanaged === void 0) { onlyUnmanaged = false; }
45344 var focusableString = _utils_dom__WEBPACK_IMPORTED_MODULE_9__["FOCUSABLE_SELECTOR"];
45345 var excludeString = _utils_dom__WEBPACK_IMPORTED_MODULE_9__["FOCUSABLE_EXCLUDE"];
45346 if (exclude) {
45347 excludeString += ', ' + exclude;
45348 }
45349 if (onlyUnmanaged) {
45350 excludeString += ', [tabindex="-1"]';
45351 }
45352 var nodes = Array.prototype.slice.apply(rootNode.querySelectorAll(focusableString));
45353 var excludeNodes = Array.prototype.slice.apply(rootNode.querySelectorAll(excludeString));
45354 if (!excludeNodes.length) {
45355 return nodes;
45356 }
45357 var diff = function (a, b) { return a.filter(function (element) { return b.indexOf(element) === -1; }); };
45358 return diff(nodes, excludeNodes);
45359 };
45360 FocusService.prototype.focusInto = function (rootNode, up, onlyUnmanaged) {
45361 if (up === void 0) { up = false; }
45362 if (onlyUnmanaged === void 0) { onlyUnmanaged = false; }
45363 var focusableElements = this.findFocusableElements(rootNode, null, onlyUnmanaged);
45364 var toFocus = up ? Object(_utils_array__WEBPACK_IMPORTED_MODULE_8__["last"])(focusableElements) : focusableElements[0];
45365 if (toFocus) {
45366 toFocus.focus();
45367 return true;
45368 }
45369 return false;
45370 };
45371 FocusService.prototype.findFocusableElementBeforeTabGuard = function (rootNode, referenceElement) {
45372 if (!referenceElement) {
45373 return null;
45374 }
45375 var focusableElements = this.findFocusableElements(rootNode);
45376 var referenceIndex = focusableElements.indexOf(referenceElement);
45377 if (referenceIndex === -1) {
45378 return null;
45379 }
45380 var lastTabGuardIndex = -1;
45381 for (var i = referenceIndex - 1; i >= 0; i--) {
45382 if (focusableElements[i].classList.contains(_widgets_tabGuardCtrl__WEBPACK_IMPORTED_MODULE_10__["TabGuardClassNames"].TAB_GUARD_TOP)) {
45383 lastTabGuardIndex = i;
45384 break;
45385 }
45386 }
45387 if (lastTabGuardIndex <= 0) {
45388 return null;
45389 }
45390 return focusableElements[lastTabGuardIndex - 1];
45391 };
45392 FocusService.prototype.findNextFocusableElement = function (rootNode, onlyManaged, backwards) {
45393 if (rootNode === void 0) { rootNode = this.eGridDiv; }
45394 var focusable = this.findFocusableElements(rootNode, onlyManaged ? ':not([tabindex="-1"])' : null);
45395 var eDocument = this.gridOptionsService.getDocument();
45396 var activeEl = eDocument.activeElement;
45397 var currentIndex;
45398 if (onlyManaged) {
45399 currentIndex = focusable.findIndex(function (el) { return el.contains(activeEl); });
45400 }
45401 else {
45402 currentIndex = focusable.indexOf(activeEl);
45403 }
45404 var nextIndex = currentIndex + (backwards ? -1 : 1);
45405 if (nextIndex < 0 || nextIndex >= focusable.length) {
45406 return null;
45407 }
45408 return focusable[nextIndex];
45409 };
45410 FocusService.prototype.isTargetUnderManagedComponent = function (rootNode, target) {
45411 if (!target) {
45412 return false;
45413 }
45414 var managedContainers = rootNode.querySelectorAll("." + _widgets_managedFocusFeature__WEBPACK_IMPORTED_MODULE_3__["ManagedFocusFeature"].FOCUS_MANAGED_CLASS);
45415 if (!managedContainers.length) {
45416 return false;
45417 }
45418 for (var i = 0; i < managedContainers.length; i++) {
45419 if (managedContainers[i].contains(target)) {
45420 return true;
45421 }
45422 }
45423 return false;
45424 };
45425 FocusService.prototype.findTabbableParent = function (node, limit) {
45426 if (limit === void 0) { limit = 5; }
45427 var counter = 0;
45428 while (node && Object(_utils_browser__WEBPACK_IMPORTED_MODULE_4__["getTabIndex"])(node) === null && ++counter <= limit) {
45429 node = node.parentElement;
45430 }
45431 if (Object(_utils_browser__WEBPACK_IMPORTED_MODULE_4__["getTabIndex"])(node) === null) {
45432 return null;
45433 }
45434 return node;
45435 };
45436 FocusService.prototype.focusGridView = function (column, backwards) {
45437 // if suppressCellFocus is `true`, it means the user does not want to
45438 // navigate between the cells using tab. Instead, we put focus on either
45439 // the header or after the grid, depending on whether tab or shift-tab was pressed.
45440 if (this.gridOptionsService.is('suppressCellFocus')) {
45441 if (backwards) {
45442 return this.focusLastHeader();
45443 }
45444 return this.focusNextGridCoreContainer(false);
45445 }
45446 var nextRow = backwards
45447 ? this.rowPositionUtils.getLastRow()
45448 : this.rowPositionUtils.getFirstRow();
45449 if (!nextRow) {
45450 return false;
45451 }
45452 var rowIndex = nextRow.rowIndex, rowPinned = nextRow.rowPinned;
45453 var focusedHeader = this.getFocusedHeader();
45454 if (!column && focusedHeader) {
45455 column = focusedHeader.column;
45456 }
45457 if (rowIndex == null || !column) {
45458 return false;
45459 }
45460 this.navigationService.ensureCellVisible({ rowIndex: rowIndex, column: column, rowPinned: rowPinned });
45461 this.setFocusedCell({
45462 rowIndex: rowIndex,
45463 column: column,
45464 rowPinned: Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["makeNull"])(rowPinned),
45465 forceBrowserFocus: true
45466 });
45467 if (this.rangeService) {
45468 var cellPosition = { rowIndex: rowIndex, rowPinned: rowPinned, column: column };
45469 this.rangeService.setRangeToCell(cellPosition);
45470 }
45471 return true;
45472 };
45473 FocusService.prototype.focusNextGridCoreContainer = function (backwards) {
45474 if (this.gridCtrl.focusNextInnerContainer(backwards)) {
45475 return true;
45476 }
45477 if (!backwards && !this.gridCtrl.isDetailGrid()) {
45478 this.gridCtrl.forceFocusOutOfContainer();
45479 }
45480 return false;
45481 };
45482 var FocusService_1;
45483 FocusService.AG_KEYBOARD_FOCUS = 'ag-keyboard-focus';
45484 FocusService.keyboardModeActive = false;
45485 FocusService.instancesMonitored = new Map();
45486 __decorate([
45487 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('eGridDiv')
45488 ], FocusService.prototype, "eGridDiv", void 0);
45489 __decorate([
45490 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
45491 ], FocusService.prototype, "columnModel", void 0);
45492 __decorate([
45493 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('headerNavigationService')
45494 ], FocusService.prototype, "headerNavigationService", void 0);
45495 __decorate([
45496 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
45497 ], FocusService.prototype, "rowRenderer", void 0);
45498 __decorate([
45499 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowPositionUtils')
45500 ], FocusService.prototype, "rowPositionUtils", void 0);
45501 __decorate([
45502 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('rangeService')
45503 ], FocusService.prototype, "rangeService", void 0);
45504 __decorate([
45505 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('navigationService')
45506 ], FocusService.prototype, "navigationService", void 0);
45507 __decorate([
45508 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
45509 ], FocusService.prototype, "ctrlsService", void 0);
45510 __decorate([
45511 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
45512 ], FocusService.prototype, "init", null);
45513 FocusService = FocusService_1 = __decorate([
45514 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('focusService')
45515 ], FocusService);
45516 return FocusService;
45517}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
45518
45519
45520
45521/***/ }),
45522/* 202 */
45523/***/ (function(module, __webpack_exports__, __webpack_require__) {
45524
45525"use strict";
45526__webpack_require__.r(__webpack_exports__);
45527/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualList", function() { return VirtualList; });
45528/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
45529/* harmony import */ var _componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
45530/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41);
45531/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48);
45532/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
45533/* harmony import */ var _tabGuardComp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(195);
45534/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(26);
45535/**
45536 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
45537 * @version v29.2.0
45538 * @link https://www.ag-grid.com/
45539 * @license MIT
45540 */
45541var __extends = (undefined && undefined.__extends) || (function () {
45542 var extendStatics = function (d, b) {
45543 extendStatics = Object.setPrototypeOf ||
45544 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
45545 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
45546 return extendStatics(d, b);
45547 };
45548 return function (d, b) {
45549 extendStatics(d, b);
45550 function __() { this.constructor = d; }
45551 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45552 };
45553})();
45554var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
45555 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
45556 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
45557 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;
45558 return c > 3 && r && Object.defineProperty(target, key, r), r;
45559};
45560
45561
45562
45563
45564
45565
45566
45567var VirtualList = /** @class */ (function (_super) {
45568 __extends(VirtualList, _super);
45569 function VirtualList(cssIdentifier, ariaRole, listName) {
45570 if (cssIdentifier === void 0) { cssIdentifier = 'default'; }
45571 if (ariaRole === void 0) { ariaRole = 'listbox'; }
45572 var _this = _super.call(this, VirtualList.getTemplate(cssIdentifier)) || this;
45573 _this.cssIdentifier = cssIdentifier;
45574 _this.ariaRole = ariaRole;
45575 _this.listName = listName;
45576 _this.renderedRows = new Map();
45577 _this.rowHeight = 20;
45578 return _this;
45579 }
45580 VirtualList.prototype.postConstruct = function () {
45581 var _this = this;
45582 this.addScrollListener();
45583 this.rowHeight = this.getItemHeight();
45584 this.addResizeObserver();
45585 this.initialiseTabGuard({
45586 onFocusIn: function (e) { return _this.onFocusIn(e); },
45587 onFocusOut: function (e) { return _this.onFocusOut(e); },
45588 focusInnerElement: function (fromBottom) { return _this.focusInnerElement(fromBottom); },
45589 onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },
45590 handleKeyDown: function (e) { return _this.handleKeyDown(e); }
45591 });
45592 this.setAriaProperties();
45593 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_6__["Events"].EVENT_GRID_STYLES_CHANGED, this.onGridStylesChanged.bind(this));
45594 };
45595 VirtualList.prototype.onGridStylesChanged = function () {
45596 this.rowHeight = this.getItemHeight();
45597 this.refresh();
45598 };
45599 VirtualList.prototype.setAriaProperties = function () {
45600 var translate = this.localeService.getLocaleTextFunc();
45601 var listName = translate('ariaDefaultListName', this.listName || 'List');
45602 var ariaEl = this.eContainer;
45603 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaRole"])(ariaEl, this.ariaRole);
45604 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaLabel"])(ariaEl, listName);
45605 };
45606 VirtualList.prototype.addResizeObserver = function () {
45607 var _this = this;
45608 var listener = function () { return _this.drawVirtualRows(); };
45609 var destroyObserver = this.resizeObserverService.observeResize(this.getGui(), listener);
45610 this.addDestroyFunc(destroyObserver);
45611 };
45612 VirtualList.prototype.focusInnerElement = function (fromBottom) {
45613 this.focusRow(fromBottom ? this.model.getRowCount() - 1 : 0);
45614 };
45615 VirtualList.prototype.onFocusIn = function (e) {
45616 var target = e.target;
45617 if (target.classList.contains('ag-virtual-list-item')) {
45618 this.lastFocusedRowIndex = Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["getAriaPosInSet"])(target) - 1;
45619 }
45620 return false;
45621 };
45622 VirtualList.prototype.onFocusOut = function (e) {
45623 if (!this.getFocusableElement().contains(e.relatedTarget)) {
45624 this.lastFocusedRowIndex = null;
45625 }
45626 return false;
45627 };
45628 VirtualList.prototype.handleKeyDown = function (e) {
45629 switch (e.key) {
45630 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP:
45631 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].DOWN:
45632 if (this.navigate(e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_3__["KeyCode"].UP)) {
45633 e.preventDefault();
45634 }
45635 break;
45636 }
45637 };
45638 VirtualList.prototype.onTabKeyDown = function (e) {
45639 if (this.navigate(e.shiftKey)) {
45640 e.preventDefault();
45641 }
45642 else {
45643 this.forceFocusOutOfContainer(e.shiftKey);
45644 }
45645 };
45646 VirtualList.prototype.navigate = function (up) {
45647 if (this.lastFocusedRowIndex == null) {
45648 return false;
45649 }
45650 var nextRow = this.lastFocusedRowIndex + (up ? -1 : 1);
45651 if (nextRow < 0 || nextRow >= this.model.getRowCount()) {
45652 return false;
45653 }
45654 this.focusRow(nextRow);
45655 return true;
45656 };
45657 VirtualList.prototype.getLastFocusedRow = function () {
45658 return this.lastFocusedRowIndex;
45659 };
45660 VirtualList.prototype.focusRow = function (rowNumber) {
45661 var _this = this;
45662 this.ensureIndexVisible(rowNumber);
45663 window.setTimeout(function () {
45664 if (!_this.isAlive()) {
45665 return;
45666 }
45667 var renderedRow = _this.renderedRows.get(rowNumber);
45668 if (renderedRow) {
45669 renderedRow.eDiv.focus();
45670 }
45671 }, 10);
45672 };
45673 VirtualList.prototype.getComponentAt = function (rowIndex) {
45674 var comp = this.renderedRows.get(rowIndex);
45675 return comp && comp.rowComponent;
45676 };
45677 VirtualList.prototype.forEachRenderedRow = function (func) {
45678 this.renderedRows.forEach(function (value, key) { return func(value.rowComponent, key); });
45679 };
45680 VirtualList.getTemplate = function (cssIdentifier) {
45681 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>";
45682 };
45683 VirtualList.prototype.getItemHeight = function () {
45684 return this.environment.getListItemHeight();
45685 };
45686 VirtualList.prototype.ensureIndexVisible = function (index) {
45687 var lastRow = this.model.getRowCount();
45688 if (typeof index !== 'number' || index < 0 || index >= lastRow) {
45689 console.warn('AG Grid: invalid row index for ensureIndexVisible: ' + index);
45690 return;
45691 }
45692 var rowTopPixel = index * this.rowHeight;
45693 var rowBottomPixel = rowTopPixel + this.rowHeight;
45694 var eGui = this.getGui();
45695 var viewportTopPixel = eGui.scrollTop;
45696 var viewportHeight = eGui.offsetHeight;
45697 var viewportBottomPixel = viewportTopPixel + viewportHeight;
45698 var viewportScrolledPastRow = viewportTopPixel > rowTopPixel;
45699 var viewportScrolledBeforeRow = viewportBottomPixel < rowBottomPixel;
45700 if (viewportScrolledPastRow) {
45701 // if row is before, scroll up with row at top
45702 eGui.scrollTop = rowTopPixel;
45703 }
45704 else if (viewportScrolledBeforeRow) {
45705 // if row is below, scroll down with row at bottom
45706 var newScrollPosition = rowBottomPixel - viewportHeight;
45707 eGui.scrollTop = newScrollPosition;
45708 }
45709 };
45710 VirtualList.prototype.setComponentCreator = function (componentCreator) {
45711 this.componentCreator = componentCreator;
45712 };
45713 VirtualList.prototype.setComponentUpdater = function (componentUpdater) {
45714 this.componentUpdater = componentUpdater;
45715 };
45716 VirtualList.prototype.getRowHeight = function () {
45717 return this.rowHeight;
45718 };
45719 VirtualList.prototype.getScrollTop = function () {
45720 return this.getGui().scrollTop;
45721 };
45722 VirtualList.prototype.setRowHeight = function (rowHeight) {
45723 this.rowHeight = rowHeight;
45724 this.refresh();
45725 };
45726 VirtualList.prototype.refresh = function (softRefresh) {
45727 var _this = this;
45728 if (this.model == null || !this.isAlive()) {
45729 return;
45730 }
45731 var rowCount = this.model.getRowCount();
45732 this.eContainer.style.height = rowCount * this.rowHeight + "px";
45733 // ensure height is applied before attempting to redraw rows
45734 Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["waitUntil"])(function () { return _this.eContainer.clientHeight >= rowCount * _this.rowHeight; }, function () {
45735 if (!_this.isAlive()) {
45736 return;
45737 }
45738 if (_this.canSoftRefresh(softRefresh)) {
45739 _this.drawVirtualRows(true);
45740 }
45741 else {
45742 _this.clearVirtualRows();
45743 _this.drawVirtualRows();
45744 }
45745 });
45746 };
45747 VirtualList.prototype.canSoftRefresh = function (softRefresh) {
45748 return !!(softRefresh && this.renderedRows.size && typeof this.model.areRowsEqual === 'function' && this.componentUpdater);
45749 };
45750 VirtualList.prototype.clearVirtualRows = function () {
45751 var _this = this;
45752 this.renderedRows.forEach(function (_, rowIndex) { return _this.removeRow(rowIndex); });
45753 };
45754 VirtualList.prototype.drawVirtualRows = function (softRefresh) {
45755 if (!this.isAlive()) {
45756 return;
45757 }
45758 var gui = this.getGui();
45759 var topPixel = gui.scrollTop;
45760 var bottomPixel = topPixel + gui.offsetHeight;
45761 var firstRow = Math.floor(topPixel / this.rowHeight);
45762 var lastRow = Math.floor(bottomPixel / this.rowHeight);
45763 this.ensureRowsRendered(firstRow, lastRow, softRefresh);
45764 };
45765 VirtualList.prototype.ensureRowsRendered = function (start, finish, softRefresh) {
45766 var _this = this;
45767 // remove any rows that are no longer required
45768 this.renderedRows.forEach(function (_, rowIndex) {
45769 if ((rowIndex < start || rowIndex > finish) && rowIndex !== _this.lastFocusedRowIndex) {
45770 _this.removeRow(rowIndex);
45771 }
45772 });
45773 if (softRefresh) {
45774 // refresh any existing rows
45775 this.refreshRows();
45776 }
45777 // insert any required new rows
45778 for (var rowIndex = start; rowIndex <= finish; rowIndex++) {
45779 if (this.renderedRows.has(rowIndex)) {
45780 continue;
45781 }
45782 // check this row actually exists (in case overflow buffer window exceeds real data)
45783 if (rowIndex < this.model.getRowCount()) {
45784 this.insertRow(rowIndex);
45785 }
45786 }
45787 };
45788 VirtualList.prototype.insertRow = function (rowIndex) {
45789 var _this = this;
45790 var value = this.model.getRow(rowIndex);
45791 var eDiv = document.createElement('div');
45792 eDiv.classList.add('ag-virtual-list-item', "ag-" + this.cssIdentifier + "-virtual-list-item");
45793 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaRole"])(eDiv, this.ariaRole === 'tree' ? 'treeitem' : 'option');
45794 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaSetSize"])(eDiv, this.model.getRowCount());
45795 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaPosInSet"])(eDiv, rowIndex + 1);
45796 eDiv.setAttribute('tabindex', '-1');
45797 if (typeof this.model.isRowSelected === 'function') {
45798 var isSelected = this.model.isRowSelected(rowIndex);
45799 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaSelected"])(eDiv, !!isSelected);
45800 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_2__["setAriaChecked"])(eDiv, isSelected);
45801 }
45802 eDiv.style.height = this.rowHeight + "px";
45803 eDiv.style.top = this.rowHeight * rowIndex + "px";
45804 var rowComponent = this.componentCreator(value, eDiv);
45805 rowComponent.addGuiEventListener('focusin', function () { return _this.lastFocusedRowIndex = rowIndex; });
45806 eDiv.appendChild(rowComponent.getGui());
45807 // keep the DOM order consistent with the order of the rows
45808 if (this.renderedRows.has(rowIndex - 1)) {
45809 this.renderedRows.get(rowIndex - 1).eDiv.insertAdjacentElement('afterend', eDiv);
45810 }
45811 else if (this.renderedRows.has(rowIndex + 1)) {
45812 this.renderedRows.get(rowIndex + 1).eDiv.insertAdjacentElement('beforebegin', eDiv);
45813 }
45814 else {
45815 this.eContainer.appendChild(eDiv);
45816 }
45817 this.renderedRows.set(rowIndex, { rowComponent: rowComponent, eDiv: eDiv, value: value });
45818 };
45819 VirtualList.prototype.removeRow = function (rowIndex) {
45820 var component = this.renderedRows.get(rowIndex);
45821 this.eContainer.removeChild(component.eDiv);
45822 this.destroyBean(component.rowComponent);
45823 this.renderedRows.delete(rowIndex);
45824 };
45825 VirtualList.prototype.refreshRows = function () {
45826 var _this = this;
45827 var rowCount = this.model.getRowCount();
45828 this.renderedRows.forEach(function (row, rowIndex) {
45829 var _a, _b;
45830 if (rowIndex >= rowCount) {
45831 _this.removeRow(rowIndex);
45832 }
45833 else {
45834 var newValue = _this.model.getRow(rowIndex);
45835 if ((_b = (_a = _this.model).areRowsEqual) === null || _b === void 0 ? void 0 : _b.call(_a, row.value, newValue)) {
45836 _this.componentUpdater(newValue, row.rowComponent);
45837 }
45838 else {
45839 // to be replaced later
45840 _this.removeRow(rowIndex);
45841 }
45842 }
45843 });
45844 };
45845 VirtualList.prototype.addScrollListener = function () {
45846 var _this = this;
45847 this.addGuiEventListener('scroll', function () { return _this.drawVirtualRows(); }, { passive: true });
45848 };
45849 VirtualList.prototype.setModel = function (model) {
45850 this.model = model;
45851 };
45852 VirtualList.prototype.destroy = function () {
45853 if (!this.isAlive()) {
45854 return;
45855 }
45856 this.clearVirtualRows();
45857 _super.prototype.destroy.call(this);
45858 };
45859 __decorate([
45860 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('resizeObserverService')
45861 ], VirtualList.prototype, "resizeObserverService", void 0);
45862 __decorate([
45863 Object(_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('eContainer')
45864 ], VirtualList.prototype, "eContainer", void 0);
45865 __decorate([
45866 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
45867 ], VirtualList.prototype, "postConstruct", null);
45868 return VirtualList;
45869}(_tabGuardComp__WEBPACK_IMPORTED_MODULE_5__["TabGuardComp"]));
45870
45871
45872
45873/***/ }),
45874/* 203 */
45875/***/ (function(module, __webpack_exports__, __webpack_require__) {
45876
45877"use strict";
45878__webpack_require__.r(__webpack_exports__);
45879/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VanillaFrameworkOverrides", function() { return VanillaFrameworkOverrides; });
45880/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
45881/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
45882/**
45883 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
45884 * @version v29.2.0
45885 * @link https://www.ag-grid.com/
45886 * @license MIT
45887 */
45888
45889
45890var OUTSIDE_ANGULAR_EVENTS = ['mouseover', 'mouseout', 'mouseenter', 'mouseleave'];
45891var PASSIVE_EVENTS = ['touchstart', 'touchend', 'touchmove', 'touchcancel'];
45892/** The base frameworks, eg React & Angular, override this bean with implementations specific to their requirement. */
45893var VanillaFrameworkOverrides = /** @class */ (function () {
45894 function VanillaFrameworkOverrides() {
45895 this.isOutsideAngular = function (eventType) { return Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["includes"])(OUTSIDE_ANGULAR_EVENTS, eventType); };
45896 }
45897 // for Vanilla JS, we use simple timeout
45898 VanillaFrameworkOverrides.prototype.setTimeout = function (action, timeout) {
45899 window.setTimeout(action, timeout);
45900 };
45901 VanillaFrameworkOverrides.prototype.setInterval = function (action, timeout) {
45902 return new _utils__WEBPACK_IMPORTED_MODULE_1__["AgPromise"](function (resolve) {
45903 resolve(window.setInterval(action, timeout));
45904 });
45905 };
45906 // for Vanilla JS, we just add the event to the element
45907 VanillaFrameworkOverrides.prototype.addEventListener = function (element, type, listener, useCapture) {
45908 var isPassive = Object(_utils_array__WEBPACK_IMPORTED_MODULE_0__["includes"])(PASSIVE_EVENTS, type);
45909 element.addEventListener(type, listener, { capture: !!useCapture, passive: isPassive });
45910 };
45911 // for Vanilla JS, we just execute the listener
45912 VanillaFrameworkOverrides.prototype.dispatchEvent = function (eventType, listener, global) {
45913 if (global === void 0) { global = false; }
45914 listener();
45915 };
45916 VanillaFrameworkOverrides.prototype.frameworkComponent = function (name) {
45917 return null;
45918 };
45919 VanillaFrameworkOverrides.prototype.isFrameworkComponent = function (comp) {
45920 return false;
45921 };
45922 return VanillaFrameworkOverrides;
45923}());
45924
45925
45926
45927/***/ }),
45928/* 204 */
45929/***/ (function(module, __webpack_exports__, __webpack_require__) {
45930
45931"use strict";
45932__webpack_require__.r(__webpack_exports__);
45933/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellNavigationService", function() { return CellNavigationService; });
45934/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
45935/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
45936/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
45937/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
45938/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48);
45939/**
45940 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
45941 * @version v29.2.0
45942 * @link https://www.ag-grid.com/
45943 * @license MIT
45944 */
45945var __extends = (undefined && undefined.__extends) || (function () {
45946 var extendStatics = function (d, b) {
45947 extendStatics = Object.setPrototypeOf ||
45948 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
45949 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
45950 return extendStatics(d, b);
45951 };
45952 return function (d, b) {
45953 extendStatics(d, b);
45954 function __() { this.constructor = d; }
45955 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45956 };
45957})();
45958var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
45959 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
45960 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
45961 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;
45962 return c > 3 && r && Object.defineProperty(target, key, r), r;
45963};
45964var __read = (undefined && undefined.__read) || function (o, n) {
45965 var m = typeof Symbol === "function" && o[Symbol.iterator];
45966 if (!m) return o;
45967 var i = m.call(o), r, ar = [], e;
45968 try {
45969 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
45970 }
45971 catch (error) { e = { error: error }; }
45972 finally {
45973 try {
45974 if (r && !r.done && (m = i["return"])) m.call(i);
45975 }
45976 finally { if (e) throw e.error; }
45977 }
45978 return ar;
45979};
45980var __spread = (undefined && undefined.__spread) || function () {
45981 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
45982 return ar;
45983};
45984
45985
45986
45987
45988
45989var CellNavigationService = /** @class */ (function (_super) {
45990 __extends(CellNavigationService, _super);
45991 function CellNavigationService() {
45992 return _super !== null && _super.apply(this, arguments) || this;
45993 }
45994 // returns null if no cell to focus on, ie at the end of the grid
45995 CellNavigationService.prototype.getNextCellToFocus = function (key, focusedCell, ctrlPressed) {
45996 if (ctrlPressed === void 0) { ctrlPressed = false; }
45997 if (ctrlPressed) {
45998 return this.getNextCellToFocusWithCtrlPressed(key, focusedCell);
45999 }
46000 return this.getNextCellToFocusWithoutCtrlPressed(key, focusedCell);
46001 };
46002 CellNavigationService.prototype.getNextCellToFocusWithCtrlPressed = function (key, focusedCell) {
46003 var upKey = key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].UP;
46004 var downKey = key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].DOWN;
46005 var leftKey = key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].LEFT;
46006 var column;
46007 var rowIndex;
46008 if (upKey || downKey) {
46009 rowIndex = upKey ? this.paginationProxy.getPageFirstRow() : this.paginationProxy.getPageLastRow();
46010 column = focusedCell.column;
46011 }
46012 else {
46013 var allColumns = this.columnModel.getAllDisplayedColumns();
46014 var isRtl = this.gridOptionsService.is('enableRtl');
46015 rowIndex = focusedCell.rowIndex;
46016 column = leftKey !== isRtl ? allColumns[0] : Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(allColumns);
46017 }
46018 return {
46019 rowIndex: rowIndex,
46020 rowPinned: null,
46021 column: column
46022 };
46023 };
46024 CellNavigationService.prototype.getNextCellToFocusWithoutCtrlPressed = function (key, focusedCell) {
46025 // starting with the provided cell, we keep moving until we find a cell we can
46026 // focus on.
46027 var pointer = focusedCell;
46028 var finished = false;
46029 // finished will be true when either:
46030 // a) cell found that we can focus on
46031 // b) run out of cells (ie the method returns null)
46032 while (!finished) {
46033 switch (key) {
46034 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].UP:
46035 pointer = this.getCellAbove(pointer);
46036 break;
46037 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].DOWN:
46038 pointer = this.getCellBelow(pointer);
46039 break;
46040 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].RIGHT:
46041 if (this.gridOptionsService.is('enableRtl')) {
46042 pointer = this.getCellToLeft(pointer);
46043 }
46044 else {
46045 pointer = this.getCellToRight(pointer);
46046 }
46047 break;
46048 case _constants_keyCode__WEBPACK_IMPORTED_MODULE_4__["KeyCode"].LEFT:
46049 if (this.gridOptionsService.is('enableRtl')) {
46050 pointer = this.getCellToRight(pointer);
46051 }
46052 else {
46053 pointer = this.getCellToLeft(pointer);
46054 }
46055 break;
46056 default:
46057 pointer = null;
46058 console.warn('AG Grid: unknown key for navigation ' + key);
46059 break;
46060 }
46061 if (pointer) {
46062 finished = this.isCellGoodToFocusOn(pointer);
46063 }
46064 else {
46065 finished = true;
46066 }
46067 }
46068 return pointer;
46069 };
46070 CellNavigationService.prototype.isCellGoodToFocusOn = function (gridCell) {
46071 var column = gridCell.column;
46072 var rowNode;
46073 switch (gridCell.rowPinned) {
46074 case 'top':
46075 rowNode = this.pinnedRowModel.getPinnedTopRow(gridCell.rowIndex);
46076 break;
46077 case 'bottom':
46078 rowNode = this.pinnedRowModel.getPinnedBottomRow(gridCell.rowIndex);
46079 break;
46080 default:
46081 rowNode = this.rowModel.getRow(gridCell.rowIndex);
46082 break;
46083 }
46084 if (!rowNode) {
46085 return false;
46086 }
46087 var suppressNavigable = column.isSuppressNavigable(rowNode);
46088 return !suppressNavigable;
46089 };
46090 CellNavigationService.prototype.getCellToLeft = function (lastCell) {
46091 if (!lastCell) {
46092 return null;
46093 }
46094 var colToLeft = this.columnModel.getDisplayedColBefore(lastCell.column);
46095 if (!colToLeft) {
46096 return null;
46097 }
46098 return {
46099 rowIndex: lastCell.rowIndex,
46100 column: colToLeft,
46101 rowPinned: lastCell.rowPinned
46102 };
46103 };
46104 CellNavigationService.prototype.getCellToRight = function (lastCell) {
46105 if (!lastCell) {
46106 return null;
46107 }
46108 var colToRight = this.columnModel.getDisplayedColAfter(lastCell.column);
46109 // if already on right, do nothing
46110 if (!colToRight) {
46111 return null;
46112 }
46113 return {
46114 rowIndex: lastCell.rowIndex,
46115 column: colToRight,
46116 rowPinned: lastCell.rowPinned
46117 };
46118 };
46119 CellNavigationService.prototype.getRowBelow = function (rowPosition) {
46120 // if already on top row, do nothing
46121 var index = rowPosition.rowIndex;
46122 var pinned = rowPosition.rowPinned;
46123 if (this.isLastRowInContainer(rowPosition)) {
46124 switch (pinned) {
46125 case 'bottom':
46126 // never any rows after pinned bottom
46127 return null;
46128 case 'top':
46129 // if on last row of pinned top, then next row is main body (if rows exist),
46130 // otherwise it's the pinned bottom
46131 if (this.rowModel.isRowsToRender()) {
46132 return { rowIndex: this.paginationProxy.getPageFirstRow(), rowPinned: null };
46133 }
46134 if (this.pinnedRowModel.isRowsToRender('bottom')) {
46135 return { rowIndex: 0, rowPinned: 'bottom' };
46136 }
46137 return null;
46138 default:
46139 // if in the main body, then try pinned bottom, otherwise return nothing
46140 if (this.pinnedRowModel.isRowsToRender('bottom')) {
46141 return { rowIndex: 0, rowPinned: 'bottom' };
46142 }
46143 return null;
46144 }
46145 }
46146 var rowNode = this.rowModel.getRow(rowPosition.rowIndex);
46147 var nextStickyPosition = this.getNextStickyPosition(rowNode);
46148 if (nextStickyPosition) {
46149 return nextStickyPosition;
46150 }
46151 return { rowIndex: index + 1, rowPinned: pinned };
46152 };
46153 CellNavigationService.prototype.getNextStickyPosition = function (rowNode, up) {
46154 if (!this.gridOptionsService.is('groupRowsSticky') || !rowNode || !rowNode.sticky) {
46155 return;
46156 }
46157 var stickyRowCtrls = __spread(this.rowRenderer.getStickyTopRowCtrls()).sort(function (a, b) { return a.getRowNode().rowIndex - b.getRowNode().rowIndex; });
46158 var diff = up ? -1 : 1;
46159 var idx = stickyRowCtrls.findIndex(function (ctrl) { return ctrl.getRowNode().rowIndex === rowNode.rowIndex; });
46160 var nextCtrl = stickyRowCtrls[idx + diff];
46161 if (nextCtrl) {
46162 return { rowIndex: nextCtrl.getRowNode().rowIndex, rowPinned: null };
46163 }
46164 };
46165 CellNavigationService.prototype.getCellBelow = function (lastCell) {
46166 if (!lastCell) {
46167 return null;
46168 }
46169 var rowBelow = this.getRowBelow(lastCell);
46170 if (rowBelow) {
46171 return {
46172 rowIndex: rowBelow.rowIndex,
46173 column: lastCell.column,
46174 rowPinned: rowBelow.rowPinned
46175 };
46176 }
46177 return null;
46178 };
46179 CellNavigationService.prototype.isLastRowInContainer = function (rowPosition) {
46180 var pinned = rowPosition.rowPinned;
46181 var index = rowPosition.rowIndex;
46182 if (pinned === 'top') {
46183 var lastTopIndex = this.pinnedRowModel.getPinnedTopRowData().length - 1;
46184 return lastTopIndex <= index;
46185 }
46186 if (pinned === 'bottom') {
46187 var lastBottomIndex = this.pinnedRowModel.getPinnedBottomRowData().length - 1;
46188 return lastBottomIndex <= index;
46189 }
46190 var lastBodyIndex = this.paginationProxy.getPageLastRow();
46191 return lastBodyIndex <= index;
46192 };
46193 CellNavigationService.prototype.getRowAbove = function (rowPosition) {
46194 // if already on top row, do nothing
46195 var index = rowPosition.rowIndex;
46196 var pinned = rowPosition.rowPinned;
46197 var isFirstRow = pinned ? index === 0 : index === this.paginationProxy.getPageFirstRow();
46198 // if already on top row, do nothing
46199 if (isFirstRow) {
46200 if (pinned === 'top') {
46201 return null;
46202 }
46203 if (!pinned) {
46204 if (this.pinnedRowModel.isRowsToRender('top')) {
46205 return this.getLastFloatingTopRow();
46206 }
46207 return null;
46208 }
46209 // last floating bottom
46210 if (this.rowModel.isRowsToRender()) {
46211 return this.getLastBodyCell();
46212 }
46213 if (this.pinnedRowModel.isRowsToRender('top')) {
46214 return this.getLastFloatingTopRow();
46215 }
46216 return null;
46217 }
46218 var rowNode = this.rowModel.getRow(rowPosition.rowIndex);
46219 var nextStickyPosition = this.getNextStickyPosition(rowNode, true);
46220 if (nextStickyPosition) {
46221 return nextStickyPosition;
46222 }
46223 return { rowIndex: index - 1, rowPinned: pinned };
46224 };
46225 CellNavigationService.prototype.getCellAbove = function (lastCell) {
46226 if (!lastCell) {
46227 return null;
46228 }
46229 var rowAbove = this.getRowAbove({ rowIndex: lastCell.rowIndex, rowPinned: lastCell.rowPinned });
46230 if (rowAbove) {
46231 return {
46232 rowIndex: rowAbove.rowIndex,
46233 column: lastCell.column,
46234 rowPinned: rowAbove.rowPinned
46235 };
46236 }
46237 return null;
46238 };
46239 CellNavigationService.prototype.getLastBodyCell = function () {
46240 var lastBodyRow = this.paginationProxy.getPageLastRow();
46241 return { rowIndex: lastBodyRow, rowPinned: null };
46242 };
46243 CellNavigationService.prototype.getLastFloatingTopRow = function () {
46244 var lastFloatingRow = this.pinnedRowModel.getPinnedTopRowData().length - 1;
46245 return { rowIndex: lastFloatingRow, rowPinned: 'top' };
46246 };
46247 CellNavigationService.prototype.getNextTabbedCell = function (gridCell, backwards) {
46248 if (backwards) {
46249 return this.getNextTabbedCellBackwards(gridCell);
46250 }
46251 return this.getNextTabbedCellForwards(gridCell);
46252 };
46253 CellNavigationService.prototype.getNextTabbedCellForwards = function (gridCell) {
46254 var displayedColumns = this.columnModel.getAllDisplayedColumns();
46255 var newRowIndex = gridCell.rowIndex;
46256 var newFloating = gridCell.rowPinned;
46257 // move along to the next cell
46258 var newColumn = this.columnModel.getDisplayedColAfter(gridCell.column);
46259 // check if end of the row, and if so, go forward a row
46260 if (!newColumn) {
46261 newColumn = displayedColumns[0];
46262 var rowBelow = this.getRowBelow(gridCell);
46263 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["missing"])(rowBelow)) {
46264 return null;
46265 }
46266 // If we are tabbing and there is a paging panel present, tabbing should go
46267 // to the paging panel instead of loading the next page.
46268 if (!rowBelow.rowPinned && !this.paginationProxy.isRowInPage(rowBelow)) {
46269 return null;
46270 }
46271 newRowIndex = rowBelow ? rowBelow.rowIndex : null;
46272 newFloating = rowBelow ? rowBelow.rowPinned : null;
46273 }
46274 return { rowIndex: newRowIndex, column: newColumn, rowPinned: newFloating };
46275 };
46276 CellNavigationService.prototype.getNextTabbedCellBackwards = function (gridCell) {
46277 var displayedColumns = this.columnModel.getAllDisplayedColumns();
46278 var newRowIndex = gridCell.rowIndex;
46279 var newFloating = gridCell.rowPinned;
46280 // move along to the next cell
46281 var newColumn = this.columnModel.getDisplayedColBefore(gridCell.column);
46282 // check if end of the row, and if so, go forward a row
46283 if (!newColumn) {
46284 newColumn = Object(_utils_array__WEBPACK_IMPORTED_MODULE_3__["last"])(displayedColumns);
46285 var rowAbove = this.getRowAbove({ rowIndex: gridCell.rowIndex, rowPinned: gridCell.rowPinned });
46286 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["missing"])(rowAbove)) {
46287 return null;
46288 }
46289 // If we are tabbing and there is a paging panel present, tabbing should go
46290 // to the paging panel instead of loading the next page.
46291 if (!rowAbove.rowPinned && !this.paginationProxy.isRowInPage(rowAbove)) {
46292 return null;
46293 }
46294 newRowIndex = rowAbove ? rowAbove.rowIndex : null;
46295 newFloating = rowAbove ? rowAbove.rowPinned : null;
46296 }
46297 return { rowIndex: newRowIndex, column: newColumn, rowPinned: newFloating };
46298 };
46299 __decorate([
46300 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
46301 ], CellNavigationService.prototype, "columnModel", void 0);
46302 __decorate([
46303 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
46304 ], CellNavigationService.prototype, "rowModel", void 0);
46305 __decorate([
46306 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
46307 ], CellNavigationService.prototype, "rowRenderer", void 0);
46308 __decorate([
46309 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedRowModel')
46310 ], CellNavigationService.prototype, "pinnedRowModel", void 0);
46311 __decorate([
46312 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
46313 ], CellNavigationService.prototype, "paginationProxy", void 0);
46314 CellNavigationService = __decorate([
46315 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('cellNavigationService')
46316 ], CellNavigationService);
46317 return CellNavigationService;
46318}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
46319
46320
46321
46322/***/ }),
46323/* 205 */
46324/***/ (function(module, __webpack_exports__, __webpack_require__) {
46325
46326"use strict";
46327__webpack_require__.r(__webpack_exports__);
46328/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AlignedGridsService", function() { return AlignedGridsService; });
46329/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
46330/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
46331/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
46332/**
46333 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
46334 * @version v29.2.0
46335 * @link https://www.ag-grid.com/
46336 * @license MIT
46337 */
46338var __extends = (undefined && undefined.__extends) || (function () {
46339 var extendStatics = function (d, b) {
46340 extendStatics = Object.setPrototypeOf ||
46341 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
46342 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
46343 return extendStatics(d, b);
46344 };
46345 return function (d, b) {
46346 extendStatics(d, b);
46347 function __() { this.constructor = d; }
46348 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
46349 };
46350})();
46351var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
46352 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
46353 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
46354 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;
46355 return c > 3 && r && Object.defineProperty(target, key, r), r;
46356};
46357var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
46358 return function (target, key) { decorator(target, key, paramIndex); }
46359};
46360
46361
46362
46363
46364
46365
46366var AlignedGridsService = /** @class */ (function (_super) {
46367 __extends(AlignedGridsService, _super);
46368 function AlignedGridsService() {
46369 var _this = _super !== null && _super.apply(this, arguments) || this;
46370 // flag to mark if we are consuming. to avoid cyclic events (ie other grid firing back to master
46371 // while processing a master event) we mark this if consuming an event, and if we are, then
46372 // we don't fire back any events.
46373 _this.consuming = false;
46374 return _this;
46375 }
46376 AlignedGridsService.prototype.setBeans = function (loggerFactory) {
46377 this.logger = loggerFactory.create('AlignedGridsService');
46378 };
46379 AlignedGridsService.prototype.init = function () {
46380 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_MOVED, this.fireColumnEvent.bind(this));
46381 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_VISIBLE, this.fireColumnEvent.bind(this));
46382 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PINNED, this.fireColumnEvent.bind(this));
46383 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_GROUP_OPENED, this.fireColumnEvent.bind(this));
46384 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_RESIZED, this.fireColumnEvent.bind(this));
46385 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_BODY_SCROLL, this.fireScrollEvent.bind(this));
46386 };
46387 // common logic across all the fire methods
46388 AlignedGridsService.prototype.fireEvent = function (callback) {
46389 // if we are already consuming, then we are acting on an event from a master,
46390 // so we don't cause a cyclic firing of events
46391 if (this.consuming) {
46392 return;
46393 }
46394 // iterate through the aligned grids, and pass each aligned grid service to the callback
46395 var otherGrids = this.gridOptionsService.get('alignedGrids');
46396 if (otherGrids) {
46397 otherGrids.forEach(function (otherGridOptions) {
46398 if (otherGridOptions.api) {
46399 var alignedGridService = otherGridOptions.api.__getAlignedGridService();
46400 callback(alignedGridService);
46401 }
46402 });
46403 }
46404 };
46405 // common logic across all consume methods. very little common logic, however extracting
46406 // guarantees consistency across the methods.
46407 AlignedGridsService.prototype.onEvent = function (callback) {
46408 this.consuming = true;
46409 callback();
46410 this.consuming = false;
46411 };
46412 AlignedGridsService.prototype.fireColumnEvent = function (event) {
46413 this.fireEvent(function (alignedGridsService) {
46414 alignedGridsService.onColumnEvent(event);
46415 });
46416 };
46417 AlignedGridsService.prototype.fireScrollEvent = function (event) {
46418 if (event.direction !== 'horizontal') {
46419 return;
46420 }
46421 this.fireEvent(function (alignedGridsService) {
46422 alignedGridsService.onScrollEvent(event);
46423 });
46424 };
46425 AlignedGridsService.prototype.onScrollEvent = function (event) {
46426 var _this = this;
46427 this.onEvent(function () {
46428 var gridBodyCon = _this.ctrlsService.getGridBodyCtrl();
46429 gridBodyCon.getScrollFeature().setHorizontalScrollPosition(event.left);
46430 });
46431 };
46432 AlignedGridsService.prototype.getMasterColumns = function (event) {
46433 var result = [];
46434 if (event.columns) {
46435 event.columns.forEach(function (column) {
46436 result.push(column);
46437 });
46438 }
46439 else if (event.column) {
46440 result.push(event.column);
46441 }
46442 return result;
46443 };
46444 AlignedGridsService.prototype.getColumnIds = function (event) {
46445 var result = [];
46446 if (event.columns) {
46447 event.columns.forEach(function (column) {
46448 result.push(column.getColId());
46449 });
46450 }
46451 else if (event.column) {
46452 result.push(event.column.getColId());
46453 }
46454 return result;
46455 };
46456 AlignedGridsService.prototype.onColumnEvent = function (event) {
46457 var _this = this;
46458 this.onEvent(function () {
46459 switch (event.type) {
46460 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_MOVED:
46461 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_VISIBLE:
46462 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PINNED:
46463 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_RESIZED:
46464 var colEvent = event;
46465 _this.processColumnEvent(colEvent);
46466 break;
46467 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_GROUP_OPENED:
46468 var groupOpenedEvent = event;
46469 _this.processGroupOpenedEvent(groupOpenedEvent);
46470 break;
46471 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PIVOT_CHANGED:
46472 // we cannot support pivoting with aligned grids as the columns will be out of sync as the
46473 // grids will have columns created based on the row data of the grid.
46474 console.warn('AG Grid: pivoting is not supported with aligned grids. ' +
46475 'You can only use one of these features at a time in a grid.');
46476 break;
46477 }
46478 });
46479 };
46480 AlignedGridsService.prototype.processGroupOpenedEvent = function (groupOpenedEvent) {
46481 // likewise for column group
46482 var masterColumnGroup = groupOpenedEvent.columnGroup;
46483 var otherColumnGroup = null;
46484 if (masterColumnGroup) {
46485 var groupId = masterColumnGroup.getGroupId();
46486 otherColumnGroup = this.columnModel.getProvidedColumnGroup(groupId);
46487 }
46488 if (masterColumnGroup && !otherColumnGroup) {
46489 return;
46490 }
46491 this.logger.log('onColumnEvent-> processing ' + groupOpenedEvent + ' expanded = ' + masterColumnGroup.isExpanded());
46492 this.columnModel.setColumnGroupOpened(otherColumnGroup, masterColumnGroup.isExpanded(), "alignedGridChanged");
46493 };
46494 AlignedGridsService.prototype.processColumnEvent = function (colEvent) {
46495 var _this = this;
46496 var _a;
46497 // the column in the event is from the master grid. need to
46498 // look up the equivalent from this (other) grid
46499 var masterColumn = colEvent.column;
46500 var otherColumn = null;
46501 if (masterColumn) {
46502 otherColumn = this.columnModel.getPrimaryColumn(masterColumn.getColId());
46503 }
46504 // if event was with respect to a master column, that is not present in this
46505 // grid, then we ignore the event
46506 if (masterColumn && !otherColumn) {
46507 return;
46508 }
46509 // in time, all the methods below should use the column ids, it's a more generic way
46510 // of handling columns, and also allows for single or multi column events
46511 var masterColumns = this.getMasterColumns(colEvent);
46512 switch (colEvent.type) {
46513 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_MOVED:
46514 // when the user moves columns via applyColumnState, we can't depend on moving specific columns
46515 // to an index, as there maybe be many indexes columns moved to (as wasn't result of a mouse drag).
46516 // so only way to be sure is match the order of all columns using Column State.
46517 {
46518 var movedEvent = colEvent;
46519 var srcColState = colEvent.columnApi.getColumnState();
46520 var destColState = srcColState.map(function (s) { return ({ colId: s.colId }); });
46521 this.columnModel.applyColumnState({ state: destColState, applyOrder: true }, "alignedGridChanged");
46522 this.logger.log("onColumnEvent-> processing " + colEvent.type + " toIndex = " + movedEvent.toIndex);
46523 }
46524 break;
46525 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_VISIBLE:
46526 // when the user changes visibility via applyColumnState, we can't depend on visibility flag in event
46527 // as there maybe be mix of true/false (as wasn't result of a mouse click to set visiblity).
46528 // so only way to be sure is match the visibility of all columns using Column State.
46529 {
46530 var visibleEvent = colEvent;
46531 var srcColState = colEvent.columnApi.getColumnState();
46532 var destColState = srcColState.map(function (s) { return ({ colId: s.colId, hide: s.hide }); });
46533 this.columnModel.applyColumnState({ state: destColState }, "alignedGridChanged");
46534 this.logger.log("onColumnEvent-> processing " + colEvent.type + " visible = " + visibleEvent.visible);
46535 }
46536 break;
46537 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PINNED:
46538 {
46539 var pinnedEvent = colEvent;
46540 var srcColState = colEvent.columnApi.getColumnState();
46541 var destColState = srcColState.map(function (s) { return ({ colId: s.colId, pinned: s.pinned }); });
46542 this.columnModel.applyColumnState({ state: destColState }, "alignedGridChanged");
46543 this.logger.log("onColumnEvent-> processing " + colEvent.type + " pinned = " + pinnedEvent.pinned);
46544 }
46545 break;
46546 case _events__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_RESIZED:
46547 var resizedEvent = colEvent;
46548 var columnWidths_1 = {};
46549 masterColumns.forEach(function (column) {
46550 _this.logger.log("onColumnEvent-> processing " + colEvent.type + " actualWidth = " + column.getActualWidth());
46551 columnWidths_1[column.getId()] = { key: column.getColId(), newWidth: column.getActualWidth() };
46552 });
46553 // don't set flex columns width
46554 (_a = resizedEvent.flexColumns) === null || _a === void 0 ? void 0 : _a.forEach(function (col) {
46555 if (columnWidths_1[col.getId()]) {
46556 delete columnWidths_1[col.getId()];
46557 }
46558 });
46559 this.columnModel.setColumnWidths(Object.values(columnWidths_1), false, resizedEvent.finished, "alignedGridChanged");
46560 break;
46561 }
46562 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
46563 var isVerticalScrollShowing = gridBodyCon.isVerticalScrollShowing();
46564 var alignedGrids = this.gridOptionsService.get('alignedGrids');
46565 if (alignedGrids) {
46566 alignedGrids.forEach(function (grid) {
46567 if (grid.api) {
46568 grid.api.setAlwaysShowVerticalScroll(isVerticalScrollShowing);
46569 }
46570 });
46571 }
46572 };
46573 __decorate([
46574 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
46575 ], AlignedGridsService.prototype, "columnModel", void 0);
46576 __decorate([
46577 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
46578 ], AlignedGridsService.prototype, "ctrlsService", void 0);
46579 __decorate([
46580 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Qualifier"])('loggerFactory'))
46581 ], AlignedGridsService.prototype, "setBeans", null);
46582 __decorate([
46583 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
46584 ], AlignedGridsService.prototype, "init", null);
46585 AlignedGridsService = __decorate([
46586 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('alignedGridsService')
46587 ], AlignedGridsService);
46588 return AlignedGridsService;
46589}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
46590
46591
46592
46593/***/ }),
46594/* 206 */
46595/***/ (function(module, __webpack_exports__, __webpack_require__) {
46596
46597"use strict";
46598__webpack_require__.r(__webpack_exports__);
46599/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return Grid; });
46600/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridCoreCreator", function() { return GridCoreCreator; });
46601/* harmony import */ var _selectionService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
46602/* harmony import */ var _columns_columnApi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
46603/* harmony import */ var _columns_columnModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
46604/* harmony import */ var _rendering_rowRenderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(178);
46605/* harmony import */ var _headerRendering_gridHeaderComp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(168);
46606/* harmony import */ var _filter_filterManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(111);
46607/* harmony import */ var _valueService_valueService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(209);
46608/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(10);
46609/* harmony import */ var _gridBodyComp_gridBodyComp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(116);
46610/* harmony import */ var _gridApi__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(112);
46611/* harmony import */ var _columns_columnFactory__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(5);
46612/* harmony import */ var _columns_displayedGroupCreator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(34);
46613/* harmony import */ var _valueService_expressionService__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(210);
46614/* harmony import */ var _templateService__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(211);
46615/* harmony import */ var _widgets_popupService__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(200);
46616/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(212);
46617/* harmony import */ var _columns_columnUtils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(33);
46618/* harmony import */ var _rendering_autoWidthCalculator__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(177);
46619/* harmony import */ var _headerRendering_common_horizontalResizeService__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(171);
46620/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(11);
46621/* harmony import */ var _gridComp_gridComp__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(213);
46622/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(100);
46623/* harmony import */ var _dragAndDrop_dragService__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(109);
46624/* harmony import */ var _sortController__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(215);
46625/* harmony import */ var _focusService__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(201);
46626/* harmony import */ var _gridBodyComp_mouseEventService__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(142);
46627/* harmony import */ var _cellNavigationService__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(204);
46628/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(25);
46629/* harmony import */ var _rendering_valueFormatterService__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(180);
46630/* harmony import */ var _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(72);
46631/* harmony import */ var _widgets_agRadioButton__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(71);
46632/* harmony import */ var _vanillaFrameworkOverrides__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(203);
46633/* harmony import */ var _gridBodyComp_scrollVisibleService__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(141);
46634/* harmony import */ var _styling_stylingService__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(187);
46635/* harmony import */ var _rendering_columnHoverService__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(216);
46636/* harmony import */ var _rendering_columnAnimationService__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(217);
46637/* harmony import */ var _columns_autoGroupColService__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(30);
46638/* harmony import */ var _pagination_paginationProxy__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(186);
46639/* harmony import */ var _pagination_paginationAutoPageSizeService__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(218);
46640/* harmony import */ var _valueService_valueCache__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(219);
46641/* harmony import */ var _valueService_changeDetectionService__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(220);
46642/* harmony import */ var _alignedGridsService__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(205);
46643/* harmony import */ var _components_framework_userComponentFactory__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(105);
46644/* harmony import */ var _components_framework_userComponentRegistry__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(36);
46645/* harmony import */ var _components_framework_agComponentUtils__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(221);
46646/* harmony import */ var _components_framework_componentMetadataProvider__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(222);
46647/* harmony import */ var _rendering_beans__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(132);
46648/* harmony import */ var _environment__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(223);
46649/* harmony import */ var _misc_animationFrameService__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(176);
46650/* harmony import */ var _gridBodyComp_navigationService__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(143);
46651/* harmony import */ var _rendering_rowContainerHeightService__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(224);
46652/* harmony import */ var _rowNodes_selectableService__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(225);
46653/* harmony import */ var _pagination_paginationComp__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(226);
46654/* harmony import */ var _misc_resizeObserverService__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(175);
46655/* harmony import */ var _rendering_overlays_overlayWrapperComponent__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(227);
46656/* harmony import */ var _widgets_agGroupComponent__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(192);
46657/* harmony import */ var _widgets_agDialog__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(198);
46658/* harmony import */ var _widgets_agPanel__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(199);
46659/* harmony import */ var _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(79);
46660/* harmony import */ var _widgets_agInputTextArea__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(189);
46661/* harmony import */ var _widgets_agSlider__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(191);
46662/* harmony import */ var _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(80);
46663/* harmony import */ var _widgets_agInputRange__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(190);
46664/* harmony import */ var _widgets_agSelect__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(66);
46665/* harmony import */ var _widgets_agToggleButton__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(188);
46666/* harmony import */ var _entities_rowPositionUtils__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(228);
46667/* harmony import */ var _entities_cellPositionUtils__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(229);
46668/* harmony import */ var _pinnedRowModel_pinnedRowModel__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(181);
46669/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(15);
46670/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(14);
46671/* harmony import */ var _undoRedo_undoRedoService__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(230);
46672/* harmony import */ var _components_agStackComponentsRegistry__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(35);
46673/* harmony import */ var _headerRendering_common_headerPosition__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(232);
46674/* harmony import */ var _headerRendering_common_headerNavigationService__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(170);
46675/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(7);
46676/* harmony import */ var _columns_columnDefFactory__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(233);
46677/* harmony import */ var _rendering_row_rowCssClassCalculator__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(234);
46678/* harmony import */ var _rowNodeCache_rowNodeBlockLoader__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(185);
46679/* harmony import */ var _rowNodes_rowNodeSorter__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(235);
46680/* harmony import */ var _ctrlsService__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(236);
46681/* harmony import */ var _ctrlsFactory__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(237);
46682/* harmony import */ var _gridBodyComp_fakeHScrollComp__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(238);
46683/* harmony import */ var _gridBodyComp_pinnedWidthService__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(240);
46684/* harmony import */ var _gridBodyComp_rowContainer_rowContainerComp__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(144);
46685/* harmony import */ var _entities_rowNodeEventThrottle__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(241);
46686/* harmony import */ var _headerRendering_cells_column_standardMenu__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(172);
46687/* harmony import */ var _headerRendering_cells_column_sortIndicatorComp__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(87);
46688/* harmony import */ var _gridOptionsService__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(242);
46689/* harmony import */ var _localeService__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(243);
46690/* harmony import */ var _gridOptionsValidator__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(22);
46691/* harmony import */ var _gridBodyComp_fakeVScrollComp__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(244);
46692/**
46693 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
46694 * @version v29.2.0
46695 * @link https://www.ag-grid.com/
46696 * @license MIT
46697 */
46698var __read = (undefined && undefined.__read) || function (o, n) {
46699 var m = typeof Symbol === "function" && o[Symbol.iterator];
46700 if (!m) return o;
46701 var i = m.call(o), r, ar = [], e;
46702 try {
46703 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
46704 }
46705 catch (error) { e = { error: error }; }
46706 finally {
46707 try {
46708 if (r && !r.done && (m = i["return"])) m.call(i);
46709 }
46710 finally { if (e) throw e.error; }
46711 }
46712 return ar;
46713};
46714var __spread = (undefined && undefined.__spread) || function () {
46715 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
46716 return ar;
46717};
46718
46719
46720
46721
46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740
46741
46742
46743
46744
46745
46746
46747
46748
46749
46750
46751
46752
46753
46754
46755
46756
46757
46758
46759
46760
46761
46762
46763
46764
46765
46766
46767
46768
46769
46770
46771
46772
46773
46774
46775
46776
46777
46778
46779
46780
46781
46782
46783
46784
46785
46786
46787
46788
46789
46790
46791
46792
46793
46794
46795
46796
46797
46798
46799
46800
46801
46802
46803
46804
46805
46806
46807
46808
46809// creates JavaScript vanilla Grid, including JavaScript (ag-stack) components, which can
46810// be wrapped by the framework wrappers
46811var Grid = /** @class */ (function () {
46812 function Grid(eGridDiv, gridOptions, params) {
46813 if (!gridOptions) {
46814 console.error('AG Grid: no gridOptions provided to the grid');
46815 return;
46816 }
46817 this.gridOptions = gridOptions;
46818 new GridCoreCreator().create(eGridDiv, gridOptions, function (context) {
46819 var gridComp = new _gridComp_gridComp__WEBPACK_IMPORTED_MODULE_20__["GridComp"](eGridDiv);
46820 context.createBean(gridComp);
46821 }, undefined, params);
46822 }
46823 Grid.prototype.destroy = function () {
46824 if (this.gridOptions && this.gridOptions.api) {
46825 this.gridOptions.api.destroy();
46826 }
46827 };
46828 return Grid;
46829}());
46830
46831// created services of grid only, no UI, so frameworks can use this if providing
46832// their own UI
46833var GridCoreCreator = /** @class */ (function () {
46834 function GridCoreCreator() {
46835 }
46836 GridCoreCreator.prototype.create = function (eGridDiv, gridOptions, createUi, acceptChanges, params) {
46837 var _this = this;
46838 var debug = !!gridOptions.debug;
46839 var registeredModules = this.getRegisteredModules(params);
46840 var beanClasses = this.createBeansList(gridOptions.rowModelType, registeredModules);
46841 var providedBeanInstances = this.createProvidedBeans(eGridDiv, gridOptions, params);
46842 if (!beanClasses) {
46843 return;
46844 } // happens when no row model found
46845 var contextParams = {
46846 providedBeanInstances: providedBeanInstances,
46847 beanClasses: beanClasses,
46848 debug: debug
46849 };
46850 var logger = new _logger__WEBPACK_IMPORTED_MODULE_15__["Logger"]('AG Grid', function () { return gridOptions.debug; });
46851 var contextLogger = new _logger__WEBPACK_IMPORTED_MODULE_15__["Logger"]('Context', function () { return contextParams.debug; });
46852 var context = new _context_context__WEBPACK_IMPORTED_MODULE_19__["Context"](contextParams, contextLogger);
46853 var beans = context.getBean('beans');
46854 this.registerModuleUserComponents(beans, registeredModules);
46855 this.registerStackComponents(beans, registeredModules);
46856 this.registerControllers(beans, registeredModules);
46857 createUi(context);
46858 // we wait until the UI has finished initialising before setting in columns and rows
46859 beans.ctrlsService.whenReady(function () {
46860 _this.setColumnsAndData(beans);
46861 _this.dispatchGridReadyEvent(beans);
46862 var isEnterprise = _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_68__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_69__["ModuleNames"].EnterpriseCoreModule);
46863 logger.log("initialised successfully, enterprise = " + isEnterprise);
46864 });
46865 if (acceptChanges) {
46866 acceptChanges(context);
46867 }
46868 };
46869 GridCoreCreator.prototype.registerControllers = function (beans, registeredModules) {
46870 registeredModules.forEach(function (module) {
46871 if (module.controllers) {
46872 module.controllers.forEach(function (meta) { return beans.ctrlsFactory.register(meta); });
46873 }
46874 });
46875 };
46876 GridCoreCreator.prototype.registerStackComponents = function (beans, registeredModules) {
46877 var agStackComponents = this.createAgStackComponentsList(registeredModules);
46878 beans.agStackComponentsRegistry.setupComponents(agStackComponents);
46879 };
46880 GridCoreCreator.prototype.getRegisteredModules = function (params) {
46881 var passedViaConstructor = params ? params.modules : null;
46882 var registered = _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_68__["ModuleRegistry"].getRegisteredModules();
46883 var allModules = [];
46884 var mapNames = {};
46885 // adds to list and removes duplicates
46886 function addModule(moduleBased, mod) {
46887 function addIndividualModule(currentModule) {
46888 if (!mapNames[currentModule.moduleName]) {
46889 mapNames[currentModule.moduleName] = true;
46890 allModules.push(currentModule);
46891 _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_68__["ModuleRegistry"].register(currentModule, moduleBased);
46892 }
46893 }
46894 addIndividualModule(mod);
46895 if (mod.dependantModules) {
46896 mod.dependantModules.forEach(addModule.bind(null, moduleBased));
46897 }
46898 }
46899 if (passedViaConstructor) {
46900 passedViaConstructor.forEach(addModule.bind(null, true));
46901 }
46902 if (registered) {
46903 registered.forEach(addModule.bind(null, !_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_68__["ModuleRegistry"].isPackageBased()));
46904 }
46905 return allModules;
46906 };
46907 GridCoreCreator.prototype.registerModuleUserComponents = function (beans, registeredModules) {
46908 var moduleUserComps = this.extractModuleEntity(registeredModules, function (module) { return module.userComponents ? module.userComponents : []; });
46909 moduleUserComps.forEach(function (compMeta) {
46910 beans.userComponentRegistry.registerDefaultComponent(compMeta.componentName, compMeta.componentClass);
46911 });
46912 };
46913 GridCoreCreator.prototype.createProvidedBeans = function (eGridDiv, gridOptions, params) {
46914 var frameworkOverrides = params ? params.frameworkOverrides : null;
46915 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_74__["missing"])(frameworkOverrides)) {
46916 frameworkOverrides = new _vanillaFrameworkOverrides__WEBPACK_IMPORTED_MODULE_31__["VanillaFrameworkOverrides"]();
46917 }
46918 var seed = {
46919 gridOptions: gridOptions,
46920 eGridDiv: eGridDiv,
46921 globalEventListener: params ? params.globalEventListener : null,
46922 frameworkOverrides: frameworkOverrides
46923 };
46924 if (params && params.providedBeanInstances) {
46925 Object.assign(seed, params.providedBeanInstances);
46926 }
46927 return seed;
46928 };
46929 GridCoreCreator.prototype.createAgStackComponentsList = function (registeredModules) {
46930 var components = [
46931 { componentName: 'AgCheckbox', componentClass: _widgets_agCheckbox__WEBPACK_IMPORTED_MODULE_29__["AgCheckbox"] },
46932 { componentName: 'AgRadioButton', componentClass: _widgets_agRadioButton__WEBPACK_IMPORTED_MODULE_30__["AgRadioButton"] },
46933 { componentName: 'AgToggleButton', componentClass: _widgets_agToggleButton__WEBPACK_IMPORTED_MODULE_64__["AgToggleButton"] },
46934 { componentName: 'AgInputTextField', componentClass: _widgets_agInputTextField__WEBPACK_IMPORTED_MODULE_58__["AgInputTextField"] },
46935 { componentName: 'AgInputTextArea', componentClass: _widgets_agInputTextArea__WEBPACK_IMPORTED_MODULE_59__["AgInputTextArea"] },
46936 { componentName: 'AgInputNumberField', componentClass: _widgets_agInputNumberField__WEBPACK_IMPORTED_MODULE_61__["AgInputNumberField"] },
46937 { componentName: 'AgInputRange', componentClass: _widgets_agInputRange__WEBPACK_IMPORTED_MODULE_62__["AgInputRange"] },
46938 { componentName: 'AgSelect', componentClass: _widgets_agSelect__WEBPACK_IMPORTED_MODULE_63__["AgSelect"] },
46939 { componentName: 'AgSlider', componentClass: _widgets_agSlider__WEBPACK_IMPORTED_MODULE_60__["AgSlider"] },
46940 { componentName: 'AgGridBody', componentClass: _gridBodyComp_gridBodyComp__WEBPACK_IMPORTED_MODULE_8__["GridBodyComp"] },
46941 { componentName: 'AgHeaderRoot', componentClass: _headerRendering_gridHeaderComp__WEBPACK_IMPORTED_MODULE_4__["GridHeaderComp"] },
46942 { componentName: 'AgSortIndicator', componentClass: _headerRendering_cells_column_sortIndicatorComp__WEBPACK_IMPORTED_MODULE_86__["SortIndicatorComp"] },
46943 { componentName: 'AgPagination', componentClass: _pagination_paginationComp__WEBPACK_IMPORTED_MODULE_52__["PaginationComp"] },
46944 { componentName: 'AgOverlayWrapper', componentClass: _rendering_overlays_overlayWrapperComponent__WEBPACK_IMPORTED_MODULE_54__["OverlayWrapperComponent"] },
46945 { componentName: 'AgGroupComponent', componentClass: _widgets_agGroupComponent__WEBPACK_IMPORTED_MODULE_55__["AgGroupComponent"] },
46946 { componentName: 'AgPanel', componentClass: _widgets_agPanel__WEBPACK_IMPORTED_MODULE_57__["AgPanel"] },
46947 { componentName: 'AgDialog', componentClass: _widgets_agDialog__WEBPACK_IMPORTED_MODULE_56__["AgDialog"] },
46948 { componentName: 'AgRowContainer', componentClass: _gridBodyComp_rowContainer_rowContainerComp__WEBPACK_IMPORTED_MODULE_83__["RowContainerComp"] },
46949 { componentName: 'AgFakeHorizontalScroll', componentClass: _gridBodyComp_fakeHScrollComp__WEBPACK_IMPORTED_MODULE_81__["FakeHScrollComp"] },
46950 { componentName: 'AgFakeVerticalScroll', componentClass: _gridBodyComp_fakeVScrollComp__WEBPACK_IMPORTED_MODULE_90__["FakeVScrollComp"] }
46951 ];
46952 var moduleAgStackComps = this.extractModuleEntity(registeredModules, function (module) { return module.agStackComponents ? module.agStackComponents : []; });
46953 components = components.concat(moduleAgStackComps);
46954 return components;
46955 };
46956 GridCoreCreator.prototype.createBeansList = function (rowModelType, registeredModules) {
46957 if (rowModelType === void 0) { rowModelType = 'clientSide'; }
46958 // only load beans matching the required row model
46959 var rowModelModules = registeredModules.filter(function (module) { return !module.rowModel || module.rowModel === rowModelType; });
46960 // assert that the relevant module has been loaded
46961 var rowModelModuleNames = {
46962 clientSide: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_69__["ModuleNames"].ClientSideRowModelModule,
46963 infinite: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_69__["ModuleNames"].InfiniteRowModelModule,
46964 serverSide: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_69__["ModuleNames"].ServerSideRowModelModule,
46965 viewport: _modules_moduleNames__WEBPACK_IMPORTED_MODULE_69__["ModuleNames"].ViewportRowModelModule
46966 };
46967 if (!rowModelModuleNames[rowModelType]) {
46968 console.error('AG Grid: could not find row model for rowModelType = ' + rowModelType);
46969 return;
46970 }
46971 if (!_modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_68__["ModuleRegistry"].assertRegistered(rowModelModuleNames[rowModelType], "rowModelType = '" + rowModelType + "'")) {
46972 return;
46973 }
46974 // beans should only contain SERVICES, it should NEVER contain COMPONENTS
46975 var beans = [
46976 _rendering_beans__WEBPACK_IMPORTED_MODULE_46__["Beans"], _entities_rowPositionUtils__WEBPACK_IMPORTED_MODULE_65__["RowPositionUtils"], _entities_cellPositionUtils__WEBPACK_IMPORTED_MODULE_66__["CellPositionUtils"], _headerRendering_common_headerPosition__WEBPACK_IMPORTED_MODULE_72__["HeaderPositionUtils"],
46977 _pagination_paginationAutoPageSizeService__WEBPACK_IMPORTED_MODULE_38__["PaginationAutoPageSizeService"], _gridApi__WEBPACK_IMPORTED_MODULE_9__["GridApi"], _components_framework_userComponentRegistry__WEBPACK_IMPORTED_MODULE_43__["UserComponentRegistry"], _components_framework_agComponentUtils__WEBPACK_IMPORTED_MODULE_44__["AgComponentUtils"],
46978 _components_framework_componentMetadataProvider__WEBPACK_IMPORTED_MODULE_45__["ComponentMetadataProvider"], _misc_resizeObserverService__WEBPACK_IMPORTED_MODULE_53__["ResizeObserverService"], _components_framework_userComponentFactory__WEBPACK_IMPORTED_MODULE_42__["UserComponentFactory"],
46979 _rendering_rowContainerHeightService__WEBPACK_IMPORTED_MODULE_50__["RowContainerHeightService"], _headerRendering_common_horizontalResizeService__WEBPACK_IMPORTED_MODULE_18__["HorizontalResizeService"], _localeService__WEBPACK_IMPORTED_MODULE_88__["LocaleService"], _gridOptionsValidator__WEBPACK_IMPORTED_MODULE_89__["GridOptionsValidator"],
46980 _pinnedRowModel_pinnedRowModel__WEBPACK_IMPORTED_MODULE_67__["PinnedRowModel"], _dragAndDrop_dragService__WEBPACK_IMPORTED_MODULE_22__["DragService"], _columns_displayedGroupCreator__WEBPACK_IMPORTED_MODULE_11__["DisplayedGroupCreator"], _eventService__WEBPACK_IMPORTED_MODULE_7__["EventService"], _gridOptionsService__WEBPACK_IMPORTED_MODULE_87__["GridOptionsService"],
46981 _widgets_popupService__WEBPACK_IMPORTED_MODULE_14__["PopupService"], _selectionService__WEBPACK_IMPORTED_MODULE_0__["SelectionService"], _filter_filterManager__WEBPACK_IMPORTED_MODULE_5__["FilterManager"], _columns_columnModel__WEBPACK_IMPORTED_MODULE_2__["ColumnModel"], _headerRendering_common_headerNavigationService__WEBPACK_IMPORTED_MODULE_73__["HeaderNavigationService"],
46982 _pagination_paginationProxy__WEBPACK_IMPORTED_MODULE_37__["PaginationProxy"], _rendering_rowRenderer__WEBPACK_IMPORTED_MODULE_3__["RowRenderer"], _valueService_expressionService__WEBPACK_IMPORTED_MODULE_12__["ExpressionService"], _columns_columnFactory__WEBPACK_IMPORTED_MODULE_10__["ColumnFactory"], _templateService__WEBPACK_IMPORTED_MODULE_13__["TemplateService"],
46983 _alignedGridsService__WEBPACK_IMPORTED_MODULE_41__["AlignedGridsService"], _gridBodyComp_navigationService__WEBPACK_IMPORTED_MODULE_49__["NavigationService"], _valueService_valueCache__WEBPACK_IMPORTED_MODULE_39__["ValueCache"], _valueService_valueService__WEBPACK_IMPORTED_MODULE_6__["ValueService"], _logger__WEBPACK_IMPORTED_MODULE_15__["LoggerFactory"],
46984 _columns_columnUtils__WEBPACK_IMPORTED_MODULE_16__["ColumnUtils"], _rendering_autoWidthCalculator__WEBPACK_IMPORTED_MODULE_17__["AutoWidthCalculator"], _headerRendering_cells_column_standardMenu__WEBPACK_IMPORTED_MODULE_85__["StandardMenuFactory"], _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_21__["DragAndDropService"], _columns_columnApi__WEBPACK_IMPORTED_MODULE_1__["ColumnApi"],
46985 _focusService__WEBPACK_IMPORTED_MODULE_24__["FocusService"], _gridBodyComp_mouseEventService__WEBPACK_IMPORTED_MODULE_25__["MouseEventService"], _environment__WEBPACK_IMPORTED_MODULE_47__["Environment"], _cellNavigationService__WEBPACK_IMPORTED_MODULE_26__["CellNavigationService"], _rendering_valueFormatterService__WEBPACK_IMPORTED_MODULE_28__["ValueFormatterService"],
46986 _styling_stylingService__WEBPACK_IMPORTED_MODULE_33__["StylingService"], _gridBodyComp_scrollVisibleService__WEBPACK_IMPORTED_MODULE_32__["ScrollVisibleService"], _sortController__WEBPACK_IMPORTED_MODULE_23__["SortController"], _rendering_columnHoverService__WEBPACK_IMPORTED_MODULE_34__["ColumnHoverService"], _rendering_columnAnimationService__WEBPACK_IMPORTED_MODULE_35__["ColumnAnimationService"],
46987 _rowNodes_selectableService__WEBPACK_IMPORTED_MODULE_51__["SelectableService"], _columns_autoGroupColService__WEBPACK_IMPORTED_MODULE_36__["AutoGroupColService"], _valueService_changeDetectionService__WEBPACK_IMPORTED_MODULE_40__["ChangeDetectionService"], _misc_animationFrameService__WEBPACK_IMPORTED_MODULE_48__["AnimationFrameService"],
46988 _undoRedo_undoRedoService__WEBPACK_IMPORTED_MODULE_70__["UndoRedoService"], _components_agStackComponentsRegistry__WEBPACK_IMPORTED_MODULE_71__["AgStackComponentsRegistry"], _columns_columnDefFactory__WEBPACK_IMPORTED_MODULE_75__["ColumnDefFactory"],
46989 _rendering_row_rowCssClassCalculator__WEBPACK_IMPORTED_MODULE_76__["RowCssClassCalculator"], _rowNodeCache_rowNodeBlockLoader__WEBPACK_IMPORTED_MODULE_77__["RowNodeBlockLoader"], _rowNodes_rowNodeSorter__WEBPACK_IMPORTED_MODULE_78__["RowNodeSorter"], _ctrlsService__WEBPACK_IMPORTED_MODULE_79__["CtrlsService"],
46990 _gridBodyComp_pinnedWidthService__WEBPACK_IMPORTED_MODULE_82__["PinnedWidthService"], _entities_rowNodeEventThrottle__WEBPACK_IMPORTED_MODULE_84__["RowNodeEventThrottle"], _ctrlsFactory__WEBPACK_IMPORTED_MODULE_80__["CtrlsFactory"]
46991 ];
46992 var moduleBeans = this.extractModuleEntity(rowModelModules, function (module) { return module.beans ? module.beans : []; });
46993 beans.push.apply(beans, __spread(moduleBeans));
46994 // check for duplicates, as different modules could include the same beans that
46995 // they depend on, eg ClientSideRowModel in enterprise, and ClientSideRowModel in community
46996 var beansNoDuplicates = [];
46997 beans.forEach(function (bean) {
46998 if (beansNoDuplicates.indexOf(bean) < 0) {
46999 beansNoDuplicates.push(bean);
47000 }
47001 });
47002 return beansNoDuplicates;
47003 };
47004 GridCoreCreator.prototype.extractModuleEntity = function (moduleEntities, extractor) {
47005 return [].concat.apply([], __spread(moduleEntities.map(extractor)));
47006 };
47007 GridCoreCreator.prototype.setColumnsAndData = function (beans) {
47008 var columnDefs = beans.gridOptionsService.get('columnDefs');
47009 beans.columnModel.setColumnDefs(columnDefs || [], "gridInitializing");
47010 beans.rowModel.start();
47011 };
47012 GridCoreCreator.prototype.dispatchGridReadyEvent = function (beans) {
47013 var readyEvent = {
47014 type: _events__WEBPACK_IMPORTED_MODULE_27__["Events"].EVENT_GRID_READY,
47015 };
47016 beans.eventService.dispatchEvent(readyEvent);
47017 };
47018 return GridCoreCreator;
47019}());
47020
47021
47022
47023/***/ }),
47024/* 207 */
47025/***/ (function(module, __webpack_exports__, __webpack_require__) {
47026
47027"use strict";
47028__webpack_require__.r(__webpack_exports__);
47029/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionService", function() { return SelectionService; });
47030/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
47031/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
47032/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
47033/* harmony import */ var _utils_changedPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(183);
47034/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12);
47035/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
47036/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(39);
47037/**
47038 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
47039 * @version v29.2.0
47040 * @link https://www.ag-grid.com/
47041 * @license MIT
47042 */
47043var __extends = (undefined && undefined.__extends) || (function () {
47044 var extendStatics = function (d, b) {
47045 extendStatics = Object.setPrototypeOf ||
47046 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
47047 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
47048 return extendStatics(d, b);
47049 };
47050 return function (d, b) {
47051 extendStatics(d, b);
47052 function __() { this.constructor = d; }
47053 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
47054 };
47055})();
47056var __assign = (undefined && undefined.__assign) || function () {
47057 __assign = Object.assign || function(t) {
47058 for (var s, i = 1, n = arguments.length; i < n; i++) {
47059 s = arguments[i];
47060 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
47061 t[p] = s[p];
47062 }
47063 return t;
47064 };
47065 return __assign.apply(this, arguments);
47066};
47067var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
47068 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
47069 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
47070 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;
47071 return c > 3 && r && Object.defineProperty(target, key, r), r;
47072};
47073var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
47074 return function (target, key) { decorator(target, key, paramIndex); }
47075};
47076var __read = (undefined && undefined.__read) || function (o, n) {
47077 var m = typeof Symbol === "function" && o[Symbol.iterator];
47078 if (!m) return o;
47079 var i = m.call(o), r, ar = [], e;
47080 try {
47081 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
47082 }
47083 catch (error) { e = { error: error }; }
47084 finally {
47085 try {
47086 if (r && !r.done && (m = i["return"])) m.call(i);
47087 }
47088 finally { if (e) throw e.error; }
47089 }
47090 return ar;
47091};
47092
47093
47094
47095
47096
47097
47098
47099
47100
47101
47102var SelectionService = /** @class */ (function (_super) {
47103 __extends(SelectionService, _super);
47104 function SelectionService() {
47105 return _super !== null && _super.apply(this, arguments) || this;
47106 }
47107 SelectionService.prototype.setBeans = function (loggerFactory) {
47108 this.logger = loggerFactory.create('selectionService');
47109 this.reset();
47110 };
47111 SelectionService.prototype.init = function () {
47112 var _this = this;
47113 this.groupSelectsChildren = this.gridOptionsService.is('groupSelectsChildren');
47114 this.addManagedPropertyListener('groupSelectsChildren', function (propChange) { return _this.groupSelectsChildren = propChange.currentValue; });
47115 this.rowSelection = this.gridOptionsService.get('rowSelection');
47116 this.addManagedPropertyListener('rowSelection', function (propChange) { return _this.rowSelection = propChange.currentValue; });
47117 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_SELECTED, this.onRowSelected.bind(this));
47118 };
47119 SelectionService.prototype.isMultiselect = function () {
47120 return this.rowSelection === 'multiple';
47121 };
47122 SelectionService.prototype.setNodeSelected = function (params) {
47123 var _a;
47124 var newValue = params.newValue, clearSelection = params.clearSelection, suppressFinishActions = params.suppressFinishActions, rangeSelect = params.rangeSelect, event = params.event, node = params.node, _b = params.source, source = _b === void 0 ? 'api' : _b;
47125 // groupSelectsFiltered only makes sense when group selects children
47126 var groupSelectsFiltered = this.groupSelectsChildren && (params.groupSelectsFiltered === true);
47127 if (node.id === undefined) {
47128 console.warn('AG Grid: cannot select node until id for node is known');
47129 return 0;
47130 }
47131 if (node.rowPinned) {
47132 console.warn('AG Grid: cannot select pinned rows');
47133 return 0;
47134 }
47135 // if we are a footer, we don't do selection, just pass the info
47136 // to the sibling (the parent of the group)
47137 if (node.footer) {
47138 return this.setNodeSelected(__assign(__assign({}, params), { node: node.sibling }));
47139 }
47140 var lastSelectedNode = this.getLastSelectedNode();
47141 if (rangeSelect && lastSelectedNode) {
47142 var newRowClicked = lastSelectedNode !== node;
47143 if (newRowClicked && this.isMultiselect()) {
47144 var nodesChanged = this.selectRange(node, lastSelectedNode, params.newValue, source);
47145 this.setLastSelectedNode(node);
47146 return nodesChanged;
47147 }
47148 }
47149 // when groupSelectsFiltered, then this node may end up intermediate despite
47150 // trying to set it to true / false. this group will be calculated further on
47151 // down when we call calculatedSelectedForAllGroupNodes(). we need to skip it
47152 // here, otherwise the updatedCount would include it.
47153 var skipThisNode = groupSelectsFiltered && node.group;
47154 var updatedCount = 0;
47155 if (!skipThisNode) {
47156 var thisNodeWasSelected = node.selectThisNode(newValue, params.event, source);
47157 if (thisNodeWasSelected) {
47158 updatedCount++;
47159 }
47160 }
47161 if (this.groupSelectsChildren && ((_a = node.childrenAfterGroup) === null || _a === void 0 ? void 0 : _a.length)) {
47162 updatedCount += this.selectChildren(node, newValue, groupSelectsFiltered, source);
47163 }
47164 // clear other nodes if not doing multi select
47165 if (!suppressFinishActions) {
47166 var clearOtherNodes = newValue && (clearSelection || !this.isMultiselect());
47167 if (clearOtherNodes) {
47168 updatedCount += this.clearOtherNodes(node, source);
47169 }
47170 // only if we selected something, then update groups and fire events
47171 if (updatedCount > 0) {
47172 this.updateGroupsFromChildrenSelections(source);
47173 // this is the very end of the 'action node', so we are finished all the updates,
47174 // include any parent / child changes that this method caused
47175 var event_1 = {
47176 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SELECTION_CHANGED,
47177 source: source
47178 };
47179 this.eventService.dispatchEvent(event_1);
47180 }
47181 // so if user next does shift-select, we know where to start the selection from
47182 if (newValue) {
47183 this.setLastSelectedNode(node);
47184 }
47185 }
47186 return updatedCount;
47187 };
47188 // selects all rows between this node and the last selected node (or the top if this is the first selection).
47189 // not to be mixed up with 'cell range selection' where you drag the mouse, this is row range selection, by
47190 // holding down 'shift'.
47191 SelectionService.prototype.selectRange = function (fromNode, toNode, value, source) {
47192 var _this = this;
47193 if (value === void 0) { value = true; }
47194 var nodesToSelect = this.rowModel.getNodesInRangeForSelection(fromNode, toNode);
47195 var updatedCount = 0;
47196 nodesToSelect.forEach(function (rowNode) {
47197 if (rowNode.group && _this.groupSelectsChildren || (value === false && fromNode === rowNode)) {
47198 return;
47199 }
47200 var nodeWasSelected = rowNode.selectThisNode(value, undefined, source);
47201 if (nodeWasSelected) {
47202 updatedCount++;
47203 }
47204 });
47205 this.updateGroupsFromChildrenSelections(source);
47206 var event = {
47207 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SELECTION_CHANGED,
47208 source: source
47209 };
47210 this.eventService.dispatchEvent(event);
47211 return updatedCount;
47212 };
47213 SelectionService.prototype.selectChildren = function (node, newValue, groupSelectsFiltered, source) {
47214 var children = groupSelectsFiltered ? node.childrenAfterAggFilter : node.childrenAfterGroup;
47215 if (_utils__WEBPACK_IMPORTED_MODULE_6__["_"].missing(children)) {
47216 return 0;
47217 }
47218 var updatedCount = 0;
47219 for (var i = 0; i < children.length; i++) {
47220 updatedCount += children[i].setSelectedParams({
47221 newValue: newValue,
47222 clearSelection: false,
47223 suppressFinishActions: true,
47224 groupSelectsFiltered: groupSelectsFiltered,
47225 source: source
47226 });
47227 }
47228 return updatedCount;
47229 };
47230 SelectionService.prototype.setLastSelectedNode = function (rowNode) {
47231 this.lastSelectedNode = rowNode;
47232 };
47233 SelectionService.prototype.getLastSelectedNode = function () {
47234 return this.lastSelectedNode;
47235 };
47236 SelectionService.prototype.getSelectedNodes = function () {
47237 var selectedNodes = [];
47238 Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["iterateObject"])(this.selectedNodes, function (key, rowNode) {
47239 if (rowNode) {
47240 selectedNodes.push(rowNode);
47241 }
47242 });
47243 return selectedNodes;
47244 };
47245 SelectionService.prototype.getSelectedRows = function () {
47246 var selectedRows = [];
47247 Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["iterateObject"])(this.selectedNodes, function (key, rowNode) {
47248 if (rowNode && rowNode.data) {
47249 selectedRows.push(rowNode.data);
47250 }
47251 });
47252 return selectedRows;
47253 };
47254 SelectionService.prototype.getSelectionCount = function () {
47255 return Object.values(this.selectedNodes).length;
47256 };
47257 /**
47258 * This method is used by the CSRM to remove groups which are being disposed of,
47259 * events do not need fired in this case
47260 */
47261 SelectionService.prototype.filterFromSelection = function (predicate) {
47262 var newSelectedNodes = {};
47263 Object.entries(this.selectedNodes).forEach(function (_a) {
47264 var _b = __read(_a, 2), key = _b[0], node = _b[1];
47265 var passesPredicate = node && predicate(node);
47266 if (passesPredicate) {
47267 newSelectedNodes[key] = node;
47268 }
47269 });
47270 this.selectedNodes = newSelectedNodes;
47271 };
47272 // should only be called if groupSelectsChildren=true
47273 SelectionService.prototype.updateGroupsFromChildrenSelections = function (source, changedPath) {
47274 // we only do this when group selection state depends on selected children
47275 if (!this.groupSelectsChildren) {
47276 return false;
47277 }
47278 // also only do it if CSRM (code should never allow this anyway)
47279 if (this.rowModel.getType() !== 'clientSide') {
47280 return false;
47281 }
47282 var clientSideRowModel = this.rowModel;
47283 var rootNode = clientSideRowModel.getRootNode();
47284 if (!changedPath) {
47285 changedPath = new _utils_changedPath__WEBPACK_IMPORTED_MODULE_3__["ChangedPath"](true, rootNode);
47286 changedPath.setInactive();
47287 }
47288 var selectionChanged = false;
47289 changedPath.forEachChangedNodeDepthFirst(function (rowNode) {
47290 if (rowNode !== rootNode) {
47291 var selected = rowNode.calculateSelectedFromChildren();
47292 selectionChanged = rowNode.selectThisNode(selected === null ? false : selected, undefined, source) || selectionChanged;
47293 }
47294 });
47295 return selectionChanged;
47296 };
47297 SelectionService.prototype.clearOtherNodes = function (rowNodeToKeepSelected, source) {
47298 var _this = this;
47299 var groupsToRefresh = {};
47300 var updatedCount = 0;
47301 Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["iterateObject"])(this.selectedNodes, function (key, otherRowNode) {
47302 if (otherRowNode && otherRowNode.id !== rowNodeToKeepSelected.id) {
47303 var rowNode = _this.selectedNodes[otherRowNode.id];
47304 updatedCount += rowNode.setSelectedParams({
47305 newValue: false,
47306 clearSelection: false,
47307 suppressFinishActions: true,
47308 source: source
47309 });
47310 if (_this.groupSelectsChildren && otherRowNode.parent) {
47311 groupsToRefresh[otherRowNode.parent.id] = otherRowNode.parent;
47312 }
47313 }
47314 });
47315 Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["iterateObject"])(groupsToRefresh, function (key, group) {
47316 var selected = group.calculateSelectedFromChildren();
47317 group.selectThisNode(selected === null ? false : selected, undefined, source);
47318 });
47319 return updatedCount;
47320 };
47321 SelectionService.prototype.onRowSelected = function (event) {
47322 var rowNode = event.node;
47323 // we do not store the group rows when the groups select children
47324 if (this.groupSelectsChildren && rowNode.group) {
47325 return;
47326 }
47327 if (rowNode.isSelected()) {
47328 this.selectedNodes[rowNode.id] = rowNode;
47329 }
47330 else {
47331 this.selectedNodes[rowNode.id] = undefined;
47332 }
47333 };
47334 SelectionService.prototype.syncInRowNode = function (rowNode, oldNode) {
47335 this.syncInOldRowNode(rowNode, oldNode);
47336 this.syncInNewRowNode(rowNode);
47337 };
47338 // if the id has changed for the node, then this means the rowNode
47339 // is getting used for a different data item, which breaks
47340 // our selectedNodes, as the node now is mapped by the old id
47341 // which is inconsistent. so to keep the old node as selected,
47342 // we swap in the clone (with the old id and old data). this means
47343 // the oldNode is effectively a daemon we keep a reference to,
47344 // so if client calls api.getSelectedNodes(), it gets the daemon
47345 // in the result. when the client un-selects, the reference to the
47346 // daemon is removed. the daemon, because it's an oldNode, is not
47347 // used by the grid for rendering, it's a copy of what the node used
47348 // to be like before the id was changed.
47349 SelectionService.prototype.syncInOldRowNode = function (rowNode, oldNode) {
47350 var oldNodeHasDifferentId = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(oldNode) && (rowNode.id !== oldNode.id);
47351 if (oldNodeHasDifferentId && oldNode) {
47352 var id = oldNode.id;
47353 var oldNodeSelected = this.selectedNodes[id] == rowNode;
47354 if (oldNodeSelected) {
47355 this.selectedNodes[oldNode.id] = oldNode;
47356 }
47357 }
47358 };
47359 SelectionService.prototype.syncInNewRowNode = function (rowNode) {
47360 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(this.selectedNodes[rowNode.id])) {
47361 rowNode.setSelectedInitialValue(true);
47362 this.selectedNodes[rowNode.id] = rowNode;
47363 }
47364 else {
47365 rowNode.setSelectedInitialValue(false);
47366 }
47367 };
47368 SelectionService.prototype.reset = function () {
47369 this.logger.log('reset');
47370 this.selectedNodes = {};
47371 this.lastSelectedNode = null;
47372 };
47373 // returns a list of all nodes at 'best cost' - a feature to be used
47374 // with groups / trees. if a group has all it's children selected,
47375 // then the group appears in the result, but not the children.
47376 // Designed for use with 'children' as the group selection type,
47377 // where groups don't actually appear in the selection normally.
47378 SelectionService.prototype.getBestCostNodeSelection = function () {
47379 if (this.rowModel.getType() !== 'clientSide') {
47380 // Error logged as part of gridApi as that is only call point for this method.
47381 return;
47382 }
47383 var clientSideRowModel = this.rowModel;
47384 var topLevelNodes = clientSideRowModel.getTopLevelNodes();
47385 if (topLevelNodes === null) {
47386 return;
47387 }
47388 var result = [];
47389 // recursive function, to find the selected nodes
47390 function traverse(nodes) {
47391 for (var i = 0, l = nodes.length; i < l; i++) {
47392 var node = nodes[i];
47393 if (node.isSelected()) {
47394 result.push(node);
47395 }
47396 else {
47397 // if not selected, then if it's a group, and the group
47398 // has children, continue to search for selections
47399 var maybeGroup = node;
47400 if (maybeGroup.group && maybeGroup.children) {
47401 traverse(maybeGroup.children);
47402 }
47403 }
47404 }
47405 }
47406 traverse(topLevelNodes);
47407 return result;
47408 };
47409 SelectionService.prototype.isEmpty = function () {
47410 var count = 0;
47411 Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["iterateObject"])(this.selectedNodes, function (nodeId, rowNode) {
47412 if (rowNode) {
47413 count++;
47414 }
47415 });
47416 return count === 0;
47417 };
47418 SelectionService.prototype.deselectAllRowNodes = function (params) {
47419 var callback = function (rowNode) { return rowNode.selectThisNode(false, undefined, source); };
47420 var rowModelClientSide = this.rowModel.getType() === 'clientSide';
47421 var source = params.source, justFiltered = params.justFiltered, justCurrentPage = params.justCurrentPage;
47422 if (justCurrentPage || justFiltered) {
47423 if (!rowModelClientSide) {
47424 console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");
47425 return;
47426 }
47427 this.getNodesToSelect(justFiltered, justCurrentPage).forEach(callback);
47428 }
47429 else {
47430 Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["iterateObject"])(this.selectedNodes, function (id, rowNode) {
47431 // remember the reference can be to null, as we never 'delete' from the map
47432 if (rowNode) {
47433 callback(rowNode);
47434 }
47435 });
47436 // this clears down the map (whereas above only sets the items in map to 'undefined')
47437 this.reset();
47438 }
47439 // the above does not clean up the parent rows if they are selected
47440 if (rowModelClientSide && this.groupSelectsChildren) {
47441 this.updateGroupsFromChildrenSelections(source);
47442 }
47443 var event = {
47444 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SELECTION_CHANGED,
47445 source: source
47446 };
47447 this.eventService.dispatchEvent(event);
47448 };
47449 SelectionService.prototype.getSelectAllState = function (justFiltered, justCurrentPage) {
47450 var _this = this;
47451 var selectedCount = 0;
47452 var notSelectedCount = 0;
47453 var callback = function (node) {
47454 if (_this.groupSelectsChildren && node.group) {
47455 return;
47456 }
47457 if (node.isSelected()) {
47458 selectedCount++;
47459 }
47460 else if (!node.selectable) {
47461 // don't count non-selectable nodes!
47462 }
47463 else {
47464 notSelectedCount++;
47465 }
47466 };
47467 this.getNodesToSelect(justFiltered, justCurrentPage).forEach(callback);
47468 // if no rows, always have it unselected
47469 if (selectedCount === 0 && notSelectedCount === 0) {
47470 return false;
47471 }
47472 // if mix of selected and unselected, this is indeterminate
47473 if (selectedCount > 0 && notSelectedCount > 0) {
47474 return null;
47475 }
47476 // only selected
47477 return selectedCount > 0;
47478 };
47479 /**
47480 * @param justFiltered whether to just include nodes which have passed the filter
47481 * @param justCurrentPage whether to just include nodes on the current page
47482 * @returns all nodes including unselectable nodes which are the target of this selection attempt
47483 */
47484 SelectionService.prototype.getNodesToSelect = function (justFiltered, justCurrentPage) {
47485 var _this = this;
47486 if (justFiltered === void 0) { justFiltered = false; }
47487 if (justCurrentPage === void 0) { justCurrentPage = false; }
47488 if (this.rowModel.getType() !== 'clientSide') {
47489 throw new Error("selectAll only available when rowModelType='clientSide', ie not " + this.rowModel.getType());
47490 }
47491 var nodes = [];
47492 if (justCurrentPage) {
47493 this.paginationProxy.forEachNodeOnPage(function (node) {
47494 if (!node.group) {
47495 nodes.push(node);
47496 return;
47497 }
47498 if (!node.expanded) {
47499 // even with groupSelectsChildren, do this recursively as only the filtered children
47500 // are considered as the current page
47501 var recursivelyAddChildren_1 = function (child) {
47502 var _a;
47503 nodes.push(child);
47504 if ((_a = child.childrenAfterFilter) === null || _a === void 0 ? void 0 : _a.length) {
47505 child.childrenAfterFilter.forEach(recursivelyAddChildren_1);
47506 }
47507 };
47508 recursivelyAddChildren_1(node);
47509 return;
47510 }
47511 // if the group node is expanded, the pagination proxy will include the visible nodes to select
47512 if (!_this.groupSelectsChildren) {
47513 nodes.push(node);
47514 }
47515 });
47516 return nodes;
47517 }
47518 var clientSideRowModel = this.rowModel;
47519 if (justFiltered) {
47520 clientSideRowModel.forEachNodeAfterFilter(function (node) {
47521 nodes.push(node);
47522 });
47523 return nodes;
47524 }
47525 clientSideRowModel.forEachNode(function (node) {
47526 nodes.push(node);
47527 });
47528 return nodes;
47529 };
47530 SelectionService.prototype.selectAllRowNodes = function (params) {
47531 if (this.rowModel.getType() !== 'clientSide') {
47532 throw new Error("selectAll only available when rowModelType='clientSide', ie not " + this.rowModel.getType());
47533 }
47534 var source = params.source, justFiltered = params.justFiltered, justCurrentPage = params.justCurrentPage;
47535 var callback = function (rowNode) { return rowNode.selectThisNode(true, undefined, source); };
47536 this.getNodesToSelect(justFiltered, justCurrentPage).forEach(callback);
47537 // the above does not clean up the parent rows if they are selected
47538 if (this.rowModel.getType() === 'clientSide' && this.groupSelectsChildren) {
47539 this.updateGroupsFromChildrenSelections(source);
47540 }
47541 var event = {
47542 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SELECTION_CHANGED,
47543 source: source
47544 };
47545 this.eventService.dispatchEvent(event);
47546 };
47547 // Used by SSRM
47548 SelectionService.prototype.getServerSideSelectionState = function () {
47549 return null;
47550 };
47551 SelectionService.prototype.setServerSideSelectionState = function (state) { };
47552 __decorate([
47553 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
47554 ], SelectionService.prototype, "rowModel", void 0);
47555 __decorate([
47556 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
47557 ], SelectionService.prototype, "paginationProxy", void 0);
47558 __decorate([
47559 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('loggerFactory'))
47560 ], SelectionService.prototype, "setBeans", null);
47561 __decorate([
47562 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
47563 ], SelectionService.prototype, "init", null);
47564 SelectionService = __decorate([
47565 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('selectionService')
47566 ], SelectionService);
47567 return SelectionService;
47568}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
47569
47570
47571
47572/***/ }),
47573/* 208 */
47574/***/ (function(module, __webpack_exports__, __webpack_require__) {
47575
47576"use strict";
47577__webpack_require__.r(__webpack_exports__);
47578/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnApi", function() { return ColumnApi; });
47579/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
47580/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
47581/* harmony import */ var _gridOptionsValidator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22);
47582/**
47583 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
47584 * @version v29.2.0
47585 * @link https://www.ag-grid.com/
47586 * @license MIT
47587 */
47588var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
47589 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
47590 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
47591 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;
47592 return c > 3 && r && Object.defineProperty(target, key, r), r;
47593};
47594
47595
47596
47597var ColumnApi = /** @class */ (function () {
47598 function ColumnApi() {
47599 }
47600 /** 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. */
47601 ColumnApi.prototype.sizeColumnsToFit = function (gridWidth) {
47602 // AG-3403 validate that gridWidth is provided because this method has the same name as
47603 // a method on the grid API that takes no arguments, and it's easy to confuse the two
47604 if (typeof gridWidth === "undefined") {
47605 console.error('AG Grid: missing parameter to columnApi.sizeColumnsToFit(gridWidth)');
47606 }
47607 this.columnModel.sizeColumnsToFit(gridWidth, 'api');
47608 };
47609 /** Call this if you want to open or close a column group. */
47610 ColumnApi.prototype.setColumnGroupOpened = function (group, newValue) { this.columnModel.setColumnGroupOpened(group, newValue, 'api'); };
47611 /** Returns the column group with the given name. */
47612 ColumnApi.prototype.getColumnGroup = function (name, instanceId) { return this.columnModel.getColumnGroup(name, instanceId); };
47613 /** Returns the provided column group with the given name. */
47614 ColumnApi.prototype.getProvidedColumnGroup = function (name) { return this.columnModel.getProvidedColumnGroup(name); };
47615 /** 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. */
47616 ColumnApi.prototype.getDisplayNameForColumn = function (column, location) { return this.columnModel.getDisplayNameForColumn(column, location) || ''; };
47617 /** Returns the display name for a column group (when grouping columns). */
47618 ColumnApi.prototype.getDisplayNameForColumnGroup = function (columnGroup, location) { return this.columnModel.getDisplayNameForColumnGroup(columnGroup, location) || ''; };
47619 /** Returns the column with the given `colKey`, which can either be the `colId` (a string) or the `colDef` (an object). */
47620 ColumnApi.prototype.getColumn = function (key) { return this.columnModel.getPrimaryColumn(key); };
47621 /** Returns all the columns, regardless of visible or not. */
47622 ColumnApi.prototype.getColumns = function () { return this.columnModel.getAllPrimaryColumns(); };
47623 /** Applies the state of the columns from a previous state. Returns `false` if one or more columns could not be found. */
47624 ColumnApi.prototype.applyColumnState = function (params) { return this.columnModel.applyColumnState(params, 'api'); };
47625 /** Gets the state of the columns. Typically used when saving column state. */
47626 ColumnApi.prototype.getColumnState = function () { return this.columnModel.getColumnState(); };
47627 /** Sets the state back to match the originally provided column definitions. */
47628 ColumnApi.prototype.resetColumnState = function () { this.columnModel.resetColumnState('api'); };
47629 /** Gets the state of the column groups. Typically used when saving column group state. */
47630 ColumnApi.prototype.getColumnGroupState = function () { return this.columnModel.getColumnGroupState(); };
47631 /** Sets the state of the column group state from a previous state. */
47632 ColumnApi.prototype.setColumnGroupState = function (stateItems) { this.columnModel.setColumnGroupState(stateItems, 'api'); };
47633 /** Sets the state back to match the originally provided column definitions. */
47634 ColumnApi.prototype.resetColumnGroupState = function () { this.columnModel.resetColumnGroupState('api'); };
47635 /** Returns `true` if pinning left or right, otherwise `false`. */
47636 ColumnApi.prototype.isPinning = function () { return this.columnModel.isPinningLeft() || this.columnModel.isPinningRight(); };
47637 /** Returns `true` if pinning left, otherwise `false`. */
47638 ColumnApi.prototype.isPinningLeft = function () { return this.columnModel.isPinningLeft(); };
47639 /** Returns `true` if pinning right, otherwise `false`. */
47640 ColumnApi.prototype.isPinningRight = function () { return this.columnModel.isPinningRight(); };
47641 /** 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. */
47642 ColumnApi.prototype.getDisplayedColAfter = function (col) { return this.columnModel.getDisplayedColAfter(col); };
47643 /** Same as `getVisibleColAfter` except gives column to the left. */
47644 ColumnApi.prototype.getDisplayedColBefore = function (col) { return this.columnModel.getDisplayedColBefore(col); };
47645 /** Sets the visibility of a column. Key can be the column ID or `Column` object. */
47646 ColumnApi.prototype.setColumnVisible = function (key, visible) { this.columnModel.setColumnVisible(key, visible, 'api'); };
47647 /** Same as `setColumnVisible`, but provide a list of column keys. */
47648 ColumnApi.prototype.setColumnsVisible = function (keys, visible) { this.columnModel.setColumnsVisible(keys, visible, 'api'); };
47649 /** Sets the column pinned / unpinned. Key can be the column ID, field, `ColDef` object or `Column` object. */
47650 ColumnApi.prototype.setColumnPinned = function (key, pinned) { this.columnModel.setColumnPinned(key, pinned, 'api'); };
47651 /** Same as `setColumnPinned`, but provide a list of column keys. */
47652 ColumnApi.prototype.setColumnsPinned = function (keys, pinned) { this.columnModel.setColumnsPinned(keys, pinned, 'api'); };
47653 /**
47654 * Returns all the grid columns, same as `getColumns()`, except
47655 *
47656 * a) it has the order of the columns that are presented in the grid
47657 *
47658 * b) it's after the 'pivot' step, so if pivoting, has the value columns for the pivot.
47659 */
47660 ColumnApi.prototype.getAllGridColumns = function () { return this.columnModel.getAllGridColumns(); };
47661 /** Same as `getAllDisplayedColumns` but just for the pinned left portion of the grid. */
47662 ColumnApi.prototype.getDisplayedLeftColumns = function () { return this.columnModel.getDisplayedLeftColumns(); };
47663 /** Same as `getAllDisplayedColumns` but just for the center portion of the grid. */
47664 ColumnApi.prototype.getDisplayedCenterColumns = function () { return this.columnModel.getDisplayedCenterColumns(); };
47665 /** Same as `getAllDisplayedColumns` but just for the pinned right portion of the grid. */
47666 ColumnApi.prototype.getDisplayedRightColumns = function () { return this.columnModel.getDisplayedRightColumns(); };
47667 /** 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. */
47668 ColumnApi.prototype.getAllDisplayedColumns = function () { return this.columnModel.getAllDisplayedColumns(); };
47669 /** 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. */
47670 ColumnApi.prototype.getAllDisplayedVirtualColumns = function () { return this.columnModel.getViewportColumns(); };
47671 /** 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. */
47672 ColumnApi.prototype.moveColumn = function (key, toIndex) {
47673 this.columnModel.moveColumn(key, toIndex, 'api');
47674 };
47675 /** Same as `moveColumn` but works on index locations. */
47676 ColumnApi.prototype.moveColumnByIndex = function (fromIndex, toIndex) { this.columnModel.moveColumnByIndex(fromIndex, toIndex, 'api'); };
47677 /** Same as `moveColumn` but works on list. */
47678 ColumnApi.prototype.moveColumns = function (columnsToMoveKeys, toIndex) { this.columnModel.moveColumns(columnsToMoveKeys, toIndex, 'api'); };
47679 /** Move the column to a new position in the row grouping order. */
47680 ColumnApi.prototype.moveRowGroupColumn = function (fromIndex, toIndex) { this.columnModel.moveRowGroupColumn(fromIndex, toIndex); };
47681 /** Sets the agg function for a column. `aggFunc` can be one of the built-in aggregations or a custom aggregation by name or direct function. */
47682 ColumnApi.prototype.setColumnAggFunc = function (key, aggFunc) { this.columnModel.setColumnAggFunc(key, aggFunc); };
47683 /** 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`. */
47684 ColumnApi.prototype.setColumnWidth = function (key, newWidth, finished, source) {
47685 if (finished === void 0) { finished = true; }
47686 this.columnModel.setColumnWidths([{ key: key, newWidth: newWidth }], false, finished, source);
47687 };
47688 /** 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`. */
47689 ColumnApi.prototype.setColumnWidths = function (columnWidths, finished, source) {
47690 if (finished === void 0) { finished = true; }
47691 this.columnModel.setColumnWidths(columnWidths, false, finished, source);
47692 };
47693 /** Set the pivot mode. */
47694 ColumnApi.prototype.setPivotMode = function (pivotMode) { this.columnModel.setPivotMode(pivotMode); };
47695 /** Get the pivot mode. */
47696 ColumnApi.prototype.isPivotMode = function () { return this.columnModel.isPivotMode(); };
47697 /** Returns the pivot result column for the given `pivotKeys` and `valueColId`. Useful to then call operations on the pivot column. */
47698 ColumnApi.prototype.getPivotResultColumn = function (pivotKeys, valueColKey) { return this.columnModel.getSecondaryPivotColumn(pivotKeys, valueColKey); };
47699 /** Set the value columns to the provided list of columns. */
47700 ColumnApi.prototype.setValueColumns = function (colKeys) { this.columnModel.setValueColumns(colKeys, 'api'); };
47701 /** Get a list of the existing value columns. */
47702 ColumnApi.prototype.getValueColumns = function () { return this.columnModel.getValueColumns(); };
47703 /** Remove the given column from the existing set of value columns. */
47704 ColumnApi.prototype.removeValueColumn = function (colKey) { this.columnModel.removeValueColumn(colKey, 'api'); };
47705 /** Like `removeValueColumn` but remove the given list of columns from the existing set of value columns. */
47706 ColumnApi.prototype.removeValueColumns = function (colKeys) { this.columnModel.removeValueColumns(colKeys, 'api'); };
47707 /** Add the given column to the set of existing value columns. */
47708 ColumnApi.prototype.addValueColumn = function (colKey) { this.columnModel.addValueColumn(colKey, 'api'); };
47709 /** Like `addValueColumn` but add the given list of columns to the existing set of value columns. */
47710 ColumnApi.prototype.addValueColumns = function (colKeys) { this.columnModel.addValueColumns(colKeys, 'api'); };
47711 /** Set the row group columns. */
47712 ColumnApi.prototype.setRowGroupColumns = function (colKeys) { this.columnModel.setRowGroupColumns(colKeys, 'api'); };
47713 /** Remove a column from the row groups. */
47714 ColumnApi.prototype.removeRowGroupColumn = function (colKey) { this.columnModel.removeRowGroupColumn(colKey, 'api'); };
47715 /** Same as `removeRowGroupColumn` but provide a list of columns. */
47716 ColumnApi.prototype.removeRowGroupColumns = function (colKeys) { this.columnModel.removeRowGroupColumns(colKeys, 'api'); };
47717 /** Add a column to the row groups. */
47718 ColumnApi.prototype.addRowGroupColumn = function (colKey) { this.columnModel.addRowGroupColumn(colKey, 'api'); };
47719 /** Same as `addRowGroupColumn` but provide a list of columns. */
47720 ColumnApi.prototype.addRowGroupColumns = function (colKeys) { this.columnModel.addRowGroupColumns(colKeys, 'api'); };
47721 /** Get row group columns. */
47722 ColumnApi.prototype.getRowGroupColumns = function () { return this.columnModel.getRowGroupColumns(); };
47723 /** Set the pivot columns. */
47724 ColumnApi.prototype.setPivotColumns = function (colKeys) { this.columnModel.setPivotColumns(colKeys, 'api'); };
47725 /** Remove a pivot column. */
47726 ColumnApi.prototype.removePivotColumn = function (colKey) { this.columnModel.removePivotColumn(colKey, 'api'); };
47727 /** Same as `removePivotColumn` but provide a list of columns. */
47728 ColumnApi.prototype.removePivotColumns = function (colKeys) { this.columnModel.removePivotColumns(colKeys, 'api'); };
47729 /** Add a pivot column. */
47730 ColumnApi.prototype.addPivotColumn = function (colKey) { this.columnModel.addPivotColumn(colKey, 'api'); };
47731 /** Same as `addPivotColumn` but provide a list of columns. */
47732 ColumnApi.prototype.addPivotColumns = function (colKeys) { this.columnModel.addPivotColumns(colKeys, 'api'); };
47733 /** Get the pivot columns. */
47734 ColumnApi.prototype.getPivotColumns = function () { return this.columnModel.getPivotColumns(); };
47735 /** Same as `getAllDisplayedColumnGroups` but just for the pinned left portion of the grid. */
47736 ColumnApi.prototype.getLeftDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeLeft(); };
47737 /** Same as `getAllDisplayedColumnGroups` but just for the center portion of the grid. */
47738 ColumnApi.prototype.getCenterDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeCentre(); };
47739 /** Same as `getAllDisplayedColumnGroups` but just for the pinned right portion of the grid. */
47740 ColumnApi.prototype.getRightDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeRight(); };
47741 /** 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. */
47742 ColumnApi.prototype.getAllDisplayedColumnGroups = function () { return this.columnModel.getAllDisplayedTrees(); };
47743 /** Auto-sizes a column based on its contents. */
47744 ColumnApi.prototype.autoSizeColumn = function (key, skipHeader) { return this.columnModel.autoSizeColumn(key, skipHeader, 'api'); };
47745 /** Same as `autoSizeColumn`, but provide a list of column keys. */
47746 ColumnApi.prototype.autoSizeColumns = function (keys, skipHeader) {
47747 this.columnModel.autoSizeColumns({ columns: keys, skipHeader: skipHeader });
47748 };
47749 /** Calls `autoSizeColumns` on all displayed columns. */
47750 ColumnApi.prototype.autoSizeAllColumns = function (skipHeader) { this.columnModel.autoSizeAllColumns(skipHeader, 'api'); };
47751 /** Set the pivot result columns. */
47752 ColumnApi.prototype.setPivotResultColumns = function (colDefs) { this.columnModel.setSecondaryColumns(colDefs, 'api'); };
47753 /** Returns the grid's pivot result columns. */
47754 ColumnApi.prototype.getPivotResultColumns = function () { return this.columnModel.getSecondaryColumns(); };
47755 ColumnApi.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid = function () {
47756 // some users were raising support issues with regards memory leaks. the problem was the customers applications
47757 // were keeping references to the API. trying to educate them all would be difficult, easier to just remove
47758 // all references in the API so at least the core grid can be garbage collected.
47759 //
47760 // wait about 100ms before clearing down the references, in case user has some cleanup to do,
47761 // and needs to deference the API first
47762 setTimeout(_utils__WEBPACK_IMPORTED_MODULE_1__["_"].removeAllReferences.bind(window, this, 'Column API'), 100);
47763 };
47764 /** @deprecated v28 Use `getColumns` instead */
47765 ColumnApi.prototype.getAllColumns = function () {
47766 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_2__["logDeprecation"])('28.0', 'getAllColumns', 'getColumns');
47767 return this.getColumns();
47768 };
47769 /** @deprecated v27 getOriginalColumnGroup is deprecated, use getProvidedColumnGroup. */
47770 ColumnApi.prototype.getOriginalColumnGroup = function (name) {
47771 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_2__["logDeprecation"])('27.0', 'getOriginalColumnGroup', 'getProvidedColumnGroup');
47772 return this.columnModel.getProvidedColumnGroup(name);
47773 };
47774 /** @deprecated v28 Use `getColumns` instead. */
47775 ColumnApi.prototype.getPrimaryColumns = function () {
47776 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_2__["logDeprecation"])('28.0', 'getPrimaryColumns', 'getColumns');
47777 return this.getColumns();
47778 };
47779 /** @deprecated v28 Use `getPivotResultColumns` instead. */
47780 ColumnApi.prototype.getSecondaryColumns = function () {
47781 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_2__["logDeprecation"])('28.0', 'getSecondaryColumns', 'getPivotResultColumns');
47782 return this.getPivotResultColumns();
47783 };
47784 /** @deprecated v28 Use `setPivotResultColumns` instead. */
47785 ColumnApi.prototype.setSecondaryColumns = function (colDefs) {
47786 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_2__["logDeprecation"])('28.0', 'setSecondaryColumns', 'setPivotResultColumns');
47787 this.setPivotResultColumns(colDefs);
47788 };
47789 /** @deprecated v28 Use `getPivotResultColumn` instead */
47790 ColumnApi.prototype.getSecondaryPivotColumn = function (pivotKeys, valueColKey) {
47791 Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_2__["logDeprecation"])('28.0', 'getSecondaryPivotColumn', 'getPivotResultColumn');
47792 return this.getPivotResultColumn(pivotKeys, valueColKey);
47793 };
47794 __decorate([
47795 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
47796 ], ColumnApi.prototype, "columnModel", void 0);
47797 __decorate([
47798 _context_context__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
47799 ], ColumnApi.prototype, "cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid", null);
47800 ColumnApi = __decorate([
47801 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('columnApi')
47802 ], ColumnApi);
47803 return ColumnApi;
47804}());
47805
47806
47807
47808/***/ }),
47809/* 209 */
47810/***/ (function(module, __webpack_exports__, __webpack_require__) {
47811
47812"use strict";
47813__webpack_require__.r(__webpack_exports__);
47814/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValueService", function() { return ValueService; });
47815/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
47816/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
47817/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
47818/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
47819/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
47820/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(13);
47821/**
47822 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
47823 * @version v29.2.0
47824 * @link https://www.ag-grid.com/
47825 * @license MIT
47826 */
47827var __extends = (undefined && undefined.__extends) || (function () {
47828 var extendStatics = function (d, b) {
47829 extendStatics = Object.setPrototypeOf ||
47830 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
47831 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
47832 return extendStatics(d, b);
47833 };
47834 return function (d, b) {
47835 extendStatics(d, b);
47836 function __() { this.constructor = d; }
47837 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
47838 };
47839})();
47840var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
47841 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
47842 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
47843 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;
47844 return c > 3 && r && Object.defineProperty(target, key, r), r;
47845};
47846
47847
47848
47849
47850
47851
47852var ValueService = /** @class */ (function (_super) {
47853 __extends(ValueService, _super);
47854 function ValueService() {
47855 var _this = _super !== null && _super.apply(this, arguments) || this;
47856 _this.initialised = false;
47857 return _this;
47858 }
47859 ValueService.prototype.init = function () {
47860 var _this = this;
47861 this.cellExpressions = this.gridOptionsService.is('enableCellExpressions');
47862 this.isTreeData = this.gridOptionsService.is('treeData');
47863 this.initialised = true;
47864 // We listen to our own event and use it to call the columnSpecific callback,
47865 // this way the handler calls are correctly interleaved with other global events
47866 this.eventService.addEventListener(_events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_VALUE_CHANGED, function (event) { return _this.callColumnCellValueChangedHandler(event); }, this.gridOptionsService.useAsyncEvents());
47867 this.addManagedPropertyListener('treeData', function (propChange) { return _this.isTreeData = propChange.currentValue; });
47868 };
47869 ValueService.prototype.getValue = function (column, rowNode, forFilter, ignoreAggData) {
47870 if (forFilter === void 0) { forFilter = false; }
47871 if (ignoreAggData === void 0) { ignoreAggData = false; }
47872 // hack - the grid is getting refreshed before this bean gets initialised, race condition.
47873 // really should have a way so they get initialised in the right order???
47874 if (!this.initialised) {
47875 this.init();
47876 }
47877 if (!rowNode) {
47878 return;
47879 }
47880 // pull these out to make code below easier to read
47881 var colDef = column.getColDef();
47882 var field = colDef.field;
47883 var colId = column.getColId();
47884 var data = rowNode.data;
47885 var result;
47886 // if there is a value getter, this gets precedence over a field
47887 var groupDataExists = rowNode.groupData && rowNode.groupData[colId] !== undefined;
47888 var aggDataExists = !ignoreAggData && rowNode.aggData && rowNode.aggData[colId] !== undefined;
47889 if (forFilter && colDef.filterValueGetter) {
47890 result = this.executeFilterValueGetter(colDef.filterValueGetter, data, column, rowNode);
47891 }
47892 else if (this.isTreeData && aggDataExists) {
47893 result = rowNode.aggData[colId];
47894 }
47895 else if (this.isTreeData && colDef.valueGetter) {
47896 result = this.executeValueGetter(colDef.valueGetter, data, column, rowNode);
47897 }
47898 else if (this.isTreeData && (field && data)) {
47899 result = Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["getValueUsingField"])(data, field, column.isFieldContainsDots());
47900 }
47901 else if (groupDataExists) {
47902 result = rowNode.groupData[colId];
47903 }
47904 else if (aggDataExists) {
47905 result = rowNode.aggData[colId];
47906 }
47907 else if (colDef.valueGetter) {
47908 result = this.executeValueGetter(colDef.valueGetter, data, column, rowNode);
47909 }
47910 else if (field && data) {
47911 result = Object(_utils_object__WEBPACK_IMPORTED_MODULE_3__["getValueUsingField"])(data, field, column.isFieldContainsDots());
47912 }
47913 // the result could be an expression itself, if we are allowing cell values to be expressions
47914 if (this.cellExpressions && (typeof result === 'string') && result.indexOf('=') === 0) {
47915 var cellValueGetter = result.substring(1);
47916 result = this.executeValueGetter(cellValueGetter, data, column, rowNode);
47917 }
47918 if (result == null) {
47919 var openedGroup = this.getOpenedGroup(rowNode, column);
47920 if (openedGroup != null) {
47921 return openedGroup;
47922 }
47923 }
47924 return result;
47925 };
47926 ValueService.prototype.getOpenedGroup = function (rowNode, column) {
47927 if (!this.gridOptionsService.is('showOpenedGroup')) {
47928 return;
47929 }
47930 var colDef = column.getColDef();
47931 if (!colDef.showRowGroup) {
47932 return;
47933 }
47934 var showRowGroup = column.getColDef().showRowGroup;
47935 var pointer = rowNode.parent;
47936 while (pointer != null) {
47937 if (pointer.rowGroupColumn && (showRowGroup === true || showRowGroup === pointer.rowGroupColumn.getColId())) {
47938 return pointer.key;
47939 }
47940 pointer = pointer.parent;
47941 }
47942 return undefined;
47943 };
47944 /**
47945 * Sets the value of a GridCell
47946 * @param rowNode The `RowNode` to be updated
47947 * @param colKey The `Column` to be updated
47948 * @param newValue The new value to be set
47949 * @param eventSource The event source
47950 * @returns `True` if the value has been updated, otherwise`False`.
47951 */
47952 ValueService.prototype.setValue = function (rowNode, colKey, newValue, eventSource) {
47953 var column = this.columnModel.getPrimaryColumn(colKey);
47954 if (!rowNode || !column) {
47955 return false;
47956 }
47957 // this will only happen if user is trying to paste into a group row, which doesn't make sense
47958 // the user should not be trying to paste into group rows
47959 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(rowNode.data)) {
47960 rowNode.data = {};
47961 }
47962 var _a = column.getColDef(), field = _a.field, valueSetter = _a.valueSetter;
47963 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(field) && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["missing"])(valueSetter)) {
47964 console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work");
47965 return false;
47966 }
47967 var params = {
47968 node: rowNode,
47969 data: rowNode.data,
47970 oldValue: this.getValue(column, rowNode),
47971 newValue: newValue,
47972 colDef: column.getColDef(),
47973 column: column,
47974 api: this.gridOptionsService.api,
47975 columnApi: this.gridOptionsService.columnApi,
47976 context: this.gridOptionsService.context
47977 };
47978 params.newValue = newValue;
47979 var valueWasDifferent;
47980 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_4__["exists"])(valueSetter)) {
47981 if (typeof valueSetter === 'function') {
47982 valueWasDifferent = valueSetter(params);
47983 }
47984 else {
47985 valueWasDifferent = this.expressionService.evaluate(valueSetter, params);
47986 }
47987 }
47988 else {
47989 valueWasDifferent = this.setValueUsingField(rowNode.data, field, newValue, column.isFieldContainsDots());
47990 }
47991 // in case user forgot to return something (possible if they are not using TypeScript
47992 // and just forgot we default the return value to true, so we always refresh.
47993 if (valueWasDifferent === undefined) {
47994 valueWasDifferent = true;
47995 }
47996 // if no change to the value, then no need to do the updating, or notifying via events.
47997 // otherwise the user could be tabbing around the grid, and cellValueChange would get called
47998 // all the time.
47999 if (!valueWasDifferent) {
48000 return false;
48001 }
48002 // reset quick filter on this row
48003 rowNode.resetQuickFilterAggregateText();
48004 this.valueCache.onDataChanged();
48005 params.newValue = this.getValue(column, rowNode);
48006 var event = {
48007 type: _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_VALUE_CHANGED,
48008 event: null,
48009 rowIndex: rowNode.rowIndex,
48010 rowPinned: rowNode.rowPinned,
48011 column: params.column,
48012 api: params.api,
48013 columnApi: params.columnApi,
48014 colDef: params.colDef,
48015 context: params.context,
48016 data: rowNode.data,
48017 node: rowNode,
48018 oldValue: params.oldValue,
48019 newValue: params.newValue,
48020 value: params.newValue,
48021 source: eventSource
48022 };
48023 this.eventService.dispatchEvent(event);
48024 return true;
48025 };
48026 ValueService.prototype.callColumnCellValueChangedHandler = function (event) {
48027 var onCellValueChanged = event.colDef.onCellValueChanged;
48028 if (typeof onCellValueChanged === 'function') {
48029 onCellValueChanged({
48030 node: event.node,
48031 data: event.data,
48032 oldValue: event.oldValue,
48033 newValue: event.newValue,
48034 colDef: event.colDef,
48035 column: event.column,
48036 api: event.api,
48037 columnApi: event.columnApi,
48038 context: event.context
48039 });
48040 }
48041 };
48042 ValueService.prototype.setValueUsingField = function (data, field, newValue, isFieldContainsDots) {
48043 if (!field) {
48044 return false;
48045 }
48046 // if no '.', then it's not a deep value
48047 var valuesAreSame = false;
48048 if (!isFieldContainsDots) {
48049 // soft comparison to match strings and numbers
48050 valuesAreSame = data[field] == newValue;
48051 if (!valuesAreSame) {
48052 data[field] = newValue;
48053 }
48054 }
48055 else {
48056 // otherwise it is a deep value, so need to dig for it
48057 var fieldPieces = field.split('.');
48058 var currentObject = data;
48059 while (fieldPieces.length > 0 && currentObject) {
48060 var fieldPiece = fieldPieces.shift();
48061 if (fieldPieces.length === 0) {
48062 // soft comparison to match strings and numbers
48063 valuesAreSame = currentObject[fieldPiece] == newValue;
48064 if (!valuesAreSame) {
48065 currentObject[fieldPiece] = newValue;
48066 }
48067 }
48068 else {
48069 currentObject = currentObject[fieldPiece];
48070 }
48071 }
48072 }
48073 return !valuesAreSame;
48074 };
48075 ValueService.prototype.executeFilterValueGetter = function (valueGetter, data, column, rowNode) {
48076 var params = {
48077 data: data,
48078 node: rowNode,
48079 column: column,
48080 colDef: column.getColDef(),
48081 api: this.gridOptionsService.api,
48082 columnApi: this.gridOptionsService.columnApi,
48083 context: this.gridOptionsService.context,
48084 getValue: this.getValueCallback.bind(this, rowNode)
48085 };
48086 if (typeof valueGetter === 'function') {
48087 return valueGetter(params);
48088 }
48089 return this.expressionService.evaluate(valueGetter, params);
48090 };
48091 ValueService.prototype.executeValueGetter = function (valueGetter, data, column, rowNode) {
48092 var colId = column.getColId();
48093 // if inside the same turn, just return back the value we got last time
48094 var valueFromCache = this.valueCache.getValue(rowNode, colId);
48095 if (valueFromCache !== undefined) {
48096 return valueFromCache;
48097 }
48098 var params = {
48099 data: data,
48100 node: rowNode,
48101 column: column,
48102 colDef: column.getColDef(),
48103 api: this.gridOptionsService.api,
48104 columnApi: this.gridOptionsService.columnApi,
48105 context: this.gridOptionsService.context,
48106 getValue: this.getValueCallback.bind(this, rowNode)
48107 };
48108 var result;
48109 if (typeof valueGetter === 'function') {
48110 result = valueGetter(params);
48111 }
48112 else {
48113 result = this.expressionService.evaluate(valueGetter, params);
48114 }
48115 // if a turn is active, store the value in case the grid asks for it again
48116 this.valueCache.setValue(rowNode, colId, result);
48117 return result;
48118 };
48119 ValueService.prototype.getValueCallback = function (node, field) {
48120 var otherColumn = this.columnModel.getPrimaryColumn(field);
48121 if (otherColumn) {
48122 return this.getValue(otherColumn, node);
48123 }
48124 return null;
48125 };
48126 // used by row grouping and pivot, to get key for a row. col can be a pivot col or a row grouping col
48127 ValueService.prototype.getKeyForNode = function (col, rowNode) {
48128 var value = this.getValue(col, rowNode);
48129 var keyCreator = col.getColDef().keyCreator;
48130 var result = value;
48131 if (keyCreator) {
48132 var keyParams = {
48133 value: value,
48134 colDef: col.getColDef(),
48135 column: col,
48136 node: rowNode,
48137 data: rowNode.data,
48138 api: this.gridOptionsService.api,
48139 columnApi: this.gridOptionsService.columnApi,
48140 context: this.gridOptionsService.context
48141 };
48142 result = keyCreator(keyParams);
48143 }
48144 // if already a string, or missing, just return it
48145 if (typeof result === 'string' || result == null) {
48146 return result;
48147 }
48148 result = String(result);
48149 if (result === '[object Object]') {
48150 Object(_utils_function__WEBPACK_IMPORTED_MODULE_5__["doOnce"])(function () {
48151 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');
48152 }, 'getKeyForNode - warn about [object,object]');
48153 }
48154 return result;
48155 };
48156 __decorate([
48157 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('expressionService')
48158 ], ValueService.prototype, "expressionService", void 0);
48159 __decorate([
48160 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
48161 ], ValueService.prototype, "columnModel", void 0);
48162 __decorate([
48163 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueCache')
48164 ], ValueService.prototype, "valueCache", void 0);
48165 __decorate([
48166 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
48167 ], ValueService.prototype, "init", null);
48168 ValueService = __decorate([
48169 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('valueService')
48170 ], ValueService);
48171 return ValueService;
48172}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
48173
48174
48175
48176/***/ }),
48177/* 210 */
48178/***/ (function(module, __webpack_exports__, __webpack_require__) {
48179
48180"use strict";
48181__webpack_require__.r(__webpack_exports__);
48182/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpressionService", function() { return ExpressionService; });
48183/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
48184/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
48185/**
48186 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
48187 * @version v29.2.0
48188 * @link https://www.ag-grid.com/
48189 * @license MIT
48190 */
48191var __extends = (undefined && undefined.__extends) || (function () {
48192 var extendStatics = function (d, b) {
48193 extendStatics = Object.setPrototypeOf ||
48194 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
48195 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
48196 return extendStatics(d, b);
48197 };
48198 return function (d, b) {
48199 extendStatics(d, b);
48200 function __() { this.constructor = d; }
48201 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48202 };
48203})();
48204var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
48205 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
48206 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
48207 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;
48208 return c > 3 && r && Object.defineProperty(target, key, r), r;
48209};
48210var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
48211 return function (target, key) { decorator(target, key, paramIndex); }
48212};
48213
48214
48215
48216var ExpressionService = /** @class */ (function (_super) {
48217 __extends(ExpressionService, _super);
48218 function ExpressionService() {
48219 var _this = _super !== null && _super.apply(this, arguments) || this;
48220 _this.expressionToFunctionCache = {};
48221 return _this;
48222 }
48223 ExpressionService.prototype.setBeans = function (loggerFactory) {
48224 this.logger = loggerFactory.create('ExpressionService');
48225 };
48226 ExpressionService.prototype.evaluate = function (expression, params) {
48227 if (typeof expression === 'string') {
48228 // valueGetter is an expression, so execute the expression
48229 return this.evaluateExpression(expression, params);
48230 }
48231 else {
48232 console.error('AG Grid: value should be either a string or a function', expression);
48233 }
48234 };
48235 ExpressionService.prototype.evaluateExpression = function (expression, params) {
48236 try {
48237 var javaScriptFunction = this.createExpressionFunction(expression);
48238 // the params don't have all these values, rather we add every possible
48239 // value a params can have, which makes whatever is in the params available.
48240 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);
48241 return result;
48242 }
48243 catch (e) {
48244 // the expression failed, which can happen, as it's the client that
48245 // provides the expression. so print a nice message
48246 // tslint:disable-next-line
48247 console.log('Processing of the expression failed');
48248 // tslint:disable-next-line
48249 console.log('Expression = ' + expression);
48250 // tslint:disable-next-line
48251 console.log('Params =', params);
48252 // tslint:disable-next-line
48253 console.log('Exception = ' + e);
48254 return null;
48255 }
48256 };
48257 ExpressionService.prototype.createExpressionFunction = function (expression) {
48258 // check cache first
48259 if (this.expressionToFunctionCache[expression]) {
48260 return this.expressionToFunctionCache[expression];
48261 }
48262 // if not found in cache, return the function
48263 var functionBody = this.createFunctionBody(expression);
48264 var theFunction = new Function('x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup', functionBody);
48265 // store in cache
48266 this.expressionToFunctionCache[expression] = theFunction;
48267 return theFunction;
48268 };
48269 ExpressionService.prototype.createFunctionBody = function (expression) {
48270 // if the expression has the 'return' word in it, then use as is,
48271 // if not, then wrap it with return and ';' to make a function
48272 if (expression.indexOf('return') >= 0) {
48273 return expression;
48274 }
48275 else {
48276 return 'return ' + expression + ';';
48277 }
48278 };
48279 __decorate([
48280 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('loggerFactory'))
48281 ], ExpressionService.prototype, "setBeans", null);
48282 ExpressionService = __decorate([
48283 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('expressionService')
48284 ], ExpressionService);
48285 return ExpressionService;
48286}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
48287
48288
48289
48290/***/ }),
48291/* 211 */
48292/***/ (function(module, __webpack_exports__, __webpack_require__) {
48293
48294"use strict";
48295__webpack_require__.r(__webpack_exports__);
48296/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateService", function() { return TemplateService; });
48297/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
48298/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
48299/**
48300 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
48301 * @version v29.2.0
48302 * @link https://www.ag-grid.com/
48303 * @license MIT
48304 */
48305var __extends = (undefined && undefined.__extends) || (function () {
48306 var extendStatics = function (d, b) {
48307 extendStatics = Object.setPrototypeOf ||
48308 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
48309 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
48310 return extendStatics(d, b);
48311 };
48312 return function (d, b) {
48313 extendStatics(d, b);
48314 function __() { this.constructor = d; }
48315 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48316 };
48317})();
48318var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
48319 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
48320 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
48321 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;
48322 return c > 3 && r && Object.defineProperty(target, key, r), r;
48323};
48324
48325
48326var TemplateService = /** @class */ (function (_super) {
48327 __extends(TemplateService, _super);
48328 function TemplateService() {
48329 var _this = _super !== null && _super.apply(this, arguments) || this;
48330 _this.templateCache = {};
48331 _this.waitingCallbacks = {};
48332 return _this;
48333 }
48334 // returns the template if it is loaded, or null if it is not loaded
48335 // but will call the callback when it is loaded
48336 TemplateService.prototype.getTemplate = function (url, callback) {
48337 var templateFromCache = this.templateCache[url];
48338 if (templateFromCache) {
48339 return templateFromCache;
48340 }
48341 var callbackList = this.waitingCallbacks[url];
48342 var that = this;
48343 if (!callbackList) {
48344 // first time this was called, so need a new list for callbacks
48345 callbackList = [];
48346 this.waitingCallbacks[url] = callbackList;
48347 // and also need to do the http request
48348 var client = new XMLHttpRequest();
48349 client.onload = function () {
48350 that.handleHttpResult(this, url);
48351 };
48352 client.open("GET", url);
48353 client.send();
48354 }
48355 // add this callback
48356 if (callback) {
48357 callbackList.push(callback);
48358 }
48359 // caller needs to wait for template to load, so return null
48360 return null;
48361 };
48362 TemplateService.prototype.handleHttpResult = function (httpResult, url) {
48363 if (httpResult.status !== 200 || httpResult.response === null) {
48364 console.warn("AG Grid: Unable to get template error " + httpResult.status + " - " + url);
48365 return;
48366 }
48367 // response success, so process it
48368 // in IE9 the response is in - responseText
48369 this.templateCache[url] = httpResult.response || httpResult.responseText;
48370 // inform all listeners that this is now in the cache
48371 var callbacks = this.waitingCallbacks[url];
48372 for (var i = 0; i < callbacks.length; i++) {
48373 var callback = callbacks[i];
48374 // we could pass the callback the response, however we know the client of this code
48375 // is the cell renderer, and it passes the 'cellRefresh' method in as the callback
48376 // which doesn't take any parameters.
48377 callback();
48378 }
48379 };
48380 TemplateService = __decorate([
48381 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('templateService')
48382 ], TemplateService);
48383 return TemplateService;
48384}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
48385
48386
48387
48388/***/ }),
48389/* 212 */
48390/***/ (function(module, __webpack_exports__, __webpack_require__) {
48391
48392"use strict";
48393__webpack_require__.r(__webpack_exports__);
48394/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoggerFactory", function() { return LoggerFactory; });
48395/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return Logger; });
48396/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
48397/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
48398/**
48399 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
48400 * @version v29.2.0
48401 * @link https://www.ag-grid.com/
48402 * @license MIT
48403 */
48404var __extends = (undefined && undefined.__extends) || (function () {
48405 var extendStatics = function (d, b) {
48406 extendStatics = Object.setPrototypeOf ||
48407 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
48408 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
48409 return extendStatics(d, b);
48410 };
48411 return function (d, b) {
48412 extendStatics(d, b);
48413 function __() { this.constructor = d; }
48414 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48415 };
48416})();
48417var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
48418 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
48419 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
48420 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;
48421 return c > 3 && r && Object.defineProperty(target, key, r), r;
48422};
48423var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
48424 return function (target, key) { decorator(target, key, paramIndex); }
48425};
48426
48427
48428
48429var LoggerFactory = /** @class */ (function (_super) {
48430 __extends(LoggerFactory, _super);
48431 function LoggerFactory() {
48432 return _super !== null && _super.apply(this, arguments) || this;
48433 }
48434 LoggerFactory.prototype.setBeans = function (gridOptionsService) {
48435 this.logging = gridOptionsService.is('debug');
48436 };
48437 LoggerFactory.prototype.create = function (name) {
48438 return new Logger(name, this.isLogging.bind(this));
48439 };
48440 LoggerFactory.prototype.isLogging = function () {
48441 return this.logging;
48442 };
48443 __decorate([
48444 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('gridOptionsService'))
48445 ], LoggerFactory.prototype, "setBeans", null);
48446 LoggerFactory = __decorate([
48447 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('loggerFactory')
48448 ], LoggerFactory);
48449 return LoggerFactory;
48450}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
48451
48452var Logger = /** @class */ (function () {
48453 function Logger(name, isLoggingFunc) {
48454 this.name = name;
48455 this.isLoggingFunc = isLoggingFunc;
48456 }
48457 Logger.prototype.isLogging = function () {
48458 return this.isLoggingFunc();
48459 };
48460 Logger.prototype.log = function (message) {
48461 if (this.isLoggingFunc()) {
48462 // tslint:disable-next-line
48463 console.log('AG Grid.' + this.name + ': ' + message);
48464 }
48465 };
48466 return Logger;
48467}());
48468
48469
48470
48471/***/ }),
48472/* 213 */
48473/***/ (function(module, __webpack_exports__, __webpack_require__) {
48474
48475"use strict";
48476__webpack_require__.r(__webpack_exports__);
48477/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridComp", function() { return GridComp; });
48478/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
48479/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
48480/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
48481/* harmony import */ var _focusService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(201);
48482/* harmony import */ var _gridCtrl__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(214);
48483/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(117);
48484/* harmony import */ var _widgets_tabGuardComp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(195);
48485/**
48486 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
48487 * @version v29.2.0
48488 * @link https://www.ag-grid.com/
48489 * @license MIT
48490 */
48491var __extends = (undefined && undefined.__extends) || (function () {
48492 var extendStatics = function (d, b) {
48493 extendStatics = Object.setPrototypeOf ||
48494 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
48495 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
48496 return extendStatics(d, b);
48497 };
48498 return function (d, b) {
48499 extendStatics(d, b);
48500 function __() { this.constructor = d; }
48501 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48502 };
48503})();
48504var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
48505 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
48506 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
48507 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;
48508 return c > 3 && r && Object.defineProperty(target, key, r), r;
48509};
48510
48511
48512
48513
48514
48515
48516
48517var GridComp = /** @class */ (function (_super) {
48518 __extends(GridComp, _super);
48519 function GridComp(eGridDiv) {
48520 var _this = _super.call(this) || this;
48521 _this.eGridDiv = eGridDiv;
48522 return _this;
48523 }
48524 GridComp.prototype.postConstruct = function () {
48525 var _this = this;
48526 this.logger = this.loggerFactory.create('GridComp');
48527 var compProxy = {
48528 destroyGridUi: function () { return _this.destroyBean(_this); },
48529 setRtlClass: function (cssClass) { return _this.addCssClass(cssClass); },
48530 addOrRemoveKeyboardFocusClass: function (addOrRemove) { return _this.addOrRemoveCssClass(_focusService__WEBPACK_IMPORTED_MODULE_3__["FocusService"].AG_KEYBOARD_FOCUS, addOrRemove); },
48531 forceFocusOutOfContainer: this.forceFocusOutOfContainer.bind(this),
48532 updateLayoutClasses: this.updateLayoutClasses.bind(this),
48533 getFocusableContainers: this.getFocusableContainers.bind(this),
48534 setUserSelect: function (value) {
48535 _this.getGui().style.userSelect = value != null ? value : '';
48536 _this.getGui().style.webkitUserSelect = value != null ? value : '';
48537 },
48538 setCursor: function (value) {
48539 _this.getGui().style.cursor = value != null ? value : '';
48540 }
48541 };
48542 this.ctrl = this.createManagedBean(new _gridCtrl__WEBPACK_IMPORTED_MODULE_4__["GridCtrl"]());
48543 var template = this.createTemplate();
48544 this.setTemplate(template);
48545 this.ctrl.setComp(compProxy, this.eGridDiv, this.getGui());
48546 this.insertGridIntoDom();
48547 this.initialiseTabGuard({
48548 // we want to override the default behaviour to do nothing for onTabKeyDown
48549 onTabKeyDown: function () { return undefined; },
48550 focusInnerElement: function (fromBottom) { return _this.ctrl.focusInnerElement(fromBottom); }
48551 });
48552 };
48553 GridComp.prototype.insertGridIntoDom = function () {
48554 var _this = this;
48555 var eGui = this.getGui();
48556 this.eGridDiv.appendChild(eGui);
48557 this.addDestroyFunc(function () {
48558 _this.eGridDiv.removeChild(eGui);
48559 _this.logger.log('Grid removed from DOM');
48560 });
48561 };
48562 GridComp.prototype.updateLayoutClasses = function (cssClass, params) {
48563 var eRootWrapperBodyClassList = this.eRootWrapperBody.classList;
48564 eRootWrapperBodyClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].AUTO_HEIGHT, params.autoHeight);
48565 eRootWrapperBodyClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].NORMAL, params.normal);
48566 eRootWrapperBodyClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].PRINT, params.print);
48567 this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].AUTO_HEIGHT, params.autoHeight);
48568 this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].NORMAL, params.normal);
48569 this.addOrRemoveCssClass(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_5__["LayoutCssClasses"].PRINT, params.print);
48570 };
48571 GridComp.prototype.createTemplate = function () {
48572 var dropZones = this.ctrl.showDropZones() ? '<ag-grid-header-drop-zones></ag-grid-header-drop-zones>' : '';
48573 var sideBar = this.ctrl.showSideBar() ? '<ag-side-bar ref="sideBar"></ag-side-bar>' : '';
48574 var statusBar = this.ctrl.showStatusBar() ? '<ag-status-bar ref="statusBar"></ag-status-bar>' : '';
48575 var watermark = this.ctrl.showWatermark() ? '<ag-watermark></ag-watermark>' : '';
48576 var template = /* html */ "<div class=\"ag-root-wrapper\" role=\"presentation\">\n " + dropZones + "\n <div class=\"ag-root-wrapper-body\" ref=\"rootWrapperBody\" role=\"presentation\">\n <ag-grid-body ref=\"gridBody\"></ag-grid-body>\n " + sideBar + "\n </div>\n " + statusBar + "\n <ag-pagination></ag-pagination>\n " + watermark + "\n </div>";
48577 return template;
48578 };
48579 GridComp.prototype.getFocusableElement = function () {
48580 return this.eRootWrapperBody;
48581 };
48582 GridComp.prototype.getFocusableContainers = function () {
48583 var focusableContainers = [
48584 this.gridBodyComp.getGui()
48585 ];
48586 if (this.sideBarComp) {
48587 focusableContainers.push(this.sideBarComp.getGui());
48588 }
48589 return focusableContainers.filter(function (el) { return Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["isVisible"])(el); });
48590 };
48591 __decorate([
48592 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('loggerFactory')
48593 ], GridComp.prototype, "loggerFactory", void 0);
48594 __decorate([
48595 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('gridBody')
48596 ], GridComp.prototype, "gridBodyComp", void 0);
48597 __decorate([
48598 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('sideBar')
48599 ], GridComp.prototype, "sideBarComp", void 0);
48600 __decorate([
48601 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_1__["RefSelector"])('rootWrapperBody')
48602 ], GridComp.prototype, "eRootWrapperBody", void 0);
48603 __decorate([
48604 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
48605 ], GridComp.prototype, "postConstruct", null);
48606 return GridComp;
48607}(_widgets_tabGuardComp__WEBPACK_IMPORTED_MODULE_6__["TabGuardComp"]));
48608
48609
48610
48611/***/ }),
48612/* 214 */
48613/***/ (function(module, __webpack_exports__, __webpack_require__) {
48614
48615"use strict";
48616__webpack_require__.r(__webpack_exports__);
48617/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridCtrl", function() { return GridCtrl; });
48618/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
48619/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
48620/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
48621/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
48622/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(117);
48623/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26);
48624/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(19);
48625/* harmony import */ var _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(100);
48626/**
48627 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
48628 * @version v29.2.0
48629 * @link https://www.ag-grid.com/
48630 * @license MIT
48631 */
48632var __extends = (undefined && undefined.__extends) || (function () {
48633 var extendStatics = function (d, b) {
48634 extendStatics = Object.setPrototypeOf ||
48635 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
48636 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
48637 return extendStatics(d, b);
48638 };
48639 return function (d, b) {
48640 extendStatics(d, b);
48641 function __() { this.constructor = d; }
48642 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48643 };
48644})();
48645var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
48646 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
48647 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
48648 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;
48649 return c > 3 && r && Object.defineProperty(target, key, r), r;
48650};
48651
48652
48653
48654
48655
48656
48657
48658
48659var GridCtrl = /** @class */ (function (_super) {
48660 __extends(GridCtrl, _super);
48661 function GridCtrl() {
48662 return _super !== null && _super.apply(this, arguments) || this;
48663 }
48664 GridCtrl.prototype.setComp = function (view, eGridDiv, eGui) {
48665 var _this = this;
48666 this.view = view;
48667 this.eGridHostDiv = eGridDiv;
48668 this.eGui = eGui;
48669 // this drop target is just used to see if the drop event is inside the grid
48670 this.dragAndDropService.addDropTarget({
48671 getContainer: function () { return _this.eGui; },
48672 isInterestedIn: function (type) { return type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_7__["DragSourceType"].HeaderCell || type === _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_7__["DragSourceType"].ToolPanel; },
48673 getIconName: function () { return _dragAndDrop_dragAndDropService__WEBPACK_IMPORTED_MODULE_7__["DragAndDropService"].ICON_NOT_ALLOWED; },
48674 });
48675 this.mouseEventService.stampTopLevelGridCompWithGridInstance(eGridDiv);
48676 this.createManagedBean(new _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__["LayoutFeature"](this.view));
48677 this.addRtlSupport();
48678 this.addManagedListener(this, _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_KEYBOARD_FOCUS, function () {
48679 _this.view.addOrRemoveKeyboardFocusClass(true);
48680 });
48681 this.addManagedListener(this, _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_MOUSE_FOCUS, function () {
48682 _this.view.addOrRemoveKeyboardFocusClass(false);
48683 });
48684 var unsubscribeFromResize = this.resizeObserverService.observeResize(this.eGridHostDiv, this.onGridSizeChanged.bind(this));
48685 this.addDestroyFunc(function () { return unsubscribeFromResize(); });
48686 this.ctrlsService.registerGridCtrl(this);
48687 };
48688 GridCtrl.prototype.isDetailGrid = function () {
48689 var _a;
48690 var el = this.focusService.findTabbableParent(this.getGui());
48691 return ((_a = el === null || el === void 0 ? void 0 : el.getAttribute('row-id')) === null || _a === void 0 ? void 0 : _a.startsWith('detail')) || false;
48692 };
48693 GridCtrl.prototype.showDropZones = function () {
48694 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_2__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].RowGroupingModule);
48695 };
48696 GridCtrl.prototype.showSideBar = function () {
48697 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_2__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].SideBarModule);
48698 };
48699 GridCtrl.prototype.showStatusBar = function () {
48700 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_2__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].StatusBarModule);
48701 };
48702 GridCtrl.prototype.showWatermark = function () {
48703 return _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_2__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"].EnterpriseCoreModule);
48704 };
48705 GridCtrl.prototype.onGridSizeChanged = function () {
48706 var event = {
48707 type: _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_GRID_SIZE_CHANGED,
48708 clientWidth: this.eGridHostDiv.clientWidth,
48709 clientHeight: this.eGridHostDiv.clientHeight
48710 };
48711 this.eventService.dispatchEvent(event);
48712 };
48713 GridCtrl.prototype.addRtlSupport = function () {
48714 var cssClass = this.gridOptionsService.is('enableRtl') ? 'ag-rtl' : 'ag-ltr';
48715 this.view.setRtlClass(cssClass);
48716 };
48717 GridCtrl.prototype.destroyGridUi = function () {
48718 this.view.destroyGridUi();
48719 };
48720 GridCtrl.prototype.getGui = function () {
48721 return this.eGui;
48722 };
48723 GridCtrl.prototype.setResizeCursor = function (on) {
48724 this.view.setCursor(on ? 'ew-resize' : null);
48725 };
48726 GridCtrl.prototype.disableUserSelect = function (on) {
48727 this.view.setUserSelect(on ? 'none' : null);
48728 };
48729 GridCtrl.prototype.focusNextInnerContainer = function (backwards) {
48730 var eDocument = this.gridOptionsService.getDocument();
48731 var focusableContainers = this.view.getFocusableContainers();
48732 var idxWithFocus = focusableContainers.findIndex(function (container) { return container.contains(eDocument.activeElement); });
48733 var nextIdx = idxWithFocus + (backwards ? -1 : 1);
48734 if (nextIdx <= 0 || nextIdx >= focusableContainers.length) {
48735 return false;
48736 }
48737 return this.focusService.focusInto(focusableContainers[nextIdx]);
48738 };
48739 GridCtrl.prototype.focusInnerElement = function (fromBottom) {
48740 var focusableContainers = this.view.getFocusableContainers();
48741 if (fromBottom) {
48742 if (focusableContainers.length > 1) {
48743 return this.focusService.focusInto(Object(_utils_array__WEBPACK_IMPORTED_MODULE_6__["last"])(focusableContainers), true);
48744 }
48745 var lastColumn = Object(_utils_array__WEBPACK_IMPORTED_MODULE_6__["last"])(this.columnModel.getAllDisplayedColumns());
48746 if (this.focusService.focusGridView(lastColumn, true)) {
48747 return true;
48748 }
48749 }
48750 return this.focusService.focusFirstHeader();
48751 };
48752 GridCtrl.prototype.forceFocusOutOfContainer = function (up) {
48753 if (up === void 0) { up = false; }
48754 this.view.forceFocusOutOfContainer(up);
48755 };
48756 __decorate([
48757 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
48758 ], GridCtrl.prototype, "focusService", void 0);
48759 __decorate([
48760 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('resizeObserverService')
48761 ], GridCtrl.prototype, "resizeObserverService", void 0);
48762 __decorate([
48763 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
48764 ], GridCtrl.prototype, "columnModel", void 0);
48765 __decorate([
48766 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
48767 ], GridCtrl.prototype, "ctrlsService", void 0);
48768 __decorate([
48769 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('mouseEventService')
48770 ], GridCtrl.prototype, "mouseEventService", void 0);
48771 __decorate([
48772 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('dragAndDropService')
48773 ], GridCtrl.prototype, "dragAndDropService", void 0);
48774 return GridCtrl;
48775}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
48776
48777
48778
48779/***/ }),
48780/* 215 */
48781/***/ (function(module, __webpack_exports__, __webpack_require__) {
48782
48783"use strict";
48784__webpack_require__.r(__webpack_exports__);
48785/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortController", function() { return SortController; });
48786/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
48787/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
48788/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
48789/**
48790 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
48791 * @version v29.2.0
48792 * @link https://www.ag-grid.com/
48793 * @license MIT
48794 */
48795var __extends = (undefined && undefined.__extends) || (function () {
48796 var extendStatics = function (d, b) {
48797 extendStatics = Object.setPrototypeOf ||
48798 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
48799 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
48800 return extendStatics(d, b);
48801 };
48802 return function (d, b) {
48803 extendStatics(d, b);
48804 function __() { this.constructor = d; }
48805 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48806 };
48807})();
48808var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
48809 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
48810 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
48811 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;
48812 return c > 3 && r && Object.defineProperty(target, key, r), r;
48813};
48814var __read = (undefined && undefined.__read) || function (o, n) {
48815 var m = typeof Symbol === "function" && o[Symbol.iterator];
48816 if (!m) return o;
48817 var i = m.call(o), r, ar = [], e;
48818 try {
48819 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
48820 }
48821 catch (error) { e = { error: error }; }
48822 finally {
48823 try {
48824 if (r && !r.done && (m = i["return"])) m.call(i);
48825 }
48826 finally { if (e) throw e.error; }
48827 }
48828 return ar;
48829};
48830var __spread = (undefined && undefined.__spread) || function () {
48831 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
48832 return ar;
48833};
48834
48835
48836
48837var SortController = /** @class */ (function (_super) {
48838 __extends(SortController, _super);
48839 function SortController() {
48840 return _super !== null && _super.apply(this, arguments) || this;
48841 }
48842 SortController_1 = SortController;
48843 SortController.prototype.progressSort = function (column, multiSort, source) {
48844 var nextDirection = this.getNextSortDirection(column);
48845 this.setSortForColumn(column, nextDirection, multiSort, source);
48846 };
48847 SortController.prototype.setSortForColumn = function (column, sort, multiSort, source) {
48848 // auto correct - if sort not legal value, then set it to 'no sort' (which is null)
48849 if (sort !== 'asc' && sort !== 'desc') {
48850 sort = null;
48851 }
48852 var isColumnsSortingCoupledToGroup = this.gridOptionsService.isColumnsSortingCoupledToGroup();
48853 var columnsToUpdate = [column];
48854 if (isColumnsSortingCoupledToGroup && column.getColDef().showRowGroup) {
48855 if (!column.getColDef().field) {
48856 // if no field is present, this column shouldn't have it's own sort direction
48857 columnsToUpdate = [];
48858 }
48859 var rowGroupColumns = this.columnModel.getSourceColumnsForGroupColumn(column);
48860 var sortableRowGroupColumns = rowGroupColumns === null || rowGroupColumns === void 0 ? void 0 : rowGroupColumns.filter(function (col) { return col.getColDef().sortable; });
48861 if (sortableRowGroupColumns) {
48862 columnsToUpdate = __spread(columnsToUpdate, sortableRowGroupColumns);
48863 }
48864 }
48865 columnsToUpdate.forEach(function (col) { return col.setSort(sort, source); });
48866 var doingMultiSort = (multiSort || this.gridOptionsService.is('alwaysMultiSort')) && !this.gridOptionsService.is('suppressMultiSort');
48867 // clear sort on all columns except those changed, and update the icons
48868 if (!doingMultiSort) {
48869 this.clearSortBarTheseColumns(columnsToUpdate, source);
48870 }
48871 // sortIndex used for knowing order of cols when multi-col sort
48872 this.updateSortIndex(column);
48873 this.dispatchSortChangedEvents(source);
48874 };
48875 SortController.prototype.updateSortIndex = function (lastColToChange) {
48876 var isCoupled = this.gridOptionsService.isColumnsSortingCoupledToGroup();
48877 var groupParent = this.columnModel.getGroupDisplayColumnForGroup(lastColToChange.getId());
48878 var lastSortIndexCol = isCoupled ? groupParent || lastColToChange : lastColToChange;
48879 var allSortedCols = this.getColumnsWithSortingOrdered(true);
48880 // reset sort index on everything
48881 this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(function (col) { return col.setSortIndex(null); });
48882 var allSortedColsWithoutChanges = allSortedCols.filter(function (col) { return col !== lastSortIndexCol; });
48883 var sortedColsWithIndices = !!lastSortIndexCol.getSort() ? __spread(allSortedColsWithoutChanges, [lastSortIndexCol]) : allSortedColsWithoutChanges;
48884 sortedColsWithIndices.forEach(function (col, idx) { return (col.setSortIndex(idx)); });
48885 };
48886 // gets called by API, so if data changes, use can call this, which will end up
48887 // working out the sort order again of the rows.
48888 SortController.prototype.onSortChanged = function (source) {
48889 this.dispatchSortChangedEvents(source);
48890 };
48891 SortController.prototype.isSortActive = function () {
48892 // pull out all the columns that have sorting set
48893 var allCols = this.columnModel.getPrimaryAndSecondaryAndAutoColumns();
48894 var sortedCols = allCols.filter(function (column) { return !!column.getSort(); });
48895 return sortedCols && sortedCols.length > 0;
48896 };
48897 SortController.prototype.dispatchSortChangedEvents = function (source) {
48898 var event = {
48899 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SORT_CHANGED,
48900 source: source
48901 };
48902 this.eventService.dispatchEvent(event);
48903 };
48904 SortController.prototype.clearSortBarTheseColumns = function (columnsToSkip, source) {
48905 this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(function (columnToClear) {
48906 // Do not clear if either holding shift, or if column in question was clicked
48907 if (!columnsToSkip.includes(columnToClear)) {
48908 // setting to 'undefined' as null means 'none' rather than cleared, otherwise issue will arise
48909 // if sort order is: ['desc', null , 'asc'], as it will start at null rather than 'desc'.
48910 columnToClear.setSort(undefined, source);
48911 }
48912 });
48913 };
48914 SortController.prototype.getNextSortDirection = function (column) {
48915 var sortingOrder;
48916 if (column.getColDef().sortingOrder) {
48917 sortingOrder = column.getColDef().sortingOrder;
48918 }
48919 else if (this.gridOptionsService.get('sortingOrder')) {
48920 sortingOrder = this.gridOptionsService.get('sortingOrder');
48921 }
48922 else {
48923 sortingOrder = SortController_1.DEFAULT_SORTING_ORDER;
48924 }
48925 if (!Array.isArray(sortingOrder) || sortingOrder.length <= 0) {
48926 console.warn("AG Grid: sortingOrder must be an array with at least one element, currently it's " + sortingOrder);
48927 return null;
48928 }
48929 // if a field is present, this column could have it's own sort, otherwise it's calculated from other columns
48930 var currentSort = !!column.getColDef().field ? column.getSort() : this.getDisplaySortForColumn(column);
48931 var result = sortingOrder[0];
48932 if (currentSort !== 'mixed') {
48933 var currentIndex = sortingOrder.indexOf(currentSort);
48934 var notInArray = currentIndex < 0;
48935 var lastItemInArray = currentIndex == sortingOrder.length - 1;
48936 if (notInArray || lastItemInArray) {
48937 result = sortingOrder[0];
48938 }
48939 else {
48940 result = sortingOrder[currentIndex + 1];
48941 }
48942 }
48943 // verify the sort type exists, as the user could provide the sortingOrder, need to make sure it's valid
48944 if (SortController_1.DEFAULT_SORTING_ORDER.indexOf(result) < 0) {
48945 console.warn('AG Grid: invalid sort type ' + result);
48946 return null;
48947 }
48948 return result;
48949 };
48950 /**
48951 * @param includeRedundantColumns whether to include non-grouped, non-secondary, non-aggregated columns when pivot active
48952 * @returns a map of sort indexes for every sorted column, if groups sort primaries then they will have equivalent indices
48953 */
48954 SortController.prototype.getIndexedSortMap = function (includeRedundantColumns) {
48955 var _this = this;
48956 if (includeRedundantColumns === void 0) { includeRedundantColumns = false; }
48957 // pull out all the columns that have sorting set
48958 var allSortedCols = this.columnModel.getPrimaryAndSecondaryAndAutoColumns()
48959 .filter(function (col) { return !!col.getSort(); });
48960 if (!includeRedundantColumns && this.columnModel.isPivotMode()) {
48961 allSortedCols = allSortedCols.filter(function (col) { return (!!col.getAggFunc() || !col.isPrimary() || _this.columnModel.getGroupDisplayColumnForGroup(col.getId())); });
48962 }
48963 var sortedRowGroupCols = this.columnModel.getRowGroupColumns()
48964 .filter(function (col) { return !!col.getSort(); });
48965 var isSortLinked = this.gridOptionsService.isColumnsSortingCoupledToGroup() && !!sortedRowGroupCols.length;
48966 if (isSortLinked) {
48967 allSortedCols = __spread(new Set(
48968 // if linked sorting, replace all columns with the display group column for index purposes, and ensure uniqueness
48969 allSortedCols.map(function (col) { var _a; return (_a = _this.columnModel.getGroupDisplayColumnForGroup(col.getId())) !== null && _a !== void 0 ? _a : col; })));
48970 }
48971 // when both cols are missing sortIndex, we use the position of the col in all cols list.
48972 // this means if colDefs only have sort, but no sortIndex, we deterministically pick which
48973 // cols is sorted by first.
48974 var allColsIndexes = {};
48975 allSortedCols.forEach(function (col, index) { return allColsIndexes[col.getId()] = index; });
48976 // put the columns in order of which one got sorted first
48977 allSortedCols.sort(function (a, b) {
48978 var iA = a.getSortIndex();
48979 var iB = b.getSortIndex();
48980 if (iA != null && iB != null) {
48981 return iA - iB; // both present, normal comparison
48982 }
48983 else if (iA == null && iB == null) {
48984 // both missing, compare using column positions
48985 var posA = allColsIndexes[a.getId()];
48986 var posB = allColsIndexes[b.getId()];
48987 return posA > posB ? 1 : -1;
48988 }
48989 else if (iB == null) {
48990 return -1; // iB missing
48991 }
48992 else {
48993 return 1; // iA missing
48994 }
48995 });
48996 var indexMap = new Map();
48997 allSortedCols.forEach(function (col, idx) { return indexMap.set(col, idx); });
48998 // add the row group cols back
48999 if (isSortLinked) {
49000 sortedRowGroupCols.forEach(function (col) {
49001 var groupDisplayCol = _this.columnModel.getGroupDisplayColumnForGroup(col.getId());
49002 indexMap.set(col, indexMap.get(groupDisplayCol));
49003 });
49004 }
49005 return indexMap;
49006 };
49007 SortController.prototype.getColumnsWithSortingOrdered = function (includeRedundantColumns) {
49008 if (includeRedundantColumns === void 0) { includeRedundantColumns = false; }
49009 // pull out all the columns that have sorting set
49010 return __spread(this.getIndexedSortMap(includeRedundantColumns).entries()).sort(function (_a, _b) {
49011 var _c = __read(_a, 2), col1 = _c[0], idx1 = _c[1];
49012 var _d = __read(_b, 2), col2 = _d[0], idx2 = _d[1];
49013 return idx1 - idx2;
49014 })
49015 .map(function (_a) {
49016 var _b = __read(_a, 1), col = _b[0];
49017 return col;
49018 });
49019 };
49020 // used by server side row models, to sent sort to server
49021 SortController.prototype.getSortModel = function () {
49022 // because this is used by the SSRM, we include redundant options and let the server decide
49023 return this.getColumnsWithSortingOrdered(true).map(function (column) { return ({
49024 sort: column.getSort(),
49025 colId: column.getId()
49026 }); });
49027 };
49028 SortController.prototype.getSortOptions = function () {
49029 // this is used for client side sorting, as such we can ignore redundant column sorts
49030 return this.getColumnsWithSortingOrdered().map(function (column) { return ({
49031 sort: column.getSort(),
49032 column: column
49033 }); });
49034 };
49035 SortController.prototype.canColumnDisplayMixedSort = function (column) {
49036 var isColumnSortCouplingActive = this.gridOptionsService.isColumnsSortingCoupledToGroup();
49037 var isGroupDisplayColumn = !!column.getColDef().showRowGroup;
49038 return isColumnSortCouplingActive && isGroupDisplayColumn;
49039 };
49040 SortController.prototype.getDisplaySortForColumn = function (column) {
49041 var linkedColumns = this.columnModel.getSourceColumnsForGroupColumn(column);
49042 if (!this.canColumnDisplayMixedSort(column) || !(linkedColumns === null || linkedColumns === void 0 ? void 0 : linkedColumns.length)) {
49043 return column.getSort();
49044 }
49045 // if column has unique data, its sorting is independent - but can still be mixed
49046 var columnHasUniqueData = !!column.getColDef().field;
49047 var sortableColumns = columnHasUniqueData ? __spread([column], linkedColumns) : linkedColumns;
49048 var firstSort = sortableColumns[0].getSort();
49049 // the == is intentional, as null and undefined both represent no sort, which means they are equivalent
49050 var allMatch = sortableColumns.every(function (col) { return col.getSort() == firstSort; });
49051 if (!allMatch) {
49052 return 'mixed';
49053 }
49054 return firstSort;
49055 };
49056 SortController.prototype.getDisplaySortIndexForColumn = function (column) {
49057 return this.getIndexedSortMap().get(column);
49058 };
49059 var SortController_1;
49060 SortController.DEFAULT_SORTING_ORDER = ['asc', 'desc', null];
49061 __decorate([
49062 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
49063 ], SortController.prototype, "columnModel", void 0);
49064 SortController = SortController_1 = __decorate([
49065 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('sortController')
49066 ], SortController);
49067 return SortController;
49068}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
49069
49070
49071
49072/***/ }),
49073/* 216 */
49074/***/ (function(module, __webpack_exports__, __webpack_require__) {
49075
49076"use strict";
49077__webpack_require__.r(__webpack_exports__);
49078/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnHoverService", function() { return ColumnHoverService; });
49079/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
49080/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
49081/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
49082/**
49083 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49084 * @version v29.2.0
49085 * @link https://www.ag-grid.com/
49086 * @license MIT
49087 */
49088var __extends = (undefined && undefined.__extends) || (function () {
49089 var extendStatics = function (d, b) {
49090 extendStatics = Object.setPrototypeOf ||
49091 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49092 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
49093 return extendStatics(d, b);
49094 };
49095 return function (d, b) {
49096 extendStatics(d, b);
49097 function __() { this.constructor = d; }
49098 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49099 };
49100})();
49101var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49102 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49103 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49104 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;
49105 return c > 3 && r && Object.defineProperty(target, key, r), r;
49106};
49107
49108
49109
49110var ColumnHoverService = /** @class */ (function (_super) {
49111 __extends(ColumnHoverService, _super);
49112 function ColumnHoverService() {
49113 return _super !== null && _super.apply(this, arguments) || this;
49114 }
49115 ColumnHoverService.prototype.setMouseOver = function (columns) {
49116 this.selectedColumns = columns;
49117 var event = {
49118 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_HOVER_CHANGED
49119 };
49120 this.eventService.dispatchEvent(event);
49121 };
49122 ColumnHoverService.prototype.clearMouseOver = function () {
49123 this.selectedColumns = null;
49124 var event = {
49125 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_COLUMN_HOVER_CHANGED
49126 };
49127 this.eventService.dispatchEvent(event);
49128 };
49129 ColumnHoverService.prototype.isHovered = function (column) {
49130 return !!this.selectedColumns && this.selectedColumns.indexOf(column) >= 0;
49131 };
49132 ColumnHoverService = __decorate([
49133 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('columnHoverService')
49134 ], ColumnHoverService);
49135 return ColumnHoverService;
49136}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
49137
49138
49139
49140/***/ }),
49141/* 217 */
49142/***/ (function(module, __webpack_exports__, __webpack_require__) {
49143
49144"use strict";
49145__webpack_require__.r(__webpack_exports__);
49146/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnAnimationService", function() { return ColumnAnimationService; });
49147/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
49148/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
49149/**
49150 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49151 * @version v29.2.0
49152 * @link https://www.ag-grid.com/
49153 * @license MIT
49154 */
49155var __extends = (undefined && undefined.__extends) || (function () {
49156 var extendStatics = function (d, b) {
49157 extendStatics = Object.setPrototypeOf ||
49158 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49159 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
49160 return extendStatics(d, b);
49161 };
49162 return function (d, b) {
49163 extendStatics(d, b);
49164 function __() { this.constructor = d; }
49165 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49166 };
49167})();
49168var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49169 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49170 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49171 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;
49172 return c > 3 && r && Object.defineProperty(target, key, r), r;
49173};
49174
49175
49176var ColumnAnimationService = /** @class */ (function (_super) {
49177 __extends(ColumnAnimationService, _super);
49178 function ColumnAnimationService() {
49179 var _this = _super !== null && _super.apply(this, arguments) || this;
49180 _this.executeNextFuncs = [];
49181 _this.executeLaterFuncs = [];
49182 _this.active = false;
49183 _this.animationThreadCount = 0;
49184 return _this;
49185 }
49186 ColumnAnimationService.prototype.postConstruct = function () {
49187 var _this = this;
49188 this.ctrlsService.whenReady(function (p) { return _this.gridBodyCtrl = p.gridBodyCtrl; });
49189 };
49190 ColumnAnimationService.prototype.isActive = function () {
49191 return this.active;
49192 };
49193 ColumnAnimationService.prototype.start = function () {
49194 if (this.active) {
49195 return;
49196 }
49197 if (this.gridOptionsService.is('suppressColumnMoveAnimation')) {
49198 return;
49199 }
49200 // if doing RTL, we don't animate open / close as due to how the pixels are inverted,
49201 // the animation moves all the row the the right rather than to the left (ie it's the static
49202 // columns that actually get their coordinates updated)
49203 if (this.gridOptionsService.is('enableRtl')) {
49204 return;
49205 }
49206 this.ensureAnimationCssClassPresent();
49207 this.active = true;
49208 };
49209 ColumnAnimationService.prototype.finish = function () {
49210 if (!this.active) {
49211 return;
49212 }
49213 this.flush();
49214 this.active = false;
49215 };
49216 ColumnAnimationService.prototype.executeNextVMTurn = function (func) {
49217 if (this.active) {
49218 this.executeNextFuncs.push(func);
49219 }
49220 else {
49221 func();
49222 }
49223 };
49224 ColumnAnimationService.prototype.executeLaterVMTurn = function (func) {
49225 if (this.active) {
49226 this.executeLaterFuncs.push(func);
49227 }
49228 else {
49229 func();
49230 }
49231 };
49232 ColumnAnimationService.prototype.ensureAnimationCssClassPresent = function () {
49233 var _this = this;
49234 // up the count, so we can tell if someone else has updated the count
49235 // by the time the 'wait' func executes
49236 this.animationThreadCount++;
49237 var animationThreadCountCopy = this.animationThreadCount;
49238 this.gridBodyCtrl.setColumnMovingCss(true);
49239 this.executeLaterFuncs.push(function () {
49240 // only remove the class if this thread was the last one to update it
49241 if (_this.animationThreadCount === animationThreadCountCopy) {
49242 _this.gridBodyCtrl.setColumnMovingCss(false);
49243 }
49244 });
49245 };
49246 ColumnAnimationService.prototype.flush = function () {
49247 var nowFuncs = this.executeNextFuncs;
49248 this.executeNextFuncs = [];
49249 var waitFuncs = this.executeLaterFuncs;
49250 this.executeLaterFuncs = [];
49251 if (nowFuncs.length === 0 && waitFuncs.length === 0) {
49252 return;
49253 }
49254 window.setTimeout(function () { return nowFuncs.forEach(function (func) { return func(); }); }, 0);
49255 window.setTimeout(function () { return waitFuncs.forEach(function (func) { return func(); }); }, 300);
49256 };
49257 __decorate([
49258 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
49259 ], ColumnAnimationService.prototype, "ctrlsService", void 0);
49260 __decorate([
49261 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
49262 ], ColumnAnimationService.prototype, "postConstruct", null);
49263 ColumnAnimationService = __decorate([
49264 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('columnAnimationService')
49265 ], ColumnAnimationService);
49266 return ColumnAnimationService;
49267}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
49268
49269
49270
49271/***/ }),
49272/* 218 */
49273/***/ (function(module, __webpack_exports__, __webpack_require__) {
49274
49275"use strict";
49276__webpack_require__.r(__webpack_exports__);
49277/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PaginationAutoPageSizeService", function() { return PaginationAutoPageSizeService; });
49278/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
49279/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
49280/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
49281/**
49282 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49283 * @version v29.2.0
49284 * @link https://www.ag-grid.com/
49285 * @license MIT
49286 */
49287var __extends = (undefined && undefined.__extends) || (function () {
49288 var extendStatics = function (d, b) {
49289 extendStatics = Object.setPrototypeOf ||
49290 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49291 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
49292 return extendStatics(d, b);
49293 };
49294 return function (d, b) {
49295 extendStatics(d, b);
49296 function __() { this.constructor = d; }
49297 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49298 };
49299})();
49300var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49301 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49302 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49303 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;
49304 return c > 3 && r && Object.defineProperty(target, key, r), r;
49305};
49306
49307
49308
49309var PaginationAutoPageSizeService = /** @class */ (function (_super) {
49310 __extends(PaginationAutoPageSizeService, _super);
49311 function PaginationAutoPageSizeService() {
49312 return _super !== null && _super.apply(this, arguments) || this;
49313 }
49314 PaginationAutoPageSizeService.prototype.postConstruct = function () {
49315 var _this = this;
49316 this.ctrlsService.whenReady(function (p) {
49317 _this.centerRowContainerCon = p.centerRowContainerCtrl;
49318 _this.addManagedListener(_this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_BODY_HEIGHT_CHANGED, _this.onBodyHeightChanged.bind(_this));
49319 _this.addManagedListener(_this.eventService, _events__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED, _this.onScrollVisibilityChanged.bind(_this));
49320 _this.checkPageSize();
49321 });
49322 };
49323 PaginationAutoPageSizeService.prototype.notActive = function () {
49324 return !this.gridOptionsService.is('paginationAutoPageSize');
49325 };
49326 PaginationAutoPageSizeService.prototype.onScrollVisibilityChanged = function () {
49327 this.checkPageSize();
49328 };
49329 PaginationAutoPageSizeService.prototype.onBodyHeightChanged = function () {
49330 this.checkPageSize();
49331 };
49332 PaginationAutoPageSizeService.prototype.checkPageSize = function () {
49333 if (this.notActive()) {
49334 return;
49335 }
49336 var rowHeight = this.gridOptionsService.getRowHeightAsNumber();
49337 var bodyHeight = this.centerRowContainerCon.getViewportSizeFeature().getBodyHeight();
49338 if (bodyHeight > 0) {
49339 var newPageSize = Math.floor(bodyHeight / rowHeight);
49340 this.gridOptionsService.set('paginationPageSize', newPageSize);
49341 }
49342 };
49343 __decorate([
49344 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('ctrlsService')
49345 ], PaginationAutoPageSizeService.prototype, "ctrlsService", void 0);
49346 __decorate([
49347 _context_context__WEBPACK_IMPORTED_MODULE_2__["PostConstruct"]
49348 ], PaginationAutoPageSizeService.prototype, "postConstruct", null);
49349 PaginationAutoPageSizeService = __decorate([
49350 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('paginationAutoPageSizeService')
49351 ], PaginationAutoPageSizeService);
49352 return PaginationAutoPageSizeService;
49353}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
49354
49355
49356
49357/***/ }),
49358/* 219 */
49359/***/ (function(module, __webpack_exports__, __webpack_require__) {
49360
49361"use strict";
49362__webpack_require__.r(__webpack_exports__);
49363/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValueCache", function() { return ValueCache; });
49364/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
49365/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
49366/**
49367 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49368 * @version v29.2.0
49369 * @link https://www.ag-grid.com/
49370 * @license MIT
49371 */
49372var __extends = (undefined && undefined.__extends) || (function () {
49373 var extendStatics = function (d, b) {
49374 extendStatics = Object.setPrototypeOf ||
49375 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49376 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
49377 return extendStatics(d, b);
49378 };
49379 return function (d, b) {
49380 extendStatics(d, b);
49381 function __() { this.constructor = d; }
49382 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49383 };
49384})();
49385var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49386 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49387 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49388 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;
49389 return c > 3 && r && Object.defineProperty(target, key, r), r;
49390};
49391
49392
49393var ValueCache = /** @class */ (function (_super) {
49394 __extends(ValueCache, _super);
49395 function ValueCache() {
49396 var _this = _super !== null && _super.apply(this, arguments) || this;
49397 _this.cacheVersion = 0;
49398 return _this;
49399 }
49400 ValueCache.prototype.init = function () {
49401 this.active = this.gridOptionsService.is('valueCache');
49402 this.neverExpires = this.gridOptionsService.is('valueCacheNeverExpires');
49403 };
49404 ValueCache.prototype.onDataChanged = function () {
49405 if (this.neverExpires) {
49406 return;
49407 }
49408 this.expire();
49409 };
49410 ValueCache.prototype.expire = function () {
49411 this.cacheVersion++;
49412 };
49413 ValueCache.prototype.setValue = function (rowNode, colId, value) {
49414 if (this.active) {
49415 if (rowNode.__cacheVersion !== this.cacheVersion) {
49416 rowNode.__cacheVersion = this.cacheVersion;
49417 rowNode.__cacheData = {};
49418 }
49419 rowNode.__cacheData[colId] = value;
49420 }
49421 };
49422 ValueCache.prototype.getValue = function (rowNode, colId) {
49423 if (!this.active || rowNode.__cacheVersion !== this.cacheVersion) {
49424 return undefined;
49425 }
49426 return rowNode.__cacheData[colId];
49427 };
49428 __decorate([
49429 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
49430 ], ValueCache.prototype, "init", null);
49431 ValueCache = __decorate([
49432 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('valueCache')
49433 ], ValueCache);
49434 return ValueCache;
49435}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
49436
49437
49438
49439/***/ }),
49440/* 220 */
49441/***/ (function(module, __webpack_exports__, __webpack_require__) {
49442
49443"use strict";
49444__webpack_require__.r(__webpack_exports__);
49445/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangeDetectionService", function() { return ChangeDetectionService; });
49446/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
49447/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
49448/* harmony import */ var _utils_changedPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(183);
49449/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25);
49450/**
49451 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49452 * @version v29.2.0
49453 * @link https://www.ag-grid.com/
49454 * @license MIT
49455 */
49456var __extends = (undefined && undefined.__extends) || (function () {
49457 var extendStatics = function (d, b) {
49458 extendStatics = Object.setPrototypeOf ||
49459 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49460 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
49461 return extendStatics(d, b);
49462 };
49463 return function (d, b) {
49464 extendStatics(d, b);
49465 function __() { this.constructor = d; }
49466 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49467 };
49468})();
49469var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49470 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49471 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49472 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;
49473 return c > 3 && r && Object.defineProperty(target, key, r), r;
49474};
49475
49476
49477
49478
49479// Matches value in clipboard module
49480var SOURCE_PASTE = 'paste';
49481var ChangeDetectionService = /** @class */ (function (_super) {
49482 __extends(ChangeDetectionService, _super);
49483 function ChangeDetectionService() {
49484 return _super !== null && _super.apply(this, arguments) || this;
49485 }
49486 ChangeDetectionService.prototype.init = function () {
49487 if (this.rowModel.getType() === 'clientSide') {
49488 this.clientSideRowModel = this.rowModel;
49489 }
49490 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_CELL_VALUE_CHANGED, this.onCellValueChanged.bind(this));
49491 };
49492 ChangeDetectionService.prototype.onCellValueChanged = function (event) {
49493 // Clipboard service manages its own change detection, so no need to do it here.
49494 // The clipboard manages its own as otherwise this would happen once for every cell
49495 // that got updated as part of a paste operation, so e.g. if 100 cells in a paste operation,
49496 // this doChangeDetection would get called 100 times (once for each cell), instead clipboard
49497 // service executes the logic we have here once (in essence batching up all cell changes
49498 // into one change detection).
49499 if (event.source === SOURCE_PASTE) {
49500 return;
49501 }
49502 this.doChangeDetection(event.node, event.column);
49503 };
49504 ChangeDetectionService.prototype.doChangeDetection = function (rowNode, column) {
49505 if (this.gridOptionsService.is('suppressChangeDetection')) {
49506 return;
49507 }
49508 // step 1 of change detection is to update the aggregated values
49509 if (this.clientSideRowModel && !rowNode.isRowPinned()) {
49510 var onlyChangedColumns = this.gridOptionsService.is('aggregateOnlyChangedColumns');
49511 var changedPath = new _utils_changedPath__WEBPACK_IMPORTED_MODULE_2__["ChangedPath"](onlyChangedColumns, this.clientSideRowModel.getRootNode());
49512 changedPath.addParentNode(rowNode.parent, [column]);
49513 this.clientSideRowModel.doAggregate(changedPath);
49514 }
49515 // step 2 of change detection is to refresh the cells
49516 this.rowRenderer.refreshCells();
49517 };
49518 __decorate([
49519 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowModel')
49520 ], ChangeDetectionService.prototype, "rowModel", void 0);
49521 __decorate([
49522 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowRenderer')
49523 ], ChangeDetectionService.prototype, "rowRenderer", void 0);
49524 __decorate([
49525 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
49526 ], ChangeDetectionService.prototype, "init", null);
49527 ChangeDetectionService = __decorate([
49528 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('changeDetectionService')
49529 ], ChangeDetectionService);
49530 return ChangeDetectionService;
49531}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
49532
49533
49534
49535/***/ }),
49536/* 221 */
49537/***/ (function(module, __webpack_exports__, __webpack_require__) {
49538
49539"use strict";
49540__webpack_require__.r(__webpack_exports__);
49541/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgComponentUtils", function() { return AgComponentUtils; });
49542/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
49543/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
49544/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
49545/**
49546 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49547 * @version v29.2.0
49548 * @link https://www.ag-grid.com/
49549 * @license MIT
49550 */
49551var __extends = (undefined && undefined.__extends) || (function () {
49552 var extendStatics = function (d, b) {
49553 extendStatics = Object.setPrototypeOf ||
49554 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49555 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
49556 return extendStatics(d, b);
49557 };
49558 return function (d, b) {
49559 extendStatics(d, b);
49560 function __() { this.constructor = d; }
49561 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49562 };
49563})();
49564var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49565 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49566 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49567 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;
49568 return c > 3 && r && Object.defineProperty(target, key, r), r;
49569};
49570
49571
49572
49573var AgComponentUtils = /** @class */ (function (_super) {
49574 __extends(AgComponentUtils, _super);
49575 function AgComponentUtils() {
49576 return _super !== null && _super.apply(this, arguments) || this;
49577 }
49578 AgComponentUtils.prototype.adaptFunction = function (propertyName, jsCompFunc) {
49579 var metadata = this.componentMetadataProvider.retrieve(propertyName);
49580 if (metadata && metadata.functionAdapter) {
49581 return metadata.functionAdapter(jsCompFunc);
49582 }
49583 return null;
49584 };
49585 AgComponentUtils.prototype.adaptCellRendererFunction = function (callback) {
49586 var Adapter = /** @class */ (function () {
49587 function Adapter() {
49588 }
49589 Adapter.prototype.refresh = function (params) {
49590 return false;
49591 };
49592 Adapter.prototype.getGui = function () {
49593 return this.eGui;
49594 };
49595 Adapter.prototype.init = function (params) {
49596 var callbackResult = callback(params);
49597 var type = typeof callbackResult;
49598 if (type === 'string' || type === 'number' || type === 'boolean') {
49599 this.eGui = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["loadTemplate"])('<span>' + callbackResult + '</span>');
49600 return;
49601 }
49602 if (callbackResult == null) {
49603 this.eGui = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["loadTemplate"])('<span></span>');
49604 return;
49605 }
49606 this.eGui = callbackResult;
49607 };
49608 return Adapter;
49609 }());
49610 return Adapter;
49611 };
49612 AgComponentUtils.prototype.doesImplementIComponent = function (candidate) {
49613 if (!candidate) {
49614 return false;
49615 }
49616 return candidate.prototype && 'getGui' in candidate.prototype;
49617 };
49618 __decorate([
49619 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("componentMetadataProvider")
49620 ], AgComponentUtils.prototype, "componentMetadataProvider", void 0);
49621 AgComponentUtils = __decorate([
49622 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])("agComponentUtils")
49623 ], AgComponentUtils);
49624 return AgComponentUtils;
49625}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
49626
49627
49628
49629/***/ }),
49630/* 222 */
49631/***/ (function(module, __webpack_exports__, __webpack_require__) {
49632
49633"use strict";
49634__webpack_require__.r(__webpack_exports__);
49635/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentMetadataProvider", function() { return ComponentMetadataProvider; });
49636/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
49637/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
49638/**
49639 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49640 * @version v29.2.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 (Object.prototype.hasOwnProperty.call(b, 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
49665var ComponentMetadataProvider = /** @class */ (function (_super) {
49666 __extends(ComponentMetadataProvider, _super);
49667 function ComponentMetadataProvider() {
49668 return _super !== null && _super.apply(this, arguments) || this;
49669 }
49670 ComponentMetadataProvider.prototype.postConstruct = function () {
49671 this.componentMetaData = {
49672 dateComponent: {
49673 mandatoryMethodList: ['getDate', 'setDate'],
49674 optionalMethodList: ['afterGuiAttached', 'setInputPlaceholder', 'setInputAriaLabel']
49675 },
49676 detailCellRenderer: {
49677 mandatoryMethodList: [],
49678 optionalMethodList: ['refresh'],
49679 functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)
49680 },
49681 headerComponent: {
49682 mandatoryMethodList: [],
49683 optionalMethodList: ['refresh']
49684 },
49685 headerGroupComponent: {
49686 mandatoryMethodList: [],
49687 optionalMethodList: []
49688 },
49689 loadingCellRenderer: {
49690 mandatoryMethodList: [],
49691 optionalMethodList: []
49692 },
49693 loadingOverlayComponent: {
49694 mandatoryMethodList: [],
49695 optionalMethodList: []
49696 },
49697 noRowsOverlayComponent: {
49698 mandatoryMethodList: [],
49699 optionalMethodList: []
49700 },
49701 floatingFilterComponent: {
49702 mandatoryMethodList: ['onParentModelChanged'],
49703 optionalMethodList: ['afterGuiAttached']
49704 },
49705 floatingFilterWrapperComponent: {
49706 mandatoryMethodList: [],
49707 optionalMethodList: []
49708 },
49709 cellRenderer: {
49710 mandatoryMethodList: [],
49711 optionalMethodList: ['refresh', 'afterGuiAttached'],
49712 functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)
49713 },
49714 cellEditor: {
49715 mandatoryMethodList: ['getValue'],
49716 optionalMethodList: ['isPopup', 'isCancelBeforeStart', 'isCancelAfterEnd', 'getPopupPosition', 'focusIn', 'focusOut', 'afterGuiAttached']
49717 },
49718 innerRenderer: {
49719 mandatoryMethodList: [],
49720 optionalMethodList: ['afterGuiAttached'],
49721 functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)
49722 },
49723 fullWidthCellRenderer: {
49724 mandatoryMethodList: [],
49725 optionalMethodList: ['refresh', 'afterGuiAttached'],
49726 functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)
49727 },
49728 groupRowRenderer: {
49729 mandatoryMethodList: [],
49730 optionalMethodList: ['afterGuiAttached'],
49731 functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)
49732 },
49733 filter: {
49734 mandatoryMethodList: ['isFilterActive', 'doesFilterPass', 'getModel', 'setModel'],
49735 optionalMethodList: ['afterGuiAttached', 'afterGuiDetached', 'onNewRowsLoaded', 'getModelAsString', 'onFloatingFilterChanged', 'onAnyFilterChanged']
49736 },
49737 filterComponent: {
49738 mandatoryMethodList: ['isFilterActive', 'doesFilterPass', 'getModel', 'setModel'],
49739 optionalMethodList: ['afterGuiAttached', 'afterGuiDetached', 'onNewRowsLoaded', 'getModelAsString', 'onFloatingFilterChanged', 'onAnyFilterChanged']
49740 },
49741 statusPanel: {
49742 mandatoryMethodList: [],
49743 optionalMethodList: ['afterGuiAttached'],
49744 },
49745 toolPanel: {
49746 mandatoryMethodList: [],
49747 optionalMethodList: ['refresh', 'afterGuiAttached']
49748 },
49749 tooltipComponent: {
49750 mandatoryMethodList: [],
49751 optionalMethodList: []
49752 }
49753 };
49754 };
49755 ComponentMetadataProvider.prototype.retrieve = function (name) {
49756 return this.componentMetaData[name];
49757 };
49758 __decorate([
49759 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("agComponentUtils")
49760 ], ComponentMetadataProvider.prototype, "agComponentUtils", void 0);
49761 __decorate([
49762 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
49763 ], ComponentMetadataProvider.prototype, "postConstruct", null);
49764 ComponentMetadataProvider = __decorate([
49765 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])("componentMetadataProvider")
49766 ], ComponentMetadataProvider);
49767 return ComponentMetadataProvider;
49768}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
49769
49770
49771
49772/***/ }),
49773/* 223 */
49774/***/ (function(module, __webpack_exports__, __webpack_require__) {
49775
49776"use strict";
49777__webpack_require__.r(__webpack_exports__);
49778/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Environment", function() { return Environment; });
49779/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
49780/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
49781/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
49782/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
49783/**
49784 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49785 * @version v29.2.0
49786 * @link https://www.ag-grid.com/
49787 * @license MIT
49788 */
49789var __extends = (undefined && undefined.__extends) || (function () {
49790 var extendStatics = function (d, b) {
49791 extendStatics = Object.setPrototypeOf ||
49792 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49793 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
49794 return extendStatics(d, b);
49795 };
49796 return function (d, b) {
49797 extendStatics(d, b);
49798 function __() { this.constructor = d; }
49799 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49800 };
49801})();
49802var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49803 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
49804 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
49805 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;
49806 return c > 3 && r && Object.defineProperty(target, key, r), r;
49807};
49808var __read = (undefined && undefined.__read) || function (o, n) {
49809 var m = typeof Symbol === "function" && o[Symbol.iterator];
49810 if (!m) return o;
49811 var i = m.call(o), r, ar = [], e;
49812 try {
49813 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
49814 }
49815 catch (error) { e = { error: error }; }
49816 finally {
49817 try {
49818 if (r && !r.done && (m = i["return"])) m.call(i);
49819 }
49820 finally { if (e) throw e.error; }
49821 }
49822 return ar;
49823};
49824var __spread = (undefined && undefined.__spread) || function () {
49825 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
49826 return ar;
49827};
49828
49829
49830
49831
49832var DEFAULT_ROW_HEIGHT = 25;
49833var MIN_COL_WIDTH = 10;
49834var MAT_GRID_SIZE = 8;
49835var BASE_GRID_SIZE = 4;
49836var BALHAM_GRID_SIZE = 4;
49837var ALPINE_GRID_SIZE = 6;
49838var HARD_CODED_SIZES = {
49839 // this item is required for custom themes
49840 'ag-theme-custom': {
49841 headerHeight: 25,
49842 headerCellMinWidth: 24,
49843 listItemHeight: BASE_GRID_SIZE * 5,
49844 rowHeight: 25,
49845 chartMenuPanelWidth: 220
49846 },
49847 'ag-theme-material': {
49848 headerHeight: MAT_GRID_SIZE * 7,
49849 headerCellMinWidth: 48,
49850 listItemHeight: MAT_GRID_SIZE * 4,
49851 rowHeight: MAT_GRID_SIZE * 6,
49852 chartMenuPanelWidth: 240
49853 },
49854 'ag-theme-balham': {
49855 headerHeight: BALHAM_GRID_SIZE * 8,
49856 headerCellMinWidth: 24,
49857 listItemHeight: BALHAM_GRID_SIZE * 6,
49858 rowHeight: BALHAM_GRID_SIZE * 7,
49859 chartMenuPanelWidth: 220
49860 },
49861 'ag-theme-alpine': {
49862 headerHeight: ALPINE_GRID_SIZE * 8,
49863 headerCellMinWidth: 36,
49864 listItemHeight: ALPINE_GRID_SIZE * 4,
49865 rowHeight: ALPINE_GRID_SIZE * 7,
49866 chartMenuPanelWidth: 240
49867 }
49868};
49869/**
49870 * this object contains a list of Sass variables and an array
49871 * of CSS styles required to get the correct value.
49872 * eg. $virtual-item-height requires a structure, so we can get its height.
49873 * <div class="ag-theme-balham">
49874 * <div class="ag-virtual-list-container">
49875 * <div class="ag-virtual-list-item"></div>
49876 * </div>
49877 * </div>
49878 */
49879var SASS_PROPERTY_BUILDER = {
49880 headerHeight: ['ag-header-row'],
49881 headerCellMinWidth: ['ag-header-cell'],
49882 listItemHeight: ['ag-virtual-list-item'],
49883 rowHeight: ['ag-row'],
49884 chartMenuPanelWidth: ['ag-chart-docked-container']
49885};
49886var Environment = /** @class */ (function (_super) {
49887 __extends(Environment, _super);
49888 function Environment() {
49889 var _this = _super !== null && _super.apply(this, arguments) || this;
49890 _this.calculatedSizes = {};
49891 return _this;
49892 }
49893 Environment.prototype.postConstruct = function () {
49894 var _this = this;
49895 var _a;
49896 var el = (_a = this.getTheme().el) !== null && _a !== void 0 ? _a : this.eGridDiv;
49897 this.mutationObserver = new MutationObserver(function () {
49898 _this.calculatedSizes = {};
49899 _this.fireGridStylesChangedEvent();
49900 });
49901 this.mutationObserver.observe(el || this.eGridDiv, {
49902 attributes: true,
49903 attributeFilter: ['class']
49904 });
49905 };
49906 Environment.prototype.fireGridStylesChangedEvent = function () {
49907 var event = {
49908 type: _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_GRID_STYLES_CHANGED
49909 };
49910 this.eventService.dispatchEvent(event);
49911 };
49912 Environment.prototype.getSassVariable = function (key) {
49913 var _a = this.getTheme(), themeFamily = _a.themeFamily, el = _a.el;
49914 if (!themeFamily || themeFamily.indexOf('ag-theme') !== 0) {
49915 return;
49916 }
49917 if (!this.calculatedSizes) {
49918 this.calculatedSizes = {};
49919 }
49920 if (!this.calculatedSizes[themeFamily]) {
49921 this.calculatedSizes[themeFamily] = {};
49922 }
49923 var size = this.calculatedSizes[themeFamily][key];
49924 if (size != null) {
49925 return size;
49926 }
49927 this.calculatedSizes[themeFamily][key] = this.calculateValueForSassProperty(key, themeFamily, el);
49928 return this.calculatedSizes[themeFamily][key];
49929 };
49930 Environment.prototype.calculateValueForSassProperty = function (property, theme, themeElement) {
49931 var _a;
49932 var useTheme = 'ag-theme-' + (theme.match('material') ? 'material' : theme.match('balham') ? 'balham' : theme.match('alpine') ? 'alpine' : 'custom');
49933 var defaultValue = HARD_CODED_SIZES[useTheme][property];
49934 var eDocument = this.gridOptionsService.getDocument();
49935 if (!themeElement) {
49936 themeElement = this.eGridDiv;
49937 }
49938 if (!SASS_PROPERTY_BUILDER[property]) {
49939 return defaultValue;
49940 }
49941 var classList = SASS_PROPERTY_BUILDER[property];
49942 var div = eDocument.createElement('div');
49943 // this will apply SASS variables that were manually added to the current theme
49944 var classesFromThemeElement = Array.from(themeElement.classList);
49945 (_a = div.classList).add.apply(_a, __spread([theme], classesFromThemeElement));
49946 div.style.position = 'absolute';
49947 var el = classList.reduce(function (prevEl, currentClass) {
49948 var currentDiv = eDocument.createElement('div');
49949 currentDiv.style.position = 'static';
49950 currentDiv.classList.add(currentClass);
49951 prevEl.appendChild(currentDiv);
49952 return currentDiv;
49953 }, div);
49954 var calculatedValue = 0;
49955 if (eDocument.body) {
49956 eDocument.body.appendChild(div);
49957 var sizeName = property.toLowerCase().indexOf('height') !== -1 ? 'height' : 'width';
49958 calculatedValue = parseInt(window.getComputedStyle(el)[sizeName], 10);
49959 eDocument.body.removeChild(div);
49960 }
49961 return calculatedValue || defaultValue;
49962 };
49963 Environment.prototype.isThemeDark = function () {
49964 var theme = this.getTheme().theme;
49965 return !!theme && theme.indexOf('dark') >= 0;
49966 };
49967 Environment.prototype.chartMenuPanelWidth = function () {
49968 return this.getSassVariable('chartMenuPanelWidth');
49969 };
49970 Environment.prototype.getTheme = function () {
49971 var reg = /\bag-(material|(?:theme-([\w\-]*)))\b/g;
49972 var el = this.eGridDiv;
49973 var themeMatch = null;
49974 var allThemes = [];
49975 while (el) {
49976 themeMatch = reg.exec(el.className);
49977 if (!themeMatch) {
49978 el = el.parentElement || undefined;
49979 }
49980 else {
49981 var matched = el.className.match(reg);
49982 if (matched) {
49983 allThemes = matched;
49984 }
49985 break;
49986 }
49987 }
49988 if (!themeMatch) {
49989 return { allThemes: allThemes };
49990 }
49991 var theme = themeMatch[0];
49992 return { theme: theme, el: el, themeFamily: theme.replace(/-dark$/, ''), allThemes: allThemes };
49993 };
49994 Environment.prototype.getFromTheme = function (defaultValue, sassVariableName) {
49995 var _a;
49996 return (_a = this.getSassVariable(sassVariableName)) !== null && _a !== void 0 ? _a : defaultValue;
49997 };
49998 Environment.prototype.getDefaultRowHeight = function () {
49999 return this.getFromTheme(DEFAULT_ROW_HEIGHT, 'rowHeight');
50000 };
50001 Environment.prototype.getListItemHeight = function () {
50002 return this.getFromTheme(20, 'listItemHeight');
50003 };
50004 Environment.prototype.setRowHeightVariable = function (height) {
50005 var oldRowHeight = this.eGridDiv.style.getPropertyValue('--ag-line-height').trim();
50006 var newRowHeight = height + "px";
50007 if (oldRowHeight != newRowHeight) {
50008 this.eGridDiv.style.setProperty('--ag-line-height', newRowHeight);
50009 }
50010 };
50011 Environment.prototype.getMinColWidth = function () {
50012 var measuredMin = this.getFromTheme(null, 'headerCellMinWidth');
50013 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(measuredMin) ? Math.max(measuredMin, MIN_COL_WIDTH) : MIN_COL_WIDTH;
50014 };
50015 Environment.prototype.destroy = function () {
50016 this.calculatedSizes = null;
50017 if (this.mutationObserver) {
50018 this.mutationObserver.disconnect();
50019 }
50020 _super.prototype.destroy.call(this);
50021 };
50022 __decorate([
50023 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('eGridDiv')
50024 ], Environment.prototype, "eGridDiv", void 0);
50025 __decorate([
50026 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
50027 ], Environment.prototype, "postConstruct", null);
50028 Environment = __decorate([
50029 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('environment')
50030 ], Environment);
50031 return Environment;
50032}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
50033
50034
50035
50036/***/ }),
50037/* 224 */
50038/***/ (function(module, __webpack_exports__, __webpack_require__) {
50039
50040"use strict";
50041__webpack_require__.r(__webpack_exports__);
50042/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainerHeightService", function() { return RowContainerHeightService; });
50043/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
50044/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
50045/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26);
50046/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
50047/**
50048 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50049 * @version v29.2.0
50050 * @link https://www.ag-grid.com/
50051 * @license MIT
50052 */
50053var __extends = (undefined && undefined.__extends) || (function () {
50054 var extendStatics = function (d, b) {
50055 extendStatics = Object.setPrototypeOf ||
50056 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50057 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
50058 return extendStatics(d, b);
50059 };
50060 return function (d, b) {
50061 extendStatics(d, b);
50062 function __() { this.constructor = d; }
50063 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50064 };
50065})();
50066var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50067 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50068 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50069 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;
50070 return c > 3 && r && Object.defineProperty(target, key, r), r;
50071};
50072var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
50073 return function (target, key) { decorator(target, key, paramIndex); }
50074};
50075
50076
50077
50078
50079/**
50080 * This class solves the 'max height' problem, where the user might want to show more data than
50081 * the max div height actually allows.
50082 */
50083var RowContainerHeightService = /** @class */ (function (_super) {
50084 __extends(RowContainerHeightService, _super);
50085 function RowContainerHeightService() {
50086 var _this = _super !== null && _super.apply(this, arguments) || this;
50087 // the scrollY position
50088 _this.scrollY = 0;
50089 // how tall the body is
50090 _this.uiBodyHeight = 0;
50091 return _this;
50092 }
50093 RowContainerHeightService.prototype.agWire = function (loggerFactory) {
50094 this.logger = loggerFactory.create("RowContainerHeightService");
50095 };
50096 RowContainerHeightService.prototype.postConstruct = function () {
50097 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_BODY_HEIGHT_CHANGED, this.updateOffset.bind(this));
50098 this.maxDivHeight = Object(_utils_browser__WEBPACK_IMPORTED_MODULE_3__["getMaxDivHeight"])();
50099 this.logger.log('maxDivHeight = ' + this.maxDivHeight);
50100 };
50101 RowContainerHeightService.prototype.isStretching = function () {
50102 return this.stretching;
50103 };
50104 RowContainerHeightService.prototype.getDivStretchOffset = function () {
50105 return this.divStretchOffset;
50106 };
50107 RowContainerHeightService.prototype.updateOffset = function () {
50108 if (!this.stretching) {
50109 return;
50110 }
50111 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
50112 var newScrollY = gridBodyCon.getScrollFeature().getVScrollPosition().top;
50113 var newBodyHeight = this.getUiBodyHeight();
50114 var atLeastOneChanged = newScrollY !== this.scrollY || newBodyHeight !== this.uiBodyHeight;
50115 if (atLeastOneChanged) {
50116 this.scrollY = newScrollY;
50117 this.uiBodyHeight = newBodyHeight;
50118 this.calculateOffset();
50119 }
50120 };
50121 RowContainerHeightService.prototype.calculateOffset = function () {
50122 this.setUiContainerHeight(this.maxDivHeight);
50123 this.pixelsToShave = this.modelHeight - this.uiContainerHeight;
50124 this.maxScrollY = this.uiContainerHeight - this.uiBodyHeight;
50125 var scrollPercent = this.scrollY / this.maxScrollY;
50126 var divStretchOffset = scrollPercent * this.pixelsToShave;
50127 this.logger.log("Div Stretch Offset = " + divStretchOffset + " (" + this.pixelsToShave + " * " + scrollPercent + ")");
50128 this.setDivStretchOffset(divStretchOffset);
50129 };
50130 RowContainerHeightService.prototype.setUiContainerHeight = function (height) {
50131 if (height !== this.uiContainerHeight) {
50132 this.uiContainerHeight = height;
50133 this.eventService.dispatchEvent({ type: _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_ROW_CONTAINER_HEIGHT_CHANGED });
50134 }
50135 };
50136 RowContainerHeightService.prototype.clearOffset = function () {
50137 this.setUiContainerHeight(this.modelHeight);
50138 this.pixelsToShave = 0;
50139 this.setDivStretchOffset(0);
50140 };
50141 RowContainerHeightService.prototype.setDivStretchOffset = function (newOffset) {
50142 // because we are talking pixels, no point in confusing things with half numbers
50143 var newOffsetFloor = typeof newOffset === 'number' ? Math.floor(newOffset) : null;
50144 if (this.divStretchOffset === newOffsetFloor) {
50145 return;
50146 }
50147 this.divStretchOffset = newOffsetFloor;
50148 this.eventService.dispatchEvent({ type: _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_HEIGHT_SCALE_CHANGED });
50149 };
50150 RowContainerHeightService.prototype.setModelHeight = function (modelHeight) {
50151 this.modelHeight = modelHeight;
50152 this.stretching = modelHeight != null // null happens when in print layout
50153 && this.maxDivHeight > 0
50154 && modelHeight > this.maxDivHeight;
50155 if (this.stretching) {
50156 this.calculateOffset();
50157 }
50158 else {
50159 this.clearOffset();
50160 }
50161 };
50162 RowContainerHeightService.prototype.getUiContainerHeight = function () {
50163 return this.uiContainerHeight;
50164 };
50165 RowContainerHeightService.prototype.getRealPixelPosition = function (modelPixel) {
50166 return modelPixel - this.divStretchOffset;
50167 };
50168 RowContainerHeightService.prototype.getUiBodyHeight = function () {
50169 var gridBodyCon = this.ctrlsService.getGridBodyCtrl();
50170 var pos = gridBodyCon.getScrollFeature().getVScrollPosition();
50171 return pos.bottom - pos.top;
50172 };
50173 RowContainerHeightService.prototype.getScrollPositionForPixel = function (rowTop) {
50174 if (this.pixelsToShave <= 0) {
50175 return rowTop;
50176 }
50177 var modelMaxScroll = this.modelHeight - this.getUiBodyHeight();
50178 var scrollPercent = rowTop / modelMaxScroll;
50179 var scrollPixel = this.maxScrollY * scrollPercent;
50180 return scrollPixel;
50181 };
50182 __decorate([
50183 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('ctrlsService')
50184 ], RowContainerHeightService.prototype, "ctrlsService", void 0);
50185 __decorate([
50186 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Qualifier"])("loggerFactory"))
50187 ], RowContainerHeightService.prototype, "agWire", null);
50188 __decorate([
50189 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
50190 ], RowContainerHeightService.prototype, "postConstruct", null);
50191 RowContainerHeightService = __decorate([
50192 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('rowContainerHeightService')
50193 ], RowContainerHeightService);
50194 return RowContainerHeightService;
50195}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
50196
50197
50198
50199/***/ }),
50200/* 225 */
50201/***/ (function(module, __webpack_exports__, __webpack_require__) {
50202
50203"use strict";
50204__webpack_require__.r(__webpack_exports__);
50205/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectableService", function() { return SelectableService; });
50206/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
50207/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
50208/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
50209/**
50210 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50211 * @version v29.2.0
50212 * @link https://www.ag-grid.com/
50213 * @license MIT
50214 */
50215var __extends = (undefined && undefined.__extends) || (function () {
50216 var extendStatics = function (d, b) {
50217 extendStatics = Object.setPrototypeOf ||
50218 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50219 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
50220 return extendStatics(d, b);
50221 };
50222 return function (d, b) {
50223 extendStatics(d, b);
50224 function __() { this.constructor = d; }
50225 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50226 };
50227})();
50228var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50229 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50230 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50231 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;
50232 return c > 3 && r && Object.defineProperty(target, key, r), r;
50233};
50234
50235
50236
50237var SelectableService = /** @class */ (function (_super) {
50238 __extends(SelectableService, _super);
50239 function SelectableService() {
50240 return _super !== null && _super.apply(this, arguments) || this;
50241 }
50242 SelectableService.prototype.init = function () {
50243 this.groupSelectsChildren = this.gridOptionsService.is('groupSelectsChildren');
50244 this.isRowSelectableFunc = this.gridOptionsService.get('isRowSelectable');
50245 };
50246 SelectableService.prototype.updateSelectableAfterGrouping = function (rowNode) {
50247 if (this.isRowSelectableFunc) {
50248 var nextChildrenFunc = function (node) { return node.childrenAfterGroup; };
50249 this.recurseDown(rowNode.childrenAfterGroup, nextChildrenFunc);
50250 }
50251 };
50252 SelectableService.prototype.recurseDown = function (children, nextChildrenFunc) {
50253 var _this = this;
50254 if (!children) {
50255 return;
50256 }
50257 children.forEach(function (child) {
50258 if (!child.group) {
50259 return;
50260 } // only interested in groups
50261 if (child.hasChildren()) {
50262 _this.recurseDown(nextChildrenFunc(child), nextChildrenFunc);
50263 }
50264 var rowSelectable;
50265 if (_this.groupSelectsChildren) {
50266 // have this group selectable if at least one direct child is selectable
50267 var firstSelectable = (nextChildrenFunc(child) || []).find(function (rowNode) { return rowNode.selectable === true; });
50268 rowSelectable = Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(firstSelectable);
50269 }
50270 else {
50271 // directly retrieve selectable value from user callback
50272 rowSelectable = _this.isRowSelectableFunc ? _this.isRowSelectableFunc(child) : false;
50273 }
50274 child.setRowSelectable(rowSelectable);
50275 });
50276 };
50277 __decorate([
50278 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
50279 ], SelectableService.prototype, "init", null);
50280 SelectableService = __decorate([
50281 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('selectableService')
50282 ], SelectableService);
50283 return SelectableService;
50284}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
50285
50286
50287
50288/***/ }),
50289/* 226 */
50290/***/ (function(module, __webpack_exports__, __webpack_require__) {
50291
50292"use strict";
50293__webpack_require__.r(__webpack_exports__);
50294/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PaginationComp", function() { return PaginationComp; });
50295/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
50296/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
50297/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
50298/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25);
50299/* harmony import */ var _utils_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46);
50300/* harmony import */ var _utils_number__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(44);
50301/* harmony import */ var _utils_aria__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41);
50302/* harmony import */ var _constants_keyCode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48);
50303/**
50304 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50305 * @version v29.2.0
50306 * @link https://www.ag-grid.com/
50307 * @license MIT
50308 */
50309var __extends = (undefined && undefined.__extends) || (function () {
50310 var extendStatics = function (d, b) {
50311 extendStatics = Object.setPrototypeOf ||
50312 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50313 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
50314 return extendStatics(d, b);
50315 };
50316 return function (d, b) {
50317 extendStatics(d, b);
50318 function __() { this.constructor = d; }
50319 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50320 };
50321})();
50322var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50323 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50324 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50325 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;
50326 return c > 3 && r && Object.defineProperty(target, key, r), r;
50327};
50328
50329
50330
50331
50332
50333
50334
50335
50336var PaginationComp = /** @class */ (function (_super) {
50337 __extends(PaginationComp, _super);
50338 function PaginationComp() {
50339 var _this = _super.call(this) || this;
50340 _this.previousAndFirstButtonsDisabled = false;
50341 _this.nextButtonDisabled = false;
50342 _this.lastButtonDisabled = false;
50343 _this.areListenersSetup = false;
50344 return _this;
50345 }
50346 PaginationComp.prototype.postConstruct = function () {
50347 var isRtl = this.gridOptionsService.is('enableRtl');
50348 this.setTemplate(this.getTemplate());
50349 this.btFirst.insertAdjacentElement('afterbegin', Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])(isRtl ? 'last' : 'first', this.gridOptionsService));
50350 this.btPrevious.insertAdjacentElement('afterbegin', Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])(isRtl ? 'next' : 'previous', this.gridOptionsService));
50351 this.btNext.insertAdjacentElement('afterbegin', Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])(isRtl ? 'previous' : 'next', this.gridOptionsService));
50352 this.btLast.insertAdjacentElement('afterbegin', Object(_utils_icon__WEBPACK_IMPORTED_MODULE_4__["createIconNoSpan"])(isRtl ? 'first' : 'last', this.gridOptionsService));
50353 this.addManagedPropertyListener('pagination', this.onPaginationChanged.bind(this));
50354 this.addManagedPropertyListener('suppressPaginationPanel', this.onPaginationChanged.bind(this));
50355 this.onPaginationChanged();
50356 };
50357 PaginationComp.prototype.onPaginationChanged = function () {
50358 var isPaging = this.gridOptionsService.is('pagination');
50359 var paginationPanelEnabled = isPaging && !this.gridOptionsService.is('suppressPaginationPanel');
50360 this.setDisplayed(paginationPanelEnabled);
50361 if (!paginationPanelEnabled) {
50362 return;
50363 }
50364 this.setupListeners();
50365 this.enableOrDisableButtons();
50366 this.updateRowLabels();
50367 this.setCurrentPageLabel();
50368 this.setTotalLabels();
50369 };
50370 PaginationComp.prototype.setupListeners = function () {
50371 var _this = this;
50372 if (!this.areListenersSetup) {
50373 this.addManagedListener(this.eventService, _events__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_PAGINATION_CHANGED, this.onPaginationChanged.bind(this));
50374 [
50375 { el: this.btFirst, fn: this.onBtFirst.bind(this) },
50376 { el: this.btPrevious, fn: this.onBtPrevious.bind(this) },
50377 { el: this.btNext, fn: this.onBtNext.bind(this) },
50378 { el: this.btLast, fn: this.onBtLast.bind(this) }
50379 ].forEach(function (item) {
50380 var el = item.el, fn = item.fn;
50381 _this.addManagedListener(el, 'click', fn);
50382 _this.addManagedListener(el, 'keydown', function (e) {
50383 if (e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_7__["KeyCode"].ENTER || e.key === _constants_keyCode__WEBPACK_IMPORTED_MODULE_7__["KeyCode"].SPACE) {
50384 e.preventDefault();
50385 fn();
50386 }
50387 });
50388 });
50389 this.areListenersSetup = true;
50390 }
50391 };
50392 PaginationComp.prototype.onBtFirst = function () {
50393 if (!this.previousAndFirstButtonsDisabled) {
50394 this.paginationProxy.goToFirstPage();
50395 }
50396 };
50397 PaginationComp.prototype.setCurrentPageLabel = function () {
50398 var pagesExist = this.paginationProxy.getTotalPages() > 0;
50399 var currentPage = this.paginationProxy.getCurrentPage();
50400 var toDisplay = pagesExist ? currentPage + 1 : 0;
50401 this.lbCurrent.innerHTML = this.formatNumber(toDisplay);
50402 };
50403 PaginationComp.prototype.formatNumber = function (value) {
50404 var userFunc = this.gridOptionsService.getCallback('paginationNumberFormatter');
50405 if (userFunc) {
50406 var params = { value: value };
50407 return userFunc(params);
50408 }
50409 var localeTextFunc = this.localeService.getLocaleTextFunc();
50410 var thousandSeparator = localeTextFunc('thousandSeparator', ',');
50411 var decimalSeparator = localeTextFunc('decimalSeparator', '.');
50412 return Object(_utils_number__WEBPACK_IMPORTED_MODULE_5__["formatNumberCommas"])(value, thousandSeparator, decimalSeparator);
50413 };
50414 PaginationComp.prototype.getTemplate = function () {
50415 var localeTextFunc = this.localeService.getLocaleTextFunc();
50416 var strPage = localeTextFunc('page', 'Page');
50417 var strTo = localeTextFunc('to', 'to');
50418 var strOf = localeTextFunc('of', 'of');
50419 var strFirst = localeTextFunc('firstPage', 'First Page');
50420 var strPrevious = localeTextFunc('previousPage', 'Previous Page');
50421 var strNext = localeTextFunc('nextPage', 'Next Page');
50422 var strLast = localeTextFunc('lastPage', 'Last Page');
50423 var compId = this.getCompId();
50424 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>";
50425 };
50426 PaginationComp.prototype.onBtNext = function () {
50427 if (!this.nextButtonDisabled) {
50428 this.paginationProxy.goToNextPage();
50429 }
50430 };
50431 PaginationComp.prototype.onBtPrevious = function () {
50432 if (!this.previousAndFirstButtonsDisabled) {
50433 this.paginationProxy.goToPreviousPage();
50434 }
50435 };
50436 PaginationComp.prototype.onBtLast = function () {
50437 if (!this.lastButtonDisabled) {
50438 this.paginationProxy.goToLastPage();
50439 }
50440 };
50441 PaginationComp.prototype.enableOrDisableButtons = function () {
50442 var currentPage = this.paginationProxy.getCurrentPage();
50443 var maxRowFound = this.paginationProxy.isLastPageFound();
50444 var totalPages = this.paginationProxy.getTotalPages();
50445 this.previousAndFirstButtonsDisabled = currentPage === 0;
50446 this.toggleButtonDisabled(this.btFirst, this.previousAndFirstButtonsDisabled);
50447 this.toggleButtonDisabled(this.btPrevious, this.previousAndFirstButtonsDisabled);
50448 var zeroPagesToDisplay = this.isZeroPagesToDisplay();
50449 var onLastPage = maxRowFound && currentPage === (totalPages - 1);
50450 this.nextButtonDisabled = onLastPage || zeroPagesToDisplay;
50451 this.lastButtonDisabled = !maxRowFound || zeroPagesToDisplay || currentPage === (totalPages - 1);
50452 this.toggleButtonDisabled(this.btNext, this.nextButtonDisabled);
50453 this.toggleButtonDisabled(this.btLast, this.lastButtonDisabled);
50454 };
50455 PaginationComp.prototype.toggleButtonDisabled = function (button, disabled) {
50456 Object(_utils_aria__WEBPACK_IMPORTED_MODULE_6__["setAriaDisabled"])(button, disabled);
50457 button.classList.toggle('ag-disabled', disabled);
50458 if (disabled) {
50459 button.removeAttribute('tabindex');
50460 }
50461 else {
50462 button.setAttribute('tabindex', '0');
50463 }
50464 };
50465 PaginationComp.prototype.updateRowLabels = function () {
50466 var currentPage = this.paginationProxy.getCurrentPage();
50467 var pageSize = this.paginationProxy.getPageSize();
50468 var maxRowFound = this.paginationProxy.isLastPageFound();
50469 var rowCount = this.paginationProxy.isLastPageFound() ?
50470 this.paginationProxy.getMasterRowCount() : null;
50471 var startRow;
50472 var endRow;
50473 if (this.isZeroPagesToDisplay()) {
50474 startRow = endRow = 0;
50475 }
50476 else {
50477 startRow = (pageSize * currentPage) + 1;
50478 endRow = startRow + pageSize - 1;
50479 if (maxRowFound && endRow > rowCount) {
50480 endRow = rowCount;
50481 }
50482 }
50483 this.lbFirstRowOnPage.innerHTML = this.formatNumber(startRow);
50484 if (this.rowNodeBlockLoader.isLoading()) {
50485 this.lbLastRowOnPage.innerHTML = '?';
50486 }
50487 else {
50488 this.lbLastRowOnPage.innerHTML = this.formatNumber(endRow);
50489 }
50490 };
50491 PaginationComp.prototype.isZeroPagesToDisplay = function () {
50492 var maxRowFound = this.paginationProxy.isLastPageFound();
50493 var totalPages = this.paginationProxy.getTotalPages();
50494 return maxRowFound && totalPages === 0;
50495 };
50496 PaginationComp.prototype.setTotalLabels = function () {
50497 var lastPageFound = this.paginationProxy.isLastPageFound();
50498 var totalPages = this.paginationProxy.getTotalPages();
50499 var rowCount = lastPageFound ? this.paginationProxy.getMasterRowCount() : null;
50500 // When `pivotMode=true` and no grouping or value columns exist, a single 'hidden' group row (root node) is in
50501 // the grid and the pagination totals will correctly display total = 1. However this is confusing to users as
50502 // they can't see it. To address this UX issue we simply set the totals to zero in the pagination panel.
50503 if (rowCount === 1) {
50504 var firstRow = this.paginationProxy.getRow(0);
50505 // a group node with no group or agg data will not be visible to users
50506 var hiddenGroupRow = firstRow && firstRow.group && !(firstRow.groupData || firstRow.aggData);
50507 if (hiddenGroupRow) {
50508 this.setTotalLabelsToZero();
50509 return;
50510 }
50511 }
50512 if (lastPageFound) {
50513 this.lbTotal.innerHTML = this.formatNumber(totalPages);
50514 this.lbRecordCount.innerHTML = this.formatNumber(rowCount);
50515 }
50516 else {
50517 var moreText = this.localeService.getLocaleTextFunc()('more', 'more');
50518 this.lbTotal.innerHTML = moreText;
50519 this.lbRecordCount.innerHTML = moreText;
50520 }
50521 };
50522 PaginationComp.prototype.setTotalLabelsToZero = function () {
50523 this.lbFirstRowOnPage.innerHTML = this.formatNumber(0);
50524 this.lbCurrent.innerHTML = this.formatNumber(0);
50525 this.lbLastRowOnPage.innerHTML = this.formatNumber(0);
50526 this.lbTotal.innerHTML = this.formatNumber(0);
50527 this.lbRecordCount.innerHTML = this.formatNumber(0);
50528 };
50529 __decorate([
50530 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('paginationProxy')
50531 ], PaginationComp.prototype, "paginationProxy", void 0);
50532 __decorate([
50533 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowNodeBlockLoader')
50534 ], PaginationComp.prototype, "rowNodeBlockLoader", void 0);
50535 __decorate([
50536 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('btFirst')
50537 ], PaginationComp.prototype, "btFirst", void 0);
50538 __decorate([
50539 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('btPrevious')
50540 ], PaginationComp.prototype, "btPrevious", void 0);
50541 __decorate([
50542 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('btNext')
50543 ], PaginationComp.prototype, "btNext", void 0);
50544 __decorate([
50545 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('btLast')
50546 ], PaginationComp.prototype, "btLast", void 0);
50547 __decorate([
50548 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('lbRecordCount')
50549 ], PaginationComp.prototype, "lbRecordCount", void 0);
50550 __decorate([
50551 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('lbFirstRowOnPage')
50552 ], PaginationComp.prototype, "lbFirstRowOnPage", void 0);
50553 __decorate([
50554 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('lbLastRowOnPage')
50555 ], PaginationComp.prototype, "lbLastRowOnPage", void 0);
50556 __decorate([
50557 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('lbCurrent')
50558 ], PaginationComp.prototype, "lbCurrent", void 0);
50559 __decorate([
50560 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('lbTotal')
50561 ], PaginationComp.prototype, "lbTotal", void 0);
50562 __decorate([
50563 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
50564 ], PaginationComp.prototype, "postConstruct", null);
50565 return PaginationComp;
50566}(_widgets_component__WEBPACK_IMPORTED_MODULE_0__["Component"]));
50567
50568
50569
50570/***/ }),
50571/* 227 */
50572/***/ (function(module, __webpack_exports__, __webpack_require__) {
50573
50574"use strict";
50575__webpack_require__.r(__webpack_exports__);
50576/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayWrapperComponent", function() { return OverlayWrapperComponent; });
50577/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
50578/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38);
50579/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
50580/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45);
50581/* harmony import */ var _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(117);
50582/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26);
50583/**
50584 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50585 * @version v29.2.0
50586 * @link https://www.ag-grid.com/
50587 * @license MIT
50588 */
50589var __extends = (undefined && undefined.__extends) || (function () {
50590 var extendStatics = function (d, b) {
50591 extendStatics = Object.setPrototypeOf ||
50592 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50593 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
50594 return extendStatics(d, b);
50595 };
50596 return function (d, b) {
50597 extendStatics(d, b);
50598 function __() { this.constructor = d; }
50599 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50600 };
50601})();
50602var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50603 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50604 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50605 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;
50606 return c > 3 && r && Object.defineProperty(target, key, r), r;
50607};
50608
50609
50610
50611
50612
50613
50614var LoadingType;
50615(function (LoadingType) {
50616 LoadingType[LoadingType["Loading"] = 0] = "Loading";
50617 LoadingType[LoadingType["NoRows"] = 1] = "NoRows";
50618})(LoadingType || (LoadingType = {}));
50619var OverlayWrapperComponent = /** @class */ (function (_super) {
50620 __extends(OverlayWrapperComponent, _super);
50621 function OverlayWrapperComponent() {
50622 var _this = _super.call(this, OverlayWrapperComponent.TEMPLATE) || this;
50623 _this.inProgress = false;
50624 _this.destroyRequested = false;
50625 _this.manuallyDisplayed = false;
50626 return _this;
50627 }
50628 OverlayWrapperComponent.prototype.updateLayoutClasses = function (cssClass, params) {
50629 var overlayWrapperClassList = this.eOverlayWrapper.classList;
50630 overlayWrapperClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__["LayoutCssClasses"].AUTO_HEIGHT, params.autoHeight);
50631 overlayWrapperClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__["LayoutCssClasses"].NORMAL, params.normal);
50632 overlayWrapperClassList.toggle(_styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__["LayoutCssClasses"].PRINT, params.print);
50633 };
50634 OverlayWrapperComponent.prototype.postConstruct = function () {
50635 this.createManagedBean(new _styling_layoutFeature__WEBPACK_IMPORTED_MODULE_4__["LayoutFeature"](this));
50636 this.setDisplayed(false, { skipAriaHidden: true });
50637 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_ROW_DATA_UPDATED, this.onRowDataUpdated.bind(this));
50638 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_5__["Events"].EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));
50639 if (this.gridOptionsService.isRowModelType('clientSide') && !this.gridOptionsService.get('rowData')) {
50640 this.showLoadingOverlay();
50641 }
50642 this.gridApi.registerOverlayWrapperComp(this);
50643 };
50644 OverlayWrapperComponent.prototype.setWrapperTypeClass = function (loadingType) {
50645 var overlayWrapperClassList = this.eOverlayWrapper.classList;
50646 overlayWrapperClassList.toggle('ag-overlay-loading-wrapper', loadingType === LoadingType.Loading);
50647 overlayWrapperClassList.toggle('ag-overlay-no-rows-wrapper', loadingType === LoadingType.NoRows);
50648 };
50649 OverlayWrapperComponent.prototype.showLoadingOverlay = function () {
50650 if (this.gridOptionsService.is('suppressLoadingOverlay')) {
50651 return;
50652 }
50653 var params = {};
50654 var compDetails = this.userComponentFactory.getLoadingOverlayCompDetails(params);
50655 var promise = compDetails.newAgStackInstance();
50656 this.showOverlay(promise, LoadingType.Loading);
50657 };
50658 OverlayWrapperComponent.prototype.showNoRowsOverlay = function () {
50659 if (this.gridOptionsService.is('suppressNoRowsOverlay')) {
50660 return;
50661 }
50662 var params = {};
50663 var compDetails = this.userComponentFactory.getNoRowsOverlayCompDetails(params);
50664 var promise = compDetails.newAgStackInstance();
50665 this.showOverlay(promise, LoadingType.NoRows);
50666 };
50667 OverlayWrapperComponent.prototype.showOverlay = function (workItem, type) {
50668 var _this = this;
50669 if (this.inProgress) {
50670 return;
50671 }
50672 this.setWrapperTypeClass(type);
50673 this.destroyActiveOverlay();
50674 this.inProgress = true;
50675 if (workItem) {
50676 workItem.then(function (comp) {
50677 _this.inProgress = false;
50678 _this.eOverlayWrapper.appendChild(comp.getGui());
50679 _this.activeOverlay = comp;
50680 if (_this.destroyRequested) {
50681 _this.destroyRequested = false;
50682 _this.destroyActiveOverlay();
50683 }
50684 });
50685 }
50686 this.manuallyDisplayed = this.columnModel.isReady() && !this.paginationProxy.isEmpty();
50687 this.setDisplayed(true, { skipAriaHidden: true });
50688 };
50689 OverlayWrapperComponent.prototype.destroyActiveOverlay = function () {
50690 if (this.inProgress) {
50691 this.destroyRequested = true;
50692 return;
50693 }
50694 if (!this.activeOverlay) {
50695 return;
50696 }
50697 this.activeOverlay = this.getContext().destroyBean(this.activeOverlay);
50698 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__["clearElement"])(this.eOverlayWrapper);
50699 };
50700 OverlayWrapperComponent.prototype.hideOverlay = function () {
50701 this.manuallyDisplayed = false;
50702 this.destroyActiveOverlay();
50703 this.setDisplayed(false, { skipAriaHidden: true });
50704 };
50705 OverlayWrapperComponent.prototype.destroy = function () {
50706 this.destroyActiveOverlay();
50707 _super.prototype.destroy.call(this);
50708 };
50709 OverlayWrapperComponent.prototype.showOrHideOverlay = function () {
50710 var isEmpty = this.paginationProxy.isEmpty();
50711 var isSuppressNoRowsOverlay = this.gridOptionsService.is('suppressNoRowsOverlay');
50712 if (isEmpty && !isSuppressNoRowsOverlay) {
50713 this.showNoRowsOverlay();
50714 }
50715 else {
50716 this.hideOverlay();
50717 }
50718 };
50719 OverlayWrapperComponent.prototype.onRowDataUpdated = function () {
50720 this.showOrHideOverlay();
50721 };
50722 OverlayWrapperComponent.prototype.onNewColumnsLoaded = function () {
50723 // hide overlay if columns and rows exist, this can happen if columns are loaded after data.
50724 // this problem exists before of the race condition between the services (column controller in this case)
50725 // and the view (grid panel). if the model beans were all initialised first, and then the view beans second,
50726 // this race condition would not happen.
50727 if (this.columnModel.isReady() && !this.paginationProxy.isEmpty() && !this.manuallyDisplayed) {
50728 this.hideOverlay();
50729 }
50730 };
50731 // wrapping in outer div, and wrapper, is needed to center the loading icon
50732 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>";
50733 __decorate([
50734 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('userComponentFactory')
50735 ], OverlayWrapperComponent.prototype, "userComponentFactory", void 0);
50736 __decorate([
50737 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
50738 ], OverlayWrapperComponent.prototype, "paginationProxy", void 0);
50739 __decorate([
50740 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridApi')
50741 ], OverlayWrapperComponent.prototype, "gridApi", void 0);
50742 __decorate([
50743 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
50744 ], OverlayWrapperComponent.prototype, "columnModel", void 0);
50745 __decorate([
50746 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_2__["RefSelector"])('eOverlayWrapper')
50747 ], OverlayWrapperComponent.prototype, "eOverlayWrapper", void 0);
50748 __decorate([
50749 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
50750 ], OverlayWrapperComponent.prototype, "postConstruct", null);
50751 return OverlayWrapperComponent;
50752}(_widgets_component__WEBPACK_IMPORTED_MODULE_1__["Component"]));
50753
50754
50755
50756/***/ }),
50757/* 228 */
50758/***/ (function(module, __webpack_exports__, __webpack_require__) {
50759
50760"use strict";
50761__webpack_require__.r(__webpack_exports__);
50762/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowPositionUtils", function() { return RowPositionUtils; });
50763/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
50764/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
50765/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
50766/**
50767 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50768 * @version v29.2.0
50769 * @link https://www.ag-grid.com/
50770 * @license MIT
50771 */
50772var __extends = (undefined && undefined.__extends) || (function () {
50773 var extendStatics = function (d, b) {
50774 extendStatics = Object.setPrototypeOf ||
50775 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50776 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
50777 return extendStatics(d, b);
50778 };
50779 return function (d, b) {
50780 extendStatics(d, b);
50781 function __() { this.constructor = d; }
50782 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50783 };
50784})();
50785var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50786 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50787 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50788 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;
50789 return c > 3 && r && Object.defineProperty(target, key, r), r;
50790};
50791
50792
50793
50794var RowPositionUtils = /** @class */ (function (_super) {
50795 __extends(RowPositionUtils, _super);
50796 function RowPositionUtils() {
50797 return _super !== null && _super.apply(this, arguments) || this;
50798 }
50799 RowPositionUtils.prototype.getFirstRow = function () {
50800 var rowIndex = 0;
50801 var rowPinned;
50802 if (this.pinnedRowModel.getPinnedTopRowCount()) {
50803 rowPinned = 'top';
50804 }
50805 else if (this.rowModel.getRowCount()) {
50806 rowPinned = null;
50807 rowIndex = this.paginationProxy.getPageFirstRow();
50808 }
50809 else if (this.pinnedRowModel.getPinnedBottomRowCount()) {
50810 rowPinned = 'bottom';
50811 }
50812 return rowPinned === undefined ? null : { rowIndex: rowIndex, rowPinned: rowPinned };
50813 };
50814 RowPositionUtils.prototype.getLastRow = function () {
50815 var rowIndex;
50816 var rowPinned = null;
50817 var pinnedBottomCount = this.pinnedRowModel.getPinnedBottomRowCount();
50818 var pinnedTopCount = this.pinnedRowModel.getPinnedTopRowCount();
50819 if (pinnedBottomCount) {
50820 rowPinned = 'bottom';
50821 rowIndex = pinnedBottomCount - 1;
50822 }
50823 else if (this.rowModel.getRowCount()) {
50824 rowPinned = null;
50825 rowIndex = this.paginationProxy.getPageLastRow();
50826 }
50827 else if (pinnedTopCount) {
50828 rowPinned = 'top';
50829 rowIndex = pinnedTopCount - 1;
50830 }
50831 return rowIndex === undefined ? null : { rowIndex: rowIndex, rowPinned: rowPinned };
50832 };
50833 RowPositionUtils.prototype.getRowNode = function (gridRow) {
50834 switch (gridRow.rowPinned) {
50835 case 'top':
50836 return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];
50837 case 'bottom':
50838 return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];
50839 default:
50840 return this.rowModel.getRow(gridRow.rowIndex);
50841 }
50842 };
50843 RowPositionUtils.prototype.sameRow = function (rowA, rowB) {
50844 // if both missing
50845 if (!rowA && !rowB) {
50846 return true;
50847 }
50848 // if only one missing
50849 if ((rowA && !rowB) || (!rowA && rowB)) {
50850 return false;
50851 }
50852 // otherwise compare (use == to compare rowPinned because it can be null or undefined)
50853 return rowA.rowIndex === rowB.rowIndex && rowA.rowPinned == rowB.rowPinned;
50854 };
50855 // tests if this row selection is before the other row selection
50856 RowPositionUtils.prototype.before = function (rowA, rowB) {
50857 switch (rowA.rowPinned) {
50858 case 'top':
50859 // we we are floating top, and other isn't, then we are always before
50860 if (rowB.rowPinned !== 'top') {
50861 return true;
50862 }
50863 break;
50864 case 'bottom':
50865 // if we are floating bottom, and the other isn't, then we are never before
50866 if (rowB.rowPinned !== 'bottom') {
50867 return false;
50868 }
50869 break;
50870 default:
50871 // if we are not floating, but the other one is floating...
50872 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_2__["exists"])(rowB.rowPinned)) {
50873 return rowB.rowPinned !== 'top';
50874 }
50875 break;
50876 }
50877 return rowA.rowIndex < rowB.rowIndex;
50878 };
50879 RowPositionUtils.prototype.rowMax = function (rows) {
50880 var _this = this;
50881 var max;
50882 rows.forEach(function (row) {
50883 if (max === undefined || _this.before(max, row)) {
50884 max = row;
50885 }
50886 });
50887 return max;
50888 };
50889 RowPositionUtils.prototype.rowMin = function (rows) {
50890 var _this = this;
50891 var min;
50892 rows.forEach(function (row) {
50893 if (min === undefined || _this.before(row, min)) {
50894 min = row;
50895 }
50896 });
50897 return min;
50898 };
50899 __decorate([
50900 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
50901 ], RowPositionUtils.prototype, "rowModel", void 0);
50902 __decorate([
50903 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedRowModel')
50904 ], RowPositionUtils.prototype, "pinnedRowModel", void 0);
50905 __decorate([
50906 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('paginationProxy')
50907 ], RowPositionUtils.prototype, "paginationProxy", void 0);
50908 RowPositionUtils = __decorate([
50909 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('rowPositionUtils')
50910 ], RowPositionUtils);
50911 return RowPositionUtils;
50912}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
50913
50914
50915
50916/***/ }),
50917/* 229 */
50918/***/ (function(module, __webpack_exports__, __webpack_require__) {
50919
50920"use strict";
50921__webpack_require__.r(__webpack_exports__);
50922/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellPositionUtils", function() { return CellPositionUtils; });
50923/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
50924/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
50925/**
50926 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50927 * @version v29.2.0
50928 * @link https://www.ag-grid.com/
50929 * @license MIT
50930 */
50931var __extends = (undefined && undefined.__extends) || (function () {
50932 var extendStatics = function (d, b) {
50933 extendStatics = Object.setPrototypeOf ||
50934 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50935 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
50936 return extendStatics(d, b);
50937 };
50938 return function (d, b) {
50939 extendStatics(d, b);
50940 function __() { this.constructor = d; }
50941 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50942 };
50943})();
50944var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
50945 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50946 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50947 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;
50948 return c > 3 && r && Object.defineProperty(target, key, r), r;
50949};
50950
50951
50952var CellPositionUtils = /** @class */ (function (_super) {
50953 __extends(CellPositionUtils, _super);
50954 function CellPositionUtils() {
50955 return _super !== null && _super.apply(this, arguments) || this;
50956 }
50957 CellPositionUtils.prototype.createId = function (cellPosition) {
50958 var rowIndex = cellPosition.rowIndex, rowPinned = cellPosition.rowPinned, column = cellPosition.column;
50959 return this.createIdFromValues({ rowIndex: rowIndex, column: column, rowPinned: rowPinned });
50960 };
50961 CellPositionUtils.prototype.createIdFromValues = function (cellPosition) {
50962 var rowIndex = cellPosition.rowIndex, rowPinned = cellPosition.rowPinned, column = cellPosition.column;
50963 return rowIndex + "." + (rowPinned == null ? 'null' : rowPinned) + "." + column.getId();
50964 };
50965 CellPositionUtils.prototype.equals = function (cellA, cellB) {
50966 var colsMatch = cellA.column === cellB.column;
50967 var floatingMatch = cellA.rowPinned === cellB.rowPinned;
50968 var indexMatch = cellA.rowIndex === cellB.rowIndex;
50969 return colsMatch && floatingMatch && indexMatch;
50970 };
50971 CellPositionUtils = __decorate([
50972 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('cellPositionUtils')
50973 ], CellPositionUtils);
50974 return CellPositionUtils;
50975}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
50976
50977
50978
50979/***/ }),
50980/* 230 */
50981/***/ (function(module, __webpack_exports__, __webpack_require__) {
50982
50983"use strict";
50984__webpack_require__.r(__webpack_exports__);
50985/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UndoRedoService", function() { return UndoRedoService; });
50986/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
50987/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26);
50988/* harmony import */ var _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
50989/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
50990/**
50991 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
50992 * @version v29.2.0
50993 * @link https://www.ag-grid.com/
50994 * @license MIT
50995 */
50996var __extends = (undefined && undefined.__extends) || (function () {
50997 var extendStatics = function (d, b) {
50998 extendStatics = Object.setPrototypeOf ||
50999 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51000 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
51001 return extendStatics(d, b);
51002 };
51003 return function (d, b) {
51004 extendStatics(d, b);
51005 function __() { this.constructor = d; }
51006 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51007 };
51008})();
51009var __assign = (undefined && undefined.__assign) || function () {
51010 __assign = Object.assign || function(t) {
51011 for (var s, i = 1, n = arguments.length; i < n; i++) {
51012 s = arguments[i];
51013 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
51014 t[p] = s[p];
51015 }
51016 return t;
51017 };
51018 return __assign.apply(this, arguments);
51019};
51020var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
51021 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
51022 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51023 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;
51024 return c > 3 && r && Object.defineProperty(target, key, r), r;
51025};
51026var __read = (undefined && undefined.__read) || function (o, n) {
51027 var m = typeof Symbol === "function" && o[Symbol.iterator];
51028 if (!m) return o;
51029 var i = m.call(o), r, ar = [], e;
51030 try {
51031 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
51032 }
51033 catch (error) { e = { error: error }; }
51034 finally {
51035 try {
51036 if (r && !r.done && (m = i["return"])) m.call(i);
51037 }
51038 finally { if (e) throw e.error; }
51039 }
51040 return ar;
51041};
51042var __spread = (undefined && undefined.__spread) || function () {
51043 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
51044 return ar;
51045};
51046
51047
51048
51049
51050var UndoRedoService = /** @class */ (function (_super) {
51051 __extends(UndoRedoService, _super);
51052 function UndoRedoService() {
51053 var _this = _super !== null && _super.apply(this, arguments) || this;
51054 _this.cellValueChanges = [];
51055 _this.activeCellEdit = null;
51056 _this.activeRowEdit = null;
51057 _this.isPasting = false;
51058 _this.isRangeInAction = false;
51059 _this.onCellValueChanged = function (event) {
51060 var eventCell = { column: event.column, rowIndex: event.rowIndex, rowPinned: event.rowPinned };
51061 var isCellEditing = _this.activeCellEdit !== null && _this.cellPositionUtils.equals(_this.activeCellEdit, eventCell);
51062 var isRowEditing = _this.activeRowEdit !== null && _this.rowPositionUtils.sameRow(_this.activeRowEdit, eventCell);
51063 var shouldCaptureAction = isCellEditing || isRowEditing || _this.isPasting || _this.isRangeInAction;
51064 if (!shouldCaptureAction) {
51065 return;
51066 }
51067 var rowPinned = event.rowPinned, rowIndex = event.rowIndex, column = event.column, oldValue = event.oldValue, value = event.value;
51068 var cellValueChange = {
51069 rowPinned: rowPinned,
51070 rowIndex: rowIndex,
51071 columnId: column.getColId(),
51072 newValue: value,
51073 oldValue: oldValue
51074 };
51075 _this.cellValueChanges.push(cellValueChange);
51076 };
51077 _this.clearStacks = function () {
51078 _this.undoStack.clear();
51079 _this.redoStack.clear();
51080 };
51081 return _this;
51082 }
51083 UndoRedoService.prototype.init = function () {
51084 var _this = this;
51085 if (!this.gridOptionsService.is('undoRedoCellEditing')) {
51086 return;
51087 }
51088 var undoRedoLimit = this.gridOptionsService.getNum('undoRedoCellEditingLimit');
51089 if (undoRedoLimit <= 0) {
51090 return;
51091 }
51092 this.undoStack = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["UndoRedoStack"](undoRedoLimit);
51093 this.redoStack = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["UndoRedoStack"](undoRedoLimit);
51094 this.addRowEditingListeners();
51095 this.addCellEditingListeners();
51096 this.addPasteListeners();
51097 this.addFillListeners();
51098 this.addCellKeyListeners();
51099 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_VALUE_CHANGED, this.onCellValueChanged);
51100 // undo / redo is restricted to actual editing so we clear the stacks when other operations are
51101 // performed that change the order of the row / cols.
51102 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_MODEL_UPDATED, function (e) {
51103 if (!e.keepUndoRedoStack) {
51104 _this.clearStacks();
51105 }
51106 });
51107 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED, this.clearStacks);
51108 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_NEW_COLUMNS_LOADED, this.clearStacks);
51109 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_GROUP_OPENED, this.clearStacks);
51110 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, this.clearStacks);
51111 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_MOVED, this.clearStacks);
51112 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_PINNED, this.clearStacks);
51113 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_COLUMN_VISIBLE, this.clearStacks);
51114 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_ROW_DRAG_END, this.clearStacks);
51115 this.ctrlsService.whenReady(function () {
51116 _this.gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();
51117 });
51118 };
51119 UndoRedoService.prototype.getCurrentUndoStackSize = function () {
51120 return this.undoStack ? this.undoStack.getCurrentStackSize() : 0;
51121 };
51122 UndoRedoService.prototype.getCurrentRedoStackSize = function () {
51123 return this.redoStack ? this.redoStack.getCurrentStackSize() : 0;
51124 };
51125 UndoRedoService.prototype.undo = function (source) {
51126 var startEvent = {
51127 type: _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_UNDO_STARTED,
51128 source: source
51129 };
51130 this.eventService.dispatchEvent(startEvent);
51131 var operationPerformed = this.undoRedo(this.undoStack, this.redoStack, 'initialRange', 'oldValue', 'undo');
51132 var endEvent = {
51133 type: _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_UNDO_ENDED,
51134 source: source,
51135 operationPerformed: operationPerformed
51136 };
51137 this.eventService.dispatchEvent(endEvent);
51138 };
51139 UndoRedoService.prototype.redo = function (source) {
51140 var startEvent = {
51141 type: _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_REDO_STARTED,
51142 source: source
51143 };
51144 this.eventService.dispatchEvent(startEvent);
51145 var operationPerformed = this.undoRedo(this.redoStack, this.undoStack, 'finalRange', 'newValue', 'redo');
51146 var endEvent = {
51147 type: _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_REDO_ENDED,
51148 source: source,
51149 operationPerformed: operationPerformed
51150 };
51151 this.eventService.dispatchEvent(endEvent);
51152 };
51153 UndoRedoService.prototype.undoRedo = function (undoRedoStack, opposingUndoRedoStack, rangeProperty, cellValueChangeProperty, source) {
51154 if (!undoRedoStack) {
51155 return false;
51156 }
51157 var undoRedoAction = undoRedoStack.pop();
51158 if (!undoRedoAction || !undoRedoAction.cellValueChanges) {
51159 return false;
51160 }
51161 this.processAction(undoRedoAction, function (cellValueChange) { return cellValueChange[cellValueChangeProperty]; }, source);
51162 if (undoRedoAction instanceof _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["RangeUndoRedoAction"]) {
51163 this.processRange(undoRedoAction.ranges || [undoRedoAction[rangeProperty]]);
51164 }
51165 else {
51166 this.processCell(undoRedoAction.cellValueChanges);
51167 }
51168 opposingUndoRedoStack.push(undoRedoAction);
51169 return true;
51170 };
51171 UndoRedoService.prototype.processAction = function (action, valueExtractor, source) {
51172 var _this = this;
51173 action.cellValueChanges.forEach(function (cellValueChange) {
51174 var rowIndex = cellValueChange.rowIndex, rowPinned = cellValueChange.rowPinned, columnId = cellValueChange.columnId;
51175 var rowPosition = { rowIndex: rowIndex, rowPinned: rowPinned };
51176 var currentRow = _this.getRowNode(rowPosition);
51177 // checks if the row has been filtered out
51178 if (!currentRow.displayed) {
51179 return;
51180 }
51181 currentRow.setDataValue(columnId, valueExtractor(cellValueChange), source);
51182 });
51183 };
51184 UndoRedoService.prototype.processRange = function (ranges) {
51185 var _this = this;
51186 var lastFocusedCell;
51187 this.rangeService.removeAllCellRanges(true);
51188 ranges.forEach(function (range, idx) {
51189 if (!range) {
51190 return;
51191 }
51192 var startRow = range.startRow;
51193 var endRow = range.endRow;
51194 if (idx === ranges.length - 1) {
51195 lastFocusedCell = {
51196 rowPinned: startRow.rowPinned,
51197 rowIndex: startRow.rowIndex,
51198 columnId: range.startColumn.getColId()
51199 };
51200 _this.setLastFocusedCell(lastFocusedCell);
51201 }
51202 var cellRangeParams = {
51203 rowStartIndex: startRow.rowIndex,
51204 rowStartPinned: startRow.rowPinned,
51205 rowEndIndex: endRow.rowIndex,
51206 rowEndPinned: endRow.rowPinned,
51207 columnStart: range.startColumn,
51208 columns: range.columns
51209 };
51210 _this.rangeService.addCellRange(cellRangeParams);
51211 });
51212 };
51213 UndoRedoService.prototype.processCell = function (cellValueChanges) {
51214 var cellValueChange = cellValueChanges[0];
51215 var rowIndex = cellValueChange.rowIndex, rowPinned = cellValueChange.rowPinned;
51216 var rowPosition = { rowIndex: rowIndex, rowPinned: rowPinned };
51217 var row = this.getRowNode(rowPosition);
51218 var lastFocusedCell = {
51219 rowPinned: cellValueChange.rowPinned,
51220 rowIndex: row.rowIndex,
51221 columnId: cellValueChange.columnId
51222 };
51223 // when single cells are being processed, they should be considered
51224 // as ranges when the rangeService is present (singleCellRanges).
51225 // otherwise focus will be restore but the range will not.
51226 this.setLastFocusedCell(lastFocusedCell, !!this.rangeService);
51227 };
51228 UndoRedoService.prototype.setLastFocusedCell = function (lastFocusedCell, setRangeToCell) {
51229 var rowIndex = lastFocusedCell.rowIndex, columnId = lastFocusedCell.columnId, rowPinned = lastFocusedCell.rowPinned;
51230 var scrollFeature = this.gridBodyCtrl.getScrollFeature();
51231 var column = this.columnModel.getGridColumn(columnId);
51232 if (!column) {
51233 return;
51234 }
51235 scrollFeature.ensureIndexVisible(rowIndex);
51236 scrollFeature.ensureColumnVisible(column);
51237 var cellPosition = { rowIndex: rowIndex, column: column, rowPinned: rowPinned };
51238 this.focusService.setFocusedCell(__assign(__assign({}, cellPosition), { forceBrowserFocus: true }));
51239 if (setRangeToCell) {
51240 this.rangeService.setRangeToCell(cellPosition);
51241 }
51242 };
51243 UndoRedoService.prototype.addRowEditingListeners = function () {
51244 var _this = this;
51245 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_ROW_EDITING_STARTED, function (e) {
51246 _this.activeRowEdit = { rowIndex: e.rowIndex, rowPinned: e.rowPinned };
51247 });
51248 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_ROW_EDITING_STOPPED, function () {
51249 var action = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["UndoRedoAction"](_this.cellValueChanges);
51250 _this.pushActionsToUndoStack(action);
51251 _this.activeRowEdit = null;
51252 });
51253 };
51254 UndoRedoService.prototype.addCellEditingListeners = function () {
51255 var _this = this;
51256 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_EDITING_STARTED, function (e) {
51257 _this.activeCellEdit = { column: e.column, rowIndex: e.rowIndex, rowPinned: e.rowPinned };
51258 });
51259 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_CELL_EDITING_STOPPED, function (e) {
51260 _this.activeCellEdit = null;
51261 var shouldPushAction = e.valueChanged && !_this.activeRowEdit && !_this.isPasting && !_this.isRangeInAction;
51262 if (shouldPushAction) {
51263 var action = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["UndoRedoAction"](_this.cellValueChanges);
51264 _this.pushActionsToUndoStack(action);
51265 }
51266 });
51267 };
51268 UndoRedoService.prototype.addPasteListeners = function () {
51269 var _this = this;
51270 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PASTE_START, function () {
51271 _this.isPasting = true;
51272 });
51273 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_PASTE_END, function () {
51274 var action = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["UndoRedoAction"](_this.cellValueChanges);
51275 _this.pushActionsToUndoStack(action);
51276 _this.isPasting = false;
51277 });
51278 };
51279 UndoRedoService.prototype.addFillListeners = function () {
51280 var _this = this;
51281 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_FILL_START, function () {
51282 _this.isRangeInAction = true;
51283 });
51284 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_FILL_END, function (event) {
51285 var action = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["RangeUndoRedoAction"](_this.cellValueChanges, event.initialRange, event.finalRange);
51286 _this.pushActionsToUndoStack(action);
51287 _this.isRangeInAction = false;
51288 });
51289 };
51290 UndoRedoService.prototype.addCellKeyListeners = function () {
51291 var _this = this;
51292 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_KEY_SHORTCUT_CHANGED_CELL_START, function () {
51293 _this.isRangeInAction = true;
51294 });
51295 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_KEY_SHORTCUT_CHANGED_CELL_END, function () {
51296 var action;
51297 if (_this.rangeService && _this.gridOptionsService.isEnableRangeSelection()) {
51298 action = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["RangeUndoRedoAction"](_this.cellValueChanges, undefined, undefined, __spread(_this.rangeService.getCellRanges()));
51299 }
51300 else {
51301 action = new _undoRedoStack__WEBPACK_IMPORTED_MODULE_2__["UndoRedoAction"](_this.cellValueChanges);
51302 }
51303 _this.pushActionsToUndoStack(action);
51304 _this.isRangeInAction = false;
51305 });
51306 };
51307 UndoRedoService.prototype.pushActionsToUndoStack = function (action) {
51308 this.undoStack.push(action);
51309 this.cellValueChanges = [];
51310 this.redoStack.clear();
51311 };
51312 UndoRedoService.prototype.getRowNode = function (gridRow) {
51313 switch (gridRow.rowPinned) {
51314 case 'top':
51315 return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];
51316 case 'bottom':
51317 return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];
51318 default:
51319 return this.rowModel.getRow(gridRow.rowIndex);
51320 }
51321 };
51322 __decorate([
51323 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('focusService')
51324 ], UndoRedoService.prototype, "focusService", void 0);
51325 __decorate([
51326 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
51327 ], UndoRedoService.prototype, "ctrlsService", void 0);
51328 __decorate([
51329 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
51330 ], UndoRedoService.prototype, "rowModel", void 0);
51331 __decorate([
51332 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedRowModel')
51333 ], UndoRedoService.prototype, "pinnedRowModel", void 0);
51334 __decorate([
51335 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('cellPositionUtils')
51336 ], UndoRedoService.prototype, "cellPositionUtils", void 0);
51337 __decorate([
51338 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowPositionUtils')
51339 ], UndoRedoService.prototype, "rowPositionUtils", void 0);
51340 __decorate([
51341 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
51342 ], UndoRedoService.prototype, "columnModel", void 0);
51343 __decorate([
51344 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Optional"])('rangeService')
51345 ], UndoRedoService.prototype, "rangeService", void 0);
51346 __decorate([
51347 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
51348 ], UndoRedoService.prototype, "init", null);
51349 UndoRedoService = __decorate([
51350 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('undoRedoService')
51351 ], UndoRedoService);
51352 return UndoRedoService;
51353}(_context_beanStub__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]));
51354
51355
51356
51357/***/ }),
51358/* 231 */
51359/***/ (function(module, __webpack_exports__, __webpack_require__) {
51360
51361"use strict";
51362__webpack_require__.r(__webpack_exports__);
51363/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UndoRedoAction", function() { return UndoRedoAction; });
51364/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeUndoRedoAction", function() { return RangeUndoRedoAction; });
51365/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UndoRedoStack", function() { return UndoRedoStack; });
51366/**
51367 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
51368 * @version v29.2.0
51369 * @link https://www.ag-grid.com/
51370 * @license MIT
51371 */
51372var __extends = (undefined && undefined.__extends) || (function () {
51373 var extendStatics = function (d, b) {
51374 extendStatics = Object.setPrototypeOf ||
51375 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51376 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
51377 return extendStatics(d, b);
51378 };
51379 return function (d, b) {
51380 extendStatics(d, b);
51381 function __() { this.constructor = d; }
51382 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51383 };
51384})();
51385var UndoRedoAction = /** @class */ (function () {
51386 function UndoRedoAction(cellValueChanges) {
51387 this.cellValueChanges = cellValueChanges;
51388 }
51389 return UndoRedoAction;
51390}());
51391
51392var RangeUndoRedoAction = /** @class */ (function (_super) {
51393 __extends(RangeUndoRedoAction, _super);
51394 function RangeUndoRedoAction(cellValueChanges, initialRange, finalRange, ranges) {
51395 var _this = _super.call(this, cellValueChanges) || this;
51396 _this.initialRange = initialRange;
51397 _this.finalRange = finalRange;
51398 _this.ranges = ranges;
51399 return _this;
51400 }
51401 return RangeUndoRedoAction;
51402}(UndoRedoAction));
51403
51404var UndoRedoStack = /** @class */ (function () {
51405 function UndoRedoStack(maxStackSize) {
51406 this.actionStack = [];
51407 this.maxStackSize = maxStackSize ? maxStackSize : UndoRedoStack.DEFAULT_STACK_SIZE;
51408 this.actionStack = new Array(this.maxStackSize);
51409 }
51410 UndoRedoStack.prototype.pop = function () {
51411 return this.actionStack.pop();
51412 };
51413 UndoRedoStack.prototype.push = function (item) {
51414 var shouldAddActions = item.cellValueChanges && item.cellValueChanges.length > 0;
51415 if (!shouldAddActions) {
51416 return;
51417 }
51418 if (this.actionStack.length === this.maxStackSize) {
51419 this.actionStack.shift();
51420 }
51421 this.actionStack.push(item);
51422 };
51423 UndoRedoStack.prototype.clear = function () {
51424 this.actionStack = [];
51425 };
51426 UndoRedoStack.prototype.getCurrentStackSize = function () {
51427 return this.actionStack.length;
51428 };
51429 UndoRedoStack.DEFAULT_STACK_SIZE = 10;
51430 return UndoRedoStack;
51431}());
51432
51433
51434
51435/***/ }),
51436/* 232 */
51437/***/ (function(module, __webpack_exports__, __webpack_require__) {
51438
51439"use strict";
51440__webpack_require__.r(__webpack_exports__);
51441/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderPositionUtils", function() { return HeaderPositionUtils; });
51442/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
51443/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
51444/* harmony import */ var _entities_columnGroup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21);
51445/* harmony import */ var _row_headerRowComp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(153);
51446/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19);
51447/**
51448 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
51449 * @version v29.2.0
51450 * @link https://www.ag-grid.com/
51451 * @license MIT
51452 */
51453var __extends = (undefined && undefined.__extends) || (function () {
51454 var extendStatics = function (d, b) {
51455 extendStatics = Object.setPrototypeOf ||
51456 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51457 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
51458 return extendStatics(d, b);
51459 };
51460 return function (d, b) {
51461 extendStatics(d, b);
51462 function __() { this.constructor = d; }
51463 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51464 };
51465})();
51466var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
51467 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
51468 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51469 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;
51470 return c > 3 && r && Object.defineProperty(target, key, r), r;
51471};
51472
51473
51474
51475
51476
51477var HeaderPositionUtils = /** @class */ (function (_super) {
51478 __extends(HeaderPositionUtils, _super);
51479 function HeaderPositionUtils() {
51480 return _super !== null && _super.apply(this, arguments) || this;
51481 }
51482 HeaderPositionUtils.prototype.findHeader = function (focusedHeader, direction) {
51483 var nextColumn;
51484 var getGroupMethod;
51485 var getColMethod;
51486 if (focusedHeader.column instanceof _entities_columnGroup__WEBPACK_IMPORTED_MODULE_2__["ColumnGroup"]) {
51487 getGroupMethod = "getDisplayedGroup" + direction;
51488 nextColumn = this.columnModel[getGroupMethod](focusedHeader.column);
51489 }
51490 else {
51491 getColMethod = "getDisplayedCol" + direction;
51492 nextColumn = this.columnModel[getColMethod](focusedHeader.column);
51493 }
51494 if (!nextColumn) {
51495 return;
51496 }
51497 var headerRowIndex = focusedHeader.headerRowIndex;
51498 var currentRowType = this.getHeaderRowType(headerRowIndex);
51499 if (currentRowType === _row_headerRowComp__WEBPACK_IMPORTED_MODULE_3__["HeaderRowType"].COLUMN_GROUP) {
51500 var columnGroup = nextColumn;
51501 if (columnGroup.isPadding() && this.isAnyChildSpanningHeaderHeight(columnGroup)) {
51502 var _a = this.getColumnVisibleChild(columnGroup, headerRowIndex, direction), nextFocusColumn = _a.nextFocusColumn, nextRow = _a.nextRow;
51503 if (nextFocusColumn) {
51504 nextColumn = nextFocusColumn;
51505 headerRowIndex = nextRow;
51506 }
51507 }
51508 }
51509 return {
51510 column: nextColumn,
51511 headerRowIndex: headerRowIndex
51512 };
51513 };
51514 HeaderPositionUtils.prototype.isAnyChildSpanningHeaderHeight = function (columnGroup) {
51515 if (!columnGroup) {
51516 return false;
51517 }
51518 return columnGroup.getLeafColumns().some(function (col) { return col.isSpanHeaderHeight(); });
51519 };
51520 HeaderPositionUtils.prototype.getColumnVisibleParent = function (currentColumn, currentIndex) {
51521 var currentRowType = this.getHeaderRowType(currentIndex);
51522 var isFloatingFilter = currentRowType === _row_headerRowComp__WEBPACK_IMPORTED_MODULE_3__["HeaderRowType"].FLOATING_FILTER;
51523 var isColumn = currentRowType === _row_headerRowComp__WEBPACK_IMPORTED_MODULE_3__["HeaderRowType"].COLUMN;
51524 var nextFocusColumn = isFloatingFilter ? currentColumn : currentColumn.getParent();
51525 var nextRow = currentIndex - 1;
51526 if (isColumn && this.isAnyChildSpanningHeaderHeight(currentColumn.getParent())) {
51527 while (nextFocusColumn && nextFocusColumn.isPadding()) {
51528 nextFocusColumn = nextFocusColumn.getParent();
51529 nextRow--;
51530 }
51531 if (nextRow < 0) {
51532 nextFocusColumn = currentColumn;
51533 nextRow = currentIndex;
51534 }
51535 }
51536 return { nextFocusColumn: nextFocusColumn, nextRow: nextRow };
51537 };
51538 HeaderPositionUtils.prototype.getColumnVisibleChild = function (column, currentIndex, direction) {
51539 if (direction === void 0) { direction = 'After'; }
51540 var currentRowType = this.getHeaderRowType(currentIndex);
51541 var nextFocusColumn = column;
51542 var nextRow = currentIndex + 1;
51543 if (currentRowType === _row_headerRowComp__WEBPACK_IMPORTED_MODULE_3__["HeaderRowType"].COLUMN_GROUP) {
51544 var leafColumns = column.getLeafColumns();
51545 var leafChild = direction === 'After' ? leafColumns[0] : Object(_utils_array__WEBPACK_IMPORTED_MODULE_4__["last"])(leafColumns);
51546 if (this.isAnyChildSpanningHeaderHeight(leafChild.getParent())) {
51547 nextFocusColumn = leafChild;
51548 var currentColumn = leafChild.getParent();
51549 while (currentColumn && currentColumn !== column) {
51550 currentColumn = currentColumn.getParent();
51551 nextRow++;
51552 }
51553 }
51554 else {
51555 nextFocusColumn = column.getDisplayedChildren()[0];
51556 }
51557 }
51558 return { nextFocusColumn: nextFocusColumn, nextRow: nextRow };
51559 };
51560 HeaderPositionUtils.prototype.getHeaderRowType = function (rowIndex) {
51561 var centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();
51562 if (centerHeaderContainer) {
51563 return centerHeaderContainer.getRowType(rowIndex);
51564 }
51565 };
51566 HeaderPositionUtils.prototype.findColAtEdgeForHeaderRow = function (level, position) {
51567 var displayedColumns = this.columnModel.getAllDisplayedColumns();
51568 var column = displayedColumns[position === 'start' ? 0 : displayedColumns.length - 1];
51569 if (!column) {
51570 return;
51571 }
51572 var childContainer = this.ctrlsService.getHeaderRowContainerCtrl(column.getPinned());
51573 var type = childContainer.getRowType(level);
51574 if (type == _row_headerRowComp__WEBPACK_IMPORTED_MODULE_3__["HeaderRowType"].COLUMN_GROUP) {
51575 var columnGroup = this.columnModel.getColumnGroupAtLevel(column, level);
51576 return {
51577 headerRowIndex: level,
51578 column: columnGroup
51579 };
51580 }
51581 return {
51582 // if type==null, means the header level didn't exist
51583 headerRowIndex: type == null ? -1 : level,
51584 column: column
51585 };
51586 };
51587 __decorate([
51588 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
51589 ], HeaderPositionUtils.prototype, "columnModel", void 0);
51590 __decorate([
51591 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
51592 ], HeaderPositionUtils.prototype, "ctrlsService", void 0);
51593 HeaderPositionUtils = __decorate([
51594 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('headerPositionUtils')
51595 ], HeaderPositionUtils);
51596 return HeaderPositionUtils;
51597}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
51598
51599
51600
51601/***/ }),
51602/* 233 */
51603/***/ (function(module, __webpack_exports__, __webpack_require__) {
51604
51605"use strict";
51606__webpack_require__.r(__webpack_exports__);
51607/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnDefFactory", function() { return ColumnDefFactory; });
51608/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
51609/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
51610/**
51611 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
51612 * @version v29.2.0
51613 * @link https://www.ag-grid.com/
51614 * @license MIT
51615 */
51616var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
51617 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
51618 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51619 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;
51620 return c > 3 && r && Object.defineProperty(target, key, r), r;
51621};
51622
51623
51624var ColumnDefFactory = /** @class */ (function () {
51625 function ColumnDefFactory() {
51626 }
51627 ColumnDefFactory.prototype.buildColumnDefs = function (cols, rowGroupColumns, pivotColumns) {
51628 var _this = this;
51629 var res = [];
51630 var colGroupDefs = {};
51631 cols.forEach(function (col) {
51632 var colDef = _this.createDefFromColumn(col, rowGroupColumns, pivotColumns);
51633 var addToResult = true;
51634 var childDef = colDef;
51635 var pointer = col.getOriginalParent();
51636 while (pointer) {
51637 var parentDef = null;
51638 // we don't include padding groups, as the column groups provided
51639 // by application didn't have these. the whole point of padding groups
51640 // is to balance the column tree that the user provided.
51641 if (pointer.isPadding()) {
51642 pointer = pointer.getOriginalParent();
51643 continue;
51644 }
51645 // if colDef for this group already exists, use it
51646 var existingParentDef = colGroupDefs[pointer.getGroupId()];
51647 if (existingParentDef) {
51648 existingParentDef.children.push(childDef);
51649 // if we added to result, it would be the second time we did it
51650 addToResult = false;
51651 // we don't want to continue up the tree, as it has already been
51652 // done for this group
51653 break;
51654 }
51655 parentDef = _this.createDefFromGroup(pointer);
51656 if (parentDef) {
51657 parentDef.children = [childDef];
51658 colGroupDefs[parentDef.groupId] = parentDef;
51659 childDef = parentDef;
51660 pointer = pointer.getOriginalParent();
51661 }
51662 }
51663 if (addToResult) {
51664 res.push(childDef);
51665 }
51666 });
51667 return res;
51668 };
51669 ColumnDefFactory.prototype.createDefFromGroup = function (group) {
51670 var defCloned = Object(_utils_object__WEBPACK_IMPORTED_MODULE_1__["deepCloneDefinition"])(group.getColGroupDef(), ['children']);
51671 if (defCloned) {
51672 defCloned.groupId = group.getGroupId();
51673 }
51674 return defCloned;
51675 };
51676 ColumnDefFactory.prototype.createDefFromColumn = function (col, rowGroupColumns, pivotColumns) {
51677 var colDefCloned = Object(_utils_object__WEBPACK_IMPORTED_MODULE_1__["deepCloneDefinition"])(col.getColDef());
51678 colDefCloned.colId = col.getColId();
51679 colDefCloned.width = col.getActualWidth();
51680 colDefCloned.rowGroup = col.isRowGroupActive();
51681 colDefCloned.rowGroupIndex = col.isRowGroupActive() ? rowGroupColumns.indexOf(col) : null;
51682 colDefCloned.pivot = col.isPivotActive();
51683 colDefCloned.pivotIndex = col.isPivotActive() ? pivotColumns.indexOf(col) : null;
51684 colDefCloned.aggFunc = col.isValueActive() ? col.getAggFunc() : null;
51685 colDefCloned.hide = col.isVisible() ? undefined : true;
51686 colDefCloned.pinned = col.isPinned() ? col.getPinned() : null;
51687 colDefCloned.sort = col.getSort() ? col.getSort() : null;
51688 colDefCloned.sortIndex = col.getSortIndex() != null ? col.getSortIndex() : null;
51689 return colDefCloned;
51690 };
51691 ColumnDefFactory = __decorate([
51692 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('columnDefFactory')
51693 ], ColumnDefFactory);
51694 return ColumnDefFactory;
51695}());
51696
51697
51698
51699/***/ }),
51700/* 234 */
51701/***/ (function(module, __webpack_exports__, __webpack_require__) {
51702
51703"use strict";
51704__webpack_require__.r(__webpack_exports__);
51705/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowCssClassCalculator", function() { return RowCssClassCalculator; });
51706/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
51707/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19);
51708/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
51709/**
51710 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
51711 * @version v29.2.0
51712 * @link https://www.ag-grid.com/
51713 * @license MIT
51714 */
51715var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
51716 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
51717 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51718 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;
51719 return c > 3 && r && Object.defineProperty(target, key, r), r;
51720};
51721
51722
51723
51724var RowCssClassCalculator = /** @class */ (function () {
51725 function RowCssClassCalculator() {
51726 }
51727 RowCssClassCalculator.prototype.getInitialRowClasses = function (params) {
51728 var classes = [];
51729 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_0__["exists"])(params.extraCssClass)) {
51730 classes.push(params.extraCssClass);
51731 }
51732 classes.push('ag-row');
51733 classes.push(params.rowFocused ? 'ag-row-focus' : 'ag-row-no-focus');
51734 if (params.fadeRowIn) {
51735 classes.push('ag-opacity-zero');
51736 }
51737 classes.push(params.rowIsEven ? 'ag-row-even' : 'ag-row-odd');
51738 if (params.rowNode.isRowPinned()) {
51739 classes.push('ag-row-pinned');
51740 }
51741 if (params.rowNode.isSelected()) {
51742 classes.push('ag-row-selected');
51743 }
51744 if (params.rowNode.footer) {
51745 classes.push('ag-row-footer');
51746 }
51747 classes.push('ag-row-level-' + params.rowLevel);
51748 if (params.rowNode.stub) {
51749 classes.push('ag-row-loading');
51750 }
51751 if (params.fullWidthRow) {
51752 classes.push('ag-full-width-row');
51753 }
51754 if (params.expandable) {
51755 classes.push('ag-row-group');
51756 classes.push(params.rowNode.expanded ? 'ag-row-group-expanded' : 'ag-row-group-contracted');
51757 }
51758 if (params.rowNode.dragging) {
51759 classes.push('ag-row-dragging');
51760 }
51761 Object(_utils_array__WEBPACK_IMPORTED_MODULE_1__["pushAll"])(classes, this.processClassesFromGridOptions(params.rowNode));
51762 Object(_utils_array__WEBPACK_IMPORTED_MODULE_1__["pushAll"])(classes, this.preProcessRowClassRules(params.rowNode));
51763 // we use absolute position unless we are doing print layout
51764 classes.push(params.printLayout ? 'ag-row-position-relative' : 'ag-row-position-absolute');
51765 if (params.firstRowOnPage) {
51766 classes.push('ag-row-first');
51767 }
51768 if (params.lastRowOnPage) {
51769 classes.push('ag-row-last');
51770 }
51771 if (params.fullWidthRow) {
51772 if (params.pinned === 'left') {
51773 classes.push('ag-cell-last-left-pinned');
51774 }
51775 if (params.pinned === 'right') {
51776 classes.push('ag-cell-first-right-pinned');
51777 }
51778 }
51779 return classes;
51780 };
51781 RowCssClassCalculator.prototype.processClassesFromGridOptions = function (rowNode) {
51782 var res = [];
51783 var process = function (rowCls) {
51784 if (typeof rowCls === 'string') {
51785 res.push(rowCls);
51786 }
51787 else if (Array.isArray(rowCls)) {
51788 rowCls.forEach(function (e) { return res.push(e); });
51789 }
51790 };
51791 // part 1 - rowClass
51792 var rowClass = this.gridOptionsService.get('rowClass');
51793 if (rowClass) {
51794 if (typeof rowClass === 'function') {
51795 console.warn('AG Grid: rowClass should not be a function, please use getRowClass instead');
51796 return [];
51797 }
51798 process(rowClass);
51799 }
51800 // part 2 - rowClassFunc
51801 var rowClassFunc = this.gridOptionsService.getCallback('getRowClass');
51802 if (rowClassFunc) {
51803 var params = {
51804 data: rowNode.data,
51805 node: rowNode,
51806 rowIndex: rowNode.rowIndex
51807 };
51808 var rowClassFuncResult = rowClassFunc(params);
51809 process(rowClassFuncResult);
51810 }
51811 return res;
51812 };
51813 RowCssClassCalculator.prototype.preProcessRowClassRules = function (rowNode) {
51814 var res = [];
51815 this.processRowClassRules(rowNode, function (className) {
51816 res.push(className);
51817 }, function (className) {
51818 // not catered for, if creating, no need
51819 // to remove class as it was never there
51820 });
51821 return res;
51822 };
51823 RowCssClassCalculator.prototype.processRowClassRules = function (rowNode, onApplicableClass, onNotApplicableClass) {
51824 var rowClassParams = {
51825 data: rowNode.data,
51826 node: rowNode,
51827 rowIndex: rowNode.rowIndex,
51828 api: this.gridOptionsService.api,
51829 columnApi: this.gridOptionsService.columnApi,
51830 context: this.gridOptionsService.context
51831 };
51832 this.stylingService.processClassRules(this.gridOptionsService.get('rowClassRules'), rowClassParams, onApplicableClass, onNotApplicableClass);
51833 };
51834 RowCssClassCalculator.prototype.calculateRowLevel = function (rowNode) {
51835 if (rowNode.group) {
51836 return rowNode.level;
51837 }
51838 // if a leaf, and a parent exists, put a level of the parent, else put level of 0 for top level item
51839 return rowNode.parent ? (rowNode.parent.level + 1) : 0;
51840 };
51841 __decorate([
51842 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('stylingService')
51843 ], RowCssClassCalculator.prototype, "stylingService", void 0);
51844 __decorate([
51845 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Autowired"])('gridOptionsService')
51846 ], RowCssClassCalculator.prototype, "gridOptionsService", void 0);
51847 RowCssClassCalculator = __decorate([
51848 Object(_context_context__WEBPACK_IMPORTED_MODULE_2__["Bean"])('rowCssClassCalculator')
51849 ], RowCssClassCalculator);
51850 return RowCssClassCalculator;
51851}());
51852
51853
51854
51855/***/ }),
51856/* 235 */
51857/***/ (function(module, __webpack_exports__, __webpack_require__) {
51858
51859"use strict";
51860__webpack_require__.r(__webpack_exports__);
51861/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowNodeSorter", function() { return RowNodeSorter; });
51862/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
51863/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
51864/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
51865/**
51866 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
51867 * @version v29.2.0
51868 * @link https://www.ag-grid.com/
51869 * @license MIT
51870 */
51871var __extends = (undefined && undefined.__extends) || (function () {
51872 var extendStatics = function (d, b) {
51873 extendStatics = Object.setPrototypeOf ||
51874 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51875 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
51876 return extendStatics(d, b);
51877 };
51878 return function (d, b) {
51879 extendStatics(d, b);
51880 function __() { this.constructor = d; }
51881 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51882 };
51883})();
51884var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
51885 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
51886 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51887 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;
51888 return c > 3 && r && Object.defineProperty(target, key, r), r;
51889};
51890
51891
51892
51893// this logic is used by both SSRM and CSRM
51894var RowNodeSorter = /** @class */ (function (_super) {
51895 __extends(RowNodeSorter, _super);
51896 function RowNodeSorter() {
51897 return _super !== null && _super.apply(this, arguments) || this;
51898 }
51899 RowNodeSorter.prototype.init = function () {
51900 var _this = this;
51901 this.isAccentedSort = this.gridOptionsService.is('accentedSort');
51902 this.primaryColumnsSortGroups = this.gridOptionsService.isColumnsSortingCoupledToGroup();
51903 this.addManagedPropertyListener('accentedSort', function (propChange) { return _this.isAccentedSort = propChange.currentValue; });
51904 this.addManagedPropertyListener('autoGroupColumnDef', function () { return _this.primaryColumnsSortGroups = _this.gridOptionsService.isColumnsSortingCoupledToGroup(); });
51905 };
51906 RowNodeSorter.prototype.doFullSort = function (rowNodes, sortOptions) {
51907 var mapper = function (rowNode, pos) { return ({ currentPos: pos, rowNode: rowNode }); };
51908 var sortedRowNodes = rowNodes.map(mapper);
51909 sortedRowNodes.sort(this.compareRowNodes.bind(this, sortOptions));
51910 return sortedRowNodes.map(function (item) { return item.rowNode; });
51911 };
51912 RowNodeSorter.prototype.compareRowNodes = function (sortOptions, sortedNodeA, sortedNodeB) {
51913 var nodeA = sortedNodeA.rowNode;
51914 var nodeB = sortedNodeB.rowNode;
51915 // Iterate columns, return the first that doesn't match
51916 for (var i = 0, len = sortOptions.length; i < len; i++) {
51917 var sortOption = sortOptions[i];
51918 var isDescending = sortOption.sort === 'desc';
51919 var valueA = this.getValue(nodeA, sortOption.column);
51920 var valueB = this.getValue(nodeB, sortOption.column);
51921 var comparatorResult = void 0;
51922 var providedComparator = this.getComparator(sortOption, nodeA);
51923 if (providedComparator) {
51924 //if comparator provided, use it
51925 comparatorResult = providedComparator(valueA, valueB, nodeA, nodeB, isDescending);
51926 }
51927 else {
51928 //otherwise do our own comparison
51929 comparatorResult = _utils__WEBPACK_IMPORTED_MODULE_1__["_"].defaultComparator(valueA, valueB, this.isAccentedSort);
51930 }
51931 // user provided comparators can return 'NaN' if they don't correctly handle 'undefined' values, this
51932 // typically occurs when the comparator is used on a group row
51933 var validResult = !isNaN(comparatorResult);
51934 if (validResult && comparatorResult !== 0) {
51935 return sortOption.sort === 'asc' ? comparatorResult : comparatorResult * -1;
51936 }
51937 }
51938 // All matched, we make is so that the original sort order is kept:
51939 return sortedNodeA.currentPos - sortedNodeB.currentPos;
51940 };
51941 RowNodeSorter.prototype.getComparator = function (sortOption, rowNode) {
51942 var column = sortOption.column;
51943 // comparator on col get preference over everything else
51944 var comparatorOnCol = column.getColDef().comparator;
51945 if (comparatorOnCol != null) {
51946 return comparatorOnCol;
51947 }
51948 if (!column.getColDef().showRowGroup) {
51949 return;
51950 }
51951 // if a 'field' is supplied on the autoGroupColumnDef we need to use the associated column comparator
51952 var groupLeafField = !rowNode.group && column.getColDef().field;
51953 if (!groupLeafField) {
51954 return;
51955 }
51956 var primaryColumn = this.columnModel.getPrimaryColumn(groupLeafField);
51957 if (!primaryColumn) {
51958 return;
51959 }
51960 return primaryColumn.getColDef().comparator;
51961 };
51962 RowNodeSorter.prototype.getValue = function (node, column) {
51963 var _a, _b;
51964 if (!this.primaryColumnsSortGroups) {
51965 return this.valueService.getValue(column, node, false, false);
51966 }
51967 var isNodeGroupedAtLevel = node.rowGroupColumn === column;
51968 if (isNodeGroupedAtLevel) {
51969 var isGroupRows = this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotActive());
51970 if (isGroupRows) {
51971 // if the column has a provided a keyCreator, we have to use the key, as the group could be
51972 // irrelevant to the column value
51973 var keyCreator = column.getColDef().keyCreator;
51974 if (keyCreator) {
51975 return node.key;
51976 }
51977 // if the group was generated from the column data, all the leaf children should return the same
51978 // value
51979 var leafChild = (_a = node.allLeafChildren) === null || _a === void 0 ? void 0 : _a[0];
51980 if (leafChild) {
51981 return this.valueService.getValue(column, leafChild, false, false);
51982 }
51983 return undefined;
51984 }
51985 var displayCol = this.columnModel.getGroupDisplayColumnForGroup(column.getId());
51986 if (!displayCol) {
51987 return undefined;
51988 }
51989 return (_b = node.groupData) === null || _b === void 0 ? void 0 : _b[displayCol.getId()];
51990 }
51991 if (node.group && column.getColDef().showRowGroup) {
51992 return undefined;
51993 }
51994 return this.valueService.getValue(column, node, false, false);
51995 };
51996 __decorate([
51997 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueService')
51998 ], RowNodeSorter.prototype, "valueService", void 0);
51999 __decorate([
52000 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
52001 ], RowNodeSorter.prototype, "columnModel", void 0);
52002 __decorate([
52003 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
52004 ], RowNodeSorter.prototype, "init", null);
52005 RowNodeSorter = __decorate([
52006 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('rowNodeSorter')
52007 ], RowNodeSorter);
52008 return RowNodeSorter;
52009}(_context_beanStub__WEBPACK_IMPORTED_MODULE_2__["BeanStub"]));
52010
52011
52012
52013/***/ }),
52014/* 236 */
52015/***/ (function(module, __webpack_exports__, __webpack_require__) {
52016
52017"use strict";
52018__webpack_require__.r(__webpack_exports__);
52019/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CtrlsService", function() { return CtrlsService; });
52020/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
52021/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
52022/**
52023 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52024 * @version v29.2.0
52025 * @link https://www.ag-grid.com/
52026 * @license MIT
52027 */
52028var __extends = (undefined && undefined.__extends) || (function () {
52029 var extendStatics = function (d, b) {
52030 extendStatics = Object.setPrototypeOf ||
52031 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52032 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
52033 return extendStatics(d, b);
52034 };
52035 return function (d, b) {
52036 extendStatics(d, b);
52037 function __() { this.constructor = d; }
52038 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52039 };
52040})();
52041var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52042 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52043 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52044 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;
52045 return c > 3 && r && Object.defineProperty(target, key, r), r;
52046};
52047
52048
52049var CtrlsService = /** @class */ (function (_super) {
52050 __extends(CtrlsService, _super);
52051 function CtrlsService() {
52052 var _this = _super !== null && _super.apply(this, arguments) || this;
52053 _this.ready = false;
52054 _this.readyCallbacks = [];
52055 return _this;
52056 }
52057 CtrlsService_1 = CtrlsService;
52058 CtrlsService.prototype.checkReady = function () {
52059 this.ready =
52060 this.gridCtrl != null
52061 && this.gridBodyCtrl != null
52062 && this.centerRowContainerCtrl != null
52063 && this.leftRowContainerCtrl != null
52064 && this.rightRowContainerCtrl != null
52065 && this.bottomCenterRowContainerCtrl != null
52066 && this.bottomLeftRowContainerCtrl != null
52067 && this.bottomRightRowContainerCtrl != null
52068 && this.topCenterRowContainerCtrl != null
52069 && this.topLeftRowContainerCtrl != null
52070 && this.topRightRowContainerCtrl != null
52071 && this.stickyTopCenterRowContainerCtrl != null
52072 && this.stickyTopLeftRowContainerCtrl != null
52073 && this.stickyTopRightRowContainerCtrl != null
52074 && this.centerHeaderRowContainerCtrl != null
52075 && this.leftHeaderRowContainerCtrl != null
52076 && this.rightHeaderRowContainerCtrl != null
52077 && this.fakeHScrollComp != null
52078 && this.fakeVScrollComp != null
52079 && this.gridHeaderCtrl != null;
52080 if (this.ready) {
52081 var p_1 = this.createReadyParams();
52082 this.readyCallbacks.forEach(function (c) { return c(p_1); });
52083 this.readyCallbacks.length = 0;
52084 }
52085 };
52086 CtrlsService.prototype.whenReady = function (callback) {
52087 if (this.ready) {
52088 callback(this.createReadyParams());
52089 }
52090 else {
52091 this.readyCallbacks.push(callback);
52092 }
52093 };
52094 CtrlsService.prototype.createReadyParams = function () {
52095 return {
52096 centerRowContainerCtrl: this.centerRowContainerCtrl,
52097 leftRowContainerCtrl: this.leftRowContainerCtrl,
52098 rightRowContainerCtrl: this.rightRowContainerCtrl,
52099 bottomCenterRowContainerCtrl: this.bottomCenterRowContainerCtrl,
52100 bottomLeftRowContainerCtrl: this.bottomLeftRowContainerCtrl,
52101 bottomRightRowContainerCtrl: this.bottomRightRowContainerCtrl,
52102 topCenterRowContainerCtrl: this.topCenterRowContainerCtrl,
52103 topLeftRowContainerCtrl: this.topLeftRowContainerCtrl,
52104 topRightRowContainerCtrl: this.topRightRowContainerCtrl,
52105 stickyTopCenterRowContainerCtrl: this.stickyTopCenterRowContainerCtrl,
52106 stickyTopLeftRowContainerCtrl: this.stickyTopLeftRowContainerCtrl,
52107 stickyTopRightRowContainerCtrl: this.stickyTopRightRowContainerCtrl,
52108 centerHeaderRowContainerCtrl: this.centerHeaderRowContainerCtrl,
52109 leftHeaderRowContainerCtrl: this.leftHeaderRowContainerCtrl,
52110 rightHeaderRowContainerCtrl: this.rightHeaderRowContainerCtrl,
52111 fakeHScrollComp: this.fakeHScrollComp,
52112 fakeVScrollComp: this.fakeVScrollComp,
52113 gridBodyCtrl: this.gridBodyCtrl,
52114 gridCtrl: this.gridCtrl,
52115 gridHeaderCtrl: this.gridHeaderCtrl,
52116 };
52117 };
52118 CtrlsService.prototype.registerFakeHScrollComp = function (comp) {
52119 this.fakeHScrollComp = comp;
52120 this.checkReady();
52121 };
52122 CtrlsService.prototype.registerFakeVScrollComp = function (comp) {
52123 this.fakeVScrollComp = comp;
52124 this.checkReady();
52125 };
52126 CtrlsService.prototype.registerGridHeaderCtrl = function (gridHeaderCtrl) {
52127 this.gridHeaderCtrl = gridHeaderCtrl;
52128 this.checkReady();
52129 };
52130 CtrlsService.prototype.registerCenterRowContainerCtrl = function (ctrl) {
52131 this.centerRowContainerCtrl = ctrl;
52132 this.checkReady();
52133 };
52134 CtrlsService.prototype.registerLeftRowContainerCtrl = function (ctrl) {
52135 this.leftRowContainerCtrl = ctrl;
52136 this.checkReady();
52137 };
52138 CtrlsService.prototype.registerRightRowContainerCtrl = function (ctrl) {
52139 this.rightRowContainerCtrl = ctrl;
52140 this.checkReady();
52141 };
52142 CtrlsService.prototype.registerTopCenterRowContainerCtrl = function (ctrl) {
52143 this.topCenterRowContainerCtrl = ctrl;
52144 this.checkReady();
52145 };
52146 CtrlsService.prototype.registerTopLeftRowContainerCon = function (ctrl) {
52147 this.topLeftRowContainerCtrl = ctrl;
52148 this.checkReady();
52149 };
52150 CtrlsService.prototype.registerTopRightRowContainerCtrl = function (ctrl) {
52151 this.topRightRowContainerCtrl = ctrl;
52152 this.checkReady();
52153 };
52154 CtrlsService.prototype.registerStickyTopCenterRowContainerCtrl = function (ctrl) {
52155 this.stickyTopCenterRowContainerCtrl = ctrl;
52156 this.checkReady();
52157 };
52158 CtrlsService.prototype.registerStickyTopLeftRowContainerCon = function (ctrl) {
52159 this.stickyTopLeftRowContainerCtrl = ctrl;
52160 this.checkReady();
52161 };
52162 CtrlsService.prototype.registerStickyTopRightRowContainerCtrl = function (ctrl) {
52163 this.stickyTopRightRowContainerCtrl = ctrl;
52164 this.checkReady();
52165 };
52166 CtrlsService.prototype.registerBottomCenterRowContainerCtrl = function (ctrl) {
52167 this.bottomCenterRowContainerCtrl = ctrl;
52168 this.checkReady();
52169 };
52170 CtrlsService.prototype.registerBottomLeftRowContainerCtrl = function (ctrl) {
52171 this.bottomLeftRowContainerCtrl = ctrl;
52172 this.checkReady();
52173 };
52174 CtrlsService.prototype.registerBottomRightRowContainerCtrl = function (ctrl) {
52175 this.bottomRightRowContainerCtrl = ctrl;
52176 this.checkReady();
52177 };
52178 CtrlsService.prototype.registerHeaderContainer = function (ctrl, pinned) {
52179 switch (pinned) {
52180 case 'left':
52181 this.leftHeaderRowContainerCtrl = ctrl;
52182 break;
52183 case 'right':
52184 this.rightHeaderRowContainerCtrl = ctrl;
52185 break;
52186 default:
52187 this.centerHeaderRowContainerCtrl = ctrl;
52188 break;
52189 }
52190 this.checkReady();
52191 };
52192 CtrlsService.prototype.registerGridBodyCtrl = function (ctrl) {
52193 this.gridBodyCtrl = ctrl;
52194 this.checkReady();
52195 };
52196 CtrlsService.prototype.registerGridCtrl = function (ctrl) {
52197 this.gridCtrl = ctrl;
52198 this.checkReady();
52199 };
52200 CtrlsService.prototype.getFakeHScrollComp = function () {
52201 return this.fakeHScrollComp;
52202 };
52203 CtrlsService.prototype.getFakeVScrollComp = function () {
52204 return this.fakeVScrollComp;
52205 };
52206 CtrlsService.prototype.getGridHeaderCtrl = function () {
52207 return this.gridHeaderCtrl;
52208 };
52209 CtrlsService.prototype.getGridCtrl = function () {
52210 return this.gridCtrl;
52211 };
52212 CtrlsService.prototype.getCenterRowContainerCtrl = function () {
52213 return this.centerRowContainerCtrl;
52214 };
52215 CtrlsService.prototype.getTopCenterRowContainerCtrl = function () {
52216 return this.topCenterRowContainerCtrl;
52217 };
52218 CtrlsService.prototype.getBottomCenterRowContainerCtrl = function () {
52219 return this.bottomCenterRowContainerCtrl;
52220 };
52221 CtrlsService.prototype.getStickyTopCenterRowContainerCtrl = function () {
52222 return this.stickyTopCenterRowContainerCtrl;
52223 };
52224 CtrlsService.prototype.getGridBodyCtrl = function () {
52225 return this.gridBodyCtrl;
52226 };
52227 CtrlsService.prototype.getHeaderRowContainerCtrls = function () {
52228 return [this.leftHeaderRowContainerCtrl, this.rightHeaderRowContainerCtrl, this.centerHeaderRowContainerCtrl];
52229 };
52230 CtrlsService.prototype.getHeaderRowContainerCtrl = function (pinned) {
52231 switch (pinned) {
52232 case 'left': return this.leftHeaderRowContainerCtrl;
52233 case 'right': return this.rightHeaderRowContainerCtrl;
52234 default: return this.centerHeaderRowContainerCtrl;
52235 }
52236 };
52237 var CtrlsService_1;
52238 CtrlsService.NAME = 'ctrlsService';
52239 CtrlsService = CtrlsService_1 = __decorate([
52240 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])(CtrlsService_1.NAME)
52241 ], CtrlsService);
52242 return CtrlsService;
52243}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
52244
52245
52246
52247/***/ }),
52248/* 237 */
52249/***/ (function(module, __webpack_exports__, __webpack_require__) {
52250
52251"use strict";
52252__webpack_require__.r(__webpack_exports__);
52253/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CtrlsFactory", function() { return CtrlsFactory; });
52254/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
52255/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
52256/**
52257 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52258 * @version v29.2.0
52259 * @link https://www.ag-grid.com/
52260 * @license MIT
52261 */
52262var __extends = (undefined && undefined.__extends) || (function () {
52263 var extendStatics = function (d, b) {
52264 extendStatics = Object.setPrototypeOf ||
52265 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52266 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
52267 return extendStatics(d, b);
52268 };
52269 return function (d, b) {
52270 extendStatics(d, b);
52271 function __() { this.constructor = d; }
52272 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52273 };
52274})();
52275var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52276 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52277 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52278 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;
52279 return c > 3 && r && Object.defineProperty(target, key, r), r;
52280};
52281
52282
52283var CtrlsFactory = /** @class */ (function (_super) {
52284 __extends(CtrlsFactory, _super);
52285 function CtrlsFactory() {
52286 var _this = _super !== null && _super.apply(this, arguments) || this;
52287 _this.registry = {};
52288 return _this;
52289 }
52290 CtrlsFactory.prototype.register = function (meta) {
52291 this.registry[meta.controllerName] = meta.controllerClass;
52292 };
52293 CtrlsFactory.prototype.getInstance = function (name) {
52294 var ControllerClass = this.registry[name];
52295 if (ControllerClass == null) {
52296 return undefined;
52297 }
52298 return new ControllerClass();
52299 };
52300 CtrlsFactory = __decorate([
52301 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('ctrlsFactory')
52302 ], CtrlsFactory);
52303 return CtrlsFactory;
52304}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
52305
52306
52307
52308/***/ }),
52309/* 238 */
52310/***/ (function(module, __webpack_exports__, __webpack_require__) {
52311
52312"use strict";
52313__webpack_require__.r(__webpack_exports__);
52314/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FakeHScrollComp", function() { return FakeHScrollComp; });
52315/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
52316/* harmony import */ var _abstractFakeScrollComp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(239);
52317/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
52318/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
52319/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57);
52320/* harmony import */ var _centerWidthFeature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(140);
52321/**
52322 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52323 * @version v29.2.0
52324 * @link https://www.ag-grid.com/
52325 * @license MIT
52326 */
52327var __extends = (undefined && undefined.__extends) || (function () {
52328 var extendStatics = function (d, b) {
52329 extendStatics = Object.setPrototypeOf ||
52330 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52331 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
52332 return extendStatics(d, b);
52333 };
52334 return function (d, b) {
52335 extendStatics(d, b);
52336 function __() { this.constructor = d; }
52337 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52338 };
52339})();
52340var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52341 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52342 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52343 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;
52344 return c > 3 && r && Object.defineProperty(target, key, r), r;
52345};
52346
52347
52348
52349
52350
52351
52352var FakeHScrollComp = /** @class */ (function (_super) {
52353 __extends(FakeHScrollComp, _super);
52354 function FakeHScrollComp() {
52355 return _super.call(this, FakeHScrollComp.TEMPLATE, 'horizontal') || this;
52356 }
52357 FakeHScrollComp.prototype.postConstruct = function () {
52358 var _this = this;
52359 _super.prototype.postConstruct.call(this);
52360 // When doing printing, this changes whether cols are pinned or not
52361 var spacerWidthsListener = this.setFakeHScrollSpacerWidths.bind(this);
52362 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, spacerWidthsListener);
52363 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, spacerWidthsListener);
52364 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_3__["Events"].EVENT_PINNED_ROW_DATA_CHANGED, this.onPinnedRowDataChanged.bind(this));
52365 this.addManagedPropertyListener('domLayout', spacerWidthsListener);
52366 this.ctrlsService.registerFakeHScrollComp(this);
52367 this.createManagedBean(new _centerWidthFeature__WEBPACK_IMPORTED_MODULE_5__["CenterWidthFeature"](function (width) { return _this.eContainer.style.width = width + "px"; }));
52368 };
52369 FakeHScrollComp.prototype.initialiseInvisibleScrollbar = function () {
52370 if (this.invisibleScrollbar !== undefined) {
52371 return;
52372 }
52373 this.enableRtl = this.gridOptionsService.is('enableRtl');
52374 _super.prototype.initialiseInvisibleScrollbar.call(this);
52375 if (this.invisibleScrollbar) {
52376 this.refreshCompBottom();
52377 }
52378 };
52379 FakeHScrollComp.prototype.onPinnedRowDataChanged = function () {
52380 this.refreshCompBottom();
52381 };
52382 FakeHScrollComp.prototype.refreshCompBottom = function () {
52383 if (!this.invisibleScrollbar) {
52384 return;
52385 }
52386 var bottomPinnedHeight = this.pinnedRowModel.getPinnedBottomTotalHeight();
52387 this.getGui().style.bottom = bottomPinnedHeight + "px";
52388 };
52389 FakeHScrollComp.prototype.onScrollVisibilityChanged = function () {
52390 _super.prototype.onScrollVisibilityChanged.call(this);
52391 this.setFakeHScrollSpacerWidths();
52392 };
52393 FakeHScrollComp.prototype.setFakeHScrollSpacerWidths = function () {
52394 var vScrollShowing = this.scrollVisibleService.isVerticalScrollShowing();
52395 // we pad the right based on a) if cols are pinned to the right and
52396 // b) if v scroll is showing on the right (normal position of scroll)
52397 var rightSpacing = this.columnModel.getDisplayedColumnsRightWidth();
52398 var scrollOnRight = !this.enableRtl && vScrollShowing;
52399 var scrollbarWidth = this.gridOptionsService.getScrollbarWidth();
52400 if (scrollOnRight) {
52401 rightSpacing += scrollbarWidth;
52402 }
52403 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedWidth"])(this.eRightSpacer, rightSpacing);
52404 this.eRightSpacer.classList.toggle('ag-scroller-corner', rightSpacing <= scrollbarWidth);
52405 // we pad the left based on a) if cols are pinned to the left and
52406 // b) if v scroll is showing on the left (happens in LTR layout only)
52407 var leftSpacing = this.columnModel.getDisplayedColumnsLeftWidth();
52408 var scrollOnLeft = this.enableRtl && vScrollShowing;
52409 if (scrollOnLeft) {
52410 leftSpacing += scrollbarWidth;
52411 }
52412 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedWidth"])(this.eLeftSpacer, leftSpacing);
52413 this.eLeftSpacer.classList.toggle('ag-scroller-corner', leftSpacing <= scrollbarWidth);
52414 };
52415 FakeHScrollComp.prototype.setScrollVisible = function () {
52416 var hScrollShowing = this.scrollVisibleService.isHorizontalScrollShowing();
52417 var invisibleScrollbar = this.invisibleScrollbar;
52418 var isSuppressHorizontalScroll = this.gridOptionsService.is('suppressHorizontalScroll');
52419 var scrollbarWidth = hScrollShowing ? (this.gridOptionsService.getScrollbarWidth() || 0) : 0;
52420 var adjustedScrollbarWidth = (scrollbarWidth === 0 && invisibleScrollbar) ? 16 : scrollbarWidth;
52421 var scrollContainerSize = !isSuppressHorizontalScroll ? adjustedScrollbarWidth : 0;
52422 this.addOrRemoveCssClass('ag-scrollbar-invisible', invisibleScrollbar);
52423 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedHeight"])(this.getGui(), scrollContainerSize);
52424 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedHeight"])(this.eViewport, scrollContainerSize);
52425 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedHeight"])(this.eContainer, scrollContainerSize);
52426 this.setDisplayed(hScrollShowing, { skipAriaHidden: true });
52427 };
52428 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>";
52429 __decorate([
52430 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eLeftSpacer')
52431 ], FakeHScrollComp.prototype, "eLeftSpacer", void 0);
52432 __decorate([
52433 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eRightSpacer')
52434 ], FakeHScrollComp.prototype, "eRightSpacer", void 0);
52435 __decorate([
52436 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
52437 ], FakeHScrollComp.prototype, "columnModel", void 0);
52438 __decorate([
52439 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedRowModel')
52440 ], FakeHScrollComp.prototype, "pinnedRowModel", void 0);
52441 __decorate([
52442 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
52443 ], FakeHScrollComp.prototype, "postConstruct", null);
52444 return FakeHScrollComp;
52445}(_abstractFakeScrollComp__WEBPACK_IMPORTED_MODULE_1__["AbstractFakeScrollComp"]));
52446
52447
52448
52449/***/ }),
52450/* 239 */
52451/***/ (function(module, __webpack_exports__, __webpack_require__) {
52452
52453"use strict";
52454__webpack_require__.r(__webpack_exports__);
52455/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractFakeScrollComp", function() { return AbstractFakeScrollComp; });
52456/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
52457/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26);
52458/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
52459/* harmony import */ var _widgets_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38);
52460/* harmony import */ var _widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57);
52461/**
52462 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52463 * @version v29.2.0
52464 * @link https://www.ag-grid.com/
52465 * @license MIT
52466 */
52467var __extends = (undefined && undefined.__extends) || (function () {
52468 var extendStatics = function (d, b) {
52469 extendStatics = Object.setPrototypeOf ||
52470 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52471 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
52472 return extendStatics(d, b);
52473 };
52474 return function (d, b) {
52475 extendStatics(d, b);
52476 function __() { this.constructor = d; }
52477 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52478 };
52479})();
52480var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52481 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52482 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52483 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;
52484 return c > 3 && r && Object.defineProperty(target, key, r), r;
52485};
52486
52487
52488
52489
52490
52491var AbstractFakeScrollComp = /** @class */ (function (_super) {
52492 __extends(AbstractFakeScrollComp, _super);
52493 function AbstractFakeScrollComp(template, direction) {
52494 var _this = _super.call(this, template) || this;
52495 _this.direction = direction;
52496 _this.hideTimeout = null;
52497 return _this;
52498 }
52499 AbstractFakeScrollComp.prototype.postConstruct = function () {
52500 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_SCROLL_VISIBILITY_CHANGED, this.onScrollVisibilityChanged.bind(this));
52501 this.onScrollVisibilityChanged();
52502 this.addOrRemoveCssClass('ag-apple-scrollbar', Object(_utils_browser__WEBPACK_IMPORTED_MODULE_2__["isMacOsUserAgent"])() || Object(_utils_browser__WEBPACK_IMPORTED_MODULE_2__["isIOSUserAgent"])());
52503 };
52504 AbstractFakeScrollComp.prototype.initialiseInvisibleScrollbar = function () {
52505 if (this.invisibleScrollbar !== undefined) {
52506 return;
52507 }
52508 this.invisibleScrollbar = Object(_utils_browser__WEBPACK_IMPORTED_MODULE_2__["isInvisibleScrollbar"])();
52509 if (this.invisibleScrollbar) {
52510 this.hideAndShowInvisibleScrollAsNeeded();
52511 this.addActiveListenerToggles();
52512 }
52513 };
52514 AbstractFakeScrollComp.prototype.addActiveListenerToggles = function () {
52515 var _this = this;
52516 var activateEvents = ['mouseenter', 'mousedown', 'touchstart'];
52517 var deactivateEvents = ['mouseleave', 'touchend'];
52518 var eGui = this.getGui();
52519 activateEvents.forEach(function (eventName) { return _this.addManagedListener(eGui, eventName, function () { return _this.addOrRemoveCssClass('ag-scrollbar-active', true); }); });
52520 deactivateEvents.forEach(function (eventName) { return _this.addManagedListener(eGui, eventName, function () { return _this.addOrRemoveCssClass('ag-scrollbar-active', false); }); });
52521 };
52522 AbstractFakeScrollComp.prototype.onScrollVisibilityChanged = function () {
52523 // initialiseInvisibleScrollbar should only be called once, but the reason
52524 // this can't be inside `setComp` or `PostConstruct` is the DOM might not
52525 // be ready, so we call it until eventually, it gets calculated.
52526 if (this.invisibleScrollbar === undefined) {
52527 this.initialiseInvisibleScrollbar();
52528 }
52529 this.setScrollVisible();
52530 };
52531 AbstractFakeScrollComp.prototype.hideAndShowInvisibleScrollAsNeeded = function () {
52532 var _this = this;
52533 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_BODY_SCROLL, function (params) {
52534 if (params.direction === _this.direction) {
52535 if (_this.hideTimeout !== null) {
52536 window.clearTimeout(_this.hideTimeout);
52537 _this.hideTimeout = null;
52538 }
52539 _this.addOrRemoveCssClass('ag-scrollbar-scrolling', true);
52540 }
52541 });
52542 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_1__["Events"].EVENT_BODY_SCROLL_END, function () {
52543 _this.hideTimeout = window.setTimeout(function () {
52544 _this.addOrRemoveCssClass('ag-scrollbar-scrolling', false);
52545 _this.hideTimeout = null;
52546 }, 400);
52547 });
52548 };
52549 AbstractFakeScrollComp.prototype.getViewport = function () {
52550 return this.eViewport;
52551 };
52552 AbstractFakeScrollComp.prototype.getContainer = function () {
52553 return this.eContainer;
52554 };
52555 __decorate([
52556 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eViewport')
52557 ], AbstractFakeScrollComp.prototype, "eViewport", void 0);
52558 __decorate([
52559 Object(_widgets_componentAnnotations__WEBPACK_IMPORTED_MODULE_4__["RefSelector"])('eContainer')
52560 ], AbstractFakeScrollComp.prototype, "eContainer", void 0);
52561 __decorate([
52562 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('scrollVisibleService')
52563 ], AbstractFakeScrollComp.prototype, "scrollVisibleService", void 0);
52564 __decorate([
52565 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('ctrlsService')
52566 ], AbstractFakeScrollComp.prototype, "ctrlsService", void 0);
52567 return AbstractFakeScrollComp;
52568}(_widgets_component__WEBPACK_IMPORTED_MODULE_3__["Component"]));
52569
52570
52571
52572/***/ }),
52573/* 240 */
52574/***/ (function(module, __webpack_exports__, __webpack_require__) {
52575
52576"use strict";
52577__webpack_require__.r(__webpack_exports__);
52578/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PinnedWidthService", function() { return PinnedWidthService; });
52579/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
52580/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
52581/* harmony import */ var _eventKeys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26);
52582/**
52583 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52584 * @version v29.2.0
52585 * @link https://www.ag-grid.com/
52586 * @license MIT
52587 */
52588var __extends = (undefined && undefined.__extends) || (function () {
52589 var extendStatics = function (d, b) {
52590 extendStatics = Object.setPrototypeOf ||
52591 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52592 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
52593 return extendStatics(d, b);
52594 };
52595 return function (d, b) {
52596 extendStatics(d, b);
52597 function __() { this.constructor = d; }
52598 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52599 };
52600})();
52601var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52602 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52603 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52604 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;
52605 return c > 3 && r && Object.defineProperty(target, key, r), r;
52606};
52607
52608
52609
52610var PinnedWidthService = /** @class */ (function (_super) {
52611 __extends(PinnedWidthService, _super);
52612 function PinnedWidthService() {
52613 return _super !== null && _super.apply(this, arguments) || this;
52614 }
52615 PinnedWidthService.prototype.postConstruct = function () {
52616 var listener = this.checkContainerWidths.bind(this);
52617 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_CHANGED, listener);
52618 this.addManagedListener(this.eventService, _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, listener);
52619 this.addManagedPropertyListener('domLayout', listener);
52620 };
52621 PinnedWidthService.prototype.checkContainerWidths = function () {
52622 var printLayout = this.gridOptionsService.isDomLayout('print');
52623 var newLeftWidth = printLayout ? 0 : this.columnModel.getDisplayedColumnsLeftWidth();
52624 var newRightWidth = printLayout ? 0 : this.columnModel.getDisplayedColumnsRightWidth();
52625 if (newLeftWidth != this.leftWidth) {
52626 this.leftWidth = newLeftWidth;
52627 this.eventService.dispatchEvent({ type: _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_LEFT_PINNED_WIDTH_CHANGED });
52628 }
52629 if (newRightWidth != this.rightWidth) {
52630 this.rightWidth = newRightWidth;
52631 this.eventService.dispatchEvent({ type: _eventKeys__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_RIGHT_PINNED_WIDTH_CHANGED });
52632 }
52633 };
52634 PinnedWidthService.prototype.getPinnedRightWidth = function () {
52635 return this.rightWidth;
52636 };
52637 PinnedWidthService.prototype.getPinnedLeftWidth = function () {
52638 return this.leftWidth;
52639 };
52640 __decorate([
52641 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('columnModel')
52642 ], PinnedWidthService.prototype, "columnModel", void 0);
52643 __decorate([
52644 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
52645 ], PinnedWidthService.prototype, "postConstruct", null);
52646 PinnedWidthService = __decorate([
52647 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('pinnedWidthService')
52648 ], PinnedWidthService);
52649 return PinnedWidthService;
52650}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
52651
52652
52653
52654/***/ }),
52655/* 241 */
52656/***/ (function(module, __webpack_exports__, __webpack_require__) {
52657
52658"use strict";
52659__webpack_require__.r(__webpack_exports__);
52660/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowNodeEventThrottle", function() { return RowNodeEventThrottle; });
52661/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
52662/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
52663/**
52664 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52665 * @version v29.2.0
52666 * @link https://www.ag-grid.com/
52667 * @license MIT
52668 */
52669var __extends = (undefined && undefined.__extends) || (function () {
52670 var extendStatics = function (d, b) {
52671 extendStatics = Object.setPrototypeOf ||
52672 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52673 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
52674 return extendStatics(d, b);
52675 };
52676 return function (d, b) {
52677 extendStatics(d, b);
52678 function __() { this.constructor = d; }
52679 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52680 };
52681})();
52682var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52683 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52684 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52685 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;
52686 return c > 3 && r && Object.defineProperty(target, key, r), r;
52687};
52688
52689
52690var RowNodeEventThrottle = /** @class */ (function (_super) {
52691 __extends(RowNodeEventThrottle, _super);
52692 function RowNodeEventThrottle() {
52693 var _this = _super !== null && _super.apply(this, arguments) || this;
52694 _this.events = [];
52695 return _this;
52696 }
52697 RowNodeEventThrottle.prototype.postConstruct = function () {
52698 if (this.rowModel.getType() == 'clientSide') {
52699 this.clientSideRowModel = this.rowModel;
52700 }
52701 };
52702 // because the user can call rowNode.setExpanded() many times in one VM turn,
52703 // we throttle the calls to ClientSideRowModel using animationFrameService. this means for 100
52704 // row nodes getting expanded, we only update the CSRM once, and then we fire all events after
52705 // CSRM has updated.
52706 //
52707 // if we did not do this, then the user could call setExpanded on 100+ rows, causing the grid
52708 // to re-render 100+ times, which would be a performance lag.
52709 //
52710 // we use animationFrameService
52711 // rather than _.debounce() so this will get done if anyone flushes the animationFrameService
52712 // (eg user calls api.ensureRowVisible(), which in turn flushes ).
52713 RowNodeEventThrottle.prototype.dispatchExpanded = function (event) {
52714 var _this = this;
52715 // if not using CSRM, we don't debounce. otherwise this breaks the SSRM.
52716 if (this.clientSideRowModel == null) {
52717 this.eventService.dispatchEvent(event);
52718 return;
52719 }
52720 this.events.push(event);
52721 var func = function () {
52722 if (_this.clientSideRowModel) {
52723 _this.clientSideRowModel.onRowGroupOpened();
52724 }
52725 _this.events.forEach(function (e) { return _this.eventService.dispatchEvent(e); });
52726 _this.events = [];
52727 };
52728 if (this.dispatchExpandedDebounced == null) {
52729 this.dispatchExpandedDebounced = this.animationFrameService.debounce(func);
52730 }
52731 this.dispatchExpandedDebounced();
52732 };
52733 __decorate([
52734 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('animationFrameService')
52735 ], RowNodeEventThrottle.prototype, "animationFrameService", void 0);
52736 __decorate([
52737 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('rowModel')
52738 ], RowNodeEventThrottle.prototype, "rowModel", void 0);
52739 __decorate([
52740 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
52741 ], RowNodeEventThrottle.prototype, "postConstruct", null);
52742 RowNodeEventThrottle = __decorate([
52743 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('rowNodeEventThrottle')
52744 ], RowNodeEventThrottle);
52745 return RowNodeEventThrottle;
52746}(_context_beanStub__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
52747
52748
52749
52750/***/ }),
52751/* 242 */
52752/***/ (function(module, __webpack_exports__, __webpack_require__) {
52753
52754"use strict";
52755__webpack_require__.r(__webpack_exports__);
52756/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridOptionsService", function() { return GridOptionsService; });
52757/* harmony import */ var _components_componentUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24);
52758/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
52759/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
52760/* harmony import */ var _eventService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
52761/* harmony import */ var _utils_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
52762/* harmony import */ var _utils_generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
52763/* harmony import */ var _utils_browser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42);
52764/* harmony import */ var _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(15);
52765/* harmony import */ var _modules_moduleNames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14);
52766/* harmony import */ var _gridOptionsValidator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(22);
52767/**
52768 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
52769 * @version v29.2.0
52770 * @link https://www.ag-grid.com/
52771 * @license MIT
52772 */
52773var __assign = (undefined && undefined.__assign) || function () {
52774 __assign = Object.assign || function(t) {
52775 for (var s, i = 1, n = arguments.length; i < n; i++) {
52776 s = arguments[i];
52777 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
52778 t[p] = s[p];
52779 }
52780 return t;
52781 };
52782 return __assign.apply(this, arguments);
52783};
52784var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
52785 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52786 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52787 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;
52788 return c > 3 && r && Object.defineProperty(target, key, r), r;
52789};
52790var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
52791 return function (target, key) { decorator(target, key, paramIndex); }
52792};
52793var __read = (undefined && undefined.__read) || function (o, n) {
52794 var m = typeof Symbol === "function" && o[Symbol.iterator];
52795 if (!m) return o;
52796 var i = m.call(o), r, ar = [], e;
52797 try {
52798 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
52799 }
52800 catch (error) { e = { error: error }; }
52801 finally {
52802 try {
52803 if (r && !r.done && (m = i["return"])) m.call(i);
52804 }
52805 finally { if (e) throw e.error; }
52806 }
52807 return ar;
52808};
52809var __spread = (undefined && undefined.__spread) || function () {
52810 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
52811 return ar;
52812};
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823function toNumber(value) {
52824 if (typeof value == 'number') {
52825 return value;
52826 }
52827 if (typeof value == 'string') {
52828 return parseInt(value, 10);
52829 }
52830}
52831function isTrue(value) {
52832 return value === true || value === 'true';
52833}
52834var GridOptionsService = /** @class */ (function () {
52835 function GridOptionsService() {
52836 this.destroyed = false;
52837 this.domDataKey = '__AG_' + Math.random().toString();
52838 this.propertyEventService = new _eventService__WEBPACK_IMPORTED_MODULE_3__["EventService"]();
52839 }
52840 Object.defineProperty(GridOptionsService.prototype, "context", {
52841 // This is quicker then having code call gridOptionsService.get('context')
52842 get: function () {
52843 return this.gridOptions['context'];
52844 },
52845 enumerable: false,
52846 configurable: true
52847 });
52848 GridOptionsService.prototype.agWire = function (gridApi, columnApi) {
52849 this.gridOptions.api = gridApi;
52850 this.gridOptions.columnApi = columnApi;
52851 this.api = gridApi;
52852 this.columnApi = columnApi;
52853 };
52854 GridOptionsService.prototype.init = function () {
52855 this.gridOptionLookup = new Set(__spread(_components_componentUtil__WEBPACK_IMPORTED_MODULE_0__["ComponentUtil"].ALL_PROPERTIES, _components_componentUtil__WEBPACK_IMPORTED_MODULE_0__["ComponentUtil"].EVENT_CALLBACKS));
52856 var async = !this.is('suppressAsyncEvents');
52857 this.eventService.addGlobalListener(this.globalEventHandler.bind(this), async);
52858 // sets an initial calculation for the scrollbar width
52859 this.getScrollbarWidth();
52860 };
52861 GridOptionsService.prototype.destroy = function () {
52862 // need to remove these, as we don't own the lifecycle of the gridOptions, we need to
52863 // remove the references in case the user keeps the grid options, we want the rest
52864 // of the grid to be picked up by the garbage collector
52865 this.gridOptions.api = null;
52866 this.gridOptions.columnApi = null;
52867 this.destroyed = true;
52868 };
52869 /**
52870 * Is the given GridOption property set to true.
52871 * @param property GridOption property that has the type `boolean | undefined`
52872 */
52873 GridOptionsService.prototype.is = function (property) {
52874 return isTrue(this.gridOptions[property]);
52875 };
52876 /**
52877 * Get the raw value of the GridOptions property provided.
52878 * @param property
52879 */
52880 GridOptionsService.prototype.get = function (property) {
52881 return this.gridOptions[property];
52882 };
52883 /**
52884 * Get the GridOption property as a number, raw value is returned via a toNumber coercion function.
52885 * @param property GridOption property that has the type `number | undefined`
52886 */
52887 GridOptionsService.prototype.getNum = function (property) {
52888 return toNumber(this.gridOptions[property]);
52889 };
52890 /**
52891 * Get the GridOption callback but wrapped so that the common params of api,columnApi and context are automatically applied to the params.
52892 * @param property GridOption callback properties based on the fact that this property has a callback with params extending AgGridCommon
52893 */
52894 GridOptionsService.prototype.getCallback = function (property) {
52895 return this.mergeGridCommonParams(this.gridOptions[property]);
52896 };
52897 /**
52898 * Returns `true` if a value has been specified for this GridOption.
52899 * @param property GridOption property
52900 */
52901 GridOptionsService.prototype.exists = function (property) {
52902 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(this.gridOptions[property]);
52903 };
52904 /**
52905 * Wrap the user callback and attach the api, columnApi and context to the params object on the way through.
52906 * @param callback User provided callback
52907 * @returns Wrapped callback where the params object not require api, columnApi and context
52908 */
52909 GridOptionsService.prototype.mergeGridCommonParams = function (callback) {
52910 var _this = this;
52911 if (callback) {
52912 var wrapped = function (callbackParams) {
52913 var mergedParams = callbackParams;
52914 mergedParams.api = _this.api;
52915 mergedParams.columnApi = _this.columnApi;
52916 mergedParams.context = _this.context;
52917 return callback(mergedParams);
52918 };
52919 return wrapped;
52920 }
52921 return callback;
52922 };
52923 /**
52924 *
52925 * @param key - key of the GridOption property to update
52926 * @param newValue - new value for this property
52927 * @param force - force the property change Event to be fired even if the value has not changed
52928 * @param eventParams - additional params to merge into the property changed event
52929 */
52930 GridOptionsService.prototype.set = function (key, newValue, force, eventParams) {
52931 if (force === void 0) { force = false; }
52932 if (eventParams === void 0) { eventParams = {}; }
52933 if (this.gridOptionLookup.has(key)) {
52934 var previousValue = this.gridOptions[key];
52935 if (force || previousValue !== newValue) {
52936 this.gridOptions[key] = newValue;
52937 var event_1 = __assign({ type: key, currentValue: newValue, previousValue: previousValue }, eventParams);
52938 this.propertyEventService.dispatchEvent(event_1);
52939 }
52940 }
52941 };
52942 GridOptionsService.prototype.addEventListener = function (key, listener) {
52943 this.propertyEventService.addEventListener(key, listener);
52944 };
52945 GridOptionsService.prototype.removeEventListener = function (key, listener) {
52946 this.propertyEventService.removeEventListener(key, listener);
52947 };
52948 // responsible for calling the onXXX functions on gridOptions
52949 GridOptionsService.prototype.globalEventHandler = function (eventName, event) {
52950 // prevent events from being fired _after_ the grid has been destroyed
52951 if (this.destroyed) {
52952 return;
52953 }
52954 var callbackMethodName = _components_componentUtil__WEBPACK_IMPORTED_MODULE_0__["ComponentUtil"].getCallbackForEvent(eventName);
52955 if (typeof this.gridOptions[callbackMethodName] === 'function') {
52956 this.gridOptions[callbackMethodName](event);
52957 }
52958 };
52959 // *************** Helper methods ************************** //
52960 // Methods to share common GridOptions related logic that goes above accessing a single property
52961 // the user might be using some non-standard scrollbar, eg a scrollbar that has zero
52962 // width and overlays (like the Safari scrollbar, but presented in Chrome). so we
52963 // allow the user to provide the scroll width before we work it out.
52964 GridOptionsService.prototype.getScrollbarWidth = function () {
52965 if (this.scrollbarWidth == null) {
52966 var useGridOptions = typeof this.gridOptions.scrollbarWidth === 'number' && this.gridOptions.scrollbarWidth >= 0;
52967 var scrollbarWidth = useGridOptions ? this.gridOptions.scrollbarWidth : Object(_utils_browser__WEBPACK_IMPORTED_MODULE_6__["getScrollbarWidth"])();
52968 if (scrollbarWidth != null) {
52969 this.scrollbarWidth = scrollbarWidth;
52970 this.eventService.dispatchEvent({
52971 type: _events__WEBPACK_IMPORTED_MODULE_2__["Events"].EVENT_SCROLLBAR_WIDTH_CHANGED
52972 });
52973 }
52974 }
52975 return this.scrollbarWidth;
52976 };
52977 GridOptionsService.prototype.isRowModelType = function (rowModelType) {
52978 return this.gridOptions.rowModelType === rowModelType ||
52979 (rowModelType === 'clientSide' && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missing"])(this.gridOptions.rowModelType));
52980 };
52981 GridOptionsService.prototype.isDomLayout = function (domLayout) {
52982 var _a;
52983 var gridLayout = (_a = this.gridOptions.domLayout) !== null && _a !== void 0 ? _a : 'normal';
52984 return gridLayout === domLayout;
52985 };
52986 GridOptionsService.prototype.isRowSelection = function () {
52987 return this.gridOptions.rowSelection === 'single' || this.gridOptions.rowSelection === 'multiple';
52988 };
52989 GridOptionsService.prototype.useAsyncEvents = function () {
52990 return !this.is('suppressAsyncEvents');
52991 };
52992 GridOptionsService.prototype.isGetRowHeightFunction = function () {
52993 return typeof this.gridOptions.getRowHeight === 'function';
52994 };
52995 GridOptionsService.prototype.getRowHeightForNode = function (rowNode, allowEstimate, defaultRowHeight) {
52996 if (allowEstimate === void 0) { allowEstimate = false; }
52997 if (defaultRowHeight == null) {
52998 defaultRowHeight = this.environment.getDefaultRowHeight();
52999 }
53000 // check the function first, in case use set both function and
53001 // number, when using virtual pagination then function can be
53002 // used for pinned rows and the number for the body rows.
53003 if (this.isGetRowHeightFunction()) {
53004 if (allowEstimate) {
53005 return { height: defaultRowHeight, estimated: true };
53006 }
53007 var params = {
53008 node: rowNode,
53009 data: rowNode.data
53010 };
53011 var height = this.getCallback('getRowHeight')(params);
53012 if (this.isNumeric(height)) {
53013 if (height === 0) {
53014 Object(_utils_function__WEBPACK_IMPORTED_MODULE_4__["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');
53015 }
53016 return { height: Math.max(1, height), estimated: false };
53017 }
53018 }
53019 if (rowNode.detail && this.is('masterDetail')) {
53020 return this.getMasterDetailRowHeight();
53021 }
53022 var rowHeight = this.gridOptions.rowHeight && this.isNumeric(this.gridOptions.rowHeight) ? this.gridOptions.rowHeight : defaultRowHeight;
53023 return { height: rowHeight, estimated: false };
53024 };
53025 GridOptionsService.prototype.getMasterDetailRowHeight = function () {
53026 // if autoHeight, we want the height to grow to the new height starting at 1, as otherwise a flicker would happen,
53027 // as the detail goes to the default (eg 200px) and then immediately shrink up/down to the new measured height
53028 // (due to auto height) which looks bad, especially if doing row animation.
53029 if (this.is('detailRowAutoHeight')) {
53030 return { height: 1, estimated: false };
53031 }
53032 if (this.isNumeric(this.gridOptions.detailRowHeight)) {
53033 return { height: this.gridOptions.detailRowHeight, estimated: false };
53034 }
53035 return { height: 300, estimated: false };
53036 };
53037 // we don't allow dynamic row height for virtual paging
53038 GridOptionsService.prototype.getRowHeightAsNumber = function () {
53039 if (!this.gridOptions.rowHeight || Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missing"])(this.gridOptions.rowHeight)) {
53040 return this.environment.getDefaultRowHeight();
53041 }
53042 var rowHeight = this.gridOptions.rowHeight;
53043 if (rowHeight && this.isNumeric(rowHeight)) {
53044 this.environment.setRowHeightVariable(rowHeight);
53045 return rowHeight;
53046 }
53047 console.warn('AG Grid row height must be a number if not using standard row model');
53048 return this.environment.getDefaultRowHeight();
53049 };
53050 GridOptionsService.prototype.isNumeric = function (value) {
53051 return !isNaN(value) && typeof value === 'number' && isFinite(value);
53052 };
53053 GridOptionsService.prototype.getDomDataKey = function () {
53054 return this.domDataKey;
53055 };
53056 // returns the dom data, or undefined if not found
53057 GridOptionsService.prototype.getDomData = function (element, key) {
53058 var domData = element[this.getDomDataKey()];
53059 return domData ? domData[key] : undefined;
53060 };
53061 GridOptionsService.prototype.setDomData = function (element, key, value) {
53062 var domDataKey = this.getDomDataKey();
53063 var domData = element[domDataKey];
53064 if (Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["missing"])(domData)) {
53065 domData = {};
53066 element[domDataKey] = domData;
53067 }
53068 domData[key] = value;
53069 };
53070 GridOptionsService.prototype.getDocument = function () {
53071 // if user is providing document, we use the users one,
53072 // otherwise we use the document on the global namespace.
53073 var result = null;
53074 if (this.gridOptions.getDocument && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(this.gridOptions.getDocument)) {
53075 result = this.gridOptions.getDocument();
53076 }
53077 else if (this.eGridDiv) {
53078 result = this.eGridDiv.ownerDocument;
53079 }
53080 if (result && Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(result)) {
53081 return result;
53082 }
53083 return document;
53084 };
53085 GridOptionsService.prototype.getRootNode = function () {
53086 return this.eGridDiv.getRootNode();
53087 };
53088 GridOptionsService.prototype.getRowIdFunc = function () {
53089 var getRowId = this.getCallback('getRowId');
53090 if (getRowId) {
53091 return getRowId;
53092 }
53093 // this is the deprecated way, so provide a proxy to make it compatible
53094 var getRowNodeId = this.gridOptions.getRowNodeId;
53095 if (getRowNodeId) {
53096 return function (params) { return getRowNodeId(params.data); };
53097 }
53098 };
53099 GridOptionsService.prototype.getAsyncTransactionWaitMillis = function () {
53100 return Object(_utils_generic__WEBPACK_IMPORTED_MODULE_5__["exists"])(this.gridOptions.asyncTransactionWaitMillis) ? this.gridOptions.asyncTransactionWaitMillis : 50;
53101 };
53102 GridOptionsService.prototype.isAnimateRows = function () {
53103 // never allow animating if enforcing the row order
53104 if (this.is('ensureDomOrder')) {
53105 return false;
53106 }
53107 return this.is('animateRows');
53108 };
53109 GridOptionsService.prototype.isTreeData = function () {
53110 return this.is('treeData') && _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_8__["ModuleNames"].RowGroupingModule, 'Tree Data');
53111 };
53112 GridOptionsService.prototype.isMasterDetail = function () {
53113 return this.is('masterDetail') && _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].assertRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_8__["ModuleNames"].MasterDetailModule, 'masterDetail');
53114 };
53115 GridOptionsService.prototype.isEnableRangeSelection = function () {
53116 return this.is('enableRangeSelection') && _modules_moduleRegistry__WEBPACK_IMPORTED_MODULE_7__["ModuleRegistry"].isRegistered(_modules_moduleNames__WEBPACK_IMPORTED_MODULE_8__["ModuleNames"].RangeSelectionModule);
53117 };
53118 GridOptionsService.prototype.isColumnsSortingCoupledToGroup = function () {
53119 var autoGroupColumnDef = this.gridOptions.autoGroupColumnDef;
53120 var isClientSideRowModel = this.isRowModelType('clientSide');
53121 return isClientSideRowModel && !(autoGroupColumnDef === null || autoGroupColumnDef === void 0 ? void 0 : autoGroupColumnDef.comparator);
53122 };
53123 GridOptionsService.prototype.getGroupAggFiltering = function () {
53124 var userValue = this.gridOptions.groupAggFiltering;
53125 if (typeof userValue === 'function') {
53126 return this.getCallback('groupAggFiltering');
53127 }
53128 if (isTrue(userValue)) {
53129 return function () { return true; };
53130 }
53131 return undefined;
53132 };
53133 GridOptionsService.prototype.isGroupMultiAutoColumn = function () {
53134 if (this.gridOptions.groupDisplayType) {
53135 return Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_9__["matchesGroupDisplayType"])('multipleColumns', this.gridOptions.groupDisplayType);
53136 }
53137 // if we are doing hideOpenParents we also show multiple columns, otherwise hideOpenParents would not work
53138 return this.is('groupHideOpenParents');
53139 };
53140 GridOptionsService.prototype.isGroupUseEntireRow = function (pivotMode) {
53141 // we never allow groupDisplayType = 'groupRows' if in pivot mode, otherwise we won't see the pivot values.
53142 if (pivotMode) {
53143 return false;
53144 }
53145 return this.gridOptions.groupDisplayType ? Object(_gridOptionsValidator__WEBPACK_IMPORTED_MODULE_9__["matchesGroupDisplayType"])('groupRows', this.gridOptions.groupDisplayType) : false;
53146 };
53147 __decorate([
53148 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('gridOptions')
53149 ], GridOptionsService.prototype, "gridOptions", void 0);
53150 __decorate([
53151 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('eventService')
53152 ], GridOptionsService.prototype, "eventService", void 0);
53153 __decorate([
53154 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('environment')
53155 ], GridOptionsService.prototype, "environment", void 0);
53156 __decorate([
53157 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Autowired"])('eGridDiv')
53158 ], GridOptionsService.prototype, "eGridDiv", void 0);
53159 __decorate([
53160 __param(0, Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Qualifier"])('gridApi')), __param(1, Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Qualifier"])('columnApi'))
53161 ], GridOptionsService.prototype, "agWire", null);
53162 __decorate([
53163 _context_context__WEBPACK_IMPORTED_MODULE_1__["PostConstruct"]
53164 ], GridOptionsService.prototype, "init", null);
53165 __decorate([
53166 _context_context__WEBPACK_IMPORTED_MODULE_1__["PreDestroy"]
53167 ], GridOptionsService.prototype, "destroy", null);
53168 GridOptionsService = __decorate([
53169 Object(_context_context__WEBPACK_IMPORTED_MODULE_1__["Bean"])('gridOptionsService')
53170 ], GridOptionsService);
53171 return GridOptionsService;
53172}());
53173
53174
53175
53176/***/ }),
53177/* 243 */
53178/***/ (function(module, __webpack_exports__, __webpack_require__) {
53179
53180"use strict";
53181__webpack_require__.r(__webpack_exports__);
53182/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocaleService", function() { return LocaleService; });
53183/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
53184/* harmony import */ var _context_beanStub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
53185/**
53186 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
53187 * @version v29.2.0
53188 * @link https://www.ag-grid.com/
53189 * @license MIT
53190 */
53191var __extends = (undefined && undefined.__extends) || (function () {
53192 var extendStatics = function (d, b) {
53193 extendStatics = Object.setPrototypeOf ||
53194 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
53195 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
53196 return extendStatics(d, b);
53197 };
53198 return function (d, b) {
53199 extendStatics(d, b);
53200 function __() { this.constructor = d; }
53201 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
53202 };
53203})();
53204var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
53205 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
53206 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
53207 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;
53208 return c > 3 && r && Object.defineProperty(target, key, r), r;
53209};
53210
53211
53212var LocaleService = /** @class */ (function (_super) {
53213 __extends(LocaleService, _super);
53214 function LocaleService() {
53215 return _super !== null && _super.apply(this, arguments) || this;
53216 }
53217 LocaleService.prototype.getLocaleTextFunc = function () {
53218 var getLocaleText = this.gridOptionsService.getCallback('getLocaleText');
53219 if (getLocaleText) {
53220 //key: string, defaultValue: string, variableValues?: string[]
53221 return function (key, defaultValue, variableValues) {
53222 var params = {
53223 key: key,
53224 defaultValue: defaultValue,
53225 variableValues: variableValues
53226 };
53227 return getLocaleText(params);
53228 };
53229 }
53230 var localeTextFunc = this.gridOptionsService.get('localeTextFunc');
53231 if (localeTextFunc) {
53232 return localeTextFunc;
53233 }
53234 var localeText = this.gridOptionsService.get('localeText');
53235 return function (key, defaultValue, variableValues) {
53236 var localisedText = localeText && localeText[key];
53237 if (localisedText && variableValues && variableValues.length) {
53238 var found = 0;
53239 while (true) {
53240 if (found >= variableValues.length) {
53241 break;
53242 }
53243 var idx = localisedText.indexOf('${variable}');
53244 if (idx === -1) {
53245 break;
53246 }
53247 localisedText = localisedText.replace('${variable}', variableValues[found++]);
53248 }
53249 }
53250 return localisedText !== null && localisedText !== void 0 ? localisedText : defaultValue;
53251 };
53252 };
53253 LocaleService = __decorate([
53254 Object(_context_context__WEBPACK_IMPORTED_MODULE_0__["Bean"])('localeService')
53255 ], LocaleService);
53256 return LocaleService;
53257}(_context_beanStub__WEBPACK_IMPORTED_MODULE_1__["BeanStub"]));
53258
53259
53260
53261/***/ }),
53262/* 244 */
53263/***/ (function(module, __webpack_exports__, __webpack_require__) {
53264
53265"use strict";
53266__webpack_require__.r(__webpack_exports__);
53267/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FakeVScrollComp", function() { return FakeVScrollComp; });
53268/* harmony import */ var _context_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
53269/* harmony import */ var _abstractFakeScrollComp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(239);
53270/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
53271/* harmony import */ var _rowContainer_setHeightFeature__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(138);
53272/**
53273 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
53274 * @version v29.2.0
53275 * @link https://www.ag-grid.com/
53276 * @license MIT
53277 */
53278var __extends = (undefined && undefined.__extends) || (function () {
53279 var extendStatics = function (d, b) {
53280 extendStatics = Object.setPrototypeOf ||
53281 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
53282 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
53283 return extendStatics(d, b);
53284 };
53285 return function (d, b) {
53286 extendStatics(d, b);
53287 function __() { this.constructor = d; }
53288 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
53289 };
53290})();
53291var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
53292 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
53293 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
53294 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;
53295 return c > 3 && r && Object.defineProperty(target, key, r), r;
53296};
53297
53298
53299
53300
53301var FakeVScrollComp = /** @class */ (function (_super) {
53302 __extends(FakeVScrollComp, _super);
53303 function FakeVScrollComp() {
53304 return _super.call(this, FakeVScrollComp.TEMPLATE, 'vertical') || this;
53305 }
53306 FakeVScrollComp.prototype.postConstruct = function () {
53307 _super.prototype.postConstruct.call(this);
53308 this.createManagedBean(new _rowContainer_setHeightFeature__WEBPACK_IMPORTED_MODULE_3__["SetHeightFeature"](this.eContainer));
53309 this.ctrlsService.registerFakeVScrollComp(this);
53310 };
53311 FakeVScrollComp.prototype.setScrollVisible = function () {
53312 var vScrollShowing = this.scrollVisibleService.isVerticalScrollShowing();
53313 var invisibleScrollbar = this.invisibleScrollbar;
53314 var scrollbarWidth = vScrollShowing ? (this.gridOptionsService.getScrollbarWidth() || 0) : 0;
53315 var adjustedScrollbarWidth = (scrollbarWidth === 0 && invisibleScrollbar) ? 16 : scrollbarWidth;
53316 this.addOrRemoveCssClass('ag-scrollbar-invisible', invisibleScrollbar);
53317 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedWidth"])(this.getGui(), adjustedScrollbarWidth);
53318 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedWidth"])(this.eViewport, adjustedScrollbarWidth);
53319 Object(_utils_dom__WEBPACK_IMPORTED_MODULE_2__["setFixedWidth"])(this.eContainer, adjustedScrollbarWidth);
53320 this.setDisplayed(vScrollShowing, { skipAriaHidden: true });
53321 };
53322 FakeVScrollComp.TEMPLATE = "<div class=\"ag-body-vertical-scroll\" aria-hidden=\"true\">\n <div class=\"ag-body-vertical-scroll-viewport\" ref=\"eViewport\">\n <div class=\"ag-body-vertical-scroll-container\" ref=\"eContainer\"></div>\n </div>\n </div>";
53323 __decorate([
53324 _context_context__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
53325 ], FakeVScrollComp.prototype, "postConstruct", null);
53326 return FakeVScrollComp;
53327}(_abstractFakeScrollComp__WEBPACK_IMPORTED_MODULE_1__["AbstractFakeScrollComp"]));
53328
53329
53330
53331/***/ }),
53332/* 245 */
53333/***/ (function(module, __webpack_exports__, __webpack_require__) {
53334
53335"use strict";
53336__webpack_require__.r(__webpack_exports__);
53337/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseComponentWrapper", function() { return BaseComponentWrapper; });
53338/**
53339 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
53340 * @version v29.2.0
53341 * @link https://www.ag-grid.com/
53342 * @license MIT
53343 */
53344var BaseComponentWrapper = /** @class */ (function () {
53345 function BaseComponentWrapper() {
53346 }
53347 BaseComponentWrapper.prototype.wrap = function (OriginalConstructor, mandatoryMethodList, optionalMethodList, componentType) {
53348 var _this = this;
53349 if (optionalMethodList === void 0) { optionalMethodList = []; }
53350 var wrapper = this.createWrapper(OriginalConstructor, componentType);
53351 mandatoryMethodList.forEach((function (methodName) {
53352 _this.createMethod(wrapper, methodName, true);
53353 }));
53354 optionalMethodList.forEach((function (methodName) {
53355 _this.createMethod(wrapper, methodName, false);
53356 }));
53357 return wrapper;
53358 };
53359 BaseComponentWrapper.prototype.unwrap = function (comp) {
53360 return comp;
53361 };
53362 BaseComponentWrapper.prototype.createMethod = function (wrapper, methodName, mandatory) {
53363 wrapper.addMethod(methodName, this.createMethodProxy(wrapper, methodName, mandatory));
53364 };
53365 BaseComponentWrapper.prototype.createMethodProxy = function (wrapper, methodName, mandatory) {
53366 return function () {
53367 if (wrapper.hasMethod(methodName)) {
53368 return wrapper.callMethod(methodName, arguments);
53369 }
53370 if (mandatory) {
53371 console.warn('AG Grid: Framework component is missing the method ' + methodName + '()');
53372 }
53373 return null;
53374 };
53375 };
53376 return BaseComponentWrapper;
53377}());
53378
53379
53380
53381/***/ }),
53382/* 246 */
53383/***/ (function(module, __webpack_exports__, __webpack_require__) {
53384
53385"use strict";
53386__webpack_require__.r(__webpack_exports__);
53387/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_CHART_GROUPS", function() { return DEFAULT_CHART_GROUPS; });
53388/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CHART_TOOL_PANEL_ALLOW_LIST", function() { return CHART_TOOL_PANEL_ALLOW_LIST; });
53389/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CHART_TOOLBAR_ALLOW_LIST", function() { return CHART_TOOLBAR_ALLOW_LIST; });
53390/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CHART_TOOL_PANEL_MENU_OPTIONS", function() { return CHART_TOOL_PANEL_MENU_OPTIONS; });
53391/**
53392 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
53393 * @version v29.2.0
53394 * @link https://www.ag-grid.com/
53395 * @license MIT
53396 */
53397var DEFAULT_CHART_GROUPS = {
53398 columnGroup: [
53399 'column',
53400 'stackedColumn',
53401 'normalizedColumn'
53402 ],
53403 barGroup: [
53404 'bar',
53405 'stackedBar',
53406 'normalizedBar'
53407 ],
53408 pieGroup: [
53409 'pie',
53410 'doughnut'
53411 ],
53412 lineGroup: [
53413 'line'
53414 ],
53415 scatterGroup: [
53416 'scatter',
53417 'bubble'
53418 ],
53419 areaGroup: [
53420 'area',
53421 'stackedArea',
53422 'normalizedArea'
53423 ],
53424 histogramGroup: [
53425 'histogram'
53426 ],
53427 combinationGroup: [
53428 'columnLineCombo',
53429 'areaColumnCombo',
53430 'customCombo'
53431 ]
53432};
53433var CHART_TOOL_PANEL_ALLOW_LIST = [
53434 'chartSettings',
53435 'chartData',
53436 'chartFormat'
53437];
53438var CHART_TOOLBAR_ALLOW_LIST = [
53439 'chartUnlink',
53440 'chartLink',
53441 'chartDownload'
53442];
53443var CHART_TOOL_PANEL_MENU_OPTIONS = {
53444 settings: "chartSettings",
53445 data: "chartData",
53446 format: "chartFormat"
53447};
53448
53449
53450/***/ }),
53451/* 247 */
53452/***/ (function(module, __webpack_exports__, __webpack_require__) {
53453
53454"use strict";
53455__webpack_require__.r(__webpack_exports__);
53456/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__FORCE_MODULE_DETECTION", function() { return __FORCE_MODULE_DETECTION; });
53457/**
53458 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
53459 * @version v29.2.0
53460 * @link https://www.ag-grid.com/
53461 * @license MIT
53462 */
53463/**
53464 * Internal Use Only: Used to ensure this file is treated as a module until we can use moduleDetection flag in Ts v4.7
53465 */
53466var __FORCE_MODULE_DETECTION = 0;
53467
53468
53469/***/ }),
53470/* 248 */
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 v29.2.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/* 249 */
53493/***/ (function(module, __webpack_exports__, __webpack_require__) {
53494
53495"use strict";
53496__webpack_require__.r(__webpack_exports__);
53497/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModel", function() { return ClientSideRowModel; });
53498/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
53499/* harmony import */ var _clientSideNodeManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(250);
53500var __extends = (undefined && undefined.__extends) || (function () {
53501 var extendStatics = function (d, b) {
53502 extendStatics = Object.setPrototypeOf ||
53503 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
53504 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
53505 return extendStatics(d, b);
53506 };
53507 return function (d, b) {
53508 extendStatics(d, b);
53509 function __() { this.constructor = d; }
53510 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
53511 };
53512})();
53513var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
53514 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
53515 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
53516 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;
53517 return c > 3 && r && Object.defineProperty(target, key, r), r;
53518};
53519var __read = (undefined && undefined.__read) || function (o, n) {
53520 var m = typeof Symbol === "function" && o[Symbol.iterator];
53521 if (!m) return o;
53522 var i = m.call(o), r, ar = [], e;
53523 try {
53524 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
53525 }
53526 catch (error) { e = { error: error }; }
53527 finally {
53528 try {
53529 if (r && !r.done && (m = i["return"])) m.call(i);
53530 }
53531 finally { if (e) throw e.error; }
53532 }
53533 return ar;
53534};
53535var __spread = (undefined && undefined.__spread) || function () {
53536 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
53537 return ar;
53538};
53539
53540
53541var RecursionType;
53542(function (RecursionType) {
53543 RecursionType[RecursionType["Normal"] = 0] = "Normal";
53544 RecursionType[RecursionType["AfterFilter"] = 1] = "AfterFilter";
53545 RecursionType[RecursionType["AfterFilterAndSort"] = 2] = "AfterFilterAndSort";
53546 RecursionType[RecursionType["PivotNodes"] = 3] = "PivotNodes";
53547})(RecursionType || (RecursionType = {}));
53548var ClientSideRowModel = /** @class */ (function (_super) {
53549 __extends(ClientSideRowModel, _super);
53550 function ClientSideRowModel() {
53551 var _this = _super !== null && _super.apply(this, arguments) || this;
53552 _this.onRowHeightChanged_debounced = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].debounce(_this.onRowHeightChanged.bind(_this), 100);
53553 _this.rowsToDisplay = []; // the rows mapped to rows to display
53554 return _this;
53555 }
53556 ClientSideRowModel.prototype.init = function () {
53557 var refreshEverythingFunc = this.refreshModel.bind(this, { step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING });
53558 var animate = !this.gridOptionsService.is('suppressAnimationFrame');
53559 var refreshEverythingAfterColsChangedFunc = this.refreshModel.bind(this, {
53560 step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING,
53561 afterColumnsChanged: true,
53562 keepRenderedRows: true,
53563 animate: animate
53564 });
53565 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_NEW_COLUMNS_LOADED, refreshEverythingAfterColsChangedFunc);
53566 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_ROW_GROUP_CHANGED, refreshEverythingFunc);
53567 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_VALUE_CHANGED, this.onValueChanged.bind(this));
53568 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 }));
53569 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));
53570 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SORT_CHANGED, this.onSortChanged.bind(this));
53571 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_COLUMN_PIVOT_MODE_CHANGED, refreshEverythingFunc);
53572 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_GRID_STYLES_CHANGED, this.resetRowHeights.bind(this));
53573 var refreshMapListener = this.refreshModel.bind(this, {
53574 step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].MAP,
53575 keepRenderedRows: true,
53576 animate: animate
53577 });
53578 this.addManagedPropertyListener('groupRemoveSingleChildren', refreshMapListener);
53579 this.addManagedPropertyListener('groupRemoveLowestSingleChildren', refreshMapListener);
53580 this.rootNode = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNode"](this.beans);
53581 this.nodeManager = new _clientSideNodeManager__WEBPACK_IMPORTED_MODULE_1__["ClientSideNodeManager"](this.rootNode, this.gridOptionsService, this.eventService, this.columnModel, this.selectionService, this.beans);
53582 };
53583 ClientSideRowModel.prototype.start = function () {
53584 var rowData = this.gridOptionsService.get('rowData');
53585 if (rowData) {
53586 this.setRowData(rowData);
53587 }
53588 };
53589 ClientSideRowModel.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) {
53590 var atLeastOneChange;
53591 var res = false;
53592 // we do this multiple times as changing the row heights can also change the first and last rows,
53593 // so the first pass can make lots of rows smaller, which means the second pass we end up changing
53594 // more rows.
53595 do {
53596 atLeastOneChange = false;
53597 var rowAtStartPixel = this.getRowIndexAtPixel(startPixel);
53598 var rowAtEndPixel = this.getRowIndexAtPixel(endPixel);
53599 // keep check to current page if doing pagination
53600 var firstRow = Math.max(rowAtStartPixel, startLimitIndex);
53601 var lastRow = Math.min(rowAtEndPixel, endLimitIndex);
53602 for (var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++) {
53603 var rowNode = this.getRow(rowIndex);
53604 if (rowNode.rowHeightEstimated) {
53605 var rowHeight = this.gridOptionsService.getRowHeightForNode(rowNode);
53606 rowNode.setRowHeight(rowHeight.height);
53607 atLeastOneChange = true;
53608 res = true;
53609 }
53610 }
53611 if (atLeastOneChange) {
53612 this.setRowTopAndRowIndex();
53613 }
53614 } while (atLeastOneChange);
53615 return res;
53616 };
53617 ClientSideRowModel.prototype.setRowTopAndRowIndex = function () {
53618 var defaultRowHeight = this.environment.getDefaultRowHeight();
53619 var nextRowTop = 0;
53620 // mapping displayed rows is not needed for this method, however it's used in
53621 // clearRowTopAndRowIndex(), and given we are looping through this.rowsToDisplay here,
53622 // we create the map here for performance reasons, so we don't loop a second time
53623 // in clearRowTopAndRowIndex()
53624 var displayedRowsMapped = new Set();
53625 // we don't estimate if doing fullHeight or autoHeight, as all rows get rendered all the time
53626 // with these two layouts.
53627 var allowEstimate = this.gridOptionsService.isDomLayout('normal');
53628 for (var i = 0; i < this.rowsToDisplay.length; i++) {
53629 var rowNode = this.rowsToDisplay[i];
53630 if (rowNode.id != null) {
53631 displayedRowsMapped.add(rowNode.id);
53632 }
53633 if (rowNode.rowHeight == null) {
53634 var rowHeight = this.gridOptionsService.getRowHeightForNode(rowNode, allowEstimate, defaultRowHeight);
53635 rowNode.setRowHeight(rowHeight.height, rowHeight.estimated);
53636 }
53637 rowNode.setRowTop(nextRowTop);
53638 rowNode.setRowIndex(i);
53639 nextRowTop += rowNode.rowHeight;
53640 }
53641 return displayedRowsMapped;
53642 };
53643 ClientSideRowModel.prototype.clearRowTopAndRowIndex = function (changedPath, displayedRowsMapped) {
53644 var changedPathActive = changedPath.isActive();
53645 var clearIfNotDisplayed = function (rowNode) {
53646 if (rowNode && rowNode.id != null && !displayedRowsMapped.has(rowNode.id)) {
53647 rowNode.clearRowTopAndRowIndex();
53648 }
53649 };
53650 var recurse = function (rowNode) {
53651 clearIfNotDisplayed(rowNode);
53652 clearIfNotDisplayed(rowNode.detailNode);
53653 clearIfNotDisplayed(rowNode.sibling);
53654 if (rowNode.hasChildren()) {
53655 if (rowNode.childrenAfterGroup) {
53656 // if a changedPath is active, it means we are here because of a transaction update or
53657 // a change detection. neither of these impacts the open/closed state of groups. so if
53658 // a group is not open this time, it was not open last time. so we know all closed groups
53659 // already have their top positions cleared. so there is no need to traverse all the way
53660 // when changedPath is active and the rowNode is not expanded.
53661 var isRootNode = rowNode.level == -1; // we need to give special consideration for root node,
53662 // as expanded=undefined for root node
53663 var skipChildren = changedPathActive && !isRootNode && !rowNode.expanded;
53664 if (!skipChildren) {
53665 rowNode.childrenAfterGroup.forEach(recurse);
53666 }
53667 }
53668 }
53669 };
53670 recurse(this.rootNode);
53671 };
53672 // returns false if row was moved, otherwise true
53673 ClientSideRowModel.prototype.ensureRowsAtPixel = function (rowNodes, pixel, increment) {
53674 var _this = this;
53675 if (increment === void 0) { increment = 0; }
53676 var indexAtPixelNow = this.getRowIndexAtPixel(pixel);
53677 var rowNodeAtPixelNow = this.getRow(indexAtPixelNow);
53678 var animate = !this.gridOptionsService.is('suppressAnimationFrame');
53679 if (rowNodeAtPixelNow === rowNodes[0]) {
53680 return false;
53681 }
53682 rowNodes.forEach(function (rowNode) {
53683 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].removeFromArray(_this.rootNode.allLeafChildren, rowNode);
53684 });
53685 rowNodes.forEach(function (rowNode, idx) {
53686 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].insertIntoArray(_this.rootNode.allLeafChildren, rowNode, Math.max(indexAtPixelNow + increment, 0) + idx);
53687 });
53688 this.refreshModel({
53689 step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING,
53690 keepRenderedRows: true,
53691 keepEditingRows: true,
53692 animate: animate
53693 });
53694 return true;
53695 };
53696 ClientSideRowModel.prototype.highlightRowAtPixel = function (rowNode, pixel) {
53697 var indexAtPixelNow = pixel != null ? this.getRowIndexAtPixel(pixel) : null;
53698 var rowNodeAtPixelNow = indexAtPixelNow != null ? this.getRow(indexAtPixelNow) : null;
53699 if (!rowNodeAtPixelNow || !rowNode || rowNodeAtPixelNow === rowNode || pixel == null) {
53700 if (this.lastHighlightedRow) {
53701 this.lastHighlightedRow.setHighlighted(null);
53702 this.lastHighlightedRow = null;
53703 }
53704 return;
53705 }
53706 var highlight = this.getHighlightPosition(pixel, rowNodeAtPixelNow);
53707 if (this.lastHighlightedRow && this.lastHighlightedRow !== rowNodeAtPixelNow) {
53708 this.lastHighlightedRow.setHighlighted(null);
53709 this.lastHighlightedRow = null;
53710 }
53711 rowNodeAtPixelNow.setHighlighted(highlight);
53712 this.lastHighlightedRow = rowNodeAtPixelNow;
53713 };
53714 ClientSideRowModel.prototype.getHighlightPosition = function (pixel, rowNode) {
53715 if (!rowNode) {
53716 var index = this.getRowIndexAtPixel(pixel);
53717 rowNode = this.getRow(index || 0);
53718 if (!rowNode) {
53719 return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowHighlightPosition"].Below;
53720 }
53721 }
53722 var rowTop = rowNode.rowTop, rowHeight = rowNode.rowHeight;
53723 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;
53724 };
53725 ClientSideRowModel.prototype.getLastHighlightedRowNode = function () {
53726 return this.lastHighlightedRow;
53727 };
53728 ClientSideRowModel.prototype.isLastRowIndexKnown = function () {
53729 return true;
53730 };
53731 ClientSideRowModel.prototype.getRowCount = function () {
53732 if (this.rowsToDisplay) {
53733 return this.rowsToDisplay.length;
53734 }
53735 return 0;
53736 };
53737 ClientSideRowModel.prototype.getTopLevelRowCount = function () {
53738 var showingRootNode = this.rowsToDisplay && this.rowsToDisplay[0] === this.rootNode;
53739 if (showingRootNode) {
53740 return 1;
53741 }
53742 var filteredChildren = this.rootNode.childrenAfterAggFilter;
53743 return filteredChildren ? filteredChildren.length : 0;
53744 };
53745 ClientSideRowModel.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {
53746 var showingRootNode = this.rowsToDisplay && this.rowsToDisplay[0] === this.rootNode;
53747 if (showingRootNode) {
53748 return topLevelIndex;
53749 }
53750 var rowNode = this.rootNode.childrenAfterSort[topLevelIndex];
53751 if (this.gridOptionsService.is('groupHideOpenParents')) {
53752 // if hideOpenParents, and this row open, then this row is now displayed at this index, first child is
53753 while (rowNode.expanded && rowNode.childrenAfterSort && rowNode.childrenAfterSort.length > 0) {
53754 rowNode = rowNode.childrenAfterSort[0];
53755 }
53756 }
53757 return rowNode.rowIndex;
53758 };
53759 ClientSideRowModel.prototype.getRowBounds = function (index) {
53760 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(this.rowsToDisplay)) {
53761 return null;
53762 }
53763 var rowNode = this.rowsToDisplay[index];
53764 if (rowNode) {
53765 return {
53766 rowTop: rowNode.rowTop,
53767 rowHeight: rowNode.rowHeight
53768 };
53769 }
53770 return null;
53771 };
53772 ClientSideRowModel.prototype.onRowGroupOpened = function () {
53773 var animate = this.gridOptionsService.isAnimateRows();
53774 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].MAP, keepRenderedRows: true, animate: animate });
53775 };
53776 ClientSideRowModel.prototype.onFilterChanged = function (event) {
53777 if (event.afterDataChange) {
53778 return;
53779 }
53780 var animate = this.gridOptionsService.isAnimateRows();
53781 var primaryOrQuickFilterChanged = event.columns.length === 0 || event.columns.some(function (col) { return col.isPrimary(); });
53782 var step = primaryOrQuickFilterChanged ? _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].FILTER : _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].FILTER_AGGREGATES;
53783 this.refreshModel({ step: step, keepRenderedRows: true, animate: animate });
53784 };
53785 ClientSideRowModel.prototype.onSortChanged = function () {
53786 var animate = this.gridOptionsService.isAnimateRows();
53787 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].SORT, keepRenderedRows: true, animate: animate, keepEditingRows: true });
53788 };
53789 ClientSideRowModel.prototype.getType = function () {
53790 return 'clientSide';
53791 };
53792 ClientSideRowModel.prototype.onValueChanged = function () {
53793 if (this.columnModel.isPivotActive()) {
53794 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].PIVOT });
53795 }
53796 else {
53797 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].AGGREGATE });
53798 }
53799 };
53800 ClientSideRowModel.prototype.createChangePath = function (rowNodeTransactions) {
53801 // for updates, if the row is updated at all, then we re-calc all the values
53802 // in that row. we could compare each value to each old value, however if we
53803 // did this, we would be calling the valueService twice, once on the old value
53804 // and once on the new value. so it's less valueGetter calls if we just assume
53805 // each column is different. that way the changedPath is used so that only
53806 // the impacted parent rows are recalculated, parents who's children have
53807 // not changed are not impacted.
53808 var noTransactions = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missingOrEmpty(rowNodeTransactions);
53809 var changedPath = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ChangedPath"](false, this.rootNode);
53810 if (noTransactions || this.gridOptionsService.isTreeData()) {
53811 changedPath.setInactive();
53812 }
53813 return changedPath;
53814 };
53815 ClientSideRowModel.prototype.isSuppressModelUpdateAfterUpdateTransaction = function (params) {
53816 if (!this.gridOptionsService.is('suppressModelUpdateAfterUpdateTransaction')) {
53817 return false;
53818 }
53819 // return true if we are only doing update transactions
53820 if (params.rowNodeTransactions == null) {
53821 return false;
53822 }
53823 var transWithAddsOrDeletes = params.rowNodeTransactions.filter(function (tx) {
53824 return (tx.add != null && tx.add.length > 0) || (tx.remove != null && tx.remove.length > 0);
53825 });
53826 var transactionsContainUpdatesOnly = transWithAddsOrDeletes == null || transWithAddsOrDeletes.length == 0;
53827 return transactionsContainUpdatesOnly;
53828 };
53829 ClientSideRowModel.prototype.buildRefreshModelParams = function (step) {
53830 var paramsStep = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING;
53831 var stepsMapped = {
53832 everything: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING,
53833 group: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING,
53834 filter: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].FILTER,
53835 map: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].MAP,
53836 aggregate: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].AGGREGATE,
53837 sort: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].SORT,
53838 pivot: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].PIVOT
53839 };
53840 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(step)) {
53841 paramsStep = stepsMapped[step];
53842 }
53843 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(paramsStep)) {
53844 console.error("AG Grid: invalid step " + step + ", available steps are " + Object.keys(stepsMapped).join(', '));
53845 return undefined;
53846 }
53847 var animate = !this.gridOptionsService.is('suppressAnimationFrame');
53848 var modelParams = {
53849 step: paramsStep,
53850 keepRenderedRows: true,
53851 keepEditingRows: true,
53852 animate: animate
53853 };
53854 return modelParams;
53855 };
53856 ClientSideRowModel.prototype.refreshModel = function (paramsOrStep) {
53857 var params = typeof paramsOrStep === 'object' && "step" in paramsOrStep ? paramsOrStep : this.buildRefreshModelParams(paramsOrStep);
53858 if (!params) {
53859 return;
53860 }
53861 if (this.isSuppressModelUpdateAfterUpdateTransaction(params)) {
53862 return;
53863 }
53864 // this goes through the pipeline of stages. what's in my head is similar
53865 // to the diagram on this page:
53866 // http://commons.apache.org/sandbox/commons-pipeline/pipeline_basics.html
53867 // however we want to keep the results of each stage, hence we manually call
53868 // each step rather than have them chain each other.
53869 // fallthrough in below switch is on purpose,
53870 // eg if STEP_FILTER, then all steps below this
53871 // step get done
53872 // let start: number;
53873 // console.log('======= start =======');
53874 var changedPath = this.createChangePath(params.rowNodeTransactions);
53875 switch (params.step) {
53876 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING:
53877 this.doRowGrouping(params.groupState, params.rowNodeTransactions, params.rowNodeOrder, changedPath, !!params.afterColumnsChanged);
53878 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].FILTER:
53879 this.doFilter(changedPath);
53880 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].PIVOT:
53881 this.doPivot(changedPath);
53882 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].AGGREGATE: // depends on agg fields
53883 this.doAggregate(changedPath);
53884 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].FILTER_AGGREGATES:
53885 this.doFilterAggregates(changedPath);
53886 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].SORT:
53887 this.doSort(params.rowNodeTransactions, changedPath);
53888 case _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].MAP:
53889 this.doRowsToDisplay();
53890 }
53891 // set all row tops to null, then set row tops on all visible rows. if we don't
53892 // do this, then the algorithm below only sets row tops, old row tops from old rows
53893 // will still lie around
53894 var displayedNodesMapped = this.setRowTopAndRowIndex();
53895 this.clearRowTopAndRowIndex(changedPath, displayedNodesMapped);
53896 var event = {
53897 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_MODEL_UPDATED,
53898 animate: params.animate,
53899 keepRenderedRows: params.keepRenderedRows,
53900 newData: params.newData,
53901 newPage: false,
53902 keepUndoRedoStack: params.keepUndoRedoStack
53903 };
53904 this.eventService.dispatchEvent(event);
53905 };
53906 ClientSideRowModel.prototype.isEmpty = function () {
53907 var rowsMissing = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(this.rootNode.allLeafChildren) || this.rootNode.allLeafChildren.length === 0;
53908 return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(this.rootNode) || rowsMissing || !this.columnModel.isReady();
53909 };
53910 ClientSideRowModel.prototype.isRowsToRender = function () {
53911 return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(this.rowsToDisplay) && this.rowsToDisplay.length > 0;
53912 };
53913 ClientSideRowModel.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {
53914 // if lastSelectedNode is missing, we start at the first row
53915 var firstRowHit = !lastInRange;
53916 var lastRowHit = false;
53917 var lastRow;
53918 var result = [];
53919 var groupsSelectChildren = this.gridOptionsService.is('groupSelectsChildren');
53920 this.forEachNodeAfterFilterAndSort(function (rowNode) {
53921 var lookingForLastRow = firstRowHit && !lastRowHit;
53922 // check if we need to flip the select switch
53923 if (!firstRowHit) {
53924 if (rowNode === lastInRange || rowNode === firstInRange) {
53925 firstRowHit = true;
53926 }
53927 }
53928 var skipThisGroupNode = rowNode.group && groupsSelectChildren;
53929 if (!skipThisGroupNode) {
53930 var inRange = firstRowHit && !lastRowHit;
53931 var childOfLastRow = rowNode.isParentOfNode(lastRow);
53932 if (inRange || childOfLastRow) {
53933 result.push(rowNode);
53934 }
53935 }
53936 if (lookingForLastRow) {
53937 if (rowNode === lastInRange || rowNode === firstInRange) {
53938 lastRowHit = true;
53939 if (rowNode === lastInRange) {
53940 lastRow = lastInRange;
53941 }
53942 else {
53943 lastRow = firstInRange;
53944 }
53945 }
53946 }
53947 });
53948 return result;
53949 };
53950 ClientSideRowModel.prototype.setDatasource = function (datasource) {
53951 console.error('AG Grid: should never call setDatasource on clientSideRowController');
53952 };
53953 ClientSideRowModel.prototype.getTopLevelNodes = function () {
53954 return this.rootNode ? this.rootNode.childrenAfterGroup : null;
53955 };
53956 ClientSideRowModel.prototype.getRootNode = function () {
53957 return this.rootNode;
53958 };
53959 ClientSideRowModel.prototype.getRow = function (index) {
53960 return this.rowsToDisplay[index];
53961 };
53962 ClientSideRowModel.prototype.isRowPresent = function (rowNode) {
53963 return this.rowsToDisplay.indexOf(rowNode) >= 0;
53964 };
53965 ClientSideRowModel.prototype.getRowIndexAtPixel = function (pixelToMatch) {
53966 if (this.isEmpty() || this.rowsToDisplay.length === 0) {
53967 return -1;
53968 }
53969 // do binary search of tree
53970 // http://oli.me.uk/2013/06/08/searching-javascript-arrays-with-a-binary-search/
53971 var bottomPointer = 0;
53972 var topPointer = this.rowsToDisplay.length - 1;
53973 // quick check, if the pixel is out of bounds, then return last row
53974 if (pixelToMatch <= 0) {
53975 // if pixel is less than or equal zero, it's always the first row
53976 return 0;
53977 }
53978 var lastNode = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].last(this.rowsToDisplay);
53979 if (lastNode.rowTop <= pixelToMatch) {
53980 return this.rowsToDisplay.length - 1;
53981 }
53982 var oldBottomPointer = -1;
53983 var oldTopPointer = -1;
53984 while (true) {
53985 var midPointer = Math.floor((bottomPointer + topPointer) / 2);
53986 var currentRowNode = this.rowsToDisplay[midPointer];
53987 if (this.isRowInPixel(currentRowNode, pixelToMatch)) {
53988 return midPointer;
53989 }
53990 if (currentRowNode.rowTop < pixelToMatch) {
53991 bottomPointer = midPointer + 1;
53992 }
53993 else if (currentRowNode.rowTop > pixelToMatch) {
53994 topPointer = midPointer - 1;
53995 }
53996 // infinite loops happen when there is space between rows. this can happen
53997 // when Auto Height is active, cos we re-calculate row tops asyncronously
53998 // when row heights change, which can temporarly result in gaps between rows.
53999 var caughtInInfiniteLoop = oldBottomPointer === bottomPointer
54000 && oldTopPointer === topPointer;
54001 if (caughtInInfiniteLoop) {
54002 return midPointer;
54003 }
54004 oldBottomPointer = bottomPointer;
54005 oldTopPointer = topPointer;
54006 }
54007 };
54008 ClientSideRowModel.prototype.isRowInPixel = function (rowNode, pixelToMatch) {
54009 var topPixel = rowNode.rowTop;
54010 var bottomPixel = rowNode.rowTop + rowNode.rowHeight;
54011 var pixelInRow = topPixel <= pixelToMatch && bottomPixel > pixelToMatch;
54012 return pixelInRow;
54013 };
54014 ClientSideRowModel.prototype.forEachLeafNode = function (callback) {
54015 if (this.rootNode.allLeafChildren) {
54016 this.rootNode.allLeafChildren.forEach(function (rowNode, index) { return callback(rowNode, index); });
54017 }
54018 };
54019 ClientSideRowModel.prototype.forEachNode = function (callback, includeFooterNodes) {
54020 if (includeFooterNodes === void 0) { includeFooterNodes = false; }
54021 this.recursivelyWalkNodesAndCallback({
54022 nodes: __spread((this.rootNode.childrenAfterGroup || [])),
54023 callback: callback,
54024 recursionType: RecursionType.Normal,
54025 index: 0,
54026 includeFooterNodes: includeFooterNodes
54027 });
54028 };
54029 ClientSideRowModel.prototype.forEachNodeAfterFilter = function (callback, includeFooterNodes) {
54030 if (includeFooterNodes === void 0) { includeFooterNodes = false; }
54031 this.recursivelyWalkNodesAndCallback({
54032 nodes: __spread((this.rootNode.childrenAfterAggFilter || [])),
54033 callback: callback,
54034 recursionType: RecursionType.AfterFilter,
54035 index: 0,
54036 includeFooterNodes: includeFooterNodes
54037 });
54038 };
54039 ClientSideRowModel.prototype.forEachNodeAfterFilterAndSort = function (callback, includeFooterNodes) {
54040 if (includeFooterNodes === void 0) { includeFooterNodes = false; }
54041 this.recursivelyWalkNodesAndCallback({
54042 nodes: __spread((this.rootNode.childrenAfterSort || [])),
54043 callback: callback,
54044 recursionType: RecursionType.AfterFilterAndSort,
54045 index: 0,
54046 includeFooterNodes: includeFooterNodes
54047 });
54048 };
54049 ClientSideRowModel.prototype.forEachPivotNode = function (callback, includeFooterNodes) {
54050 if (includeFooterNodes === void 0) { includeFooterNodes = false; }
54051 this.recursivelyWalkNodesAndCallback({
54052 nodes: [this.rootNode],
54053 callback: callback,
54054 recursionType: RecursionType.PivotNodes,
54055 index: 0,
54056 includeFooterNodes: includeFooterNodes
54057 });
54058 };
54059 // iterates through each item in memory, and calls the callback function
54060 // nodes - the rowNodes to traverse
54061 // callback - the user provided callback
54062 // recursion type - need this to know what child nodes to recurse, eg if looking at all nodes, or filtered notes etc
54063 // index - works similar to the index in forEach in javascript's array function
54064 ClientSideRowModel.prototype.recursivelyWalkNodesAndCallback = function (params) {
54065 var _a;
54066 var nodes = params.nodes, callback = params.callback, recursionType = params.recursionType, includeFooterNodes = params.includeFooterNodes;
54067 var index = params.index;
54068 var firstNode = nodes[0];
54069 if (includeFooterNodes && ((_a = firstNode === null || firstNode === void 0 ? void 0 : firstNode.parent) === null || _a === void 0 ? void 0 : _a.sibling)) {
54070 nodes.push(firstNode.parent.sibling);
54071 }
54072 for (var i = 0; i < nodes.length; i++) {
54073 var node = nodes[i];
54074 callback(node, index++);
54075 // go to the next level if it is a group
54076 if (node.hasChildren() && !node.footer) {
54077 // depending on the recursion type, we pick a difference set of children
54078 var nodeChildren = null;
54079 switch (recursionType) {
54080 case RecursionType.Normal:
54081 nodeChildren = node.childrenAfterGroup;
54082 break;
54083 case RecursionType.AfterFilter:
54084 nodeChildren = node.childrenAfterAggFilter;
54085 break;
54086 case RecursionType.AfterFilterAndSort:
54087 nodeChildren = node.childrenAfterSort;
54088 break;
54089 case RecursionType.PivotNodes:
54090 // for pivot, we don't go below leafGroup levels
54091 nodeChildren = !node.leafGroup ? node.childrenAfterSort : null;
54092 break;
54093 }
54094 if (nodeChildren) {
54095 index = this.recursivelyWalkNodesAndCallback({
54096 nodes: __spread(nodeChildren),
54097 callback: callback,
54098 recursionType: recursionType,
54099 index: index,
54100 includeFooterNodes: includeFooterNodes
54101 });
54102 }
54103 }
54104 }
54105 return index;
54106 };
54107 // it's possible to recompute the aggregate without doing the other parts
54108 // + api.refreshClientSideRowModel('aggregate')
54109 ClientSideRowModel.prototype.doAggregate = function (changedPath) {
54110 if (this.aggregationStage) {
54111 this.aggregationStage.execute({ rowNode: this.rootNode, changedPath: changedPath });
54112 }
54113 };
54114 ClientSideRowModel.prototype.doFilterAggregates = function (changedPath) {
54115 if (this.filterAggregatesStage) {
54116 this.filterAggregatesStage.execute({ rowNode: this.rootNode, changedPath: changedPath });
54117 }
54118 else {
54119 // If filterAggregatesStage is undefined, then so is the grouping stage, so all children should be on the rootNode.
54120 this.rootNode.childrenAfterAggFilter = this.rootNode.childrenAfterFilter;
54121 }
54122 };
54123 // + gridApi.expandAll()
54124 // + gridApi.collapseAll()
54125 ClientSideRowModel.prototype.expandOrCollapseAll = function (expand) {
54126 var usingTreeData = this.gridOptionsService.isTreeData();
54127 var usingPivotMode = this.columnModel.isPivotActive();
54128 var recursiveExpandOrCollapse = function (rowNodes) {
54129 if (!rowNodes) {
54130 return;
54131 }
54132 rowNodes.forEach(function (rowNode) {
54133 var actionRow = function () {
54134 rowNode.expanded = expand;
54135 recursiveExpandOrCollapse(rowNode.childrenAfterGroup);
54136 };
54137 if (usingTreeData) {
54138 var hasChildren = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(rowNode.childrenAfterGroup);
54139 if (hasChildren) {
54140 actionRow();
54141 }
54142 return;
54143 }
54144 if (usingPivotMode) {
54145 var notLeafGroup = !rowNode.leafGroup;
54146 if (notLeafGroup) {
54147 actionRow();
54148 }
54149 return;
54150 }
54151 var isRowGroup = rowNode.group;
54152 if (isRowGroup) {
54153 actionRow();
54154 }
54155 });
54156 };
54157 if (this.rootNode) {
54158 recursiveExpandOrCollapse(this.rootNode.childrenAfterGroup);
54159 }
54160 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].MAP });
54161 var eventSource = expand ? 'expandAll' : 'collapseAll';
54162 var event = {
54163 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_EXPAND_COLLAPSE_ALL,
54164 source: eventSource
54165 };
54166 this.eventService.dispatchEvent(event);
54167 };
54168 ClientSideRowModel.prototype.doSort = function (rowNodeTransactions, changedPath) {
54169 this.sortStage.execute({
54170 rowNode: this.rootNode,
54171 rowNodeTransactions: rowNodeTransactions,
54172 changedPath: changedPath
54173 });
54174 };
54175 ClientSideRowModel.prototype.doRowGrouping = function (groupState, rowNodeTransactions, rowNodeOrder, changedPath, afterColumnsChanged) {
54176 if (this.groupStage) {
54177 if (rowNodeTransactions) {
54178 this.groupStage.execute({
54179 rowNode: this.rootNode,
54180 rowNodeTransactions: rowNodeTransactions,
54181 rowNodeOrder: rowNodeOrder,
54182 changedPath: changedPath
54183 });
54184 }
54185 else {
54186 this.groupStage.execute({
54187 rowNode: this.rootNode,
54188 changedPath: changedPath,
54189 afterColumnsChanged: afterColumnsChanged
54190 });
54191 // set open/closed state on groups
54192 this.restoreGroupState(groupState);
54193 }
54194 if (this.gridOptionsService.is('groupSelectsChildren')) {
54195 var selectionChanged = this.selectionService.updateGroupsFromChildrenSelections('rowGroupChanged', changedPath);
54196 if (selectionChanged) {
54197 var event_1 = {
54198 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SELECTION_CHANGED,
54199 source: 'rowGroupChanged'
54200 };
54201 this.eventService.dispatchEvent(event_1);
54202 }
54203 }
54204 }
54205 else {
54206 this.rootNode.childrenAfterGroup = this.rootNode.allLeafChildren;
54207 if (this.rootNode.sibling) {
54208 this.rootNode.sibling.childrenAfterGroup = this.rootNode.childrenAfterGroup;
54209 }
54210 this.rootNode.updateHasChildren();
54211 }
54212 };
54213 ClientSideRowModel.prototype.restoreGroupState = function (groupState) {
54214 if (!groupState) {
54215 return;
54216 }
54217 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].traverseNodesWithKey(this.rootNode.childrenAfterGroup, function (node, key) {
54218 // if the group was open last time, then open it this time. however
54219 // if was not open last time, then don't touch the group, so the 'groupDefaultExpanded'
54220 // setting will take effect.
54221 if (typeof groupState[key] === 'boolean') {
54222 node.expanded = groupState[key];
54223 }
54224 });
54225 };
54226 ClientSideRowModel.prototype.doFilter = function (changedPath) {
54227 this.filterStage.execute({ rowNode: this.rootNode, changedPath: changedPath });
54228 };
54229 ClientSideRowModel.prototype.doPivot = function (changedPath) {
54230 if (this.pivotStage) {
54231 this.pivotStage.execute({ rowNode: this.rootNode, changedPath: changedPath });
54232 }
54233 };
54234 ClientSideRowModel.prototype.getGroupState = function () {
54235 if (!this.rootNode.childrenAfterGroup || !this.gridOptionsService.is('rememberGroupStateWhenNewData')) {
54236 return null;
54237 }
54238 var result = {};
54239 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].traverseNodesWithKey(this.rootNode.childrenAfterGroup, function (node, key) { return result[key] = node.expanded; });
54240 return result;
54241 };
54242 ClientSideRowModel.prototype.getCopyOfNodesMap = function () {
54243 return this.nodeManager.getCopyOfNodesMap();
54244 };
54245 ClientSideRowModel.prototype.getRowNode = function (id) {
54246 // although id is typed a string, this could be called by the user, and they could have passed a number
54247 var idIsGroup = typeof id == 'string' && id.indexOf(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNode"].ID_PREFIX_ROW_GROUP) == 0;
54248 if (idIsGroup) {
54249 // only one users complained about getRowNode not working for groups, after years of
54250 // this working for normal rows. so have done quick implementation. if users complain
54251 // about performance, then GroupStage should store / manage created groups in a map,
54252 // which is a chunk of work.
54253 var res_1 = undefined;
54254 this.forEachNode(function (node) {
54255 if (node.id === id) {
54256 res_1 = node;
54257 }
54258 });
54259 return res_1;
54260 }
54261 return this.nodeManager.getRowNode(id);
54262 };
54263 // rows: the rows to put into the model
54264 ClientSideRowModel.prototype.setRowData = function (rowData) {
54265 // no need to invalidate cache, as the cache is stored on the rowNode,
54266 // so new rowNodes means the cache is wiped anyway.
54267 // remember group state, so we can expand groups that should be expanded
54268 var groupState = this.getGroupState();
54269 this.nodeManager.setRowData(rowData);
54270 // - clears selection
54271 this.selectionService.reset();
54272 // - updates filters
54273 this.filterManager.onNewRowsLoaded('rowDataUpdated');
54274 // this event kicks off:
54275 // - shows 'no rows' overlay if needed
54276 var rowDataUpdatedEvent = {
54277 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_ROW_DATA_UPDATED
54278 };
54279 this.eventService.dispatchEvent(rowDataUpdatedEvent);
54280 this.refreshModel({
54281 step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING,
54282 groupState: groupState,
54283 newData: true
54284 });
54285 };
54286 ClientSideRowModel.prototype.batchUpdateRowData = function (rowDataTransaction, callback) {
54287 var _this = this;
54288 if (this.applyAsyncTransactionsTimeout == null) {
54289 this.rowDataTransactionBatch = [];
54290 var waitMillis = this.gridOptionsService.getAsyncTransactionWaitMillis();
54291 this.applyAsyncTransactionsTimeout = window.setTimeout(function () {
54292 _this.executeBatchUpdateRowData();
54293 }, waitMillis);
54294 }
54295 this.rowDataTransactionBatch.push({ rowDataTransaction: rowDataTransaction, callback: callback });
54296 };
54297 ClientSideRowModel.prototype.flushAsyncTransactions = function () {
54298 if (this.applyAsyncTransactionsTimeout != null) {
54299 clearTimeout(this.applyAsyncTransactionsTimeout);
54300 this.executeBatchUpdateRowData();
54301 }
54302 };
54303 ClientSideRowModel.prototype.executeBatchUpdateRowData = function () {
54304 var _this = this;
54305 this.valueCache.onDataChanged();
54306 var callbackFuncsBound = [];
54307 var rowNodeTrans = [];
54308 // The rowGroup stage uses rowNodeOrder if order was provided. if we didn't pass 'true' to
54309 // commonUpdateRowData, using addIndex would have no effect when grouping.
54310 var forceRowNodeOrder = false;
54311 if (this.rowDataTransactionBatch) {
54312 this.rowDataTransactionBatch.forEach(function (tranItem) {
54313 var rowNodeTran = _this.nodeManager.updateRowData(tranItem.rowDataTransaction, undefined);
54314 rowNodeTrans.push(rowNodeTran);
54315 if (tranItem.callback) {
54316 callbackFuncsBound.push(tranItem.callback.bind(null, rowNodeTran));
54317 }
54318 if (typeof tranItem.rowDataTransaction.addIndex === 'number') {
54319 forceRowNodeOrder = true;
54320 }
54321 });
54322 }
54323 this.commonUpdateRowData(rowNodeTrans, undefined, forceRowNodeOrder);
54324 // do callbacks in next VM turn so it's async
54325 if (callbackFuncsBound.length > 0) {
54326 window.setTimeout(function () {
54327 callbackFuncsBound.forEach(function (func) { return func(); });
54328 }, 0);
54329 }
54330 if (rowNodeTrans.length > 0) {
54331 var event_2 = {
54332 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_ASYNC_TRANSACTIONS_FLUSHED,
54333 results: rowNodeTrans
54334 };
54335 this.eventService.dispatchEvent(event_2);
54336 }
54337 this.rowDataTransactionBatch = null;
54338 this.applyAsyncTransactionsTimeout = undefined;
54339 };
54340 ClientSideRowModel.prototype.updateRowData = function (rowDataTran, rowNodeOrder) {
54341 this.valueCache.onDataChanged();
54342 var rowNodeTran = this.nodeManager.updateRowData(rowDataTran, rowNodeOrder);
54343 // if doing immutableData, addIndex is never present. however if doing standard transaction, and user
54344 // provided addIndex, then this is used in updateRowData. However if doing Enterprise, then the rowGroup
54345 // stage also uses the
54346 var forceRowNodeOrder = typeof rowDataTran.addIndex === 'number';
54347 this.commonUpdateRowData([rowNodeTran], rowNodeOrder, forceRowNodeOrder);
54348 return rowNodeTran;
54349 };
54350 ClientSideRowModel.prototype.createRowNodeOrder = function () {
54351 var suppressSortOrder = this.gridOptionsService.is('suppressMaintainUnsortedOrder');
54352 if (suppressSortOrder) {
54353 return;
54354 }
54355 var orderMap = {};
54356 if (this.rootNode && this.rootNode.allLeafChildren) {
54357 for (var index = 0; index < this.rootNode.allLeafChildren.length; index++) {
54358 var node = this.rootNode.allLeafChildren[index];
54359 orderMap[node.id] = index;
54360 }
54361 }
54362 return orderMap;
54363 };
54364 // common to updateRowData and batchUpdateRowData
54365 ClientSideRowModel.prototype.commonUpdateRowData = function (rowNodeTrans, rowNodeOrder, forceRowNodeOrder) {
54366 var animate = !this.gridOptionsService.is('suppressAnimationFrame');
54367 if (forceRowNodeOrder) {
54368 rowNodeOrder = this.createRowNodeOrder();
54369 }
54370 this.refreshModel({
54371 step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].EVERYTHING,
54372 rowNodeTransactions: rowNodeTrans,
54373 rowNodeOrder: rowNodeOrder,
54374 keepRenderedRows: true,
54375 keepEditingRows: true,
54376 animate: animate
54377 });
54378 // - updates filters
54379 this.filterManager.onNewRowsLoaded('rowDataUpdated');
54380 var event = {
54381 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_ROW_DATA_UPDATED
54382 };
54383 this.eventService.dispatchEvent(event);
54384 };
54385 ClientSideRowModel.prototype.doRowsToDisplay = function () {
54386 this.rowsToDisplay = this.flattenStage.execute({ rowNode: this.rootNode });
54387 };
54388 ClientSideRowModel.prototype.onRowHeightChanged = function () {
54389 this.refreshModel({ step: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelSteps"].MAP, keepRenderedRows: true, keepEditingRows: true, keepUndoRedoStack: true });
54390 };
54391 /** This method is debounced. It is used for row auto-height. If we don't debounce,
54392 * then the Row Models will end up recalculating each row position
54393 * for each row height change and result in the Row Renderer laying out rows.
54394 * This is particularly bad if using print layout, and showing eg 1,000 rows,
54395 * each row will change it's height, causing Row Model to update 1,000 times.
54396 */
54397 ClientSideRowModel.prototype.onRowHeightChangedDebounced = function () {
54398 this.onRowHeightChanged_debounced();
54399 };
54400 ClientSideRowModel.prototype.resetRowHeights = function () {
54401 var atLeastOne = false;
54402 this.forEachNode(function (rowNode) {
54403 rowNode.setRowHeight(rowNode.rowHeight, true);
54404 // we keep the height each row is at, however we set estimated=true rather than clear the height.
54405 // this means the grid will not reset the row heights back to defaults, rather it will re-calc
54406 // the height for each row as the row is displayed. otherwise the scroll will jump when heights are reset.
54407 var detailNode = rowNode.detailNode;
54408 if (detailNode) {
54409 detailNode.setRowHeight(detailNode.rowHeight, true);
54410 }
54411 atLeastOne = true;
54412 });
54413 // when pivotMode but pivot not active, root node is displayed on its own
54414 // because it's only ever displayed alone, refreshing the model (onRowHeightChanged) is not required
54415 this.rootNode.setRowHeight(this.rootNode.rowHeight, true);
54416 if (atLeastOne) {
54417 this.onRowHeightChanged();
54418 }
54419 };
54420 __decorate([
54421 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
54422 ], ClientSideRowModel.prototype, "columnModel", void 0);
54423 __decorate([
54424 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('selectionService')
54425 ], ClientSideRowModel.prototype, "selectionService", void 0);
54426 __decorate([
54427 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
54428 ], ClientSideRowModel.prototype, "filterManager", void 0);
54429 __decorate([
54430 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueCache')
54431 ], ClientSideRowModel.prototype, "valueCache", void 0);
54432 __decorate([
54433 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('beans')
54434 ], ClientSideRowModel.prototype, "beans", void 0);
54435 __decorate([
54436 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterStage')
54437 ], ClientSideRowModel.prototype, "filterStage", void 0);
54438 __decorate([
54439 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortStage')
54440 ], ClientSideRowModel.prototype, "sortStage", void 0);
54441 __decorate([
54442 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('flattenStage')
54443 ], ClientSideRowModel.prototype, "flattenStage", void 0);
54444 __decorate([
54445 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])('groupStage')
54446 ], ClientSideRowModel.prototype, "groupStage", void 0);
54447 __decorate([
54448 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])('aggregationStage')
54449 ], ClientSideRowModel.prototype, "aggregationStage", void 0);
54450 __decorate([
54451 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])('pivotStage')
54452 ], ClientSideRowModel.prototype, "pivotStage", void 0);
54453 __decorate([
54454 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])('filterAggregatesStage')
54455 ], ClientSideRowModel.prototype, "filterAggregatesStage", void 0);
54456 __decorate([
54457 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
54458 ], ClientSideRowModel.prototype, "init", null);
54459 ClientSideRowModel = __decorate([
54460 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('rowModel')
54461 ], ClientSideRowModel);
54462 return ClientSideRowModel;
54463}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
54464
54465
54466
54467/***/ }),
54468/* 250 */
54469/***/ (function(module, __webpack_exports__, __webpack_require__) {
54470
54471"use strict";
54472__webpack_require__.r(__webpack_exports__);
54473/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientSideNodeManager", function() { return ClientSideNodeManager; });
54474/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
54475var __read = (undefined && undefined.__read) || function (o, n) {
54476 var m = typeof Symbol === "function" && o[Symbol.iterator];
54477 if (!m) return o;
54478 var i = m.call(o), r, ar = [], e;
54479 try {
54480 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
54481 }
54482 catch (error) { e = { error: error }; }
54483 finally {
54484 try {
54485 if (r && !r.done && (m = i["return"])) m.call(i);
54486 }
54487 finally { if (e) throw e.error; }
54488 }
54489 return ar;
54490};
54491var __spread = (undefined && undefined.__spread) || function () {
54492 for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
54493 return ar;
54494};
54495
54496var ClientSideNodeManager = /** @class */ (function () {
54497 function ClientSideNodeManager(rootNode, gridOptionsService, eventService, columnModel, selectionService, beans) {
54498 this.nextId = 0;
54499 // when user is provide the id's, we also keep a map of ids to row nodes for convenience
54500 this.allNodesMap = {};
54501 this.rootNode = rootNode;
54502 this.gridOptionsService = gridOptionsService;
54503 this.eventService = eventService;
54504 this.columnModel = columnModel;
54505 this.beans = beans;
54506 this.selectionService = selectionService;
54507 this.rootNode.group = true;
54508 this.rootNode.level = -1;
54509 this.rootNode.id = ClientSideNodeManager.ROOT_NODE_ID;
54510 this.rootNode.allLeafChildren = [];
54511 this.rootNode.childrenAfterGroup = [];
54512 this.rootNode.childrenAfterSort = [];
54513 this.rootNode.childrenAfterAggFilter = [];
54514 this.rootNode.childrenAfterFilter = [];
54515 // if we make this class a bean, then can annotate postConstruct
54516 this.postConstruct();
54517 }
54518 // @PostConstruct - this is not a bean, so postConstruct called by constructor
54519 ClientSideNodeManager.prototype.postConstruct = function () {
54520 // func below doesn't have 'this' pointer, so need to pull out these bits
54521 this.suppressParentsInRowNodes = this.gridOptionsService.is('suppressParentsInRowNodes');
54522 this.isRowMasterFunc = this.gridOptionsService.get('isRowMaster');
54523 this.doingTreeData = this.gridOptionsService.isTreeData();
54524 this.doingMasterDetail = this.gridOptionsService.isMasterDetail();
54525 };
54526 ClientSideNodeManager.prototype.getCopyOfNodesMap = function () {
54527 return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].cloneObject(this.allNodesMap);
54528 };
54529 ClientSideNodeManager.prototype.getRowNode = function (id) {
54530 return this.allNodesMap[id];
54531 };
54532 ClientSideNodeManager.prototype.setRowData = function (rowData) {
54533 var _this = this;
54534 if (typeof rowData === 'string') {
54535 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');
54536 return;
54537 }
54538 var rootNode = this.rootNode;
54539 var sibling = this.rootNode.sibling;
54540 rootNode.childrenAfterFilter = null;
54541 rootNode.childrenAfterGroup = null;
54542 rootNode.childrenAfterAggFilter = null;
54543 rootNode.childrenAfterSort = null;
54544 rootNode.childrenMapped = null;
54545 rootNode.updateHasChildren();
54546 this.nextId = 0;
54547 this.allNodesMap = {};
54548 if (rowData) {
54549 // we use rootNode as the parent, however if using ag-grid-enterprise, the grouping stage
54550 // sets the parent node on each row (even if we are not grouping). so setting parent node
54551 // here is for benefit of ag-grid-community users
54552 rootNode.allLeafChildren = rowData.map(function (dataItem) { return _this.createNode(dataItem, _this.rootNode, ClientSideNodeManager.TOP_LEVEL); });
54553 }
54554 else {
54555 rootNode.allLeafChildren = [];
54556 rootNode.childrenAfterGroup = [];
54557 }
54558 if (sibling) {
54559 sibling.childrenAfterFilter = rootNode.childrenAfterFilter;
54560 sibling.childrenAfterGroup = rootNode.childrenAfterGroup;
54561 sibling.childrenAfterAggFilter = rootNode.childrenAfterAggFilter;
54562 sibling.childrenAfterSort = rootNode.childrenAfterSort;
54563 sibling.childrenMapped = rootNode.childrenMapped;
54564 sibling.allLeafChildren = rootNode.allLeafChildren;
54565 }
54566 };
54567 ClientSideNodeManager.prototype.updateRowData = function (rowDataTran, rowNodeOrder) {
54568 var rowNodeTransaction = {
54569 remove: [],
54570 update: [],
54571 add: []
54572 };
54573 var nodesToUnselect = [];
54574 this.executeRemove(rowDataTran, rowNodeTransaction, nodesToUnselect);
54575 this.executeUpdate(rowDataTran, rowNodeTransaction, nodesToUnselect);
54576 this.executeAdd(rowDataTran, rowNodeTransaction);
54577 this.updateSelection(nodesToUnselect, 'rowDataChanged');
54578 if (rowNodeOrder) {
54579 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].sortRowNodesByOrder(this.rootNode.allLeafChildren, rowNodeOrder);
54580 }
54581 return rowNodeTransaction;
54582 };
54583 ClientSideNodeManager.prototype.updateSelection = function (nodesToUnselect, source) {
54584 var selectionChanged = nodesToUnselect.length > 0;
54585 if (selectionChanged) {
54586 nodesToUnselect.forEach(function (rowNode) {
54587 rowNode.setSelected(false, false, true, source);
54588 });
54589 }
54590 // we do this regardless of nodes to unselect or not, as it's possible
54591 // a new node was inserted, so a parent that was previously selected (as all
54592 // children were selected) should not be tri-state (as new one unselected against
54593 // all other selected children).
54594 this.selectionService.updateGroupsFromChildrenSelections(source);
54595 if (selectionChanged) {
54596 var event_1 = {
54597 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SELECTION_CHANGED,
54598 source: source
54599 };
54600 this.eventService.dispatchEvent(event_1);
54601 }
54602 };
54603 ClientSideNodeManager.prototype.executeAdd = function (rowDataTran, rowNodeTransaction) {
54604 var _this = this;
54605 var _a;
54606 var add = rowDataTran.add, addIndex = rowDataTran.addIndex;
54607 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missingOrEmpty(add)) {
54608 return;
54609 }
54610 // create new row nodes for each data item
54611 var newNodes = add.map(function (item) { return _this.createNode(item, _this.rootNode, ClientSideNodeManager.TOP_LEVEL); });
54612 if (typeof addIndex === 'number' && addIndex >= 0) {
54613 // new rows are inserted in one go by concatenating them in between the existing rows at the desired index.
54614 // this is much faster than splicing them individually into 'allLeafChildren' when there are large inserts.
54615 var allLeafChildren = this.rootNode.allLeafChildren;
54616 var len = allLeafChildren.length;
54617 var normalisedAddIndex = addIndex;
54618 if (this.doingTreeData && addIndex > 0 && len > 0) {
54619 for (var i = 0; i < len; i++) {
54620 if (((_a = allLeafChildren[i]) === null || _a === void 0 ? void 0 : _a.rowIndex) == addIndex - 1) {
54621 normalisedAddIndex = i + 1;
54622 break;
54623 }
54624 }
54625 }
54626 var nodesBeforeIndex = allLeafChildren.slice(0, normalisedAddIndex);
54627 var nodesAfterIndex = allLeafChildren.slice(normalisedAddIndex, allLeafChildren.length);
54628 this.rootNode.allLeafChildren = __spread(nodesBeforeIndex, newNodes, nodesAfterIndex);
54629 }
54630 else {
54631 this.rootNode.allLeafChildren = __spread(this.rootNode.allLeafChildren, newNodes);
54632 }
54633 if (this.rootNode.sibling) {
54634 this.rootNode.sibling.allLeafChildren = this.rootNode.allLeafChildren;
54635 }
54636 // add new row nodes to the transaction add items
54637 rowNodeTransaction.add = newNodes;
54638 };
54639 ClientSideNodeManager.prototype.executeRemove = function (rowDataTran, rowNodeTransaction, nodesToUnselect) {
54640 var _this = this;
54641 var remove = rowDataTran.remove;
54642 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missingOrEmpty(remove)) {
54643 return;
54644 }
54645 var rowIdsRemoved = {};
54646 remove.forEach(function (item) {
54647 var rowNode = _this.lookupRowNode(item);
54648 if (!rowNode) {
54649 return;
54650 }
54651 // do delete - setting 'suppressFinishActions = true' to ensure EVENT_SELECTION_CHANGED is not raised for
54652 // each row node updated, instead it is raised once by the calling code if any selected nodes exist.
54653 if (rowNode.isSelected()) {
54654 nodesToUnselect.push(rowNode);
54655 }
54656 // so row renderer knows to fade row out (and not reposition it)
54657 rowNode.clearRowTopAndRowIndex();
54658 // NOTE: were we could remove from allLeaveChildren, however _.removeFromArray() is expensive, especially
54659 // if called multiple times (eg deleting lots of rows) and if allLeafChildren is a large list
54660 rowIdsRemoved[rowNode.id] = true;
54661 // _.removeFromArray(this.rootNode.allLeafChildren, rowNode);
54662 delete _this.allNodesMap[rowNode.id];
54663 rowNodeTransaction.remove.push(rowNode);
54664 });
54665 this.rootNode.allLeafChildren = this.rootNode.allLeafChildren.filter(function (rowNode) { return !rowIdsRemoved[rowNode.id]; });
54666 if (this.rootNode.sibling) {
54667 this.rootNode.sibling.allLeafChildren = this.rootNode.allLeafChildren;
54668 }
54669 };
54670 ClientSideNodeManager.prototype.executeUpdate = function (rowDataTran, rowNodeTransaction, nodesToUnselect) {
54671 var _this = this;
54672 var update = rowDataTran.update;
54673 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missingOrEmpty(update)) {
54674 return;
54675 }
54676 update.forEach(function (item) {
54677 var rowNode = _this.lookupRowNode(item);
54678 if (!rowNode) {
54679 return;
54680 }
54681 rowNode.updateData(item);
54682 if (!rowNode.selectable && rowNode.isSelected()) {
54683 nodesToUnselect.push(rowNode);
54684 }
54685 _this.setMasterForRow(rowNode, item, ClientSideNodeManager.TOP_LEVEL, false);
54686 rowNodeTransaction.update.push(rowNode);
54687 });
54688 };
54689 ClientSideNodeManager.prototype.lookupRowNode = function (data) {
54690 var getRowIdFunc = this.gridOptionsService.getRowIdFunc();
54691 var rowNode;
54692 if (getRowIdFunc) {
54693 // find rowNode using id
54694 var id = getRowIdFunc({ data: data, level: 0 });
54695 rowNode = this.allNodesMap[id];
54696 if (!rowNode) {
54697 console.error("AG Grid: could not find row id=" + id + ", data item was not found for this id");
54698 return null;
54699 }
54700 }
54701 else {
54702 // find rowNode using object references
54703 rowNode = this.rootNode.allLeafChildren.find(function (node) { return node.data === data; });
54704 if (!rowNode) {
54705 console.error("AG Grid: could not find data item as object was not found", data);
54706 console.error("Consider using getRowId to help the Grid find matching row data");
54707 return null;
54708 }
54709 }
54710 return rowNode || null;
54711 };
54712 ClientSideNodeManager.prototype.createNode = function (dataItem, parent, level) {
54713 var node = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNode"](this.beans);
54714 node.group = false;
54715 this.setMasterForRow(node, dataItem, level, true);
54716 if (parent && !this.suppressParentsInRowNodes) {
54717 node.parent = parent;
54718 }
54719 node.level = level;
54720 node.setDataAndId(dataItem, this.nextId.toString());
54721 if (this.allNodesMap[node.id]) {
54722 console.warn("AG Grid: duplicate node id '" + node.id + "' detected from getRowId callback, this could cause issues in your grid.");
54723 }
54724 this.allNodesMap[node.id] = node;
54725 this.nextId++;
54726 return node;
54727 };
54728 ClientSideNodeManager.prototype.setMasterForRow = function (rowNode, data, level, setExpanded) {
54729 if (this.doingTreeData) {
54730 rowNode.setMaster(false);
54731 if (setExpanded) {
54732 rowNode.expanded = false;
54733 }
54734 }
54735 else {
54736 // this is the default, for when doing grid data
54737 if (this.doingMasterDetail) {
54738 // if we are doing master detail, then the
54739 // default is that everything can be a Master Row.
54740 if (this.isRowMasterFunc) {
54741 rowNode.setMaster(this.isRowMasterFunc(data));
54742 }
54743 else {
54744 rowNode.setMaster(true);
54745 }
54746 }
54747 else {
54748 rowNode.setMaster(false);
54749 }
54750 if (setExpanded) {
54751 var rowGroupColumns = this.columnModel.getRowGroupColumns();
54752 var numRowGroupColumns = rowGroupColumns ? rowGroupColumns.length : 0;
54753 // need to take row group into account when determining level
54754 var masterRowLevel = level + numRowGroupColumns;
54755 rowNode.expanded = rowNode.master ? this.isExpanded(masterRowLevel) : false;
54756 }
54757 }
54758 };
54759 ClientSideNodeManager.prototype.isExpanded = function (level) {
54760 var expandByDefault = this.gridOptionsService.getNum('groupDefaultExpanded');
54761 if (expandByDefault === -1) {
54762 return true;
54763 }
54764 return level < expandByDefault;
54765 };
54766 ClientSideNodeManager.TOP_LEVEL = 0;
54767 ClientSideNodeManager.ROOT_NODE_ID = 'ROOT_NODE_ID';
54768 return ClientSideNodeManager;
54769}());
54770
54771
54772
54773/***/ }),
54774/* 251 */
54775/***/ (function(module, __webpack_exports__, __webpack_require__) {
54776
54777"use strict";
54778__webpack_require__.r(__webpack_exports__);
54779/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterStage", function() { return FilterStage; });
54780/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
54781var __extends = (undefined && undefined.__extends) || (function () {
54782 var extendStatics = function (d, b) {
54783 extendStatics = Object.setPrototypeOf ||
54784 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
54785 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
54786 return extendStatics(d, b);
54787 };
54788 return function (d, b) {
54789 extendStatics(d, b);
54790 function __() { this.constructor = d; }
54791 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54792 };
54793})();
54794var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
54795 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
54796 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
54797 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;
54798 return c > 3 && r && Object.defineProperty(target, key, r), r;
54799};
54800
54801var FilterStage = /** @class */ (function (_super) {
54802 __extends(FilterStage, _super);
54803 function FilterStage() {
54804 return _super !== null && _super.apply(this, arguments) || this;
54805 }
54806 FilterStage.prototype.execute = function (params) {
54807 var changedPath = params.changedPath;
54808 this.filterService.filter(changedPath);
54809 };
54810 __decorate([
54811 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterService')
54812 ], FilterStage.prototype, "filterService", void 0);
54813 FilterStage = __decorate([
54814 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('filterStage')
54815 ], FilterStage);
54816 return FilterStage;
54817}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
54818
54819
54820
54821/***/ }),
54822/* 252 */
54823/***/ (function(module, __webpack_exports__, __webpack_require__) {
54824
54825"use strict";
54826__webpack_require__.r(__webpack_exports__);
54827/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortStage", function() { return SortStage; });
54828/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
54829var __extends = (undefined && undefined.__extends) || (function () {
54830 var extendStatics = function (d, b) {
54831 extendStatics = Object.setPrototypeOf ||
54832 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
54833 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
54834 return extendStatics(d, b);
54835 };
54836 return function (d, b) {
54837 extendStatics(d, b);
54838 function __() { this.constructor = d; }
54839 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54840 };
54841})();
54842var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
54843 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
54844 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
54845 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;
54846 return c > 3 && r && Object.defineProperty(target, key, r), r;
54847};
54848
54849var SortStage = /** @class */ (function (_super) {
54850 __extends(SortStage, _super);
54851 function SortStage() {
54852 return _super !== null && _super.apply(this, arguments) || this;
54853 }
54854 SortStage.prototype.execute = function (params) {
54855 var _this = this;
54856 var sortOptions = this.sortController.getSortOptions();
54857 var sortActive = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(sortOptions) && sortOptions.length > 0;
54858 var deltaSort = sortActive
54859 && _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(params.rowNodeTransactions)
54860 // in time we can remove this check, so that delta sort is always
54861 // on if transactions are present. it's off for now so that we can
54862 // selectively turn it on and test it with some select users before
54863 // rolling out to everyone.
54864 && this.gridOptionsService.is('deltaSort');
54865 var sortContainsGroupColumns = sortOptions.some(function (opt) { return !!_this.columnModel.getGroupDisplayColumnForGroup(opt.column.getId()); });
54866 this.sortService.sort(sortOptions, sortActive, deltaSort, params.rowNodeTransactions, params.changedPath, sortContainsGroupColumns);
54867 };
54868 __decorate([
54869 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortService')
54870 ], SortStage.prototype, "sortService", void 0);
54871 __decorate([
54872 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortController')
54873 ], SortStage.prototype, "sortController", void 0);
54874 __decorate([
54875 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
54876 ], SortStage.prototype, "columnModel", void 0);
54877 SortStage = __decorate([
54878 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('sortStage')
54879 ], SortStage);
54880 return SortStage;
54881}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
54882
54883
54884
54885/***/ }),
54886/* 253 */
54887/***/ (function(module, __webpack_exports__, __webpack_require__) {
54888
54889"use strict";
54890__webpack_require__.r(__webpack_exports__);
54891/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FlattenStage", function() { return FlattenStage; });
54892/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
54893var __extends = (undefined && undefined.__extends) || (function () {
54894 var extendStatics = function (d, b) {
54895 extendStatics = Object.setPrototypeOf ||
54896 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
54897 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
54898 return extendStatics(d, b);
54899 };
54900 return function (d, b) {
54901 extendStatics(d, b);
54902 function __() { this.constructor = d; }
54903 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54904 };
54905})();
54906var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
54907 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
54908 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
54909 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;
54910 return c > 3 && r && Object.defineProperty(target, key, r), r;
54911};
54912
54913var FlattenStage = /** @class */ (function (_super) {
54914 __extends(FlattenStage, _super);
54915 function FlattenStage() {
54916 return _super !== null && _super.apply(this, arguments) || this;
54917 }
54918 FlattenStage.prototype.execute = function (params) {
54919 var rootNode = params.rowNode;
54920 // even if not doing grouping, we do the mapping, as the client might
54921 // of passed in data that already has a grouping in it somewhere
54922 var result = [];
54923 // putting value into a wrapper so it's passed by reference
54924 var nextRowTop = { value: 0 };
54925 var skipLeafNodes = this.columnModel.isPivotMode();
54926 // if we are reducing, and not grouping, then we want to show the root node, as that
54927 // is where the pivot values are
54928 var showRootNode = skipLeafNodes && rootNode.leafGroup;
54929 var topList = showRootNode ? [rootNode] : rootNode.childrenAfterSort;
54930 this.recursivelyAddToRowsToDisplay(topList, result, nextRowTop, skipLeafNodes, 0);
54931 // we do not want the footer total if the gris is empty
54932 var atLeastOneRowPresent = result.length > 0;
54933 var includeGroupTotalFooter = !showRootNode
54934 // don't show total footer when showRootNode is true (i.e. in pivot mode and no groups)
54935 && atLeastOneRowPresent
54936 && this.gridOptionsService.is('groupIncludeTotalFooter');
54937 if (includeGroupTotalFooter) {
54938 rootNode.createFooter();
54939 this.addRowNodeToRowsToDisplay(rootNode.sibling, result, nextRowTop, 0);
54940 }
54941 return result;
54942 };
54943 FlattenStage.prototype.recursivelyAddToRowsToDisplay = function (rowsToFlatten, result, nextRowTop, skipLeafNodes, uiLevel) {
54944 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missingOrEmpty(rowsToFlatten)) {
54945 return;
54946 }
54947 var hideOpenParents = this.gridOptionsService.is('groupHideOpenParents');
54948 // these two are mutually exclusive, so if first set, we don't set the second
54949 var groupRemoveSingleChildren = this.gridOptionsService.is('groupRemoveSingleChildren');
54950 var groupRemoveLowestSingleChildren = !groupRemoveSingleChildren && this.gridOptionsService.is('groupRemoveLowestSingleChildren');
54951 for (var i = 0; i < rowsToFlatten.length; i++) {
54952 var rowNode = rowsToFlatten[i];
54953 // check all these cases, for working out if this row should be included in the final mapped list
54954 var isParent = rowNode.hasChildren();
54955 var isSkippedLeafNode = skipLeafNodes && !isParent;
54956 var isRemovedSingleChildrenGroup = groupRemoveSingleChildren &&
54957 isParent &&
54958 rowNode.childrenAfterGroup.length === 1;
54959 var isRemovedLowestSingleChildrenGroup = groupRemoveLowestSingleChildren &&
54960 isParent &&
54961 rowNode.leafGroup &&
54962 rowNode.childrenAfterGroup.length === 1;
54963 // hide open parents means when group is open, we don't show it. we also need to make sure the
54964 // group is expandable in the first place (as leaf groups are not expandable if pivot mode is on).
54965 // the UI will never allow expanding leaf groups, however the user might via the API (or menu option 'expand all')
54966 var neverAllowToExpand = skipLeafNodes && rowNode.leafGroup;
54967 var isHiddenOpenParent = hideOpenParents && rowNode.expanded && !rowNode.master && (!neverAllowToExpand);
54968 var thisRowShouldBeRendered = !isSkippedLeafNode && !isHiddenOpenParent &&
54969 !isRemovedSingleChildrenGroup && !isRemovedLowestSingleChildrenGroup;
54970 if (thisRowShouldBeRendered) {
54971 this.addRowNodeToRowsToDisplay(rowNode, result, nextRowTop, uiLevel);
54972 }
54973 // if we are pivoting, we never map below the leaf group
54974 if (skipLeafNodes && rowNode.leafGroup) {
54975 continue;
54976 }
54977 if (isParent) {
54978 var excludedParent = isRemovedSingleChildrenGroup || isRemovedLowestSingleChildrenGroup;
54979 // we traverse the group if it is expended, however we always traverse if the parent node
54980 // was removed (as the group will never be opened if it is not displayed, we show the children instead)
54981 if (rowNode.expanded || excludedParent) {
54982 // if the parent was excluded, then ui level is that of the parent
54983 var uiLevelForChildren = excludedParent ? uiLevel : uiLevel + 1;
54984 this.recursivelyAddToRowsToDisplay(rowNode.childrenAfterSort, result, nextRowTop, skipLeafNodes, uiLevelForChildren);
54985 // put a footer in if user is looking for it
54986 if (this.gridOptionsService.is('groupIncludeFooter')) {
54987 this.addRowNodeToRowsToDisplay(rowNode.sibling, result, nextRowTop, uiLevel);
54988 }
54989 }
54990 }
54991 else if (rowNode.master && rowNode.expanded) {
54992 var detailNode = this.createDetailNode(rowNode);
54993 this.addRowNodeToRowsToDisplay(detailNode, result, nextRowTop, uiLevel);
54994 }
54995 }
54996 };
54997 // duplicated method, it's also in floatingRowModel
54998 FlattenStage.prototype.addRowNodeToRowsToDisplay = function (rowNode, result, nextRowTop, uiLevel) {
54999 var isGroupMultiAutoColumn = this.gridOptionsService.isGroupMultiAutoColumn();
55000 result.push(rowNode);
55001 rowNode.setUiLevel(isGroupMultiAutoColumn ? 0 : uiLevel);
55002 };
55003 FlattenStage.prototype.createDetailNode = function (masterNode) {
55004 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(masterNode.detailNode)) {
55005 return masterNode.detailNode;
55006 }
55007 var detailNode = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNode"](this.beans);
55008 detailNode.detail = true;
55009 detailNode.selectable = false;
55010 detailNode.parent = masterNode;
55011 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(masterNode.id)) {
55012 detailNode.id = 'detail_' + masterNode.id;
55013 }
55014 detailNode.data = masterNode.data;
55015 detailNode.level = masterNode.level + 1;
55016 masterNode.detailNode = detailNode;
55017 return detailNode;
55018 };
55019 __decorate([
55020 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
55021 ], FlattenStage.prototype, "columnModel", void 0);
55022 __decorate([
55023 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('beans')
55024 ], FlattenStage.prototype, "beans", void 0);
55025 FlattenStage = __decorate([
55026 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('flattenStage')
55027 ], FlattenStage);
55028 return FlattenStage;
55029}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
55030
55031
55032
55033/***/ }),
55034/* 254 */
55035/***/ (function(module, __webpack_exports__, __webpack_require__) {
55036
55037"use strict";
55038__webpack_require__.r(__webpack_exports__);
55039/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortService", function() { return SortService; });
55040/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
55041var __extends = (undefined && undefined.__extends) || (function () {
55042 var extendStatics = function (d, b) {
55043 extendStatics = Object.setPrototypeOf ||
55044 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55045 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
55046 return extendStatics(d, b);
55047 };
55048 return function (d, b) {
55049 extendStatics(d, b);
55050 function __() { this.constructor = d; }
55051 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55052 };
55053})();
55054var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55055 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55056 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55057 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;
55058 return c > 3 && r && Object.defineProperty(target, key, r), r;
55059};
55060
55061var SortService = /** @class */ (function (_super) {
55062 __extends(SortService, _super);
55063 function SortService() {
55064 return _super !== null && _super.apply(this, arguments) || this;
55065 }
55066 SortService.prototype.init = function () {
55067 this.postSortFunc = this.getPostSortFunc();
55068 };
55069 SortService.prototype.sort = function (sortOptions, sortActive, useDeltaSort, rowNodeTransactions, changedPath, sortContainsGroupColumns) {
55070 var _this = this;
55071 var groupMaintainOrder = this.gridOptionsService.is('groupMaintainOrder');
55072 var groupColumnsPresent = this.columnModel.getAllGridColumns().some(function (c) { return c.isRowGroupActive(); });
55073 var allDirtyNodes = {};
55074 if (useDeltaSort && rowNodeTransactions) {
55075 allDirtyNodes = this.calculateDirtyNodes(rowNodeTransactions);
55076 }
55077 var isPivotMode = this.columnModel.isPivotMode();
55078 var callback = function (rowNode) {
55079 // we clear out the 'pull down open parents' first, as the values mix up the sorting
55080 _this.pullDownGroupDataForHideOpenParents(rowNode.childrenAfterAggFilter, true);
55081 // It's pointless to sort rows which aren't being displayed. in pivot mode we don't need to sort the leaf group children.
55082 var skipSortingPivotLeafs = isPivotMode && rowNode.leafGroup;
55083 // Javascript sort is non deterministic when all the array items are equals, ie Comparator always returns 0,
55084 // so to ensure the array keeps its order, add an additional sorting condition manually, in this case we
55085 // are going to inspect the original array position. This is what sortedRowNodes is for.
55086 var skipSortingGroups = groupMaintainOrder && groupColumnsPresent && !rowNode.leafGroup && !sortContainsGroupColumns;
55087 if (skipSortingGroups) {
55088 var childrenToBeSorted = rowNode.childrenAfterAggFilter.slice(0);
55089 if (rowNode.childrenAfterSort) {
55090 var indexedOrders_1 = {};
55091 rowNode.childrenAfterSort.forEach(function (node, idx) {
55092 indexedOrders_1[node.id] = idx;
55093 });
55094 childrenToBeSorted.sort(function (row1, row2) { var _a, _b; return ((_a = indexedOrders_1[row1.id]) !== null && _a !== void 0 ? _a : 0) - ((_b = indexedOrders_1[row2.id]) !== null && _b !== void 0 ? _b : 0); });
55095 }
55096 rowNode.childrenAfterSort = childrenToBeSorted;
55097 }
55098 else if (!sortActive || skipSortingPivotLeafs) {
55099 // if there's no sort to make, skip this step
55100 rowNode.childrenAfterSort = rowNode.childrenAfterAggFilter.slice(0);
55101 }
55102 else if (useDeltaSort) {
55103 rowNode.childrenAfterSort = _this.doDeltaSort(rowNode, allDirtyNodes, changedPath, sortOptions);
55104 }
55105 else {
55106 rowNode.childrenAfterSort = _this.rowNodeSorter.doFullSort(rowNode.childrenAfterAggFilter, sortOptions);
55107 }
55108 if (rowNode.sibling) {
55109 rowNode.sibling.childrenAfterSort = rowNode.childrenAfterSort;
55110 }
55111 _this.updateChildIndexes(rowNode);
55112 if (_this.postSortFunc) {
55113 var params = { nodes: rowNode.childrenAfterSort };
55114 _this.postSortFunc(params);
55115 }
55116 };
55117 if (changedPath) {
55118 changedPath.forEachChangedNodeDepthFirst(callback);
55119 }
55120 this.updateGroupDataForHideOpenParents(changedPath);
55121 };
55122 SortService.prototype.getPostSortFunc = function () {
55123 var postSortRows = this.gridOptionsService.getCallback('postSortRows');
55124 if (postSortRows) {
55125 return postSortRows;
55126 }
55127 // this is the deprecated way, so provide a proxy to make it compatible
55128 var postSort = this.gridOptionsService.get('postSort');
55129 if (postSort) {
55130 return function (params) { return postSort(params.nodes); };
55131 }
55132 };
55133 SortService.prototype.calculateDirtyNodes = function (rowNodeTransactions) {
55134 var dirtyNodes = {};
55135 var addNodesFunc = function (rowNodes) {
55136 if (rowNodes) {
55137 rowNodes.forEach(function (rowNode) { return dirtyNodes[rowNode.id] = true; });
55138 }
55139 };
55140 // all leaf level nodes in the transaction were impacted
55141 if (rowNodeTransactions) {
55142 rowNodeTransactions.forEach(function (tran) {
55143 addNodesFunc(tran.add);
55144 addNodesFunc(tran.update);
55145 addNodesFunc(tran.remove);
55146 });
55147 }
55148 return dirtyNodes;
55149 };
55150 SortService.prototype.doDeltaSort = function (rowNode, allTouchedNodes, changedPath, sortOptions) {
55151 var _this = this;
55152 var unsortedRows = rowNode.childrenAfterAggFilter;
55153 var oldSortedRows = rowNode.childrenAfterSort;
55154 if (!oldSortedRows) {
55155 return this.rowNodeSorter.doFullSort(unsortedRows, sortOptions);
55156 }
55157 var untouchedRowsMap = {};
55158 var touchedRows = [];
55159 unsortedRows.forEach(function (row) {
55160 if (allTouchedNodes[row.id] || !changedPath.canSkip(row)) {
55161 touchedRows.push(row);
55162 }
55163 else {
55164 untouchedRowsMap[row.id] = true;
55165 }
55166 });
55167 var sortedUntouchedRows = oldSortedRows.filter(function (child) { return untouchedRowsMap[child.id]; });
55168 var mapNodeToSortedNode = function (rowNode, pos) { return ({ currentPos: pos, rowNode: rowNode }); };
55169 var sortedChangedRows = touchedRows
55170 .map(mapNodeToSortedNode)
55171 .sort(function (a, b) { return _this.rowNodeSorter.compareRowNodes(sortOptions, a, b); });
55172 return this.mergeSortedArrays(sortOptions, sortedChangedRows, sortedUntouchedRows.map(mapNodeToSortedNode)).map(function (_a) {
55173 var rowNode = _a.rowNode;
55174 return rowNode;
55175 });
55176 };
55177 // Merge two sorted arrays into each other
55178 SortService.prototype.mergeSortedArrays = function (sortOptions, arr1, arr2) {
55179 var res = [];
55180 var i = 0;
55181 var j = 0;
55182 // Traverse both array, adding them in order
55183 while (i < arr1.length && j < arr2.length) {
55184 // Check if current element of first
55185 // array is smaller than current element
55186 // of second array. If yes, store first
55187 // array element and increment first array
55188 // index. Otherwise do same with second array
55189 var compareResult = this.rowNodeSorter.compareRowNodes(sortOptions, arr1[i], arr2[j]);
55190 if (compareResult < 0) {
55191 res.push(arr1[i++]);
55192 }
55193 else {
55194 res.push(arr2[j++]);
55195 }
55196 }
55197 // add remaining from arr1
55198 while (i < arr1.length) {
55199 res.push(arr1[i++]);
55200 }
55201 // add remaining from arr2
55202 while (j < arr2.length) {
55203 res.push(arr2[j++]);
55204 }
55205 return res;
55206 };
55207 SortService.prototype.updateChildIndexes = function (rowNode) {
55208 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(rowNode.childrenAfterSort)) {
55209 return;
55210 }
55211 var listToSort = rowNode.childrenAfterSort;
55212 for (var i = 0; i < listToSort.length; i++) {
55213 var child = listToSort[i];
55214 var firstChild = i === 0;
55215 var lastChild = i === rowNode.childrenAfterSort.length - 1;
55216 child.setFirstChild(firstChild);
55217 child.setLastChild(lastChild);
55218 child.setChildIndex(i);
55219 }
55220 };
55221 SortService.prototype.updateGroupDataForHideOpenParents = function (changedPath) {
55222 var _this = this;
55223 if (!this.gridOptionsService.is('groupHideOpenParents')) {
55224 return;
55225 }
55226 if (this.gridOptionsService.isTreeData()) {
55227 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).";
55228 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].doOnce(function () { return console.warn(msg_1); }, 'sortService.hideOpenParentsWithTreeData');
55229 return false;
55230 }
55231 // recurse breadth first over group nodes after sort to 'pull down' group data to child groups
55232 var callback = function (rowNode) {
55233 _this.pullDownGroupDataForHideOpenParents(rowNode.childrenAfterSort, false);
55234 rowNode.childrenAfterSort.forEach(function (child) {
55235 if (child.hasChildren()) {
55236 callback(child);
55237 }
55238 });
55239 };
55240 if (changedPath) {
55241 changedPath.executeFromRootNode(function (rowNode) { return callback(rowNode); });
55242 }
55243 };
55244 SortService.prototype.pullDownGroupDataForHideOpenParents = function (rowNodes, clearOperation) {
55245 var _this = this;
55246 if (!this.gridOptionsService.is('groupHideOpenParents') || _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(rowNodes)) {
55247 return;
55248 }
55249 rowNodes.forEach(function (childRowNode) {
55250 var groupDisplayCols = _this.columnModel.getGroupDisplayColumns();
55251 groupDisplayCols.forEach(function (groupDisplayCol) {
55252 var showRowGroup = groupDisplayCol.getColDef().showRowGroup;
55253 if (typeof showRowGroup !== 'string') {
55254 console.error('AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup');
55255 return;
55256 }
55257 var displayingGroupKey = showRowGroup;
55258 var rowGroupColumn = _this.columnModel.getPrimaryColumn(displayingGroupKey);
55259 var thisRowNodeMatches = rowGroupColumn === childRowNode.rowGroupColumn;
55260 if (thisRowNodeMatches) {
55261 return;
55262 }
55263 if (clearOperation) {
55264 // if doing a clear operation, we clear down the value for every possible group column
55265 childRowNode.setGroupValue(groupDisplayCol.getId(), undefined);
55266 }
55267 else {
55268 // if doing a set operation, we set only where the pull down is to occur
55269 var parentToStealFrom = childRowNode.getFirstChildOfFirstChild(rowGroupColumn);
55270 if (parentToStealFrom) {
55271 childRowNode.setGroupValue(groupDisplayCol.getId(), parentToStealFrom.key);
55272 }
55273 }
55274 });
55275 });
55276 };
55277 __decorate([
55278 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
55279 ], SortService.prototype, "columnModel", void 0);
55280 __decorate([
55281 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowNodeSorter')
55282 ], SortService.prototype, "rowNodeSorter", void 0);
55283 __decorate([
55284 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
55285 ], SortService.prototype, "init", null);
55286 SortService = __decorate([
55287 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('sortService')
55288 ], SortService);
55289 return SortService;
55290}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
55291
55292
55293
55294/***/ }),
55295/* 255 */
55296/***/ (function(module, __webpack_exports__, __webpack_require__) {
55297
55298"use strict";
55299__webpack_require__.r(__webpack_exports__);
55300/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterService", function() { return FilterService; });
55301/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
55302var __extends = (undefined && undefined.__extends) || (function () {
55303 var extendStatics = function (d, b) {
55304 extendStatics = Object.setPrototypeOf ||
55305 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55306 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
55307 return extendStatics(d, b);
55308 };
55309 return function (d, b) {
55310 extendStatics(d, b);
55311 function __() { this.constructor = d; }
55312 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55313 };
55314})();
55315var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55316 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55317 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55318 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;
55319 return c > 3 && r && Object.defineProperty(target, key, r), r;
55320};
55321
55322var FilterService = /** @class */ (function (_super) {
55323 __extends(FilterService, _super);
55324 function FilterService() {
55325 return _super !== null && _super.apply(this, arguments) || this;
55326 }
55327 FilterService.prototype.filter = function (changedPath) {
55328 var filterActive = this.filterManager.isColumnFilterPresent()
55329 || this.filterManager.isQuickFilterPresent()
55330 || this.filterManager.isExternalFilterPresent();
55331 this.filterNodes(filterActive, changedPath);
55332 };
55333 FilterService.prototype.filterNodes = function (filterActive, changedPath) {
55334 var _this = this;
55335 var filterCallback = function (rowNode, includeChildNodes) {
55336 // recursively get all children that are groups to also filter
55337 if (rowNode.hasChildren()) {
55338 // result of filter for this node. when filtering tree data, includeChildNodes = true when parent passes
55339 if (filterActive && !includeChildNodes) {
55340 rowNode.childrenAfterFilter = rowNode.childrenAfterGroup.filter(function (childNode) {
55341 // a group is included in the result if it has any children of it's own.
55342 // by this stage, the child groups are already filtered
55343 var passBecauseChildren = childNode.childrenAfterFilter && childNode.childrenAfterFilter.length > 0;
55344 // both leaf level nodes and tree data nodes have data. these get added if
55345 // the data passes the filter
55346 var passBecauseDataPasses = childNode.data
55347 && _this.filterManager.doesRowPassFilter({ rowNode: childNode });
55348 // note - tree data nodes pass either if a) they pass themselves or b) any children of that node pass
55349 return passBecauseChildren || passBecauseDataPasses;
55350 });
55351 }
55352 else {
55353 // if not filtering, the result is the original list
55354 rowNode.childrenAfterFilter = rowNode.childrenAfterGroup;
55355 }
55356 }
55357 else {
55358 rowNode.childrenAfterFilter = rowNode.childrenAfterGroup;
55359 }
55360 if (rowNode.sibling) {
55361 rowNode.sibling.childrenAfterFilter = rowNode.childrenAfterFilter;
55362 }
55363 };
55364 if (this.doingTreeDataFiltering()) {
55365 var treeDataDepthFirstFilter_1 = function (rowNode, alreadyFoundInParent) {
55366 // tree data filter traverses the hierarchy depth first and includes child nodes if parent passes
55367 // filter, and parent nodes will be include if any children exist.
55368 if (rowNode.childrenAfterGroup) {
55369 for (var i = 0; i < rowNode.childrenAfterGroup.length; i++) {
55370 var childNode = rowNode.childrenAfterGroup[i];
55371 // first check if current node passes filter before invoking child nodes
55372 var foundInParent = alreadyFoundInParent
55373 || _this.filterManager.doesRowPassFilter({ rowNode: childNode });
55374 if (childNode.childrenAfterGroup) {
55375 treeDataDepthFirstFilter_1(rowNode.childrenAfterGroup[i], foundInParent);
55376 }
55377 else {
55378 filterCallback(childNode, foundInParent);
55379 }
55380 }
55381 }
55382 filterCallback(rowNode, alreadyFoundInParent);
55383 };
55384 var treeDataFilterCallback = function (rowNode) { return treeDataDepthFirstFilter_1(rowNode, false); };
55385 changedPath.executeFromRootNode(treeDataFilterCallback);
55386 }
55387 else {
55388 var defaultFilterCallback = function (rowNode) { return filterCallback(rowNode, false); };
55389 changedPath.forEachChangedNodeDepthFirst(defaultFilterCallback, true);
55390 }
55391 };
55392 FilterService.prototype.doingTreeDataFiltering = function () {
55393 return this.gridOptionsService.isTreeData() && !this.gridOptionsService.is('excludeChildrenWhenTreeDataFiltering');
55394 };
55395 __decorate([
55396 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
55397 ], FilterService.prototype, "filterManager", void 0);
55398 FilterService = __decorate([
55399 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])("filterService")
55400 ], FilterService);
55401 return FilterService;
55402}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
55403
55404
55405
55406/***/ }),
55407/* 256 */
55408/***/ (function(module, __webpack_exports__, __webpack_require__) {
55409
55410"use strict";
55411__webpack_require__.r(__webpack_exports__);
55412/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImmutableService", function() { return ImmutableService; });
55413/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
55414var __extends = (undefined && undefined.__extends) || (function () {
55415 var extendStatics = function (d, b) {
55416 extendStatics = Object.setPrototypeOf ||
55417 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55418 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
55419 return extendStatics(d, b);
55420 };
55421 return function (d, b) {
55422 extendStatics(d, b);
55423 function __() { this.constructor = d; }
55424 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55425 };
55426})();
55427var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55428 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55429 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55430 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;
55431 return c > 3 && r && Object.defineProperty(target, key, r), r;
55432};
55433var __read = (undefined && undefined.__read) || function (o, n) {
55434 var m = typeof Symbol === "function" && o[Symbol.iterator];
55435 if (!m) return o;
55436 var i = m.call(o), r, ar = [], e;
55437 try {
55438 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
55439 }
55440 catch (error) { e = { error: error }; }
55441 finally {
55442 try {
55443 if (r && !r.done && (m = i["return"])) m.call(i);
55444 }
55445 finally { if (e) throw e.error; }
55446 }
55447 return ar;
55448};
55449
55450var ImmutableService = /** @class */ (function (_super) {
55451 __extends(ImmutableService, _super);
55452 function ImmutableService() {
55453 return _super !== null && _super.apply(this, arguments) || this;
55454 }
55455 ImmutableService.prototype.postConstruct = function () {
55456 if (this.rowModel.getType() === 'clientSide') {
55457 this.clientSideRowModel = this.rowModel;
55458 }
55459 };
55460 ImmutableService.prototype.isActive = function () {
55461 // we used to have a property immutableData for this. however this was deprecated
55462 // in favour of having Immutable Data on by default when getRowId is provided
55463 var getRowIdProvided = this.gridOptionsService.exists('getRowId');
55464 var immutableData = this.gridOptionsService.is('immutableData');
55465 // this property is a backwards compatibility property, for those who want
55466 // the old behaviour of Row ID's but NOT Immutable Data.
55467 var resetRowDataOnUpdate = this.gridOptionsService.is('resetRowDataOnUpdate');
55468 if (resetRowDataOnUpdate) {
55469 return false;
55470 }
55471 return getRowIdProvided || immutableData;
55472 };
55473 ImmutableService.prototype.setRowData = function (rowData) {
55474 var transactionAndMap = this.createTransactionForRowData(rowData);
55475 if (!transactionAndMap) {
55476 return;
55477 }
55478 var _a = __read(transactionAndMap, 2), transaction = _a[0], orderIdMap = _a[1];
55479 var nodeTransaction = this.clientSideRowModel.updateRowData(transaction, orderIdMap);
55480 // need to force updating of full width rows - note this wouldn't be necessary the full width cell comp listened
55481 // to the data change event on the row node and refreshed itself.
55482 if (nodeTransaction) {
55483 this.rowRenderer.refreshFullWidthRows(nodeTransaction.update);
55484 }
55485 };
55486 // converts the setRowData() command to a transaction
55487 ImmutableService.prototype.createTransactionForRowData = function (rowData) {
55488 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(this.clientSideRowModel)) {
55489 console.error('AG Grid: ImmutableService only works with ClientSideRowModel');
55490 return;
55491 }
55492 var getRowIdFunc = this.gridOptionsService.getRowIdFunc();
55493 if (getRowIdFunc == null) {
55494 console.error('AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!');
55495 return;
55496 }
55497 // convert the data into a transaction object by working out adds, removes and updates
55498 var transaction = {
55499 remove: [],
55500 update: [],
55501 add: []
55502 };
55503 var existingNodesMap = this.clientSideRowModel.getCopyOfNodesMap();
55504 var suppressSortOrder = this.gridOptionsService.is('suppressMaintainUnsortedOrder');
55505 var orderMap = suppressSortOrder ? undefined : {};
55506 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(rowData)) {
55507 // split all the new data in the following:
55508 // if new, push to 'add'
55509 // if update, push to 'update'
55510 // if not changed, do not include in the transaction
55511 rowData.forEach(function (data, index) {
55512 var id = getRowIdFunc({ data: data, level: 0 });
55513 var existingNode = existingNodesMap[id];
55514 if (orderMap) {
55515 orderMap[id] = index;
55516 }
55517 if (existingNode) {
55518 var dataHasChanged = existingNode.data !== data;
55519 if (dataHasChanged) {
55520 transaction.update.push(data);
55521 }
55522 // otherwise, if data not changed, we just don't include it anywhere, as it's not a delta
55523 // remove from list, so we know the item is not to be removed
55524 existingNodesMap[id] = undefined;
55525 }
55526 else {
55527 transaction.add.push(data);
55528 }
55529 });
55530 }
55531 // at this point, all rows that are left, should be removed
55532 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].iterateObject(existingNodesMap, function (id, rowNode) {
55533 if (rowNode) {
55534 transaction.remove.push(rowNode.data);
55535 }
55536 });
55537 return [transaction, orderMap];
55538 };
55539 __decorate([
55540 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
55541 ], ImmutableService.prototype, "rowModel", void 0);
55542 __decorate([
55543 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
55544 ], ImmutableService.prototype, "rowRenderer", void 0);
55545 __decorate([
55546 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
55547 ], ImmutableService.prototype, "postConstruct", null);
55548 ImmutableService = __decorate([
55549 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('immutableService')
55550 ], ImmutableService);
55551 return ImmutableService;
55552}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
55553
55554
55555
55556/***/ }),
55557/* 257 */
55558/***/ (function(module, __webpack_exports__, __webpack_require__) {
55559
55560"use strict";
55561__webpack_require__.r(__webpack_exports__);
55562/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
55563// DO NOT UPDATE MANUALLY: Generated from script during build time
55564var VERSION = '29.2.0';
55565
55566
55567/***/ }),
55568/* 258 */
55569/***/ (function(module, __webpack_exports__, __webpack_require__) {
55570
55571"use strict";
55572__webpack_require__.r(__webpack_exports__);
55573/* harmony import */ var _csvExport_baseCreator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(259);
55574/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseCreator", function() { return _csvExport_baseCreator__WEBPACK_IMPORTED_MODULE_0__["BaseCreator"]; });
55575
55576/* harmony import */ var _csvExport_sessions_baseGridSerializingSession__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(260);
55577/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseGridSerializingSession", function() { return _csvExport_sessions_baseGridSerializingSession__WEBPACK_IMPORTED_MODULE_1__["BaseGridSerializingSession"]; });
55578
55579/* harmony import */ var _csvExport_csvCreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(261);
55580/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CsvCreator", function() { return _csvExport_csvCreator__WEBPACK_IMPORTED_MODULE_2__["CsvCreator"]; });
55581
55582/* harmony import */ var _csvExportModule__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(264);
55583/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CsvExportModule", function() { return _csvExportModule__WEBPACK_IMPORTED_MODULE_3__["CsvExportModule"]; });
55584
55585/* harmony import */ var _csvExport_downloader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(262);
55586/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Downloader", function() { return _csvExport_downloader__WEBPACK_IMPORTED_MODULE_4__["Downloader"]; });
55587
55588/* harmony import */ var _csvExport_gridSerializer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(265);
55589/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridSerializer", function() { return _csvExport_gridSerializer__WEBPACK_IMPORTED_MODULE_5__["GridSerializer"]; });
55590
55591/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowType", function() { return _csvExport_gridSerializer__WEBPACK_IMPORTED_MODULE_5__["RowType"]; });
55592
55593/* harmony import */ var _csvExport_xmlFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(267);
55594/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "XmlFactory", function() { return _csvExport_xmlFactory__WEBPACK_IMPORTED_MODULE_6__["XmlFactory"]; });
55595
55596/* harmony import */ var _csvExport_zipContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(268);
55597/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ZipContainer", function() { return _csvExport_zipContainer__WEBPACK_IMPORTED_MODULE_7__["ZipContainer"]; });
55598
55599
55600
55601
55602
55603
55604
55605
55606
55607
55608
55609/***/ }),
55610/* 259 */
55611/***/ (function(module, __webpack_exports__, __webpack_require__) {
55612
55613"use strict";
55614__webpack_require__.r(__webpack_exports__);
55615/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseCreator", function() { return BaseCreator; });
55616var BaseCreator = /** @class */ (function () {
55617 function BaseCreator() {
55618 }
55619 BaseCreator.prototype.setBeans = function (beans) {
55620 this.beans = beans;
55621 };
55622 BaseCreator.prototype.getFileName = function (fileName) {
55623 var extension = this.getDefaultFileExtension();
55624 if (fileName == null || !fileName.length) {
55625 fileName = this.getDefaultFileName();
55626 }
55627 return fileName.indexOf('.') === -1 ? fileName + "." + extension : fileName;
55628 };
55629 BaseCreator.prototype.getData = function (params) {
55630 var serializingSession = this.createSerializingSession(params);
55631 var data = this.beans.gridSerializer.serialize(serializingSession, params);
55632 return data;
55633 };
55634 return BaseCreator;
55635}());
55636
55637
55638
55639/***/ }),
55640/* 260 */
55641/***/ (function(module, __webpack_exports__, __webpack_require__) {
55642
55643"use strict";
55644__webpack_require__.r(__webpack_exports__);
55645/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseGridSerializingSession", function() { return BaseGridSerializingSession; });
55646var BaseGridSerializingSession = /** @class */ (function () {
55647 function BaseGridSerializingSession(config) {
55648 this.groupColumns = [];
55649 var columnModel = config.columnModel, valueService = config.valueService, gridOptionsService = config.gridOptionsService, processCellCallback = config.processCellCallback, processHeaderCallback = config.processHeaderCallback, processGroupHeaderCallback = config.processGroupHeaderCallback, processRowGroupCallback = config.processRowGroupCallback;
55650 this.columnModel = columnModel;
55651 this.valueService = valueService;
55652 this.gridOptionsService = gridOptionsService;
55653 this.processCellCallback = processCellCallback;
55654 this.processHeaderCallback = processHeaderCallback;
55655 this.processGroupHeaderCallback = processGroupHeaderCallback;
55656 this.processRowGroupCallback = processRowGroupCallback;
55657 }
55658 BaseGridSerializingSession.prototype.prepare = function (columnsToExport) {
55659 this.groupColumns = columnsToExport.filter(function (col) { return !!col.getColDef().showRowGroup; });
55660 };
55661 BaseGridSerializingSession.prototype.extractHeaderValue = function (column) {
55662 var value = this.getHeaderName(this.processHeaderCallback, column);
55663 return value != null ? value : '';
55664 };
55665 BaseGridSerializingSession.prototype.extractRowCellValue = function (column, index, accumulatedRowIndex, type, node) {
55666 // we render the group summary text e.g. "-> Parent -> Child"...
55667 var hideOpenParents = this.gridOptionsService.is('groupHideOpenParents');
55668 var value = (!hideOpenParents && this.shouldRenderGroupSummaryCell(node, column, index))
55669 ? this.createValueForGroupNode(node)
55670 : this.valueService.getValue(column, node);
55671 var processedValue = this.processCell({
55672 accumulatedRowIndex: accumulatedRowIndex,
55673 rowNode: node,
55674 column: column,
55675 value: value,
55676 processCellCallback: this.processCellCallback,
55677 type: type
55678 });
55679 return processedValue != null ? processedValue : '';
55680 };
55681 BaseGridSerializingSession.prototype.shouldRenderGroupSummaryCell = function (node, column, currentColumnIndex) {
55682 var _a;
55683 var isGroupNode = node && node.group;
55684 // only on group rows
55685 if (!isGroupNode) {
55686 return false;
55687 }
55688 var currentColumnGroupIndex = this.groupColumns.indexOf(column);
55689 if (currentColumnGroupIndex !== -1) {
55690 if ((_a = node.groupData) === null || _a === void 0 ? void 0 : _a[column.getId()]) {
55691 return true;
55692 }
55693 // if this is a top level footer, always render`Total` in the left-most cell
55694 if (node.footer && node.level === -1) {
55695 var colDef = column.getColDef();
55696 var isFullWidth = colDef == null || colDef.showRowGroup === true;
55697 return isFullWidth || colDef.showRowGroup === this.columnModel.getRowGroupColumns()[0].getId();
55698 }
55699 }
55700 var isGroupUseEntireRow = this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());
55701 return currentColumnIndex === 0 && isGroupUseEntireRow;
55702 };
55703 BaseGridSerializingSession.prototype.getHeaderName = function (callback, column) {
55704 if (callback) {
55705 return callback({
55706 column: column,
55707 api: this.gridOptionsService.api,
55708 columnApi: this.gridOptionsService.columnApi,
55709 context: this.gridOptionsService.context
55710 });
55711 }
55712 return this.columnModel.getDisplayNameForColumn(column, 'csv', true);
55713 };
55714 BaseGridSerializingSession.prototype.createValueForGroupNode = function (node) {
55715 if (this.processRowGroupCallback) {
55716 return this.processRowGroupCallback({
55717 node: node,
55718 api: this.gridOptionsService.api,
55719 columnApi: this.gridOptionsService.columnApi,
55720 context: this.gridOptionsService.context,
55721 });
55722 }
55723 var isFooter = node.footer;
55724 var keys = [node.key];
55725 if (!this.gridOptionsService.isGroupMultiAutoColumn()) {
55726 while (node.parent) {
55727 node = node.parent;
55728 keys.push(node.key);
55729 }
55730 }
55731 var groupValue = keys.reverse().join(' -> ');
55732 return isFooter ? "Total " + groupValue : groupValue;
55733 };
55734 BaseGridSerializingSession.prototype.processCell = function (params) {
55735 var accumulatedRowIndex = params.accumulatedRowIndex, rowNode = params.rowNode, column = params.column, value = params.value, processCellCallback = params.processCellCallback, type = params.type;
55736 if (processCellCallback) {
55737 return processCellCallback({
55738 accumulatedRowIndex: accumulatedRowIndex,
55739 column: column,
55740 node: rowNode,
55741 value: value,
55742 api: this.gridOptionsService.api,
55743 columnApi: this.gridOptionsService.columnApi,
55744 context: this.gridOptionsService.context,
55745 type: type
55746 });
55747 }
55748 return value != null ? value : '';
55749 };
55750 return BaseGridSerializingSession;
55751}());
55752
55753
55754
55755/***/ }),
55756/* 261 */
55757/***/ (function(module, __webpack_exports__, __webpack_require__) {
55758
55759"use strict";
55760__webpack_require__.r(__webpack_exports__);
55761/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CsvCreator", function() { return CsvCreator; });
55762/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
55763/* harmony import */ var _baseCreator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(259);
55764/* harmony import */ var _downloader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(262);
55765/* harmony import */ var _sessions_csvSerializingSession__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(263);
55766var __extends = (undefined && undefined.__extends) || (function () {
55767 var extendStatics = function (d, b) {
55768 extendStatics = Object.setPrototypeOf ||
55769 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55770 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
55771 return extendStatics(d, b);
55772 };
55773 return function (d, b) {
55774 extendStatics(d, b);
55775 function __() { this.constructor = d; }
55776 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55777 };
55778})();
55779var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55780 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55781 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55782 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;
55783 return c > 3 && r && Object.defineProperty(target, key, r), r;
55784};
55785
55786
55787
55788
55789var CsvCreator = /** @class */ (function (_super) {
55790 __extends(CsvCreator, _super);
55791 function CsvCreator() {
55792 return _super !== null && _super.apply(this, arguments) || this;
55793 }
55794 CsvCreator.prototype.postConstruct = function () {
55795 this.setBeans({
55796 gridSerializer: this.gridSerializer,
55797 gridOptionsService: this.gridOptionsService
55798 });
55799 };
55800 CsvCreator.prototype.getMergedParams = function (params) {
55801 var baseParams = this.gridOptionsService.get('defaultCsvExportParams');
55802 return Object.assign({}, baseParams, params);
55803 };
55804 CsvCreator.prototype.export = function (userParams) {
55805 if (this.isExportSuppressed()) {
55806 console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");
55807 return '';
55808 }
55809 var mergedParams = this.getMergedParams(userParams);
55810 var data = this.getData(mergedParams);
55811 var packagedFile = new Blob(["\ufeff", data], { type: 'text/plain' });
55812 _downloader__WEBPACK_IMPORTED_MODULE_2__["Downloader"].download(this.getFileName(mergedParams.fileName), packagedFile);
55813 return data;
55814 };
55815 CsvCreator.prototype.exportDataAsCsv = function (params) {
55816 return this.export(params);
55817 };
55818 CsvCreator.prototype.getDataAsCsv = function (params, skipDefaultParams) {
55819 if (skipDefaultParams === void 0) { skipDefaultParams = false; }
55820 var mergedParams = skipDefaultParams
55821 ? Object.assign({}, params)
55822 : this.getMergedParams(params);
55823 return this.getData(mergedParams);
55824 };
55825 CsvCreator.prototype.getDefaultFileName = function () {
55826 return 'export.csv';
55827 };
55828 CsvCreator.prototype.getDefaultFileExtension = function () {
55829 return 'csv';
55830 };
55831 CsvCreator.prototype.createSerializingSession = function (params) {
55832 var _a = this, columnModel = _a.columnModel, valueService = _a.valueService, gridOptionsService = _a.gridOptionsService;
55833 var _b = params, processCellCallback = _b.processCellCallback, processHeaderCallback = _b.processHeaderCallback, processGroupHeaderCallback = _b.processGroupHeaderCallback, processRowGroupCallback = _b.processRowGroupCallback, suppressQuotes = _b.suppressQuotes, columnSeparator = _b.columnSeparator;
55834 return new _sessions_csvSerializingSession__WEBPACK_IMPORTED_MODULE_3__["CsvSerializingSession"]({
55835 columnModel: columnModel,
55836 valueService: valueService,
55837 gridOptionsService: gridOptionsService,
55838 processCellCallback: processCellCallback || undefined,
55839 processHeaderCallback: processHeaderCallback || undefined,
55840 processGroupHeaderCallback: processGroupHeaderCallback || undefined,
55841 processRowGroupCallback: processRowGroupCallback || undefined,
55842 suppressQuotes: suppressQuotes || false,
55843 columnSeparator: columnSeparator || ','
55844 });
55845 };
55846 CsvCreator.prototype.isExportSuppressed = function () {
55847 return this.gridOptionsService.is('suppressCsvExport');
55848 };
55849 __decorate([
55850 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
55851 ], CsvCreator.prototype, "columnModel", void 0);
55852 __decorate([
55853 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('valueService')
55854 ], CsvCreator.prototype, "valueService", void 0);
55855 __decorate([
55856 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridSerializer')
55857 ], CsvCreator.prototype, "gridSerializer", void 0);
55858 __decorate([
55859 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('gridOptionsService')
55860 ], CsvCreator.prototype, "gridOptionsService", void 0);
55861 __decorate([
55862 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
55863 ], CsvCreator.prototype, "postConstruct", null);
55864 CsvCreator = __decorate([
55865 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('csvCreator')
55866 ], CsvCreator);
55867 return CsvCreator;
55868}(_baseCreator__WEBPACK_IMPORTED_MODULE_1__["BaseCreator"]));
55869
55870
55871
55872/***/ }),
55873/* 262 */
55874/***/ (function(module, __webpack_exports__, __webpack_require__) {
55875
55876"use strict";
55877__webpack_require__.r(__webpack_exports__);
55878/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Downloader", function() { return Downloader; });
55879var Downloader = /** @class */ (function () {
55880 function Downloader() {
55881 }
55882 Downloader.download = function (fileName, content) {
55883 var win = document.defaultView || window;
55884 if (!win) {
55885 console.warn('AG Grid: There is no `window` associated with the current `document`');
55886 return;
55887 }
55888 var element = document.createElement('a');
55889 // @ts-ignore
55890 var url = win.URL.createObjectURL(content);
55891 element.setAttribute('href', url);
55892 element.setAttribute('download', fileName);
55893 element.style.display = 'none';
55894 document.body.appendChild(element);
55895 element.dispatchEvent(new MouseEvent('click', {
55896 bubbles: false,
55897 cancelable: true,
55898 view: win
55899 }));
55900 document.body.removeChild(element);
55901 win.setTimeout(function () {
55902 // @ts-ignore
55903 win.URL.revokeObjectURL(url);
55904 }, 0);
55905 };
55906 return Downloader;
55907}());
55908
55909
55910
55911/***/ }),
55912/* 263 */
55913/***/ (function(module, __webpack_exports__, __webpack_require__) {
55914
55915"use strict";
55916__webpack_require__.r(__webpack_exports__);
55917/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CsvSerializingSession", function() { return CsvSerializingSession; });
55918/* harmony import */ var _baseGridSerializingSession__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(260);
55919var __extends = (undefined && undefined.__extends) || (function () {
55920 var extendStatics = function (d, b) {
55921 extendStatics = Object.setPrototypeOf ||
55922 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
55923 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
55924 return extendStatics(d, b);
55925 };
55926 return function (d, b) {
55927 extendStatics(d, b);
55928 function __() { this.constructor = d; }
55929 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55930 };
55931})();
55932
55933var LINE_SEPARATOR = '\r\n';
55934var CsvSerializingSession = /** @class */ (function (_super) {
55935 __extends(CsvSerializingSession, _super);
55936 function CsvSerializingSession(config) {
55937 var _this = _super.call(this, config) || this;
55938 _this.isFirstLine = true;
55939 _this.result = '';
55940 var suppressQuotes = config.suppressQuotes, columnSeparator = config.columnSeparator;
55941 _this.suppressQuotes = suppressQuotes;
55942 _this.columnSeparator = columnSeparator;
55943 return _this;
55944 }
55945 CsvSerializingSession.prototype.addCustomContent = function (content) {
55946 var _this = this;
55947 if (!content) {
55948 return;
55949 }
55950 if (typeof content === 'string') {
55951 if (!/^\s*\n/.test(content)) {
55952 this.beginNewLine();
55953 }
55954 // replace whatever newlines are supplied with the style we're using
55955 content = content.replace(/\r?\n/g, LINE_SEPARATOR);
55956 this.result += content;
55957 }
55958 else {
55959 content.forEach(function (row) {
55960 _this.beginNewLine();
55961 row.forEach(function (cell, index) {
55962 if (index !== 0) {
55963 _this.result += _this.columnSeparator;
55964 }
55965 _this.result += _this.putInQuotes(cell.data.value || '');
55966 if (cell.mergeAcross) {
55967 _this.appendEmptyCells(cell.mergeAcross);
55968 }
55969 });
55970 });
55971 }
55972 };
55973 CsvSerializingSession.prototype.onNewHeaderGroupingRow = function () {
55974 this.beginNewLine();
55975 return {
55976 onColumn: this.onNewHeaderGroupingRowColumn.bind(this)
55977 };
55978 };
55979 CsvSerializingSession.prototype.onNewHeaderGroupingRowColumn = function (columnGroup, header, index, span) {
55980 if (index != 0) {
55981 this.result += this.columnSeparator;
55982 }
55983 this.result += this.putInQuotes(header);
55984 this.appendEmptyCells(span);
55985 };
55986 CsvSerializingSession.prototype.appendEmptyCells = function (count) {
55987 for (var i = 1; i <= count; i++) {
55988 this.result += this.columnSeparator + this.putInQuotes("");
55989 }
55990 };
55991 CsvSerializingSession.prototype.onNewHeaderRow = function () {
55992 this.beginNewLine();
55993 return {
55994 onColumn: this.onNewHeaderRowColumn.bind(this)
55995 };
55996 };
55997 CsvSerializingSession.prototype.onNewHeaderRowColumn = function (column, index) {
55998 if (index != 0) {
55999 this.result += this.columnSeparator;
56000 }
56001 this.result += this.putInQuotes(this.extractHeaderValue(column));
56002 };
56003 CsvSerializingSession.prototype.onNewBodyRow = function () {
56004 this.beginNewLine();
56005 return {
56006 onColumn: this.onNewBodyRowColumn.bind(this)
56007 };
56008 };
56009 CsvSerializingSession.prototype.onNewBodyRowColumn = function (column, index, node) {
56010 if (index != 0) {
56011 this.result += this.columnSeparator;
56012 }
56013 this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, 'csv', node));
56014 };
56015 CsvSerializingSession.prototype.putInQuotes = function (value) {
56016 if (this.suppressQuotes) {
56017 return value;
56018 }
56019 if (value === null || value === undefined) {
56020 return '""';
56021 }
56022 var stringValue;
56023 if (typeof value === 'string') {
56024 stringValue = value;
56025 }
56026 else if (typeof value.toString === 'function') {
56027 stringValue = value.toString();
56028 }
56029 else {
56030 console.warn('AG Grid: unknown value type during csv conversion');
56031 stringValue = '';
56032 }
56033 // replace each " with "" (ie two sets of double quotes is how to do double quotes in csv)
56034 var valueEscaped = stringValue.replace(/"/g, "\"\"");
56035 return '"' + valueEscaped + '"';
56036 };
56037 CsvSerializingSession.prototype.parse = function () {
56038 return this.result;
56039 };
56040 CsvSerializingSession.prototype.beginNewLine = function () {
56041 if (!this.isFirstLine) {
56042 this.result += LINE_SEPARATOR;
56043 }
56044 this.isFirstLine = false;
56045 };
56046 return CsvSerializingSession;
56047}(_baseGridSerializingSession__WEBPACK_IMPORTED_MODULE_0__["BaseGridSerializingSession"]));
56048
56049
56050
56051/***/ }),
56052/* 264 */
56053/***/ (function(module, __webpack_exports__, __webpack_require__) {
56054
56055"use strict";
56056__webpack_require__.r(__webpack_exports__);
56057/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CsvExportModule", function() { return CsvExportModule; });
56058/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
56059/* harmony import */ var _csvExport_csvCreator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(261);
56060/* harmony import */ var _csvExport_gridSerializer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(265);
56061/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(266);
56062
56063
56064
56065
56066var CsvExportModule = {
56067 version: _version__WEBPACK_IMPORTED_MODULE_3__["VERSION"],
56068 moduleName: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ModuleNames"].CsvExportModule,
56069 beans: [_csvExport_csvCreator__WEBPACK_IMPORTED_MODULE_1__["CsvCreator"], _csvExport_gridSerializer__WEBPACK_IMPORTED_MODULE_2__["GridSerializer"]]
56070};
56071
56072
56073/***/ }),
56074/* 265 */
56075/***/ (function(module, __webpack_exports__, __webpack_require__) {
56076
56077"use strict";
56078__webpack_require__.r(__webpack_exports__);
56079/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowType", function() { return RowType; });
56080/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridSerializer", function() { return GridSerializer; });
56081/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
56082var __extends = (undefined && undefined.__extends) || (function () {
56083 var extendStatics = function (d, b) {
56084 extendStatics = Object.setPrototypeOf ||
56085 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56086 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
56087 return extendStatics(d, b);
56088 };
56089 return function (d, b) {
56090 extendStatics(d, b);
56091 function __() { this.constructor = d; }
56092 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
56093 };
56094})();
56095var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
56096 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
56097 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
56098 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;
56099 return c > 3 && r && Object.defineProperty(target, key, r), r;
56100};
56101
56102var RowType;
56103(function (RowType) {
56104 RowType[RowType["HEADER_GROUPING"] = 0] = "HEADER_GROUPING";
56105 RowType[RowType["HEADER"] = 1] = "HEADER";
56106 RowType[RowType["BODY"] = 2] = "BODY";
56107})(RowType || (RowType = {}));
56108var GridSerializer = /** @class */ (function (_super) {
56109 __extends(GridSerializer, _super);
56110 function GridSerializer() {
56111 return _super !== null && _super.apply(this, arguments) || this;
56112 }
56113 GridSerializer.prototype.serialize = function (gridSerializingSession, params) {
56114 if (params === void 0) { params = {}; }
56115 var columnsToExport = this.getColumnsToExport(params.allColumns, params.columnKeys);
56116 var serializeChain = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].compose(
56117 // first pass, put in the header names of the cols
56118 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));
56119 return serializeChain(gridSerializingSession).parse();
56120 };
56121 GridSerializer.prototype.processRow = function (gridSerializingSession, params, columnsToExport, node) {
56122 var rowSkipper = params.shouldRowBeSkipped || (function () { return false; });
56123 var context = this.gridOptionsService.context;
56124 var api = this.gridOptionsService.api;
56125 var columnApi = this.gridOptionsService.columnApi;
56126 var skipSingleChildrenGroup = this.gridOptionsService.is('groupRemoveSingleChildren');
56127 var skipLowestSingleChildrenGroup = this.gridOptionsService.is('groupRemoveLowestSingleChildren');
56128 // if onlySelected, we ignore groupHideOpenParents as the user has explicitly selected the rows they wish to export.
56129 // similarly, if specific rowNodes are provided we do the same. (the clipboard service uses rowNodes to define which rows to export)
56130 var isClipboardExport = params.rowPositions != null;
56131 var isExplicitExportSelection = isClipboardExport || !!params.onlySelected;
56132 var hideOpenParents = this.gridOptionsService.is('groupHideOpenParents') && !isExplicitExportSelection;
56133 var isLeafNode = this.columnModel.isPivotMode() ? node.leafGroup : !node.group;
56134 var skipRowGroups = params.skipGroups || params.skipRowGroups;
56135 var shouldSkipLowestGroup = skipLowestSingleChildrenGroup && node.leafGroup;
56136 var shouldSkipCurrentGroup = node.allChildrenCount === 1 && (skipSingleChildrenGroup || shouldSkipLowestGroup);
56137 if (skipRowGroups && params.skipGroups) {
56138 _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');
56139 }
56140 if ((!isLeafNode && (params.skipRowGroups || shouldSkipCurrentGroup || hideOpenParents)) ||
56141 (params.onlySelected && !node.isSelected()) ||
56142 (params.skipPinnedTop && node.rowPinned === 'top') ||
56143 (params.skipPinnedBottom && node.rowPinned === 'bottom')) {
56144 return;
56145 }
56146 // if we are in pivotMode, then the grid will show the root node only
56147 // if it's not a leaf group
56148 var nodeIsRootNode = node.level === -1;
56149 if (nodeIsRootNode && !node.leafGroup && !node.footer) {
56150 return;
56151 }
56152 var shouldRowBeSkipped = rowSkipper({ node: node, api: api, columnApi: columnApi, context: context });
56153 if (shouldRowBeSkipped) {
56154 return;
56155 }
56156 var rowAccumulator = gridSerializingSession.onNewBodyRow();
56157 columnsToExport.forEach(function (column, index) {
56158 rowAccumulator.onColumn(column, index, node);
56159 });
56160 if (params.getCustomContentBelowRow) {
56161 var content = params.getCustomContentBelowRow({ node: node, api: api, columnApi: columnApi, context: context });
56162 if (content) {
56163 gridSerializingSession.addCustomContent(content);
56164 }
56165 }
56166 };
56167 GridSerializer.prototype.appendContent = function (params) {
56168 return function (gridSerializingSession) {
56169 var appendContent = params.customFooter || params.appendContent;
56170 if (appendContent) {
56171 if (params.customFooter) {
56172 _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');
56173 }
56174 gridSerializingSession.addCustomContent(appendContent);
56175 }
56176 return gridSerializingSession;
56177 };
56178 };
56179 GridSerializer.prototype.prependContent = function (params) {
56180 return function (gridSerializingSession) {
56181 var prependContent = params.customHeader || params.prependContent;
56182 if (prependContent) {
56183 if (params.customHeader) {
56184 _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');
56185 }
56186 gridSerializingSession.addCustomContent(prependContent);
56187 }
56188 return gridSerializingSession;
56189 };
56190 };
56191 GridSerializer.prototype.prepareSession = function (columnsToExport) {
56192 return function (gridSerializingSession) {
56193 gridSerializingSession.prepare(columnsToExport);
56194 return gridSerializingSession;
56195 };
56196 };
56197 GridSerializer.prototype.exportColumnGroups = function (params, columnsToExport) {
56198 var _this = this;
56199 return function (gridSerializingSession) {
56200 if (!params.skipColumnGroupHeaders) {
56201 var groupInstanceIdCreator = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["GroupInstanceIdCreator"]();
56202 var displayedGroups = _this.displayedGroupCreator.createDisplayedGroups(columnsToExport, _this.columnModel.getGridBalancedTree(), groupInstanceIdCreator, null);
56203 _this.recursivelyAddHeaderGroups(displayedGroups, gridSerializingSession, params.processGroupHeaderCallback);
56204 }
56205 else if (params.columnGroups) {
56206 _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');
56207 }
56208 return gridSerializingSession;
56209 };
56210 };
56211 GridSerializer.prototype.exportHeaders = function (params, columnsToExport) {
56212 return function (gridSerializingSession) {
56213 if (!params.skipHeader && !params.skipColumnHeaders) {
56214 var gridRowIterator_1 = gridSerializingSession.onNewHeaderRow();
56215 columnsToExport.forEach(function (column, index) {
56216 gridRowIterator_1.onColumn(column, index, undefined);
56217 });
56218 }
56219 else if (params.skipHeader) {
56220 _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');
56221 }
56222 return gridSerializingSession;
56223 };
56224 };
56225 GridSerializer.prototype.processPinnedTopRows = function (params, columnsToExport) {
56226 var _this = this;
56227 return function (gridSerializingSession) {
56228 var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);
56229 if (params.rowPositions) {
56230 params.rowPositions
56231 // only pinnedTop rows, other models are processed by `processRows` and `processPinnedBottomsRows`
56232 .filter(function (position) { return position.rowPinned === 'top'; })
56233 .sort(function (a, b) { return a.rowIndex - b.rowIndex; })
56234 .map(function (position) { return _this.pinnedRowModel.getPinnedTopRow(position.rowIndex); })
56235 .forEach(processRow);
56236 }
56237 else {
56238 _this.pinnedRowModel.forEachPinnedTopRow(processRow);
56239 }
56240 return gridSerializingSession;
56241 };
56242 };
56243 GridSerializer.prototype.processRows = function (params, columnsToExport) {
56244 var _this = this;
56245 return function (gridSerializingSession) {
56246 // when in pivot mode, we always render cols on screen, never 'all columns'
56247 var rowModel = _this.rowModel;
56248 var rowModelType = rowModel.getType();
56249 var usingCsrm = rowModelType === 'clientSide';
56250 var usingSsrm = rowModelType === 'serverSide';
56251 var onlySelectedNonStandardModel = !usingCsrm && params.onlySelected;
56252 var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);
56253 var _a = params.exportedRows, exportedRows = _a === void 0 ? 'filteredAndSorted' : _a;
56254 if (params.rowPositions) {
56255 params.rowPositions
56256 // pinnedRows are processed by `processPinnedTopRows` and `processPinnedBottomsRows`
56257 .filter(function (position) { return position.rowPinned == null; })
56258 .sort(function (a, b) { return a.rowIndex - b.rowIndex; })
56259 .map(function (position) { return rowModel.getRow(position.rowIndex); })
56260 .forEach(processRow);
56261 }
56262 else if (_this.columnModel.isPivotMode()) {
56263 if (usingCsrm) {
56264 rowModel.forEachPivotNode(processRow, true);
56265 }
56266 else {
56267 // must be enterprise, so we can just loop through all the nodes
56268 rowModel.forEachNode(processRow);
56269 }
56270 }
56271 else {
56272 // onlySelectedAllPages: user doing pagination and wants selected items from
56273 // other pages, so cannot use the standard row model as it won't have rows from
56274 // other pages.
56275 // onlySelectedNonStandardModel: if user wants selected in non standard row model
56276 // (eg viewport) then again RowModel cannot be used, so need to use selected instead.
56277 if (params.onlySelectedAllPages || onlySelectedNonStandardModel) {
56278 var selectedNodes = _this.selectionService.getSelectedNodes();
56279 _this.replicateSortedOrder(selectedNodes);
56280 // serialize each node
56281 selectedNodes.forEach(processRow);
56282 }
56283 else {
56284 // here is everything else - including standard row model and selected. we don't use
56285 // the selection model even when just using selected, so that the result is the order
56286 // of the rows appearing on the screen.
56287 if (exportedRows === 'all') {
56288 rowModel.forEachNode(processRow);
56289 }
56290 else if (usingCsrm) {
56291 rowModel.forEachNodeAfterFilterAndSort(processRow, true);
56292 }
56293 else if (usingSsrm) {
56294 rowModel.forEachNodeAfterFilterAndSort(processRow);
56295 }
56296 else {
56297 rowModel.forEachNode(processRow);
56298 }
56299 }
56300 }
56301 return gridSerializingSession;
56302 };
56303 };
56304 GridSerializer.prototype.replicateSortedOrder = function (rows) {
56305 var _this = this;
56306 var sortOptions = this.sortController.getSortOptions();
56307 var compareNodes = function (rowA, rowB) {
56308 var _a, _b, _c, _d;
56309 if (rowA.rowIndex != null && rowB.rowIndex != null) {
56310 // if the rows have rowIndexes, this is the easiest way to compare,
56311 // as they're already ordered
56312 return rowA.rowIndex - rowB.rowIndex;
56313 }
56314 // if the level is the same, compare these nodes, or their parents
56315 if (rowA.level === rowB.level) {
56316 if (((_a = rowA.parent) === null || _a === void 0 ? void 0 : _a.id) === ((_b = rowB.parent) === null || _b === void 0 ? void 0 : _b.id)) {
56317 return _this.rowNodeSorter.compareRowNodes(sortOptions, {
56318 rowNode: rowA,
56319 currentPos: (_c = rowA.rowIndex) !== null && _c !== void 0 ? _c : -1,
56320 }, {
56321 rowNode: rowB,
56322 currentPos: (_d = rowB.rowIndex) !== null && _d !== void 0 ? _d : -1,
56323 });
56324 }
56325 // level is same, but parent isn't, compare parents
56326 return compareNodes(rowA.parent, rowB.parent);
56327 }
56328 // if level is different, match levels
56329 if (rowA.level > rowB.level) {
56330 return compareNodes(rowA.parent, rowB);
56331 }
56332 return compareNodes(rowA, rowB.parent);
56333 };
56334 // sort the nodes either by existing row index or compare them
56335 rows.sort(compareNodes);
56336 };
56337 GridSerializer.prototype.processPinnedBottomRows = function (params, columnsToExport) {
56338 var _this = this;
56339 return function (gridSerializingSession) {
56340 var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);
56341 if (params.rowPositions) {
56342 params.rowPositions
56343 // only pinnedBottom rows, other models are processed by `processRows` and `processPinnedTopRows`
56344 .filter(function (position) { return position.rowPinned === 'bottom'; })
56345 .sort(function (a, b) { return a.rowIndex - b.rowIndex; })
56346 .map(function (position) { return _this.pinnedRowModel.getPinnedBottomRow(position.rowIndex); })
56347 .forEach(processRow);
56348 }
56349 else {
56350 _this.pinnedRowModel.forEachPinnedBottomRow(processRow);
56351 }
56352 return gridSerializingSession;
56353 };
56354 };
56355 GridSerializer.prototype.getColumnsToExport = function (allColumns, columnKeys) {
56356 if (allColumns === void 0) { allColumns = false; }
56357 var isPivotMode = this.columnModel.isPivotMode();
56358 if (columnKeys && columnKeys.length) {
56359 return this.columnModel.getGridColumns(columnKeys);
56360 }
56361 if (allColumns && !isPivotMode) {
56362 // add auto group column for tree data
56363 var columns = this.gridOptionsService.isTreeData()
56364 ? this.columnModel.getGridColumns([_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["GROUP_AUTO_COLUMN_ID"]])
56365 : [];
56366 return columns.concat(this.columnModel.getAllPrimaryColumns() || []);
56367 }
56368 return this.columnModel.getAllDisplayedColumns();
56369 };
56370 GridSerializer.prototype.recursivelyAddHeaderGroups = function (displayedGroups, gridSerializingSession, processGroupHeaderCallback) {
56371 var directChildrenHeaderGroups = [];
56372 displayedGroups.forEach(function (columnGroupChild) {
56373 var columnGroup = columnGroupChild;
56374 if (!columnGroup.getChildren) {
56375 return;
56376 }
56377 columnGroup.getChildren().forEach(function (it) { return directChildrenHeaderGroups.push(it); });
56378 });
56379 if (displayedGroups.length > 0 && displayedGroups[0] instanceof _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ColumnGroup"]) {
56380 this.doAddHeaderHeader(gridSerializingSession, displayedGroups, processGroupHeaderCallback);
56381 }
56382 if (directChildrenHeaderGroups && directChildrenHeaderGroups.length > 0) {
56383 this.recursivelyAddHeaderGroups(directChildrenHeaderGroups, gridSerializingSession, processGroupHeaderCallback);
56384 }
56385 };
56386 GridSerializer.prototype.doAddHeaderHeader = function (gridSerializingSession, displayedGroups, processGroupHeaderCallback) {
56387 var _this = this;
56388 var gridRowIterator = gridSerializingSession.onNewHeaderGroupingRow();
56389 var columnIndex = 0;
56390 displayedGroups.forEach(function (columnGroupChild) {
56391 var columnGroup = columnGroupChild;
56392 var name;
56393 if (processGroupHeaderCallback) {
56394 name = processGroupHeaderCallback({
56395 columnGroup: columnGroup,
56396 api: _this.gridOptionsService.api,
56397 columnApi: _this.gridOptionsService.columnApi,
56398 context: _this.gridOptionsService.context
56399 });
56400 }
56401 else {
56402 name = _this.columnModel.getDisplayNameForColumnGroup(columnGroup, 'header');
56403 }
56404 var collapsibleGroupRanges = columnGroup.getLeafColumns().reduce(function (collapsibleGroups, currentColumn, currentIdx, arr) {
56405 var lastGroup = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].last(collapsibleGroups);
56406 var groupShow = currentColumn.getColumnGroupShow() === 'open';
56407 if (!groupShow) {
56408 if (lastGroup && lastGroup[1] == null) {
56409 lastGroup[1] = currentIdx - 1;
56410 }
56411 }
56412 else if (!lastGroup || lastGroup[1] != null) {
56413 lastGroup = [currentIdx];
56414 collapsibleGroups.push(lastGroup);
56415 }
56416 if (currentIdx === arr.length - 1 && lastGroup && lastGroup[1] == null) {
56417 lastGroup[1] = currentIdx;
56418 }
56419 return collapsibleGroups;
56420 }, []);
56421 gridRowIterator.onColumn(columnGroup, name || '', columnIndex++, columnGroup.getLeafColumns().length - 1, collapsibleGroupRanges);
56422 });
56423 };
56424 __decorate([
56425 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('displayedGroupCreator')
56426 ], GridSerializer.prototype, "displayedGroupCreator", void 0);
56427 __decorate([
56428 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('columnModel')
56429 ], GridSerializer.prototype, "columnModel", void 0);
56430 __decorate([
56431 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowModel')
56432 ], GridSerializer.prototype, "rowModel", void 0);
56433 __decorate([
56434 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('pinnedRowModel')
56435 ], GridSerializer.prototype, "pinnedRowModel", void 0);
56436 __decorate([
56437 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('selectionService')
56438 ], GridSerializer.prototype, "selectionService", void 0);
56439 __decorate([
56440 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowNodeSorter')
56441 ], GridSerializer.prototype, "rowNodeSorter", void 0);
56442 __decorate([
56443 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortController')
56444 ], GridSerializer.prototype, "sortController", void 0);
56445 GridSerializer = __decorate([
56446 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])("gridSerializer")
56447 ], GridSerializer);
56448 return GridSerializer;
56449}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
56450
56451
56452
56453/***/ }),
56454/* 266 */
56455/***/ (function(module, __webpack_exports__, __webpack_require__) {
56456
56457"use strict";
56458__webpack_require__.r(__webpack_exports__);
56459/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
56460// DO NOT UPDATE MANUALLY: Generated from script during build time
56461var VERSION = '29.2.0';
56462
56463
56464/***/ }),
56465/* 267 */
56466/***/ (function(module, __webpack_exports__, __webpack_require__) {
56467
56468"use strict";
56469__webpack_require__.r(__webpack_exports__);
56470/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "XmlFactory", function() { return XmlFactory; });
56471var LINE_SEPARATOR = '\r\n';
56472var XmlFactory = /** @class */ (function () {
56473 function XmlFactory() {
56474 }
56475 XmlFactory.createHeader = function (headerElement) {
56476 if (headerElement === void 0) { headerElement = {}; }
56477 var headerStart = '<?';
56478 var headerEnd = '?>';
56479 var keys = ['version'];
56480 if (!headerElement.version) {
56481 headerElement.version = "1.0";
56482 }
56483 if (headerElement.encoding) {
56484 keys.push('encoding');
56485 }
56486 if (headerElement.standalone) {
56487 keys.push('standalone');
56488 }
56489 var att = keys.map(function (key) { return key + "=\"" + headerElement[key] + "\""; }).join(' ');
56490 return headerStart + "xml " + att + " " + headerEnd;
56491 };
56492 XmlFactory.createXml = function (xmlElement, booleanTransformer) {
56493 var _this = this;
56494 var props = '';
56495 if (xmlElement.properties) {
56496 if (xmlElement.properties.prefixedAttributes) {
56497 xmlElement.properties.prefixedAttributes.forEach(function (prefixedSet) {
56498 Object.keys(prefixedSet.map).forEach(function (key) {
56499 props += _this.returnAttributeIfPopulated(prefixedSet.prefix + key, prefixedSet.map[key], booleanTransformer);
56500 });
56501 });
56502 }
56503 if (xmlElement.properties.rawMap) {
56504 Object.keys(xmlElement.properties.rawMap).forEach(function (key) {
56505 props += _this.returnAttributeIfPopulated(key, xmlElement.properties.rawMap[key], booleanTransformer);
56506 });
56507 }
56508 }
56509 var result = '<' + xmlElement.name + props;
56510 if (!xmlElement.children && xmlElement.textNode == null) {
56511 return result + '/>' + LINE_SEPARATOR;
56512 }
56513 if (xmlElement.textNode != null) {
56514 return result + '>' + xmlElement.textNode + '</' + xmlElement.name + '>' + LINE_SEPARATOR;
56515 }
56516 result += '>' + LINE_SEPARATOR;
56517 if (xmlElement.children) {
56518 xmlElement.children.forEach(function (it) {
56519 result += _this.createXml(it, booleanTransformer);
56520 });
56521 }
56522 return result + '</' + xmlElement.name + '>' + LINE_SEPARATOR;
56523 };
56524 XmlFactory.returnAttributeIfPopulated = function (key, value, booleanTransformer) {
56525 if (!value && value !== '' && value !== 0) {
56526 return '';
56527 }
56528 var xmlValue = value;
56529 if ((typeof (value) === 'boolean')) {
56530 if (booleanTransformer) {
56531 xmlValue = booleanTransformer(value);
56532 }
56533 }
56534 return " " + key + "=\"" + xmlValue + "\"";
56535 };
56536 return XmlFactory;
56537}());
56538
56539
56540
56541/***/ }),
56542/* 268 */
56543/***/ (function(module, __webpack_exports__, __webpack_require__) {
56544
56545"use strict";
56546__webpack_require__.r(__webpack_exports__);
56547/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipContainer", function() { return ZipContainer; });
56548/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
56549var __values = (undefined && undefined.__values) || function(o) {
56550 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
56551 if (m) return m.call(o);
56552 if (o && typeof o.length === "number") return {
56553 next: function () {
56554 if (o && i >= o.length) o = void 0;
56555 return { value: o && o[i++], done: !o };
56556 }
56557 };
56558 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
56559};
56560
56561// table for crc calculation
56562// from: https://referencesource.microsoft.com/#System/sys/System/IO/compression/Crc32Helper.cs,3b31978c7d7f7246,references
56563var crcTable = new Uint32Array([
56564 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
56565 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
56566 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
56567 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
56568 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
56569 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
56570 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
56571 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
56572 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
56573 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
56574 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
56575 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
56576 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
56577 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
56578 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
56579 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
56580 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
56581 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
56582 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
56583 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
56584 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
56585 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
56586 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
56587 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
56588 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
56589 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
56590 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
56591 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
56592 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
56593 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
56594 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
56595 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
56596 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
56597 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
56598 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
56599 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
56600 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
56601 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
56602 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
56603 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
56604 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
56605 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
56606 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
56607]);
56608var ZipContainer = /** @class */ (function () {
56609 function ZipContainer() {
56610 }
56611 ZipContainer.addFolders = function (paths) {
56612 paths.forEach(this.addFolder.bind(this));
56613 };
56614 ZipContainer.addFolder = function (path) {
56615 this.folders.push({
56616 path: path,
56617 created: new Date(),
56618 isBase64: false
56619 });
56620 };
56621 ZipContainer.addFile = function (path, content, isBase64) {
56622 if (isBase64 === void 0) { isBase64 = false; }
56623 this.files.push({
56624 path: path,
56625 created: new Date(),
56626 content: content,
56627 isBase64: isBase64
56628 });
56629 };
56630 ZipContainer.getContent = function (mimeType) {
56631 if (mimeType === void 0) { mimeType = 'application/zip'; }
56632 var textOutput = this.buildFileStream();
56633 var uInt8Output = this.buildUint8Array(textOutput);
56634 this.clearStream();
56635 return new Blob([uInt8Output], { type: mimeType });
56636 };
56637 ZipContainer.clearStream = function () {
56638 this.folders = [];
56639 this.files = [];
56640 };
56641 ZipContainer.buildFileStream = function (fData) {
56642 var e_1, _a;
56643 if (fData === void 0) { fData = ''; }
56644 var totalFiles = this.folders.concat(this.files);
56645 var len = totalFiles.length;
56646 var foData = '';
56647 var lL = 0;
56648 var cL = 0;
56649 try {
56650 for (var totalFiles_1 = __values(totalFiles), totalFiles_1_1 = totalFiles_1.next(); !totalFiles_1_1.done; totalFiles_1_1 = totalFiles_1.next()) {
56651 var currentFile = totalFiles_1_1.value;
56652 var _b = this.getHeader(currentFile, lL), fileHeader = _b.fileHeader, folderHeader = _b.folderHeader, content = _b.content;
56653 lL += fileHeader.length + content.length;
56654 cL += folderHeader.length;
56655 fData += fileHeader + content;
56656 foData += folderHeader;
56657 }
56658 }
56659 catch (e_1_1) { e_1 = { error: e_1_1 }; }
56660 finally {
56661 try {
56662 if (totalFiles_1_1 && !totalFiles_1_1.done && (_a = totalFiles_1.return)) _a.call(totalFiles_1);
56663 }
56664 finally { if (e_1) throw e_1.error; }
56665 }
56666 var foEnd = this.buildFolderEnd(len, cL, lL);
56667 return fData + foData + foEnd;
56668 };
56669 ZipContainer.getHeader = function (currentFile, offset) {
56670 var content = currentFile.content, path = currentFile.path, created = currentFile.created, isBase64 = currentFile.isBase64;
56671 var utf8_encode = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].utf8_encode, decToHex = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].decToHex;
56672 var utfPath = utf8_encode(path);
56673 var isUTF8 = utfPath !== path;
56674 var time = this.convertTime(created);
56675 var dt = this.convertDate(created);
56676 var extraFields = '';
56677 if (isUTF8) {
56678 var uExtraFieldPath = decToHex(1, 1) + decToHex(this.getFromCrc32Table(utfPath), 4) + utfPath;
56679 extraFields = "\x75\x70" + decToHex(uExtraFieldPath.length, 2) + uExtraFieldPath;
56680 }
56681 var _a = !content ? { size: 0, content: '' } : this.getConvertedContent(content, isBase64), size = _a.size, convertedContent = _a.content;
56682 var header = '\x0A\x00' +
56683 (isUTF8 ? '\x00\x08' : '\x00\x00') +
56684 '\x00\x00' +
56685 decToHex(time, 2) + // last modified time
56686 decToHex(dt, 2) + // last modified date
56687 decToHex(size ? this.getFromCrc32Table(convertedContent) : 0, 4) +
56688 decToHex(size, 4) + // compressed size
56689 decToHex(size, 4) + // uncompressed size
56690 decToHex(utfPath.length, 2) + // file name length
56691 decToHex(extraFields.length, 2); // extra field length
56692 var fileHeader = 'PK\x03\x04' + header + utfPath + extraFields;
56693 var folderHeader = 'PK\x01\x02' + // central header
56694 '\x14\x00' +
56695 header + // file header
56696 '\x00\x00' +
56697 '\x00\x00' +
56698 '\x00\x00' +
56699 (content ? '\x00\x00\x00\x00' : '\x10\x00\x00\x00') + // external file attributes
56700 decToHex(offset, 4) + // relative offset of local header
56701 utfPath + // file name
56702 extraFields; // extra field
56703 return { fileHeader: fileHeader, folderHeader: folderHeader, content: convertedContent || '' };
56704 };
56705 ZipContainer.getConvertedContent = function (content, isBase64) {
56706 if (isBase64 === void 0) { isBase64 = false; }
56707 if (isBase64) {
56708 content = content.split(';base64,')[1];
56709 }
56710 content = isBase64 ? atob(content) : content;
56711 return {
56712 size: content.length,
56713 content: content
56714 };
56715 };
56716 ZipContainer.buildFolderEnd = function (tLen, cLen, lLen) {
56717 var decToHex = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].decToHex;
56718 return 'PK\x05\x06' + // central folder end
56719 '\x00\x00' +
56720 '\x00\x00' +
56721 decToHex(tLen, 2) + // total number of entries in the central folder
56722 decToHex(tLen, 2) + // total number of entries in the central folder
56723 decToHex(cLen, 4) + // size of the central folder
56724 decToHex(lLen, 4) + // central folder start offset
56725 '\x00\x00';
56726 };
56727 ZipContainer.buildUint8Array = function (content) {
56728 var uint8 = new Uint8Array(content.length);
56729 for (var i = 0; i < uint8.length; i++) {
56730 uint8[i] = content.charCodeAt(i);
56731 }
56732 return uint8;
56733 };
56734 ZipContainer.getFromCrc32Table = function (content) {
56735 if (!content.length) {
56736 return 0;
56737 }
56738 var size = content.length;
56739 var iterable = new Uint8Array(size);
56740 for (var i = 0; i < size; i++) {
56741 iterable[i] = content.charCodeAt(i);
56742 }
56743 var crc = 0 ^ (-1);
56744 var j = 0;
56745 var k = 0;
56746 var l = 0;
56747 for (var i = 0; i < size; i++) {
56748 j = iterable[i];
56749 k = (crc ^ j) & 0xFF;
56750 l = crcTable[k];
56751 crc = (crc >>> 8) ^ l;
56752 }
56753 return crc ^ (-1);
56754 };
56755 ZipContainer.convertTime = function (date) {
56756 var time = date.getHours();
56757 time <<= 6;
56758 time = time | date.getMinutes();
56759 time <<= 5;
56760 time = time | date.getSeconds() / 2;
56761 return time;
56762 };
56763 ZipContainer.convertDate = function (date) {
56764 var dt = date.getFullYear() - 1980;
56765 dt <<= 4;
56766 dt = dt | (date.getMonth() + 1);
56767 dt <<= 5;
56768 dt = dt | date.getDate();
56769 return dt;
56770 };
56771 ZipContainer.folders = [];
56772 ZipContainer.files = [];
56773 return ZipContainer;
56774}());
56775
56776
56777
56778/***/ }),
56779/* 269 */
56780/***/ (function(module, __webpack_exports__, __webpack_require__) {
56781
56782"use strict";
56783__webpack_require__.r(__webpack_exports__);
56784/* harmony import */ var _infiniteRowModelModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(270);
56785/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InfiniteRowModelModule", function() { return _infiniteRowModelModule__WEBPACK_IMPORTED_MODULE_0__["InfiniteRowModelModule"]; });
56786
56787
56788
56789
56790/***/ }),
56791/* 270 */
56792/***/ (function(module, __webpack_exports__, __webpack_require__) {
56793
56794"use strict";
56795__webpack_require__.r(__webpack_exports__);
56796/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InfiniteRowModelModule", function() { return InfiniteRowModelModule; });
56797/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
56798/* harmony import */ var _infiniteRowModel_infiniteRowModel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(271);
56799/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(274);
56800
56801
56802
56803var InfiniteRowModelModule = {
56804 version: _version__WEBPACK_IMPORTED_MODULE_2__["VERSION"],
56805 moduleName: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["ModuleNames"].InfiniteRowModelModule,
56806 rowModel: 'infinite',
56807 beans: [_infiniteRowModel_infiniteRowModel__WEBPACK_IMPORTED_MODULE_1__["InfiniteRowModel"]],
56808};
56809
56810
56811/***/ }),
56812/* 271 */
56813/***/ (function(module, __webpack_exports__, __webpack_require__) {
56814
56815"use strict";
56816__webpack_require__.r(__webpack_exports__);
56817/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InfiniteRowModel", function() { return InfiniteRowModel; });
56818/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
56819/* harmony import */ var _infiniteCache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(272);
56820var __extends = (undefined && undefined.__extends) || (function () {
56821 var extendStatics = function (d, b) {
56822 extendStatics = Object.setPrototypeOf ||
56823 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56824 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
56825 return extendStatics(d, b);
56826 };
56827 return function (d, b) {
56828 extendStatics(d, b);
56829 function __() { this.constructor = d; }
56830 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
56831 };
56832})();
56833var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
56834 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
56835 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
56836 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;
56837 return c > 3 && r && Object.defineProperty(target, key, r), r;
56838};
56839
56840
56841var InfiniteRowModel = /** @class */ (function (_super) {
56842 __extends(InfiniteRowModel, _super);
56843 function InfiniteRowModel() {
56844 return _super !== null && _super.apply(this, arguments) || this;
56845 }
56846 InfiniteRowModel.prototype.getRowBounds = function (index) {
56847 return {
56848 rowHeight: this.rowHeight,
56849 rowTop: this.rowHeight * index
56850 };
56851 };
56852 // we don't implement as lazy row heights is not supported in this row model
56853 InfiniteRowModel.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) {
56854 return false;
56855 };
56856 InfiniteRowModel.prototype.init = function () {
56857 var _this = this;
56858 if (!this.gridOptionsService.isRowModelType('infinite')) {
56859 return;
56860 }
56861 this.rowHeight = this.gridOptionsService.getRowHeightAsNumber();
56862 this.addEventListeners();
56863 this.addDestroyFunc(function () { return _this.destroyCache(); });
56864 this.verifyProps();
56865 };
56866 InfiniteRowModel.prototype.verifyProps = function () {
56867 if (this.gridOptionsService.exists('initialGroupOrderComparator') || this.gridOptionsService.exists('defaultGroupOrderComparator')) {
56868 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.";
56869 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].doOnce(function () { return console.warn(message_1); }, 'IRM.InitialGroupOrderComparator');
56870 }
56871 };
56872 InfiniteRowModel.prototype.start = function () {
56873 this.setDatasource(this.gridOptionsService.get('datasource'));
56874 };
56875 InfiniteRowModel.prototype.destroyDatasource = function () {
56876 if (this.datasource) {
56877 this.getContext().destroyBean(this.datasource);
56878 this.rowRenderer.datasourceChanged();
56879 this.datasource = null;
56880 }
56881 };
56882 InfiniteRowModel.prototype.addEventListeners = function () {
56883 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));
56884 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_SORT_CHANGED, this.onSortChanged.bind(this));
56885 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_NEW_COLUMNS_LOADED, this.onColumnEverything.bind(this));
56886 this.addManagedListener(this.eventService, _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_STORE_UPDATED, this.onCacheUpdated.bind(this));
56887 };
56888 InfiniteRowModel.prototype.onFilterChanged = function () {
56889 this.reset();
56890 };
56891 InfiniteRowModel.prototype.onSortChanged = function () {
56892 this.reset();
56893 };
56894 InfiniteRowModel.prototype.onColumnEverything = function () {
56895 var resetRequired;
56896 // if cache params, we require reset only if sort model has changed. we don't need to check
56897 // for filter model, as the filter manager will fire an event when columns change that result
56898 // in the filter changing.
56899 if (this.cacheParams) {
56900 resetRequired = this.isSortModelDifferent();
56901 }
56902 else {
56903 // if no cacheParams, means first time creating the cache, so always create one
56904 resetRequired = true;
56905 }
56906 if (resetRequired) {
56907 this.reset();
56908 }
56909 };
56910 InfiniteRowModel.prototype.isSortModelDifferent = function () {
56911 return !_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].jsonEquals(this.cacheParams.sortModel, this.sortController.getSortModel());
56912 };
56913 InfiniteRowModel.prototype.getType = function () {
56914 return 'infinite';
56915 };
56916 InfiniteRowModel.prototype.setDatasource = function (datasource) {
56917 this.destroyDatasource();
56918 this.datasource = datasource;
56919 // only reset if we have a valid datasource to working with
56920 if (datasource) {
56921 this.reset();
56922 }
56923 };
56924 InfiniteRowModel.prototype.isEmpty = function () {
56925 return !this.infiniteCache;
56926 };
56927 InfiniteRowModel.prototype.isRowsToRender = function () {
56928 return !!this.infiniteCache;
56929 };
56930 InfiniteRowModel.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {
56931 return this.infiniteCache ? this.infiniteCache.getRowNodesInRange(firstInRange, lastInRange) : [];
56932 };
56933 InfiniteRowModel.prototype.reset = function () {
56934 // important to return here, as the user could be setting filter or sort before
56935 // data-source is set
56936 if (!this.datasource) {
56937 return;
56938 }
56939 // if user is providing id's, then this means we can keep the selection between datasource hits,
56940 // as the rows will keep their unique id's even if, for example, server side sorting or filtering
56941 // is done.
56942 var getRowIdFunc = this.gridOptionsService.getRowIdFunc();
56943 var userGeneratingIds = getRowIdFunc != null;
56944 if (!userGeneratingIds) {
56945 this.selectionService.reset();
56946 }
56947 this.resetCache();
56948 var event = this.createModelUpdatedEvent();
56949 this.eventService.dispatchEvent(event);
56950 };
56951 InfiniteRowModel.prototype.createModelUpdatedEvent = function () {
56952 return {
56953 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_MODEL_UPDATED,
56954 // not sure if these should all be false - noticed if after implementing,
56955 // maybe they should be true?
56956 newPage: false,
56957 newData: false,
56958 keepRenderedRows: true,
56959 animate: false
56960 };
56961 };
56962 InfiniteRowModel.prototype.resetCache = function () {
56963 // if not first time creating a cache, need to destroy the old one
56964 this.destroyCache();
56965 this.cacheParams = {
56966 // the user provided datasource
56967 datasource: this.datasource,
56968 // sort and filter model
56969 filterModel: this.filterManager.getFilterModel(),
56970 sortModel: this.sortController.getSortModel(),
56971 rowNodeBlockLoader: this.rowNodeBlockLoader,
56972 // properties - this way we take a snapshot of them, so if user changes any, they will be
56973 // used next time we create a new cache, which is generally after a filter or sort change,
56974 // or a new datasource is set
56975 initialRowCount: this.defaultIfInvalid(this.gridOptionsService.getNum('infiniteInitialRowCount'), 1),
56976 maxBlocksInCache: this.gridOptionsService.getNum('maxBlocksInCache'),
56977 rowHeight: this.gridOptionsService.getRowHeightAsNumber(),
56978 // if user doesn't provide overflow, we use default overflow of 1, so user can scroll past
56979 // the current page and request first row of next page
56980 overflowSize: this.defaultIfInvalid(this.gridOptionsService.getNum('cacheOverflowSize'), 1),
56981 // page size needs to be 1 or greater. having it at 1 would be silly, as you would be hitting the
56982 // server for one page at a time. so the default if not specified is 100.
56983 blockSize: this.defaultIfInvalid(this.gridOptionsService.getNum('cacheBlockSize'), 100),
56984 // the cache could create this, however it is also used by the pages, so handy to create it
56985 // here as the settings are also passed to the pages
56986 lastAccessedSequence: new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["NumberSequence"]()
56987 };
56988 this.infiniteCache = this.createBean(new _infiniteCache__WEBPACK_IMPORTED_MODULE_1__["InfiniteCache"](this.cacheParams));
56989 };
56990 InfiniteRowModel.prototype.defaultIfInvalid = function (value, defaultValue) {
56991 return value > 0 ? value : defaultValue;
56992 };
56993 InfiniteRowModel.prototype.destroyCache = function () {
56994 if (this.infiniteCache) {
56995 this.infiniteCache = this.destroyBean(this.infiniteCache);
56996 }
56997 };
56998 InfiniteRowModel.prototype.onCacheUpdated = function () {
56999 var event = this.createModelUpdatedEvent();
57000 this.eventService.dispatchEvent(event);
57001 };
57002 InfiniteRowModel.prototype.getRow = function (rowIndex) {
57003 if (!this.infiniteCache) {
57004 return undefined;
57005 }
57006 if (rowIndex >= this.infiniteCache.getRowCount()) {
57007 return undefined;
57008 }
57009 return this.infiniteCache.getRow(rowIndex);
57010 };
57011 InfiniteRowModel.prototype.getRowNode = function (id) {
57012 var result;
57013 this.forEachNode(function (rowNode) {
57014 if (rowNode.id === id) {
57015 result = rowNode;
57016 }
57017 });
57018 return result;
57019 };
57020 InfiniteRowModel.prototype.forEachNode = function (callback) {
57021 if (this.infiniteCache) {
57022 this.infiniteCache.forEachNodeDeep(callback);
57023 }
57024 };
57025 InfiniteRowModel.prototype.getTopLevelRowCount = function () {
57026 return this.getRowCount();
57027 };
57028 InfiniteRowModel.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {
57029 return topLevelIndex;
57030 };
57031 InfiniteRowModel.prototype.getRowIndexAtPixel = function (pixel) {
57032 if (this.rowHeight !== 0) { // avoid divide by zero error
57033 var rowIndexForPixel = Math.floor(pixel / this.rowHeight);
57034 var lastRowIndex = this.getRowCount() - 1;
57035 if (rowIndexForPixel > lastRowIndex) {
57036 return lastRowIndex;
57037 }
57038 return rowIndexForPixel;
57039 }
57040 return 0;
57041 };
57042 InfiniteRowModel.prototype.getRowCount = function () {
57043 return this.infiniteCache ? this.infiniteCache.getRowCount() : 0;
57044 };
57045 InfiniteRowModel.prototype.isRowPresent = function (rowNode) {
57046 var foundRowNode = this.getRowNode(rowNode.id);
57047 return !!foundRowNode;
57048 };
57049 InfiniteRowModel.prototype.refreshCache = function () {
57050 if (this.infiniteCache) {
57051 this.infiniteCache.refreshCache();
57052 }
57053 };
57054 InfiniteRowModel.prototype.purgeCache = function () {
57055 if (this.infiniteCache) {
57056 this.infiniteCache.purgeCache();
57057 }
57058 };
57059 // for iRowModel
57060 InfiniteRowModel.prototype.isLastRowIndexKnown = function () {
57061 if (this.infiniteCache) {
57062 return this.infiniteCache.isLastRowIndexKnown();
57063 }
57064 return false;
57065 };
57066 InfiniteRowModel.prototype.setRowCount = function (rowCount, lastRowIndexKnown) {
57067 if (this.infiniteCache) {
57068 this.infiniteCache.setRowCount(rowCount, lastRowIndexKnown);
57069 }
57070 };
57071 __decorate([
57072 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('filterManager')
57073 ], InfiniteRowModel.prototype, "filterManager", void 0);
57074 __decorate([
57075 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('sortController')
57076 ], InfiniteRowModel.prototype, "sortController", void 0);
57077 __decorate([
57078 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('selectionService')
57079 ], InfiniteRowModel.prototype, "selectionService", void 0);
57080 __decorate([
57081 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
57082 ], InfiniteRowModel.prototype, "rowRenderer", void 0);
57083 __decorate([
57084 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowNodeBlockLoader')
57085 ], InfiniteRowModel.prototype, "rowNodeBlockLoader", void 0);
57086 __decorate([
57087 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
57088 ], InfiniteRowModel.prototype, "init", null);
57089 __decorate([
57090 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
57091 ], InfiniteRowModel.prototype, "destroyDatasource", null);
57092 InfiniteRowModel = __decorate([
57093 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Bean"])('rowModel')
57094 ], InfiniteRowModel);
57095 return InfiniteRowModel;
57096}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
57097
57098
57099
57100/***/ }),
57101/* 272 */
57102/***/ (function(module, __webpack_exports__, __webpack_require__) {
57103
57104"use strict";
57105__webpack_require__.r(__webpack_exports__);
57106/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InfiniteCache", function() { return InfiniteCache; });
57107/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
57108/* harmony import */ var _infiniteBlock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(273);
57109var __extends = (undefined && undefined.__extends) || (function () {
57110 var extendStatics = function (d, b) {
57111 extendStatics = Object.setPrototypeOf ||
57112 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
57113 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
57114 return extendStatics(d, b);
57115 };
57116 return function (d, b) {
57117 extendStatics(d, b);
57118 function __() { this.constructor = d; }
57119 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57120 };
57121})();
57122var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
57123 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
57124 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
57125 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;
57126 return c > 3 && r && Object.defineProperty(target, key, r), r;
57127};
57128var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
57129 return function (target, key) { decorator(target, key, paramIndex); }
57130};
57131
57132
57133var InfiniteCache = /** @class */ (function (_super) {
57134 __extends(InfiniteCache, _super);
57135 function InfiniteCache(params) {
57136 var _this = _super.call(this) || this;
57137 _this.lastRowIndexKnown = false;
57138 _this.blocks = {};
57139 _this.blockCount = 0;
57140 _this.rowCount = params.initialRowCount;
57141 _this.params = params;
57142 return _this;
57143 }
57144 InfiniteCache.prototype.setBeans = function (loggerFactory) {
57145 this.logger = loggerFactory.create('InfiniteCache');
57146 };
57147 // the rowRenderer will not pass dontCreatePage, meaning when rendering the grid,
57148 // it will want new pages in the cache as it asks for rows. only when we are inserting /
57149 // removing rows via the api is dontCreatePage set, where we move rows between the pages.
57150 InfiniteCache.prototype.getRow = function (rowIndex, dontCreatePage) {
57151 if (dontCreatePage === void 0) { dontCreatePage = false; }
57152 var blockId = Math.floor(rowIndex / this.params.blockSize);
57153 var block = this.blocks[blockId];
57154 if (!block) {
57155 if (dontCreatePage) {
57156 return undefined;
57157 }
57158 block = this.createBlock(blockId);
57159 }
57160 return block.getRow(rowIndex);
57161 };
57162 InfiniteCache.prototype.createBlock = function (blockNumber) {
57163 var newBlock = this.createBean(new _infiniteBlock__WEBPACK_IMPORTED_MODULE_1__["InfiniteBlock"](blockNumber, this, this.params));
57164 this.blocks[newBlock.getId()] = newBlock;
57165 this.blockCount++;
57166 this.purgeBlocksIfNeeded(newBlock);
57167 this.params.rowNodeBlockLoader.addBlock(newBlock);
57168 return newBlock;
57169 };
57170 // we have this on infinite row model only, not server side row model,
57171 // because for server side, it would leave the children in inconsistent
57172 // state - eg if a node had children, but after the refresh it had data
57173 // for a different row, then the children would be with the wrong row node.
57174 InfiniteCache.prototype.refreshCache = function () {
57175 var nothingToRefresh = this.blockCount == 0;
57176 if (nothingToRefresh) {
57177 this.purgeCache();
57178 return;
57179 }
57180 this.getBlocksInOrder().forEach(function (block) { return block.setStateWaitingToLoad(); });
57181 this.params.rowNodeBlockLoader.checkBlockToLoad();
57182 };
57183 InfiniteCache.prototype.destroyAllBlocks = function () {
57184 var _this = this;
57185 this.getBlocksInOrder().forEach(function (block) { return _this.destroyBlock(block); });
57186 };
57187 InfiniteCache.prototype.getRowCount = function () {
57188 return this.rowCount;
57189 };
57190 InfiniteCache.prototype.isLastRowIndexKnown = function () {
57191 return this.lastRowIndexKnown;
57192 };
57193 // block calls this, when page loaded
57194 InfiniteCache.prototype.pageLoaded = function (block, lastRow) {
57195 // if we are not active, then we ignore all events, otherwise we could end up getting the
57196 // grid to refresh even though we are no longer the active cache
57197 if (!this.isAlive()) {
57198 return;
57199 }
57200 this.logger.log("onPageLoaded: page = " + block.getId() + ", lastRow = " + lastRow);
57201 this.checkRowCount(block, lastRow);
57202 // we fire cacheUpdated even if the row count has not changed, as some items need updating even
57203 // if no new rows to render. for example the pagination panel has '?' as the total rows when loading
57204 // is underway, which would need to get updated when loading finishes.
57205 this.onCacheUpdated();
57206 };
57207 InfiniteCache.prototype.purgeBlocksIfNeeded = function (blockToExclude) {
57208 var _this = this;
57209 // we exclude checking for the page just created, as this has yet to be accessed and hence
57210 // the lastAccessed stamp will not be updated for the first time yet
57211 var blocksForPurging = this.getBlocksInOrder().filter(function (b) { return b != blockToExclude; });
57212 var lastAccessedComparator = function (a, b) { return b.getLastAccessed() - a.getLastAccessed(); };
57213 blocksForPurging.sort(lastAccessedComparator);
57214 // we remove (maxBlocksInCache - 1) as we already excluded the 'just created' page.
57215 // in other words, after the splice operation below, we have taken out the blocks
57216 // we want to keep, which means we are left with blocks that we can potentially purge
57217 var maxBlocksProvided = this.params.maxBlocksInCache > 0;
57218 var blocksToKeep = maxBlocksProvided ? this.params.maxBlocksInCache - 1 : null;
57219 var emptyBlocksToKeep = InfiniteCache.MAX_EMPTY_BLOCKS_TO_KEEP - 1;
57220 blocksForPurging.forEach(function (block, index) {
57221 var purgeBecauseBlockEmpty = block.getState() === _infiniteBlock__WEBPACK_IMPORTED_MODULE_1__["InfiniteBlock"].STATE_WAITING_TO_LOAD && index >= emptyBlocksToKeep;
57222 var purgeBecauseCacheFull = maxBlocksProvided ? index >= blocksToKeep : false;
57223 if (purgeBecauseBlockEmpty || purgeBecauseCacheFull) {
57224 // if the block currently has rows been displayed, then don't remove it either.
57225 // this can happen if user has maxBlocks=2, and blockSize=5 (thus 10 max rows in cache)
57226 // but the screen is showing 20 rows, so at least 4 blocks are needed.
57227 if (_this.isBlockCurrentlyDisplayed(block)) {
57228 return;
57229 }
57230 // don't want to loose keyboard focus, so keyboard navigation can continue. so keep focused blocks.
57231 if (_this.isBlockFocused(block)) {
57232 return;
57233 }
57234 // at this point, block is not needed, so burn baby burn
57235 _this.removeBlockFromCache(block);
57236 }
57237 });
57238 };
57239 InfiniteCache.prototype.isBlockFocused = function (block) {
57240 var focusedCell = this.focusService.getFocusCellToUseAfterRefresh();
57241 if (!focusedCell) {
57242 return false;
57243 }
57244 if (focusedCell.rowPinned != null) {
57245 return false;
57246 }
57247 var blockIndexStart = block.getStartRow();
57248 var blockIndexEnd = block.getEndRow();
57249 var hasFocus = focusedCell.rowIndex >= blockIndexStart && focusedCell.rowIndex < blockIndexEnd;
57250 return hasFocus;
57251 };
57252 InfiniteCache.prototype.isBlockCurrentlyDisplayed = function (block) {
57253 var startIndex = block.getStartRow();
57254 var endIndex = block.getEndRow() - 1;
57255 return this.rowRenderer.isRangeInRenderedViewport(startIndex, endIndex);
57256 };
57257 InfiniteCache.prototype.removeBlockFromCache = function (blockToRemove) {
57258 if (!blockToRemove) {
57259 return;
57260 }
57261 this.destroyBlock(blockToRemove);
57262 // we do not want to remove the 'loaded' event listener, as the
57263 // concurrent loads count needs to be updated when the load is complete
57264 // if the purged page is in loading state
57265 };
57266 InfiniteCache.prototype.checkRowCount = function (block, lastRow) {
57267 // if client provided a last row, we always use it, as it could change between server calls
57268 // if user deleted data and then called refresh on the grid.
57269 if (typeof lastRow === 'number' && lastRow >= 0) {
57270 this.rowCount = lastRow;
57271 this.lastRowIndexKnown = true;
57272 }
57273 else if (!this.lastRowIndexKnown) {
57274 // otherwise, see if we need to add some virtual rows
57275 var lastRowIndex = (block.getId() + 1) * this.params.blockSize;
57276 var lastRowIndexPlusOverflow = lastRowIndex + this.params.overflowSize;
57277 if (this.rowCount < lastRowIndexPlusOverflow) {
57278 this.rowCount = lastRowIndexPlusOverflow;
57279 }
57280 }
57281 };
57282 InfiniteCache.prototype.setRowCount = function (rowCount, lastRowIndexKnown) {
57283 this.rowCount = rowCount;
57284 // if undefined is passed, we do not set this value, if one of {true,false}
57285 // is passed, we do set the value.
57286 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(lastRowIndexKnown)) {
57287 this.lastRowIndexKnown = lastRowIndexKnown;
57288 }
57289 // if we are still searching, then the row count must not end at the end
57290 // of a particular page, otherwise the searching will not pop into the
57291 // next page
57292 if (!this.lastRowIndexKnown) {
57293 if (this.rowCount % this.params.blockSize === 0) {
57294 this.rowCount++;
57295 }
57296 }
57297 this.onCacheUpdated();
57298 };
57299 InfiniteCache.prototype.forEachNodeDeep = function (callback) {
57300 var _this = this;
57301 var sequence = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["NumberSequence"]();
57302 this.getBlocksInOrder().forEach(function (block) { return block.forEachNode(callback, sequence, _this.rowCount); });
57303 };
57304 InfiniteCache.prototype.getBlocksInOrder = function () {
57305 // get all page id's as NUMBERS (not strings, as we need to sort as numbers) and in descending order
57306 var blockComparator = function (a, b) { return a.getId() - b.getId(); };
57307 var blocks = _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].getAllValuesInObject(this.blocks).sort(blockComparator);
57308 return blocks;
57309 };
57310 InfiniteCache.prototype.destroyBlock = function (block) {
57311 delete this.blocks[block.getId()];
57312 this.destroyBean(block);
57313 this.blockCount--;
57314 this.params.rowNodeBlockLoader.removeBlock(block);
57315 };
57316 // gets called 1) row count changed 2) cache purged 3) items inserted
57317 InfiniteCache.prototype.onCacheUpdated = function () {
57318 if (this.isAlive()) {
57319 // if the virtualRowCount is shortened, then it's possible blocks exist that are no longer
57320 // in the valid range. so we must remove these. this can happen if user explicitly sets
57321 // the virtual row count, or the datasource returns a result and sets lastRow to something
57322 // less than virtualRowCount (can happen if user scrolls down, server reduces dataset size).
57323 this.destroyAllBlocksPastVirtualRowCount();
57324 // this results in both row models (infinite and server side) firing ModelUpdated,
57325 // however server side row model also updates the row indexes first
57326 var event_1 = {
57327 type: _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Events"].EVENT_STORE_UPDATED
57328 };
57329 this.eventService.dispatchEvent(event_1);
57330 }
57331 };
57332 InfiniteCache.prototype.destroyAllBlocksPastVirtualRowCount = function () {
57333 var _this = this;
57334 var blocksToDestroy = [];
57335 this.getBlocksInOrder().forEach(function (block) {
57336 var startRow = block.getId() * _this.params.blockSize;
57337 if (startRow >= _this.rowCount) {
57338 blocksToDestroy.push(block);
57339 }
57340 });
57341 if (blocksToDestroy.length > 0) {
57342 blocksToDestroy.forEach(function (block) { return _this.destroyBlock(block); });
57343 }
57344 };
57345 InfiniteCache.prototype.purgeCache = function () {
57346 var _this = this;
57347 this.getBlocksInOrder().forEach(function (block) { return _this.removeBlockFromCache(block); });
57348 this.lastRowIndexKnown = false;
57349 // if zero rows in the cache, we need to get the SSRM to start asking for rows again.
57350 // otherwise if set to zero rows last time, and we don't update the row count, then after
57351 // the purge there will still be zero rows, meaning the SSRM won't request any rows.
57352 // to kick things off, at least one row needs to be asked for.
57353 if (this.rowCount === 0) {
57354 this.rowCount = this.params.initialRowCount;
57355 }
57356 this.onCacheUpdated();
57357 };
57358 InfiniteCache.prototype.getRowNodesInRange = function (firstInRange, lastInRange) {
57359 var _this = this;
57360 var result = [];
57361 var lastBlockId = -1;
57362 var inActiveRange = false;
57363 var numberSequence = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["NumberSequence"]();
57364 // if only one node passed, we start the selection at the top
57365 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(firstInRange)) {
57366 inActiveRange = true;
57367 }
57368 var foundGapInSelection = false;
57369 this.getBlocksInOrder().forEach(function (block) {
57370 if (foundGapInSelection) {
57371 return;
57372 }
57373 if (inActiveRange && (lastBlockId + 1 !== block.getId())) {
57374 foundGapInSelection = true;
57375 return;
57376 }
57377 lastBlockId = block.getId();
57378 block.forEachNode(function (rowNode) {
57379 var hitFirstOrLast = rowNode === firstInRange || rowNode === lastInRange;
57380 if (inActiveRange || hitFirstOrLast) {
57381 result.push(rowNode);
57382 }
57383 if (hitFirstOrLast) {
57384 inActiveRange = !inActiveRange;
57385 }
57386 }, numberSequence, _this.rowCount);
57387 });
57388 // inActiveRange will be still true if we never hit the second rowNode
57389 var invalidRange = foundGapInSelection || inActiveRange;
57390 return invalidRange ? [] : result;
57391 };
57392 // this property says how many empty blocks should be in a cache, eg if scrolls down fast and creates 10
57393 // blocks all for loading, the grid will only load the last 2 - it will assume the blocks the user quickly
57394 // scrolled over are not needed to be loaded.
57395 InfiniteCache.MAX_EMPTY_BLOCKS_TO_KEEP = 2;
57396 __decorate([
57397 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('rowRenderer')
57398 ], InfiniteCache.prototype, "rowRenderer", void 0);
57399 __decorate([
57400 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])("focusService")
57401 ], InfiniteCache.prototype, "focusService", void 0);
57402 __decorate([
57403 __param(0, Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Qualifier"])('loggerFactory'))
57404 ], InfiniteCache.prototype, "setBeans", null);
57405 __decorate([
57406 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
57407 ], InfiniteCache.prototype, "destroyAllBlocks", null);
57408 return InfiniteCache;
57409}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["BeanStub"]));
57410
57411
57412
57413/***/ }),
57414/* 273 */
57415/***/ (function(module, __webpack_exports__, __webpack_require__) {
57416
57417"use strict";
57418__webpack_require__.r(__webpack_exports__);
57419/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InfiniteBlock", function() { return InfiniteBlock; });
57420/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
57421var __extends = (undefined && undefined.__extends) || (function () {
57422 var extendStatics = function (d, b) {
57423 extendStatics = Object.setPrototypeOf ||
57424 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
57425 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
57426 return extendStatics(d, b);
57427 };
57428 return function (d, b) {
57429 extendStatics(d, b);
57430 function __() { this.constructor = d; }
57431 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57432 };
57433})();
57434var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
57435 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
57436 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
57437 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;
57438 return c > 3 && r && Object.defineProperty(target, key, r), r;
57439};
57440
57441var InfiniteBlock = /** @class */ (function (_super) {
57442 __extends(InfiniteBlock, _super);
57443 function InfiniteBlock(id, parentCache, params) {
57444 var _this = _super.call(this, id) || this;
57445 _this.parentCache = parentCache;
57446 _this.params = params;
57447 // we don't need to calculate these now, as the inputs don't change,
57448 // however it makes the code easier to read if we work them out up front
57449 _this.startRow = id * params.blockSize;
57450 _this.endRow = _this.startRow + params.blockSize;
57451 return _this;
57452 }
57453 InfiniteBlock.prototype.postConstruct = function () {
57454 this.createRowNodes();
57455 };
57456 InfiniteBlock.prototype.getBlockStateJson = function () {
57457 return {
57458 id: '' + this.getId(),
57459 state: {
57460 blockNumber: this.getId(),
57461 startRow: this.getStartRow(),
57462 endRow: this.getEndRow(),
57463 pageStatus: this.getState()
57464 }
57465 };
57466 };
57467 InfiniteBlock.prototype.setDataAndId = function (rowNode, data, index) {
57468 // if there's no id and the rowNode was rendered before, it means this
57469 // was a placeholder rowNode and should not be recycled. Setting
57470 // `alreadyRendered` to `false` forces the rowRenderer to flush it.
57471 if (!rowNode.id && rowNode.alreadyRendered) {
57472 rowNode.alreadyRendered = false;
57473 }
57474 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].exists(data)) {
57475 // this means if the user is not providing id's we just use the
57476 // index for the row. this will allow selection to work (that is based
57477 // on index) as long user is not inserting or deleting rows,
57478 // or wanting to keep selection between server side sorting or filtering
57479 rowNode.setDataAndId(data, index.toString());
57480 }
57481 else {
57482 rowNode.setDataAndId(undefined, undefined);
57483 }
57484 };
57485 InfiniteBlock.prototype.loadFromDatasource = function () {
57486 var _this = this;
57487 var params = this.createLoadParams();
57488 if (_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["_"].missing(this.params.datasource.getRows)) {
57489 console.warn("AG Grid: datasource is missing getRows method");
57490 return;
57491 }
57492 // put in timeout, to force result to be async
57493 window.setTimeout(function () {
57494 _this.params.datasource.getRows(params);
57495 }, 0);
57496 };
57497 InfiniteBlock.prototype.processServerFail = function () {
57498 // todo - this method has better handling in SSRM
57499 };
57500 InfiniteBlock.prototype.createLoadParams = function () {
57501 // PROBLEM . . . . when the user sets sort via colDef.sort, then this code
57502 // is executing before the sort is set up, so server is not getting the sort
57503 // model. need to change with regards order - so the server side request is
57504 // AFTER thus it gets the right sort model.
57505 var params = {
57506 startRow: this.getStartRow(),
57507 endRow: this.getEndRow(),
57508 successCallback: this.pageLoaded.bind(this, this.getVersion()),
57509 failCallback: this.pageLoadFailed.bind(this, this.getVersion()),
57510 sortModel: this.params.sortModel,
57511 filterModel: this.params.filterModel,
57512 context: this.gridOptionsService.context
57513 };
57514 return params;
57515 };
57516 InfiniteBlock.prototype.forEachNode = function (callback, sequence, rowCount) {
57517 var _this = this;
57518 this.rowNodes.forEach(function (rowNode, index) {
57519 var rowIndex = _this.startRow + index;
57520 if (rowIndex < rowCount) {
57521 callback(rowNode, sequence.next());
57522 }
57523 });
57524 };
57525 InfiniteBlock.prototype.getLastAccessed = function () {
57526 return this.lastAccessed;
57527 };
57528 InfiniteBlock.prototype.getRow = function (rowIndex, dontTouchLastAccessed) {
57529 if (dontTouchLastAccessed === void 0) { dontTouchLastAccessed = false; }
57530 if (!dontTouchLastAccessed) {
57531 this.lastAccessed = this.params.lastAccessedSequence.next();
57532 }
57533 var localIndex = rowIndex - this.startRow;
57534 return this.rowNodes[localIndex];
57535 };
57536 InfiniteBlock.prototype.getStartRow = function () {
57537 return this.startRow;
57538 };
57539 InfiniteBlock.prototype.getEndRow = function () {
57540 return this.endRow;
57541 };
57542 // creates empty row nodes, data is missing as not loaded yet
57543 InfiniteBlock.prototype.createRowNodes = function () {
57544 this.rowNodes = [];
57545 for (var i = 0; i < this.params.blockSize; i++) {
57546 var rowIndex = this.startRow + i;
57547 var rowNode = new _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNode"](this.beans);
57548 rowNode.setRowHeight(this.params.rowHeight);
57549 rowNode.uiLevel = 0;
57550 rowNode.setRowIndex(rowIndex);
57551 rowNode.setRowTop(this.params.rowHeight * rowIndex);
57552 this.rowNodes.push(rowNode);
57553 }
57554 };
57555 InfiniteBlock.prototype.processServerResult = function (params) {
57556 var _this = this;
57557 this.rowNodes.forEach(function (rowNode, index) {
57558 var data = params.rowData ? params.rowData[index] : undefined;
57559 _this.setDataAndId(rowNode, data, _this.startRow + index);
57560 });
57561 var finalRowCount = params.rowCount != null && params.rowCount >= 0 ? params.rowCount : undefined;
57562 this.parentCache.pageLoaded(this, finalRowCount);
57563 };
57564 InfiniteBlock.prototype.destroyRowNodes = function () {
57565 this.rowNodes.forEach(function (rowNode) {
57566 // this is needed, so row render knows to fade out the row, otherwise it
57567 // sees row top is present, and thinks the row should be shown.
57568 rowNode.clearRowTopAndRowIndex();
57569 });
57570 };
57571 __decorate([
57572 Object(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["Autowired"])('beans')
57573 ], InfiniteBlock.prototype, "beans", void 0);
57574 __decorate([
57575 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PostConstruct"]
57576 ], InfiniteBlock.prototype, "postConstruct", null);
57577 __decorate([
57578 _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["PreDestroy"]
57579 ], InfiniteBlock.prototype, "destroyRowNodes", null);
57580 return InfiniteBlock;
57581}(_ag_grid_community_core__WEBPACK_IMPORTED_MODULE_0__["RowNodeBlock"]));
57582
57583
57584
57585/***/ }),
57586/* 274 */
57587/***/ (function(module, __webpack_exports__, __webpack_require__) {
57588
57589"use strict";
57590__webpack_require__.r(__webpack_exports__);
57591/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
57592// DO NOT UPDATE MANUALLY: Generated from script during build time
57593var VERSION = '29.2.0';
57594
57595
57596/***/ }),
57597/* 275 */
57598/***/ (function(module, __webpack_exports__, __webpack_require__) {
57599
57600"use strict";
57601__webpack_require__.r(__webpack_exports__);
57602/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AllCommunityModules", function() { return AllCommunityModules; });
57603/* harmony import */ var _ag_grid_community_client_side_row_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
57604/* harmony import */ var _ag_grid_community_infinite_row_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(269);
57605/* harmony import */ var _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
57606/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelModule", function() { return _ag_grid_community_client_side_row_model__WEBPACK_IMPORTED_MODULE_0__["ClientSideRowModelModule"]; });
57607
57608/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseCreator", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["BaseCreator"]; });
57609
57610/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseGridSerializingSession", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["BaseGridSerializingSession"]; });
57611
57612/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CsvCreator", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["CsvCreator"]; });
57613
57614/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CsvExportModule", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["CsvExportModule"]; });
57615
57616/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Downloader", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["Downloader"]; });
57617
57618/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridSerializer", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["GridSerializer"]; });
57619
57620/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowType", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["RowType"]; });
57621
57622/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "XmlFactory", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["XmlFactory"]; });
57623
57624/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ZipContainer", function() { return _ag_grid_community_csv_export__WEBPACK_IMPORTED_MODULE_2__["ZipContainer"]; });
57625
57626/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InfiniteRowModelModule", function() { return _ag_grid_community_infinite_row_model__WEBPACK_IMPORTED_MODULE_1__["InfiniteRowModelModule"]; });
57627
57628/* harmony import */ var _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
57629/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnFactory", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnFactory"]; });
57630
57631/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnModel", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnModel"]; });
57632
57633/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnKeyCreator", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnKeyCreator"]; });
57634
57635/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnUtils", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnUtils"]; });
57636
57637/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DisplayedGroupCreator", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["DisplayedGroupCreator"]; });
57638
57639/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupInstanceIdCreator", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GroupInstanceIdCreator"]; });
57640
57641/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GROUP_AUTO_COLUMN_ID", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GROUP_AUTO_COLUMN_ID"]; });
57642
57643/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentUtil", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ComponentUtil"]; });
57644
57645/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgStackComponentsRegistry", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgStackComponentsRegistry"]; });
57646
57647/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UserComponentRegistry", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["UserComponentRegistry"]; });
57648
57649/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UserComponentFactory", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["UserComponentFactory"]; });
57650
57651/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColDefUtil", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColDefUtil"]; });
57652
57653/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BeanStub", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["BeanStub"]; });
57654
57655/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Context", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Context"]; });
57656
57657/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Autowired", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Autowired"]; });
57658
57659/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostConstruct", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PostConstruct"]; });
57660
57661/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PreConstruct", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PreConstruct"]; });
57662
57663/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Optional", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Optional"]; });
57664
57665/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bean", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Bean"]; });
57666
57667/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Qualifier", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Qualifier"]; });
57668
57669/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PreDestroy", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PreDestroy"]; });
57670
57671/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuerySelector", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["QuerySelector"]; });
57672
57673/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RefSelector", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RefSelector"]; });
57674
57675/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelFactoryMode", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ExcelFactoryMode"]; });
57676
57677/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragAndDropService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["DragAndDropService"]; });
57678
57679/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragSourceType", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["DragSourceType"]; });
57680
57681/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HorizontalDirection", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HorizontalDirection"]; });
57682
57683/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VerticalDirection", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["VerticalDirection"]; });
57684
57685/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["DragService"]; });
57686
57687/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Column"]; });
57688
57689/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnGroup", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnGroup"]; });
57690
57691/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProvidedColumnGroup", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ProvidedColumnGroup"]; });
57692
57693/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNode", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowNode"]; });
57694
57695/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowHighlightPosition", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowHighlightPosition"]; });
57696
57697/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterManager", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["FilterManager"]; });
57698
57699/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProvidedFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ProvidedFilter"]; });
57700
57701/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SimpleFilter"]; });
57702
57703/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScalarFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ScalarFilter"]; });
57704
57705/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["NumberFilter"]; });
57706
57707/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TextFilter"]; });
57708
57709/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["DateFilter"]; });
57710
57711/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextFloatingFilter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TextFloatingFilter"]; });
57712
57713/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderFilterCellComp"]; });
57714
57715/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FloatingFilterMapper", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["FloatingFilterMapper"]; });
57716
57717/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridBodyComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridBodyComp"]; });
57718
57719/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridBodyCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridBodyCtrl"]; });
57720
57721/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowAnimationCssClasses", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowAnimationCssClasses"]; });
57722
57723/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollVisibleService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ScrollVisibleService"]; });
57724
57725/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MouseEventService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["MouseEventService"]; });
57726
57727/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NavigationService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["NavigationService"]; });
57728
57729/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowContainerComp"]; });
57730
57731/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerName", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowContainerName"]; });
57732
57733/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowContainerCtrl"]; });
57734
57735/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowContainerType", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowContainerType"]; });
57736
57737/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRowContainerTypeForName", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["getRowContainerTypeForName"]; });
57738
57739/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BodyDropPivotTarget", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["BodyDropPivotTarget"]; });
57740
57741/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BodyDropTarget", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["BodyDropTarget"]; });
57742
57743/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassApplier", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CssClassApplier"]; });
57744
57745/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderRowContainerComp"]; });
57746
57747/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridHeaderComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridHeaderComp"]; });
57748
57749/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridHeaderCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridHeaderCtrl"]; });
57750
57751/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderRowComp"]; });
57752
57753/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowType", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderRowType"]; });
57754
57755/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderRowCtrl"]; });
57756
57757/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderCellCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderCellCtrl"]; });
57758
57759/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortIndicatorComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SortIndicatorComp"]; });
57760
57761/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderFilterCellCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderFilterCellCtrl"]; });
57762
57763/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderGroupCellCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderGroupCellCtrl"]; });
57764
57765/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AbstractHeaderCellCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AbstractHeaderCellCtrl"]; });
57766
57767/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRowContainerCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderRowContainerCtrl"]; });
57768
57769/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HorizontalResizeService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HorizontalResizeService"]; });
57770
57771/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MoveColumnFeature", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["MoveColumnFeature"]; });
57772
57773/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StandardMenuFactory", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["StandardMenuFactory"]; });
57774
57775/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabbedLayout", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TabbedLayout"]; });
57776
57777/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "simpleHttpRequest", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["simpleHttpRequest"]; });
57778
57779/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ResizeObserverService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ResizeObserverService"]; });
57780
57781/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AnimationFrameService"]; });
57782
57783/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LargeTextCellEditor", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["LargeTextCellEditor"]; });
57784
57785/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupEditorWrapper", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PopupEditorWrapper"]; });
57786
57787/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectCellEditor", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SelectCellEditor"]; });
57788
57789/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextCellEditor", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TextCellEditor"]; });
57790
57791/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Beans", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Beans"]; });
57792
57793/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimateShowChangeCellRenderer", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AnimateShowChangeCellRenderer"]; });
57794
57795/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimateSlideCellRenderer", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AnimateSlideCellRenderer"]; });
57796
57797/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCellRenderer", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GroupCellRenderer"]; });
57798
57799/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCellRendererCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GroupCellRendererCtrl"]; });
57800
57801/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SetLeftFeature", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SetLeftFeature"]; });
57802
57803/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PositionableFeature", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PositionableFeature"]; });
57804
57805/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoWidthCalculator", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AutoWidthCalculator"]; });
57806
57807/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxSelectionComponent", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CheckboxSelectionComponent"]; });
57808
57809/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CellComp"]; });
57810
57811/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CellCtrl"]; });
57812
57813/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowCtrl"]; });
57814
57815/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowRenderer", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowRenderer"]; });
57816
57817/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueFormatterService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ValueFormatterService"]; });
57818
57819/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassManager", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CssClassManager"]; });
57820
57821/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PinnedRowModel", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PinnedRowModel"]; });
57822
57823/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServerSideTransactionResultStatus", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ServerSideTransactionResultStatus"]; });
57824
57825/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChangedPath", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ChangedPath"]; });
57826
57827/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlock", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowNodeBlock"]; });
57828
57829/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeBlockLoader", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowNodeBlockLoader"]; });
57830
57831/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PaginationProxy", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PaginationProxy"]; });
57832
57833/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientSideRowModelSteps", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ClientSideRowModelSteps"]; });
57834
57835/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylingService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["StylingService"]; });
57836
57837/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LayoutCssClasses", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["LayoutCssClasses"]; });
57838
57839/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgAbstractField", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgAbstractField"]; });
57840
57841/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgCheckbox", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgCheckbox"]; });
57842
57843/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgRadioButton", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgRadioButton"]; });
57844
57845/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgToggleButton", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgToggleButton"]; });
57846
57847/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputTextField", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgInputTextField"]; });
57848
57849/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputTextArea", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgInputTextArea"]; });
57850
57851/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputNumberField", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgInputNumberField"]; });
57852
57853/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgInputRange", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgInputRange"]; });
57854
57855/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgSelect", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgSelect"]; });
57856
57857/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgSlider", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgSlider"]; });
57858
57859/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgGroupComponent", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgGroupComponent"]; });
57860
57861/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuItemComponent", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgMenuItemComponent"]; });
57862
57863/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuList", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgMenuList"]; });
57864
57865/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgMenuPanel", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgMenuPanel"]; });
57866
57867/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgDialog", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgDialog"]; });
57868
57869/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPanel", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgPanel"]; });
57870
57871/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Component"]; });
57872
57873/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ManagedFocusFeature", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ManagedFocusFeature"]; });
57874
57875/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabGuardComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TabGuardComp"]; });
57876
57877/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabGuardCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TabGuardCtrl"]; });
57878
57879/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabGuardClassNames", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TabGuardClassNames"]; });
57880
57881/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupComponent", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PopupComponent"]; });
57882
57883/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopupService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PopupService"]; });
57884
57885/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TouchListener", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TouchListener"]; });
57886
57887/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualList", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["VirtualList"]; });
57888
57889/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgAbstractLabel", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgAbstractLabel"]; });
57890
57891/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPickerField", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgPickerField"]; });
57892
57893/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRangeType", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CellRangeType"]; });
57894
57895/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionHandleType", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SelectionHandleType"]; });
57896
57897/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoScrollService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AutoScrollService"]; });
57898
57899/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VanillaFrameworkOverrides", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["VanillaFrameworkOverrides"]; });
57900
57901/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellNavigationService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CellNavigationService"]; });
57902
57903/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AlignedGridsService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AlignedGridsService"]; });
57904
57905/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "KeyCode", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["KeyCode"]; });
57906
57907/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Grid"]; });
57908
57909/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridCoreCreator", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridCoreCreator"]; });
57910
57911/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridApi", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridApi"]; });
57912
57913/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Events"]; });
57914
57915/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FocusService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["FocusService"]; });
57916
57917/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridOptionsService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridOptionsService"]; });
57918
57919/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EventService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["EventService"]; });
57920
57921/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectableService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SelectableService"]; });
57922
57923/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowNodeSorter", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowNodeSorter"]; });
57924
57925/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CtrlsService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CtrlsService"]; });
57926
57927/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridComp", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridComp"]; });
57928
57929/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridCtrl", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["GridCtrl"]; });
57930
57931/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Logger"]; });
57932
57933/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoggerFactory", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["LoggerFactory"]; });
57934
57935/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortController", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["SortController"]; });
57936
57937/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TemplateService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["TemplateService"]; });
57938
57939/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocaleService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["LocaleService"]; });
57940
57941/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["_"]; });
57942
57943/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberSequence", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["NumberSequence"]; });
57944
57945/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromiseStatus", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgPromiseStatus"]; });
57946
57947/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgPromise", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["AgPromise"]; });
57948
57949/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Timer"]; });
57950
57951/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ValueService"]; });
57952
57953/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueCache", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ValueCache"]; });
57954
57955/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpressionService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ExpressionService"]; });
57956
57957/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellPositionUtils", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CellPositionUtils"]; });
57958
57959/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowPositionUtils", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["RowPositionUtils"]; });
57960
57961/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderPositionUtils", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderPositionUtils"]; });
57962
57963/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationService", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderNavigationService"]; });
57964
57965/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderNavigationDirection", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["HeaderNavigationDirection"]; });
57966
57967/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PropertyKeys", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["PropertyKeys"]; });
57968
57969/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnApi", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ColumnApi"]; });
57970
57971/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseComponentWrapper", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["BaseComponentWrapper"]; });
57972
57973/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Environment", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["Environment"]; });
57974
57975/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomTooltipFeature", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CustomTooltipFeature"]; });
57976
57977/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_CHART_GROUPS", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_CHART_GROUPS"]; });
57978
57979/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CHART_TOOL_PANEL_ALLOW_LIST", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CHART_TOOL_PANEL_ALLOW_LIST"]; });
57980
57981/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CHART_TOOLBAR_ALLOW_LIST", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CHART_TOOLBAR_ALLOW_LIST"]; });
57982
57983/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CHART_TOOL_PANEL_MENU_OPTIONS", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["CHART_TOOL_PANEL_MENU_OPTIONS"]; });
57984
57985/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "__FORCE_MODULE_DETECTION", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["__FORCE_MODULE_DETECTION"]; });
57986
57987/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BarColumnLabelPlacement", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["BarColumnLabelPlacement"]; });
57988
57989/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModuleNames", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ModuleNames"]; });
57990
57991/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModuleRegistry", function() { return _ag_grid_community_core__WEBPACK_IMPORTED_MODULE_3__["ModuleRegistry"]; });
57992
57993
57994
57995
57996var 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"]];
57997
57998
57999
58000
58001
58002
58003/***/ })
58004/******/ ])});;
\No newline at end of file