Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ag-grid-aurelia

Package Overview
Dependencies
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ag-grid-aurelia - npm Package Compare versions

Comparing version 8.2.0 to 9.0.0

2

bower.json
{
"name": "ag-grid-aurelia",
"version": "8.2.0",
"version": "9.0.0",
"homepage": "http://www.ag-grid.com/",

@@ -5,0 +5,0 @@ "authors": [

@@ -27,3 +27,4 @@ var gulp = require('gulp');

noImplicitAny: true,
noEmitOnError: false
noEmitOnError: false,
lib: ["dom","es2015"]
}));

@@ -30,0 +31,0 @@

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
import { ComponentAttached, ComponentDetached, Container, ViewResources, TaskQueue } from "aurelia-framework";

@@ -6,2 +6,3 @@ import { GridOptions, GridApi, ColumnApi } from "ag-grid/main";

import { AgGridColumn } from "./agGridColumn";
import { AgFullWidthRowTemplate } from './agTemplate';
export declare class AgGridAurelia implements ComponentAttached, ComponentDetached {

@@ -21,2 +22,3 @@ private taskQueue;

columns: AgGridColumn[];
fullWidthRowTemplate: AgFullWidthRowTemplate;
constructor(element: Element, taskQueue: TaskQueue, auFrameworkFactory: AureliaFrameworkFactory, container: Container, viewResources: ViewResources);

@@ -23,0 +25,0 @@ attached(): void;

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
"use strict";

@@ -17,2 +17,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

var agUtils_1 = require("./agUtils");
var agTemplate_1 = require("./agTemplate");
var AgGridAurelia = (function () {

@@ -59,2 +60,6 @@ function AgGridAurelia(element, taskQueue, auFrameworkFactory, container, viewResources) {

}
if (this.fullWidthRowTemplate) {
this.gridOptions.fullWidthCellRendererFramework =
{ template: this.fullWidthRowTemplate.template };
}
new main_1.Grid(this._nativeElement, this.gridOptions, this.gridParams);

@@ -112,2 +117,6 @@ this.api = this.gridOptions.api;

], AgGridAurelia.prototype, "columns", void 0);
__decorate([
aurelia_framework_1.child('ag-full-width-row-template'),
__metadata("design:type", agTemplate_1.AgFullWidthRowTemplate)
], AgGridAurelia.prototype, "fullWidthRowTemplate", void 0);
AgGridAurelia = __decorate([

@@ -114,0 +123,0 @@ aurelia_framework_1.customElement('ag-grid-aurelia'),

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
import { ColDef } from "ag-grid/main";

@@ -3,0 +3,0 @@ import { AgCellTemplate, AgEditorTemplate, AgFilterTemplate } from "./agTemplate";

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
"use strict";

@@ -33,3 +33,5 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

if (this.editorTemplate) {
colDef.editable = true;
if (colDef.editable === undefined) {
colDef.editable = true;
}
colDef.cellEditorFramework = { template: this.editorTemplate.template };

@@ -36,0 +38,0 @@ delete colDef.editorTemplate;

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
import { TargetInstruction } from "aurelia-framework";

@@ -15,1 +15,5 @@ export declare class AgCellTemplate {

}
export declare class AgFullWidthRowTemplate {
template: string;
constructor(targetInstruction: TargetInstruction);
}

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
"use strict";

@@ -75,1 +75,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

exports.AgFilterTemplate = AgFilterTemplate;
var AgFullWidthRowTemplate = (function () {
function AgFullWidthRowTemplate(targetInstruction) {
this.template = getTemplate(targetInstruction);
}
return AgFullWidthRowTemplate;
}());
AgFullWidthRowTemplate = __decorate([
aurelia_framework_1.customElement('ag-full-width-row-template'),
aurelia_framework_1.noView(),
aurelia_framework_1.autoinject(),
aurelia_framework_1.processContent(parseElement),
__metadata("design:paramtypes", [aurelia_framework_1.TargetInstruction])
], AgFullWidthRowTemplate);
exports.AgFullWidthRowTemplate = AgFullWidthRowTemplate;

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
export declare function generateBindables(names: string[], bindingModeToUse?: any): any;

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
"use strict";

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
import { ICellRenderer } from 'ag-grid/main';

@@ -3,0 +3,0 @@ export declare class AureliaCellRendererComponent implements ICellRenderer {

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
"use strict";

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -1,5 +0,7 @@

// ag-grid-aurelia v8.2.0
import { Container, ViewFactory } from "aurelia-framework";
// ag-grid-aurelia v9.0.0
import { Container, ViewFactory, TaskQueue } from "aurelia-framework";
import { ICellRendererComp, ICellEditorComp } from "ag-grid/main";
export declare class AureliaComponentFactory {
private taskQueue;
constructor(taskQueue: TaskQueue);
createRendererFromTemplate(container: Container, viewFactory: ViewFactory): {

@@ -6,0 +8,0 @@ new (): ICellRendererComp;

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
"use strict";

@@ -9,8 +9,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var aurelia_framework_1 = require("aurelia-framework");
var AureliaComponentFactory = (function () {
function AureliaComponentFactory() {
function AureliaComponentFactory(taskQueue) {
this.taskQueue = taskQueue;
}
AureliaComponentFactory.prototype.createRendererFromTemplate = function (container, viewFactory) {
var componentFactory = this;
var CellRendererComponent = (function () {

@@ -20,5 +25,19 @@ function CellRendererComponent() {

CellRendererComponent.prototype.init = function (params) {
var _this = this;
var bindingContext = { params: params };
this.view = viewFactory.create(container);
this.view.bind(bindingContext);
var controllers = this.view.controllers;
//initialize each controller
if (controllers && controllers.length) {
controllers.forEach(function (c) {
c.viewModel.params = params;
});
this.view.bind(bindingContext);
//ICellRenderer doesn't have a guiAttached method so
//we call attach on the queue;
componentFactory.taskQueue.queueMicroTask(function () { return _this.view.attached(); });
}
else {
this.view.bind(bindingContext);
}
};

@@ -42,3 +61,2 @@ CellRendererComponent.prototype.getGui = function () {

this.view = viewFactory.create(container);
this.view.bind(bindingContext);
var controllers = this.view.controllers;

@@ -57,2 +75,3 @@ //only one controller is allowed in editor template

}
this.view.bind(bindingContext);
};

@@ -104,4 +123,5 @@ CellEditor.prototype.afterGuiAttached = function () {

aurelia_framework_1.autoinject(),
aurelia_framework_1.transient()
aurelia_framework_1.transient(),
__metadata("design:paramtypes", [aurelia_framework_1.TaskQueue])
], AureliaComponentFactory);
exports.AureliaComponentFactory = AureliaComponentFactory;

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
import { Container, ViewResources, ViewCompiler } from "aurelia-framework";

@@ -3,0 +3,0 @@ import { IFrameworkFactory, IFilterComp, ICellRendererFunc, ColDef, GridOptions, ICellRendererComp, ICellEditorComp } from "ag-grid/main";

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
"use strict";

@@ -49,3 +49,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

AureliaFrameworkFactory.prototype.gridOptionsFullWidthCellRenderer = function (gridOptions) {
return this._baseFrameworkFactory.gridOptionsFullWidthCellRenderer(gridOptions);
if (gridOptions.fullWidthCellRendererFramework) {
if (!gridOptions.fullWidthCellRendererFramework.$viewFactory) {
gridOptions.fullWidthCellRendererFramework.$viewFactory =
this._viewCompiler.compile(gridOptions.fullWidthCellRendererFramework.template, this._viewResources);
}
return this._componentFactory.createRendererFromTemplate(this._container, gridOptions.fullWidthCellRendererFramework.$viewFactory);
}
else {
return this._baseFrameworkFactory.gridOptionsFullWidthCellRenderer(gridOptions);
}
};

@@ -52,0 +61,0 @@ AureliaFrameworkFactory.prototype.gridOptionsGroupRowRenderer = function (gridOptions) {

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
/**

@@ -3,0 +3,0 @@ * Implements all the methods of ICellEditor except for Init

@@ -1,2 +0,2 @@

// ag-grid-aurelia v8.2.0
// ag-grid-aurelia v9.0.0
"use strict";

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -6,2 +6,3 @@

exports.AgEditorTemplate = require('./lib/agTemplate').AgEditorTemplate;
exports.AgFullWidthRowTemplate = require('./lib/agTemplate').AgFullWidthRowTemplate;
exports.AgFilterTemplate = require('./lib/agTemplate').AgFilterTemplate;

@@ -8,0 +9,0 @@ exports.AureliaCellRendererComponent = require('./lib/aureliaCellRendererComponent').AureliaCellRendererComponent;

{
"name": "ag-grid-aurelia",
"version": "8.2.0",
"version": "9.0.0",
"description": "ag-Grid Aurelia Component",

@@ -39,3 +39,3 @@ "main": "./main.js",

"aurelia-framework": "^1.0.0",
"ag-grid": "8.2.x"
"ag-grid": "9.0.x"
},

@@ -42,0 +42,0 @@ "dependencies": {

@@ -9,2 +9,3 @@ import {

children,
child,
Container,

@@ -18,2 +19,3 @@ ViewResources,

import {generateBindables} from "./agUtils";
import {AgFullWidthRowTemplate} from './agTemplate';

@@ -49,2 +51,5 @@ interface IPropertyChanges {

@child('ag-full-width-row-template')
public fullWidthRowTemplate: AgFullWidthRowTemplate;
constructor(element: Element,

@@ -92,2 +97,7 @@ private taskQueue: TaskQueue,

if (this.fullWidthRowTemplate) {
this.gridOptions.fullWidthCellRendererFramework =
{template: this.fullWidthRowTemplate.template};
}
new Grid(this._nativeElement, this.gridOptions, this.gridParams);

@@ -94,0 +104,0 @@ this.api = this.gridOptions.api;

@@ -52,3 +52,5 @@ import {autoinject, inlineView, customElement, children, child} from "aurelia-framework";

if (this.editorTemplate) {
colDef.editable = true;
if(colDef.editable === undefined) {
colDef.editable = true;
}
colDef.cellEditorFramework = {template: this.editorTemplate.template};

@@ -55,0 +57,0 @@ delete (<any>colDef).editorTemplate;

@@ -59,2 +59,14 @@ import {processContent, autoinject, noView, customElement, TargetInstruction} from "aurelia-framework";

}
}
@customElement('ag-full-width-row-template')
@noView()
@autoinject()
@processContent(parseElement)
export class AgFullWidthRowTemplate {
template: string;
constructor(targetInstruction: TargetInstruction) {
this.template = getTemplate(targetInstruction);
}
}

@@ -1,2 +0,2 @@

import {autoinject, Container, transient, View, ViewFactory} from "aurelia-framework";
import {autoinject, Container, transient, View, ViewFactory, TaskQueue} from "aurelia-framework";

@@ -10,3 +10,9 @@ import {ICellRendererComp, ICellEditorComp} from "ag-grid/main";

export class AureliaComponentFactory {
constructor(private taskQueue:TaskQueue) {
}
public createRendererFromTemplate(container: Container, viewFactory: ViewFactory): {new(): ICellRendererComp} {
let componentFactory = this;
class CellRendererComponent implements ICellRendererComp {

@@ -18,9 +24,23 @@ private view: View;

this.view = viewFactory.create(container);
this.view.bind(bindingContext);
let controllers: any[] = (<any> this.view).controllers;
//initialize each controller
if (controllers && controllers.length){
controllers.forEach((c) => {
c.viewModel.params = params;
});
this.view.bind(bindingContext);
//ICellRenderer doesn't have a guiAttached method so
//we call attach on the queue;
componentFactory.taskQueue.queueMicroTask(() => this.view.attached());
}
else {
this.view.bind(bindingContext);
}
}
getGui(): HTMLElement {
return this.view.fragment as HTMLElement;
return this.view.fragment as any;
}
destroy() {

@@ -46,4 +66,4 @@ this.view.returnToCache();

this.view = viewFactory.create(container);
this.view.bind(bindingContext);
let controllers: any[] = (<any> this.view).controllers;

@@ -63,2 +83,3 @@

}
this.view.bind(bindingContext);
}

@@ -71,3 +92,3 @@

public getGui(): HTMLElement {
return this.view.fragment as HTMLElement;
return this.view.fragment as any;
}

@@ -74,0 +95,0 @@

@@ -54,3 +54,13 @@ import {autoinject, transient, Container, ViewResources, ViewCompiler} from "aurelia-framework";

public gridOptionsFullWidthCellRenderer(gridOptions: GridOptions): {new (): ICellRendererComp;} | ICellRendererFunc | string {
return this._baseFrameworkFactory.gridOptionsFullWidthCellRenderer(gridOptions);
if (gridOptions.fullWidthCellRendererFramework) {
if (!gridOptions.fullWidthCellRendererFramework.$viewFactory) {
gridOptions.fullWidthCellRendererFramework.$viewFactory =
this._viewCompiler.compile(gridOptions.fullWidthCellRendererFramework.template, this._viewResources);
}
return this._componentFactory.createRendererFromTemplate(this._container, gridOptions.fullWidthCellRendererFramework.$viewFactory);
} else {
return this._baseFrameworkFactory.gridOptionsFullWidthCellRenderer(gridOptions);
}
}

@@ -57,0 +67,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc