Socket
Socket
Sign inDemoInstall

@ag-grid-enterprise/core

Package Overview
Dependencies
Maintainers
3
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-grid-enterprise/core - npm Package Compare versions

Comparing version 28.2.1 to 29.0.0

dist/cjs/es5/version.d.ts

9

dist/cjs/es5/agGridEnterpriseModule.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EnterpriseCoreModule = exports.WatermarkComp = exports.MD5 = exports.LicenseManager = void 0;
var core_1 = require("@ag-grid-community/core");

@@ -8,8 +9,10 @@ var licenseManager_1 = require("./licenseManager");

var licenseManager_2 = require("./licenseManager");
exports.LicenseManager = licenseManager_2.LicenseManager;
Object.defineProperty(exports, "LicenseManager", { enumerable: true, get: function () { return licenseManager_2.LicenseManager; } });
var md5_2 = require("./license/md5");
exports.MD5 = md5_2.MD5;
Object.defineProperty(exports, "MD5", { enumerable: true, get: function () { return md5_2.MD5; } });
var watermark_2 = require("./license/watermark");
exports.WatermarkComp = watermark_2.WatermarkComp;
Object.defineProperty(exports, "WatermarkComp", { enumerable: true, get: function () { return watermark_2.WatermarkComp; } });
var version_1 = require("./version");
exports.EnterpriseCoreModule = {
version: version_1.VERSION,
moduleName: core_1.ModuleNames.EnterpriseCoreModule,

@@ -16,0 +19,0 @@ beans: [licenseManager_1.LicenseManager, md5_1.MD5],

@@ -6,3 +6,3 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -23,2 +23,3 @@ };

Object.defineProperty(exports, "__esModule", { value: true });
exports.MD5 = void 0;
var core_1 = require("@ag-grid-community/core");

@@ -25,0 +26,0 @@ var MD5 = /** @class */ (function (_super) {

@@ -6,3 +6,3 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -23,2 +23,3 @@ };

Object.defineProperty(exports, "__esModule", { value: true });
exports.WatermarkComp = void 0;
var core_1 = require("@ag-grid-community/core");

@@ -33,18 +34,17 @@ var WatermarkComp = /** @class */ (function (_super) {

var show = this.shouldDisplayWatermark();
this.addOrRemoveCssClass('ag-hidden', !show);
this.setDisplayed(show);
if (show) {
this.eLicenseTextRef.innerText = this.licenseManager.getWatermarkMessage();
window.setTimeout(function () { return _this.addCssClass('ag-opacity-zero'); }, 0);
window.setTimeout(function () { return _this.addCssClass('ag-hidden'); }, 5000);
window.setTimeout(function () { return _this.setDisplayed(false); }, 5000);
}
};
WatermarkComp.prototype.shouldDisplayWatermark = function () {
var eDocument = this.gridOptionsWrapper.getDocument();
var eDocument = this.gridOptionsService.getDocument();
var win = (eDocument.defaultView || window);
var loc = win.location;
var _a = loc.hostname, hostname = _a === void 0 ? '' : _a, pathname = loc.pathname;
var pathname = loc.pathname;
var isDisplayWatermark = this.licenseManager.isDisplayWatermark();
var isWhiteListURL = hostname.match('^(?:127\.0\.0\.1|localhost|(?:\w+\.)?ag-grid\.com)$') != null;
var isForceWatermark = pathname ? pathname.indexOf('forceWatermark') !== -1 : false;
return isForceWatermark || (isDisplayWatermark && !isWhiteListURL);
return isForceWatermark || isDisplayWatermark;
};

@@ -51,0 +51,0 @@ __decorate([

@@ -19,2 +19,5 @@ import { BeanStub } from '@ag-grid-community/core';

getWatermarkMessage(): string;
private getHostname;
private isWebsiteUrl;
private isLocalhost;
private static formatDate;

@@ -21,0 +24,0 @@ private static getGridReleaseDate;

@@ -6,3 +6,3 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -39,2 +39,3 @@ };

Object.defineProperty(exports, "__esModule", { value: true });
exports.LicenseManager = void 0;
var core_1 = require("@ag-grid-community/core");

@@ -51,3 +52,5 @@ var LicenseManager = /** @class */ (function (_super) {

if (core_1._.missingOrEmpty(LicenseManager_1.licenseKey)) {
this.outputMissingLicenseKey();
if (!this.isWebsiteUrl()) {
this.outputMissingLicenseKey();
}
}

@@ -105,3 +108,3 @@ else if (LicenseManager_1.licenseKey.length > 32) {

LicenseManager.prototype.isDisplayWatermark = function () {
return !core_1._.missingOrEmpty(this.watermarkMessage);
return !this.isLocalhost() && !this.isWebsiteUrl() && !core_1._.missingOrEmpty(this.watermarkMessage);
};

@@ -111,2 +114,17 @@ LicenseManager.prototype.getWatermarkMessage = function () {

};
LicenseManager.prototype.getHostname = function () {
var eDocument = this.gridOptionsService.getDocument();
var win = (eDocument.defaultView || window);
var loc = win.location;
var _a = loc.hostname, hostname = _a === void 0 ? '' : _a;
return hostname;
};
LicenseManager.prototype.isWebsiteUrl = function () {
var hostname = this.getHostname();
return hostname.match(/^((?:\w+\.)?ag-grid\.com)$/) !== null;
};
LicenseManager.prototype.isLocalhost = function () {
var hostname = this.getHostname();
return hostname.match(/^(?:127\.0\.0\.1|localhost)$/) !== null;
};
LicenseManager.formatDate = function (date) {

@@ -286,3 +304,3 @@ var monthNames = [

var LicenseManager_1;
LicenseManager.RELEASE_INFORMATION = 'MTY2NzI0NjAxNTYyNw==';
LicenseManager.RELEASE_INFORMATION = 'MTY3MzM3ODMwNzAyMA==';
__decorate([

@@ -289,0 +307,0 @@ core_1.Autowired('md5')

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LicenseManager = exports.EnterpriseCoreModule = void 0;
var agGridEnterpriseModule_1 = require("./agGridEnterpriseModule");
exports.EnterpriseCoreModule = agGridEnterpriseModule_1.EnterpriseCoreModule;
Object.defineProperty(exports, "EnterpriseCoreModule", { enumerable: true, get: function () { return agGridEnterpriseModule_1.EnterpriseCoreModule; } });
var licenseManager_1 = require("./licenseManager");
exports.LicenseManager = licenseManager_1.LicenseManager;
Object.defineProperty(exports, "LicenseManager", { enumerable: true, get: function () { return licenseManager_1.LicenseManager; } });
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EnterpriseCoreModule = exports.WatermarkComp = exports.MD5 = exports.LicenseManager = void 0;
const core_1 = require("@ag-grid-community/core");

@@ -8,8 +9,10 @@ const licenseManager_1 = require("./licenseManager");

var licenseManager_2 = require("./licenseManager");
exports.LicenseManager = licenseManager_2.LicenseManager;
Object.defineProperty(exports, "LicenseManager", { enumerable: true, get: function () { return licenseManager_2.LicenseManager; } });
var md5_2 = require("./license/md5");
exports.MD5 = md5_2.MD5;
Object.defineProperty(exports, "MD5", { enumerable: true, get: function () { return md5_2.MD5; } });
var watermark_2 = require("./license/watermark");
exports.WatermarkComp = watermark_2.WatermarkComp;
Object.defineProperty(exports, "WatermarkComp", { enumerable: true, get: function () { return watermark_2.WatermarkComp; } });
const version_1 = require("./version");
exports.EnterpriseCoreModule = {
version: version_1.VERSION,
moduleName: core_1.ModuleNames.EnterpriseCoreModule,

@@ -16,0 +19,0 @@ beans: [licenseManager_1.LicenseManager, md5_1.MD5],

@@ -9,2 +9,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.MD5 = void 0;
const core_1 = require("@ag-grid-community/core");

@@ -11,0 +12,0 @@ let MD5 = class MD5 extends core_1.BeanStub {

@@ -9,2 +9,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.WatermarkComp = void 0;
const core_1 = require("@ag-grid-community/core");

@@ -19,18 +20,17 @@ class WatermarkComp extends core_1.Component {

const show = this.shouldDisplayWatermark();
this.addOrRemoveCssClass('ag-hidden', !show);
this.setDisplayed(show);
if (show) {
this.eLicenseTextRef.innerText = this.licenseManager.getWatermarkMessage();
window.setTimeout(() => this.addCssClass('ag-opacity-zero'), 0);
window.setTimeout(() => this.addCssClass('ag-hidden'), 5000);
window.setTimeout(() => this.setDisplayed(false), 5000);
}
}
shouldDisplayWatermark() {
const eDocument = this.gridOptionsWrapper.getDocument();
const eDocument = this.gridOptionsService.getDocument();
const win = (eDocument.defaultView || window);
const loc = win.location;
const { hostname = '', pathname } = loc;
const { pathname } = loc;
const isDisplayWatermark = this.licenseManager.isDisplayWatermark();
const isWhiteListURL = hostname.match('^(?:127\.0\.0\.1|localhost|(?:\w+\.)?ag-grid\.com)$') != null;
const isForceWatermark = pathname ? pathname.indexOf('forceWatermark') !== -1 : false;
return isForceWatermark || (isDisplayWatermark && !isWhiteListURL);
return isForceWatermark || isDisplayWatermark;
}

@@ -37,0 +37,0 @@ }

@@ -19,2 +19,5 @@ import { BeanStub } from '@ag-grid-community/core';

getWatermarkMessage(): string;
private getHostname;
private isWebsiteUrl;
private isLocalhost;
private static formatDate;

@@ -21,0 +24,0 @@ private static getGridReleaseDate;

@@ -10,2 +10,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LicenseManager = void 0;
const core_1 = require("@ag-grid-community/core");

@@ -19,3 +20,5 @@ let LicenseManager = LicenseManager_1 = class LicenseManager extends core_1.BeanStub {

if (core_1._.missingOrEmpty(LicenseManager_1.licenseKey)) {
this.outputMissingLicenseKey();
if (!this.isWebsiteUrl()) {
this.outputMissingLicenseKey();
}
}

@@ -73,3 +76,3 @@ else if (LicenseManager_1.licenseKey.length > 32) {

isDisplayWatermark() {
return !core_1._.missingOrEmpty(this.watermarkMessage);
return !this.isLocalhost() && !this.isWebsiteUrl() && !core_1._.missingOrEmpty(this.watermarkMessage);
}

@@ -79,2 +82,17 @@ getWatermarkMessage() {

}
getHostname() {
const eDocument = this.gridOptionsService.getDocument();
const win = (eDocument.defaultView || window);
const loc = win.location;
const { hostname = '' } = loc;
return hostname;
}
isWebsiteUrl() {
const hostname = this.getHostname();
return hostname.match(/^((?:\w+\.)?ag-grid\.com)$/) !== null;
}
isLocalhost() {
const hostname = this.getHostname();
return hostname.match(/^(?:127\.0\.0\.1|localhost)$/) !== null;
}
static formatDate(date) {

@@ -254,3 +272,3 @@ const monthNames = [

};
LicenseManager.RELEASE_INFORMATION = 'MTY2NzI0NjAxNTYyNw==';
LicenseManager.RELEASE_INFORMATION = 'MTY3MzM3ODMwNzAyMA==';
__decorate([

@@ -257,0 +275,0 @@ core_1.Autowired('md5')

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LicenseManager = exports.EnterpriseCoreModule = void 0;
var agGridEnterpriseModule_1 = require("./agGridEnterpriseModule");
exports.EnterpriseCoreModule = agGridEnterpriseModule_1.EnterpriseCoreModule;
Object.defineProperty(exports, "EnterpriseCoreModule", { enumerable: true, get: function () { return agGridEnterpriseModule_1.EnterpriseCoreModule; } });
var licenseManager_1 = require("./licenseManager");
exports.LicenseManager = licenseManager_1.LicenseManager;
Object.defineProperty(exports, "LicenseManager", { enumerable: true, get: function () { return licenseManager_1.LicenseManager; } });
/**
* @ag-grid-enterprise/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1
* @ag-grid-enterprise/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v29.0.0
* @link https://www.ag-grid.com/

@@ -16,3 +16,3 @@ * @license Commercial

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -58,3 +58,5 @@ };

if (core._.missingOrEmpty(LicenseManager_1.licenseKey)) {
this.outputMissingLicenseKey();
if (!this.isWebsiteUrl()) {
this.outputMissingLicenseKey();
}
}

@@ -112,3 +114,3 @@ else if (LicenseManager_1.licenseKey.length > 32) {

LicenseManager.prototype.isDisplayWatermark = function () {
return !core._.missingOrEmpty(this.watermarkMessage);
return !this.isLocalhost() && !this.isWebsiteUrl() && !core._.missingOrEmpty(this.watermarkMessage);
};

@@ -118,2 +120,17 @@ LicenseManager.prototype.getWatermarkMessage = function () {

};
LicenseManager.prototype.getHostname = function () {
var eDocument = this.gridOptionsService.getDocument();
var win = (eDocument.defaultView || window);
var loc = win.location;
var _a = loc.hostname, hostname = _a === void 0 ? '' : _a;
return hostname;
};
LicenseManager.prototype.isWebsiteUrl = function () {
var hostname = this.getHostname();
return hostname.match(/^((?:\w+\.)?ag-grid\.com)$/) !== null;
};
LicenseManager.prototype.isLocalhost = function () {
var hostname = this.getHostname();
return hostname.match(/^(?:127\.0\.0\.1|localhost)$/) !== null;
};
LicenseManager.formatDate = function (date) {

@@ -293,3 +310,3 @@ var monthNames = [

var LicenseManager_1;
LicenseManager.RELEASE_INFORMATION = 'MTY2NzI0NjAxNTYyNw==';
LicenseManager.RELEASE_INFORMATION = 'MTY3MzM3ODMwNzAyMA==';
__decorate$2([

@@ -311,3 +328,3 @@ core.Autowired('md5')

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -509,3 +526,3 @@ };

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -533,18 +550,17 @@ };

var show = this.shouldDisplayWatermark();
this.addOrRemoveCssClass('ag-hidden', !show);
this.setDisplayed(show);
if (show) {
this.eLicenseTextRef.innerText = this.licenseManager.getWatermarkMessage();
window.setTimeout(function () { return _this.addCssClass('ag-opacity-zero'); }, 0);
window.setTimeout(function () { return _this.addCssClass('ag-hidden'); }, 5000);
window.setTimeout(function () { return _this.setDisplayed(false); }, 5000);
}
};
WatermarkComp.prototype.shouldDisplayWatermark = function () {
var eDocument = this.gridOptionsWrapper.getDocument();
var eDocument = this.gridOptionsService.getDocument();
var win = (eDocument.defaultView || window);
var loc = win.location;
var _a = loc.hostname, hostname = _a === void 0 ? '' : _a, pathname = loc.pathname;
var pathname = loc.pathname;
var isDisplayWatermark = this.licenseManager.isDisplayWatermark();
var isWhiteListURL = hostname.match('^(?:127\.0\.0\.1|localhost|(?:\w+\.)?ag-grid\.com)$') != null;
var isForceWatermark = pathname ? pathname.indexOf('forceWatermark') !== -1 : false;
return isForceWatermark || (isDisplayWatermark && !isWhiteListURL);
return isForceWatermark || isDisplayWatermark;
};

@@ -563,3 +579,7 @@ __decorate([

// DO NOT UPDATE MANUALLY: Generated from script during build time
var VERSION = '29.0.0';
var EnterpriseCoreModule = {
version: VERSION,
moduleName: core.ModuleNames.EnterpriseCoreModule,

@@ -566,0 +586,0 @@ beans: [LicenseManager, MD5],

/**
* @ag-grid-enterprise/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1
* @ag-grid-enterprise/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v29.0.0
* @link https://www.ag-grid.com/

@@ -7,6 +7,6 @@ * @license Commercial

/**
* @ag-grid-enterprise/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1
* @ag-grid-enterprise/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v29.0.0
* @link https://www.ag-grid.com/
* @license Commercial
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@ag-grid-community/core"),r=(e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)},function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}),o=function(e,t,r,o){var i,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},i=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return s},n=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.watermarkMessage=void 0,t}var s;return r(n,e),s=n,n.prototype.validateLicense=function(){if(t._.missingOrEmpty(s.licenseKey))this.outputMissingLicenseKey();else if(s.licenseKey.length>32){var e=s.extractLicenseComponents(s.licenseKey),r=e.md5,o=e.license,i=e.version,n=e.isTrial;r===this.md5.md5(o)?t._.exists(i)&&i?this.validateLicenseKeyForVersion(i,!!n,o):this.validateLegacyKey(o):this.outputInvalidLicenseKey()}else this.outputInvalidLicenseKey()},n.extractExpiry=function(e){var t=e.substring(e.lastIndexOf("_")+1,e.length);return new Date(parseInt(s.decode(t),10))},n.extractLicenseComponents=function(e){var t=e.replace(/[\u200B-\u200D\uFEFF]/g,""),r=(t=t.replace(/\r?\n|\r/g,"")).length-32,o=t.substring(r),n=t.substring(0,r),a=i(s.extractBracketedInformation(t),2);return{md5:o,license:n,version:a[0],isTrial:a[1]}},n.prototype.getLicenseDetails=function(e){var t=s.extractLicenseComponents(e),r=t.md5,o=t.license,i=t.version,n=t.isTrial,a=r===this.md5.md5(o),c=null;return a&&(c=s.extractExpiry(o),a=!isNaN(c.getTime())),{licenseKey:e,valid:a,expiry:a?s.formatDate(c):null,version:i||"legacy",isTrial:n}},n.prototype.isDisplayWatermark=function(){return!t._.missingOrEmpty(this.watermarkMessage)},n.prototype.getWatermarkMessage=function(){return this.watermarkMessage||""},n.formatDate=function(e){var t=e.getDate(),r=e.getMonth(),o=e.getFullYear();return t+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][r]+" "+o},n.getGridReleaseDate=function(){return new Date(parseInt(s.decode(s.RELEASE_INFORMATION),10))},n.decode=function(e){for(var t,r,o,i,n,a,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",h=0,u=e.replace(/[^A-Za-z0-9+/=]/g,"");h<u.length;)t=c.indexOf(u.charAt(h++))<<2|(i=c.indexOf(u.charAt(h++)))>>4,r=(15&i)<<4|(n=c.indexOf(u.charAt(h++)))>>2,o=(3&n)<<6|(a=c.indexOf(u.charAt(h++))),l+=String.fromCharCode(t),64!=n&&(l+=String.fromCharCode(r)),64!=a&&(l+=String.fromCharCode(o));return l=s.utf8_decode(l)},n.utf8_decode=function(e){e=e.replace(/rn/g,"n");for(var t="",r=0;r<e.length;r++){var o=e.charCodeAt(r);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},n.setLicenseKey=function(e){s.licenseKey=e},n.extractBracketedInformation=function(e){var t=e.split("[").filter((function(e){return e.indexOf("]")>-1})).map((function(e){return e.split("]")[0]}));if(!t||0===t.length)return[null,null];var r=1===t.filter((function(e){return"TRIAL"===e})).length;return[t.filter((function(e){return 0===e.indexOf("v")})).map((function(e){return e.replace(/^v/,"")}))[0],r]},n.prototype.validateLicenseKeyForVersion=function(e,t,r){"2"===e&&(t?this.validateForTrial(r):this.validateLegacyKey(r))},n.prototype.validateLegacyKey=function(e){var t=s.getGridReleaseDate(),r=s.extractExpiry(e),o=!1,i=!1;if(isNaN(r.getTime())||(o=!0,i=t<r),o){if(!i){var n=s.formatDate(r),a=s.formatDate(t);this.outputIncompatibleVersion(n,a)}}else this.outputInvalidLicenseKey()},n.prototype.validateForTrial=function(e){var t=s.extractExpiry(e),r=new Date,o=!1,i=!1;if(isNaN(t.getTime())||(o=!0,i=t>r),o){if(!i){var n=s.formatDate(t);this.outputExpiredTrialKey(n)}}else this.outputInvalidLicenseKey()},n.prototype.outputInvalidLicenseKey=function(){console.error("*****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License ********************************************"),console.error("********************************************* Invalid License ***************************************************"),console.error("* Your license for AG Grid Enterprise is not valid - please contact info@ag-grid.com to obtain a valid license. *"),console.error("*****************************************************************************************************************"),console.error("*****************************************************************************************************************"),this.watermarkMessage="Invalid License"},n.prototype.outputExpiredTrialKey=function(e){console.error("****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License *******************************************"),console.error("***************************************** Trial Period Expired. *******************************************"),console.error("* Your license for AG Grid Enterprise expired on "+e+". *"),console.error("* Please email info@ag-grid.com to purchase a license. *"),console.error("****************************************************************************************************************"),console.error("****************************************************************************************************************"),this.watermarkMessage="Trial Period Expired"},n.prototype.outputMissingLicenseKey=function(){console.error("****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License *******************************************"),console.error("****************************************** License Key Not Found ***********************************************"),console.error("* All AG Grid Enterprise features are unlocked. *"),console.error("* This is an evaluation only version, it is not licensed for development projects intended for production. *"),console.error("* If you want to hide the watermark, please email info@ag-grid.com for a trial license. *"),console.error("****************************************************************************************************************"),console.error("****************************************************************************************************************"),this.watermarkMessage="For Trial Use Only"},n.prototype.outputIncompatibleVersion=function(e,t){console.error("****************************************************************************************************************************"),console.error("****************************************************************************************************************************"),console.error("* AG Grid Enterprise License *"),console.error("* License not compatible with installed version of AG Grid Enterprise. *"),console.error("* *"),console.error("* Your AG Grid License entitles you to all versions of AG Grid that we release within the time covered by your license *"),console.error("* - typically we provide one year licenses which entitles you to all releases / updates of AG Grid within that year. *"),console.error("* Your license has an end (expiry) date which stops the license key working with versions of AG Grid released after the *"),console.error("* license end date. The license key that you have expires on "+e+", however the version of AG Grid you *"),console.error("* are trying to use was released on "+t+". *"),console.error("* *"),console.error("* Please contact info@ag-grid.com to renew your subscription to new versions and get a new license key to work with this *"),console.error("* version of AG Grid. *"),console.error("****************************************************************************************************************************"),console.error("****************************************************************************************************************************"),this.watermarkMessage="License Expired"},n.RELEASE_INFORMATION="MTY2NzI0NjAxNTYyNw==",o([t.Autowired("md5")],n.prototype,"md5",void 0),o([t.PreConstruct],n.prototype,"validateLicense",null),n=s=o([t.Bean("licenseManager")],n)}(t.BeanStub),s=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),a=function(e,t,r,o){var i,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},c=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.ieCompatibility=!1,t}return s(r,e),r.prototype.init=function(){this.ieCompatibility="5d41402abc4b2a76b9719d911017c592"!=this.md5("hello")},r.prototype.md5cycle=function(e,t){var r=e[0],o=e[1],i=e[2],n=e[3];r=this.ff(r,o,i,n,t[0],7,-680876936),n=this.ff(n,r,o,i,t[1],12,-389564586),i=this.ff(i,n,r,o,t[2],17,606105819),o=this.ff(o,i,n,r,t[3],22,-1044525330),r=this.ff(r,o,i,n,t[4],7,-176418897),n=this.ff(n,r,o,i,t[5],12,1200080426),i=this.ff(i,n,r,o,t[6],17,-1473231341),o=this.ff(o,i,n,r,t[7],22,-45705983),r=this.ff(r,o,i,n,t[8],7,1770035416),n=this.ff(n,r,o,i,t[9],12,-1958414417),i=this.ff(i,n,r,o,t[10],17,-42063),o=this.ff(o,i,n,r,t[11],22,-1990404162),r=this.ff(r,o,i,n,t[12],7,1804603682),n=this.ff(n,r,o,i,t[13],12,-40341101),i=this.ff(i,n,r,o,t[14],17,-1502002290),o=this.ff(o,i,n,r,t[15],22,1236535329),r=this.gg(r,o,i,n,t[1],5,-165796510),n=this.gg(n,r,o,i,t[6],9,-1069501632),i=this.gg(i,n,r,o,t[11],14,643717713),o=this.gg(o,i,n,r,t[0],20,-373897302),r=this.gg(r,o,i,n,t[5],5,-701558691),n=this.gg(n,r,o,i,t[10],9,38016083),i=this.gg(i,n,r,o,t[15],14,-660478335),o=this.gg(o,i,n,r,t[4],20,-405537848),r=this.gg(r,o,i,n,t[9],5,568446438),n=this.gg(n,r,o,i,t[14],9,-1019803690),i=this.gg(i,n,r,o,t[3],14,-187363961),o=this.gg(o,i,n,r,t[8],20,1163531501),r=this.gg(r,o,i,n,t[13],5,-1444681467),n=this.gg(n,r,o,i,t[2],9,-51403784),i=this.gg(i,n,r,o,t[7],14,1735328473),o=this.gg(o,i,n,r,t[12],20,-1926607734),r=this.hh(r,o,i,n,t[5],4,-378558),n=this.hh(n,r,o,i,t[8],11,-2022574463),i=this.hh(i,n,r,o,t[11],16,1839030562),o=this.hh(o,i,n,r,t[14],23,-35309556),r=this.hh(r,o,i,n,t[1],4,-1530992060),n=this.hh(n,r,o,i,t[4],11,1272893353),i=this.hh(i,n,r,o,t[7],16,-155497632),o=this.hh(o,i,n,r,t[10],23,-1094730640),r=this.hh(r,o,i,n,t[13],4,681279174),n=this.hh(n,r,o,i,t[0],11,-358537222),i=this.hh(i,n,r,o,t[3],16,-722521979),o=this.hh(o,i,n,r,t[6],23,76029189),r=this.hh(r,o,i,n,t[9],4,-640364487),n=this.hh(n,r,o,i,t[12],11,-421815835),i=this.hh(i,n,r,o,t[15],16,530742520),o=this.hh(o,i,n,r,t[2],23,-995338651),r=this.ii(r,o,i,n,t[0],6,-198630844),n=this.ii(n,r,o,i,t[7],10,1126891415),i=this.ii(i,n,r,o,t[14],15,-1416354905),o=this.ii(o,i,n,r,t[5],21,-57434055),r=this.ii(r,o,i,n,t[12],6,1700485571),n=this.ii(n,r,o,i,t[3],10,-1894986606),i=this.ii(i,n,r,o,t[10],15,-1051523),o=this.ii(o,i,n,r,t[1],21,-2054922799),r=this.ii(r,o,i,n,t[8],6,1873313359),n=this.ii(n,r,o,i,t[15],10,-30611744),i=this.ii(i,n,r,o,t[6],15,-1560198380),o=this.ii(o,i,n,r,t[13],21,1309151649),r=this.ii(r,o,i,n,t[4],6,-145523070),n=this.ii(n,r,o,i,t[11],10,-1120210379),i=this.ii(i,n,r,o,t[2],15,718787259),o=this.ii(o,i,n,r,t[9],21,-343485551),e[0]=this.add32(r,e[0]),e[1]=this.add32(o,e[1]),e[2]=this.add32(i,e[2]),e[3]=this.add32(n,e[3])},r.prototype.cmn=function(e,t,r,o,i,n){return t=this.add32(this.add32(t,e),this.add32(o,n)),this.add32(t<<i|t>>>32-i,r)},r.prototype.ff=function(e,t,r,o,i,n,s){return this.cmn(t&r|~t&o,e,t,i,n,s)},r.prototype.gg=function(e,t,r,o,i,n,s){return this.cmn(t&o|r&~o,e,t,i,n,s)},r.prototype.hh=function(e,t,r,o,i,n,s){return this.cmn(t^r^o,e,t,i,n,s)},r.prototype.ii=function(e,t,r,o,i,n,s){return this.cmn(r^(t|~o),e,t,i,n,s)},r.prototype.md51=function(e){var t,r=e.length,o=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)this.md5cycle(o,this.md5blk(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(this.md5cycle(o,i),t=0;t<16;t++)i[t]=0;return i[14]=8*r,this.md5cycle(o,i),o},r.prototype.md5blk=function(e){for(var t=[],r=0;r<64;r+=4)t[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return t},r.prototype.rhex=function(e){for(var t="0123456789abcdef".split(""),r="",o=0;o<4;o++)r+=t[e>>8*o+4&15]+t[e>>8*o&15];return r},r.prototype.hex=function(e){for(var t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")},r.prototype.md5=function(e){return this.hex(this.md51(e))},r.prototype.add32=function(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)},r.prototype.add32Std=function(e,t){return e+t&4294967295},r.prototype.add32Compat=function(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r},a([t.PostConstruct],r.prototype,"init",null),r=a([t.Bean("md5")],r)}(t.BeanStub),l=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),h=function(e,t,r,o){var i,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},u=function(e){function r(){return e.call(this,'<div class="ag-watermark">\n <div ref="eLicenseTextRef" class="ag-watermark-text"></div>\n </div>')||this}return l(r,e),r.prototype.postConstruct=function(){var e=this,t=this.shouldDisplayWatermark();this.addOrRemoveCssClass("ag-hidden",!t),t&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout((function(){return e.addCssClass("ag-opacity-zero")}),0),window.setTimeout((function(){return e.addCssClass("ag-hidden")}),5e3))},r.prototype.shouldDisplayWatermark=function(){var e=(this.gridOptionsWrapper.getDocument().defaultView||window).location,t=e.hostname,r=void 0===t?"":t,o=e.pathname,i=this.licenseManager.isDisplayWatermark(),n=null!=r.match("^(?:127.0.0.1|localhost|(?:w+.)?ag-grid.com)$");return!!o&&-1!==o.indexOf("forceWatermark")||i&&!n},h([t.Autowired("licenseManager")],r.prototype,"licenseManager",void 0),h([t.RefSelector("eLicenseTextRef")],r.prototype,"eLicenseTextRef",void 0),h([t.PostConstruct],r.prototype,"postConstruct",null),r}(t.Component),f={moduleName:t.ModuleNames.EnterpriseCoreModule,beans:[n,c],agStackComponents:[{componentName:"AgWatermark",componentClass:u}]};exports.EnterpriseCoreModule=f,exports.LicenseManager=n;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@ag-grid-community/core"),r=(e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)},function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}),o=function(e,t,r,o){var i,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},i=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return s},n=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.watermarkMessage=void 0,t}var s;return r(n,e),s=n,n.prototype.validateLicense=function(){if(t._.missingOrEmpty(s.licenseKey))this.isWebsiteUrl()||this.outputMissingLicenseKey();else if(s.licenseKey.length>32){var e=s.extractLicenseComponents(s.licenseKey),r=e.md5,o=e.license,i=e.version,n=e.isTrial;r===this.md5.md5(o)?t._.exists(i)&&i?this.validateLicenseKeyForVersion(i,!!n,o):this.validateLegacyKey(o):this.outputInvalidLicenseKey()}else this.outputInvalidLicenseKey()},n.extractExpiry=function(e){var t=e.substring(e.lastIndexOf("_")+1,e.length);return new Date(parseInt(s.decode(t),10))},n.extractLicenseComponents=function(e){var t=e.replace(/[\u200B-\u200D\uFEFF]/g,""),r=(t=t.replace(/\r?\n|\r/g,"")).length-32,o=t.substring(r),n=t.substring(0,r),a=i(s.extractBracketedInformation(t),2);return{md5:o,license:n,version:a[0],isTrial:a[1]}},n.prototype.getLicenseDetails=function(e){var t=s.extractLicenseComponents(e),r=t.md5,o=t.license,i=t.version,n=t.isTrial,a=r===this.md5.md5(o),c=null;return a&&(c=s.extractExpiry(o),a=!isNaN(c.getTime())),{licenseKey:e,valid:a,expiry:a?s.formatDate(c):null,version:i||"legacy",isTrial:n}},n.prototype.isDisplayWatermark=function(){return!this.isLocalhost()&&!this.isWebsiteUrl()&&!t._.missingOrEmpty(this.watermarkMessage)},n.prototype.getWatermarkMessage=function(){return this.watermarkMessage||""},n.prototype.getHostname=function(){var e=(this.gridOptionsService.getDocument().defaultView||window).location.hostname;return void 0===e?"":e},n.prototype.isWebsiteUrl=function(){return null!==this.getHostname().match(/^((?:\w+\.)?ag-grid\.com)$/)},n.prototype.isLocalhost=function(){return null!==this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)},n.formatDate=function(e){var t=e.getDate(),r=e.getMonth(),o=e.getFullYear();return t+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][r]+" "+o},n.getGridReleaseDate=function(){return new Date(parseInt(s.decode(s.RELEASE_INFORMATION),10))},n.decode=function(e){for(var t,r,o,i,n,a,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",h=0,u=e.replace(/[^A-Za-z0-9+/=]/g,"");h<u.length;)t=c.indexOf(u.charAt(h++))<<2|(i=c.indexOf(u.charAt(h++)))>>4,r=(15&i)<<4|(n=c.indexOf(u.charAt(h++)))>>2,o=(3&n)<<6|(a=c.indexOf(u.charAt(h++))),l+=String.fromCharCode(t),64!=n&&(l+=String.fromCharCode(r)),64!=a&&(l+=String.fromCharCode(o));return l=s.utf8_decode(l)},n.utf8_decode=function(e){e=e.replace(/rn/g,"n");for(var t="",r=0;r<e.length;r++){var o=e.charCodeAt(r);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},n.setLicenseKey=function(e){s.licenseKey=e},n.extractBracketedInformation=function(e){var t=e.split("[").filter((function(e){return e.indexOf("]")>-1})).map((function(e){return e.split("]")[0]}));if(!t||0===t.length)return[null,null];var r=1===t.filter((function(e){return"TRIAL"===e})).length;return[t.filter((function(e){return 0===e.indexOf("v")})).map((function(e){return e.replace(/^v/,"")}))[0],r]},n.prototype.validateLicenseKeyForVersion=function(e,t,r){"2"===e&&(t?this.validateForTrial(r):this.validateLegacyKey(r))},n.prototype.validateLegacyKey=function(e){var t=s.getGridReleaseDate(),r=s.extractExpiry(e),o=!1,i=!1;if(isNaN(r.getTime())||(o=!0,i=t<r),o){if(!i){var n=s.formatDate(r),a=s.formatDate(t);this.outputIncompatibleVersion(n,a)}}else this.outputInvalidLicenseKey()},n.prototype.validateForTrial=function(e){var t=s.extractExpiry(e),r=new Date,o=!1,i=!1;if(isNaN(t.getTime())||(o=!0,i=t>r),o){if(!i){var n=s.formatDate(t);this.outputExpiredTrialKey(n)}}else this.outputInvalidLicenseKey()},n.prototype.outputInvalidLicenseKey=function(){console.error("*****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License ********************************************"),console.error("********************************************* Invalid License ***************************************************"),console.error("* Your license for AG Grid Enterprise is not valid - please contact info@ag-grid.com to obtain a valid license. *"),console.error("*****************************************************************************************************************"),console.error("*****************************************************************************************************************"),this.watermarkMessage="Invalid License"},n.prototype.outputExpiredTrialKey=function(e){console.error("****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License *******************************************"),console.error("***************************************** Trial Period Expired. *******************************************"),console.error("* Your license for AG Grid Enterprise expired on "+e+". *"),console.error("* Please email info@ag-grid.com to purchase a license. *"),console.error("****************************************************************************************************************"),console.error("****************************************************************************************************************"),this.watermarkMessage="Trial Period Expired"},n.prototype.outputMissingLicenseKey=function(){console.error("****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License *******************************************"),console.error("****************************************** License Key Not Found ***********************************************"),console.error("* All AG Grid Enterprise features are unlocked. *"),console.error("* This is an evaluation only version, it is not licensed for development projects intended for production. *"),console.error("* If you want to hide the watermark, please email info@ag-grid.com for a trial license. *"),console.error("****************************************************************************************************************"),console.error("****************************************************************************************************************"),this.watermarkMessage="For Trial Use Only"},n.prototype.outputIncompatibleVersion=function(e,t){console.error("****************************************************************************************************************************"),console.error("****************************************************************************************************************************"),console.error("* AG Grid Enterprise License *"),console.error("* License not compatible with installed version of AG Grid Enterprise. *"),console.error("* *"),console.error("* Your AG Grid License entitles you to all versions of AG Grid that we release within the time covered by your license *"),console.error("* - typically we provide one year licenses which entitles you to all releases / updates of AG Grid within that year. *"),console.error("* Your license has an end (expiry) date which stops the license key working with versions of AG Grid released after the *"),console.error("* license end date. The license key that you have expires on "+e+", however the version of AG Grid you *"),console.error("* are trying to use was released on "+t+". *"),console.error("* *"),console.error("* Please contact info@ag-grid.com to renew your subscription to new versions and get a new license key to work with this *"),console.error("* version of AG Grid. *"),console.error("****************************************************************************************************************************"),console.error("****************************************************************************************************************************"),this.watermarkMessage="License Expired"},n.RELEASE_INFORMATION="MTY3MzM3ODMwNzAyMA==",o([t.Autowired("md5")],n.prototype,"md5",void 0),o([t.PreConstruct],n.prototype,"validateLicense",null),n=s=o([t.Bean("licenseManager")],n)}(t.BeanStub),s=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),a=function(e,t,r,o){var i,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},c=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.ieCompatibility=!1,t}return s(r,e),r.prototype.init=function(){this.ieCompatibility="5d41402abc4b2a76b9719d911017c592"!=this.md5("hello")},r.prototype.md5cycle=function(e,t){var r=e[0],o=e[1],i=e[2],n=e[3];r=this.ff(r,o,i,n,t[0],7,-680876936),n=this.ff(n,r,o,i,t[1],12,-389564586),i=this.ff(i,n,r,o,t[2],17,606105819),o=this.ff(o,i,n,r,t[3],22,-1044525330),r=this.ff(r,o,i,n,t[4],7,-176418897),n=this.ff(n,r,o,i,t[5],12,1200080426),i=this.ff(i,n,r,o,t[6],17,-1473231341),o=this.ff(o,i,n,r,t[7],22,-45705983),r=this.ff(r,o,i,n,t[8],7,1770035416),n=this.ff(n,r,o,i,t[9],12,-1958414417),i=this.ff(i,n,r,o,t[10],17,-42063),o=this.ff(o,i,n,r,t[11],22,-1990404162),r=this.ff(r,o,i,n,t[12],7,1804603682),n=this.ff(n,r,o,i,t[13],12,-40341101),i=this.ff(i,n,r,o,t[14],17,-1502002290),o=this.ff(o,i,n,r,t[15],22,1236535329),r=this.gg(r,o,i,n,t[1],5,-165796510),n=this.gg(n,r,o,i,t[6],9,-1069501632),i=this.gg(i,n,r,o,t[11],14,643717713),o=this.gg(o,i,n,r,t[0],20,-373897302),r=this.gg(r,o,i,n,t[5],5,-701558691),n=this.gg(n,r,o,i,t[10],9,38016083),i=this.gg(i,n,r,o,t[15],14,-660478335),o=this.gg(o,i,n,r,t[4],20,-405537848),r=this.gg(r,o,i,n,t[9],5,568446438),n=this.gg(n,r,o,i,t[14],9,-1019803690),i=this.gg(i,n,r,o,t[3],14,-187363961),o=this.gg(o,i,n,r,t[8],20,1163531501),r=this.gg(r,o,i,n,t[13],5,-1444681467),n=this.gg(n,r,o,i,t[2],9,-51403784),i=this.gg(i,n,r,o,t[7],14,1735328473),o=this.gg(o,i,n,r,t[12],20,-1926607734),r=this.hh(r,o,i,n,t[5],4,-378558),n=this.hh(n,r,o,i,t[8],11,-2022574463),i=this.hh(i,n,r,o,t[11],16,1839030562),o=this.hh(o,i,n,r,t[14],23,-35309556),r=this.hh(r,o,i,n,t[1],4,-1530992060),n=this.hh(n,r,o,i,t[4],11,1272893353),i=this.hh(i,n,r,o,t[7],16,-155497632),o=this.hh(o,i,n,r,t[10],23,-1094730640),r=this.hh(r,o,i,n,t[13],4,681279174),n=this.hh(n,r,o,i,t[0],11,-358537222),i=this.hh(i,n,r,o,t[3],16,-722521979),o=this.hh(o,i,n,r,t[6],23,76029189),r=this.hh(r,o,i,n,t[9],4,-640364487),n=this.hh(n,r,o,i,t[12],11,-421815835),i=this.hh(i,n,r,o,t[15],16,530742520),o=this.hh(o,i,n,r,t[2],23,-995338651),r=this.ii(r,o,i,n,t[0],6,-198630844),n=this.ii(n,r,o,i,t[7],10,1126891415),i=this.ii(i,n,r,o,t[14],15,-1416354905),o=this.ii(o,i,n,r,t[5],21,-57434055),r=this.ii(r,o,i,n,t[12],6,1700485571),n=this.ii(n,r,o,i,t[3],10,-1894986606),i=this.ii(i,n,r,o,t[10],15,-1051523),o=this.ii(o,i,n,r,t[1],21,-2054922799),r=this.ii(r,o,i,n,t[8],6,1873313359),n=this.ii(n,r,o,i,t[15],10,-30611744),i=this.ii(i,n,r,o,t[6],15,-1560198380),o=this.ii(o,i,n,r,t[13],21,1309151649),r=this.ii(r,o,i,n,t[4],6,-145523070),n=this.ii(n,r,o,i,t[11],10,-1120210379),i=this.ii(i,n,r,o,t[2],15,718787259),o=this.ii(o,i,n,r,t[9],21,-343485551),e[0]=this.add32(r,e[0]),e[1]=this.add32(o,e[1]),e[2]=this.add32(i,e[2]),e[3]=this.add32(n,e[3])},r.prototype.cmn=function(e,t,r,o,i,n){return t=this.add32(this.add32(t,e),this.add32(o,n)),this.add32(t<<i|t>>>32-i,r)},r.prototype.ff=function(e,t,r,o,i,n,s){return this.cmn(t&r|~t&o,e,t,i,n,s)},r.prototype.gg=function(e,t,r,o,i,n,s){return this.cmn(t&o|r&~o,e,t,i,n,s)},r.prototype.hh=function(e,t,r,o,i,n,s){return this.cmn(t^r^o,e,t,i,n,s)},r.prototype.ii=function(e,t,r,o,i,n,s){return this.cmn(r^(t|~o),e,t,i,n,s)},r.prototype.md51=function(e){var t,r=e.length,o=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)this.md5cycle(o,this.md5blk(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(this.md5cycle(o,i),t=0;t<16;t++)i[t]=0;return i[14]=8*r,this.md5cycle(o,i),o},r.prototype.md5blk=function(e){for(var t=[],r=0;r<64;r+=4)t[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return t},r.prototype.rhex=function(e){for(var t="0123456789abcdef".split(""),r="",o=0;o<4;o++)r+=t[e>>8*o+4&15]+t[e>>8*o&15];return r},r.prototype.hex=function(e){for(var t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")},r.prototype.md5=function(e){return this.hex(this.md51(e))},r.prototype.add32=function(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)},r.prototype.add32Std=function(e,t){return e+t&4294967295},r.prototype.add32Compat=function(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r},a([t.PostConstruct],r.prototype,"init",null),r=a([t.Bean("md5")],r)}(t.BeanStub),l=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),h=function(e,t,r,o){var i,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},u=function(e){function r(){return e.call(this,'<div class="ag-watermark">\n <div ref="eLicenseTextRef" class="ag-watermark-text"></div>\n </div>')||this}return l(r,e),r.prototype.postConstruct=function(){var e=this,t=this.shouldDisplayWatermark();this.setDisplayed(t),t&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout((function(){return e.addCssClass("ag-opacity-zero")}),0),window.setTimeout((function(){return e.setDisplayed(!1)}),5e3))},r.prototype.shouldDisplayWatermark=function(){var e=(this.gridOptionsService.getDocument().defaultView||window).location.pathname,t=this.licenseManager.isDisplayWatermark();return!!e&&-1!==e.indexOf("forceWatermark")||t},h([t.Autowired("licenseManager")],r.prototype,"licenseManager",void 0),h([t.RefSelector("eLicenseTextRef")],r.prototype,"eLicenseTextRef",void 0),h([t.PostConstruct],r.prototype,"postConstruct",null),r}(t.Component),f={version:"29.0.0",moduleName:t.ModuleNames.EnterpriseCoreModule,beans:[n,c],agStackComponents:[{componentName:"AgWatermark",componentClass:u}]};exports.EnterpriseCoreModule=f,exports.LicenseManager=n;

@@ -8,3 +8,5 @@ import { ModuleNames } from "@ag-grid-community/core";

export { WatermarkComp } from "./license/watermark";
import { VERSION } from "./version";
export var EnterpriseCoreModule = {
version: VERSION,
moduleName: ModuleNames.EnterpriseCoreModule,

@@ -11,0 +13,0 @@ beans: [LicenseManager, MD5],

@@ -5,3 +5,3 @@ var __extends = (this && this.__extends) || (function () {

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -8,0 +8,0 @@ };

@@ -5,3 +5,3 @@ var __extends = (this && this.__extends) || (function () {

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -30,18 +30,17 @@ };

var show = this.shouldDisplayWatermark();
this.addOrRemoveCssClass('ag-hidden', !show);
this.setDisplayed(show);
if (show) {
this.eLicenseTextRef.innerText = this.licenseManager.getWatermarkMessage();
window.setTimeout(function () { return _this.addCssClass('ag-opacity-zero'); }, 0);
window.setTimeout(function () { return _this.addCssClass('ag-hidden'); }, 5000);
window.setTimeout(function () { return _this.setDisplayed(false); }, 5000);
}
};
WatermarkComp.prototype.shouldDisplayWatermark = function () {
var eDocument = this.gridOptionsWrapper.getDocument();
var eDocument = this.gridOptionsService.getDocument();
var win = (eDocument.defaultView || window);
var loc = win.location;
var _a = loc.hostname, hostname = _a === void 0 ? '' : _a, pathname = loc.pathname;
var pathname = loc.pathname;
var isDisplayWatermark = this.licenseManager.isDisplayWatermark();
var isWhiteListURL = hostname.match('^(?:127\.0\.0\.1|localhost|(?:\w+\.)?ag-grid\.com)$') != null;
var isForceWatermark = pathname ? pathname.indexOf('forceWatermark') !== -1 : false;
return isForceWatermark || (isDisplayWatermark && !isWhiteListURL);
return isForceWatermark || isDisplayWatermark;
};

@@ -48,0 +47,0 @@ __decorate([

@@ -19,2 +19,5 @@ import { BeanStub } from '@ag-grid-community/core';

getWatermarkMessage(): string;
private getHostname;
private isWebsiteUrl;
private isLocalhost;
private static formatDate;

@@ -21,0 +24,0 @@ private static getGridReleaseDate;

@@ -5,3 +5,3 @@ var __extends = (this && this.__extends) || (function () {

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -48,3 +48,5 @@ };

if (_.missingOrEmpty(LicenseManager_1.licenseKey)) {
this.outputMissingLicenseKey();
if (!this.isWebsiteUrl()) {
this.outputMissingLicenseKey();
}
}

@@ -102,3 +104,3 @@ else if (LicenseManager_1.licenseKey.length > 32) {

LicenseManager.prototype.isDisplayWatermark = function () {
return !_.missingOrEmpty(this.watermarkMessage);
return !this.isLocalhost() && !this.isWebsiteUrl() && !_.missingOrEmpty(this.watermarkMessage);
};

@@ -108,2 +110,17 @@ LicenseManager.prototype.getWatermarkMessage = function () {

};
LicenseManager.prototype.getHostname = function () {
var eDocument = this.gridOptionsService.getDocument();
var win = (eDocument.defaultView || window);
var loc = win.location;
var _a = loc.hostname, hostname = _a === void 0 ? '' : _a;
return hostname;
};
LicenseManager.prototype.isWebsiteUrl = function () {
var hostname = this.getHostname();
return hostname.match(/^((?:\w+\.)?ag-grid\.com)$/) !== null;
};
LicenseManager.prototype.isLocalhost = function () {
var hostname = this.getHostname();
return hostname.match(/^(?:127\.0\.0\.1|localhost)$/) !== null;
};
LicenseManager.formatDate = function (date) {

@@ -283,3 +300,3 @@ var monthNames = [

var LicenseManager_1;
LicenseManager.RELEASE_INFORMATION = 'MTY2NzI0NjAxNTYyNw==';
LicenseManager.RELEASE_INFORMATION = 'MTY3MzM3ODMwNzAyMA==';
__decorate([

@@ -286,0 +303,0 @@ Autowired('md5')

@@ -8,3 +8,5 @@ import { ModuleNames } from "@ag-grid-community/core";

export { WatermarkComp } from "./license/watermark";
import { VERSION } from "./version";
export const EnterpriseCoreModule = {
version: VERSION,
moduleName: ModuleNames.EnterpriseCoreModule,

@@ -11,0 +13,0 @@ beans: [LicenseManager, MD5],

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

const show = this.shouldDisplayWatermark();
this.addOrRemoveCssClass('ag-hidden', !show);
this.setDisplayed(show);
if (show) {
this.eLicenseTextRef.innerText = this.licenseManager.getWatermarkMessage();
window.setTimeout(() => this.addCssClass('ag-opacity-zero'), 0);
window.setTimeout(() => this.addCssClass('ag-hidden'), 5000);
window.setTimeout(() => this.setDisplayed(false), 5000);
}
}
shouldDisplayWatermark() {
const eDocument = this.gridOptionsWrapper.getDocument();
const eDocument = this.gridOptionsService.getDocument();
const win = (eDocument.defaultView || window);
const loc = win.location;
const { hostname = '', pathname } = loc;
const { pathname } = loc;
const isDisplayWatermark = this.licenseManager.isDisplayWatermark();
const isWhiteListURL = hostname.match('^(?:127\.0\.0\.1|localhost|(?:\w+\.)?ag-grid\.com)$') != null;
const isForceWatermark = pathname ? pathname.indexOf('forceWatermark') !== -1 : false;
return isForceWatermark || (isDisplayWatermark && !isWhiteListURL);
return isForceWatermark || isDisplayWatermark;
}

@@ -34,0 +33,0 @@ }

@@ -19,2 +19,5 @@ import { BeanStub } from '@ag-grid-community/core';

getWatermarkMessage(): string;
private getHostname;
private isWebsiteUrl;
private isLocalhost;
private static formatDate;

@@ -21,0 +24,0 @@ private static getGridReleaseDate;

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

if (_.missingOrEmpty(LicenseManager_1.licenseKey)) {
this.outputMissingLicenseKey();
if (!this.isWebsiteUrl()) {
this.outputMissingLicenseKey();
}
}

@@ -70,3 +72,3 @@ else if (LicenseManager_1.licenseKey.length > 32) {

isDisplayWatermark() {
return !_.missingOrEmpty(this.watermarkMessage);
return !this.isLocalhost() && !this.isWebsiteUrl() && !_.missingOrEmpty(this.watermarkMessage);
}

@@ -76,2 +78,17 @@ getWatermarkMessage() {

}
getHostname() {
const eDocument = this.gridOptionsService.getDocument();
const win = (eDocument.defaultView || window);
const loc = win.location;
const { hostname = '' } = loc;
return hostname;
}
isWebsiteUrl() {
const hostname = this.getHostname();
return hostname.match(/^((?:\w+\.)?ag-grid\.com)$/) !== null;
}
isLocalhost() {
const hostname = this.getHostname();
return hostname.match(/^(?:127\.0\.0\.1|localhost)$/) !== null;
}
static formatDate(date) {

@@ -251,3 +268,3 @@ const monthNames = [

};
LicenseManager.RELEASE_INFORMATION = 'MTY2NzI0NjAxNTYyNw==';
LicenseManager.RELEASE_INFORMATION = 'MTY3MzM3ODMwNzAyMA==';
__decorate([

@@ -254,0 +271,0 @@ Autowired('md5')

{
"name": "@ag-grid-enterprise/core",
"version": "28.2.1",
"version": "29.0.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -51,3 +51,3 @@ "main": "./dist/cjs/es5/main.js",

"dependencies": {
"@ag-grid-community/core": "~28.2.1"
"@ag-grid-community/core": "~29.0.0"
},

@@ -60,3 +60,3 @@ "devDependencies": {

"ts-jest": "^25.4.0",
"typescript": "~3.7.7",
"typescript": "~4.0.8",
"rimraf": "3.0.2"

@@ -63,0 +63,0 @@ },

@@ -19,2 +19,5 @@ import { BeanStub } from '@ag-grid-community/core';

getWatermarkMessage(): string;
private getHostname;
private isWebsiteUrl;
private isLocalhost;
private static formatDate;

@@ -21,0 +24,0 @@ private static getGridReleaseDate;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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