@lemon-fe/components 1.2.14 → 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.
- package/es/data-grid/cell-editors/date.d.ts +2 -2
- package/es/data-grid/cell-editors/number.d.ts +2 -2
- package/es/data-grid/cell-editors/number.js +1 -4
- package/es/data-grid/cell-editors/row.d.ts +2 -2
- package/es/data-grid/cell-editors/select.d.ts +3 -3
- package/es/data-grid/cell-editors/text.d.ts +2 -2
- package/es/data-grid/cell-editors/utils.d.ts +1 -1
- package/es/data-grid/components/custom-panel/index.d.ts +1 -1
- package/es/data-grid/components/custom-panel/item.d.ts +1 -1
- package/es/data-grid/components/custom-panel/typings.d.ts +1 -1
- package/es/data-grid/index.d.ts +8 -7
- package/es/data-grid/index.js +39 -21
- package/es/data-grid/index.less +1 -1
- package/es/data-grid/locale/en_US.js +3 -1
- package/es/data-grid/locale/zh_CN.js +3 -1
- package/es/data-grid/renderer/actions-renderer.d.ts +1 -1
- package/es/data-grid/renderer/actions.d.ts +1 -1
- package/es/data-grid/renderer/cell-delete-renderer.d.ts +1 -1
- package/es/data-grid/renderer/cell-index-renderer.d.ts +1 -1
- package/es/data-grid/renderer/cell-renderer.d.ts +1 -1
- package/es/data-grid/renderer/detali-cell-renderer.d.ts +1 -1
- package/es/data-grid/renderer/header-renderer.d.ts +1 -1
- package/es/data-grid/renderer/header-renderer.js +0 -1
- package/es/data-grid/typings.d.ts +2 -2
- package/es/data-grid/utils.d.ts +1 -1
- package/es/index.d.ts +4 -3
- package/es/index.js +4 -2
- package/es/select-view/index.d.ts +1 -1
- package/package.json +5 -14
- package/es/data-grid/modules/clipboard/clipboard/clipboardService.d.ts +0 -62
- package/es/data-grid/modules/clipboard/clipboard/clipboardService.js +0 -1007
- package/es/data-grid/modules/clipboard/clipboardModule.d.ts +0 -2
- package/es/data-grid/modules/clipboard/clipboardModule.js +0 -10
- package/es/data-grid/modules/clipboard/main.d.ts +0 -1
- package/es/data-grid/modules/clipboard/main.js +0 -1
- package/es/data-grid/modules/clipboard/version.d.ts +0 -1
- package/es/data-grid/modules/clipboard/version.js +0 -2
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnModelItem.d.ts +0 -26
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnModelItem.js +0 -94
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnToolPanel.d.ts +0 -32
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnToolPanel.js +0 -272
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/modelItemUtils.d.ts +0 -16
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/modelItemUtils.js +0 -209
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/pivotModePanel.d.ts +0 -9
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/pivotModePanel.js +0 -68
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.d.ts +0 -32
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.js +0 -150
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.d.ts +0 -44
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.js +0 -455
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.d.ts +0 -26
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.js +0 -224
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.d.ts +0 -24
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.js +0 -123
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.d.ts +0 -37
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.js +0 -314
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.d.ts +0 -51
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.js +0 -406
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.d.ts +0 -24
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.js +0 -264
- package/es/data-grid/modules/column-tool-panel/columnsToolPanelModule.d.ts +0 -2
- package/es/data-grid/modules/column-tool-panel/columnsToolPanelModule.js +0 -29
- package/es/data-grid/modules/column-tool-panel/main.d.ts +0 -2
- package/es/data-grid/modules/column-tool-panel/main.js +0 -3
- package/es/data-grid/modules/column-tool-panel/version.d.ts +0 -1
- package/es/data-grid/modules/column-tool-panel/version.js +0 -2
- package/es/data-grid/modules/master-detail/main.d.ts +0 -1
- package/es/data-grid/modules/master-detail/main.js +0 -1
- package/es/data-grid/modules/master-detail/masterDetail/detailCellRenderer.d.ts +0 -14
- package/es/data-grid/modules/master-detail/masterDetail/detailCellRenderer.js +0 -144
- package/es/data-grid/modules/master-detail/masterDetail/detailCellRendererCtrl.d.ts +0 -19
- package/es/data-grid/modules/master-detail/masterDetail/detailCellRendererCtrl.js +0 -203
- package/es/data-grid/modules/master-detail/masterDetailModule.d.ts +0 -2
- package/es/data-grid/modules/master-detail/masterDetailModule.js +0 -18
- package/es/data-grid/modules/master-detail/version.d.ts +0 -1
- package/es/data-grid/modules/master-detail/version.js +0 -2
- package/es/data-grid/modules/menu/main.d.ts +0 -1
- package/es/data-grid/modules/menu/main.js +0 -1
- package/es/data-grid/modules/menu/menu/chartMenuItemMapper.d.ts +0 -13
- package/es/data-grid/modules/menu/menu/chartMenuItemMapper.js +0 -351
- package/es/data-grid/modules/menu/menu/contextMenu.d.ts +0 -13
- package/es/data-grid/modules/menu/menu/contextMenu.js +0 -267
- package/es/data-grid/modules/menu/menu/enterpriseMenu.d.ts +0 -66
- package/es/data-grid/modules/menu/menu/enterpriseMenu.js +0 -592
- package/es/data-grid/modules/menu/menu/menuItemMapper.d.ts +0 -13
- package/es/data-grid/modules/menu/menu/menuItemMapper.js +0 -328
- package/es/data-grid/modules/menu/menuModule.d.ts +0 -2
- package/es/data-grid/modules/menu/menuModule.js +0 -12
- package/es/data-grid/modules/menu/version.d.ts +0 -1
- package/es/data-grid/modules/menu/version.js +0 -2
- package/es/data-grid/modules/row-grouping/main.d.ts +0 -4
- package/es/data-grid/modules/row-grouping/main.js +0 -4
- package/es/data-grid/modules/row-grouping/rowGrouping/aggFuncService.d.ts +0 -23
- package/es/data-grid/modules/row-grouping/rowGrouping/aggFuncService.js +0 -250
- package/es/data-grid/modules/row-grouping/rowGrouping/aggregationStage.d.ts +0 -22
- package/es/data-grid/modules/row-grouping/rowGrouping/aggregationStage.js +0 -285
- package/es/data-grid/modules/row-grouping/rowGrouping/batchRemover.d.ts +0 -12
- package/es/data-grid/modules/row-grouping/rowGrouping/batchRemover.js +0 -77
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.d.ts +0 -75
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.js +0 -516
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.d.ts +0 -40
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.js +0 -367
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.d.ts +0 -11
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.js +0 -85
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.d.ts +0 -17
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.js +0 -139
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.d.ts +0 -15
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.js +0 -105
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.d.ts +0 -15
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.js +0 -105
- package/es/data-grid/modules/row-grouping/rowGrouping/filterAggregatesStage.d.ts +0 -9
- package/es/data-grid/modules/row-grouping/rowGrouping/filterAggregatesStage.js +0 -136
- package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.d.ts +0 -39
- package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.js +0 -319
- package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.d.ts +0 -23
- package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.js +0 -163
- package/es/data-grid/modules/row-grouping/rowGrouping/groupStage.d.ts +0 -48
- package/es/data-grid/modules/row-grouping/rowGrouping/groupStage.js +0 -740
- package/es/data-grid/modules/row-grouping/rowGrouping/pivotColDefService.d.ts +0 -24
- package/es/data-grid/modules/row-grouping/rowGrouping/pivotColDefService.js +0 -396
- package/es/data-grid/modules/row-grouping/rowGrouping/pivotStage.d.ts +0 -19
- package/es/data-grid/modules/row-grouping/rowGrouping/pivotStage.js +0 -182
- package/es/data-grid/modules/row-grouping/rowGroupingModule.d.ts +0 -2
- package/es/data-grid/modules/row-grouping/rowGroupingModule.js +0 -28
- package/es/data-grid/modules/row-grouping/version.d.ts +0 -1
- package/es/data-grid/modules/row-grouping/version.js +0 -2
- package/es/data-grid/modules/side-bar/main.d.ts +0 -2
- package/es/data-grid/modules/side-bar/main.js +0 -2
- package/es/data-grid/modules/side-bar/sideBar/common/toolPanelColDefService.d.ts +0 -11
- package/es/data-grid/modules/side-bar/sideBar/common/toolPanelColDefService.js +0 -216
- package/es/data-grid/modules/side-bar/sideBar/horizontalResizeComp.d.ts +0 -19
- package/es/data-grid/modules/side-bar/sideBar/horizontalResizeComp.js +0 -108
- package/es/data-grid/modules/side-bar/sideBar/sideBarButtonComp.d.ts +0 -16
- package/es/data-grid/modules/side-bar/sideBar/sideBarButtonComp.js +0 -84
- package/es/data-grid/modules/side-bar/sideBar/sideBarButtonsComp.d.ts +0 -18
- package/es/data-grid/modules/side-bar/sideBar/sideBarButtonsComp.js +0 -89
- package/es/data-grid/modules/side-bar/sideBar/sideBarComp.d.ts +0 -28
- package/es/data-grid/modules/side-bar/sideBar/sideBarComp.js +0 -325
- package/es/data-grid/modules/side-bar/sideBar/sideBarDefParser.d.ts +0 -10
- package/es/data-grid/modules/side-bar/sideBar/sideBarDefParser.js +0 -95
- package/es/data-grid/modules/side-bar/sideBar/toolPanelWrapper.d.ts +0 -17
- package/es/data-grid/modules/side-bar/sideBar/toolPanelWrapper.js +0 -103
- package/es/data-grid/modules/side-bar/sideBarModule.d.ts +0 -2
- package/es/data-grid/modules/side-bar/sideBarModule.js +0 -22
- package/es/data-grid/modules/side-bar/version.d.ts +0 -1
- package/es/data-grid/modules/side-bar/version.js +0 -2
|
@@ -1,224 +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 { AutoScrollService, Autowired, BeanStub, DragAndDropService, DragSourceType, Events, ProvidedColumnGroup, PostConstruct, _ } from "@ag-grid-community/core";
|
|
22
|
-
import { ToolPanelColumnGroupComp } from "./toolPanelColumnGroupComp";
|
|
23
|
-
var PRIMARY_COLS_LIST_ITEM_HOVERED = 'ag-list-item-hovered';
|
|
24
|
-
export var PrimaryColsListPanelItemDragFeature = /*#__PURE__*/function (_BeanStub) {
|
|
25
|
-
_inherits(PrimaryColsListPanelItemDragFeature, _BeanStub);
|
|
26
|
-
var _super = _createSuper(PrimaryColsListPanelItemDragFeature);
|
|
27
|
-
function PrimaryColsListPanelItemDragFeature(comp, virtualList) {
|
|
28
|
-
var _this;
|
|
29
|
-
_classCallCheck(this, PrimaryColsListPanelItemDragFeature);
|
|
30
|
-
_this = _super.call(this);
|
|
31
|
-
_this.comp = comp;
|
|
32
|
-
_this.virtualList = virtualList;
|
|
33
|
-
_this.currentDragColumn = null;
|
|
34
|
-
_this.lastHoveredColumnItem = null;
|
|
35
|
-
return _this;
|
|
36
|
-
}
|
|
37
|
-
_createClass(PrimaryColsListPanelItemDragFeature, [{
|
|
38
|
-
key: "postConstruct",
|
|
39
|
-
value: function postConstruct() {
|
|
40
|
-
this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START, this.columnPanelItemDragStart.bind(this));
|
|
41
|
-
this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END, this.columnPanelItemDragEnd.bind(this));
|
|
42
|
-
this.createDropTarget();
|
|
43
|
-
this.createAutoScrollService();
|
|
44
|
-
}
|
|
45
|
-
}, {
|
|
46
|
-
key: "columnPanelItemDragStart",
|
|
47
|
-
value: function columnPanelItemDragStart(_ref) {
|
|
48
|
-
var column = _ref.column;
|
|
49
|
-
this.currentDragColumn = column;
|
|
50
|
-
var currentColumns = this.getCurrentColumns();
|
|
51
|
-
var hasNotMovable = currentColumns.find(function (col) {
|
|
52
|
-
var colDef = col.getColDef();
|
|
53
|
-
return !!colDef.suppressMovable || !!colDef.lockPosition;
|
|
54
|
-
});
|
|
55
|
-
if (hasNotMovable) {
|
|
56
|
-
this.moveBlocked = true;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}, {
|
|
60
|
-
key: "columnPanelItemDragEnd",
|
|
61
|
-
value: function columnPanelItemDragEnd() {
|
|
62
|
-
var _this2 = this;
|
|
63
|
-
window.setTimeout(function () {
|
|
64
|
-
_this2.currentDragColumn = null;
|
|
65
|
-
_this2.moveBlocked = false;
|
|
66
|
-
}, 10);
|
|
67
|
-
}
|
|
68
|
-
}, {
|
|
69
|
-
key: "createDropTarget",
|
|
70
|
-
value: function createDropTarget() {
|
|
71
|
-
var _this3 = this;
|
|
72
|
-
var dropTarget = {
|
|
73
|
-
isInterestedIn: function isInterestedIn(type) {
|
|
74
|
-
return type === DragSourceType.ToolPanel;
|
|
75
|
-
},
|
|
76
|
-
getIconName: function getIconName() {
|
|
77
|
-
return DragAndDropService[_this3.moveBlocked ? 'ICON_NOT_ALLOWED' : 'ICON_MOVE'];
|
|
78
|
-
},
|
|
79
|
-
getContainer: function getContainer() {
|
|
80
|
-
return _this3.comp.getGui();
|
|
81
|
-
},
|
|
82
|
-
onDragging: function onDragging(e) {
|
|
83
|
-
return _this3.onDragging(e);
|
|
84
|
-
},
|
|
85
|
-
onDragStop: function onDragStop() {
|
|
86
|
-
return _this3.onDragStop();
|
|
87
|
-
},
|
|
88
|
-
onDragLeave: function onDragLeave() {
|
|
89
|
-
return _this3.onDragLeave();
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
this.dragAndDropService.addDropTarget(dropTarget);
|
|
93
|
-
}
|
|
94
|
-
}, {
|
|
95
|
-
key: "createAutoScrollService",
|
|
96
|
-
value: function createAutoScrollService() {
|
|
97
|
-
var virtualListGui = this.virtualList.getGui();
|
|
98
|
-
this.autoScrollService = new AutoScrollService({
|
|
99
|
-
scrollContainer: virtualListGui,
|
|
100
|
-
scrollAxis: 'y',
|
|
101
|
-
getVerticalPosition: function getVerticalPosition() {
|
|
102
|
-
return virtualListGui.scrollTop;
|
|
103
|
-
},
|
|
104
|
-
setVerticalPosition: function setVerticalPosition(position) {
|
|
105
|
-
return virtualListGui.scrollTop = position;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}, {
|
|
110
|
-
key: "onDragging",
|
|
111
|
-
value: function onDragging(e) {
|
|
112
|
-
if (!this.currentDragColumn || this.moveBlocked) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
var hoveredColumnItem = this.getDragColumnItem(e);
|
|
116
|
-
var comp = this.virtualList.getComponentAt(hoveredColumnItem.rowIndex);
|
|
117
|
-
if (!comp) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
var el = comp.getGui().parentElement;
|
|
121
|
-
if (this.lastHoveredColumnItem && this.lastHoveredColumnItem.rowIndex === hoveredColumnItem.rowIndex && this.lastHoveredColumnItem.position === hoveredColumnItem.position) {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
this.autoScrollService.check(e.event);
|
|
125
|
-
this.clearHoveredItems();
|
|
126
|
-
this.lastHoveredColumnItem = hoveredColumnItem;
|
|
127
|
-
_.radioCssClass(el, "".concat(PRIMARY_COLS_LIST_ITEM_HOVERED));
|
|
128
|
-
_.radioCssClass(el, "ag-item-highlight-".concat(hoveredColumnItem.position));
|
|
129
|
-
}
|
|
130
|
-
}, {
|
|
131
|
-
key: "getDragColumnItem",
|
|
132
|
-
value: function getDragColumnItem(e) {
|
|
133
|
-
var virtualListGui = this.virtualList.getGui();
|
|
134
|
-
var paddingTop = parseFloat(window.getComputedStyle(virtualListGui).paddingTop);
|
|
135
|
-
var rowHeight = this.virtualList.getRowHeight();
|
|
136
|
-
var scrollTop = this.virtualList.getScrollTop();
|
|
137
|
-
var rowIndex = Math.max(0, (e.y - paddingTop + scrollTop) / rowHeight);
|
|
138
|
-
var maxLen = this.comp.getDisplayedColsList().length - 1;
|
|
139
|
-
var normalizedRowIndex = Math.min(maxLen, rowIndex) | 0;
|
|
140
|
-
return {
|
|
141
|
-
rowIndex: normalizedRowIndex,
|
|
142
|
-
position: Math.round(rowIndex) > rowIndex || rowIndex > maxLen ? 'bottom' : 'top',
|
|
143
|
-
component: this.virtualList.getComponentAt(normalizedRowIndex)
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
}, {
|
|
147
|
-
key: "onDragStop",
|
|
148
|
-
value: function onDragStop() {
|
|
149
|
-
if (this.moveBlocked) {
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
var targetIndex = this.getTargetIndex();
|
|
153
|
-
var columnsToMove = this.getCurrentColumns();
|
|
154
|
-
if (targetIndex != null) {
|
|
155
|
-
this.columnModel.moveColumns(columnsToMove, targetIndex, 'toolPanelUi');
|
|
156
|
-
}
|
|
157
|
-
this.clearHoveredItems();
|
|
158
|
-
this.autoScrollService.ensureCleared();
|
|
159
|
-
}
|
|
160
|
-
}, {
|
|
161
|
-
key: "getMoveDiff",
|
|
162
|
-
value: function getMoveDiff(end) {
|
|
163
|
-
var allColumns = this.columnModel.getAllGridColumns();
|
|
164
|
-
var currentColumns = this.getCurrentColumns();
|
|
165
|
-
var currentColumn = currentColumns[0];
|
|
166
|
-
var span = currentColumns.length;
|
|
167
|
-
var currentIndex = allColumns.indexOf(currentColumn);
|
|
168
|
-
if (currentIndex < end) {
|
|
169
|
-
return span;
|
|
170
|
-
}
|
|
171
|
-
return 0;
|
|
172
|
-
}
|
|
173
|
-
}, {
|
|
174
|
-
key: "getCurrentColumns",
|
|
175
|
-
value: function getCurrentColumns() {
|
|
176
|
-
if (this.currentDragColumn instanceof ProvidedColumnGroup) {
|
|
177
|
-
return this.currentDragColumn.getLeafColumns();
|
|
178
|
-
}
|
|
179
|
-
return [this.currentDragColumn];
|
|
180
|
-
}
|
|
181
|
-
}, {
|
|
182
|
-
key: "getTargetIndex",
|
|
183
|
-
value: function getTargetIndex() {
|
|
184
|
-
if (!this.lastHoveredColumnItem) {
|
|
185
|
-
return null;
|
|
186
|
-
}
|
|
187
|
-
var columnItemComponent = this.lastHoveredColumnItem.component;
|
|
188
|
-
var isBefore = this.lastHoveredColumnItem.position === 'top';
|
|
189
|
-
var targetColumn;
|
|
190
|
-
if (columnItemComponent instanceof ToolPanelColumnGroupComp) {
|
|
191
|
-
var columns = columnItemComponent.getColumns();
|
|
192
|
-
targetColumn = columns[0];
|
|
193
|
-
isBefore = true;
|
|
194
|
-
} else {
|
|
195
|
-
targetColumn = columnItemComponent.getColumn();
|
|
196
|
-
}
|
|
197
|
-
var targetColumnIndex = this.columnModel.getAllGridColumns().indexOf(targetColumn);
|
|
198
|
-
var adjustedTarget = isBefore ? targetColumnIndex : targetColumnIndex + 1;
|
|
199
|
-
var diff = this.getMoveDiff(adjustedTarget);
|
|
200
|
-
return adjustedTarget - diff;
|
|
201
|
-
}
|
|
202
|
-
}, {
|
|
203
|
-
key: "onDragLeave",
|
|
204
|
-
value: function onDragLeave() {
|
|
205
|
-
this.clearHoveredItems();
|
|
206
|
-
this.autoScrollService.ensureCleared();
|
|
207
|
-
}
|
|
208
|
-
}, {
|
|
209
|
-
key: "clearHoveredItems",
|
|
210
|
-
value: function clearHoveredItems() {
|
|
211
|
-
var virtualListGui = this.virtualList.getGui();
|
|
212
|
-
virtualListGui.querySelectorAll(".".concat(PRIMARY_COLS_LIST_ITEM_HOVERED)).forEach(function (el) {
|
|
213
|
-
[PRIMARY_COLS_LIST_ITEM_HOVERED, 'ag-item-highlight-top', 'ag-item-highlight-bottom'].forEach(function (cls) {
|
|
214
|
-
el.classList.remove(cls);
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
this.lastHoveredColumnItem = null;
|
|
218
|
-
}
|
|
219
|
-
}]);
|
|
220
|
-
return PrimaryColsListPanelItemDragFeature;
|
|
221
|
-
}(BeanStub);
|
|
222
|
-
__decorate([Autowired('columnModel')], PrimaryColsListPanelItemDragFeature.prototype, "columnModel", void 0);
|
|
223
|
-
__decorate([Autowired('dragAndDropService')], PrimaryColsListPanelItemDragFeature.prototype, "dragAndDropService", void 0);
|
|
224
|
-
__decorate([PostConstruct], PrimaryColsListPanelItemDragFeature.prototype, "postConstruct", null);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ColDef, ColGroupDef, Component, ToolPanelColumnCompParams, IPrimaryColsPanel, ColumnEventType } from "@ag-grid-community/core";
|
|
2
|
-
export declare class PrimaryColsPanel extends Component implements IPrimaryColsPanel {
|
|
3
|
-
private static TEMPLATE;
|
|
4
|
-
private readonly primaryColsHeaderPanel;
|
|
5
|
-
private readonly primaryColsListPanel;
|
|
6
|
-
private allowDragging;
|
|
7
|
-
private params;
|
|
8
|
-
private eventType;
|
|
9
|
-
private positionableFeature;
|
|
10
|
-
constructor();
|
|
11
|
-
init(allowDragging: boolean, params: ToolPanelColumnCompParams, eventType: ColumnEventType): void;
|
|
12
|
-
toggleResizable(resizable: boolean): void;
|
|
13
|
-
onExpandAll(): void;
|
|
14
|
-
onCollapseAll(): void;
|
|
15
|
-
expandGroups(groupIds?: string[]): void;
|
|
16
|
-
collapseGroups(groupIds?: string[]): void;
|
|
17
|
-
setColumnLayout(colDefs: (ColDef | ColGroupDef)[]): void;
|
|
18
|
-
private onFilterChanged;
|
|
19
|
-
syncLayoutWithGrid(): void;
|
|
20
|
-
private onSelectAll;
|
|
21
|
-
private onUnselectAll;
|
|
22
|
-
private onGroupExpanded;
|
|
23
|
-
private onSelectionChange;
|
|
24
|
-
}
|
|
@@ -1,123 +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 { Component, RefSelector, PositionableFeature } from "@ag-grid-community/core";
|
|
22
|
-
export var PrimaryColsPanel = /*#__PURE__*/function (_Component) {
|
|
23
|
-
_inherits(PrimaryColsPanel, _Component);
|
|
24
|
-
var _super = _createSuper(PrimaryColsPanel);
|
|
25
|
-
function PrimaryColsPanel() {
|
|
26
|
-
_classCallCheck(this, PrimaryColsPanel);
|
|
27
|
-
return _super.call(this, PrimaryColsPanel.TEMPLATE);
|
|
28
|
-
}
|
|
29
|
-
// we allow dragging in the toolPanel, but not when this component appears in the column menu
|
|
30
|
-
_createClass(PrimaryColsPanel, [{
|
|
31
|
-
key: "init",
|
|
32
|
-
value: function init(allowDragging, params, eventType) {
|
|
33
|
-
this.allowDragging = allowDragging;
|
|
34
|
-
this.params = params;
|
|
35
|
-
this.eventType = eventType;
|
|
36
|
-
this.primaryColsHeaderPanel.init(this.params);
|
|
37
|
-
var hideFilter = this.params.suppressColumnFilter;
|
|
38
|
-
var hideSelect = this.params.suppressColumnSelectAll;
|
|
39
|
-
var hideExpand = this.params.suppressColumnExpandAll;
|
|
40
|
-
if (hideExpand && hideFilter && hideSelect) {
|
|
41
|
-
this.primaryColsHeaderPanel.setDisplayed(false);
|
|
42
|
-
}
|
|
43
|
-
this.addManagedListener(this.primaryColsListPanel, 'groupExpanded', this.onGroupExpanded.bind(this));
|
|
44
|
-
this.addManagedListener(this.primaryColsListPanel, 'selectionChanged', this.onSelectionChange.bind(this));
|
|
45
|
-
this.primaryColsListPanel.init(this.params, this.allowDragging, this.eventType);
|
|
46
|
-
this.addManagedListener(this.primaryColsHeaderPanel, 'expandAll', this.onExpandAll.bind(this));
|
|
47
|
-
this.addManagedListener(this.primaryColsHeaderPanel, 'collapseAll', this.onCollapseAll.bind(this));
|
|
48
|
-
this.addManagedListener(this.primaryColsHeaderPanel, 'selectAll', this.onSelectAll.bind(this));
|
|
49
|
-
this.addManagedListener(this.primaryColsHeaderPanel, 'unselectAll', this.onUnselectAll.bind(this));
|
|
50
|
-
this.addManagedListener(this.primaryColsHeaderPanel, 'filterChanged', this.onFilterChanged.bind(this));
|
|
51
|
-
this.positionableFeature = new PositionableFeature(this.getGui(), {
|
|
52
|
-
minHeight: 100
|
|
53
|
-
});
|
|
54
|
-
this.createManagedBean(this.positionableFeature);
|
|
55
|
-
}
|
|
56
|
-
}, {
|
|
57
|
-
key: "toggleResizable",
|
|
58
|
-
value: function toggleResizable(resizable) {
|
|
59
|
-
this.positionableFeature.setResizable(resizable ? {
|
|
60
|
-
bottom: true
|
|
61
|
-
} : false);
|
|
62
|
-
}
|
|
63
|
-
}, {
|
|
64
|
-
key: "onExpandAll",
|
|
65
|
-
value: function onExpandAll() {
|
|
66
|
-
this.primaryColsListPanel.doSetExpandedAll(true);
|
|
67
|
-
}
|
|
68
|
-
}, {
|
|
69
|
-
key: "onCollapseAll",
|
|
70
|
-
value: function onCollapseAll() {
|
|
71
|
-
this.primaryColsListPanel.doSetExpandedAll(false);
|
|
72
|
-
}
|
|
73
|
-
}, {
|
|
74
|
-
key: "expandGroups",
|
|
75
|
-
value: function expandGroups(groupIds) {
|
|
76
|
-
this.primaryColsListPanel.setGroupsExpanded(true, groupIds);
|
|
77
|
-
}
|
|
78
|
-
}, {
|
|
79
|
-
key: "collapseGroups",
|
|
80
|
-
value: function collapseGroups(groupIds) {
|
|
81
|
-
this.primaryColsListPanel.setGroupsExpanded(false, groupIds);
|
|
82
|
-
}
|
|
83
|
-
}, {
|
|
84
|
-
key: "setColumnLayout",
|
|
85
|
-
value: function setColumnLayout(colDefs) {
|
|
86
|
-
this.primaryColsListPanel.setColumnLayout(colDefs);
|
|
87
|
-
}
|
|
88
|
-
}, {
|
|
89
|
-
key: "onFilterChanged",
|
|
90
|
-
value: function onFilterChanged(event) {
|
|
91
|
-
this.primaryColsListPanel.setFilterText(event.filterText);
|
|
92
|
-
}
|
|
93
|
-
}, {
|
|
94
|
-
key: "syncLayoutWithGrid",
|
|
95
|
-
value: function syncLayoutWithGrid() {
|
|
96
|
-
this.primaryColsListPanel.onColumnsChanged();
|
|
97
|
-
}
|
|
98
|
-
}, {
|
|
99
|
-
key: "onSelectAll",
|
|
100
|
-
value: function onSelectAll() {
|
|
101
|
-
this.primaryColsListPanel.doSetSelectedAll(true);
|
|
102
|
-
}
|
|
103
|
-
}, {
|
|
104
|
-
key: "onUnselectAll",
|
|
105
|
-
value: function onUnselectAll() {
|
|
106
|
-
this.primaryColsListPanel.doSetSelectedAll(false);
|
|
107
|
-
}
|
|
108
|
-
}, {
|
|
109
|
-
key: "onGroupExpanded",
|
|
110
|
-
value: function onGroupExpanded(event) {
|
|
111
|
-
this.primaryColsHeaderPanel.setExpandState(event.state);
|
|
112
|
-
}
|
|
113
|
-
}, {
|
|
114
|
-
key: "onSelectionChange",
|
|
115
|
-
value: function onSelectionChange(event) {
|
|
116
|
-
this.primaryColsHeaderPanel.setSelectionState(event.state);
|
|
117
|
-
}
|
|
118
|
-
}]);
|
|
119
|
-
return PrimaryColsPanel;
|
|
120
|
-
}(Component);
|
|
121
|
-
PrimaryColsPanel.TEMPLATE = "<div class=\"ag-column-select\">\n <ag-primary-cols-header ref=\"primaryColsHeaderPanel\"></ag-primary-cols-header>\n <ag-primary-cols-list ref=\"primaryColsListPanel\"></ag-primary-cols-list>\n </div>";
|
|
122
|
-
__decorate([RefSelector('primaryColsHeaderPanel')], PrimaryColsPanel.prototype, "primaryColsHeaderPanel", void 0);
|
|
123
|
-
__decorate([RefSelector('primaryColsListPanel')], PrimaryColsPanel.prototype, "primaryColsListPanel", void 0);
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Column, Component, ITooltipParams, WithoutGridCommon } from "@ag-grid-community/core";
|
|
2
|
-
export declare class ToolPanelColumnComp extends Component {
|
|
3
|
-
private readonly column;
|
|
4
|
-
private readonly columnDept;
|
|
5
|
-
private readonly allowDragging;
|
|
6
|
-
private readonly groupsExist;
|
|
7
|
-
private readonly focusWrapper;
|
|
8
|
-
private static TEMPLATE;
|
|
9
|
-
private readonly columnModel;
|
|
10
|
-
private readonly dragAndDropService;
|
|
11
|
-
private readonly modelItemUtils;
|
|
12
|
-
private eLabel;
|
|
13
|
-
private cbSelect;
|
|
14
|
-
private eDragHandle;
|
|
15
|
-
private displayName;
|
|
16
|
-
private processingColumnStateChange;
|
|
17
|
-
constructor(column: Column, columnDept: number, allowDragging: boolean, groupsExist: boolean, focusWrapper: HTMLElement);
|
|
18
|
-
init(): void;
|
|
19
|
-
getColumn(): Column;
|
|
20
|
-
private setupTooltip;
|
|
21
|
-
getTooltipParams(): WithoutGridCommon<ITooltipParams>;
|
|
22
|
-
private onContextMenu;
|
|
23
|
-
protected handleKeyDown(e: KeyboardEvent): void;
|
|
24
|
-
private onLabelClicked;
|
|
25
|
-
private onCheckboxChanged;
|
|
26
|
-
private onChangeCommon;
|
|
27
|
-
private refreshAriaLabel;
|
|
28
|
-
private setupDragging;
|
|
29
|
-
private createDragItem;
|
|
30
|
-
private onColumnStateChanged;
|
|
31
|
-
getDisplayName(): string | null;
|
|
32
|
-
onSelectAllChanged(value: boolean): void;
|
|
33
|
-
isSelected(): boolean | undefined;
|
|
34
|
-
isSelectable(): boolean;
|
|
35
|
-
isExpandable(): boolean;
|
|
36
|
-
setExpanded(value: boolean): void;
|
|
37
|
-
}
|