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

@opentiny/vue-year-range

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentiny/vue-year-range - npm Package Compare versions

Comparing version 2.8.0 to 3.8.0

321

lib/index.js

@@ -20,159 +20,49 @@ function _extends() {

import { IconDoubleRight, IconDoubleLeft } from "@opentiny/vue-icon";
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
if (render) {
options.render = render;
options.staticRenderFns = staticRenderFns;
options._compiled = true;
}
if (functionalTemplate) {
options.functional = true;
}
if (scopeId) {
options._scopeId = "data-v-" + scopeId;
}
var hook;
if (moduleIdentifier) {
hook = function hook2(context) {
context = context || // cached call
this.$vnode && this.$vnode.ssrContext || // stateful
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
context = __VUE_SSR_CONTEXT__;
}
if (injectStyles) {
injectStyles.call(this, context);
}
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier);
}
import { resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, renderSlot, createElementBlock, Fragment, renderList, toDisplayString, createCommentVNode, createVNode, vShow } 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++] };
};
options._ssrRegister = hook;
} else if (injectStyles) {
hook = shadowMode ? function() {
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
} : injectStyles;
}
if (hook) {
if (options.functional) {
options._injectStyles = hook;
var originalRender = options.render;
options.render = function renderWithStyleInjection(h, context) {
hook.call(context);
return originalRender(h, context);
};
} else {
var existing = options.beforeCreate;
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
}
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 _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 {
exports: scriptExports,
options
};
}
return target;
};
var render = function render2() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("transition", {
attrs: {
"name": "tiny-zoom-in-top"
},
on: {
"after-leave": function afterLeave($event) {
return _vm.$emit("dodestroy");
}
}
}, [_c("div", {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.state.visible,
expression: "state.visible"
}],
staticClass: "tiny-picker-panel tiny-date-range-picker tiny-popper",
class: [{
"has-sidebar": _vm.slots.sidebar || _vm.state.shortcuts
}, _vm.state.popperClass]
}, [_c("div", {
staticClass: "tiny-picker-panel__body-wrapper"
}, [_vm._t("sidebar"), _vm.state.shortcuts ? _c("div", {
staticClass: "tiny-picker-panel__sidebar"
}, _vm._l(_vm.state.shortcuts, function(shortcut, key) {
return _c("button", {
key,
staticClass: "tiny-picker-panel__shortcut",
attrs: {
"type": "button"
},
on: {
"click": function click($event) {
return _vm.handleShortcutClick(shortcut);
}
}
}, [_vm._v(" " + _vm._s(shortcut.text) + " ")]);
}), 0) : _vm._e(), _c("div", {
staticClass: "tiny-picker-panel__body"
}, [_c("div", {
staticClass: "tiny-picker-panel__content tiny-date-range-picker__content is-left"
}, [_c("div", {
staticClass: "tiny-date-range-picker__header"
}, [_c("button", {
staticClass: "tiny-picker-panel__icon-btn tiny-icon-d-arrow-left",
attrs: {
"type": "button"
},
on: {
"click": _vm.leftPrevYear
}
}, [_c("icon-double-left")], 1), _c("div", [_vm._v(_vm._s(_vm.state.leftLabel))])]), _c("year-table", {
ref: "leftYearTable",
attrs: {
"selection-mode": _vm.state.selectionMode,
"date": _vm.state.leftDate,
"default-value": _vm.state.defaultValue,
"min-date": _vm.state.minDate,
"max-date": _vm.state.maxDate,
"range-state": _vm.state.rangeState,
"disabled-date": _vm.state.disabledDate,
"start-year": _vm.state.leftStartYear
},
on: {
"changerange": _vm.handleChangeRange,
"pick": _vm.handleRangePick
}
})], 1), _c("div", {
staticClass: "tiny-picker-panel__content tiny-date-range-picker__content is-right"
}, [_c("div", {
staticClass: "tiny-date-range-picker__header"
}, [_c("button", {
staticClass: "tiny-picker-panel__icon-btn tiny-icon-d-arrow-right",
attrs: {
"type": "button"
},
on: {
"click": _vm.rightNextYear
}
}, [_c("icon-double-right")], 1), _c("div", [_vm._v(_vm._s(_vm.state.rightLabel))])]), _c("year-table", {
ref: "rightRearTable",
attrs: {
"selection-mode": _vm.state.selectionMode,
"date": _vm.state.rightDate,
"default-value": _vm.state.defaultValue,
"min-date": _vm.state.minDate,
"max-date": _vm.state.maxDate,
"range-state": _vm.state.rangeState,
"disabled-date": _vm.state.disabledDate,
"start-year": _vm.state.rightStartYear
},
on: {
"changerange": _vm.handleChangeRange,
"pick": _vm.handleRangePick
}
})], 1)])], 2)])]);
};
var staticRenderFns = [];
var __vue2_script = {
var _sfc_main = {
name: $prefix + "MonthRange",

@@ -201,12 +91,119 @@ directives: directive({

};
var __cssModules = {};
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null);
function __vue2_injectStyles(context) {
for (var o in __cssModules) {
this[o] = __cssModules[o];
}
var _hoisted_1 = {
class: "tiny-picker-panel__body-wrapper"
};
var _hoisted_2 = {
key: 0,
class: "tiny-picker-panel__sidebar"
};
var _hoisted_3 = ["onClick"];
var _hoisted_4 = {
class: "tiny-picker-panel__body"
};
var _hoisted_5 = {
class: "tiny-picker-panel__content tiny-date-range-picker__content is-left"
};
var _hoisted_6 = {
class: "tiny-date-range-picker__header"
};
var _hoisted_7 = {
class: "tiny-picker-panel__content tiny-date-range-picker__content is-right"
};
var _hoisted_8 = {
class: "tiny-date-range-picker__header"
};
function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
var _component_icon_double_left = resolveComponent("icon-double-left");
var _component_year_table = resolveComponent("year-table");
var _component_icon_double_right = resolveComponent("icon-double-right");
return openBlock(), createBlock(Transition, {
name: "tiny-zoom-in-top",
onAfterLeave: _cache[2] || (_cache[2] = function($event) {
return _ctx.$emit("dodestroy");
}),
persisted: ""
}, {
default: withCtx(function() {
return [withDirectives(createElementVNode(
"div",
{
class: normalizeClass(["tiny-picker-panel tiny-date-range-picker tiny-popper", [{
"has-sidebar": _ctx.slots.sidebar || _ctx.state.shortcuts
}, _ctx.state.popperClass]])
},
[createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "sidebar", {
class: "tiny-picker-panel__sidebar"
}), _ctx.state.shortcuts ? (openBlock(), createElementBlock("div", _hoisted_2, [(openBlock(true), createElementBlock(
Fragment,
null,
renderList(_ctx.state.shortcuts, function(shortcut, key) {
return openBlock(), createElementBlock("button", {
type: "button",
class: "tiny-picker-panel__shortcut",
key,
onClick: function onClick($event) {
return _ctx.handleShortcutClick(shortcut);
}
}, toDisplayString(shortcut.text), 9, _hoisted_3);
}),
128
/* KEYED_FRAGMENT */
))])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_4, [createElementVNode("div", _hoisted_5, [createElementVNode("div", _hoisted_6, [createElementVNode("button", {
type: "button",
onClick: _cache[0] || (_cache[0] = function() {
return _ctx.leftPrevYear && _ctx.leftPrevYear.apply(_ctx, arguments);
}),
class: "tiny-picker-panel__icon-btn tiny-icon-d-arrow-left"
}, [createVNode(_component_icon_double_left)]), createElementVNode(
"div",
null,
toDisplayString(_ctx.state.leftLabel),
1
/* TEXT */
)]), createVNode(_component_year_table, {
ref: "leftYearTable",
"selection-mode": _ctx.state.selectionMode,
date: _ctx.state.leftDate,
"default-value": _ctx.state.defaultValue,
"min-date": _ctx.state.minDate,
"max-date": _ctx.state.maxDate,
"range-state": _ctx.state.rangeState,
"disabled-date": _ctx.state.disabledDate,
"start-year": _ctx.state.leftStartYear,
onChangerange: _ctx.handleChangeRange,
onPick: _ctx.handleRangePick
}, null, 8, ["selection-mode", "date", "default-value", "min-date", "max-date", "range-state", "disabled-date", "start-year", "onChangerange", "onPick"])]), createElementVNode("div", _hoisted_7, [createElementVNode("div", _hoisted_8, [createElementVNode("button", {
type: "button",
onClick: _cache[1] || (_cache[1] = function() {
return _ctx.rightNextYear && _ctx.rightNextYear.apply(_ctx, arguments);
}),
class: "tiny-picker-panel__icon-btn tiny-icon-d-arrow-right"
}, [createVNode(_component_icon_double_right)]), createElementVNode(
"div",
null,
toDisplayString(_ctx.state.rightLabel),
1
/* TEXT */
)]), createVNode(_component_year_table, {
ref: "rightRearTable",
"selection-mode": _ctx.state.selectionMode,
date: _ctx.state.rightDate,
"default-value": _ctx.state.defaultValue,
"min-date": _ctx.state.minDate,
"max-date": _ctx.state.maxDate,
"range-state": _ctx.state.rangeState,
"disabled-date": _ctx.state.disabledDate,
"start-year": _ctx.state.rightStartYear,
onChangerange: _ctx.handleChangeRange,
onPick: _ctx.handleRangePick
}, null, 8, ["selection-mode", "date", "default-value", "min-date", "max-date", "range-state", "disabled-date", "start-year", "onChangerange", "onPick"])])])])],
2
/* CLASS */
), [[vShow, _ctx.state.visible]])];
}),
_: 3
/* FORWARDED */
});
}
var YearRange = /* @__PURE__ */ function() {
return __component__.exports;
}();
var YearRange = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
YearRange.install = function(Vue) {

@@ -213,0 +210,0 @@ Vue.component(YearRange.name, YearRange);

{
"name": "@opentiny/vue-year-range",
"version": "2.8.0",
"version": "3.8.0",
"description": "",

@@ -9,5 +9,5 @@ "main": "./lib/index.js",

"@opentiny/vue-renderless": "~3.8.0",
"@opentiny/vue-common": "~2.8.0",
"@opentiny/vue-locale": "~2.8.0",
"@opentiny/vue-year-table": "~2.8.0"
"@opentiny/vue-common": "~3.8.0",
"@opentiny/vue-locale": "~3.8.0",
"@opentiny/vue-year-table": "~3.8.0"
},

@@ -14,0 +14,0 @@ "license": "MIT",

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