How to use the ag-grid-community/main.GridOptionsWrapper function in ag-grid-community

To help you get started, we’ve selected a few ag-grid-community examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / columns / panels / primaryColsPanel / primaryColsListPanel.js View on Github external
main_1._.iterateObject(this.columnComps, function (key, column) {
                column.onSelectAllChanged(checked);
            });
        }
        else {
            // however if pivot mode is off, then it's all about column visibility so we can do a bulk
            // operation directly with the column controller. we could column.onSelectAllChanged(checked)
            // as above, however this would work on each column independently and take longer.
            var primaryCols = this.columnApi.getPrimaryColumns();
            this.columnApi.setColumnsVisible(primaryCols, checked);
        }
    };
    PrimaryColsListPanel.TEMPLATE = "<div class="\&quot;ag-primary-cols-list-panel\&quot;"></div>";
    __decorate([
        main_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", main_1.GridOptionsWrapper)
    ], PrimaryColsListPanel.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        main_1.Autowired('columnController'),
        __metadata("design:type", main_1.ColumnController)
    ], PrimaryColsListPanel.prototype, "columnController", void 0);
    __decorate([
        main_1.Autowired('eventService'),
        __metadata("design:type", main_1.EventService)
    ], PrimaryColsListPanel.prototype, "globalEventService", void 0);
    __decorate([
        main_1.Autowired('columnApi'),
        __metadata("design:type", ag_grid_community_1.ColumnApi)
    ], PrimaryColsListPanel.prototype, "columnApi", void 0);
    return PrimaryColsListPanel;
}(main_1.Component));
exports.PrimaryColsListPanel = PrimaryColsListPanel;
github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / columns / columnToolPanel.js View on Github external
this.childDestroyFuncs.forEach(function (func) { return func(); });
        this.childDestroyFuncs.length = 0;
        main_1._.clearElement(this.getGui());
    };
    ColumnToolPanel.prototype.refresh = function () {
        this.destroyChildren();
        this.init(this.params);
    };
    ColumnToolPanel.prototype.destroy = function () {
        this.destroyChildren();
        _super.prototype.destroy.call(this);
    };
    ColumnToolPanel.TEMPLATE = "<div class="\&quot;ag-column-panel\&quot;"></div>";
    __decorate([
        main_1.Autowired("gridOptionsWrapper"),
        __metadata("design:type", main_1.GridOptionsWrapper)
    ], ColumnToolPanel.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        main_1.Autowired("gridApi"),
        __metadata("design:type", main_1.GridApi)
    ], ColumnToolPanel.prototype, "gridApi", void 0);
    __decorate([
        main_1.Autowired("eventService"),
        __metadata("design:type", main_1.EventService)
    ], ColumnToolPanel.prototype, "eventService", void 0);
    return ColumnToolPanel;
}(main_1.Component));
exports.ColumnToolPanel = ColumnToolPanel;
github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / columns / panels / primaryColsPanel / toolPanelColumnComp.js View on Github external
ToolPanelColumnComp.prototype.isSelected = function () {
        return this.cbSelect.getValue();
    };
    ToolPanelColumnComp.prototype.isSelectable = function () {
        return !this.cbSelect.isReadOnly();
    };
    ToolPanelColumnComp.prototype.isExpandable = function () {
        return false;
    };
    ToolPanelColumnComp.prototype.setExpanded = function (value) {
        console.warn('ag-grid: can not expand a column item that does not represent a column group header');
    };
    ToolPanelColumnComp.TEMPLATE = "<div class="\&quot;ag-column-tool-panel-column\&quot;">\n            \n            <span class="\&quot;ag-column-tool-panel-column-label\&quot;"></span>\n        </div>";
    __decorate([
        main_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", main_1.GridOptionsWrapper)
    ], ToolPanelColumnComp.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        main_1.Autowired('columnController'),
        __metadata("design:type", main_1.ColumnController)
    ], ToolPanelColumnComp.prototype, "columnController", void 0);
    __decorate([
        main_1.Autowired('eventService'),
        __metadata("design:type", main_1.EventService)
    ], ToolPanelColumnComp.prototype, "eventService", void 0);
    __decorate([
        main_1.Autowired('dragAndDropService'),
        __metadata("design:type", main_1.DragAndDropService)
    ], ToolPanelColumnComp.prototype, "dragAndDropService", void 0);
    __decorate([
        main_1.Autowired('columnApi'),
        __metadata("design:type", main_1.ColumnApi)
github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / columns / panels / primaryColsPanel / primaryColsHeaderPanel.js View on Github external
if (checkedCount > 0 && uncheckedCount > 0) {
            this.selectState = SELECTED_STATE.INDETERMINATE;
        }
        else if (uncheckedCount > 0) {
            this.selectState = SELECTED_STATE.UNCHECKED;
        }
        else {
            this.selectState = SELECTED_STATE.CHECKED;
        }
        main_1._.setDisplayed(this.eSelectChecked, this.selectState === SELECTED_STATE.CHECKED);
        main_1._.setDisplayed(this.eSelectUnchecked, this.selectState === SELECTED_STATE.UNCHECKED);
        main_1._.setDisplayed(this.eSelectIndeterminate, this.selectState === SELECTED_STATE.INDETERMINATE);
    };
    __decorate([
        main_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", main_1.GridOptionsWrapper)
    ], PrimaryColsHeaderPanel.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        main_1.Autowired('columnController'),
        __metadata("design:type", main_1.ColumnController)
    ], PrimaryColsHeaderPanel.prototype, "columnController", void 0);
    __decorate([
        main_1.Autowired('eventService'),
        __metadata("design:type", main_1.EventService)
    ], PrimaryColsHeaderPanel.prototype, "eventService", void 0);
    __decorate([
        main_1.RefSelector('eFilterTextField'),
        __metadata("design:type", HTMLInputElement)
    ], PrimaryColsHeaderPanel.prototype, "eFilterTextField", void 0);
    __decorate([
        main_1.RefSelector('eExpand'),
        __metadata("design:type", HTMLElement)
github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / columns / panels / rowGroupDropZonePanel.js View on Github external
return this.isPotentialDndColumns() ? main_1.DragAndDropService.ICON_GROUP : main_1.DragAndDropService.ICON_NOT_ALLOWED;
    };
    RowGroupDropZonePanel.prototype.getExistingColumns = function () {
        return this.columnController.getRowGroupColumns();
    };
    __decorate([
        main_1.Autowired('columnController'),
        __metadata("design:type", main_1.ColumnController)
    ], RowGroupDropZonePanel.prototype, "columnController", void 0);
    __decorate([
        main_1.Autowired('eventService'),
        __metadata("design:type", main_1.EventService)
    ], RowGroupDropZonePanel.prototype, "eventService", void 0);
    __decorate([
        main_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", main_1.GridOptionsWrapper)
    ], RowGroupDropZonePanel.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        main_1.Autowired('loggerFactory'),
        __metadata("design:type", main_1.LoggerFactory)
    ], RowGroupDropZonePanel.prototype, "loggerFactory", void 0);
    __decorate([
        main_1.Autowired('dragAndDropService'),
        __metadata("design:type", main_1.DragAndDropService)
    ], RowGroupDropZonePanel.prototype, "dragAndDropService", void 0);
    __decorate([
        main_1.Autowired('columnApi'),
        __metadata("design:type", main_1.ColumnApi)
    ], RowGroupDropZonePanel.prototype, "columnApi", void 0);
    __decorate([
        main_1.Autowired('gridApi'),
        __metadata("design:type", main_1.GridApi)
github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / columns / panels / primaryColsPanel / toolPanelColumnGroupComp.js View on Github external
};
    ToolPanelColumnGroupComp.prototype.isSelectable = function () {
        return !this.cbSelect.isReadOnly();
    };
    ToolPanelColumnGroupComp.prototype.isExpandable = function () {
        return true;
    };
    ToolPanelColumnGroupComp.prototype.setExpanded = function (value) {
        if (this.expanded !== value) {
            this.onExpandOrContractClicked();
        }
    };
    ToolPanelColumnGroupComp.TEMPLATE = "<div class="\&quot;ag-column-tool-panel-column-group\&quot;">\n            <span class="\&quot;ag-column-group-icons\&quot;">\n                <span class="\&quot;ag-column-group-closed-icon\&quot;"></span>\n                <span class="\&quot;ag-column-group-opened-icon\&quot;"></span>\n            </span>\n            \n            <span class="\&quot;ag-column-tool-panel-column-label\&quot;"></span>\n        </div>";
    __decorate([
        main_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", main_1.GridOptionsWrapper)
    ], ToolPanelColumnGroupComp.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        main_1.Autowired('columnController'),
        __metadata("design:type", main_1.ColumnController)
    ], ToolPanelColumnGroupComp.prototype, "columnController", void 0);
    __decorate([
        main_1.Autowired('dragAndDropService'),
        __metadata("design:type", main_1.DragAndDropService)
    ], ToolPanelColumnGroupComp.prototype, "dragAndDropService", void 0);
    __decorate([
        main_1.Autowired('eventService'),
        __metadata("design:type", main_1.EventService)
    ], ToolPanelColumnGroupComp.prototype, "eventService", void 0);
    __decorate([
        main_1.RefSelector('cbSelect'),
        __metadata("design:type", main_1.AgCheckbox)
github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / columns / gridHeaderDropZones.js View on Github external
}
        var rowGroupPanelShow = this.gridOptionsWrapper.getRowGroupPanelShow();
        if (rowGroupPanelShow === main_1.Constants.ALWAYS) {
            this.rowGroupComp.setDisplayed(true);
        }
        else if (rowGroupPanelShow === main_1.Constants.ONLY_WHEN_GROUPING) {
            var grouping = !this.columnController.isRowGroupEmpty();
            this.rowGroupComp.setDisplayed(grouping);
        }
        else {
            this.rowGroupComp.setDisplayed(false);
        }
    };
    __decorate([
        main_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", main_1.GridOptionsWrapper)
    ], GridHeaderDropZones.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        main_1.Autowired('columnController'),
        __metadata("design:type", main_1.ColumnController)
    ], GridHeaderDropZones.prototype, "columnController", void 0);
    __decorate([
        main_1.Autowired('eventService'),
        __metadata("design:type", main_1.EventService)
    ], GridHeaderDropZones.prototype, "eventService", void 0);
    __decorate([
        main_1.PostConstruct,
        __metadata("design:type", Function),
        __metadata("design:paramtypes", []),
        __metadata("design:returntype", void 0)
    ], GridHeaderDropZones.prototype, "postConstruct", null);
    return GridHeaderDropZones;
github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / columns / panels / pivotModePanel.js View on Github external
};
    PivotModePanel.prototype.onPivotModeChanged = function () {
        var pivotModeActive = this.columnController.isPivotMode();
        this.cbPivotMode.setValue(pivotModeActive);
    };
    __decorate([
        main_1.Autowired('columnController'),
        __metadata("design:type", main_1.ColumnController)
    ], PivotModePanel.prototype, "columnController", void 0);
    __decorate([
        main_1.Autowired('eventService'),
        __metadata("design:type", main_1.EventService)
    ], PivotModePanel.prototype, "eventService", void 0);
    __decorate([
        main_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", main_1.GridOptionsWrapper)
    ], PivotModePanel.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        main_1.RefSelector('cbPivotMode'),
        __metadata("design:type", main_1.AgCheckbox)
    ], PivotModePanel.prototype, "cbPivotMode", void 0);
    __decorate([
        main_1.PreConstruct,
        __metadata("design:type", Function),
        __metadata("design:paramtypes", []),
        __metadata("design:returntype", void 0)
    ], PivotModePanel.prototype, "init", null);
    return PivotModePanel;
}(main_1.Component));
exports.PivotModePanel = PivotModePanel;
github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / columns / panels / valueDropZonePanel.js View on Github external
}
    };
    ValuesDropZonePanel.prototype.getExistingColumns = function () {
        return this.columnController.getValueColumns();
    };
    __decorate([
        main_1.Autowired('columnController'),
        __metadata("design:type", main_1.ColumnController)
    ], ValuesDropZonePanel.prototype, "columnController", void 0);
    __decorate([
        main_1.Autowired('eventService'),
        __metadata("design:type", main_1.EventService)
    ], ValuesDropZonePanel.prototype, "eventService", void 0);
    __decorate([
        main_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", main_1.GridOptionsWrapper)
    ], ValuesDropZonePanel.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        main_1.Autowired('loggerFactory'),
        __metadata("design:type", main_1.LoggerFactory)
    ], ValuesDropZonePanel.prototype, "loggerFactory", void 0);
    __decorate([
        main_1.Autowired('dragAndDropService'),
        __metadata("design:type", main_1.DragAndDropService)
    ], ValuesDropZonePanel.prototype, "dragAndDropService", void 0);
    __decorate([
        main_1.Autowired('columnApi'),
        __metadata("design:type", main_1.ColumnApi)
    ], ValuesDropZonePanel.prototype, "columnApi", void 0);
    __decorate([
        main_1.Autowired('gridApi'),
        __metadata("design:type", main_1.GridApi)
github ag-grid / ag-grid-enterprise / dist / lib / sideBar / providedPanels / columns / panels / pivotDropZonePanel.js View on Github external
return this.isPotentialDndColumns() ? main_1.DragAndDropService.ICON_PIVOT : main_1.DragAndDropService.ICON_NOT_ALLOWED;
    };
    PivotDropZonePanel.prototype.getExistingColumns = function () {
        return this.columnController.getPivotColumns();
    };
    __decorate([
        main_1.Autowired('columnController'),
        __metadata("design:type", main_1.ColumnController)
    ], PivotDropZonePanel.prototype, "columnController", void 0);
    __decorate([
        main_1.Autowired('eventService'),
        __metadata("design:type", main_1.EventService)
    ], PivotDropZonePanel.prototype, "eventService", void 0);
    __decorate([
        main_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", main_1.GridOptionsWrapper)
    ], PivotDropZonePanel.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        main_1.Autowired('loggerFactory'),
        __metadata("design:type", main_1.LoggerFactory)
    ], PivotDropZonePanel.prototype, "loggerFactory", void 0);
    __decorate([
        main_1.Autowired('dragAndDropService'),
        __metadata("design:type", main_1.DragAndDropService)
    ], PivotDropZonePanel.prototype, "dragAndDropService", void 0);
    __decorate([
        main_1.Autowired('columnApi'),
        __metadata("design:type", main_1.ColumnApi)
    ], PivotDropZonePanel.prototype, "columnApi", void 0);
    __decorate([
        main_1.Autowired('gridApi'),
        __metadata("design:type", main_1.GridApi)