Skip to content

Commit

Permalink
feat: upgrade all deps to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
wenqing committed Jan 2, 2024
1 parent 9f206a1 commit 3455e1e
Show file tree
Hide file tree
Showing 9 changed files with 1,309 additions and 1,171 deletions.
2 changes: 1 addition & 1 deletion lib/paginationbar.cjs

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions lib/paginationbar.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
var m = Object.defineProperty;
var d = (s, e, t) => e in s ? m(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
var p = (s, e, t) => (d(s, typeof e != "symbol" ? e + "" : e, t), t);
import { removeClass as l, addClass as h, css as u } from "fourdom";
import { removeClass as u, addClass as h, css as l } from "fourdom";
var c = /* @__PURE__ */ ((s) => (s.getContainerElError = "Can not find container element.", s.getQuickNextElError = "Can not find quick next element.", s.getQuickPrevElError = "Can not find quick prev element.", s))(c || {}), n = /* @__PURE__ */ ((s) => (s.containerClassName = "pagination-bar-container", s.pagerWrapperClassName = "pagination-bar__pager", s.pagerItemClassName = "pagination-bar__pager__number", s.prevButtonClassName = "pagination-bar__prev", s.nextButtonClassName = "pagination-bar__next", s.totalClassName = "pagination-bar__total", s.jumperClassName = "pagination-bar__jumper", s.sizesClassName = "pagination-bar__sizes", s.themeClassNamePrefix = "theme--", s))(n || {});
const b = '<svg xmlns="http://www.w3.org/2000/svg" width="1em" class="icon" viewBox="0 0 1024 1024" fill="#707070" style="--svg-origin-width:200;--svg-origin-height:200;--svg-origin-width--with-unit:200px;--svg-origin-height--with-unit:200px;" data-svg-origin-width="200" data-svg-origin-height="200" font-size="200"><path d="M650.721 191.69c-8.782 0-17.565 3.237-24.268 9.709L328.968 488.573c-13.408 12.933-13.408 33.923 0 46.856L626.454 822.6c13.408 12.944 35.13 12.944 48.538 0 13.409-12.932 13.409-33.923 0-46.855L401.775 512 674.99 248.253c13.409-12.932 13.409-33.923 0-46.855-6.704-6.471-15.486-9.708-24.269-9.707z"/></svg>', P = '<svg xmlns="http://www.w3.org/2000/svg" width="1em" class="icon" viewBox="0 0 1024 1024" fill="#707070" style="--svg-origin-width:200;--svg-origin-height:200;--svg-origin-width--with-unit:200px;--svg-origin-height--with-unit:200px;" data-svg-origin-width="200" data-svg-origin-height="200" font-size="200"><path d="M372.68 191.69c8.782 0 17.565 3.237 24.269 9.709l297.484 287.175c13.408 12.933 13.408 33.923 0 46.856L396.948 822.602c-13.409 12.944-35.13 12.944-48.538 0-13.408-12.932-13.408-33.923 0-46.855l273.216-263.745L348.41 248.253c-13.408-12.932-13.408-33.923 0-46.855 6.704-6.471 15.487-9.708 24.269-9.707z"/></svg>', v = '<svg xmlns="http://www.w3.org/2000/svg" width="1em" class="icon" viewBox="0 0 1024 1024" fill="#515151" style="--svg-origin-width:200;--svg-origin-height:200;--svg-origin-width--with-unit:200px;--svg-origin-height--with-unit:200px;" data-svg-origin-width="200" data-svg-origin-height="200" font-size="200"><path d="M197.031 417.342c-52.237 0-94.615 42.398-94.615 94.638 0 52.256 42.378 94.634 94.615 94.634 52.24 0 94.637-42.378 94.637-94.634 0-52.24-42.397-94.638-94.637-94.638zM512 417.342c-52.259 0-94.615 42.398-94.615 94.638 0 52.256 42.356 94.634 94.614 94.634 52.238 0 94.595-42.378 94.595-94.634 0-52.24-42.357-94.638-94.595-94.638zM826.926 417.342c-52.198 0-94.594 42.398-94.594 94.638 0 52.256 42.397 94.634 94.594 94.634 52.26 0 94.657-42.378 94.657-94.634 0-52.24-42.398-94.638-94.657-94.638z"/></svg>', f = '<svg xmlns="http://www.w3.org/2000/svg" width="1em" class="icon" viewBox="0 0 1024 1024" fill="#515151" style="--svg-origin-width:200;--svg-origin-height:200;--svg-origin-width--with-unit:200px;--svg-origin-height--with-unit:200px;" data-svg-origin-width="200" data-svg-origin-height="200" font-size="200"><path d="M531.2 889.6c-17.067 0-32-14.933-32-32 0-8.533 4.267-17.067 8.533-21.333L832 512 509.867 187.733c-12.8-12.8-12.8-32-2.134-44.8s32-12.8 44.8-2.133c0 0 2.134 0 2.134 2.133l330.666 332.8c21.334 21.334 21.334 55.467 0 74.667L554.667 881.067c-6.4 6.4-14.934 8.533-23.467 8.533zm309.333-369.067z"/><path d="M155.733 889.6c-17.066 0-32-14.933-32-32 0-8.533 4.267-17.067 8.534-21.333L456.533 512 132.267 187.733c-10.667-12.8-10.667-32 2.133-44.8 12.8-10.666 32-10.666 42.667 0l330.666 332.8c21.334 21.334 21.334 55.467 0 74.667L179.2 881.067c-6.4 6.4-14.933 8.533-23.467 8.533zm309.334-369.067z"/></svg>';
class C {
class x {
constructor(e) {
p(this, "options", {
container: "#pagination-bar-container",
Expand Down Expand Up @@ -49,11 +49,11 @@ class C {
(t = this.options) == null || t.onPageSizeChange(e);
}
setCurrentPage(e, t = !0) {
let i = e;
let i = Number.parseInt(e.toFixed(0));
return i < this.options.firstPageNumber ? i = this.options.firstPageNumber : i > this.lastPageNumber && (i = this.lastPageNumber), i !== this.options.currentPage && (this.options.currentPage = i, this.emitCurrentPageChange(i), t && this.render()), i;
}
setPageSize(e, t = !0) {
let i = e;
let i = Number.parseInt(e.toFixed(0));
return i > this.options.total && (i = this.options.total), i !== this.options.pageSize && (this.selectedPageSize = i, this.options.pageSize = i, this.emitPageSizeChange(i), t && this.render()), i;
}
setTotal(e, t = !0) {
Expand All @@ -65,12 +65,12 @@ class C {
setTheme(e) {
const t = this.getContainerEl();
for (const i of t.classList.values())
i.startsWith(n.themeClassNamePrefix) && l(t, i);
i.startsWith(n.themeClassNamePrefix) && u(t, i);
h(t, `${n.themeClassNamePrefix}${e}`);
}
disabled(e, t = !0) {
const i = this.getContainerEl();
this.options.disabled = e, e ? h(i, "disabled") : l(i, "disabled"), t && this.render();
this.options.disabled = e, e ? h(i, "disabled") : u(i, "disabled"), t && this.render();
}
get pageCount() {
return Math.ceil(this.options.total / this.options.pageSize);
Expand Down Expand Up @@ -267,14 +267,14 @@ class C {
}
render() {
const e = this.getContainerEl();
this.options.hideOnSinglePage && this.options.total === 1 ? u(e, { display: "none" }) : u(e, { display: "flex" }), e.innerHTML = this.getLayoutHTML(), this.registerListeners();
this.options.hideOnSinglePage && this.options.total === 1 ? l(e, { display: "none" }) : l(e, { display: "flex" }), e.innerHTML = this.getLayoutHTML(), this.registerListeners();
}
destory() {
this.removeListeners();
}
}
const L = (s) => new C(s);
const L = (s) => new x(s);
export {
C as PaginationBar,
x as PaginationBar,
L as createPaginationBar
};
2 changes: 1 addition & 1 deletion lib/paginationbar.umd.cjs

Large diffs are not rendered by default.

53 changes: 27 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,37 +54,38 @@
"build:type": "rollup -c"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.3.3",
"@types/jsdom": "^21.1.1",
"@types/node": "^18.17.5",
"@vitejs/plugin-vue": "^4.2.3",
"@vue/eslint-config-prettier": "^7.1.0",
"@vue/eslint-config-typescript": "^11.0.3",
"@vue/test-utils": "^2.4.1",
"@vue/tsconfig": "^0.1.3",
"changelogen": "^0.5.4",
"@rushstack/eslint-patch": "^1.6.1",
"@tsconfig/node18": "^18.2.2",
"@types/jsdom": "^21.1.6",
"@types/node": "^20.10.6",
"@vitejs/plugin-vue": "^5.0.2",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/test-utils": "^2.4.3",
"@vue/tsconfig": "^0.5.1",
"changelogen": "^0.5.5",
"cross-env": "^7.0.3",
"cz-conventional-changelog": "^3.3.0",
"demoify": "^1.3.0",
"eslint": "^8.47.0",
"eslint-plugin-vue": "^9.17.0",
"jsdom": "^21.1.2",
"demoify": "^2.1.0",
"eslint": "^8.56.0",
"eslint-plugin-vue": "^9.19.2",
"jsdom": "^23.0.1",
"npm-run-all": "^4.1.5",
"pinia": "^2.1.6",
"pinia-plugin-persistedstate": "^3.2.0",
"prettier": "^2.8.8",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
"prettier": "^3.1.1",
"prismjs": "^1.29.0",
"rollup": "^3.28.0",
"rollup-plugin-dts": "^5.3.1",
"rollup": "^4.9.2",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-scss": "^4.0.0",
"sass": "^1.65.1",
"typescript": "~5.1.6",
"vite": "^4.4.9",
"vite-plugin-svg4vue": "^2.16.0",
"vitest": "^0.29.8",
"vue": "^3.3.4",
"vue-router": "^4.2.4",
"vue-tsc": "^1.8.8"
"sass": "^1.69.6",
"typescript": "~5.3.3",
"vite": "^5.0.10",
"vite-plugin-svg4vue": "^3.1.0",
"vitest": "^1.1.1",
"vue": "^3.4.3",
"vue-router": "^4.2.5",
"vue-tsc": "^1.8.27"
},
"dependencies": {
"fourdom": "^1.3.0"
Expand Down

0 comments on commit 3455e1e

Please sign in to comment.