@opentiny/vue-pager-item
Advanced tools
Comparing version 3.6.7 to 3.8.0
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
import PagerItem from './src/index.vue'; | ||
import PagerItem from './src/index'; | ||
export default PagerItem; |
176
lib/index.js
@@ -1,58 +0,30 @@ | ||
import { defineComponent, $prefix, setup as _setup } from "@opentiny/vue-common"; | ||
import { renderless, api } from "@opentiny/vue-renderless/pager-item/vue"; | ||
import { iconPopup, iconDoubleLeft, iconDoubleRight } from "@opentiny/vue-icon"; | ||
import { openBlock, createElementBlock, createElementVNode, normalizeClass, createCommentVNode, createBlock, resolveDynamicComponent, Fragment, renderList, toDisplayString } from "vue"; | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (it) | ||
return (it = it.call(o)).next.bind(it); | ||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) | ||
o = it; | ||
var i = 0; | ||
return function() { | ||
if (i >= o.length) | ||
return { done: true }; | ||
return { done: false, value: o[i++] }; | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
function _extends() { | ||
_extends = Object.assign ? Object.assign.bind() : function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) | ||
return; | ||
if (typeof o === "string") | ||
return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) | ||
n = o.constructor.name; | ||
if (n === "Map" || n === "Set") | ||
return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) | ||
return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) | ||
len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) | ||
arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
var _export_sfc = function _export_sfc2(sfc, props) { | ||
var target = sfc.__vccOpts || sfc; | ||
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) { | ||
var _step$value = _step.value, key = _step$value[0], val = _step$value[1]; | ||
target[key] = val; | ||
} | ||
return target; | ||
import { $prefix, $props, $setup } from "@opentiny/vue-common"; | ||
import { IconPopup, IconDoubleLeft, IconDoubleRight } from "@opentiny/vue-icon"; | ||
import PcTemplate from "./pc.js"; | ||
import MobileFirstTemplate from "./mobile-first.js"; | ||
var template = function template2(mode) { | ||
if ("mobile" === (process.env.TINY_MODE || mode)) | ||
return MobileTemplate; | ||
else if ("mobile-first" === (process.env.TINY_MODE || mode)) | ||
return MobileFirstTemplate; | ||
else | ||
return PcTemplate; | ||
}; | ||
var _sfc_main = /* @__PURE__ */ defineComponent({ | ||
var PagerItem = { | ||
name: $prefix + "PagerItem", | ||
components: { | ||
IconPopup: iconPopup(), | ||
IconDoubleLeft: iconDoubleLeft(), | ||
IconDoubleRight: iconDoubleRight() | ||
}, | ||
props: { | ||
props: _extends({}, $props, { | ||
disabled: { | ||
@@ -67,106 +39,22 @@ type: Boolean, | ||
type: Object, | ||
default: function _default() { | ||
return iconPopup(); | ||
} | ||
default: IconPopup | ||
}, | ||
doubleLeftIcon: { | ||
type: Object, | ||
default: function _default2() { | ||
return iconDoubleLeft(); | ||
} | ||
default: IconDoubleLeft | ||
}, | ||
doubleRightIcon: { | ||
type: Object, | ||
default: function _default3() { | ||
return iconDoubleRight(); | ||
} | ||
default: IconDoubleRight | ||
}, | ||
isBeforePageChange: Boolean | ||
}, | ||
}), | ||
setup: function setup(props, context) { | ||
return _setup({ | ||
return $setup({ | ||
props, | ||
context, | ||
renderless, | ||
api, | ||
mono: true | ||
template | ||
}); | ||
} | ||
}); | ||
var _hoisted_1 = { | ||
class: "tiny-pager__group tiny-unselect" | ||
}; | ||
var _hoisted_2 = ["textContent"]; | ||
var _hoisted_3 = ["textContent"]; | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("ul", { | ||
class: "tiny-pager__pages", | ||
onClick: _cache[4] || (_cache[4] = function() { | ||
return _ctx.onPagerClick && _ctx.onPagerClick.apply(_ctx, arguments); | ||
}) | ||
}, [_ctx.pageCount > 0 ? (openBlock(), createElementBlock( | ||
"li", | ||
{ | ||
key: 0, | ||
class: normalizeClass({ | ||
"is-active": _ctx.currentPage === 1 | ||
}), | ||
textContent: "1" | ||
}, | ||
null, | ||
2 | ||
/* CLASS */ | ||
)) : createCommentVNode("v-if", true), _ctx.state.showPrevMore ? (openBlock(), createElementBlock( | ||
"li", | ||
{ | ||
key: 1, | ||
class: "dot quickprev", | ||
onMouseenter: _cache[0] || (_cache[0] = function($event) { | ||
return _ctx.onMouseenter("left"); | ||
}), | ||
onMouseleave: _cache[1] || (_cache[1] = function($event) { | ||
return _ctx.state.quickprevIconClass = _ctx.popupIcon; | ||
}) | ||
}, | ||
[(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.quickprevIconClass)))], | ||
32 | ||
/* HYDRATE_EVENTS */ | ||
)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock( | ||
Fragment, | ||
null, | ||
renderList(_ctx.state.pagers, function(pager) { | ||
return openBlock(), createElementBlock("li", { | ||
key: pager, | ||
class: normalizeClass({ | ||
"is-active": _ctx.currentPage === pager | ||
}), | ||
textContent: toDisplayString("" + pager) | ||
}, null, 10, _hoisted_2); | ||
}), | ||
128 | ||
/* KEYED_FRAGMENT */ | ||
)), _ctx.state.showNextMore ? (openBlock(), createElementBlock( | ||
"li", | ||
{ | ||
key: 2, | ||
class: "dot quicknext", | ||
onMouseenter: _cache[2] || (_cache[2] = function($event) { | ||
return _ctx.onMouseenter("right"); | ||
}), | ||
onMouseleave: _cache[3] || (_cache[3] = function($event) { | ||
return _ctx.state.quicknextIconClass = _ctx.popupIcon; | ||
}) | ||
}, | ||
[(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.quicknextIconClass)))], | ||
32 | ||
/* HYDRATE_EVENTS */ | ||
)) : createCommentVNode("v-if", true), _ctx.pageCount > 1 ? (openBlock(), createElementBlock("li", { | ||
key: 3, | ||
class: normalizeClass({ | ||
"is-active": _ctx.pageCount === _ctx.currentPage | ||
}), | ||
textContent: toDisplayString("" + _ctx.pageCount) | ||
}, null, 10, _hoisted_3)) : createCommentVNode("v-if", true)])]); | ||
} | ||
var PagerItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); | ||
var version = "3.7.0"; | ||
@@ -173,0 +61,0 @@ PagerItem.install = function(Vue) { |
{ | ||
"name": "@opentiny/vue-pager-item", | ||
"version": "3.6.7", | ||
"version": "3.8.0", | ||
"description": "", | ||
"main": "./lib/index.js", | ||
"module": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-renderless": "~3.6.6", | ||
"@opentiny/vue-icon": "~3.6.7", | ||
"@opentiny/vue-locale": "~3.6.7" | ||
"@opentiny/vue-renderless": "~3.8.0", | ||
"@opentiny/vue-icon": "~3.8.0", | ||
"@opentiny/vue-locale": "~3.8.0" | ||
}, | ||
@@ -11,0 +12,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19573
10
528
3
1
+ Added@opentiny/vue-common@3.8.3(transitive)
+ Added@opentiny/vue-icon@3.8.3(transitive)
+ Added@opentiny/vue-locale@3.8.3(transitive)
+ Added@opentiny/vue-renderless@3.8.4(transitive)
+ Added@opentiny/vue-theme@3.8.5(transitive)
+ Added@opentiny/vue-theme-mobile@3.8.3(transitive)
+ Addedtailwind-merge@1.14.0(transitive)
- Removed@opentiny/vue-common@3.6.7(transitive)
- Removed@opentiny/vue-icon@3.6.7(transitive)
- Removed@opentiny/vue-locale@3.6.7(transitive)
- Removed@opentiny/vue-renderless@3.6.8(transitive)
- Removed@opentiny/vue-theme@3.6.7(transitive)
- Removed@opentiny/vue-theme-mobile@3.6.6(transitive)
Updated@opentiny/vue-icon@~3.8.0
Updated@opentiny/vue-locale@~3.8.0