@lemon-fe/components 1.2.15 → 1.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/es/data-grid/cell-editors/date.d.ts +2 -2
  2. package/es/data-grid/cell-editors/number.d.ts +2 -2
  3. package/es/data-grid/cell-editors/row.d.ts +2 -2
  4. package/es/data-grid/cell-editors/select.d.ts +3 -3
  5. package/es/data-grid/cell-editors/text.d.ts +2 -2
  6. package/es/data-grid/cell-editors/utils.d.ts +1 -1
  7. package/es/data-grid/components/custom-panel/index.d.ts +1 -1
  8. package/es/data-grid/components/custom-panel/item.d.ts +1 -1
  9. package/es/data-grid/components/custom-panel/typings.d.ts +1 -1
  10. package/es/data-grid/index.d.ts +8 -7
  11. package/es/data-grid/index.js +3 -11
  12. package/es/data-grid/index.less +1 -1
  13. package/es/data-grid/renderer/actions-renderer.d.ts +1 -1
  14. package/es/data-grid/renderer/actions.d.ts +1 -1
  15. package/es/data-grid/renderer/cell-delete-renderer.d.ts +1 -1
  16. package/es/data-grid/renderer/cell-index-renderer.d.ts +1 -1
  17. package/es/data-grid/renderer/cell-renderer.d.ts +1 -1
  18. package/es/data-grid/renderer/detali-cell-renderer.d.ts +1 -1
  19. package/es/data-grid/renderer/header-renderer.d.ts +1 -1
  20. package/es/data-grid/typings.d.ts +2 -2
  21. package/es/data-grid/utils.d.ts +1 -1
  22. package/es/index.d.ts +4 -3
  23. package/es/index.js +4 -2
  24. package/es/select-view/index.d.ts +1 -1
  25. package/package.json +5 -14
  26. package/es/data-grid/modules/clipboard/clipboard/clipboardService.d.ts +0 -62
  27. package/es/data-grid/modules/clipboard/clipboard/clipboardService.js +0 -1007
  28. package/es/data-grid/modules/clipboard/clipboardModule.d.ts +0 -2
  29. package/es/data-grid/modules/clipboard/clipboardModule.js +0 -10
  30. package/es/data-grid/modules/clipboard/main.d.ts +0 -1
  31. package/es/data-grid/modules/clipboard/main.js +0 -1
  32. package/es/data-grid/modules/clipboard/version.d.ts +0 -1
  33. package/es/data-grid/modules/clipboard/version.js +0 -2
  34. package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnModelItem.d.ts +0 -26
  35. package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnModelItem.js +0 -94
  36. package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnToolPanel.d.ts +0 -32
  37. package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnToolPanel.js +0 -272
  38. package/es/data-grid/modules/column-tool-panel/columnToolPanel/modelItemUtils.d.ts +0 -16
  39. package/es/data-grid/modules/column-tool-panel/columnToolPanel/modelItemUtils.js +0 -209
  40. package/es/data-grid/modules/column-tool-panel/columnToolPanel/pivotModePanel.d.ts +0 -9
  41. package/es/data-grid/modules/column-tool-panel/columnToolPanel/pivotModePanel.js +0 -68
  42. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.d.ts +0 -32
  43. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.js +0 -150
  44. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.d.ts +0 -44
  45. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.js +0 -455
  46. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.d.ts +0 -26
  47. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.js +0 -224
  48. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.d.ts +0 -24
  49. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.js +0 -123
  50. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.d.ts +0 -37
  51. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.js +0 -314
  52. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.d.ts +0 -51
  53. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.js +0 -406
  54. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.d.ts +0 -24
  55. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.js +0 -264
  56. package/es/data-grid/modules/column-tool-panel/columnsToolPanelModule.d.ts +0 -2
  57. package/es/data-grid/modules/column-tool-panel/columnsToolPanelModule.js +0 -29
  58. package/es/data-grid/modules/column-tool-panel/main.d.ts +0 -2
  59. package/es/data-grid/modules/column-tool-panel/main.js +0 -3
  60. package/es/data-grid/modules/column-tool-panel/version.d.ts +0 -1
  61. package/es/data-grid/modules/column-tool-panel/version.js +0 -2
  62. package/es/data-grid/modules/master-detail/main.d.ts +0 -1
  63. package/es/data-grid/modules/master-detail/main.js +0 -1
  64. package/es/data-grid/modules/master-detail/masterDetail/detailCellRenderer.d.ts +0 -14
  65. package/es/data-grid/modules/master-detail/masterDetail/detailCellRenderer.js +0 -144
  66. package/es/data-grid/modules/master-detail/masterDetail/detailCellRendererCtrl.d.ts +0 -19
  67. package/es/data-grid/modules/master-detail/masterDetail/detailCellRendererCtrl.js +0 -203
  68. package/es/data-grid/modules/master-detail/masterDetailModule.d.ts +0 -2
  69. package/es/data-grid/modules/master-detail/masterDetailModule.js +0 -18
  70. package/es/data-grid/modules/master-detail/version.d.ts +0 -1
  71. package/es/data-grid/modules/master-detail/version.js +0 -2
  72. package/es/data-grid/modules/menu/main.d.ts +0 -1
  73. package/es/data-grid/modules/menu/main.js +0 -1
  74. package/es/data-grid/modules/menu/menu/chartMenuItemMapper.d.ts +0 -13
  75. package/es/data-grid/modules/menu/menu/chartMenuItemMapper.js +0 -351
  76. package/es/data-grid/modules/menu/menu/contextMenu.d.ts +0 -13
  77. package/es/data-grid/modules/menu/menu/contextMenu.js +0 -267
  78. package/es/data-grid/modules/menu/menu/enterpriseMenu.d.ts +0 -66
  79. package/es/data-grid/modules/menu/menu/enterpriseMenu.js +0 -592
  80. package/es/data-grid/modules/menu/menu/menuItemMapper.d.ts +0 -13
  81. package/es/data-grid/modules/menu/menu/menuItemMapper.js +0 -328
  82. package/es/data-grid/modules/menu/menuModule.d.ts +0 -2
  83. package/es/data-grid/modules/menu/menuModule.js +0 -12
  84. package/es/data-grid/modules/menu/version.d.ts +0 -1
  85. package/es/data-grid/modules/menu/version.js +0 -2
  86. package/es/data-grid/modules/row-grouping/main.d.ts +0 -4
  87. package/es/data-grid/modules/row-grouping/main.js +0 -4
  88. package/es/data-grid/modules/row-grouping/rowGrouping/aggFuncService.d.ts +0 -23
  89. package/es/data-grid/modules/row-grouping/rowGrouping/aggFuncService.js +0 -250
  90. package/es/data-grid/modules/row-grouping/rowGrouping/aggregationStage.d.ts +0 -22
  91. package/es/data-grid/modules/row-grouping/rowGrouping/aggregationStage.js +0 -285
  92. package/es/data-grid/modules/row-grouping/rowGrouping/batchRemover.d.ts +0 -12
  93. package/es/data-grid/modules/row-grouping/rowGrouping/batchRemover.js +0 -77
  94. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.d.ts +0 -75
  95. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.js +0 -516
  96. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.d.ts +0 -40
  97. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.js +0 -367
  98. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.d.ts +0 -11
  99. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.js +0 -85
  100. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.d.ts +0 -17
  101. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.js +0 -139
  102. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.d.ts +0 -15
  103. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.js +0 -105
  104. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.d.ts +0 -15
  105. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.js +0 -105
  106. package/es/data-grid/modules/row-grouping/rowGrouping/filterAggregatesStage.d.ts +0 -9
  107. package/es/data-grid/modules/row-grouping/rowGrouping/filterAggregatesStage.js +0 -136
  108. package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.d.ts +0 -39
  109. package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.js +0 -319
  110. package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.d.ts +0 -23
  111. package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.js +0 -163
  112. package/es/data-grid/modules/row-grouping/rowGrouping/groupStage.d.ts +0 -48
  113. package/es/data-grid/modules/row-grouping/rowGrouping/groupStage.js +0 -740
  114. package/es/data-grid/modules/row-grouping/rowGrouping/pivotColDefService.d.ts +0 -24
  115. package/es/data-grid/modules/row-grouping/rowGrouping/pivotColDefService.js +0 -396
  116. package/es/data-grid/modules/row-grouping/rowGrouping/pivotStage.d.ts +0 -19
  117. package/es/data-grid/modules/row-grouping/rowGrouping/pivotStage.js +0 -182
  118. package/es/data-grid/modules/row-grouping/rowGroupingModule.d.ts +0 -2
  119. package/es/data-grid/modules/row-grouping/rowGroupingModule.js +0 -28
  120. package/es/data-grid/modules/row-grouping/version.d.ts +0 -1
  121. package/es/data-grid/modules/row-grouping/version.js +0 -2
  122. package/es/data-grid/modules/side-bar/main.d.ts +0 -2
  123. package/es/data-grid/modules/side-bar/main.js +0 -2
  124. package/es/data-grid/modules/side-bar/sideBar/common/toolPanelColDefService.d.ts +0 -11
  125. package/es/data-grid/modules/side-bar/sideBar/common/toolPanelColDefService.js +0 -216
  126. package/es/data-grid/modules/side-bar/sideBar/horizontalResizeComp.d.ts +0 -19
  127. package/es/data-grid/modules/side-bar/sideBar/horizontalResizeComp.js +0 -108
  128. package/es/data-grid/modules/side-bar/sideBar/sideBarButtonComp.d.ts +0 -16
  129. package/es/data-grid/modules/side-bar/sideBar/sideBarButtonComp.js +0 -84
  130. package/es/data-grid/modules/side-bar/sideBar/sideBarButtonsComp.d.ts +0 -18
  131. package/es/data-grid/modules/side-bar/sideBar/sideBarButtonsComp.js +0 -89
  132. package/es/data-grid/modules/side-bar/sideBar/sideBarComp.d.ts +0 -28
  133. package/es/data-grid/modules/side-bar/sideBar/sideBarComp.js +0 -325
  134. package/es/data-grid/modules/side-bar/sideBar/sideBarDefParser.d.ts +0 -10
  135. package/es/data-grid/modules/side-bar/sideBar/sideBarDefParser.js +0 -95
  136. package/es/data-grid/modules/side-bar/sideBar/toolPanelWrapper.d.ts +0 -17
  137. package/es/data-grid/modules/side-bar/sideBar/toolPanelWrapper.js +0 -103
  138. package/es/data-grid/modules/side-bar/sideBarModule.d.ts +0 -2
  139. package/es/data-grid/modules/side-bar/sideBarModule.js +0 -22
  140. package/es/data-grid/modules/side-bar/version.d.ts +0 -1
  141. package/es/data-grid/modules/side-bar/version.js +0 -2
@@ -1,209 +0,0 @@
1
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
7
- var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
8
- var c = arguments.length,
9
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
10
- d;
11
- if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
12
- return c > 3 && r && Object.defineProperty(target, key, r), r;
13
- };
14
- import { Events, Bean, Autowired, _ } from "@ag-grid-community/core";
15
- var ModelItemUtils = /*#__PURE__*/function () {
16
- function ModelItemUtils() {
17
- _classCallCheck(this, ModelItemUtils);
18
- }
19
- _createClass(ModelItemUtils, [{
20
- key: "selectAllChildren",
21
- value: function selectAllChildren(colTree, selectAllChecked, eventType) {
22
- var cols = this.extractAllLeafColumns(colTree);
23
- this.setAllColumns(cols, selectAllChecked, eventType);
24
- }
25
- }, {
26
- key: "setColumn",
27
- value: function setColumn(col, selectAllChecked, eventType) {
28
- this.setAllColumns([col], selectAllChecked, eventType);
29
- }
30
- }, {
31
- key: "setAllColumns",
32
- value: function setAllColumns(cols, selectAllChecked, eventType) {
33
- if (this.columnModel.isPivotMode()) {
34
- this.setAllPivot(cols, selectAllChecked, eventType);
35
- } else {
36
- this.setAllVisible(cols, selectAllChecked, eventType);
37
- }
38
- }
39
- }, {
40
- key: "extractAllLeafColumns",
41
- value: function extractAllLeafColumns(allItems) {
42
- var res = [];
43
- var recursiveFunc = function recursiveFunc(items) {
44
- items.forEach(function (item) {
45
- if (!item.isPassesFilter()) {
46
- return;
47
- }
48
- if (item.isGroup()) {
49
- recursiveFunc(item.getChildren());
50
- } else {
51
- res.push(item.getColumn());
52
- }
53
- });
54
- };
55
- recursiveFunc(allItems);
56
- return res;
57
- }
58
- }, {
59
- key: "setAllVisible",
60
- value: function setAllVisible(columns, visible, eventType) {
61
- var colStateItems = [];
62
- columns.forEach(function (col) {
63
- if (col.getColDef().lockVisible) {
64
- return;
65
- }
66
- if (col.isVisible() != visible) {
67
- colStateItems.push({
68
- colId: col.getId(),
69
- hide: !visible
70
- });
71
- }
72
- });
73
- if (colStateItems.length > 0) {
74
- this.columnModel.applyColumnState({
75
- state: colStateItems
76
- }, eventType);
77
- }
78
- }
79
- }, {
80
- key: "setAllPivot",
81
- value: function setAllPivot(columns, value, eventType) {
82
- if (this.gridOptionsService.is('functionsPassive')) {
83
- this.setAllPivotPassive(columns, value);
84
- } else {
85
- this.setAllPivotActive(columns, value, eventType);
86
- }
87
- }
88
- }, {
89
- key: "setAllPivotPassive",
90
- value: function setAllPivotPassive(columns, value) {
91
- var copyOfPivotColumns = this.columnModel.getPivotColumns().slice();
92
- var copyOfValueColumns = this.columnModel.getValueColumns().slice();
93
- var copyOfRowGroupColumns = this.columnModel.getRowGroupColumns().slice();
94
- var pivotChanged = false;
95
- var valueChanged = false;
96
- var rowGroupChanged = false;
97
- var turnOnAction = function turnOnAction(col) {
98
- // don't change any column that's already got a function active
99
- if (col.isAnyFunctionActive()) {
100
- return;
101
- }
102
- if (col.isAllowValue()) {
103
- copyOfValueColumns.push(col);
104
- valueChanged = true;
105
- } else if (col.isAllowRowGroup()) {
106
- copyOfRowGroupColumns.push(col);
107
- pivotChanged = true;
108
- } else if (col.isAllowPivot()) {
109
- copyOfPivotColumns.push(col);
110
- rowGroupChanged = true;
111
- }
112
- };
113
- var turnOffAction = function turnOffAction(col) {
114
- if (!col.isAnyFunctionActive()) {
115
- return;
116
- }
117
- if (copyOfPivotColumns.indexOf(col) >= 0) {
118
- _.removeFromArray(copyOfPivotColumns, col);
119
- pivotChanged = true;
120
- }
121
- if (copyOfValueColumns.indexOf(col) >= 0) {
122
- _.removeFromArray(copyOfValueColumns, col);
123
- valueChanged = true;
124
- }
125
- if (copyOfRowGroupColumns.indexOf(col) >= 0) {
126
- _.removeFromArray(copyOfRowGroupColumns, col);
127
- rowGroupChanged = true;
128
- }
129
- };
130
- var action = value ? turnOnAction : turnOffAction;
131
- columns.forEach(action);
132
- if (pivotChanged) {
133
- var event = {
134
- type: Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,
135
- columns: copyOfPivotColumns
136
- };
137
- this.eventService.dispatchEvent(event);
138
- }
139
- if (rowGroupChanged) {
140
- var _event = {
141
- type: Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,
142
- columns: copyOfRowGroupColumns
143
- };
144
- this.eventService.dispatchEvent(_event);
145
- }
146
- if (valueChanged) {
147
- var _event2 = {
148
- type: Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,
149
- columns: copyOfRowGroupColumns
150
- };
151
- this.eventService.dispatchEvent(_event2);
152
- }
153
- }
154
- }, {
155
- key: "setAllPivotActive",
156
- value: function setAllPivotActive(columns, value, eventType) {
157
- var _this = this;
158
- var colStateItems = [];
159
- var turnOnAction = function turnOnAction(col) {
160
- // don't change any column that's already got a function active
161
- if (col.isAnyFunctionActive()) {
162
- return;
163
- }
164
- if (col.isAllowValue()) {
165
- var aggFunc = typeof col.getAggFunc() === 'string' ? col.getAggFunc() : _this.aggFuncService.getDefaultAggFunc(col);
166
- colStateItems.push({
167
- colId: col.getId(),
168
- aggFunc: aggFunc
169
- });
170
- } else if (col.isAllowRowGroup()) {
171
- colStateItems.push({
172
- colId: col.getId(),
173
- rowGroup: true
174
- });
175
- } else if (col.isAllowPivot()) {
176
- colStateItems.push({
177
- colId: col.getId(),
178
- pivot: true
179
- });
180
- }
181
- };
182
- var turnOffAction = function turnOffAction(col) {
183
- var isActive = col.isPivotActive() || col.isRowGroupActive() || col.isValueActive();
184
- if (isActive) {
185
- colStateItems.push({
186
- colId: col.getId(),
187
- pivot: false,
188
- rowGroup: false,
189
- aggFunc: null
190
- });
191
- }
192
- };
193
- var action = value ? turnOnAction : turnOffAction;
194
- columns.forEach(action);
195
- if (colStateItems.length > 0) {
196
- this.columnModel.applyColumnState({
197
- state: colStateItems
198
- }, eventType);
199
- }
200
- }
201
- }]);
202
- return ModelItemUtils;
203
- }();
204
- __decorate([Autowired('aggFuncService')], ModelItemUtils.prototype, "aggFuncService", void 0);
205
- __decorate([Autowired('columnModel')], ModelItemUtils.prototype, "columnModel", void 0);
206
- __decorate([Autowired('gridOptionsService')], ModelItemUtils.prototype, "gridOptionsService", void 0);
207
- __decorate([Autowired('eventService')], ModelItemUtils.prototype, "eventService", void 0);
208
- ModelItemUtils = __decorate([Bean('modelItemUtils')], ModelItemUtils);
209
- export { ModelItemUtils };
@@ -1,9 +0,0 @@
1
- import { Component } from "@ag-grid-community/core";
2
- export declare class PivotModePanel extends Component {
3
- private columnModel;
4
- private cbPivotMode;
5
- private createTemplate;
6
- init(): void;
7
- private onBtPivotMode;
8
- private onPivotModeChanged;
9
- }
@@ -1,68 +0,0 @@
1
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
7
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
10
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
11
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
13
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
14
- var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
15
- var c = arguments.length,
16
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
17
- d;
18
- if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
19
- return c > 3 && r && Object.defineProperty(target, key, r), r;
20
- };
21
- import { AgCheckbox, Autowired, Component, Events, PreConstruct, RefSelector } from "@ag-grid-community/core";
22
- export var PivotModePanel = /*#__PURE__*/function (_Component) {
23
- _inherits(PivotModePanel, _Component);
24
- var _super = _createSuper(PivotModePanel);
25
- function PivotModePanel() {
26
- _classCallCheck(this, PivotModePanel);
27
- return _super.apply(this, arguments);
28
- }
29
- _createClass(PivotModePanel, [{
30
- key: "createTemplate",
31
- value: function createTemplate() {
32
- return /* html */"<div class=\"ag-pivot-mode-panel\">\n <ag-toggle-button ref=\"cbPivotMode\" class=\"ag-pivot-mode-select\"></ag-toggle-button>\n </div>";
33
- }
34
- }, {
35
- key: "init",
36
- value: function init() {
37
- this.setTemplate(this.createTemplate());
38
- this.cbPivotMode.setValue(this.columnModel.isPivotMode());
39
- var localeTextFunc = this.localeService.getLocaleTextFunc();
40
- this.cbPivotMode.setLabel(localeTextFunc('pivotMode', 'Pivot Mode'));
41
- this.addManagedListener(this.cbPivotMode, AgCheckbox.EVENT_CHANGED, this.onBtPivotMode.bind(this));
42
- this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onPivotModeChanged.bind(this));
43
- this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onPivotModeChanged.bind(this));
44
- }
45
- }, {
46
- key: "onBtPivotMode",
47
- value: function onBtPivotMode() {
48
- var newValue = !!this.cbPivotMode.getValue();
49
- if (newValue !== this.columnModel.isPivotMode()) {
50
- this.columnModel.setPivotMode(newValue, "toolPanelUi");
51
- var api = this.gridOptionsService.api;
52
- if (api) {
53
- api.refreshHeader();
54
- }
55
- }
56
- }
57
- }, {
58
- key: "onPivotModeChanged",
59
- value: function onPivotModeChanged() {
60
- var pivotModeActive = this.columnModel.isPivotMode();
61
- this.cbPivotMode.setValue(pivotModeActive);
62
- }
63
- }]);
64
- return PivotModePanel;
65
- }(Component);
66
- __decorate([Autowired('columnModel')], PivotModePanel.prototype, "columnModel", void 0);
67
- __decorate([RefSelector('cbPivotMode')], PivotModePanel.prototype, "cbPivotMode", void 0);
68
- __decorate([PreConstruct], PivotModePanel.prototype, "init", null);
@@ -1,32 +0,0 @@
1
- import { ToolPanelColumnCompParams, Component } from "@ag-grid-community/core";
2
- export declare enum ExpandState {
3
- EXPANDED = 0,
4
- COLLAPSED = 1,
5
- INDETERMINATE = 2
6
- }
7
- export declare class PrimaryColsHeaderPanel extends Component {
8
- private readonly columnModel;
9
- private readonly eExpand;
10
- private readonly eSelect;
11
- private eFilterTextField;
12
- private static DEBOUNCE_DELAY;
13
- private eExpandChecked;
14
- private eExpandUnchecked;
15
- private eExpandIndeterminate;
16
- private expandState;
17
- private selectState?;
18
- private onFilterTextChangedDebounced;
19
- private params;
20
- private static TEMPLATE;
21
- constructor();
22
- protected postConstruct(): void;
23
- init(params: ToolPanelColumnCompParams): void;
24
- private createExpandIcons;
25
- private showOrHideOptions;
26
- private onFilterTextChanged;
27
- private onMiniFilterKeyPress;
28
- private onSelectClicked;
29
- private onExpandClicked;
30
- setExpandState(state: ExpandState): void;
31
- setSelectionState(state?: boolean): void;
32
- }
@@ -1,150 +0,0 @@
1
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
7
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
10
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
11
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
13
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
14
- var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
15
- var c = arguments.length,
16
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
17
- d;
18
- if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
19
- return c > 3 && r && Object.defineProperty(target, key, r), r;
20
- };
21
- import { _, Autowired, Events, RefSelector, KeyCode, PostConstruct, Component } from "@ag-grid-community/core";
22
- export var ExpandState;
23
- (function (ExpandState) {
24
- ExpandState[ExpandState["EXPANDED"] = 0] = "EXPANDED";
25
- ExpandState[ExpandState["COLLAPSED"] = 1] = "COLLAPSED";
26
- ExpandState[ExpandState["INDETERMINATE"] = 2] = "INDETERMINATE";
27
- })(ExpandState || (ExpandState = {}));
28
- export var PrimaryColsHeaderPanel = /*#__PURE__*/function (_Component) {
29
- _inherits(PrimaryColsHeaderPanel, _Component);
30
- var _super = _createSuper(PrimaryColsHeaderPanel);
31
- function PrimaryColsHeaderPanel() {
32
- _classCallCheck(this, PrimaryColsHeaderPanel);
33
- return _super.call(this, PrimaryColsHeaderPanel.TEMPLATE);
34
- }
35
- _createClass(PrimaryColsHeaderPanel, [{
36
- key: "postConstruct",
37
- value: function postConstruct() {
38
- var _this = this;
39
- this.createExpandIcons();
40
- this.addManagedListener(this.eExpand, 'click', this.onExpandClicked.bind(this));
41
- this.addManagedListener(this.eExpand, 'keydown', function (e) {
42
- if (e.key === KeyCode.SPACE) {
43
- _this.onExpandClicked();
44
- }
45
- });
46
- this.addManagedListener(this.eSelect.getInputElement(), 'click', this.onSelectClicked.bind(this));
47
- this.eFilterTextField.onValueChange(function () {
48
- return _this.onFilterTextChanged();
49
- });
50
- this.addManagedListener(this.eFilterTextField.getInputElement(), 'keypress', this.onMiniFilterKeyPress.bind(this));
51
- this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.showOrHideOptions.bind(this));
52
- var translate = this.localeService.getLocaleTextFunc();
53
- this.eSelect.setInputAriaLabel(translate('ariaColumnSelectAll', 'Toggle Select All Columns'));
54
- this.eFilterTextField.setInputAriaLabel(translate('ariaFilterColumnsInput', 'Filter Columns Input'));
55
- }
56
- }, {
57
- key: "init",
58
- value: function init(params) {
59
- this.params = params;
60
- if (this.columnModel.isReady()) {
61
- this.showOrHideOptions();
62
- }
63
- }
64
- }, {
65
- key: "createExpandIcons",
66
- value: function createExpandIcons() {
67
- this.eExpand.appendChild(this.eExpandChecked = _.createIconNoSpan('columnSelectOpen', this.gridOptionsService));
68
- this.eExpand.appendChild(this.eExpandUnchecked = _.createIconNoSpan('columnSelectClosed', this.gridOptionsService));
69
- this.eExpand.appendChild(this.eExpandIndeterminate = _.createIconNoSpan('columnSelectIndeterminate', this.gridOptionsService));
70
- this.setExpandState(ExpandState.EXPANDED);
71
- }
72
- // we only show expand / collapse if we are showing columns
73
- }, {
74
- key: "showOrHideOptions",
75
- value: function showOrHideOptions() {
76
- var showFilter = !this.params.suppressColumnFilter;
77
- var showSelect = !this.params.suppressColumnSelectAll;
78
- var showExpand = !this.params.suppressColumnExpandAll;
79
- var groupsPresent = this.columnModel.isPrimaryColumnGroupsPresent();
80
- var translate = this.localeService.getLocaleTextFunc();
81
- this.eFilterTextField.setInputPlaceholder(translate('searchOoo', 'Search...'));
82
- _.setDisplayed(this.eFilterTextField.getGui(), showFilter);
83
- _.setDisplayed(this.eSelect.getGui(), showSelect);
84
- _.setDisplayed(this.eExpand, showExpand && groupsPresent);
85
- }
86
- }, {
87
- key: "onFilterTextChanged",
88
- value: function onFilterTextChanged() {
89
- var _this2 = this;
90
- if (!this.onFilterTextChangedDebounced) {
91
- this.onFilterTextChangedDebounced = _.debounce(function () {
92
- var filterText = _this2.eFilterTextField.getValue();
93
- _this2.dispatchEvent({
94
- type: "filterChanged",
95
- filterText: filterText
96
- });
97
- }, PrimaryColsHeaderPanel.DEBOUNCE_DELAY);
98
- }
99
- this.onFilterTextChangedDebounced();
100
- }
101
- }, {
102
- key: "onMiniFilterKeyPress",
103
- value: function onMiniFilterKeyPress(e) {
104
- var _this3 = this;
105
- if (e.key === KeyCode.ENTER) {
106
- // we need to add a delay that corresponds to the filter text debounce delay to ensure
107
- // the text filtering has happened, otherwise all columns will be deselected
108
- setTimeout(function () {
109
- return _this3.onSelectClicked();
110
- }, PrimaryColsHeaderPanel.DEBOUNCE_DELAY);
111
- }
112
- }
113
- }, {
114
- key: "onSelectClicked",
115
- value: function onSelectClicked() {
116
- this.dispatchEvent({
117
- type: this.selectState ? 'unselectAll' : 'selectAll'
118
- });
119
- }
120
- }, {
121
- key: "onExpandClicked",
122
- value: function onExpandClicked() {
123
- this.dispatchEvent({
124
- type: this.expandState === ExpandState.EXPANDED ? 'collapseAll' : 'expandAll'
125
- });
126
- }
127
- }, {
128
- key: "setExpandState",
129
- value: function setExpandState(state) {
130
- this.expandState = state;
131
- _.setDisplayed(this.eExpandChecked, this.expandState === ExpandState.EXPANDED);
132
- _.setDisplayed(this.eExpandUnchecked, this.expandState === ExpandState.COLLAPSED);
133
- _.setDisplayed(this.eExpandIndeterminate, this.expandState === ExpandState.INDETERMINATE);
134
- }
135
- }, {
136
- key: "setSelectionState",
137
- value: function setSelectionState(state) {
138
- this.selectState = state;
139
- this.eSelect.setValue(this.selectState);
140
- }
141
- }]);
142
- return PrimaryColsHeaderPanel;
143
- }(Component);
144
- PrimaryColsHeaderPanel.DEBOUNCE_DELAY = 300;
145
- PrimaryColsHeaderPanel.TEMPLATE = "<div class=\"ag-column-select-header\" role=\"presentation\">\n <div ref=\"eExpand\" class=\"ag-column-select-header-icon\" tabindex=\"0\"></div>\n <ag-checkbox ref=\"eSelect\" class=\"ag-column-select-header-checkbox\"></ag-checkbox>\n <ag-input-text-field class=\"ag-column-select-header-filter-wrapper\" ref=\"eFilterTextField\"></ag-input-text-field>\n </div>";
146
- __decorate([Autowired('columnModel')], PrimaryColsHeaderPanel.prototype, "columnModel", void 0);
147
- __decorate([RefSelector('eExpand')], PrimaryColsHeaderPanel.prototype, "eExpand", void 0);
148
- __decorate([RefSelector('eSelect')], PrimaryColsHeaderPanel.prototype, "eSelect", void 0);
149
- __decorate([RefSelector('eFilterTextField')], PrimaryColsHeaderPanel.prototype, "eFilterTextField", void 0);
150
- __decorate([PostConstruct], PrimaryColsHeaderPanel.prototype, "postConstruct", null);
@@ -1,44 +0,0 @@
1
- import { AbstractColDef, ColumnEventType, Component, ToolPanelColumnCompParams } from "@ag-grid-community/core";
2
- import { ColumnModelItem } from "./columnModelItem";
3
- export declare class PrimaryColsListPanel extends Component {
4
- static TEMPLATE: string;
5
- private columnModel;
6
- private colDefService;
7
- private modelItemUtils;
8
- private allowDragging;
9
- private filterText;
10
- private expandGroupsByDefault;
11
- private params;
12
- private eventType;
13
- private groupsExist;
14
- private virtualList;
15
- private allColsTree;
16
- private displayedColsList;
17
- private destroyColumnItemFuncs;
18
- constructor();
19
- private destroyColumnTree;
20
- init(params: ToolPanelColumnCompParams, allowDragging: boolean, eventType: ColumnEventType): void;
21
- private createComponentFromItem;
22
- onColumnsChanged(): void;
23
- getDisplayedColsList(): ColumnModelItem[];
24
- private getExpandedStates;
25
- private setExpandedStates;
26
- private buildTreeFromWhatGridIsDisplaying;
27
- setColumnLayout(colDefs: AbstractColDef[]): void;
28
- private buildTreeFromProvidedColumnDefs;
29
- private buildListModel;
30
- private onColumnExpanded;
31
- private flattenAndFilterModel;
32
- private focusRowIfAlive;
33
- private forEachItem;
34
- doSetExpandedAll(value: boolean): void;
35
- setGroupsExpanded(expand: boolean, groupIds?: string[]): void;
36
- private getExpandState;
37
- doSetSelectedAll(selectAllChecked: boolean): void;
38
- private getSelectionState;
39
- setFilterText(filterText: string): void;
40
- private markFilteredColumns;
41
- private notifyListeners;
42
- private fireGroupExpandedEvent;
43
- private fireSelectionChangedEvent;
44
- }