From 9e92a9ea5aa43c38905764c2ef292b81af2ef50c Mon Sep 17 00:00:00 2001 From: ddgll Date: Thu, 17 Aug 2017 09:57:43 +0200 Subject: [PATCH] BUGFIX Select and toggleSelection --- README.md | 4 + dev/list.vue | 9 +- dist/index.js | 2 +- package.json | 18 ++-- src/modules/list-module.1.js | 195 +++++++++++++++++++++++++++++++++++ src/modules/list-module.js | 8 +- 6 files changed, 218 insertions(+), 18 deletions(-) create mode 100644 src/modules/list-module.1.js diff --git a/README.md b/README.md index 5f03825..c25a69d 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,10 @@ IndexedDB wrapper for Vuejs based on Dexie }) ``` +# 0.1.4 Enhancement + BUGFIX on listSelect vuex action + BUGFIX on toggleSelect vuex action + # 0.1.3 Enhancement Add Dexie DB version in options diff --git a/dev/list.vue b/dev/list.vue index 5ac5c88..d94b279 100644 --- a/dev/list.vue +++ b/dev/list.vue @@ -12,8 +12,8 @@ -
  • - {{ test.title }} +
  • + {{ test.title }}
  • @@ -32,8 +32,8 @@ -
  • - {{ test.title }} +
  • + {{ test.title }}
  • @@ -60,6 +60,7 @@ export default { this.$db.tests.toArray().then( tests => this.tests = tests ) }, methods: { + ...mapActions(['testsSelect', 'testsToggleSelection']), add (value){ console.log('ADD', value) this.$store.dispatch('testsAdd', { id: uuid(), title: value, created_at: new Date(), updated_at: new Date() } ) diff --git a/dist/index.js b/dist/index.js index c690788..e2bfb26 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("lodash"),require("dexie")):"function"==typeof define&&define.amd?define(["lodash","dexie"],n):"object"==typeof exports?exports.VueIdb=n(require("lodash"),require("dexie")):t.VueIdb=n(t.lodash,t.dexie)}(this,function(t,n){return function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var e={};return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=91)}([function(t,n,e){var r=e(2),i=e(24),o=e(12),u=e(13),c=e(25),a=function(t,n,e){var f,s,l,h,v=t&a.F,p=t&a.G,d=t&a.S,y=t&a.P,g=t&a.B,_=p?r:d?r[n]||(r[n]={}):(r[n]||{}).prototype,m=p?i:i[n]||(i[n]={}),b=m.prototype||(m.prototype={});p&&(e=n);for(f in e)s=!v&&_&&void 0!==_[f],l=(s?_:e)[f],h=g&&s?c(l,r):y&&"function"==typeof l?c(Function.call,l):l,_&&u(_,f,l,t&a.U),m[f]!=l&&o(m,f,h),y&&b[f]!=l&&(b[f]=l)};r.core=i,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,n,e){var r=e(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(58)("wks"),i=e(39),o=e(2).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,n,e){t.exports=!e(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(1),i=e(103),o=e(23),u=Object.defineProperty;n.f=e(6)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(30),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n,e){var r=e(19);t.exports=function(t){return Object(r(t))}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(7),i=e(29);t.exports=e(6)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(2),i=e(12),o=e(10),u=e(39)("src"),c=Function.toString,a=(""+c).split("toString");e(24).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,e,c){var f="function"==typeof e;f&&(o(e,"name")||i(e,"name",n)),t[n]!==e&&(f&&(o(e,u)||i(e,u,t[n]?""+t[n]:a.join(String(n)))),t===r?t[n]=e:c?t[n]?t[n]=e:i(t,n,e):(delete t[n],i(t,n,e)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[u]||c.call(this)})},function(t,n,e){var r=e(0),i=e(3),o=e(19),u=/"/g,c=function(t,n,e,r){var i=String(o(t)),c="<"+n;return""!==e&&(c+=" "+e+'="'+String(r).replace(u,""")+'"'),c+">"+i+""};t.exports=function(t,n){var e={};e[t]=n(c),r(r.P+r.F*i(function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3}),"String",e)}},function(t,n,e){var r=e(47),i=e(19);t.exports=function(t){return r(i(t))}},function(t,n,e){var r=e(48),i=e(29),o=e(15),u=e(23),c=e(10),a=e(103),f=Object.getOwnPropertyDescriptor;n.f=e(6)?f:function(t,n){if(t=o(t),n=u(n,!0),a)try{return f(t,n)}catch(t){}if(c(t,n))return i(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(10),i=e(9),o=e(77)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(3);t.exports=function(t,n){return!!t&&r(function(){n?t.call(null,function(){},1):t.call(null)})}},function(t,n,e){var r=e(25),i=e(47),o=e(9),u=e(8),c=e(141);t.exports=function(t,n){var e=1==t,a=2==t,f=3==t,s=4==t,l=6==t,h=5==t||l,v=n||c;return function(n,c,p){for(var d,y,g=o(n),_=i(g),m=r(c,p,3),b=u(_.length),S=0,E=e?v(n,b):a?v(n,0):void 0;b>S;S++)if((h||S in _)&&(d=_[S],y=m(d,S,g),t))if(e)E[S]=y;else if(y)switch(t){case 3:return!0;case 5:return d;case 6:return S;case 2:E.push(d)}else if(s)return!1;return l?-1:f||s?s:E}}},function(t,n,e){var r=e(0),i=e(24),o=e(3);t.exports=function(t,n){var e=(i.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*o(function(){e(1)}),"Object",u)}},function(t,n,e){var r=e(4);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){var e=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=e)},function(t,n,e){var r=e(11);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n,e){var r=e(119),i=e(0),o=e(58)("metadata"),u=o.store||(o.store=new(e(122))),c=function(t,n,e){var i=u.get(t);if(!i){if(!e)return;u.set(t,i=new r)}var o=i.get(n);if(!o){if(!e)return;i.set(n,o=new r)}return o},a=function(t,n,e){var r=c(n,e,!1);return void 0!==r&&r.has(t)},f=function(t,n,e){var r=c(n,e,!1);return void 0===r?void 0:r.get(t)},s=function(t,n,e,r){c(e,r,!0).set(t,n)},l=function(t,n){var e=c(t,n,!1),r=[];return e&&e.forEach(function(t,n){r.push(n)}),r},h=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},v=function(t){i(i.S,"Reflect",t)};t.exports={store:u,map:c,has:a,get:f,set:s,keys:l,key:h,exp:v}},function(t,n,e){"use strict";if(e(6)){var r=e(32),i=e(2),o=e(3),u=e(0),c=e(59),a=e(84),f=e(25),s=e(31),l=e(29),h=e(12),v=e(36),p=e(30),d=e(8),y=e(38),g=e(23),_=e(10),m=e(116),b=e(46),S=e(4),E=e(9),w=e(69),x=e(33),O=e(17),T=e(34).f,P=e(86),A=e(39),I=e(5),F=e(21),L=e(49),M=e(78),j=e(87),N=e(43),D=e(55),k=e(37),C=e(62),R=e(96),U=e(7),B=e(16),V=U.f,G=B.f,W=i.RangeError,z=i.TypeError,Y=i.Uint8Array,K=Array.prototype,q=a.ArrayBuffer,H=a.DataView,J=F(0),X=F(2),$=F(3),Z=F(4),Q=F(5),tt=F(6),nt=L(!0),et=L(!1),rt=j.values,it=j.keys,ot=j.entries,ut=K.lastIndexOf,ct=K.reduce,at=K.reduceRight,ft=K.join,st=K.sort,lt=K.slice,ht=K.toString,vt=K.toLocaleString,pt=I("iterator"),dt=I("toStringTag"),yt=A("typed_constructor"),gt=A("def_constructor"),_t=c.CONSTR,mt=c.TYPED,bt=c.VIEW,St=F(1,function(t,n){return Pt(M(t,t[gt]),n)}),Et=o(function(){return 1===new Y(new Uint16Array([1]).buffer)[0]}),wt=!!Y&&!!Y.prototype.set&&o(function(){new Y(1).set({})}),xt=function(t,n){if(void 0===t)throw z("Wrong length!");var e=+t,r=d(t);if(n&&!m(e,r))throw W("Wrong length!");return r},Ot=function(t,n){var e=p(t);if(e<0||e%n)throw W("Wrong offset!");return e},Tt=function(t){if(S(t)&&mt in t)return t;throw z(t+" is not a typed array!")},Pt=function(t,n){if(!(S(t)&&yt in t))throw z("It is not a typed array constructor!");return new t(n)},At=function(t,n){return It(M(t,t[gt]),n)},It=function(t,n){for(var e=0,r=n.length,i=Pt(t,r);r>e;)i[e]=n[e++];return i},Ft=function(t,n,e){V(t,n,{get:function(){return this._d[e]}})},Lt=function(t){var n,e,r,i,o,u,c=E(t),a=arguments.length,s=a>1?arguments[1]:void 0,l=void 0!==s,h=P(c);if(void 0!=h&&!w(h)){for(u=h.call(c),r=[],n=0;!(o=u.next()).done;n++)r.push(o.value);c=r}for(l&&a>2&&(s=f(s,arguments[2],2)),n=0,e=d(c.length),i=Pt(this,e);e>n;n++)i[n]=l?s(c[n],n):c[n];return i},Mt=function(){for(var t=0,n=arguments.length,e=Pt(this,n);n>t;)e[t]=arguments[t++];return e},jt=!!Y&&o(function(){vt.call(new Y(1))}),Nt=function(){return vt.apply(jt?lt.call(Tt(this)):Tt(this),arguments)},Dt={copyWithin:function(t,n){return R.call(Tt(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return C.apply(Tt(this),arguments)},filter:function(t){return At(this,X(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){J(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ft.apply(Tt(this),arguments)},lastIndexOf:function(t){return ut.apply(Tt(this),arguments)},map:function(t){return St(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ct.apply(Tt(this),arguments)},reduceRight:function(t){return at.apply(Tt(this),arguments)},reverse:function(){for(var t,n=this,e=Tt(n).length,r=Math.floor(e/2),i=0;i1?arguments[1]:void 0)},sort:function(t){return st.call(Tt(this),t)},subarray:function(t,n){var e=Tt(this),r=e.length,i=y(t,r);return new(M(e,e[gt]))(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,d((void 0===n?r:y(n,r))-i))}},kt=function(t,n){return At(this,lt.call(Tt(this),t,n))},Ct=function(t){Tt(this);var n=Ot(arguments[1],1),e=this.length,r=E(t),i=d(r.length),o=0;if(i+n>e)throw W("Wrong length!");for(;o255?255:255&r),i.v[p](e*n+i.o,r,Et)},I=function(t,n){V(t,n,{get:function(){return P(this,n)},set:function(t){return A(this,n,t)},enumerable:!0})};m?(y=e(function(t,e,r,i){s(t,y,f,"_d");var o,u,c,a,l=0,v=0;if(S(e)){if(!(e instanceof q||"ArrayBuffer"==(a=b(e))||"SharedArrayBuffer"==a))return mt in e?It(y,e):Lt.call(y,e);o=e,v=Ot(r,n);var p=e.byteLength;if(void 0===i){if(p%n)throw W("Wrong length!");if((u=p-v)<0)throw W("Wrong length!")}else if((u=d(i)*n)+v>p)throw W("Wrong length!");c=u/n}else c=xt(e,!0),u=c*n,o=new q(u);for(h(t,"_d",{b:o,o:v,l:u,e:c,v:new H(o)});l0?r:e)(t)}},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n){t.exports=!1},function(t,n,e){var r=e(1),i=e(109),o=e(65),u=e(77)("IE_PROTO"),c=function(){},a=function(){var t,n=e(64)("iframe"),r=o.length;for(n.style.display="none",e(67).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("