datatables.net-vue3
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),g=["childRow","column-sizing","column-visibility","destroy","draw","error","init","length","order","page","preDraw","preInit","preXhr","processing","requestChild","search","stateLoadParams","stateLoaded","stateSaveParams","xhr","autoFill","preAutoFill","buttons-action","buttons-processing","column-reorder","key","key-blur","key-focus","key-refocus","key-return-submit","responsive-display","responsive-resize","rowgroup-datasrc","pre-row-reorder","row-reorder","row-reordered","dtsb-inserted","deselect","select","select-blur","selectItems","selectStyle","user-select","stateRestore-change"];let m;const D={name:"Datatables.netVue",inheritAttrs:!1,use(c){m=c}},h=l.defineComponent({...D,props:{ajax:null,columns:null,data:null,options:null},emits:g,setup(c,{expose:f}){const u=c,v=l.ref(null),i={},o=l.ref(),w=l.ref([]);l.watch(()=>u.data,t=>{let e=o.value;if(e){for(var n=Object.keys(i),s=0;s<n.length;s++)delete i[n[s]];e.clear(),e.rows.add(t).draw(!1)}},{deep:!0}),l.onMounted(()=>{var n,s;const t=l.getCurrentInstance();let e=u.options||{};if(u.data&&(e.data=u.data,k(e.data)),u.columns&&(e.columns=u.columns,b(e.columns,t)),u.ajax&&(e.ajax=u.ajax),e.columnDefs||(e.columnDefs=[]),t){let r=Object.keys(t.slots);for(let a=0;a<r.length;a++){let d=r[a];if(d.match(/^column\-/)){let p=d.replace("column-","");e.columnDefs.push({target:p.match(/^\d+$/)?parseInt(p):p+":name",render:"#"+d})}}b(e.columnDefs,t)}if(!m)throw new Error("DataTables library not set. See https://datatables.net/tn/19 for details.");o.value=new m(l.unref(v),e),(n=o.value)!=null&&n.page.info().serverSide&&((s=o.value)==null||s.on("preDraw",function(){let r=Object.keys(i);for(var a=0;a<r.length;a++)delete i[r[a]]}));for(let r of g)o.value&&t&&o.value.on(r,function(){var a=Array.from(arguments),d=a.shift();a.unshift({event:d,dt:o}),a.unshift(r),t.emit.apply(t,a)})}),l.onBeforeUnmount(()=>{var t;(t=o.value)==null||t.destroy(!0)});function k(t){w.value=t.value?t.value.slice():t.slice()}function y(t){return function(e,n,s,r){let a=r.row+","+r.col;if(!i[a]){let d=l.h("div",t({cellData:e,colIndex:r.col,rowData:s,rowIndex:r.row,type:n}));i[a]=document.createElement("div"),l.render(d,i[a])}return i[a]}}function b(t,e){if(e)for(let s=0;s<t.length;s++){let r=t[s];if(typeof r.render=="string"&&r.render.charAt(0)==="#"){var n=r.render.replace("#","");e.slots[n]&&(r.render=y(e.slots[n]))}else if(typeof r.render=="object"&&typeof r.render.display=="string"&&r.render.display.charAt(0)==="#"){var n=r.render.display.replace("#","");e.slots[n]&&(r.render.display=y(e.slots[n]))}}}return f({dt:o}),(t,e)=>e[0]||(l.setBlockTracking(-1),e[0]=l.createElementVNode("div",{class:"datatable"},[l.createElementVNode("table",l.mergeProps({ref_key:"table",ref:v},t.$attrs,{style:{width:"100%"}}),[l.renderSlot(t.$slots,"default")],16)]),l.setBlockTracking(1),e[0])}}),j=(()=>{const c=h;return c.install=f=>{f.component("Datatables.netVue",c)},c})();exports.DataTable=h;exports.default=j; | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),b=["childRow","column-sizing","column-visibility","destroy","draw","error","init","length","order","page","preDraw","preInit","preXhr","processing","requestChild","search","stateLoadParams","stateLoaded","stateSaveParams","xhr","autoFill","preAutoFill","buttons-action","buttons-processing","column-reorder","key","key-blur","key-focus","key-refocus","key-return-submit","responsive-display","responsive-resize","rowgroup-datasrc","pre-row-reorder","row-reorder","row-reordered","dtsb-inserted","deselect","select","select-blur","selectItems","selectStyle","user-select","stateRestore-change"];let p;const k={name:"Datatables.netVue",inheritAttrs:!1,use(i){p=i}},h=l.defineComponent({...k,props:{ajax:null,columns:null,data:null,options:null},emits:b,setup(i,{expose:f}){const o=i,m=l.ref(null),u={},c=l.ref(),g=l.ref([]);l.watch(()=>o.data,r=>{let e=c.value;if(e){for(var n=Object.keys(u),a=0;a<n.length;a++)delete u[n[a]];e.clear(),e.rows.add(r).draw(!1)}},{deep:!0}),l.onMounted(()=>{var n;const r=l.getCurrentInstance();let e=o.options||{};if(o.data&&(e.data=o.data,w(e.data)),o.columns&&(e.columns=o.columns),e.columns&&v(e.columns,r),o.ajax&&(e.ajax=o.ajax),e.columnDefs||(e.columnDefs=[]),r){let a=Object.keys(r.slots);for(let t=0;t<a.length;t++){let s=a[t];if(s.match(/^column\-/)){let d=s.replace("column-","");e.columnDefs.push({target:d.match(/^\d+$/)?parseInt(d):d+":name",render:"#"+s})}}v(e.columnDefs,r)}if(!p)throw new Error("DataTables library not set. See https://datatables.net/tn/19 for details.");c.value=new p(l.unref(m),e),(n=c.value)==null||n.on("preXhr",function(){let a=Object.keys(u);for(var t=0;t<a.length;t++)delete u[a[t]]});for(let a of b)c.value&&r&&c.value.on(a,function(){var t=Array.from(arguments),s=t.shift();t.unshift({event:s,dt:c}),t.unshift(a),r.emit.apply(r,t)})}),l.onBeforeUnmount(()=>{var r;(r=c.value)==null||r.destroy(!0)});function w(r){g.value=r.value?r.value.slice():r.slice()}function y(r){return function(e,n,a,t){let s=t.row+","+t.col;if(!u[s]){let d=l.h("div",r({cellData:e,colIndex:t.col,rowData:a,rowIndex:t.row,type:n}));u[s]=document.createElement("div"),l.render(d,u[s])}return u[s]}}function v(r,e){if(e)for(let a=0;a<r.length;a++){let t=r[a];if(typeof t.render=="string"&&t.render.charAt(0)==="#"){var n=t.render.replace("#","");e.slots[n]&&(t.render=y(e.slots[n]))}else if(typeof t.render=="object"&&typeof t.render.display=="string"&&t.render.display.charAt(0)==="#"){var n=t.render.display.replace("#","");e.slots[n]&&(t.render.display=y(e.slots[n]))}}}return f({dt:c}),(r,e)=>e[0]||(l.setBlockTracking(-1),e[0]=l.createElementVNode("div",{class:"datatable"},[l.createElementVNode("table",l.mergeProps({ref_key:"table",ref:m},r.$attrs,{style:{width:"100%"}}),[l.renderSlot(r.$slots,"default")],16)]),l.setBlockTracking(1),e[0])}}),D=(()=>{const i=h;return i.install=f=>{f.component("Datatables.netVue",i)},i})();exports.DataTable=h;exports.default=D; |
@@ -1,1 +0,1 @@ | ||
(function(o,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(o=typeof globalThis<"u"?globalThis:o||self,n((o.datatables=o.datatables||{},o.datatables["net-vue3"]={}),o.Vue))})(this,function(o,n){"use strict";const b=["childRow","column-sizing","column-visibility","destroy","draw","error","init","length","order","page","preDraw","preInit","preXhr","processing","requestChild","search","stateLoadParams","stateLoaded","stateSaveParams","xhr","autoFill","preAutoFill","buttons-action","buttons-processing","column-reorder","key","key-blur","key-focus","key-refocus","key-return-submit","responsive-display","responsive-resize","rowgroup-datasrc","pre-row-reorder","row-reorder","row-reordered","dtsb-inserted","deselect","select","select-blur","selectItems","selectStyle","user-select","stateRestore-change"];let p;const k={name:"Datatables.netVue",inheritAttrs:!1,use(u){p=u}},h=n.defineComponent({...k,props:{ajax:null,columns:null,data:null,options:null},emits:b,setup(u,{expose:m}){const d=u,g=n.ref(null),c={},i=n.ref(),j=n.ref([]);n.watch(()=>d.data,t=>{let e=i.value;if(e){for(var s=Object.keys(c),l=0;l<s.length;l++)delete c[s[l]];e.clear(),e.rows.add(t).draw(!1)}},{deep:!0}),n.onMounted(()=>{var s,l;const t=n.getCurrentInstance();let e=d.options||{};if(d.data&&(e.data=d.data,x(e.data)),d.columns&&(e.columns=d.columns,v(e.columns,t)),d.ajax&&(e.ajax=d.ajax),e.columnDefs||(e.columnDefs=[]),t){let r=Object.keys(t.slots);for(let a=0;a<r.length;a++){let f=r[a];if(f.match(/^column\-/)){let y=f.replace("column-","");e.columnDefs.push({target:y.match(/^\d+$/)?parseInt(y):y+":name",render:"#"+f})}}v(e.columnDefs,t)}if(!p)throw new Error("DataTables library not set. See https://datatables.net/tn/19 for details.");i.value=new p(n.unref(g),e),(s=i.value)!=null&&s.page.info().serverSide&&((l=i.value)==null||l.on("preDraw",function(){let r=Object.keys(c);for(var a=0;a<r.length;a++)delete c[r[a]]}));for(let r of b)i.value&&t&&i.value.on(r,function(){var a=Array.from(arguments),f=a.shift();a.unshift({event:f,dt:i}),a.unshift(r),t.emit.apply(t,a)})}),n.onBeforeUnmount(()=>{var t;(t=i.value)==null||t.destroy(!0)});function x(t){j.value=t.value?t.value.slice():t.slice()}function w(t){return function(e,s,l,r){let a=r.row+","+r.col;if(!c[a]){let f=n.h("div",t({cellData:e,colIndex:r.col,rowData:l,rowIndex:r.row,type:s}));c[a]=document.createElement("div"),n.render(f,c[a])}return c[a]}}function v(t,e){if(e)for(let l=0;l<t.length;l++){let r=t[l];if(typeof r.render=="string"&&r.render.charAt(0)==="#"){var s=r.render.replace("#","");e.slots[s]&&(r.render=w(e.slots[s]))}else if(typeof r.render=="object"&&typeof r.render.display=="string"&&r.render.display.charAt(0)==="#"){var s=r.render.display.replace("#","");e.slots[s]&&(r.render.display=w(e.slots[s]))}}}return m({dt:i}),(t,e)=>e[0]||(n.setBlockTracking(-1),e[0]=n.createElementVNode("div",{class:"datatable"},[n.createElementVNode("table",n.mergeProps({ref_key:"table",ref:g},t.$attrs,{style:{width:"100%"}}),[n.renderSlot(t.$slots,"default")],16)]),n.setBlockTracking(1),e[0])}}),D=(()=>{const u=h;return u.install=m=>{m.component("Datatables.netVue",u)},u})();o.DataTable=h,o.default=D,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
(function(l,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(l=typeof globalThis<"u"?globalThis:l||self,n((l.datatables=l.datatables||{},l.datatables["net-vue3"]={}),l.Vue))})(this,function(l,n){"use strict";const y=["childRow","column-sizing","column-visibility","destroy","draw","error","init","length","order","page","preDraw","preInit","preXhr","processing","requestChild","search","stateLoadParams","stateLoaded","stateSaveParams","xhr","autoFill","preAutoFill","buttons-action","buttons-processing","column-reorder","key","key-blur","key-focus","key-refocus","key-return-submit","responsive-display","responsive-resize","rowgroup-datasrc","pre-row-reorder","row-reorder","row-reordered","dtsb-inserted","deselect","select","select-blur","selectItems","selectStyle","user-select","stateRestore-change"];let p;const k={name:"Datatables.netVue",inheritAttrs:!1,use(u){p=u}},b=n.defineComponent({...k,props:{ajax:null,columns:null,data:null,options:null},emits:y,setup(u,{expose:m}){const i=u,h=n.ref(null),d={},c=n.ref(),D=n.ref([]);n.watch(()=>i.data,r=>{let e=c.value;if(e){for(var s=Object.keys(d),a=0;a<s.length;a++)delete d[s[a]];e.clear(),e.rows.add(r).draw(!1)}},{deep:!0}),n.onMounted(()=>{var s;const r=n.getCurrentInstance();let e=i.options||{};if(i.data&&(e.data=i.data,j(e.data)),i.columns&&(e.columns=i.columns),e.columns&&w(e.columns,r),i.ajax&&(e.ajax=i.ajax),e.columnDefs||(e.columnDefs=[]),r){let a=Object.keys(r.slots);for(let t=0;t<a.length;t++){let o=a[t];if(o.match(/^column\-/)){let f=o.replace("column-","");e.columnDefs.push({target:f.match(/^\d+$/)?parseInt(f):f+":name",render:"#"+o})}}w(e.columnDefs,r)}if(!p)throw new Error("DataTables library not set. See https://datatables.net/tn/19 for details.");c.value=new p(n.unref(h),e),(s=c.value)==null||s.on("preXhr",function(){let a=Object.keys(d);for(var t=0;t<a.length;t++)delete d[a[t]]});for(let a of y)c.value&&r&&c.value.on(a,function(){var t=Array.from(arguments),o=t.shift();t.unshift({event:o,dt:c}),t.unshift(a),r.emit.apply(r,t)})}),n.onBeforeUnmount(()=>{var r;(r=c.value)==null||r.destroy(!0)});function j(r){D.value=r.value?r.value.slice():r.slice()}function g(r){return function(e,s,a,t){let o=t.row+","+t.col;if(!d[o]){let f=n.h("div",r({cellData:e,colIndex:t.col,rowData:a,rowIndex:t.row,type:s}));d[o]=document.createElement("div"),n.render(f,d[o])}return d[o]}}function w(r,e){if(e)for(let a=0;a<r.length;a++){let t=r[a];if(typeof t.render=="string"&&t.render.charAt(0)==="#"){var s=t.render.replace("#","");e.slots[s]&&(t.render=g(e.slots[s]))}else if(typeof t.render=="object"&&typeof t.render.display=="string"&&t.render.display.charAt(0)==="#"){var s=t.render.display.replace("#","");e.slots[s]&&(t.render.display=g(e.slots[s]))}}}return m({dt:c}),(r,e)=>e[0]||(n.setBlockTracking(-1),e[0]=n.createElementVNode("div",{class:"datatable"},[n.createElementVNode("table",n.mergeProps({ref_key:"table",ref:h},r.$attrs,{style:{width:"100%"}}),[n.renderSlot(r.$slots,"default")],16)]),n.setBlockTracking(1),e[0])}}),v=(()=>{const u=b;return u.install=m=>{m.component("Datatables.netVue",u)},u})();l.DataTable=b,l.default=v,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
{ | ||
"name": "datatables.net-vue3", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Vue3 component for DataTables", | ||
@@ -5,0 +5,0 @@ "main": "dist/datatables.net-vue3.umd.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
25882