ag-grid-vue3
Advanced tools
Comparing version 29.0.0 to 29.1.0
@@ -1,2 +0,2 @@ | ||
(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){function r(e,t){const n=Object.create(null),r=e.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return _})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return j})),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 f})),n.d(t,"k",(function(){return p})),n.d(t,"l",(function(){return r})),n.d(t,"m",(function(){return C})),n.d(t,"n",(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,f=e=>null!==e&&"object"===typeof e,h=Object.prototype.toString,g=e=>h.call(e),m=e=>g(e).slice(8,-1),b=e=>l(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,w=e=>{const t=Object.create(null);return n=>{const r=t[n];return r||(t[n]=e(n))}},O=/-(\w)/g,y=(w(e=>e.replace(O,(e,t)=>t?t.toUpperCase():"")),/\B([A-Z])/g),v=(w(e=>e.replace(y,"-$1").toLowerCase()),w(e=>e.charAt(0).toUpperCase()+e.slice(1))),j=(w(e=>e?"on"+v(e):""),(e,t)=>!Object.is(e,t)),_=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},C=e=>{const t=parseFloat(e);return isNaN(t)?e:t}}).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");const a=e=>{const t=new Set(e);return t.w=0,t.n=0,t},c=e=>(e.w&p)>0,u=e=>(e.n&p)>0,d=new WeakMap;let l=0,p=1;const f=30;let h;const g=Symbol(""),m=Symbol("");let b=!0;const w=[];function O(){w.push(b),b=!1}function y(){const e=w.pop();b=void 0===e||e}function v(e,t,n){if(b&&h){let t=d.get(e);t||d.set(e,t=new Map);let r=t.get(n);r||t.set(n,r=a());const o=void 0;j(r,o)}}function j(e,t){let n=!1;l<=f?u(e)||(e.n|=p,n=!c(e)):n=!e.has(h),n&&(e.add(h),h.deps.push(e))}function _(e,t,n,r,o,s){const c=d.get(e);if(!c)return;let u=[];if("clear"===t)u=[...c.values()];else if("length"===n&&Object(i["f"])(e)){const e=Object(i["m"])(r);c.forEach((t,n)=>{("length"===n||n>=e)&&u.push(t)})}else switch(void 0!==n&&u.push(c.get(n)),t){case"add":Object(i["f"])(e)?Object(i["h"])(n)&&u.push(c.get("length")):(u.push(c.get(g)),Object(i["i"])(e)&&u.push(c.get(m)));break;case"delete":Object(i["f"])(e)||(u.push(c.get(g)),Object(i["i"])(e)&&u.push(c.get(m)));break;case"set":Object(i["i"])(e)&&u.push(c.get(g));break}if(1===u.length)u[0]&&C(u[0]);else{const e=[];for(const t of u)t&&e.push(...t);C(a(e))}}function C(e,t){const n=Object(i["f"])(e)?e:[...e];for(const r of n)r.computed&&x(r,t);for(const r of n)r.computed||x(r,t)}function x(e,t){(e!==h||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const k=Object(i["l"])("__proto__,__v_isRef,__isVue"),R=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(i["k"])),M=$(),P=$(!0),I=F();function F(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=be(this);for(let t=0,o=this.length;t<o;t++)v(n,"get",t+"");const r=n[t](...e);return-1===r||!1===r?n[t](...e.map(be)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){O();const n=be(this)[t].apply(this,e);return y(),n}}),e}function $(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_isShallow"===r)return t;if("__v_raw"===r&&o===(e?t?ue:ce:t?ae:ie).get(n))return n;const s=Object(i["f"])(n);if(!e&&s&&Object(i["e"])(I,r))return Reflect.get(I,r,o);const a=Reflect.get(n,r,o);return(Object(i["k"])(r)?R.has(r):k(r))?a:(e||v(n,"get",r),t?a:ve(a)?s&&Object(i["h"])(r)?a:a.value:Object(i["j"])(a)?e?fe(a):pe(a):a)}}const D=E();function E(e=!1){return function(t,n,r,o){let s=t[n];if(ge(s)&&ve(s)&&!ve(r))return!1;if(!e&&(me(r)||ge(r)||(s=be(s),r=be(r)),!Object(i["f"])(t)&&ve(s)&&!ve(r)))return s.value=r,!0;const a=Object(i["f"])(t)&&Object(i["h"])(n)?Number(n)<t.length:Object(i["e"])(t,n),c=Reflect.set(t,n,r,o);return t===be(o)&&(a?Object(i["d"])(r,s)&&_(t,"set",n,r,s):_(t,"add",n,r)),c}}function S(e,t){const n=Object(i["e"])(e,t),r=e[t],o=Reflect.deleteProperty(e,t);return o&&n&&_(e,"delete",t,void 0,r),o}function A(e,t){const n=Reflect.has(e,t);return Object(i["k"])(t)&&R.has(t)||v(e,"has",t),n}function V(e){return v(e,"iterate",Object(i["f"])(e)?"length":g),Reflect.ownKeys(e)}const U={get:M,set:D,deleteProperty:S,has:A,ownKeys:V},G={get:P,set(e,t){return!0},deleteProperty(e,t){return!0}},z=e=>e,B=e=>Reflect.getPrototypeOf(e);function N(e,t,n=!1,r=!1){e=e["__v_raw"];const o=be(e),s=be(t);n||(t!==s&&v(o,"get",t),v(o,"get",s));const{has:i}=B(o),a=r?z:n?ye:Oe;return i.call(o,t)?a(e.get(t)):i.call(o,s)?a(e.get(s)):void(e!==o&&e.get(t))}function T(e,t=!1){const n=this["__v_raw"],r=be(n),o=be(e);return t||(e!==o&&v(r,"has",e),v(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function W(e,t=!1){return e=e["__v_raw"],!t&&v(be(e),"iterate",g),Reflect.get(e,"size",e)}function L(e){e=be(e);const t=be(this),n=B(t),r=n.has.call(t,e);return r||(t.add(e),_(t,"add",e,e)),this}function q(e,t){t=be(t);const n=be(this),{has:r,get:o}=B(n);let s=r.call(n,e);s||(e=be(e),s=r.call(n,e));const a=o.call(n,e);return n.set(e,t),s?Object(i["d"])(t,a)&&_(n,"set",e,t,a):_(n,"add",e,t),this}function K(e){const t=be(this),{has:n,get:r}=B(t);let o=n.call(t,e);o||(e=be(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&_(t,"delete",e,void 0,s),i}function Z(){const e=be(this),t=0!==e.size,n=void 0,r=e.clear();return t&&_(e,"clear",void 0,void 0,n),r}function H(e,t){return function(n,r){const o=this,s=o["__v_raw"],i=be(s),a=t?z:e?ye:Oe;return!e&&v(i,"iterate",g),s.forEach((e,t)=>n.call(r,a(e),a(t),o))}}function J(e,t,n){return function(...r){const o=this["__v_raw"],s=be(o),a=Object(i["i"])(s),c="entries"===e||e===Symbol.iterator&&a,u="keys"===e&&a,d=o[e](...r),l=n?z:t?ye:Oe;return!t&&v(s,"iterate",u?m:g),{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&&this}}function X(){const e={get(e){return N(this,e)},get size(){return W(this)},has:T,add:L,set:q,delete:K,clear:Z,forEach:H(!1,!1)},t={get(e){return N(this,e,!1,!0)},get size(){return W(this)},has:T,add:L,set:q,delete:K,clear:Z,forEach:H(!1,!0)},n={get(e){return N(this,e,!0)},get size(){return W(this,!0)},has(e){return T.call(this,e,!0)},add:Q("add"),set:Q("set"),delete:Q("delete"),clear:Q("clear"),forEach:H(!0,!1)},r={get(e){return N(this,e,!0,!0)},get size(){return W(this,!0)},has(e){return T.call(this,e,!0)},add:Q("add"),set:Q("set"),delete:Q("delete"),clear:Q("clear"),forEach:H(!0,!0)},o=["keys","values","entries",Symbol.iterator];return o.forEach(o=>{e[o]=J(o,!1,!1),n[o]=J(o,!0,!1),t[o]=J(o,!1,!0),r[o]=J(o,!0,!0)}),[e,n,t,r]}const[Y,ee,te,ne]=X();function re(e,t){const n=t?e?ne:te:e?ee:Y;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 oe={get:re(!1,!1)},se={get:re(!0,!1)};const ie=new WeakMap,ae=new WeakMap,ce=new WeakMap,ue=new WeakMap;function de(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function le(e){return e["__v_skip"]||!Object.isExtensible(e)?0:de(Object(i["n"])(e))}function pe(e){return ge(e)?e:he(e,!1,U,oe,ie)}function fe(e){return he(e,!0,G,se,ce)}function he(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=le(e);if(0===a)return e;const c=new Proxy(e,2===a?r:n);return o.set(e,c),c}function ge(e){return!(!e||!e["__v_isReadonly"])}function me(e){return!(!e||!e["__v_isShallow"])}function be(e){const t=e&&e["__v_raw"];return t?be(t):e}function we(e){return Object(i["b"])(e,"__v_skip",!0),e}const Oe=e=>Object(i["j"])(e)?pe(e):e,ye=e=>Object(i["j"])(e)?fe(e):e;function ve(e){return!(!e||!0!==e.__v_isRef)}var je=n("8bd4");class _e{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=_e.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;o=e.$options&&e.$options.components?e.$options.components[t]:null,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 Ce extends je["BaseComponentWrapper"]{constructor(e,t){super(),this.parent=e,Ce.provides||(Ce.provides=t)}createWrapper(e){const t=this;class n extends xe{init(e){super.init(e)}hasMethod(e){return null!=r.getFrameworkComponentInstance()[e]}callMethod(e,t){const n=this.getFrameworkComponentInstance(),o=r.getFrameworkComponentInstance();return o[e].apply(n,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 _e.createAndMountComponent(e,t,this.parent,Ce.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 xe{getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&"function"===typeof this.getFrameworkComponentInstance().destroy&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(e){const{componentInstance:t,element:n,destroy:r}=this.createComponent(e);this.componentInstance=t,this.unmount=r,this.element=n.firstElementChild}}const ke=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Re=e=>`on${e.charAt(0).toUpperCase()}${e.substring(1,e.length)}`,Me=()=>{const e={},t=je["ComponentUtil"].PUBLIC_EVENTS.map(e=>Re(ke(e)));t.forEach(t=>e[t]=void 0);const n={};return je["ComponentUtil"].ALL_PROPERTIES.filter(e=>"gridOptions"!=e).forEach(t=>{e[t]={},n[t]={handler(e,n){this.processChanges(t,e,n)},deep:"popupParent"!==t&&"context"!==t}}),[e,n]};class Pe extends je["VanillaFrameworkOverrides"]{constructor(e){super(),this.parent=e}frameworkComponent(e,t){let n=_e.searchForComponentInstance(this.parent,e,10,!0)?e:null;if(!n&&t&&t[e]){const r=t[e];n=_e.searchForComponentInstance(this.parent,r,10,!0)?r:null}return n}isFrameworkComponent(e){return"object"===typeof e}}const Ie=["rowDataChanged","rowDataUpdated","cellValueChanged","rowValueChanged"],Fe="onUpdate:modelValue",$e="update:modelValue",[De,Ee]=Me(),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}},De),data(){return{gridCreated:!1,isDestroyed:!1,gridReadyFired:!1,emitRowModel:void 0}},watch:Object.assign({modelValue:{handler(e,t){this.processChanges("rowData",e,t)},deep:!0}},Ee),methods:{globalEventListener(e,t){this.isDestroyed||("gridReady"===e&&(this.gridReadyFired=!0),this.updateModelIfUsed(e))},processChanges(e,t,n){if(this.gridCreated){if(this.skipChange(e,t,n))return;const r={};r[e]={currentValue:"rowData"===e?Object.isFrozen(t)?t:we(be(t)):t,previousValue:n},je["ComponentUtil"].processOnChange(r,this.gridOptions.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(){const e=[];return this.gridOptions.api.forEachNode(t=>{e.push(t.data)}),e},updateModelIfUsed(e){this.gridReadyFired&&this.$attrs[Fe]&&-1!==Ie.indexOf(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[Fe]){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($e,Object.freeze(this.getRowData()))},20);const e=this.getProvides(),t=new Ce(this,e),n=we(je["ComponentUtil"].copyAttributesToGridOptions(be(this.gridOptions),this,!0));this.checkForBindingConflicts();const r=this.getRowDataBasedOnBindings();n.rowData=r?Object.isFrozen(r)?r:we(be(r)):r;const o={globalEventListener:this.globalEventListener.bind(this),frameworkOverrides:new Pe(this),providedBeanInstances:{frameworkComponentWrapper:t},modules:this.modules};new je["Grid"](this.$el,n,o),this.gridCreated=!0},unmounted(){this.gridCreated&&(this.gridOptions.api&&this.gridOptions.api.destroy(),this.isDestroyed=!0)}})}})})); | ||
(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){function r(e,t){const n=Object.create(null),r=e.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return _})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return j})),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 f})),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,f=e=>null!==e&&"object"===typeof e,h=Object.prototype.toString,g=e=>h.call(e),m=e=>g(e).slice(8,-1),b=e=>l(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,w=e=>{const t=Object.create(null);return n=>{const r=t[n];return r||(t[n]=e(n))}},O=/-(\w)/g,y=(w(e=>e.replace(O,(e,t)=>t?t.toUpperCase():"")),/\B([A-Z])/g),v=(w(e=>e.replace(y,"-$1").toLowerCase()),w(e=>e.charAt(0).toUpperCase()+e.slice(1))),j=(w(e=>e?"on"+v(e):""),(e,t)=>!Object.is(e,t)),_=(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 Ae})),"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");const a=e=>{const t=new Set(e);return t.w=0,t.n=0,t},c=e=>(e.w&p)>0,u=e=>(e.n&p)>0,d=new WeakMap;let l=0,p=1;const f=30;let h;const g=Symbol(""),m=Symbol("");let b=!0;const w=[];function O(){w.push(b),b=!1}function y(){const e=w.pop();b=void 0===e||e}function v(e,t,n){if(b&&h){let t=d.get(e);t||d.set(e,t=new Map);let r=t.get(n);r||t.set(n,r=a());const o=void 0;j(r,o)}}function j(e,t){let n=!1;l<=f?u(e)||(e.n|=p,n=!c(e)):n=!e.has(h),n&&(e.add(h),h.deps.push(e))}function _(e,t,n,r,o,s){const c=d.get(e);if(!c)return;let u=[];if("clear"===t)u=[...c.values()];else if("length"===n&&Object(i["f"])(e)){const e=Number(r);c.forEach((t,n)=>{("length"===n||n>=e)&&u.push(t)})}else switch(void 0!==n&&u.push(c.get(n)),t){case"add":Object(i["f"])(e)?Object(i["h"])(n)&&u.push(c.get("length")):(u.push(c.get(g)),Object(i["i"])(e)&&u.push(c.get(m)));break;case"delete":Object(i["f"])(e)||(u.push(c.get(g)),Object(i["i"])(e)&&u.push(c.get(m)));break;case"set":Object(i["i"])(e)&&u.push(c.get(g));break}if(1===u.length)u[0]&&C(u[0]);else{const e=[];for(const t of u)t&&e.push(...t);C(a(e))}}function C(e,t){const n=Object(i["f"])(e)?e:[...e];for(const r of n)r.computed&&x(r,t);for(const r of n)r.computed||x(r,t)}function x(e,t){(e!==h||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const k=Object(i["l"])("__proto__,__v_isRef,__isVue"),R=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(i["k"])),P=D(),M=D(!0),I=F();function F(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=we(this);for(let t=0,o=this.length;t<o;t++)v(n,"get",t+"");const r=n[t](...e);return-1===r||!1===r?n[t](...e.map(we)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){O();const n=we(this)[t].apply(this,e);return y(),n}}),e}function $(e){const t=we(this);return v(t,"has",e),t.hasOwnProperty(e)}function D(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_isShallow"===r)return t;if("__v_raw"===r&&o===(e?t?de:ue:t?ce:ae).get(n))return n;const s=Object(i["f"])(n);if(!e){if(s&&Object(i["e"])(I,r))return Reflect.get(I,r,o);if("hasOwnProperty"===r)return $}const a=Reflect.get(n,r,o);return(Object(i["k"])(r)?R.has(r):k(r))?a:(e||v(n,"get",r),t?a:je(a)?s&&Object(i["h"])(r)?a:a.value:Object(i["j"])(a)?e?he(a):fe(a):a)}}const E=S();function S(e=!1){return function(t,n,r,o){let s=t[n];if(me(s)&&je(s)&&!je(r))return!1;if(!e&&(be(r)||me(r)||(s=we(s),r=we(r)),!Object(i["f"])(t)&&je(s)&&!je(r)))return s.value=r,!0;const a=Object(i["f"])(t)&&Object(i["h"])(n)?Number(n)<t.length:Object(i["e"])(t,n),c=Reflect.set(t,n,r,o);return t===we(o)&&(a?Object(i["d"])(r,s)&&_(t,"set",n,r,s):_(t,"add",n,r)),c}}function A(e,t){const n=Object(i["e"])(e,t),r=e[t],o=Reflect.deleteProperty(e,t);return o&&n&&_(e,"delete",t,void 0,r),o}function V(e,t){const n=Reflect.has(e,t);return Object(i["k"])(t)&&R.has(t)||v(e,"has",t),n}function U(e){return v(e,"iterate",Object(i["f"])(e)?"length":g),Reflect.ownKeys(e)}const G={get:P,set:E,deleteProperty:A,has:V,ownKeys:U},z={get:M,set(e,t){return!0},deleteProperty(e,t){return!0}},B=e=>e,N=e=>Reflect.getPrototypeOf(e);function T(e,t,n=!1,r=!1){e=e["__v_raw"];const o=we(e),s=we(t);n||(t!==s&&v(o,"get",t),v(o,"get",s));const{has:i}=N(o),a=r?B:n?ve:ye;return i.call(o,t)?a(e.get(t)):i.call(o,s)?a(e.get(s)):void(e!==o&&e.get(t))}function W(e,t=!1){const n=this["__v_raw"],r=we(n),o=we(e);return t||(e!==o&&v(r,"has",e),v(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&&v(we(e),"iterate",g),Reflect.get(e,"size",e)}function q(e){e=we(e);const t=we(this),n=N(t),r=n.has.call(t,e);return r||(t.add(e),_(t,"add",e,e)),this}function K(e,t){t=we(t);const n=we(this),{has:r,get:o}=N(n);let s=r.call(n,e);s||(e=we(e),s=r.call(n,e));const a=o.call(n,e);return n.set(e,t),s?Object(i["d"])(t,a)&&_(n,"set",e,t,a):_(n,"add",e,t),this}function Z(e){const t=we(this),{has:n,get:r}=N(t);let o=n.call(t,e);o||(e=we(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&_(t,"delete",e,void 0,s),i}function H(){const e=we(this),t=0!==e.size,n=void 0,r=e.clear();return t&&_(e,"clear",void 0,void 0,n),r}function J(e,t){return function(n,r){const o=this,s=o["__v_raw"],i=we(s),a=t?B:e?ve:ye;return!e&&v(i,"iterate",g),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=we(o),a=Object(i["i"])(s),c="entries"===e||e===Symbol.iterator&&a,u="keys"===e&&a,d=o[e](...r),l=n?B:t?ve:ye;return!t&&v(s,"iterate",u?m:g),{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 X(e){return function(...t){return"delete"!==e&&this}}function Y(){const e={get(e){return T(this,e)},get size(){return L(this)},has:W,add:q,set:K,delete:Z,clear:H,forEach:J(!1,!1)},t={get(e){return T(this,e,!1,!0)},get size(){return L(this)},has:W,add:q,set:K,delete:Z,clear:H,forEach:J(!1,!0)},n={get(e){return T(this,e,!0)},get size(){return L(this,!0)},has(e){return W.call(this,e,!0)},add:X("add"),set:X("set"),delete:X("delete"),clear:X("clear"),forEach:J(!0,!1)},r={get(e){return T(this,e,!0,!0)},get size(){return L(this,!0)},has(e){return W.call(this,e,!0)},add:X("add"),set:X("set"),delete:X("delete"),clear:X("clear"),forEach:J(!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[ee,te,ne,re]=Y();function oe(e,t){const n=t?e?re:ne:e?te:ee;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 se={get:oe(!1,!1)},ie={get:oe(!0,!1)};const ae=new WeakMap,ce=new WeakMap,ue=new WeakMap,de=new WeakMap;function le(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function pe(e){return e["__v_skip"]||!Object.isExtensible(e)?0:le(Object(i["m"])(e))}function fe(e){return me(e)?e:ge(e,!1,G,se,ae)}function he(e){return ge(e,!0,z,ie,ue)}function ge(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=pe(e);if(0===a)return e;const c=new Proxy(e,2===a?r:n);return o.set(e,c),c}function me(e){return!(!e||!e["__v_isReadonly"])}function be(e){return!(!e||!e["__v_isShallow"])}function we(e){const t=e&&e["__v_raw"];return t?we(t):e}function Oe(e){return Object(i["b"])(e,"__v_skip",!0),e}const ye=e=>Object(i["j"])(e)?fe(e):e,ve=e=>Object(i["j"])(e)?he(e):e;function je(e){return!(!e||!0!==e.__v_isRef)}var _e=n("8bd4");class Ce{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=Ce.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;o=e.$options&&e.$options.components?e.$options.components[t]:null,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 xe extends _e["BaseComponentWrapper"]{constructor(e,t){super(),this.parent=e,xe.provides||(xe.provides=t)}createWrapper(e){const t=this;class n extends ke{init(e){super.init(e)}hasMethod(e){return null!=r.getFrameworkComponentInstance()[e]}callMethod(e,t){const n=this.getFrameworkComponentInstance(),o=r.getFrameworkComponentInstance();return o[e].apply(n,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 Ce.createAndMountComponent(e,t,this.parent,xe.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 ke{getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&"function"===typeof this.getFrameworkComponentInstance().destroy&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(e){const{componentInstance:t,element:n,destroy:r}=this.createComponent(e);this.componentInstance=t,this.unmount=r,this.element=n.firstElementChild}}const Re=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Pe=e=>`on${e.charAt(0).toUpperCase()}${e.substring(1,e.length)}`,Me=()=>{const e={},t=_e["ComponentUtil"].PUBLIC_EVENTS.map(e=>Pe(Re(e)));t.forEach(t=>e[t]=void 0);const n={};return _e["ComponentUtil"].ALL_PROPERTIES.filter(e=>"gridOptions"!=e).forEach(t=>{e[t]={},n[t]={handler(e,n){this.processChanges(t,e,n)},deep:"popupParent"!==t&&"context"!==t}}),[e,n]};class Ie extends _e["VanillaFrameworkOverrides"]{constructor(e){super(),this.parent=e}frameworkComponent(e,t){let n=Ce.searchForComponentInstance(this.parent,e,10,!0)?e:null;if(!n&&t&&t[e]){const r=t[e];n=Ce.searchForComponentInstance(this.parent,r,10,!0)?r:null}return n}isFrameworkComponent(e){return"object"===typeof e}}const Fe=["rowDataChanged","rowDataUpdated","cellValueChanged","rowValueChanged"],$e="onUpdate:modelValue",De="update:modelValue",[Ee,Se]=Me(),Ae=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}},Ee),data(){return{gridCreated:!1,isDestroyed:!1,gridReadyFired:!1,emitRowModel:void 0}},watch:Object.assign({modelValue:{handler(e,t){this.processChanges("rowData",e,t)},deep:!0}},Se),methods:{globalEventListener(e,t){this.isDestroyed||("gridReady"===e&&(this.gridReadyFired=!0),this.updateModelIfUsed(e))},processChanges(e,t,n){if(this.gridCreated){if(this.skipChange(e,t,n))return;const r={};r[e]={currentValue:"rowData"===e?Object.isFrozen(t)?t:Oe(we(t)):t,previousValue:n},_e["ComponentUtil"].processOnChange(r,this.gridOptions.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(){const e=[];return this.gridOptions.api.forEachNode(t=>{e.push(t.data)}),e},updateModelIfUsed(e){this.gridReadyFired&&this.$attrs[$e]&&-1!==Fe.indexOf(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[$e]){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(De,Object.freeze(this.getRowData()))},20);const e=this.getProvides(),t=new xe(this,e),n=Oe(_e["ComponentUtil"].copyAttributesToGridOptions(we(this.gridOptions),this,!0));this.checkForBindingConflicts();const r=this.getRowDataBasedOnBindings();n.rowData=r?Object.isFrozen(r)?r:Oe(we(r)):r;const o={globalEventListener:this.globalEventListener.bind(this),frameworkOverrides:new Ie(this),providedBeanInstances:{frameworkComponentWrapper:t},modules:this.modules};new _e["Grid"](this.$el,n,o),this.gridCreated=!0},unmounted(){this.gridCreated&&(this.gridOptions.api&&this.gridOptions.api.destroy(),this.isDestroyed=!0)}})}})})); | ||
//# sourceMappingURL=ag-grid-vue3.umd.min.js.map |
{ | ||
"name": "ag-grid-vue3", | ||
"description": "AG Grid Vue 3 Component", | ||
"version": "29.0.0", | ||
"version": "29.1.0", | ||
"author": "Sean Landsman <sean@thelandsmans.com>", | ||
@@ -33,3 +33,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"ag-grid-community": "~29.0.0", | ||
"ag-grid-community": "~29.1.0", | ||
"vue": "^3.0.0" | ||
@@ -36,0 +36,0 @@ }, |
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 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
594959
5601
1
+ Addedag-grid-community@29.1.0(transitive)
- Removedag-grid-community@29.0.0(transitive)
Updatedag-grid-community@~29.1.0