Socket
Socket
Sign inDemoInstall

@ag-grid-enterprise/core

Package Overview
Dependencies
2
Maintainers
3
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 31.2.0 to 31.2.1

4

dist/package/main.cjs.js

@@ -505,3 +505,3 @@ var __defProp = Object.defineProperty;

};
_LicenseManager.RELEASE_INFORMATION = "MTcxMDY5MjgwODc5NQ==";
_LicenseManager.RELEASE_INFORMATION = "MTcxMjU1ODYyOTkzMw==";
var LicenseManager = _LicenseManager;

@@ -573,3 +573,3 @@

// enterprise-modules/core/src/version.ts
var VERSION = "31.2.0";
var VERSION = "31.2.1";

@@ -576,0 +576,0 @@ // enterprise-modules/core/src/agGridEnterpriseModule.ts

@@ -1,3 +0,3 @@

var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(a,e)=>{for(var t in e)__defProp(a,t,{get:e[t],enumerable:!0})},__copyProps=(a,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of __getOwnPropNames(e))!__hasOwnProp.call(a,s)&&s!==t&&__defProp(a,s,{get:()=>e[s],enumerable:!(i=__getOwnPropDesc(e,s))||i.enumerable});return a},__toCommonJS=a=>__copyProps(__defProp({},"__esModule",{value:!0}),a),__decorateClass=(a,e,t,i)=>{for(var s=i>1?void 0:i?__getOwnPropDesc(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&__defProp(e,t,s),s},main_exports={};__export(main_exports,{EnterpriseCoreModule:()=>EnterpriseCoreModule,LicenseManager:()=>GridLicenseManager}),module.exports=__toCommonJS(main_exports);var import_core3=require("@ag-grid-community/core"),import_core=require("@ag-grid-community/core"),MD5=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(a,e){let t=a[0],i=a[1],s=a[2],r=a[3];t=this.ff(t,i,s,r,e[0],7,-680876936),r=this.ff(r,t,i,s,e[1],12,-389564586),s=this.ff(s,r,t,i,e[2],17,606105819),i=this.ff(i,s,r,t,e[3],22,-1044525330),t=this.ff(t,i,s,r,e[4],7,-176418897),r=this.ff(r,t,i,s,e[5],12,1200080426),s=this.ff(s,r,t,i,e[6],17,-1473231341),i=this.ff(i,s,r,t,e[7],22,-45705983),t=this.ff(t,i,s,r,e[8],7,1770035416),r=this.ff(r,t,i,s,e[9],12,-1958414417),s=this.ff(s,r,t,i,e[10],17,-42063),i=this.ff(i,s,r,t,e[11],22,-1990404162),t=this.ff(t,i,s,r,e[12],7,1804603682),r=this.ff(r,t,i,s,e[13],12,-40341101),s=this.ff(s,r,t,i,e[14],17,-1502002290),i=this.ff(i,s,r,t,e[15],22,1236535329),t=this.gg(t,i,s,r,e[1],5,-165796510),r=this.gg(r,t,i,s,e[6],9,-1069501632),s=this.gg(s,r,t,i,e[11],14,643717713),i=this.gg(i,s,r,t,e[0],20,-373897302),t=this.gg(t,i,s,r,e[5],5,-701558691),r=this.gg(r,t,i,s,e[10],9,38016083),s=this.gg(s,r,t,i,e[15],14,-660478335),i=this.gg(i,s,r,t,e[4],20,-405537848),t=this.gg(t,i,s,r,e[9],5,568446438),r=this.gg(r,t,i,s,e[14],9,-1019803690),s=this.gg(s,r,t,i,e[3],14,-187363961),i=this.gg(i,s,r,t,e[8],20,1163531501),t=this.gg(t,i,s,r,e[13],5,-1444681467),r=this.gg(r,t,i,s,e[2],9,-51403784),s=this.gg(s,r,t,i,e[7],14,1735328473),i=this.gg(i,s,r,t,e[12],20,-1926607734),t=this.hh(t,i,s,r,e[5],4,-378558),r=this.hh(r,t,i,s,e[8],11,-2022574463),s=this.hh(s,r,t,i,e[11],16,1839030562),i=this.hh(i,s,r,t,e[14],23,-35309556),t=this.hh(t,i,s,r,e[1],4,-1530992060),r=this.hh(r,t,i,s,e[4],11,1272893353),s=this.hh(s,r,t,i,e[7],16,-155497632),i=this.hh(i,s,r,t,e[10],23,-1094730640),t=this.hh(t,i,s,r,e[13],4,681279174),r=this.hh(r,t,i,s,e[0],11,-358537222),s=this.hh(s,r,t,i,e[3],16,-722521979),i=this.hh(i,s,r,t,e[6],23,76029189),t=this.hh(t,i,s,r,e[9],4,-640364487),r=this.hh(r,t,i,s,e[12],11,-421815835),s=this.hh(s,r,t,i,e[15],16,530742520),i=this.hh(i,s,r,t,e[2],23,-995338651),t=this.ii(t,i,s,r,e[0],6,-198630844),r=this.ii(r,t,i,s,e[7],10,1126891415),s=this.ii(s,r,t,i,e[14],15,-1416354905),i=this.ii(i,s,r,t,e[5],21,-57434055),t=this.ii(t,i,s,r,e[12],6,1700485571),r=this.ii(r,t,i,s,e[3],10,-1894986606),s=this.ii(s,r,t,i,e[10],15,-1051523),i=this.ii(i,s,r,t,e[1],21,-2054922799),t=this.ii(t,i,s,r,e[8],6,1873313359),r=this.ii(r,t,i,s,e[15],10,-30611744),s=this.ii(s,r,t,i,e[6],15,-1560198380),i=this.ii(i,s,r,t,e[13],21,1309151649),t=this.ii(t,i,s,r,e[4],6,-145523070),r=this.ii(r,t,i,s,e[11],10,-1120210379),s=this.ii(s,r,t,i,e[2],15,718787259),i=this.ii(i,s,r,t,e[9],21,-343485551),a[0]=this.add32(t,a[0]),a[1]=this.add32(i,a[1]),a[2]=this.add32(s,a[2]),a[3]=this.add32(r,a[3])}cmn(a,e,t,i,s,r){return e=this.add32(this.add32(e,a),this.add32(i,r)),this.add32(e<<s|e>>>32-s,t)}ff(a,e,t,i,s,r,n){return this.cmn(e&t|~e&i,a,e,s,r,n)}gg(a,e,t,i,s,r,n){return this.cmn(e&i|t&~i,a,e,s,r,n)}hh(a,e,t,i,s,r,n){return this.cmn(e^t^i,a,e,s,r,n)}ii(a,e,t,i,s,r,n){return this.cmn(t^(e|~i),a,e,s,r,n)}md51(a){const e=a.length,t=[1732584193,-271733879,-1732584194,271733878];let i;for(i=64;i<=a.length;i+=64)this.md5cycle(t,this.md5blk(a.substring(i-64,i)));a=a.substring(i-64);const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<a.length;i++)s[i>>2]|=a.charCodeAt(i)<<(i%4<<3);if(s[i>>2]|=128<<(i%4<<3),i>55)for(this.md5cycle(t,s),i=0;i<16;i++)s[i]=0;return s[14]=e*8,this.md5cycle(t,s),t}md5blk(a){const e=[];for(let t=0;t<64;t+=4)e[t>>2]=a.charCodeAt(t)+(a.charCodeAt(t+1)<<8)+(a.charCodeAt(t+2)<<16)+(a.charCodeAt(t+3)<<24);return e}rhex(a){const e="0123456789abcdef".split("");let t="",i=0;for(;i<4;i++)t+=e[a>>i*8+4&15]+e[a>>i*8&15];return t}hex(a){for(let e=0;e<a.length;e++)a[e]=this.rhex(a[e]);return a.join("")}md5(a){return this.hex(this.md51(a))}add32(a,e){return this.ieCompatibility?this.add32Compat(a,e):this.add32Std(a,e)}add32Std(a,e){return a+e&4294967295}add32Compat(a,e){const t=(a&65535)+(e&65535);return(a>>16)+(e>>16)+(t>>16)<<16|t&65535}};function missingOrEmpty(a){return a==null||a.length===0}var LICENSE_TYPES={"01":"GRID","02":"CHARTS","0102":"BOTH"},_LicenseManager=class c{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new MD5,this.md5.init()}validateLicense(){const e=this.getLicenseDetails(c.licenseKey),t=`AG Grid ${e.currentLicenseType==="BOTH"?"and AG Charts ":""}Enterprise`,i=e.suppliedLicenseType===void 0?"":`AG ${e.suppliedLicenseType==="BOTH"?"Grid and AG Charts":e.suppliedLicenseType==="GRID"?"Grid":"Charts"} Enterprise`;if(e.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(t);else if(e.expired){const s=c.getGridReleaseDate(),r=c.formatDate(s);this.outputExpiredKey(e.expiry,r,t,i)}else e.valid?e.isTrial&&e.trialExpired&&this.outputExpiredTrialKey(e.expiry,t,i):this.outputInvalidLicenseKey(!!e.incorrectLicenseType,t,i)}static extractExpiry(e){const t=e.substring(e.lastIndexOf("_")+1,e.length);return new Date(parseInt(c.decode(t),10))}static extractLicenseComponents(e){let t=e.replace(/[\u200B-\u200D\uFEFF]/g,"");if(t=t.replace(/\r?\n|\r/g,""),e.length<=32)return{md5:null,license:e,version:null,isTrial:null};const i=t.length-32,s=t.substring(i),r=t.substring(0,i),[n,o,l]=c.extractBracketedInformation(t);return{md5:s,license:r,version:n,isTrial:o,type:l}}getLicenseDetails(e){const t=c.chartsLicenseManager?"BOTH":"GRID";if(missingOrEmpty(e))return{licenseKey:e,valid:!1,missing:!0,currentLicenseType:t};const i=c.getGridReleaseDate(),{md5:s,license:r,version:n,isTrial:o,type:l}=c.extractLicenseComponents(e);let h=s===this.md5.md5(r)&&e.indexOf("For_Trialing_ag-Grid_Only")===-1,p,u,d=null,f=!1,g;function m(){p=d<new Date,u=void 0}if(h&&(d=c.extractExpiry(r),h=!isNaN(d.getTime()),h))switch(u=i>d,n){case"legacy":case"2":{o&&m();break}case"3":missingOrEmpty(l)?h=!1:(g=l,l!==LICENSE_TYPES["01"]&&l!==LICENSE_TYPES["0102"]||t==="BOTH"&&g!=="BOTH"?(h=!1,f=!0):o&&m())}return h?{licenseKey:e,valid:h,expiry:c.formatDate(d),expired:u,version:n,isTrial:o,trialExpired:p,incorrectLicenseType:f,currentLicenseType:t,suppliedLicenseType:g}:{licenseKey:e,valid:h,incorrectLicenseType:f,currentLicenseType:t,suppliedLicenseType:g}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!missingOrEmpty(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){const t=(this.document.defaultView||window).location,{hostname:i=""}=t;return i}isForceWatermark(){const t=(this.document.defaultView||window).location,{pathname:i}=t;return i?i.indexOf("forceWatermark")!==-1:!1}isWebsiteUrl(){return this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)!==null}isLocalhost(){return this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)!==null}static formatDate(e){const t=["January","February","March","April","May","June","July","August","September","October","November","December"],i=e.getDate(),s=e.getMonth(),r=e.getFullYear();return i+" "+t[s]+" "+r}static getGridReleaseDate(){return new Date(parseInt(c.decode(c.RELEASE_INFORMATION),10))}static decode(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let i="",s,r,n,o,l,h,p,u=0;const d=e.replace(/[^A-Za-z0-9+/=]/g,"");for(;u<d.length;)o=t.indexOf(d.charAt(u++)),l=t.indexOf(d.charAt(u++)),h=t.indexOf(d.charAt(u++)),p=t.indexOf(d.charAt(u++)),s=o<<2|l>>4,r=(l&15)<<4|h>>2,n=(h&3)<<6|p,i=i+String.fromCharCode(s),h!=64&&(i=i+String.fromCharCode(r)),p!=64&&(i=i+String.fromCharCode(n));return i=c.utf8_decode(i),i}static utf8_decode(e){e=e.replace(/rn/g,"n");let t="";for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);s<128?t+=String.fromCharCode(s):s>127&&s<2048?(t+=String.fromCharCode(s>>6|192),t+=String.fromCharCode(s&63|128)):(t+=String.fromCharCode(s>>12|224),t+=String.fromCharCode(s>>6&63|128),t+=String.fromCharCode(s&63|128))}return t}static setChartsLicenseManager(e){this.chartsLicenseManager=e}static setLicenseKey(e){this.licenseKey=e,this.chartsLicenseManager&&this.chartsLicenseManager.setLicenseKey(e,!0)}static extractBracketedInformation(e){if(!e.includes("["))return["legacy",!1,void 0];const t=e.match(/\[(.*?)\]/g).map(o=>o.replace("[","").replace("]",""));if(!t||t.length===0)return["legacy",!1,void 0];const i=t.filter(o=>o==="TRIAL").length===1,s=t.filter(o=>o.indexOf("v")===0)[0],r=s?s.replace("v",""):"legacy",n=LICENSE_TYPES[t.filter(o=>LICENSE_TYPES[o])[0]];return[r,i,n]}centerPadAndOutput(e){const t=this.totalMessageLength-e.length;console.error(e.padStart(t/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,t="*",i=""){console.error(e.padEnd(this.totalMessageLength-i.length,t)+i)}outputInvalidLicenseKey(e,t,i){e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${i} only and does not cover you for ${t}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to obtain a combined license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid - please contact info@ag-grid.com to obtain a valid license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,t,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${i} expired on ${e}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(e){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${e} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${e} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(e,t,i,s){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${s} released before ${e}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${t}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};_LicenseManager.RELEASE_INFORMATION="MTcxMDY5MjgwODc5NQ==";var LicenseManager=_LicenseManager,GridLicenseManager=class extends import_core.BeanStub{validateLicense(){this.licenseManager=new LicenseManager(this.gridOptionsService.getDocument()),this.licenseManager.validateLicense()}static getLicenseDetails(a){return new LicenseManager(null).getLicenseDetails(a)}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(a){LicenseManager.setLicenseKey(a)}static setChartsLicenseManager(a){LicenseManager.setChartsLicenseManager(a)}};__decorateClass([import_core.PreConstruct],GridLicenseManager.prototype,"validateLicense",1),GridLicenseManager=__decorateClass([(0,import_core.Bean)("licenseManager")],GridLicenseManager);var import_core2=require("@ag-grid-community/core"),WatermarkComp=class extends import_core2.Component{constructor(){super(`<div class="ag-watermark">
var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(a,e)=>{for(var t in e)__defProp(a,t,{get:e[t],enumerable:!0})},__copyProps=(a,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of __getOwnPropNames(e))!__hasOwnProp.call(a,s)&&s!==t&&__defProp(a,s,{get:()=>e[s],enumerable:!(i=__getOwnPropDesc(e,s))||i.enumerable});return a},__toCommonJS=a=>__copyProps(__defProp({},"__esModule",{value:!0}),a),__decorateClass=(a,e,t,i)=>{for(var s=i>1?void 0:i?__getOwnPropDesc(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&__defProp(e,t,s),s},main_exports={};__export(main_exports,{EnterpriseCoreModule:()=>EnterpriseCoreModule,LicenseManager:()=>GridLicenseManager}),module.exports=__toCommonJS(main_exports);var import_core3=require("@ag-grid-community/core"),import_core=require("@ag-grid-community/core"),MD5=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(a,e){let t=a[0],i=a[1],s=a[2],r=a[3];t=this.ff(t,i,s,r,e[0],7,-680876936),r=this.ff(r,t,i,s,e[1],12,-389564586),s=this.ff(s,r,t,i,e[2],17,606105819),i=this.ff(i,s,r,t,e[3],22,-1044525330),t=this.ff(t,i,s,r,e[4],7,-176418897),r=this.ff(r,t,i,s,e[5],12,1200080426),s=this.ff(s,r,t,i,e[6],17,-1473231341),i=this.ff(i,s,r,t,e[7],22,-45705983),t=this.ff(t,i,s,r,e[8],7,1770035416),r=this.ff(r,t,i,s,e[9],12,-1958414417),s=this.ff(s,r,t,i,e[10],17,-42063),i=this.ff(i,s,r,t,e[11],22,-1990404162),t=this.ff(t,i,s,r,e[12],7,1804603682),r=this.ff(r,t,i,s,e[13],12,-40341101),s=this.ff(s,r,t,i,e[14],17,-1502002290),i=this.ff(i,s,r,t,e[15],22,1236535329),t=this.gg(t,i,s,r,e[1],5,-165796510),r=this.gg(r,t,i,s,e[6],9,-1069501632),s=this.gg(s,r,t,i,e[11],14,643717713),i=this.gg(i,s,r,t,e[0],20,-373897302),t=this.gg(t,i,s,r,e[5],5,-701558691),r=this.gg(r,t,i,s,e[10],9,38016083),s=this.gg(s,r,t,i,e[15],14,-660478335),i=this.gg(i,s,r,t,e[4],20,-405537848),t=this.gg(t,i,s,r,e[9],5,568446438),r=this.gg(r,t,i,s,e[14],9,-1019803690),s=this.gg(s,r,t,i,e[3],14,-187363961),i=this.gg(i,s,r,t,e[8],20,1163531501),t=this.gg(t,i,s,r,e[13],5,-1444681467),r=this.gg(r,t,i,s,e[2],9,-51403784),s=this.gg(s,r,t,i,e[7],14,1735328473),i=this.gg(i,s,r,t,e[12],20,-1926607734),t=this.hh(t,i,s,r,e[5],4,-378558),r=this.hh(r,t,i,s,e[8],11,-2022574463),s=this.hh(s,r,t,i,e[11],16,1839030562),i=this.hh(i,s,r,t,e[14],23,-35309556),t=this.hh(t,i,s,r,e[1],4,-1530992060),r=this.hh(r,t,i,s,e[4],11,1272893353),s=this.hh(s,r,t,i,e[7],16,-155497632),i=this.hh(i,s,r,t,e[10],23,-1094730640),t=this.hh(t,i,s,r,e[13],4,681279174),r=this.hh(r,t,i,s,e[0],11,-358537222),s=this.hh(s,r,t,i,e[3],16,-722521979),i=this.hh(i,s,r,t,e[6],23,76029189),t=this.hh(t,i,s,r,e[9],4,-640364487),r=this.hh(r,t,i,s,e[12],11,-421815835),s=this.hh(s,r,t,i,e[15],16,530742520),i=this.hh(i,s,r,t,e[2],23,-995338651),t=this.ii(t,i,s,r,e[0],6,-198630844),r=this.ii(r,t,i,s,e[7],10,1126891415),s=this.ii(s,r,t,i,e[14],15,-1416354905),i=this.ii(i,s,r,t,e[5],21,-57434055),t=this.ii(t,i,s,r,e[12],6,1700485571),r=this.ii(r,t,i,s,e[3],10,-1894986606),s=this.ii(s,r,t,i,e[10],15,-1051523),i=this.ii(i,s,r,t,e[1],21,-2054922799),t=this.ii(t,i,s,r,e[8],6,1873313359),r=this.ii(r,t,i,s,e[15],10,-30611744),s=this.ii(s,r,t,i,e[6],15,-1560198380),i=this.ii(i,s,r,t,e[13],21,1309151649),t=this.ii(t,i,s,r,e[4],6,-145523070),r=this.ii(r,t,i,s,e[11],10,-1120210379),s=this.ii(s,r,t,i,e[2],15,718787259),i=this.ii(i,s,r,t,e[9],21,-343485551),a[0]=this.add32(t,a[0]),a[1]=this.add32(i,a[1]),a[2]=this.add32(s,a[2]),a[3]=this.add32(r,a[3])}cmn(a,e,t,i,s,r){return e=this.add32(this.add32(e,a),this.add32(i,r)),this.add32(e<<s|e>>>32-s,t)}ff(a,e,t,i,s,r,n){return this.cmn(e&t|~e&i,a,e,s,r,n)}gg(a,e,t,i,s,r,n){return this.cmn(e&i|t&~i,a,e,s,r,n)}hh(a,e,t,i,s,r,n){return this.cmn(e^t^i,a,e,s,r,n)}ii(a,e,t,i,s,r,n){return this.cmn(t^(e|~i),a,e,s,r,n)}md51(a){const e=a.length,t=[1732584193,-271733879,-1732584194,271733878];let i;for(i=64;i<=a.length;i+=64)this.md5cycle(t,this.md5blk(a.substring(i-64,i)));a=a.substring(i-64);const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<a.length;i++)s[i>>2]|=a.charCodeAt(i)<<(i%4<<3);if(s[i>>2]|=128<<(i%4<<3),i>55)for(this.md5cycle(t,s),i=0;i<16;i++)s[i]=0;return s[14]=e*8,this.md5cycle(t,s),t}md5blk(a){const e=[];for(let t=0;t<64;t+=4)e[t>>2]=a.charCodeAt(t)+(a.charCodeAt(t+1)<<8)+(a.charCodeAt(t+2)<<16)+(a.charCodeAt(t+3)<<24);return e}rhex(a){const e="0123456789abcdef".split("");let t="",i=0;for(;i<4;i++)t+=e[a>>i*8+4&15]+e[a>>i*8&15];return t}hex(a){for(let e=0;e<a.length;e++)a[e]=this.rhex(a[e]);return a.join("")}md5(a){return this.hex(this.md51(a))}add32(a,e){return this.ieCompatibility?this.add32Compat(a,e):this.add32Std(a,e)}add32Std(a,e){return a+e&4294967295}add32Compat(a,e){const t=(a&65535)+(e&65535);return(a>>16)+(e>>16)+(t>>16)<<16|t&65535}};function missingOrEmpty(a){return a==null||a.length===0}var LICENSE_TYPES={"01":"GRID","02":"CHARTS","0102":"BOTH"},_LicenseManager=class c{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new MD5,this.md5.init()}validateLicense(){const e=this.getLicenseDetails(c.licenseKey),t=`AG Grid ${e.currentLicenseType==="BOTH"?"and AG Charts ":""}Enterprise`,i=e.suppliedLicenseType===void 0?"":`AG ${e.suppliedLicenseType==="BOTH"?"Grid and AG Charts":e.suppliedLicenseType==="GRID"?"Grid":"Charts"} Enterprise`;if(e.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(t);else if(e.expired){const s=c.getGridReleaseDate(),r=c.formatDate(s);this.outputExpiredKey(e.expiry,r,t,i)}else e.valid?e.isTrial&&e.trialExpired&&this.outputExpiredTrialKey(e.expiry,t,i):this.outputInvalidLicenseKey(!!e.incorrectLicenseType,t,i)}static extractExpiry(e){const t=e.substring(e.lastIndexOf("_")+1,e.length);return new Date(parseInt(c.decode(t),10))}static extractLicenseComponents(e){let t=e.replace(/[\u200B-\u200D\uFEFF]/g,"");if(t=t.replace(/\r?\n|\r/g,""),e.length<=32)return{md5:null,license:e,version:null,isTrial:null};const i=t.length-32,s=t.substring(i),r=t.substring(0,i),[n,o,l]=c.extractBracketedInformation(t);return{md5:s,license:r,version:n,isTrial:o,type:l}}getLicenseDetails(e){const t=c.chartsLicenseManager?"BOTH":"GRID";if(missingOrEmpty(e))return{licenseKey:e,valid:!1,missing:!0,currentLicenseType:t};const i=c.getGridReleaseDate(),{md5:s,license:r,version:n,isTrial:o,type:l}=c.extractLicenseComponents(e);let h=s===this.md5.md5(r)&&e.indexOf("For_Trialing_ag-Grid_Only")===-1,p,u,d=null,f=!1,g;function m(){p=d<new Date,u=void 0}if(h&&(d=c.extractExpiry(r),h=!isNaN(d.getTime()),h))switch(u=i>d,n){case"legacy":case"2":{o&&m();break}case"3":missingOrEmpty(l)?h=!1:(g=l,l!==LICENSE_TYPES["01"]&&l!==LICENSE_TYPES["0102"]||t==="BOTH"&&g!=="BOTH"?(h=!1,f=!0):o&&m())}return h?{licenseKey:e,valid:h,expiry:c.formatDate(d),expired:u,version:n,isTrial:o,trialExpired:p,incorrectLicenseType:f,currentLicenseType:t,suppliedLicenseType:g}:{licenseKey:e,valid:h,incorrectLicenseType:f,currentLicenseType:t,suppliedLicenseType:g}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!missingOrEmpty(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){const t=(this.document.defaultView||window).location,{hostname:i=""}=t;return i}isForceWatermark(){const t=(this.document.defaultView||window).location,{pathname:i}=t;return i?i.indexOf("forceWatermark")!==-1:!1}isWebsiteUrl(){return this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)!==null}isLocalhost(){return this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)!==null}static formatDate(e){const t=["January","February","March","April","May","June","July","August","September","October","November","December"],i=e.getDate(),s=e.getMonth(),r=e.getFullYear();return i+" "+t[s]+" "+r}static getGridReleaseDate(){return new Date(parseInt(c.decode(c.RELEASE_INFORMATION),10))}static decode(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let i="",s,r,n,o,l,h,p,u=0;const d=e.replace(/[^A-Za-z0-9+/=]/g,"");for(;u<d.length;)o=t.indexOf(d.charAt(u++)),l=t.indexOf(d.charAt(u++)),h=t.indexOf(d.charAt(u++)),p=t.indexOf(d.charAt(u++)),s=o<<2|l>>4,r=(l&15)<<4|h>>2,n=(h&3)<<6|p,i=i+String.fromCharCode(s),h!=64&&(i=i+String.fromCharCode(r)),p!=64&&(i=i+String.fromCharCode(n));return i=c.utf8_decode(i),i}static utf8_decode(e){e=e.replace(/rn/g,"n");let t="";for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);s<128?t+=String.fromCharCode(s):s>127&&s<2048?(t+=String.fromCharCode(s>>6|192),t+=String.fromCharCode(s&63|128)):(t+=String.fromCharCode(s>>12|224),t+=String.fromCharCode(s>>6&63|128),t+=String.fromCharCode(s&63|128))}return t}static setChartsLicenseManager(e){this.chartsLicenseManager=e}static setLicenseKey(e){this.licenseKey=e,this.chartsLicenseManager&&this.chartsLicenseManager.setLicenseKey(e,!0)}static extractBracketedInformation(e){if(!e.includes("["))return["legacy",!1,void 0];const t=e.match(/\[(.*?)\]/g).map(o=>o.replace("[","").replace("]",""));if(!t||t.length===0)return["legacy",!1,void 0];const i=t.filter(o=>o==="TRIAL").length===1,s=t.filter(o=>o.indexOf("v")===0)[0],r=s?s.replace("v",""):"legacy",n=LICENSE_TYPES[t.filter(o=>LICENSE_TYPES[o])[0]];return[r,i,n]}centerPadAndOutput(e){const t=this.totalMessageLength-e.length;console.error(e.padStart(t/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,t="*",i=""){console.error(e.padEnd(this.totalMessageLength-i.length,t)+i)}outputInvalidLicenseKey(e,t,i){e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${i} only and does not cover you for ${t}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to obtain a combined license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid - please contact info@ag-grid.com to obtain a valid license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,t,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${i} expired on ${e}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(e){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${e} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${e} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(e,t,i,s){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${s} released before ${e}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${t}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};_LicenseManager.RELEASE_INFORMATION="MTcxMjU1ODYyOTkzMw==";var LicenseManager=_LicenseManager,GridLicenseManager=class extends import_core.BeanStub{validateLicense(){this.licenseManager=new LicenseManager(this.gridOptionsService.getDocument()),this.licenseManager.validateLicense()}static getLicenseDetails(a){return new LicenseManager(null).getLicenseDetails(a)}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(a){LicenseManager.setLicenseKey(a)}static setChartsLicenseManager(a){LicenseManager.setChartsLicenseManager(a)}};__decorateClass([import_core.PreConstruct],GridLicenseManager.prototype,"validateLicense",1),GridLicenseManager=__decorateClass([(0,import_core.Bean)("licenseManager")],GridLicenseManager);var import_core2=require("@ag-grid-community/core"),WatermarkComp=class extends import_core2.Component{constructor(){super(`<div class="ag-watermark">
<div ref="eLicenseTextRef" class="ag-watermark-text"></div>
</div>`)}postConstruct(){const a=this.shouldDisplayWatermark();this.setDisplayed(a),a&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}};__decorateClass([(0,import_core2.Autowired)("licenseManager")],WatermarkComp.prototype,"licenseManager",2),__decorateClass([(0,import_core2.RefSelector)("eLicenseTextRef")],WatermarkComp.prototype,"eLicenseTextRef",2),__decorateClass([import_core2.PostConstruct],WatermarkComp.prototype,"postConstruct",1);var VERSION="31.2.0",EnterpriseCoreModule={version:VERSION,moduleName:import_core3.ModuleNames.EnterpriseCoreModule,beans:[GridLicenseManager],agStackComponents:[{componentName:"AgWatermark",componentClass:WatermarkComp}]};
</div>`)}postConstruct(){const a=this.shouldDisplayWatermark();this.setDisplayed(a),a&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}};__decorateClass([(0,import_core2.Autowired)("licenseManager")],WatermarkComp.prototype,"licenseManager",2),__decorateClass([(0,import_core2.RefSelector)("eLicenseTextRef")],WatermarkComp.prototype,"eLicenseTextRef",2),__decorateClass([import_core2.PostConstruct],WatermarkComp.prototype,"postConstruct",1);var VERSION="31.2.1",EnterpriseCoreModule={version:VERSION,moduleName:import_core3.ModuleNames.EnterpriseCoreModule,beans:[GridLicenseManager],agStackComponents:[{componentName:"AgWatermark",componentClass:WatermarkComp}]};
{
"name": "@ag-grid-enterprise/core",
"version": "31.2.0",
"version": "31.2.1",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -15,3 +15,3 @@ "main": "./dist/package/main.cjs.js",

"dependencies": {
"@ag-grid-community/core": "31.2.0"
"@ag-grid-community/core": "31.2.1"
},

@@ -18,0 +18,0 @@ "devDependencies": {

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

@@ -15,3 +15,3 @@ "main": "./src/main.js",

"dependencies": {
"@ag-grid-community/core": "31.2.0"
"@ag-grid-community/core": "31.2.1"
},

@@ -18,0 +18,0 @@ "devDependencies": {

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

export declare const VERSION = "31.2.0";
export declare const VERSION = "31.2.1";
{
"name": "@ag-grid-enterprise/core",
"version": "31.2.0",
"version": "31.2.1",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -15,3 +15,3 @@ "main": "./dist/package/main.cjs.js",

"dependencies": {
"@ag-grid-community/core": "31.2.0"
"@ag-grid-community/core": "31.2.1"
},

@@ -18,0 +18,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc