ag-grid-vue3
Advanced tools
Comparing version 31.0.2 to 31.0.3
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue"),require("agGrid")):"function"===typeof define&&define.amd?define([,"agGrid"],t):"object"===typeof exports?exports["ag-grid-vue3"]=t(require("vue"),require("agGrid")):e["ag-grid-vue3"]=t(e["Vue"],e["agGrid"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fae3")}({"8bbf":function(t,n){t.exports=e},"8bd4":function(e,n){e.exports=t},"9ff4":function(e,t,n){"use strict";(function(e){ | ||
/** | ||
* @vue/shared v3.4.14 | ||
* @vue/shared v3.4.15 | ||
* (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
* @license MIT | ||
**/ | ||
function r(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return w})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return d})),n.d(t,"h",(function(){return b})),n.d(t,"i",(function(){return u})),n.d(t,"j",(function(){return h})),n.d(t,"k",(function(){return p})),n.d(t,"l",(function(){return r})),n.d(t,"m",(function(){return m}));const o=()=>{},s=Object.assign,i=Object.prototype.hasOwnProperty,a=(e,t)=>i.call(e,t),c=Array.isArray,u=e=>"[object Map]"===g(e),d=e=>"function"===typeof e,l=e=>"string"===typeof e,p=e=>"symbol"===typeof e,h=e=>null!==e&&"object"===typeof e,f=Object.prototype.toString,g=e=>f.call(e),m=e=>g(e).slice(8,-1),b=e=>l(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,v=e=>{const t=Object.create(null);return n=>{const r=t[n];return r||(t[n]=e(n))}},_=/-(\w)/g,O=(v(e=>e.replace(_,(e,t)=>t?t.toUpperCase():"")),/\B([A-Z])/g),y=(v(e=>e.replace(O,"-$1").toLowerCase()),v(e=>e.charAt(0).toUpperCase()+e.slice(1))),w=(v(e=>{const t=e?"on"+y(e):"";return t}),(e,t)=>!Object.is(e,t)),j=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})}}).call(this,n("c8ba"))},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"AgGridVue",(function(){return Se})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var s=n("8bbf"),i=n("9ff4");let a;function c(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}let u=!0,d=0;const l=[];function p(){l.push(u),u=!1}function h(){const e=l.pop();u=void 0===e||e}function f(){d++}function g(){d--;while(!d&&b.length)b.shift()()}function m(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&c(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const b=[];function v(e,t,n){f();for(const r of e.keys())if(e.get(r)===r._trackId){if(r._dirtyLevel<t&&(!r._runnings||r.allowRecurse)){const e=r._dirtyLevel;r._dirtyLevel=t,0===e&&(r._shouldSchedule=!0,r.trigger())}r.scheduler&&r._shouldSchedule&&(!r._runnings||r.allowRecurse)&&(r._shouldSchedule=!1,b.push(r.scheduler))}g()}const _=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},O=new WeakMap,y=Symbol(""),w=Symbol("");function j(e,t,n){if(u&&a){let t=O.get(e);t||O.set(e,t=new Map);let r=t.get(n);r||t.set(n,r=_(()=>t.delete(n))),m(a,r,void 0)}}function C(e,t,n,r,o,s){const a=O.get(e);if(!a)return;let c=[];if("clear"===t)c=[...a.values()];else if("length"===n&&Object(i["f"])(e)){const e=Number(r);a.forEach((t,n)=>{("length"===n||!Object(i["k"])(n)&&n>=e)&&c.push(t)})}else switch(void 0!==n&&c.push(a.get(n)),t){case"add":Object(i["f"])(e)?Object(i["h"])(n)&&c.push(a.get("length")):(c.push(a.get(y)),Object(i["i"])(e)&&c.push(a.get(w)));break;case"delete":Object(i["f"])(e)||(c.push(a.get(y)),Object(i["i"])(e)&&c.push(a.get(w)));break;case"set":Object(i["i"])(e)&&c.push(a.get(y));break}f();for(const i of c)i&&v(i,2,void 0);g()}const R=Object(i["l"])("__proto__,__v_isRef,__isVue"),E=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(i["k"])),k=P();function P(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=pe(this);for(let t=0,o=this.length;t<o;t++)j(n,"get",t+"");const r=n[t](...e);return-1===r||!1===r?n[t](...e.map(pe)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){p(),f();const n=pe(this)[t].apply(this,e);return g(),h(),n}}),e}function x(e){const t=pe(this);return j(t,"has",e),t.hasOwnProperty(e)}class I{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,n){const r=this._isReadonly,o=this._shallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(r?o?oe:re:o?ne:te).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=Object(i["f"])(e);if(!r){if(s&&Object(i["e"])(k,t))return Reflect.get(k,t,n);if("hasOwnProperty"===t)return x}const a=Reflect.get(e,t,n);return(Object(i["k"])(t)?E.has(t):R(t))?a:(r||j(e,"get",t),o?a:me(a)?s&&Object(i["h"])(t)?a:a.value:Object(i["j"])(a)?r?ce(a):ae(a):a)}}class M extends I{constructor(e=!1){super(!1,e)}set(e,t,n,r){let o=e[t];if(!this._shallow){const t=de(o);if(le(n)||de(n)||(o=pe(o),n=pe(n)),!Object(i["f"])(e)&&me(o)&&!me(n))return!t&&(o.value=n,!0)}const s=Object(i["f"])(e)&&Object(i["h"])(t)?Number(t)<e.length:Object(i["e"])(e,t),a=Reflect.set(e,t,n,r);return e===pe(r)&&(s?Object(i["d"])(n,o)&&C(e,"set",t,n,o):C(e,"add",t,n)),a}deleteProperty(e,t){const n=Object(i["e"])(e,t),r=e[t],o=Reflect.deleteProperty(e,t);return o&&n&&C(e,"delete",t,void 0,r),o}has(e,t){const n=Reflect.has(e,t);return Object(i["k"])(t)&&E.has(t)||j(e,"has",t),n}ownKeys(e){return j(e,"iterate",Object(i["f"])(e)?"length":y),Reflect.ownKeys(e)}}class S extends I{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const D=new M,F=new S,$=e=>e,U=e=>Reflect.getPrototypeOf(e);function A(e,t,n=!1,r=!1){e=e["__v_raw"];const o=pe(e),s=pe(t);n||(Object(i["d"])(t,s)&&j(o,"get",t),j(o,"get",s));const{has:a}=U(o),c=r?$:n?ge:fe;return a.call(o,t)?c(e.get(t)):a.call(o,s)?c(e.get(s)):void(e!==o&&e.get(t))}function T(e,t=!1){const n=this["__v_raw"],r=pe(n),o=pe(e);return t||(Object(i["d"])(e,o)&&j(r,"has",e),j(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function V(e,t=!1){return e=e["__v_raw"],!t&&j(pe(e),"iterate",y),Reflect.get(e,"size",e)}function L(e){e=pe(e);const t=pe(this),n=U(t),r=n.has.call(t,e);return r||(t.add(e),C(t,"add",e,e)),this}function G(e,t){t=pe(t);const n=pe(this),{has:r,get:o}=U(n);let s=r.call(n,e);s||(e=pe(e),s=r.call(n,e));const a=o.call(n,e);return n.set(e,t),s?Object(i["d"])(t,a)&&C(n,"set",e,t,a):C(n,"add",e,t),this}function z(e){const t=pe(this),{has:n,get:r}=U(t);let o=n.call(t,e);o||(e=pe(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&C(t,"delete",e,void 0,s),i}function B(){const e=pe(this),t=0!==e.size,n=void 0,r=e.clear();return t&&C(e,"clear",void 0,void 0,n),r}function N(e,t){return function(n,r){const o=this,s=o["__v_raw"],i=pe(s),a=t?$:e?ge:fe;return!e&&j(i,"iterate",y),s.forEach((e,t)=>n.call(r,a(e),a(t),o))}}function W(e,t,n){return function(...r){const o=this["__v_raw"],s=pe(o),a=Object(i["i"])(s),c="entries"===e||e===Symbol.iterator&&a,u="keys"===e&&a,d=o[e](...r),l=n?$:t?ge:fe;return!t&&j(s,"iterate",u?w:y),{next(){const{value:e,done:t}=d.next();return t?{value:e,done:t}:{value:c?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function q(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Y(){const e={get(e){return A(this,e)},get size(){return V(this)},has:T,add:L,set:G,delete:z,clear:B,forEach:N(!1,!1)},t={get(e){return A(this,e,!1,!0)},get size(){return V(this)},has:T,add:L,set:G,delete:z,clear:B,forEach:N(!1,!0)},n={get(e){return A(this,e,!0)},get size(){return V(this,!0)},has(e){return T.call(this,e,!0)},add:q("add"),set:q("set"),delete:q("delete"),clear:q("clear"),forEach:N(!0,!1)},r={get(e){return A(this,e,!0,!0)},get size(){return V(this,!0)},has(e){return T.call(this,e,!0)},add:q("add"),set:q("set"),delete:q("delete"),clear:q("clear"),forEach:N(!0,!0)},o=["keys","values","entries",Symbol.iterator];return o.forEach(o=>{e[o]=W(o,!1,!1),n[o]=W(o,!0,!1),t[o]=W(o,!1,!0),r[o]=W(o,!0,!0)}),[e,n,t,r]}const[K,Z,H,J]=Y();function Q(e,t){const n=t?e?J:H:e?Z:K;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(Object(i["e"])(n,r)&&r in t?n:t,r,o)}const X={get:Q(!1,!1)},ee={get:Q(!0,!1)};const te=new WeakMap,ne=new WeakMap,re=new WeakMap,oe=new WeakMap;function se(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ie(e){return e["__v_skip"]||!Object.isExtensible(e)?0:se(Object(i["m"])(e))}function ae(e){return de(e)?e:ue(e,!1,D,X,te)}function ce(e){return ue(e,!0,F,ee,re)}function ue(e,t,n,r,o){if(!Object(i["j"])(e))return e;if(e["__v_raw"]&&(!t||!e["__v_isReactive"]))return e;const s=o.get(e);if(s)return s;const a=ie(e);if(0===a)return e;const c=new Proxy(e,2===a?r:n);return o.set(e,c),c}function de(e){return!(!e||!e["__v_isReadonly"])}function le(e){return!(!e||!e["__v_isShallow"])}function pe(e){const t=e&&e["__v_raw"];return t?pe(t):e}function he(e){return Object(i["b"])(e,"__v_skip",!0),e}const fe=e=>Object(i["j"])(e)?ae(e):e,ge=e=>Object(i["j"])(e)?ce(e):e;function me(e){return!(!e||!0!==e.__v_isRef)}var be=n("8bd4");const ve=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),_e=e=>`on${e.charAt(0).toUpperCase()}${e.substring(1,e.length)}`,Oe=()=>{const e={},t=be["ComponentUtil"].PUBLIC_EVENTS.map(e=>_e(ve(e)));t.forEach(t=>e[t]=void 0);const n={props(){const e={};return be["ComponentUtil"].ALL_PROPERTIES.forEach(t=>{var n;this[t]!==be["ComponentUtil"].VUE_OMITTED_PROPERTY&&(t in this||t in this.gridOptions)&&(e[t]=null!==(n=this[t])&&void 0!==n?n:this.gridOptions[t])}),e}},r={modelValue:{handler(e,t){this.gridCreated&&this.api&&e!==t&&(e&&t&&e.length===t.length&&e.every((e,n)=>e===t[n])||be["ComponentUtil"].processOnChange({rowData:e},this.api))},deep:!0},props:{handler(e,t){if(!this.gridCreated||!this.api)return;const n={};Object.entries(e).forEach(([e,r])=>{t[e]!==r&&(n[e]=r)}),be["ComponentUtil"].processOnChange(n,this.api)},deep:!0}};return be["ComponentUtil"].ALL_PROPERTIES.filter(e=>"gridOptions"!=e).forEach(t=>{e[t]={default:be["ComponentUtil"].VUE_OMITTED_PROPERTY}}),[e,n,r]};class ye{static getComponentDefinition(e,t){let n;return n="string"===typeof e?this.searchForComponentInstance(t,e):{extends:Object(s["defineComponent"])(Object.assign({},e))},n||console.error(`Could not find component with name of ${e}. Is it in Vue.components?`),n.extends?(n.extends.setup&&(n.setup=n.extends.setup),n.extends.props=this.addParamsToProps(n.extends.props)):n.props=this.addParamsToProps(n.props),n}static addParamsToProps(e){return!e||Array.isArray(e)&&-1===e.indexOf("params")?e=["params",...e||[]]:"object"!==typeof e||e.params||(e["params"]={type:Object}),e}static createAndMountComponent(e,t,n,r){const o=ye.getComponentDefinition(e,n);if(!o)return;const{vNode:s,destroy:i,el:a}=this.mount(o,{params:Object.freeze(t)},n,r||{});return{componentInstance:s.component.proxy,element:a,destroy:i}}static mount(e,t,n,r){let o=Object(s["createVNode"])(e,t);o.appContext=n.$.appContext,o.appContext.provides=Object.assign(Object.assign(Object.assign({},r),o.appContext.provides?o.appContext.provides:{}),n.$parent.$options.provide?n.$parent.$options.provide:{});let i=document.createElement("div");Object(s["render"])(o,i);const a=()=>{i&&Object(s["render"])(null,i),i=null,o=null};return{vNode:o,destroy:a,el:i}}static searchForComponentInstance(e,t,n=10,r=!1){let o=null,s=e.$parent,i=0;while(!o&&s&&s.$options&&++i<n){const e=s;e.$options&&e.$options.components&&e.$options.components[t]?o=e.$options.components[t]:e[t]&&(o=e[t]),s=s.$parent}if(!o){const n=e.$.appContext.components;n&&n[t]&&(o=n[t])}return o||r?o:(console.error(`Could not find component with name of ${t}. Is it in Vue.components?`),null)}}class we extends be["BaseComponentWrapper"]{constructor(e,t){super(),this.parent=e,we.provides||(we.provides=t)}createWrapper(e){const t=this;class n extends je{init(e){super.init(e)}hasMethod(e){const t=r.getFrameworkComponentInstance();return!!t[e]||null!=t.$.setupState[e]}callMethod(e,t){var n;const o=this.getFrameworkComponentInstance(),s=r.getFrameworkComponentInstance();return s[e]?s[e].apply(o,t):null===(n=s.$.setupState[e])||void 0===n?void 0:n.apply(o,t)}addMethod(e,t){r[e]=t}overrideProcessing(e){return t.parent.autoParamsRefresh&&"refresh"===e}processMethod(e,t){return"refresh"===e&&(this.getFrameworkComponentInstance().params=t[0]),this.hasMethod(e)?this.callMethod(e,t):"refresh"===e}createComponent(n){return t.createComponent(e,n)}}const r=new n;return r}createComponent(e,t){return ye.createAndMountComponent(e,t,this.parent,we.provides)}createMethodProxy(e,t,n){return function(){return e.overrideProcessing(t)?e.processMethod(t,arguments):e.hasMethod(t)?e.callMethod(t,arguments):(n&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}}destroy(){this.parent=null}}class je{getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&"function"===typeof this.getFrameworkComponentInstance().destroy&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(e){var t;const{componentInstance:n,element:r,destroy:o}=this.createComponent(e);this.componentInstance=n,this.unmount=o,this.element=null!==(t=r.firstElementChild)&&void 0!==t?t:r}}class Ce extends be["VanillaFrameworkOverrides"]{constructor(e){super("vue"),this.parent=e}frameworkComponent(e,t){let n=ye.searchForComponentInstance(this.parent,e,10,!0)?e:null;if(!n&&t&&t[e]){const r=t[e];n=ye.searchForComponentInstance(this.parent,r,10,!0)?r:null}return n}isFrameworkComponent(e){return"object"===typeof e}}const Re=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),Ee=new Set([be["Events"].EVENT_GRID_PRE_DESTROYED]),ke="onUpdate:modelValue",Pe="update:modelValue",[xe,Ie,Me]=Oe(),Se=Object(s["defineComponent"])({render(){return Object(s["h"])("div")},props:Object.assign({gridOptions:{type:Object,default:()=>({})},autoParamsRefresh:{type:Boolean,default:()=>!1},componentDependencies:{type:Array,default:()=>[]},plugins:[],modules:{type:Array,default:()=>[]},modelValue:{type:Array,default:void 0,required:!1}},xe),data(){return{api:void 0,gridCreated:!1,isDestroyed:!1,gridReadyFired:!1,emitRowModel:void 0}},computed:Ie,watch:Me,methods:{globalEventListenerFactory(e){return(t,n)=>{if(this.isDestroyed)return;"gridReady"===t&&(this.gridReadyFired=!0);const r=Ee.has(t);r&&!e||!r&&e||this.updateModelIfUsed(t)}},processChanges(e,t,n){if(this.gridCreated){if(this.skipChange(e,t,n))return;const r={[e]:"rowData"===e?Object.isFrozen(t)?t:he(pe(t)):t};be["ComponentUtil"].processOnChange(r,this.api)}},checkForBindingConflicts(){const e=this;(e.rowData||this.gridOptions.rowData)&&e.modelValue&&console.warn("AG Grid: Using both rowData and v-model. rowData will be ignored.")},getRowData(){var e;const t=[];return null===(e=this.api)||void 0===e||e.forEachNode(e=>{t.push(e.data)}),t},updateModelIfUsed(e){this.gridReadyFired&&this.$attrs[ke]&&Re.has(e)&&this.emitRowModel&&this.emitRowModel()},getRowDataBasedOnBindings(){const e=this,t=e.modelValue;return t||(e.rowData?e.rowData:e.gridOptions.rowData)},getProvides(){let e=Object(s["getCurrentInstance"])(),t={};while(e)e&&e.provides&&(t=Object.assign(Object.assign({},t),e.provides)),e=e.parent;return t},skipChange(e,t,n){if(this.gridReadyFired&&"rowData"===e&&this.$attrs[ke]){if(t===n)return!0;if(t&&n){const e=t,r=n;if(e.length===r.length){for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}}}return!1},debounce(e,t){let n;return()=>{const r=function(){e()};window.clearTimeout(n),n=window.setTimeout(r,t)}}},mounted(){this.emitRowModel=this.debounce(()=>{this.$emit(Pe,Object.freeze(this.getRowData()))},20);const e=this.getProvides(),t=new we(this,e),n=he(be["ComponentUtil"].combineAttributesAndGridOptions(pe(this.gridOptions),this));this.checkForBindingConflicts();const r=this.getRowDataBasedOnBindings();r!==be["ComponentUtil"].VUE_OMITTED_PROPERTY&&(n.rowData=r?Object.isFrozen(r)?r:he(pe(r)):r);const o={globalEventListener:this.globalEventListenerFactory().bind(this),globalSyncEventListener:this.globalEventListenerFactory(!0).bind(this),frameworkOverrides:new Ce(this),providedBeanInstances:{frameworkComponentWrapper:t},modules:this.modules};this.api=Object(be["createGrid"])(this.$el,n,o),this.gridCreated=!0},unmounted(){var e;this.gridCreated&&(null===(e=this.api)||void 0===e||e.destroy(),this.isDestroyed=!0)}})}})})); | ||
function r(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return w})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return d})),n.d(t,"h",(function(){return b})),n.d(t,"i",(function(){return u})),n.d(t,"j",(function(){return h})),n.d(t,"k",(function(){return p})),n.d(t,"l",(function(){return r})),n.d(t,"m",(function(){return m}));const o=()=>{},s=Object.assign,i=Object.prototype.hasOwnProperty,a=(e,t)=>i.call(e,t),c=Array.isArray,u=e=>"[object Map]"===g(e),d=e=>"function"===typeof e,l=e=>"string"===typeof e,p=e=>"symbol"===typeof e,h=e=>null!==e&&"object"===typeof e,f=Object.prototype.toString,g=e=>f.call(e),m=e=>g(e).slice(8,-1),b=e=>l(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,v=e=>{const t=Object.create(null);return n=>{const r=t[n];return r||(t[n]=e(n))}},_=/-(\w)/g,O=(v(e=>e.replace(_,(e,t)=>t?t.toUpperCase():"")),/\B([A-Z])/g),y=(v(e=>e.replace(O,"-$1").toLowerCase()),v(e=>e.charAt(0).toUpperCase()+e.slice(1))),w=(v(e=>{const t=e?"on"+y(e):"";return t}),(e,t)=>!Object.is(e,t)),j=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})}}).call(this,n("c8ba"))},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"AgGridVue",(function(){return De})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var s=n("8bbf"),i=n("9ff4");let a;function c(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}let u=!0,d=0;const l=[];function p(){l.push(u),u=!1}function h(){const e=l.pop();u=void 0===e||e}function f(){d++}function g(){d--;while(!d&&b.length)b.shift()()}function m(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&c(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const b=[];function v(e,t,n){f();for(const r of e.keys())if(r._dirtyLevel<t&&e.get(r)===r._trackId){const e=r._dirtyLevel;r._dirtyLevel=t,0===e&&(r._shouldSchedule=!0,r.trigger())}_(e),g()}function _(e){for(const t of e.keys())t.scheduler&&t._shouldSchedule&&(!t._runnings||t.allowRecurse)&&e.get(t)===t._trackId&&(t._shouldSchedule=!1,b.push(t.scheduler))}const O=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},y=new WeakMap,w=Symbol(""),j=Symbol("");function C(e,t,n){if(u&&a){let t=y.get(e);t||y.set(e,t=new Map);let r=t.get(n);r||t.set(n,r=O(()=>t.delete(n))),m(a,r,void 0)}}function R(e,t,n,r,o,s){const a=y.get(e);if(!a)return;let c=[];if("clear"===t)c=[...a.values()];else if("length"===n&&Object(i["f"])(e)){const e=Number(r);a.forEach((t,n)=>{("length"===n||!Object(i["k"])(n)&&n>=e)&&c.push(t)})}else switch(void 0!==n&&c.push(a.get(n)),t){case"add":Object(i["f"])(e)?Object(i["h"])(n)&&c.push(a.get("length")):(c.push(a.get(w)),Object(i["i"])(e)&&c.push(a.get(j)));break;case"delete":Object(i["f"])(e)||(c.push(a.get(w)),Object(i["i"])(e)&&c.push(a.get(j)));break;case"set":Object(i["i"])(e)&&c.push(a.get(w));break}f();for(const i of c)i&&v(i,2,void 0);g()}const k=Object(i["l"])("__proto__,__v_isRef,__isVue"),E=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(i["k"])),P=x();function x(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=he(this);for(let t=0,o=this.length;t<o;t++)C(n,"get",t+"");const r=n[t](...e);return-1===r||!1===r?n[t](...e.map(he)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){p(),f();const n=he(this)[t].apply(this,e);return g(),h(),n}}),e}function I(e){const t=he(this);return C(t,"has",e),t.hasOwnProperty(e)}class M{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,n){const r=this._isReadonly,o=this._shallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(r?o?se:oe:o?re:ne).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=Object(i["f"])(e);if(!r){if(s&&Object(i["e"])(P,t))return Reflect.get(P,t,n);if("hasOwnProperty"===t)return I}const a=Reflect.get(e,t,n);return(Object(i["k"])(t)?E.has(t):k(t))?a:(r||C(e,"get",t),o?a:be(a)?s&&Object(i["h"])(t)?a:a.value:Object(i["j"])(a)?r?ue(a):ce(a):a)}}class S extends M{constructor(e=!1){super(!1,e)}set(e,t,n,r){let o=e[t];if(!this._shallow){const t=le(o);if(pe(n)||le(n)||(o=he(o),n=he(n)),!Object(i["f"])(e)&&be(o)&&!be(n))return!t&&(o.value=n,!0)}const s=Object(i["f"])(e)&&Object(i["h"])(t)?Number(t)<e.length:Object(i["e"])(e,t),a=Reflect.set(e,t,n,r);return e===he(r)&&(s?Object(i["d"])(n,o)&&R(e,"set",t,n,o):R(e,"add",t,n)),a}deleteProperty(e,t){const n=Object(i["e"])(e,t),r=e[t],o=Reflect.deleteProperty(e,t);return o&&n&&R(e,"delete",t,void 0,r),o}has(e,t){const n=Reflect.has(e,t);return Object(i["k"])(t)&&E.has(t)||C(e,"has",t),n}ownKeys(e){return C(e,"iterate",Object(i["f"])(e)?"length":w),Reflect.ownKeys(e)}}class D extends M{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const F=new S,$=new D,U=e=>e,A=e=>Reflect.getPrototypeOf(e);function T(e,t,n=!1,r=!1){e=e["__v_raw"];const o=he(e),s=he(t);n||(Object(i["d"])(t,s)&&C(o,"get",t),C(o,"get",s));const{has:a}=A(o),c=r?U:n?me:ge;return a.call(o,t)?c(e.get(t)):a.call(o,s)?c(e.get(s)):void(e!==o&&e.get(t))}function V(e,t=!1){const n=this["__v_raw"],r=he(n),o=he(e);return t||(Object(i["d"])(e,o)&&C(r,"has",e),C(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function L(e,t=!1){return e=e["__v_raw"],!t&&C(he(e),"iterate",w),Reflect.get(e,"size",e)}function G(e){e=he(e);const t=he(this),n=A(t),r=n.has.call(t,e);return r||(t.add(e),R(t,"add",e,e)),this}function z(e,t){t=he(t);const n=he(this),{has:r,get:o}=A(n);let s=r.call(n,e);s||(e=he(e),s=r.call(n,e));const a=o.call(n,e);return n.set(e,t),s?Object(i["d"])(t,a)&&R(n,"set",e,t,a):R(n,"add",e,t),this}function B(e){const t=he(this),{has:n,get:r}=A(t);let o=n.call(t,e);o||(e=he(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&R(t,"delete",e,void 0,s),i}function N(){const e=he(this),t=0!==e.size,n=void 0,r=e.clear();return t&&R(e,"clear",void 0,void 0,n),r}function W(e,t){return function(n,r){const o=this,s=o["__v_raw"],i=he(s),a=t?U:e?me:ge;return!e&&C(i,"iterate",w),s.forEach((e,t)=>n.call(r,a(e),a(t),o))}}function q(e,t,n){return function(...r){const o=this["__v_raw"],s=he(o),a=Object(i["i"])(s),c="entries"===e||e===Symbol.iterator&&a,u="keys"===e&&a,d=o[e](...r),l=n?U:t?me:ge;return!t&&C(s,"iterate",u?j:w),{next(){const{value:e,done:t}=d.next();return t?{value:e,done:t}:{value:c?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function Y(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function K(){const e={get(e){return T(this,e)},get size(){return L(this)},has:V,add:G,set:z,delete:B,clear:N,forEach:W(!1,!1)},t={get(e){return T(this,e,!1,!0)},get size(){return L(this)},has:V,add:G,set:z,delete:B,clear:N,forEach:W(!1,!0)},n={get(e){return T(this,e,!0)},get size(){return L(this,!0)},has(e){return V.call(this,e,!0)},add:Y("add"),set:Y("set"),delete:Y("delete"),clear:Y("clear"),forEach:W(!0,!1)},r={get(e){return T(this,e,!0,!0)},get size(){return L(this,!0)},has(e){return V.call(this,e,!0)},add:Y("add"),set:Y("set"),delete:Y("delete"),clear:Y("clear"),forEach:W(!0,!0)},o=["keys","values","entries",Symbol.iterator];return o.forEach(o=>{e[o]=q(o,!1,!1),n[o]=q(o,!0,!1),t[o]=q(o,!1,!0),r[o]=q(o,!0,!0)}),[e,n,t,r]}const[Z,H,J,Q]=K();function X(e,t){const n=t?e?Q:J:e?H:Z;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(Object(i["e"])(n,r)&&r in t?n:t,r,o)}const ee={get:X(!1,!1)},te={get:X(!0,!1)};const ne=new WeakMap,re=new WeakMap,oe=new WeakMap,se=new WeakMap;function ie(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ae(e){return e["__v_skip"]||!Object.isExtensible(e)?0:ie(Object(i["m"])(e))}function ce(e){return le(e)?e:de(e,!1,F,ee,ne)}function ue(e){return de(e,!0,$,te,oe)}function de(e,t,n,r,o){if(!Object(i["j"])(e))return e;if(e["__v_raw"]&&(!t||!e["__v_isReactive"]))return e;const s=o.get(e);if(s)return s;const a=ae(e);if(0===a)return e;const c=new Proxy(e,2===a?r:n);return o.set(e,c),c}function le(e){return!(!e||!e["__v_isReadonly"])}function pe(e){return!(!e||!e["__v_isShallow"])}function he(e){const t=e&&e["__v_raw"];return t?he(t):e}function fe(e){return Object(i["b"])(e,"__v_skip",!0),e}const ge=e=>Object(i["j"])(e)?ce(e):e,me=e=>Object(i["j"])(e)?ue(e):e;function be(e){return!(!e||!0!==e.__v_isRef)}var ve=n("8bd4");const _e=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Oe=e=>`on${e.charAt(0).toUpperCase()}${e.substring(1,e.length)}`,ye=()=>{const e={},t=ve["ComponentUtil"].PUBLIC_EVENTS.map(e=>Oe(_e(e)));t.forEach(t=>e[t]=void 0);const n={props(){const e={};return ve["ComponentUtil"].ALL_PROPERTIES.forEach(t=>{var n;this[t]!==ve["ComponentUtil"].VUE_OMITTED_PROPERTY&&(t in this||t in this.gridOptions)&&(e[t]=null!==(n=this[t])&&void 0!==n?n:this.gridOptions[t])}),e}},r={modelValue:{handler(e,t){this.gridCreated&&this.api&&e!==t&&(e&&t&&e.length===t.length&&e.every((e,n)=>e===t[n])||ve["ComponentUtil"].processOnChange({rowData:e},this.api))},deep:!0},props:{handler(e,t){if(!this.gridCreated||!this.api)return;const n={};Object.entries(e).forEach(([e,r])=>{t[e]!==r&&(n[e]=r)}),ve["ComponentUtil"].processOnChange(n,this.api)},deep:!0}};return ve["ComponentUtil"].ALL_PROPERTIES.filter(e=>"gridOptions"!=e).forEach(t=>{e[t]={default:ve["ComponentUtil"].VUE_OMITTED_PROPERTY}}),[e,n,r]};class we{static getComponentDefinition(e,t){let n;return n="string"===typeof e?this.searchForComponentInstance(t,e):{extends:Object(s["defineComponent"])(Object.assign({},e))},n||console.error(`Could not find component with name of ${e}. Is it in Vue.components?`),n.extends?(n.extends.setup&&(n.setup=n.extends.setup),n.extends.props=this.addParamsToProps(n.extends.props)):n.props=this.addParamsToProps(n.props),n}static addParamsToProps(e){return!e||Array.isArray(e)&&-1===e.indexOf("params")?e=["params",...e||[]]:"object"!==typeof e||e.params||(e["params"]={type:Object}),e}static createAndMountComponent(e,t,n,r){const o=we.getComponentDefinition(e,n);if(!o)return;const{vNode:s,destroy:i,el:a}=this.mount(o,{params:Object.freeze(t)},n,r||{});return{componentInstance:s.component.proxy,element:a,destroy:i}}static mount(e,t,n,r){let o=Object(s["createVNode"])(e,t);o.appContext=n.$.appContext,o.appContext.provides=Object.assign(Object.assign(Object.assign({},r),o.appContext.provides?o.appContext.provides:{}),n.$parent.$options.provide?n.$parent.$options.provide:{});let i=document.createElement("div");Object(s["render"])(o,i);const a=()=>{i&&Object(s["render"])(null,i),i=null,o=null};return{vNode:o,destroy:a,el:i}}static searchForComponentInstance(e,t,n=10,r=!1){let o=null,s=e.$parent,i=0;while(!o&&s&&s.$options&&++i<n){const e=s;e.$options&&e.$options.components&&e.$options.components[t]?o=e.$options.components[t]:e[t]&&(o=e[t]),s=s.$parent}if(!o){const n=e.$.appContext.components;n&&n[t]&&(o=n[t])}return o||r?o:(console.error(`Could not find component with name of ${t}. Is it in Vue.components?`),null)}}class je extends ve["BaseComponentWrapper"]{constructor(e,t){super(),this.parent=e,je.provides||(je.provides=t)}createWrapper(e){const t=this;class n extends Ce{init(e){super.init(e)}hasMethod(e){const t=r.getFrameworkComponentInstance();return!!t[e]||null!=t.$.setupState[e]}callMethod(e,t){var n;const o=this.getFrameworkComponentInstance(),s=r.getFrameworkComponentInstance();return s[e]?s[e].apply(o,t):null===(n=s.$.setupState[e])||void 0===n?void 0:n.apply(o,t)}addMethod(e,t){r[e]=t}overrideProcessing(e){return t.parent.autoParamsRefresh&&"refresh"===e}processMethod(e,t){return"refresh"===e&&(this.getFrameworkComponentInstance().params=t[0]),this.hasMethod(e)?this.callMethod(e,t):"refresh"===e}createComponent(n){return t.createComponent(e,n)}}const r=new n;return r}createComponent(e,t){return we.createAndMountComponent(e,t,this.parent,je.provides)}createMethodProxy(e,t,n){return function(){return e.overrideProcessing(t)?e.processMethod(t,arguments):e.hasMethod(t)?e.callMethod(t,arguments):(n&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}}destroy(){this.parent=null}}class Ce{getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&"function"===typeof this.getFrameworkComponentInstance().destroy&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(e){var t;const{componentInstance:n,element:r,destroy:o}=this.createComponent(e);this.componentInstance=n,this.unmount=o,this.element=null!==(t=r.firstElementChild)&&void 0!==t?t:r}}class Re extends ve["VanillaFrameworkOverrides"]{constructor(e){super("vue"),this.parent=e}frameworkComponent(e,t){let n=we.searchForComponentInstance(this.parent,e,10,!0)?e:null;if(!n&&t&&t[e]){const r=t[e];n=we.searchForComponentInstance(this.parent,r,10,!0)?r:null}return n}isFrameworkComponent(e){return"object"===typeof e}}const ke=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),Ee=new Set([ve["Events"].EVENT_GRID_PRE_DESTROYED]),Pe="onUpdate:modelValue",xe="update:modelValue",[Ie,Me,Se]=ye(),De=Object(s["defineComponent"])({render(){return Object(s["h"])("div")},props:Object.assign({gridOptions:{type:Object,default:()=>({})},autoParamsRefresh:{type:Boolean,default:()=>!1},componentDependencies:{type:Array,default:()=>[]},plugins:[],modules:{type:Array,default:()=>[]},modelValue:{type:Array,default:void 0,required:!1}},Ie),data(){return{api:void 0,gridCreated:!1,isDestroyed:!1,gridReadyFired:!1,emitRowModel:void 0}},computed:Me,watch:Se,methods:{globalEventListenerFactory(e){return(t,n)=>{if(this.isDestroyed)return;"gridReady"===t&&(this.gridReadyFired=!0);const r=Ee.has(t);r&&!e||!r&&e||this.updateModelIfUsed(t)}},processChanges(e,t,n){if(this.gridCreated){if(this.skipChange(e,t,n))return;const r={[e]:"rowData"===e?Object.isFrozen(t)?t:fe(he(t)):t};ve["ComponentUtil"].processOnChange(r,this.api)}},checkForBindingConflicts(){const e=this;(e.rowData||this.gridOptions.rowData)&&e.modelValue&&console.warn("AG Grid: Using both rowData and v-model. rowData will be ignored.")},getRowData(){var e;const t=[];return null===(e=this.api)||void 0===e||e.forEachNode(e=>{t.push(e.data)}),t},updateModelIfUsed(e){this.gridReadyFired&&this.$attrs[Pe]&&ke.has(e)&&this.emitRowModel&&this.emitRowModel()},getRowDataBasedOnBindings(){const e=this,t=e.modelValue;return t||(e.rowData?e.rowData:e.gridOptions.rowData)},getProvides(){let e=Object(s["getCurrentInstance"])(),t={};while(e)e&&e.provides&&(t=Object.assign(Object.assign({},t),e.provides)),e=e.parent;return t},skipChange(e,t,n){if(this.gridReadyFired&&"rowData"===e&&this.$attrs[Pe]){if(t===n)return!0;if(t&&n){const e=t,r=n;if(e.length===r.length){for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}}}return!1},debounce(e,t){let n;return()=>{const r=function(){e()};window.clearTimeout(n),n=window.setTimeout(r,t)}}},mounted(){this.emitRowModel=this.debounce(()=>{this.$emit(xe,Object.freeze(this.getRowData()))},20);const e=this.getProvides(),t=new je(this,e),n=fe(ve["ComponentUtil"].combineAttributesAndGridOptions(he(this.gridOptions),this));this.checkForBindingConflicts();const r=this.getRowDataBasedOnBindings();r!==ve["ComponentUtil"].VUE_OMITTED_PROPERTY&&(n.rowData=r?Object.isFrozen(r)?r:fe(he(r)):r);const o={globalEventListener:this.globalEventListenerFactory().bind(this),globalSyncEventListener:this.globalEventListenerFactory(!0).bind(this),frameworkOverrides:new Re(this),providedBeanInstances:{frameworkComponentWrapper:t},modules:this.modules};this.api=Object(ve["createGrid"])(this.$el,n,o),this.gridCreated=!0},unmounted(){var e;this.gridCreated&&(null===(e=this.api)||void 0===e||e.destroy(),this.isDestroyed=!0)}})}})})); | ||
//# sourceMappingURL=ag-grid-vue3.umd.min.js.map |
{ | ||
"name": "ag-grid-vue3", | ||
"description": "AG Grid Vue 3 Component", | ||
"version": "31.0.2", | ||
"version": "31.0.3", | ||
"author": "Sean Landsman <sean@thelandsmans.com>", | ||
@@ -36,6 +36,6 @@ "license": "MIT", | ||
"dependencies": { | ||
"ag-grid-community": "~31.0.2" | ||
"ag-grid-community": "~31.0.3" | ||
}, | ||
"devDependencies": { | ||
"ag-grid-community": "~31.0.2", | ||
"ag-grid-community": "~31.0.3", | ||
"vue": "^3.0.0", | ||
@@ -42,0 +42,0 @@ "@types/jest": "^24.0.19", |
Sorry, the diff of this file is too big to display
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 not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
561722
5547
Updatedag-grid-community@~31.0.3