Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-sliding-pagination

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-sliding-pagination - npm Package Compare versions

Comparing version 1.0.0-beta-1 to 1.0.0-beta-2

2

dist/vue-sliding-pagination.min.js

@@ -1,1 +0,1 @@

window.VueSlidingPagination=function(n){function e(t){if(i[t])return i[t].exports;var a=i[t]={i:t,l:!1,exports:{}};return n[t].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var i={};return e.m=n,e.c=i,e.d=function(n,i,t){e.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:t})},e.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(i,"a",i),i},e.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},e.p="",e(e.s=3)}([function(n,e){n.exports=function(n,e,i,t,a,r){var o,s=n=n||{},l=typeof n.default;"object"!==l&&"function"!==l||(o=n,s=n.default);var g="function"==typeof s?s.options:s;e&&(g.render=e.render,g.staticRenderFns=e.staticRenderFns,g._compiled=!0),i&&(g.functional=!0),a&&(g._scopeId=a);var c;if(r?(c=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,n||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),t&&t.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(r)},g._ssrRegister=c):t&&(c=t),c){var u=g.functional,d=u?g.render:g.beforeCreate;u?(g._injectStyles=c,g.render=function(n,e){return c.call(e),d(n,e)}):g.beforeCreate=d?[].concat(d,c):[c]}return{esModule:o,exports:s,options:g}}},function(n,e,i){"use strict";function t(n,e){var i=[];if("number"!=typeof n||"number"!=typeof e)return i;if(n>e){var t=n;n=e,e=t}for(var a=n;a<=e;a++)i.push(a);return i}var a=i(11);e.a={name:"SlidingPagination",props:{ariaPaginationLabel:{type:String,required:!1,default:"Pagination Navigation"},ariaGotoPageLabel:{type:String,required:!1,default:"Go to page %page% of %total%"},ariaPreviousPageLabel:{type:String,required:!1,default:"Go to previous page"},ariaNextPageLabel:{type:String,required:!1,default:"Go to next page"},ariaCurrentPageLabel:{type:String,required:!1,default:"Page %current% of %total%, current page"},current:{required:!0,type:Number},total:{required:!0,type:Number},slidingEndingSize:{required:!1,type:Number,default:2},slidingWindowSize:{required:!1,type:Number,default:3},nonSlidingSize:{required:!1,type:Number,default:9},pageComponent:{required:!1,type:String,default:"sliding-pagination-default-page"}},components:{SlidingPaginationDefaultPage:a.a},computed:{isSliding:function(){return this.total>this.nonSlidingSize},hasBeginningGap:function(){return!!this.isSliding&&this.current>this.beginningPages[this.beginningPages.length-1]+this.slidingWindowHalf},hasEndingGap:function(){return!!this.isSliding&&this.current<this.endingPages[0]-this.slidingWindowHalf},beginningPages:function(){return t(1,this.isSliding?this.slidingEndingSize:this.total)},endingPages:function(){return this.isSliding?t(this.total-this.slidingEndingSize+1,this.total):[]},slidingWindowHalf:function(){var n=this.slidingWindowSize/2;return this.slidingEndingSize%2==0?Math.ceil(n):Math.floor(n)},slidingWindowPages:function(){var n=[];if(!this.isSliding)return n;if(this.current<=this.slidingEndingSize+this.slidingWindowHalf)n=t(this.slidingEndingSize+1,this.slidingEndingSize+this.slidingWindowSize);else if(this.current>=this.endingPages[0]-this.slidingWindowHalf)n=t(this.total-this.slidingEndingSize-this.slidingWindowSize+1,this.total-this.slidingEndingSize);else{var e=0;this.slidingWindowSize%2==0&&(e=1),n=t(this.current-Math.floor(this.slidingWindowHalf/2)-e,this.current+Math.ceil(this.slidingWindowHalf/2))}return n},showPreviousPageAction:function(){return this.total>this.nonSlidingSize},showNextPageAction:function(){return this.total>this.nonSlidingSize}},methods:{replaceLabelVars:function(n,e){return n.replace("%current%",this.current).replace("%total%",this.total).replace("%page%",e)},isCurrentPage:function(n){return this.current===n},currentPageLabel:function(n){return this.replaceLabelVars(this.ariaCurrentPageLabel,n)},goToPage:function(n){this.$emit("page-change",n)},goToPageLabel:function(n){return this.replaceLabelVars(this.ariaGotoPageLabel,n)},pageLabel:function(n){return this.isCurrentPage(n)?this.currentPageLabel(n):this.goToPageLabel(n)}}}},function(n,e,i){"use strict";e.a={name:"SlidingPaginationDefaultPage",props:{ariaPageLabel:{type:String,required:!0},isCurrent:{type:Boolean,required:!0},page:{type:Number,required:!0}},computed:{currentClass:function(){return this.isCurrent?"c-sliding-pagination__page--current":""}},methods:{goToPage:function(){this.$emit("page-click",this.page)}}}},function(n,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(n){var e=i(5);n.exports={install:function(n,i){n.component("SlidingPagination",e.a)}}}.call(e,i(4)(n))},function(n,e){n.exports=function(n){if(!n.webpackPolyfill){var e=Object.create(n);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(n,e,i){"use strict";function t(n){o||i(6)}var a=i(1),r=i(13),o=!1,s=i(0),l=t,g=s(a.a,r.a,!1,l,null,null);g.options.__file="src/SlidingPagination.vue",e.a=g.exports},function(n,e,i){var t=i(7);"string"==typeof t&&(t=[[n.i,t,""]]),t.locals&&(n.exports=t.locals);i(9)("6a470eb6",t,!1,{})},function(n,e,i){e=n.exports=i(8)(!1),e.push([n.i,"\n.c-sliding-pagination {\n pointer-events: all;\n}\n.c-sliding-pagination__list {\n display: inline;\n margin: 0;\n padding: 0;\n}\n.c-sliding-pagination__list-element {\n display: inline-block;\n background: #246068;\n color: #fff;\n padding: .6em;\n border-radius: .2em;\n margin: 0;\n margin-right: .2em;\n margin-bottom: 1em;\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-property: background, color;\n transition-property: background, color;\n}\n.c-sliding-pagination__list-element:hover {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-property: background, color;\n transition-property: background, color;\n color: #e9e9e9;\n background: #69969c;\n}\n.c-sliding-pagination__list-element:last-of-type {\n margin-right: 0;\n}\n.c-sliding-pagination__list-element--active {\n background: #69969c;\n color: #e9e9e9;\n}\n.c-sliding-pagination__list-element--active:hover {\n color: #fff;\n background: #246068;\n cursor: default;\n}\n.c-sliding-pagination__list-element--disabled {\n background: none;\n color: inherit;\n cursor: not-allowed;\n}\n.c-sliding-pagination__page {\n color: inherit;\n padding: 0;\n margin: 0;\n text-decoration: none;\n}\n.c-sliding-pagination__page[disabled] {\n pointer-events: none;\n cursor: not-allowed;\n}\n",""])},function(n,e){function i(n,e){var i=n[1]||"",a=n[3];if(!a)return i;if(e&&"function"==typeof btoa){var r=t(a);return[i].concat(a.sources.map(function(n){return"/*# sourceURL="+a.sourceRoot+n+" */"})).concat([r]).join("\n")}return[i].join("\n")}function t(n){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"}n.exports=function(n){var e=[];return e.toString=function(){return this.map(function(e){var t=i(e,n);return e[2]?"@media "+e[2]+"{"+t+"}":t}).join("")},e.i=function(n,i){"string"==typeof n&&(n=[[null,n,""]]);for(var t={},a=0;a<this.length;a++){var r=this[a][0];"number"==typeof r&&(t[r]=!0)}for(a=0;a<n.length;a++){var o=n[a];"number"==typeof o[0]&&t[o[0]]||(i&&!o[2]?o[2]=i:i&&(o[2]="("+o[2]+") and ("+i+")"),e.push(o))}},e}},function(n,e,i){function t(n){for(var e=0;e<n.length;e++){var i=n[e],t=c[i.id];if(t){t.refs++;for(var a=0;a<t.parts.length;a++)t.parts[a](i.parts[a]);for(;a<i.parts.length;a++)t.parts.push(r(i.parts[a]));t.parts.length>i.parts.length&&(t.parts.length=i.parts.length)}else{for(var o=[],a=0;a<i.parts.length;a++)o.push(r(i.parts[a]));c[i.id]={id:i.id,refs:1,parts:o}}}}function a(){var n=document.createElement("style");return n.type="text/css",u.appendChild(n),n}function r(n){var e,i,t=document.querySelector("style["+b+'~="'+n.id+'"]');if(t){if(f)return h;t.parentNode.removeChild(t)}if(m){var r=p++;t=d||(d=a()),e=o.bind(null,t,r,!1),i=o.bind(null,t,r,!0)}else t=a(),e=s.bind(null,t),i=function(){t.parentNode.removeChild(t)};return e(n),function(t){if(t){if(t.css===n.css&&t.media===n.media&&t.sourceMap===n.sourceMap)return;e(n=t)}else i()}}function o(n,e,i,t){var a=i?"":t.css;if(n.styleSheet)n.styleSheet.cssText=v(e,a);else{var r=document.createTextNode(a),o=n.childNodes;o[e]&&n.removeChild(o[e]),o.length?n.insertBefore(r,o[e]):n.appendChild(r)}}function s(n,e){var i=e.css,t=e.media,a=e.sourceMap;if(t&&n.setAttribute("media",t),_.ssrId&&n.setAttribute(b,e.id),a&&(i+="\n/*# sourceURL="+a.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),n.styleSheet)n.styleSheet.cssText=i;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(i))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var g=i(10),c={},u=l&&(document.head||document.getElementsByTagName("head")[0]),d=null,p=0,f=!1,h=function(){},_=null,b="data-vue-ssr-id",m="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());n.exports=function(n,e,i,a){f=i,_=a||{};var r=g(n,e);return t(r),function(e){for(var i=[],a=0;a<r.length;a++){var o=r[a],s=c[o.id];s.refs--,i.push(s)}e?(r=g(n,e),t(r)):r=[];for(var a=0;a<i.length;a++){var s=i[a];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var v=function(){var n=[];return function(e,i){return n[e]=i,n.filter(Boolean).join("\n")}}()},function(n,e){n.exports=function(n,e){for(var i=[],t={},a=0;a<e.length;a++){var r=e[a],o=r[0],s=r[1],l=r[2],g=r[3],c={id:n+":"+a,css:s,media:l,sourceMap:g};t[o]?t[o].parts.push(c):i.push(t[o]={id:o,parts:[c]})}return i}},function(n,e,i){"use strict";var t=i(2),a=i(12),r=i(0),o=r(t.a,a.a,!1,null,null,null);o.options.__file="src/SlidingPaginationDefaultPage.vue",e.a=o.exports},function(n,e,i){"use strict";var t=function(){var n=this,e=n.$createElement;return(n._self._c||e)("a",{staticClass:"c-sliding-pagination__page",attrs:{href:"#","aria-label":n.ariaPageLabel},on:{click:function(e){e.stopPropagation(),e.preventDefault(),n.goToPage(n.page)}}},[n._v("\n "+n._s(n.page)+"\n")])},a=[];t._withStripped=!0;var r={render:t,staticRenderFns:a};e.a=r},function(n,e,i){"use strict";var t=function(){var n=this,e=n.$createElement,i=n._self._c||e;return i("nav",{staticClass:"c-sliding-pagination",attrs:{"aria-label":n.ariaPaginationLabel}},[i("ul",{staticClass:"c-sliding-pagination__list"},[n.showPreviousPageAction?i("li",{staticClass:"c-sliding-pagination__list-element",class:1==n.current?"c-sliding-pagination__list-element--disabled":""},[i("a",{staticClass:"c-sliding-pagination__page",attrs:{href:"#","aria-label":n.ariaPreviousPageLabel,disabled:1==n.current},on:{click:function(e){e.preventDefault(),e.stopPropagation(),n.goToPage(n.current-1)}}},[n._t("previous-page",[n._v("«")])],2)]):n._e(),n._l(n.beginningPages,function(e){return i("li",{key:e,staticClass:"c-sliding-pagination__list-element",class:n.isCurrentPage(e)?"c-sliding-pagination__list-element--active":""},[i(n.pageComponent,{tag:"component",attrs:{"is-current":n.isCurrentPage(e),"aria-page-label":n.pageLabel(e),page:e},on:{"page-click":function(i){n.goToPage(e)}}})],1)}),n.hasBeginningGap?i("li",{staticClass:"c-sliding-pagination__list-element c-sliding-pagination__list-element--disabled",attrs:{"aria-hidden":"true"}},[n._t("gap-left",[i("a",{staticClass:"c-sliding-pagination__page",attrs:{href:"#",disabled:""}},[n._v("\n …\n ")])])],2):n._e(),n._l(n.slidingWindowPages,function(e){return i("li",{key:e,staticClass:"c-sliding-pagination__list-element",class:n.isCurrentPage(e)?"c-sliding-pagination__list-element--active":""},[i(n.pageComponent,{tag:"component",attrs:{"is-current":n.isCurrentPage(e),"aria-page-label":n.pageLabel(e),page:e},on:{"page-click":function(i){n.goToPage(e)}}})],1)}),n.hasEndingGap?i("li",{staticClass:"c-sliding-pagination__list-element c-sliding-pagination__list-element--disabled",attrs:{"aria-hidden":"true"}},[n._t("gap-right",[i("a",{staticClass:"c-sliding-pagination__page",attrs:{href:"#",disabled:""}},[n._v("\n …\n ")])])],2):n._e(),n._l(n.endingPages,function(e){return i("li",{key:e,staticClass:"c-sliding-pagination__list-element",class:n.isCurrentPage(e)?"c-sliding-pagination__list-element--active":""},[i(n.pageComponent,{tag:"component",attrs:{"is-current":n.isCurrentPage(e),"aria-page-label":n.pageLabel(e),page:e},on:{"page-click":function(i){n.goToPage(e)}}})],1)}),n.showNextPageAction?i("li",{staticClass:"c-sliding-pagination__list-element",class:n.current==n.total?"c-sliding-pagination__list-element--disabled":""},[i("a",{staticClass:"c-sliding-pagination__page",attrs:{href:"#","aria-label":n.ariaNextPageLabel,disabled:n.current==n.total},on:{click:function(e){e.preventDefault(),e.stopPropagation(),n.goToPage(n.current+1)}}},[n._t("next-page",[n._v("»")])],2)]):n._e()],2)])},a=[];t._withStripped=!0;var r={render:t,staticRenderFns:a};e.a=r}]);
window.VueSlidingPagination=function(n){function e(t){if(i[t])return i[t].exports;var a=i[t]={i:t,l:!1,exports:{}};return n[t].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var i={};return e.m=n,e.c=i,e.d=function(n,i,t){e.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:t})},e.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(i,"a",i),i},e.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},e.p="",e(e.s=3)}([function(n,e){n.exports=function(n,e,i,t,a,r){var s,o=n=n||{},l=typeof n.default;"object"!==l&&"function"!==l||(s=n,o=n.default);var g="function"==typeof o?o.options:o;e&&(g.render=e.render,g.staticRenderFns=e.staticRenderFns,g._compiled=!0),i&&(g.functional=!0),a&&(g._scopeId=a);var u;if(r?(u=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,n||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),t&&t.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(r)},g._ssrRegister=u):t&&(u=t),u){var c=g.functional,d=c?g.render:g.beforeCreate;c?(g._injectStyles=u,g.render=function(n,e){return u.call(e),d(n,e)}):g.beforeCreate=d?[].concat(d,u):[u]}return{esModule:s,exports:o,options:g}}},function(n,e,i){"use strict";function t(n,e){var i=[];if("number"!=typeof n||"number"!=typeof e)return i;if(n>e){var t=n;n=e,e=t}for(var a=n;a<=e;a++)i.push(a);return i}var a=i(10);e.a={name:"SlidingPagination",props:{ariaPaginationLabel:{type:String,required:!1,default:"Pagination Navigation"},ariaGotoPageLabel:{type:String,required:!1,default:"Go to page %page% of %total%"},ariaPreviousPageLabel:{type:String,required:!1,default:"Go to previous page"},ariaNextPageLabel:{type:String,required:!1,default:"Go to next page"},ariaCurrentPageLabel:{type:String,required:!1,default:"Page %current% of %total%, current page"},current:{required:!0,type:Number},total:{required:!0,type:Number},slidingEndingSize:{required:!1,type:Number,default:2},slidingWindowSize:{required:!1,type:Number,default:3},nonSlidingSize:{required:!1,type:Number,default:9},pageComponent:{required:!1,type:String,default:"sliding-pagination-default-page"}},components:{SlidingPaginationDefaultPage:a.a},computed:{isSliding:function(){return this.total>this.nonSlidingSize},hasBeginningGap:function(){return!!this.isSliding&&this.current>this.beginningPages[this.beginningPages.length-1]+this.slidingWindowHalf},hasEndingGap:function(){return!!this.isSliding&&this.current<this.endingPages[0]-this.slidingWindowHalf},beginningPages:function(){return t(1,this.isSliding?this.slidingEndingSize:this.total)},endingPages:function(){return this.isSliding?t(this.total-this.slidingEndingSize+1,this.total):[]},slidingWindowHalf:function(){var n=this.slidingWindowSize/2;return this.slidingEndingSize%2==0?Math.ceil(n):Math.floor(n)},slidingWindowPages:function(){var n=[];if(!this.isSliding)return n;if(this.current<=this.slidingEndingSize+this.slidingWindowHalf)n=t(this.slidingEndingSize+1,this.slidingEndingSize+this.slidingWindowSize);else if(this.current>=this.endingPages[0]-this.slidingWindowHalf)n=t(this.total-this.slidingEndingSize-this.slidingWindowSize+1,this.total-this.slidingEndingSize);else{var e=0;this.slidingWindowSize%2==0&&(e=1),n=t(this.current-Math.floor(this.slidingWindowHalf/2)-e,this.current+Math.ceil(this.slidingWindowHalf/2))}return n},showPreviousPageAction:function(){return this.total>this.nonSlidingSize},showNextPageAction:function(){return this.total>this.nonSlidingSize}},methods:{replaceLabelVars:function(n,e){return n.replace("%current%",this.current).replace("%total%",this.total).replace("%page%",e)},isCurrentPage:function(n){return this.current===n},currentPageLabel:function(n){return this.replaceLabelVars(this.ariaCurrentPageLabel,n)},goToPage:function(n){this.$emit("page-change",n)},goToPageLabel:function(n){return this.replaceLabelVars(this.ariaGotoPageLabel,n)},pageLabel:function(n){return this.isCurrentPage(n)?this.currentPageLabel(n):this.goToPageLabel(n)}}}},function(n,e,i){"use strict";e.a={name:"SlidingPaginationDefaultPage",props:{ariaPageLabel:{type:String,required:!0},isCurrent:{type:Boolean,required:!0},page:{type:Number,required:!0}},computed:{currentClass:function(){return this.isCurrent?"c-sliding-pagination__page--current":""}},methods:{goToPage:function(){this.$emit("page-click",this.page)}}}},function(n,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=i(4);e.default={install:function(n,e){n.component("SlidingPagination",t.a)}}},function(n,e,i){"use strict";function t(n){s||i(5)}var a=i(1),r=i(12),s=!1,o=i(0),l=t,g=o(a.a,r.a,!1,l,null,null);g.options.__file="src/SlidingPagination.vue",e.a=g.exports},function(n,e,i){var t=i(6);"string"==typeof t&&(t=[[n.i,t,""]]),t.locals&&(n.exports=t.locals);i(8)("6a470eb6",t,!1,{})},function(n,e,i){e=n.exports=i(7)(!1),e.push([n.i,"\n.c-sliding-pagination {\n pointer-events: all;\n}\n.c-sliding-pagination__list {\n display: inline;\n margin: 0;\n padding: 0;\n}\n.c-sliding-pagination__list-element {\n display: inline-block;\n background: #246068;\n color: #fff;\n padding: .6em;\n border-radius: .2em;\n margin: 0;\n margin-right: .2em;\n margin-bottom: 1em;\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-property: background, color;\n transition-property: background, color;\n}\n.c-sliding-pagination__list-element:hover {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-property: background, color;\n transition-property: background, color;\n color: #e9e9e9;\n background: #69969c;\n}\n.c-sliding-pagination__list-element:last-of-type {\n margin-right: 0;\n}\n.c-sliding-pagination__list-element--active {\n background: #69969c;\n color: #e9e9e9;\n}\n.c-sliding-pagination__list-element--active:hover {\n color: #fff;\n background: #246068;\n cursor: default;\n}\n.c-sliding-pagination__list-element--disabled {\n background: none;\n color: inherit;\n cursor: not-allowed;\n}\n.c-sliding-pagination__page {\n color: inherit;\n padding: 0;\n margin: 0;\n text-decoration: none;\n}\n.c-sliding-pagination__page[disabled] {\n pointer-events: none;\n cursor: not-allowed;\n}\n",""])},function(n,e){function i(n,e){var i=n[1]||"",a=n[3];if(!a)return i;if(e&&"function"==typeof btoa){var r=t(a);return[i].concat(a.sources.map(function(n){return"/*# sourceURL="+a.sourceRoot+n+" */"})).concat([r]).join("\n")}return[i].join("\n")}function t(n){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"}n.exports=function(n){var e=[];return e.toString=function(){return this.map(function(e){var t=i(e,n);return e[2]?"@media "+e[2]+"{"+t+"}":t}).join("")},e.i=function(n,i){"string"==typeof n&&(n=[[null,n,""]]);for(var t={},a=0;a<this.length;a++){var r=this[a][0];"number"==typeof r&&(t[r]=!0)}for(a=0;a<n.length;a++){var s=n[a];"number"==typeof s[0]&&t[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),e.push(s))}},e}},function(n,e,i){function t(n){for(var e=0;e<n.length;e++){var i=n[e],t=u[i.id];if(t){t.refs++;for(var a=0;a<t.parts.length;a++)t.parts[a](i.parts[a]);for(;a<i.parts.length;a++)t.parts.push(r(i.parts[a]));t.parts.length>i.parts.length&&(t.parts.length=i.parts.length)}else{for(var s=[],a=0;a<i.parts.length;a++)s.push(r(i.parts[a]));u[i.id]={id:i.id,refs:1,parts:s}}}}function a(){var n=document.createElement("style");return n.type="text/css",c.appendChild(n),n}function r(n){var e,i,t=document.querySelector("style["+m+'~="'+n.id+'"]');if(t){if(f)return h;t.parentNode.removeChild(t)}if(v){var r=p++;t=d||(d=a()),e=s.bind(null,t,r,!1),i=s.bind(null,t,r,!0)}else t=a(),e=o.bind(null,t),i=function(){t.parentNode.removeChild(t)};return e(n),function(t){if(t){if(t.css===n.css&&t.media===n.media&&t.sourceMap===n.sourceMap)return;e(n=t)}else i()}}function s(n,e,i,t){var a=i?"":t.css;if(n.styleSheet)n.styleSheet.cssText=b(e,a);else{var r=document.createTextNode(a),s=n.childNodes;s[e]&&n.removeChild(s[e]),s.length?n.insertBefore(r,s[e]):n.appendChild(r)}}function o(n,e){var i=e.css,t=e.media,a=e.sourceMap;if(t&&n.setAttribute("media",t),_.ssrId&&n.setAttribute(m,e.id),a&&(i+="\n/*# sourceURL="+a.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),n.styleSheet)n.styleSheet.cssText=i;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(i))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var g=i(9),u={},c=l&&(document.head||document.getElementsByTagName("head")[0]),d=null,p=0,f=!1,h=function(){},_=null,m="data-vue-ssr-id",v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());n.exports=function(n,e,i,a){f=i,_=a||{};var r=g(n,e);return t(r),function(e){for(var i=[],a=0;a<r.length;a++){var s=r[a],o=u[s.id];o.refs--,i.push(o)}e?(r=g(n,e),t(r)):r=[];for(var a=0;a<i.length;a++){var o=i[a];if(0===o.refs){for(var l=0;l<o.parts.length;l++)o.parts[l]();delete u[o.id]}}}};var b=function(){var n=[];return function(e,i){return n[e]=i,n.filter(Boolean).join("\n")}}()},function(n,e){n.exports=function(n,e){for(var i=[],t={},a=0;a<e.length;a++){var r=e[a],s=r[0],o=r[1],l=r[2],g=r[3],u={id:n+":"+a,css:o,media:l,sourceMap:g};t[s]?t[s].parts.push(u):i.push(t[s]={id:s,parts:[u]})}return i}},function(n,e,i){"use strict";var t=i(2),a=i(11),r=i(0),s=r(t.a,a.a,!1,null,null,null);s.options.__file="src/SlidingPaginationDefaultPage.vue",e.a=s.exports},function(n,e,i){"use strict";var t=function(){var n=this,e=n.$createElement;return(n._self._c||e)("a",{staticClass:"c-sliding-pagination__page",attrs:{href:"#","aria-label":n.ariaPageLabel},on:{click:function(e){e.stopPropagation(),e.preventDefault(),n.goToPage(n.page)}}},[n._v("\n "+n._s(n.page)+"\n")])},a=[];t._withStripped=!0;var r={render:t,staticRenderFns:a};e.a=r},function(n,e,i){"use strict";var t=function(){var n=this,e=n.$createElement,i=n._self._c||e;return i("nav",{staticClass:"c-sliding-pagination",attrs:{"aria-label":n.ariaPaginationLabel}},[i("ul",{staticClass:"c-sliding-pagination__list"},[n.showPreviousPageAction?i("li",{staticClass:"c-sliding-pagination__list-element",class:1==n.current?"c-sliding-pagination__list-element--disabled":""},[i("a",{staticClass:"c-sliding-pagination__page",attrs:{href:"#","aria-label":n.ariaPreviousPageLabel,disabled:1==n.current},on:{click:function(e){e.preventDefault(),e.stopPropagation(),n.goToPage(n.current-1)}}},[n._t("previous-page",[n._v("«")])],2)]):n._e(),n._l(n.beginningPages,function(e){return i("li",{key:e,staticClass:"c-sliding-pagination__list-element",class:n.isCurrentPage(e)?"c-sliding-pagination__list-element--active":""},[i(n.pageComponent,{tag:"component",attrs:{"is-current":n.isCurrentPage(e),"aria-page-label":n.pageLabel(e),page:e},on:{"page-click":function(i){n.goToPage(e)}}})],1)}),n.hasBeginningGap?i("li",{staticClass:"c-sliding-pagination__list-element c-sliding-pagination__list-element--disabled",attrs:{"aria-hidden":"true"}},[n._t("gap-left",[i("a",{staticClass:"c-sliding-pagination__page",attrs:{href:"#",disabled:""}},[n._v("\n …\n ")])])],2):n._e(),n._l(n.slidingWindowPages,function(e){return i("li",{key:e,staticClass:"c-sliding-pagination__list-element",class:n.isCurrentPage(e)?"c-sliding-pagination__list-element--active":""},[i(n.pageComponent,{tag:"component",attrs:{"is-current":n.isCurrentPage(e),"aria-page-label":n.pageLabel(e),page:e},on:{"page-click":function(i){n.goToPage(e)}}})],1)}),n.hasEndingGap?i("li",{staticClass:"c-sliding-pagination__list-element c-sliding-pagination__list-element--disabled",attrs:{"aria-hidden":"true"}},[n._t("gap-right",[i("a",{staticClass:"c-sliding-pagination__page",attrs:{href:"#",disabled:""}},[n._v("\n …\n ")])])],2):n._e(),n._l(n.endingPages,function(e){return i("li",{key:e,staticClass:"c-sliding-pagination__list-element",class:n.isCurrentPage(e)?"c-sliding-pagination__list-element--active":""},[i(n.pageComponent,{tag:"component",attrs:{"is-current":n.isCurrentPage(e),"aria-page-label":n.pageLabel(e),page:e},on:{"page-click":function(i){n.goToPage(e)}}})],1)}),n.showNextPageAction?i("li",{staticClass:"c-sliding-pagination__list-element",class:n.current==n.total?"c-sliding-pagination__list-element--disabled":""},[i("a",{staticClass:"c-sliding-pagination__page",attrs:{href:"#","aria-label":n.ariaNextPageLabel,disabled:n.current==n.total},on:{click:function(e){e.preventDefault(),e.stopPropagation(),n.goToPage(n.current+1)}}},[n._t("next-page",[n._v("»")])],2)]):n._e()],2)])},a=[];t._withStripped=!0;var r={render:t,staticRenderFns:a};e.a=r}]);
{
"name": "vue-sliding-pagination",
"version": "1.0.0-beta-1",
"version": "1.0.0-beta-2",
"description": "Sliding pagination component",
"author": "eFrane <efrane@meanderingsoul.com>",
"private": false,
"license": "MIT",
"main": "dist/vue-sliding-pagination.umd.js",

@@ -11,11 +11,10 @@ "unpkg": "dist/vue-sliding-pagination.min.js",

"build": "rimraf ./dist && webpack --config webpack.config.js",
"unit": "jest --config test/unit/jest.conf.js --coverage",
"package": "yarn run prepublish && yarn pack",
"prepublish": "yarn run lint && yarn run test && yarn run build",
"unit": "jest --config test/unit/jest.conf.js",
"prepare": "yarn run lint && yarn run test && yarn run build",
"tdd": "yarn run unit --watch",
"test": "yarn run unit",
"test": "yarn run unit --coverage",
"lint": "eslint --ext .js,.vue src test/unit"
},
"dependencies": {
"vue": "^2.5.2"
"vue": ">=2.4"
},

@@ -55,3 +54,2 @@ "devDependencies": {

"jest-serializer-vue": "^2.0.2",
"node-notifier": "^5.1.2",
"node-sass": "^4.10.0",

@@ -75,3 +73,2 @@ "optimize-css-assets-webpack-plugin": "^3.2.0",

"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",

@@ -78,0 +75,0 @@ "webpack-merge": "^4.1.0"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc