quasar-factory-lib 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,9 +66,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
66
66
  dataCy: string;
67
67
  icon: string;
68
68
  persistent: boolean;
69
+ btnColor: string;
69
70
  iconColor: string;
70
71
  iconSize: string;
71
- btnColor: string;
72
72
  btnLabel: string;
73
73
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
74
74
  export default _default;
@@ -1,5 +1,5 @@
1
+ declare const qTableSort: {
2
+ sortMethod<T extends Record<string, unknown>>(rows: T[], sortBy: keyof T, descending: boolean, values?: (keyof T)[]): T[];
3
+ sortDates<T extends Record<string, unknown>>(sortBy: keyof T, descending: boolean, rowsFlat: T[]): void;
4
+ };
1
5
  export default qTableSort;
2
- declare namespace qTableSort {
3
- function sortMethod(rows: any, sortBy: any, descending: any, values?: any[]): any[];
4
- function sortDates(sortBy: any, descending: any, rowsFlat: any): void;
5
- }
@@ -4,11 +4,11 @@ declare const _default: import("vue").DefineComponent<{}, {}, {
4
4
  store: import("pinia").Store<"tableStore", {
5
5
  filterValue: import("@vueuse/shared").RemovableRef<string>;
6
6
  lastFilterValue: import("@vueuse/shared").RemovableRef<string>;
7
- visiblecolumns: import("@vueuse/shared").RemovableRef<never[]>;
7
+ visiblecolumns: import("@vueuse/shared").RemovableRef<string[]>;
8
8
  prepared: import("@vueuse/shared").RemovableRef<boolean>;
9
9
  user: import("@vueuse/shared").RemovableRef<{}>;
10
10
  }, {}, {
11
- setFilterValue(val: any): void;
11
+ setFilterValue(val: string): void;
12
12
  cleanTableFilter(): void;
13
13
  }>;
14
14
  tableStyle: string;
@@ -67,9 +67,9 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
67
67
  dataCy: string;
68
68
  icon: string;
69
69
  persistent: boolean;
70
+ btnColor: string;
70
71
  iconColor: string;
71
72
  iconSize: string;
72
- btnColor: string;
73
73
  btnLabel: string;
74
74
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
75
75
  }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -4,11 +4,11 @@ declare const _default: import("vue").DefineComponent<{}, {}, {
4
4
  store: import("pinia").Store<"tableStore", {
5
5
  filterValue: import("@vueuse/shared").RemovableRef<string>;
6
6
  lastFilterValue: import("@vueuse/shared").RemovableRef<string>;
7
- visiblecolumns: import("@vueuse/shared").RemovableRef<never[]>;
7
+ visiblecolumns: import("@vueuse/shared").RemovableRef<string[]>;
8
8
  prepared: import("@vueuse/shared").RemovableRef<boolean>;
9
9
  user: import("@vueuse/shared").RemovableRef<{}>;
10
10
  }, {}, {
11
- setFilterValue(val: any): void;
11
+ setFilterValue(val: string): void;
12
12
  cleanTableFilter(): void;
13
13
  }>;
14
14
  tableStyle: string;
@@ -18609,7 +18609,7 @@ const LS = {
18609
18609
  e.$nextTick(() => {
18610
18610
  const t = e.smallDevice ? "q-table__grid-content" : "q-table__middle scroll", n = e.smallDevice ? "Grid" : "Table", o = document.getElementsByClassName(t), a = o.length > 0 ? o[0] : window, l = (r) => {
18611
18611
  const { scrollHeight: i, scrollTop: s, clientHeight: c } = r.target;
18612
- Math.abs(i - c - s) < 1 && (console.log(`[${n}] You are at the bottom!`, e.$refs.table.totalPage), e.$refs.table.totalPage++);
18612
+ Math.abs(i - c - s) <= 1 && (console.log(`[${n}] You are at the bottom!`, e.$refs.table.totalPage), e.$refs.table.totalPage++);
18613
18613
  };
18614
18614
  window.removeEventListener("scroll", l), a.removeEventListener("scroll", l), a.addEventListener("scroll", l);
18615
18615
  });
@@ -18619,7 +18619,7 @@ const LS = {
18619
18619
  const o = t ? "q-table__grid-content" : "q-table__middle scroll", a = t ? "Grid" : "Table", l = document.getElementsByClassName(o), r = l.length > 0 ? l[0] : window, i = (s) => {
18620
18620
  console.log(n, "totalPage");
18621
18621
  const { scrollHeight: c, scrollTop: u, clientHeight: f } = s.target;
18622
- if (Math.abs(c - f - u) < 1) {
18622
+ if (Math.abs(c - f - u) <= 1) {
18623
18623
  debugger;
18624
18624
  console.log(`[${a}] You are at the bottom!`, n), n++;
18625
18625
  }
@@ -18638,7 +18638,7 @@ const LS = {
18638
18638
  l.scrollTop + l.clientHeight >= l.scrollHeight && (console.log("[Grid] You are at the bottom!"), e.$refs.table.totalPage++);
18639
18639
  else {
18640
18640
  const { scrollHeight: c, scrollTop: u, clientHeight: f } = s;
18641
- Math.abs(c - f - u) < 1 && (console.log("[Table] You are at the bottom!"), e.$refs.table.totalPage++);
18641
+ Math.abs(c - f - u) <= 1 && (console.log("[Table] You are at the bottom!"), e.$refs.table.totalPage++);
18642
18642
  }
18643
18643
  };
18644
18644
  window.removeEventListener("scroll", r), l.removeEventListener("scroll", r), l.addEventListener("scroll", r);
@@ -9,7 +9,7 @@
9
9
  * @license MIT
10
10
  */const EC=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();var _o;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(_o||(_o={}));const Wi=typeof window<"u",bm=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function CC(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Ki(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){Em(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function vm(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function qr(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const $r=typeof navigator=="object"?navigator:{userAgent:""},ym=/Macintosh/.test($r.userAgent)&&/AppleWebKit/.test($r.userAgent)&&!/Safari/.test($r.userAgent),Em=Wi?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!ym?wC:"msSaveOrOpenBlob"in $r?kC:SC:()=>{};function wC(e,t="download",n){const o=document.createElement("a");o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?vm(o.href)?Ki(e,t,n):(o.target="_blank",qr(o)):qr(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){qr(o)},0))}function kC(e,t="download",n){if(typeof e=="string")if(vm(e))Ki(e,t,n);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){qr(o)})}else navigator.msSaveOrOpenBlob(CC(e,n),t)}function SC(e,t,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return Ki(e,t,n);const r=e.type==="application/octet-stream",l=/constructor/i.test(String(bm.HTMLElement))||"safari"in bm,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||r&&l||ym)&&typeof FileReader<"u"){const s=new FileReader;s.onloadend=function(){let u=s.result;if(typeof u!="string")throw o=null,new Error("Wrong reader.result type");u=i?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=u:location.assign(u),o=null},s.readAsDataURL(e)}else{const s=URL.createObjectURL(e);o?o.location.assign(s):location.href=s,o=null,setTimeout(function(){URL.revokeObjectURL(s)},4e4)}}function Vt(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Gi(e){return"_a"in e&&"install"in e}function Cm(){if(!("clipboard"in navigator))return Vt("Your browser doesn't support the Clipboard API","error"),!0}function wm(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(Vt('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function TC(e){if(!Cm())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),Vt("Global state copied to clipboard.")}catch(t){if(wm(t))return;Vt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function xC(e){if(!Cm())try{km(e,JSON.parse(await navigator.clipboard.readText())),Vt("Global state pasted from clipboard.")}catch(t){if(wm(t))return;Vt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function DC(e){try{Em(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){Vt("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Mn;function OC(){Mn||(Mn=document.createElement("input"),Mn.type="file",Mn.accept=".json");function e(){return new Promise((t,n)=>{Mn.onchange=async()=>{const o=Mn.files;if(!o)return t(null);const r=o.item(0);return t(r?{text:await r.text(),file:r}:null)},Mn.oncancel=()=>t(null),Mn.onerror=n,Mn.click()})}return e}async function NC(e){try{const n=await OC()();if(!n)return;const{text:o,file:r}=n;km(e,JSON.parse(o)),Vt(`Global state imported from "${r.name}".`)}catch(t){Vt("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function km(e,t){for(const n in t){const o=e.state.value[n];o?Object.assign(o,t[n]):e.state.value[n]=t[n]}}function pn(e){return{_custom:{display:e}}}const Sm="🍍 Pinia (root)",Ur="_root";function AC(e){return Gi(e)?{id:Ur,label:Sm}:{id:e.$id,label:e.$id}}function IC(e){if(Gi(e)){const n=Array.from(e._s.keys()),o=e._s;return{state:n.map(l=>({editable:!0,key:l,value:e.state.value[l]})),getters:n.filter(l=>o.get(l)._getters).map(l=>{const i=o.get(l);return{editable:!1,key:l,value:i._getters.reduce((s,u)=>(s[u]=i[u],s),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function VC(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:pn(e.type),key:pn(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function PC(e){switch(e){case _o.direct:return"mutation";case _o.patchFunction:return"$patch";case _o.patchObject:return"$patch";default:return"unknown"}}let Ko=!0;const Hr=[],bo="pinia:mutations",Ut="pinia",{assign:LC}=Object,zr=e=>"🍍 "+e;function BC(e,t){xf({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Hr,app:e},n=>{typeof n.now!="function"&&Vt("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:bo,label:"Pinia 🍍",color:15064968}),n.addInspector({id:Ut,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{TC(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await xC(t),n.sendInspectorTree(Ut),n.sendInspectorState(Ut)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{DC(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await NC(t),n.sendInspectorTree(Ut),n.sendInspectorState(Ut)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const r=t._s.get(o);r?typeof r.$reset!="function"?Vt(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(r.$reset(),Vt(`Store "${o}" reset.`)):Vt(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent(o=>{const r=o.componentInstance&&o.componentInstance.proxy;if(r&&r._pStores){const l=o.componentInstance.proxy._pStores;Object.values(l).forEach(i=>{o.instanceData.state.push({type:zr(i.$id),key:"state",editable:!0,value:i._isOptionsAPI?{_custom:{value:a.toRaw(i.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>i.$reset()}]}}:Object.keys(i.$state).reduce((s,u)=>(s[u]=i.$state[u],s),{})}),i._getters&&i._getters.length&&o.instanceData.state.push({type:zr(i.$id),key:"getters",editable:!1,value:i._getters.reduce((s,u)=>{try{s[u]=i[u]}catch(d){s[u]=d}return s},{})})})}}),n.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===Ut){let r=[t];r=r.concat(Array.from(t._s.values())),o.rootNodes=(o.filter?r.filter(l=>"$id"in l?l.$id.toLowerCase().includes(o.filter.toLowerCase()):Sm.toLowerCase().includes(o.filter.toLowerCase())):r).map(AC)}}),globalThis.$pinia=t,n.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===Ut){const r=o.nodeId===Ur?t:t._s.get(o.nodeId);if(!r)return;r&&(o.nodeId!==Ur&&(globalThis.$store=a.toRaw(r)),o.state=IC(r))}}),n.on.editInspectorState(o=>{if(o.app===e&&o.inspectorId===Ut){const r=o.nodeId===Ur?t:t._s.get(o.nodeId);if(!r)return Vt(`store "${o.nodeId}" not found`,"error");const{path:l}=o;Gi(r)?l.unshift("state"):(l.length!==1||!r._customProperties.has(l[0])||l[0]in r.$state)&&l.unshift("$state"),Ko=!1,o.set(r,l,o.state.value),Ko=!0}}),n.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const r=o.type.replace(/^🍍\s*/,""),l=t._s.get(r);if(!l)return Vt(`store "${r}" not found`,"error");const{path:i}=o;if(i[0]!=="state")return Vt(`Invalid path for store "${r}":
11
11
  ${i}
12
- Only state can be modified.`);i[0]="$state",Ko=!1,o.set(l,i,o.state.value),Ko=!0}})})}function MC(e,t){Hr.includes(zr(t.$id))||Hr.push(zr(t.$id)),xf({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Hr,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const o=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:s,name:u,args:d})=>{const c=Tm++;n.addTimelineEvent({layerId:bo,event:{time:o(),title:"🛫 "+u,subtitle:"start",data:{store:pn(t.$id),action:pn(u),args:d},groupId:c}}),i(m=>{Qn=void 0,n.addTimelineEvent({layerId:bo,event:{time:o(),title:"🛬 "+u,subtitle:"end",data:{store:pn(t.$id),action:pn(u),args:d,result:m},groupId:c}})}),s(m=>{Qn=void 0,n.addTimelineEvent({layerId:bo,event:{time:o(),logType:"error",title:"💥 "+u,subtitle:"end",data:{store:pn(t.$id),action:pn(u),args:d,error:m},groupId:c}})})},!0),t._customProperties.forEach(i=>{a.watch(()=>a.unref(t[i]),(s,u)=>{n.notifyComponentUpdate(),n.sendInspectorState(Ut),Ko&&n.addTimelineEvent({layerId:bo,event:{time:o(),title:"Change",subtitle:i,data:{newValue:s,oldValue:u},groupId:Qn}})},{deep:!0})}),t.$subscribe(({events:i,type:s},u)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(Ut),!Ko)return;const d={time:o(),title:PC(s),data:LC({store:pn(t.$id)},VC(i)),groupId:Qn};s===_o.patchFunction?d.subtitle="⤵️":s===_o.patchObject?d.subtitle="🧩":i&&!Array.isArray(i)&&(d.subtitle=i.type),i&&(d.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:bo,event:d})},{detached:!0,flush:"sync"});const r=t._hotUpdate;t._hotUpdate=a.markRaw(i=>{r(i),n.addTimelineEvent({layerId:bo,event:{time:o(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:pn(t.$id),info:pn("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(Ut),n.sendInspectorState(Ut)});const{$dispose:l}=t;t.$dispose=()=>{l(),n.notifyComponentUpdate(),n.sendInspectorTree(Ut),n.sendInspectorState(Ut),n.getSettings().logStoreChanges&&Vt(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(Ut),n.sendInspectorState(Ut),n.getSettings().logStoreChanges&&Vt(`"${t.$id}" store installed 🆕`)})}let Tm=0,Qn;function xm(e,t,n){const o=t.reduce((r,l)=>(r[l]=a.toRaw(e)[l],r),{});for(const r in o)e[r]=function(){const l=Tm,i=n?new Proxy(e,{get(...u){return Qn=l,Reflect.get(...u)},set(...u){return Qn=l,Reflect.set(...u)}}):e;Qn=l;const s=o[r].apply(i,arguments);return Qn=void 0,s}}function FC({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){xm(t,Object.keys(n.actions),t._isOptionsAPI);const o=t._hotUpdate;a.toRaw(t)._hotUpdate=function(r){o.apply(this,arguments),xm(t,Object.keys(r._hmrPayload.actions),!!t._isOptionsAPI)}}MC(e,t)}}function Dm(){const e=a.effectScope(!0),t=e.run(()=>a.ref({}));let n=[],o=[];const r=a.markRaw({install(l){r._a=l,l.provide(EC,r),l.config.globalProperties.$pinia=r,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Wi&&BC(l,r),o.forEach(i=>n.push(i)),o=[]},use(l){return this._a?n.push(l):o.push(l),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Wi&&typeof Proxy<"u"&&r.use(FC),r}process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();const RC={en:{table:{search:"Search",advancedFilters:"Advanced Filters",cancel:"Cancel",confirm:"Save"},confirmDialog:{cancel:"Cancel",confirm:"Confirm",yes:"Yes",no:"No"},form:{rules:{emptyField:"The field cannot be empty",exceedCharactersTypeList:"Field must not exceed {0} characters"}},header:{hello:"Hello"},global:{total:"Total",retry:"Retray"},taskConfirmed:{repeatTask:"Do you want to continue the task?",repeat:"Yes, continue!",finish:"Finish"},menu:{logout:"Logout",home:"Home",areas:"Areas",filters:"Filters",seeOnlyChecked:"See only checked",seeManufacturing:"See manufacturing",seeSubcontractor:"See subcontractor",confirmRelocation:"Confirm Relocation",deleteAll:"Delete All",activateLoading:"Activate Loading",showExpeditionLines:"Show Expedition Lines",showOrderLines:"Show Order Lines",endTransaction:"End Transaction",translate:"Translate",labelSelectLanguage:"Language",selectLanguageLabelOptions:["Spanish","English"],deleteSelectedLine:"Delete Erroneous Label(s)",seeMap:"See Map",recordReceiptPurchase:"Record Receipt",addContainerNumber:"Add Container Number",showColumnsSelector:"Show columns selector",hideColumnsSelector:"Hide columns selector",sorting:"Sorting"}},es:{table:{search:"Buscar",advancedFilters:"Filtros avanzados",cancel:"Cancelar",confirm:"Guardar"},confirmDialog:{cancel:"Cancelar",confirm:"Confirmar",yes:"Sí",no:"No"},form:{rules:{emptyField:"El campo no puede estar vacío",exceedCharactersTypeList:"El campo no debe exceder más de {0} caracteres"}},header:{hello:"Hola"},global:{total:"Total",retry:"Reintentar"},taskConfirmed:{repeatTask:"¿Quieres continuar la tarea?",repeat:"Sí, continuar!",finish:"Finalizar"},menu:{logout:"Desconectar",home:"Inicio",areas:"Areas",filters:"Filtros",seeOnlyChecked:"Ver solo comprobadas",seeManufacturing:"Ver fabricación",seeSubcontractor:"Ver subcontrata",confirmRelocation:"Confirmar Reubicación",deleteAll:"Anular todos",activateLoading:"Activar Carga",showExpeditionLines:"Mostrar Líneas Expedición",showOrderLines:"Mostrar Líneas Pedidos",endTransaction:"Finalizar Operación",translate:"Traducir",labelSelectLanguage:"Idioma",selectLanguageLabelOptions:["Castellano","Inglés"],deleteSelectedLine:"Eliminar Etiquetas(s) Errónea(s)",seeMap:"Ver Plano",recordReceiptPurchase:"Registrar Recepción",addContainerNumber:"Añadir Nº Contenedor",showColumnsSelector:"Mostrar selector de columnas",hideColumnsSelector:"Hide selector de columnas",sorting:"Ordenar"}}},qC={filter(e,t,n){if(console.log(t),n.search!==""){const o=[],r=n.search?n.search.toLowerCase():"";for(let l=0;l<e.rows.length;l++)this.containsSearchTermInRow(e.rows[l],r)&&o.push(e.rows[l]);return e.filteredRows=o,this.paginationNewTable(e,o)}else return e.filteredRows=t,this.paginationNewTable(e,t)},paginationNewTable(e,t){return t.slice(0,e.$refs.table.pageLength)},containsSearchTermInRow(e,t){if(t!==""){const o=Object.values(e).map(r=>(r+"").toLowerCase());for(let r=0;r<o.length;r++)if(o[r].includes(t))return!0}return!1}},$C={handleInfiniteScrollNewTable(e){e.$nextTick(()=>{const t=e.smallDevice?"q-table__grid-content":"q-table__middle scroll",n=e.smallDevice?"Grid":"Table",o=document.getElementsByClassName(t),r=o.length>0?o[0]:window,l=i=>{const{scrollHeight:s,scrollTop:u,clientHeight:d}=i.target;Math.abs(s-d-u)<1&&(console.log(`[${n}] You are at the bottom!`,e.$refs.table.totalPage),e.$refs.table.totalPage++)};window.removeEventListener("scroll",l),r.removeEventListener("scroll",l),r.addEventListener("scroll",l)})},handleInfiniteScrollNewTableCompositionAPi(e,t,n){e(()=>{const o=t?"q-table__grid-content":"q-table__middle scroll",r=t?"Grid":"Table",l=document.getElementsByClassName(o),i=l.length>0?l[0]:window,s=u=>{console.log(n,"totalPage");const{scrollHeight:d,scrollTop:c,clientHeight:m}=u.target;if(Math.abs(d-m-c)<1){debugger;console.log(`[${r}] You are at the bottom!`,n),n++}};window.removeEventListener("scroll",s),i.removeEventListener("scroll",s),i.addEventListener("scroll",s)})},handleInfiniteScrollModal(e,t){console.log("handleInfiniteScrollModal"),e.$nextTick(()=>{const n=document.getElementById(t),o=e.smallDevice?"q-table__grid-content":"q-table__middle scroll",l=n.getElementsByClassName(o)[0],i=s=>{const u=s.target;if(e.smallDevice)l.scrollTop+l.clientHeight>=l.scrollHeight&&(console.log("[Grid] You are at the bottom!"),e.$refs.table.totalPage++);else{const{scrollHeight:d,scrollTop:c,clientHeight:m}=u;Math.abs(d-m-c)<1&&(console.log("[Table] You are at the bottom!"),e.$refs.table.totalPage++)}};window.removeEventListener("scroll",i),l.removeEventListener("scroll",i),l.addEventListener("scroll",i)})},paginationModal(e,t){return t.slice(0,e.$refs.table.totalPage++)}},UC={setTableHeight(){const e=document.getElementsByClassName("q-page-sticky")[0];let t="";if(e){const l=window.getComputedStyle(e).height;l!=="auto"&&(t=l.replace("px",""))}const n=document.getElementsByClassName("q-header")[0];let o="";if(n){const l=window.getComputedStyle(n).height;l!=="auto"&&(o=l.replace("px",""))}const r=Number(t)+Number(o);return`height:${window.innerHeight-r}px`},setModalTableHeight(e){const t=document.getElementById(e);let n="";if(t){const r=window.getComputedStyle(t).height;r!=="auto"&&(n=r.replace("px",""))}const o=Number(n);return`height:${window.innerHeight-o}px`}},HC={sortMethod(e,t,n,o=[]){const r=[...e];return t&&(o.includes(t)?this.sortDates(t,n,r):r.sort((l,i)=>{const s=n?i:l,u=n?l:i;return s[t]>u[t]?1:s[t]<u[t]?-1:0})),r},sortDates(e,t,n){n.sort(function(o,r){const l=o[e],i=r[e];let s=t?i:l,u=t?l:i;return s=s.split("/").reverse().join("-"),u=u.split("/").reverse().join("-"),s.localeCompare(u)})}};Dm();/*!
12
+ Only state can be modified.`);i[0]="$state",Ko=!1,o.set(l,i,o.state.value),Ko=!0}})})}function MC(e,t){Hr.includes(zr(t.$id))||Hr.push(zr(t.$id)),xf({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Hr,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const o=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:s,name:u,args:d})=>{const c=Tm++;n.addTimelineEvent({layerId:bo,event:{time:o(),title:"🛫 "+u,subtitle:"start",data:{store:pn(t.$id),action:pn(u),args:d},groupId:c}}),i(m=>{Qn=void 0,n.addTimelineEvent({layerId:bo,event:{time:o(),title:"🛬 "+u,subtitle:"end",data:{store:pn(t.$id),action:pn(u),args:d,result:m},groupId:c}})}),s(m=>{Qn=void 0,n.addTimelineEvent({layerId:bo,event:{time:o(),logType:"error",title:"💥 "+u,subtitle:"end",data:{store:pn(t.$id),action:pn(u),args:d,error:m},groupId:c}})})},!0),t._customProperties.forEach(i=>{a.watch(()=>a.unref(t[i]),(s,u)=>{n.notifyComponentUpdate(),n.sendInspectorState(Ut),Ko&&n.addTimelineEvent({layerId:bo,event:{time:o(),title:"Change",subtitle:i,data:{newValue:s,oldValue:u},groupId:Qn}})},{deep:!0})}),t.$subscribe(({events:i,type:s},u)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(Ut),!Ko)return;const d={time:o(),title:PC(s),data:LC({store:pn(t.$id)},VC(i)),groupId:Qn};s===_o.patchFunction?d.subtitle="⤵️":s===_o.patchObject?d.subtitle="🧩":i&&!Array.isArray(i)&&(d.subtitle=i.type),i&&(d.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:bo,event:d})},{detached:!0,flush:"sync"});const r=t._hotUpdate;t._hotUpdate=a.markRaw(i=>{r(i),n.addTimelineEvent({layerId:bo,event:{time:o(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:pn(t.$id),info:pn("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(Ut),n.sendInspectorState(Ut)});const{$dispose:l}=t;t.$dispose=()=>{l(),n.notifyComponentUpdate(),n.sendInspectorTree(Ut),n.sendInspectorState(Ut),n.getSettings().logStoreChanges&&Vt(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(Ut),n.sendInspectorState(Ut),n.getSettings().logStoreChanges&&Vt(`"${t.$id}" store installed 🆕`)})}let Tm=0,Qn;function xm(e,t,n){const o=t.reduce((r,l)=>(r[l]=a.toRaw(e)[l],r),{});for(const r in o)e[r]=function(){const l=Tm,i=n?new Proxy(e,{get(...u){return Qn=l,Reflect.get(...u)},set(...u){return Qn=l,Reflect.set(...u)}}):e;Qn=l;const s=o[r].apply(i,arguments);return Qn=void 0,s}}function FC({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){xm(t,Object.keys(n.actions),t._isOptionsAPI);const o=t._hotUpdate;a.toRaw(t)._hotUpdate=function(r){o.apply(this,arguments),xm(t,Object.keys(r._hmrPayload.actions),!!t._isOptionsAPI)}}MC(e,t)}}function Dm(){const e=a.effectScope(!0),t=e.run(()=>a.ref({}));let n=[],o=[];const r=a.markRaw({install(l){r._a=l,l.provide(EC,r),l.config.globalProperties.$pinia=r,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Wi&&BC(l,r),o.forEach(i=>n.push(i)),o=[]},use(l){return this._a?n.push(l):o.push(l),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Wi&&typeof Proxy<"u"&&r.use(FC),r}process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();const RC={en:{table:{search:"Search",advancedFilters:"Advanced Filters",cancel:"Cancel",confirm:"Save"},confirmDialog:{cancel:"Cancel",confirm:"Confirm",yes:"Yes",no:"No"},form:{rules:{emptyField:"The field cannot be empty",exceedCharactersTypeList:"Field must not exceed {0} characters"}},header:{hello:"Hello"},global:{total:"Total",retry:"Retray"},taskConfirmed:{repeatTask:"Do you want to continue the task?",repeat:"Yes, continue!",finish:"Finish"},menu:{logout:"Logout",home:"Home",areas:"Areas",filters:"Filters",seeOnlyChecked:"See only checked",seeManufacturing:"See manufacturing",seeSubcontractor:"See subcontractor",confirmRelocation:"Confirm Relocation",deleteAll:"Delete All",activateLoading:"Activate Loading",showExpeditionLines:"Show Expedition Lines",showOrderLines:"Show Order Lines",endTransaction:"End Transaction",translate:"Translate",labelSelectLanguage:"Language",selectLanguageLabelOptions:["Spanish","English"],deleteSelectedLine:"Delete Erroneous Label(s)",seeMap:"See Map",recordReceiptPurchase:"Record Receipt",addContainerNumber:"Add Container Number",showColumnsSelector:"Show columns selector",hideColumnsSelector:"Hide columns selector",sorting:"Sorting"}},es:{table:{search:"Buscar",advancedFilters:"Filtros avanzados",cancel:"Cancelar",confirm:"Guardar"},confirmDialog:{cancel:"Cancelar",confirm:"Confirmar",yes:"Sí",no:"No"},form:{rules:{emptyField:"El campo no puede estar vacío",exceedCharactersTypeList:"El campo no debe exceder más de {0} caracteres"}},header:{hello:"Hola"},global:{total:"Total",retry:"Reintentar"},taskConfirmed:{repeatTask:"¿Quieres continuar la tarea?",repeat:"Sí, continuar!",finish:"Finalizar"},menu:{logout:"Desconectar",home:"Inicio",areas:"Areas",filters:"Filtros",seeOnlyChecked:"Ver solo comprobadas",seeManufacturing:"Ver fabricación",seeSubcontractor:"Ver subcontrata",confirmRelocation:"Confirmar Reubicación",deleteAll:"Anular todos",activateLoading:"Activar Carga",showExpeditionLines:"Mostrar Líneas Expedición",showOrderLines:"Mostrar Líneas Pedidos",endTransaction:"Finalizar Operación",translate:"Traducir",labelSelectLanguage:"Idioma",selectLanguageLabelOptions:["Castellano","Inglés"],deleteSelectedLine:"Eliminar Etiquetas(s) Errónea(s)",seeMap:"Ver Plano",recordReceiptPurchase:"Registrar Recepción",addContainerNumber:"Añadir Nº Contenedor",showColumnsSelector:"Mostrar selector de columnas",hideColumnsSelector:"Hide selector de columnas",sorting:"Ordenar"}}},qC={filter(e,t,n){if(console.log(t),n.search!==""){const o=[],r=n.search?n.search.toLowerCase():"";for(let l=0;l<e.rows.length;l++)this.containsSearchTermInRow(e.rows[l],r)&&o.push(e.rows[l]);return e.filteredRows=o,this.paginationNewTable(e,o)}else return e.filteredRows=t,this.paginationNewTable(e,t)},paginationNewTable(e,t){return t.slice(0,e.$refs.table.pageLength)},containsSearchTermInRow(e,t){if(t!==""){const o=Object.values(e).map(r=>(r+"").toLowerCase());for(let r=0;r<o.length;r++)if(o[r].includes(t))return!0}return!1}},$C={handleInfiniteScrollNewTable(e){e.$nextTick(()=>{const t=e.smallDevice?"q-table__grid-content":"q-table__middle scroll",n=e.smallDevice?"Grid":"Table",o=document.getElementsByClassName(t),r=o.length>0?o[0]:window,l=i=>{const{scrollHeight:s,scrollTop:u,clientHeight:d}=i.target;Math.abs(s-d-u)<=1&&(console.log(`[${n}] You are at the bottom!`,e.$refs.table.totalPage),e.$refs.table.totalPage++)};window.removeEventListener("scroll",l),r.removeEventListener("scroll",l),r.addEventListener("scroll",l)})},handleInfiniteScrollNewTableCompositionAPi(e,t,n){e(()=>{const o=t?"q-table__grid-content":"q-table__middle scroll",r=t?"Grid":"Table",l=document.getElementsByClassName(o),i=l.length>0?l[0]:window,s=u=>{console.log(n,"totalPage");const{scrollHeight:d,scrollTop:c,clientHeight:m}=u.target;if(Math.abs(d-m-c)<=1){debugger;console.log(`[${r}] You are at the bottom!`,n),n++}};window.removeEventListener("scroll",s),i.removeEventListener("scroll",s),i.addEventListener("scroll",s)})},handleInfiniteScrollModal(e,t){console.log("handleInfiniteScrollModal"),e.$nextTick(()=>{const n=document.getElementById(t),o=e.smallDevice?"q-table__grid-content":"q-table__middle scroll",l=n.getElementsByClassName(o)[0],i=s=>{const u=s.target;if(e.smallDevice)l.scrollTop+l.clientHeight>=l.scrollHeight&&(console.log("[Grid] You are at the bottom!"),e.$refs.table.totalPage++);else{const{scrollHeight:d,scrollTop:c,clientHeight:m}=u;Math.abs(d-m-c)<=1&&(console.log("[Table] You are at the bottom!"),e.$refs.table.totalPage++)}};window.removeEventListener("scroll",i),l.removeEventListener("scroll",i),l.addEventListener("scroll",i)})},paginationModal(e,t){return t.slice(0,e.$refs.table.totalPage++)}},UC={setTableHeight(){const e=document.getElementsByClassName("q-page-sticky")[0];let t="";if(e){const l=window.getComputedStyle(e).height;l!=="auto"&&(t=l.replace("px",""))}const n=document.getElementsByClassName("q-header")[0];let o="";if(n){const l=window.getComputedStyle(n).height;l!=="auto"&&(o=l.replace("px",""))}const r=Number(t)+Number(o);return`height:${window.innerHeight-r}px`},setModalTableHeight(e){const t=document.getElementById(e);let n="";if(t){const r=window.getComputedStyle(t).height;r!=="auto"&&(n=r.replace("px",""))}const o=Number(n);return`height:${window.innerHeight-o}px`}},HC={sortMethod(e,t,n,o=[]){const r=[...e];return t&&(o.includes(t)?this.sortDates(t,n,r):r.sort((l,i)=>{const s=n?i:l,u=n?l:i;return s[t]>u[t]?1:s[t]<u[t]?-1:0})),r},sortDates(e,t,n){n.sort(function(o,r){const l=o[e],i=r[e];let s=t?i:l,u=t?l:i;return s=s.split("/").reverse().join("-"),u=u.split("/").reverse().join("-"),s.localeCompare(u)})}};Dm();/*!
13
13
  * shared v10.0.5
14
14
  * (c) 2024 kazuya kawaguchi
15
15
  * Released under the MIT License.
@@ -1,10 +1,10 @@
1
- export const tableStore: import("pinia").StoreDefinition<"tableStore", {
1
+ export declare const tableStore: import("pinia").StoreDefinition<"tableStore", {
2
2
  filterValue: import("@vueuse/shared").RemovableRef<string>;
3
3
  lastFilterValue: import("@vueuse/shared").RemovableRef<string>;
4
- visiblecolumns: import("@vueuse/shared").RemovableRef<never[]>;
4
+ visiblecolumns: import("@vueuse/shared").RemovableRef<string[]>;
5
5
  prepared: import("@vueuse/shared").RemovableRef<boolean>;
6
6
  user: import("@vueuse/shared").RemovableRef<{}>;
7
7
  }, {}, {
8
- setFilterValue(val: any): void;
8
+ setFilterValue(val: string): void;
9
9
  cleanTableFilter(): void;
10
10
  }>;
package/package.json CHANGED
@@ -98,6 +98,6 @@
98
98
  "release": "standard-version"
99
99
  },
100
100
  "type": "module",
101
- "version": "0.1.12",
101
+ "version": "0.1.13",
102
102
  "author": ""
103
103
  }
@@ -10,7 +10,7 @@ const infiniteScroll = {
10
10
  qtableScrollElem.length > 0 ? qtableScrollElem[0] : window
11
11
  const fnAddScroll = (event: Event) => {
12
12
  const { scrollHeight, scrollTop, clientHeight } = event.target as HTMLElement
13
- if (Math.abs(scrollHeight - clientHeight - scrollTop) < 1) {
13
+ if (Math.abs(scrollHeight - clientHeight - scrollTop) <= 1) {
14
14
  console.log(`[${tableType}] You are at the bottom!`, self.$refs.table.totalPage)
15
15
  self.$refs.table.totalPage++
16
16
  }
@@ -30,7 +30,7 @@ const infiniteScroll = {
30
30
  const fnAddScroll = (event: Event) => {
31
31
  console.log(totalPage, 'totalPage')
32
32
  const { scrollHeight, scrollTop, clientHeight } = event.target as HTMLElement
33
- if (Math.abs(scrollHeight - clientHeight - scrollTop) < 1) {
33
+ if (Math.abs(scrollHeight - clientHeight - scrollTop) <= 1) {
34
34
  debugger
35
35
  console.log(`[${tableType}] You are at the bottom!`, totalPage)
36
36
  totalPage++
@@ -61,7 +61,7 @@ const infiniteScroll = {
61
61
  }
62
62
  } else {
63
63
  const { scrollHeight, scrollTop, clientHeight } = target
64
- if (Math.abs(scrollHeight - clientHeight - scrollTop) < 1) {
64
+ if (Math.abs(scrollHeight - clientHeight - scrollTop) <= 1) {
65
65
  console.log('[Table] You are at the bottom!')
66
66
  self.$refs.table.totalPage++
67
67
  }
@@ -0,0 +1,46 @@
1
+ const qTableSort = {
2
+ sortMethod<T extends Record<string, unknown>>(
3
+ rows: T[],
4
+ sortBy: keyof T,
5
+ descending: boolean,
6
+ values: (keyof T)[] = []
7
+ ) {
8
+ const rowsFlat = [...rows]
9
+ console.log(sortBy, 'sortBy')
10
+ if (sortBy) {
11
+ if (values.includes(sortBy)) {
12
+ this.sortDates(sortBy, descending, rowsFlat)
13
+ } else {
14
+ rowsFlat.sort((a, b) => {
15
+ const x = descending ? b : a
16
+ const y = descending ? a : b
17
+ return x[sortBy] > y[sortBy] ? 1 : x[sortBy] < y[sortBy] ? -1 : 0
18
+ })
19
+ }
20
+ }
21
+
22
+ return rowsFlat
23
+ },
24
+
25
+ sortDates<T extends Record<string, unknown>>(
26
+ sortBy: keyof T,
27
+ descending: boolean,
28
+ rowsFlat: T[]
29
+ ) {
30
+ console.log(sortBy, 'sortBy')
31
+ rowsFlat.sort((columnA, columnB) => {
32
+ const a = columnA[sortBy] as string
33
+ const b = columnB[sortBy] as string
34
+
35
+ let x = descending ? b : a
36
+ let y = descending ? a : b
37
+
38
+ x = x.split('/').reverse().join('-')
39
+ y = y.split('/').reverse().join('-')
40
+
41
+ return x.localeCompare(y)
42
+ })
43
+ }
44
+
45
+ }
46
+ export default qTableSort
package/src/env.d.ts ADDED
@@ -0,0 +1,64 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ import type { Quasar } from 'quasar'
4
+ import type { Router, RouteLocationNormalizedLoaded } from 'vue-router'
5
+
6
+ declare namespace NodeJS {
7
+ interface ProcessEnv {
8
+ NODE_ENV: string
9
+ VUE_ROUTER_MODE: 'hash' | 'history' | 'abstract' | undefined
10
+ VUE_ROUTER_BASE: string | undefined
11
+ }
12
+ }
13
+
14
+ declare module '@vue/runtime-core' {
15
+ interface ComponentCustomProperties {
16
+ $router: Router
17
+ $route: RouteLocationNormalizedLoaded
18
+ $q: Quasar
19
+ translate: (key: string, args?: unkown[]) => string
20
+ $t: I18n['global']['t']
21
+ $i18n: I18n
22
+ $refs: {
23
+ table: {
24
+ toogleColumnsSelectorVisibility: () => void
25
+ handleInfiniteScrollTableCompositionAPi: () => void
26
+ toggleSearchVisibility: (store: object) => void
27
+ filterInputFocus: ()=> void
28
+ totalPage: number
29
+ pageLength: number
30
+ enableDragAndDrop: boolean
31
+ }
32
+ AlertLabelsWithError: {
33
+ alert: boolean
34
+ labelsErrors: {
35
+ label: string
36
+ error: string
37
+ icon: string
38
+ spinner: boolean
39
+ }[]
40
+ setIconCircleCheck: (labelCode: string) => void
41
+ setLabelsSpinner: (labelCode: string, value: boolean) => void
42
+ }
43
+ ConfirmRef: {
44
+ openDialogAndSetMessage: (message: string) => void
45
+ }
46
+ ConfirmedTask: {
47
+ alert: boolean
48
+ }
49
+ AlertRef:{
50
+ openAlertAndSetMessage: (message: string) => void
51
+ }
52
+ sideBar: {
53
+ toggleRightDrawer:()=> void
54
+ setRightDrawerOpenToFalse: () => void
55
+ }
56
+ popup: {
57
+ hide: () => void
58
+ }
59
+ filterInput: {
60
+ inputFocus: () => void
61
+ }
62
+ }
63
+ }
64
+ }
@@ -84,7 +84,7 @@ import NavBarSkeleton from '../components/NavBarSkeleton/NavBarSkeleton.vue'
84
84
  import TableRowsCounter from'../components/TableRowsCounter/TableRowsCounter.vue'
85
85
  import AlertLabelsWithError from '../components/AlertLabelsWithError/AlertLabelsWithError.vue'
86
86
  import setTableHeight from '../components/Table/utils/setTableHeight'
87
- // import infiniteScroll from '../components/Table/utils/infiniteScroll'
87
+ import infiniteScroll from '../components/Table/utils/infiniteScroll'
88
88
  import { tableStore } from '../store/table.js'
89
89
  export default {
90
90
  components: {
@@ -555,16 +555,16 @@ export default {
555
555
  '$q.screen.width' (): void {
556
556
  setTimeout(() => {
557
557
  this.tableStyle = setTableHeight.setTableHeight()
558
- this.$refs.table.handleInfiniteScrollTableCompositionAPi()
559
- // infiniteScroll.handleInfiniteScrollNewTable(this)
558
+ // this.$refs.table.handleInfiniteScrollTableCompositionAPi()
559
+ infiniteScroll.handleInfiniteScrollNewTable(this)
560
560
  }, 500)
561
561
  },
562
562
  showSkeleton (val: boolean) {
563
563
  if (!val) {
564
564
  setTimeout(() => {
565
565
  this.tableStyle = setTableHeight.setTableHeight()
566
- this.$refs.table.handleInfiniteScrollTableCompositionAPi()
567
- // infiniteScroll.handleInfiniteScrollNewTable(this)
566
+ // this.$refs.table.handleInfiniteScrollTableCompositionAPi()
567
+ infiniteScroll.handleInfiniteScrollNewTable(this)
568
568
  }, 500)
569
569
  }
570
570
  }
@@ -0,0 +1,23 @@
1
+ import { defineStore } from 'pinia'
2
+ import { useStorage } from '@vueuse/core'
3
+ export const tableStore = defineStore('tableStore', {
4
+ state: () => ({
5
+ filterValue: useStorage('filterValue', ''),
6
+ lastFilterValue: useStorage('lastFilterValue', ''),
7
+ visiblecolumns: useStorage('visiblecolumns', []as string[]),
8
+ prepared: useStorage('prepared', false),
9
+ user: useStorage('user', {})
10
+ }),
11
+ getters: {
12
+ },
13
+ actions: {
14
+ setFilterValue (val: string): void {
15
+ this.filterValue = val
16
+ },
17
+ cleanTableFilter (): void {
18
+ this.filterValue = ''
19
+ this.lastFilterValue = ''
20
+ }
21
+
22
+ }
23
+ })