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

@opentiny/vue-time-spinner

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentiny/vue-time-spinner - npm Package Compare versions

Comparing version 3.6.0 to 3.6.1-alpha.0

LICENSE

0

index.d.ts

@@ -0,0 +0,0 @@ /**

545

lib/index.js

@@ -1,14 +0,58 @@

import { renderless, api } from '@opentiny/vue-renderless/time-spinner/vue';
import { $prefix, directive, setup } from '@opentiny/vue-common';
import Scrollbar from '@opentiny/vue-scrollbar';
import bind from '@opentiny/vue-renderless/common/deps/repeat-click';
import { iconChevronDown, iconChevronUp } from '@opentiny/vue-icon';
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, Fragment, createVNode, withCtx, renderList, createElementVNode, toDisplayString, withDirectives, vShow, createCommentVNode } from 'vue';
import { renderless, api } from "@opentiny/vue-renderless/time-spinner/vue";
import { defineComponent, $prefix, directive, setup as _setup } from "@opentiny/vue-common";
import Scrollbar from "@opentiny/vue-scrollbar";
import bind from "@opentiny/vue-renderless/common/deps/repeat-click";
import { iconChevronDown, iconChevronUp } from "@opentiny/vue-icon";
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, Fragment, createVNode, withCtx, renderList, createElementVNode, toDisplayString, withDirectives, vShow, createCommentVNode } 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 _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;
};
var $constants = {
ANIMATIONNAME: 'tiny-transition-timepicker'
ANIMATIONNAME: "tiny-transition-timepicker"
};
var script = {
name: $prefix + 'TimeSpinner',
emits: ['change', 'select-range'],
var _sfc_main = /* @__PURE__ */ defineComponent({
name: $prefix + "TimeSpinner",
emits: ["change", "select-range"],
components: {

@@ -21,3 +65,3 @@ TinyScrollbar: Scrollbar,

repeatClick: {
bind: bind
bind
}

@@ -41,16 +85,16 @@ }),

type: String,
default: ''
default: ""
// 'a': am/pm; 'A': AM/PM
}
},
setup: function setup$1(props, context) {
return setup({
props: props,
context: context,
renderless: renderless,
api: api,
setup: function setup(props, context) {
return _setup({
props,
context,
renderless,
api,
mono: true
});
}
};
});
var _hoisted_1 = ["onClick"];

@@ -77,3 +121,3 @@ var _hoisted_2 = ["onClick"];

};
function render(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
var _component_tiny_scrollbar = resolveComponent("tiny-scrollbar");

@@ -83,162 +127,309 @@ var _component_icon_chevron_up = resolveComponent("icon-chevron-up");

var _directive_repeat_click = resolveDirective("repeat-click");
return openBlock(), createElementBlock("div", {
class: normalizeClass(["tiny-time-spinner", {
'has-seconds': $props.showSeconds
}])
}, [!$props.arrowControl ? (openBlock(), createElementBlock(Fragment, {
key: 0
}, [createVNode(_component_tiny_scrollbar, {
onMouseenter: _cache[0] || (_cache[0] = function ($event) {
return _ctx.emitSelectRange('hours');
}),
onMousemove: _cache[1] || (_cache[1] = function ($event) {
return _ctx.adjustCurrentSpinner('hours');
}),
class: normalizeClass([[_ctx.state.animationName], "tiny-time-spinner__wrapper"]),
"wrap-style": "max-height: inherit;",
"view-class": "tiny-time-spinner__list",
noresize: "",
tag: "ul",
ref: "hours"
}, {
default: withCtx(function () {
return [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.state.hoursList, function (disabled, hour) {
return openBlock(), createElementBlock("li", {
onClick: function onClick($event) {
return _ctx.handleClick('hours', {
value: hour,
disabled: disabled
});
return openBlock(), createElementBlock(
"div",
{
class: normalizeClass(["tiny-time-spinner", {
"has-seconds": _ctx.showSeconds
}])
},
[!_ctx.arrowControl ? (openBlock(), createElementBlock(
Fragment,
{
key: 0
},
[createVNode(_component_tiny_scrollbar, {
onMouseenter: _cache[0] || (_cache[0] = function($event) {
return _ctx.emitSelectRange("hours");
}),
onMousemove: _cache[1] || (_cache[1] = function($event) {
return _ctx.adjustCurrentSpinner("hours");
}),
class: normalizeClass([[_ctx.state.animationName], "tiny-time-spinner__wrapper"]),
"wrap-style": "max-height: inherit;",
"view-class": "tiny-time-spinner__list",
noresize: "",
tag: "ul",
ref: "hours"
}, {
default: withCtx(function() {
return [(openBlock(true), createElementBlock(
Fragment,
null,
renderList(_ctx.state.hoursList, function(disabled, hour) {
return openBlock(), createElementBlock("li", {
onClick: function onClick($event) {
return _ctx.handleClick("hours", {
value: hour,
disabled
});
},
class: normalizeClass(["tiny-time-spinner__item", {
active: hour === _ctx.state.hours,
disabled
}]),
key: hour
}, [createElementVNode(
"span",
null,
toDisplayString(("0" + (_ctx.amPmMode ? hour % 12 || 12 : hour)).slice(-2)) + toDisplayString(_ctx.amPm(hour)),
1
/* TEXT */
)], 10, _hoisted_1);
}),
128
/* KEYED_FRAGMENT */
))];
}),
_: 1
/* STABLE */
}, 8, ["class"]), createVNode(_component_tiny_scrollbar, {
onMouseenter: _cache[2] || (_cache[2] = function($event) {
return _ctx.emitSelectRange("minutes");
}),
onMousemove: _cache[3] || (_cache[3] = function($event) {
return _ctx.adjustCurrentSpinner("minutes");
}),
class: normalizeClass([[_ctx.state.animationName + "-up"], "tiny-time-spinner__wrapper"]),
"wrap-style": "max-height: inherit;",
"view-class": "tiny-time-spinner__list",
noresize: "",
tag: "ul",
ref: "minutes"
}, {
default: withCtx(function() {
return [(openBlock(true), createElementBlock(
Fragment,
null,
renderList(_ctx.state.minutesList, function(enabled, key) {
return openBlock(), createElementBlock("li", {
onClick: function onClick($event) {
return _ctx.handleClick("minutes", {
value: key,
disabled: false
});
},
key,
class: normalizeClass(["tiny-time-spinner__item", {
active: key === _ctx.state.minutes,
disabled: !enabled
}])
}, [createElementVNode(
"span",
null,
toDisplayString(("0" + key).slice(-2)),
1
/* TEXT */
)], 10, _hoisted_2);
}),
128
/* KEYED_FRAGMENT */
))];
}),
_: 1
/* STABLE */
}, 8, ["class"]), withDirectives(createVNode(_component_tiny_scrollbar, {
onMouseenter: _cache[4] || (_cache[4] = function($event) {
return _ctx.emitSelectRange("seconds");
}),
onMousemove: _cache[5] || (_cache[5] = function($event) {
return _ctx.adjustCurrentSpinner("seconds");
}),
class: normalizeClass([[_ctx.state.animationName], "tiny-time-spinner__wrapper"]),
"wrap-style": "max-height: inherit;",
"view-class": "tiny-time-spinner__list",
noresize: "",
tag: "ul",
ref: "seconds"
}, {
default: withCtx(function() {
return [(openBlock(), createElementBlock(
Fragment,
null,
renderList(60, function(second, key) {
return createElementVNode("li", {
onClick: function onClick($event) {
return _ctx.handleClick("seconds", {
value: key,
disabled: false
});
},
class: normalizeClass(["tiny-time-spinner__item", {
active: key === _ctx.state.seconds
}]),
key
}, [createElementVNode(
"span",
null,
toDisplayString(("0" + key).slice(-2)),
1
/* TEXT */
)], 10, _hoisted_3);
}),
64
/* STABLE_FRAGMENT */
))];
}),
_: 1
/* STABLE */
}, 8, ["class"]), [[vShow, _ctx.showSeconds]])],
64
/* STABLE_FRAGMENT */
)) : createCommentVNode("v-if", true), _ctx.arrowControl ? (openBlock(), createElementBlock(
Fragment,
{
key: 1
},
[createElementVNode(
"div",
{
onMouseenter: _cache[6] || (_cache[6] = function($event) {
return _ctx.emitSelectRange("hours");
}),
class: "tiny-time-spinner__wrapper is-arrow"
},
[withDirectives((openBlock(), createElementBlock("i", _hoisted_4, [createVNode(_component_icon_chevron_up)])), [[_directive_repeat_click, _ctx.decrease]]), withDirectives((openBlock(), createElementBlock("i", _hoisted_5, [createVNode(_component_icon_chevron_down)])), [[_directive_repeat_click, _ctx.increase]]), createElementVNode(
"ul",
{
class: normalizeClass(["tiny-time-spinner__list", [_ctx.state.animationName]]),
ref: "hours"
},
class: normalizeClass(["tiny-time-spinner__item", {
active: hour === _ctx.state.hours,
disabled: disabled
}]),
key: hour
}, [createElementVNode("span", null, toDisplayString(('0' + ($props.amPmMode ? hour % 12 || 12 : hour)).slice(-2)) + toDisplayString(_ctx.amPm(hour)), 1)], 10, _hoisted_1);
}), 128))];
}),
_: 1
}, 8, ["class"]), createVNode(_component_tiny_scrollbar, {
onMouseenter: _cache[2] || (_cache[2] = function ($event) {
return _ctx.emitSelectRange('minutes');
}),
onMousemove: _cache[3] || (_cache[3] = function ($event) {
return _ctx.adjustCurrentSpinner('minutes');
}),
class: normalizeClass([[_ctx.state.animationName + '-up'], "tiny-time-spinner__wrapper"]),
"wrap-style": "max-height: inherit;",
"view-class": "tiny-time-spinner__list",
noresize: "",
tag: "ul",
ref: "minutes"
}, {
default: withCtx(function () {
return [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.state.minutesList, function (enabled, key) {
return openBlock(), createElementBlock("li", {
onClick: function onClick($event) {
return _ctx.handleClick('minutes', {
value: key,
disabled: false
});
[(openBlock(true), createElementBlock(
Fragment,
null,
renderList(_ctx.state.arrowHourList, function(hour, key) {
return openBlock(), createElementBlock(
"li",
{
class: normalizeClass(["tiny-time-spinner__item", {
active: hour === _ctx.state.hours,
disabled: _ctx.state.hoursList[hour]
}]),
key
},
[createElementVNode(
"span",
null,
toDisplayString(hour === void 0 ? "" : ("0" + (_ctx.amPmMode ? hour % 12 || 12 : hour)).slice(-2) + _ctx.amPm(hour)),
1
/* TEXT */
)],
2
/* CLASS */
);
}),
128
/* KEYED_FRAGMENT */
))],
2
/* CLASS */
)],
32
/* HYDRATE_EVENTS */
), createElementVNode(
"div",
{
onMouseenter: _cache[7] || (_cache[7] = function($event) {
return _ctx.emitSelectRange("minutes");
}),
class: "tiny-time-spinner__wrapper is-arrow"
},
[withDirectives((openBlock(), createElementBlock("i", _hoisted_6, [createVNode(_component_icon_chevron_up)])), [[_directive_repeat_click, _ctx.decrease]]), withDirectives((openBlock(), createElementBlock("i", _hoisted_7, [createVNode(_component_icon_chevron_down)])), [[_directive_repeat_click, _ctx.increase]]), createElementVNode(
"ul",
{
class: normalizeClass(["tiny-time-spinner__list", [_ctx.state.animationName + "-up"]]),
ref: "minutes"
},
key: key,
class: normalizeClass(["tiny-time-spinner__item", {
active: key === _ctx.state.minutes,
disabled: !enabled
}])
}, [createElementVNode("span", null, toDisplayString(('0' + key).slice(-2)), 1)], 10, _hoisted_2);
}), 128))];
}),
_: 1
}, 8, ["class"]), withDirectives(createVNode(_component_tiny_scrollbar, {
onMouseenter: _cache[4] || (_cache[4] = function ($event) {
return _ctx.emitSelectRange('seconds');
}),
onMousemove: _cache[5] || (_cache[5] = function ($event) {
return _ctx.adjustCurrentSpinner('seconds');
}),
class: normalizeClass([[_ctx.state.animationName], "tiny-time-spinner__wrapper"]),
"wrap-style": "max-height: inherit;",
"view-class": "tiny-time-spinner__list",
noresize: "",
tag: "ul",
ref: "seconds"
}, {
default: withCtx(function () {
return [(openBlock(), createElementBlock(Fragment, null, renderList(60, function (second, key) {
return createElementVNode("li", {
onClick: function onClick($event) {
return _ctx.handleClick('seconds', {
value: key,
disabled: false
});
[(openBlock(true), createElementBlock(
Fragment,
null,
renderList(_ctx.state.arrowMinuteList, function(minute, key) {
return openBlock(), createElementBlock(
"li",
{
class: normalizeClass(["tiny-time-spinner__item", {
active: minute === _ctx.state.minutes
}]),
key
},
[createElementVNode(
"span",
null,
toDisplayString(minute === void 0 ? "" : ("0" + minute).slice(-2)),
1
/* TEXT */
)],
2
/* CLASS */
);
}),
128
/* KEYED_FRAGMENT */
))],
2
/* CLASS */
)],
32
/* HYDRATE_EVENTS */
), _ctx.showSeconds ? (openBlock(), createElementBlock(
"div",
{
key: 0,
onMouseenter: _cache[8] || (_cache[8] = function($event) {
return _ctx.emitSelectRange("seconds");
}),
class: "tiny-time-spinner__wrapper is-arrow"
},
[withDirectives((openBlock(), createElementBlock("i", _hoisted_8, [createVNode(_component_icon_chevron_up)])), [[_directive_repeat_click, _ctx.decrease]]), withDirectives((openBlock(), createElementBlock("i", _hoisted_9, [createVNode(_component_icon_chevron_down)])), [[_directive_repeat_click, _ctx.increase]]), createElementVNode(
"ul",
{
class: normalizeClass(["tiny-time-spinner__list", [_ctx.state.animationName]]),
ref: "seconds"
},
class: normalizeClass(["tiny-time-spinner__item", {
active: key === _ctx.state.seconds
}]),
key: key
}, [createElementVNode("span", null, toDisplayString(('0' + key).slice(-2)), 1)], 10, _hoisted_3);
}), 64))];
}),
_: 1
}, 8, ["class"]), [[vShow, $props.showSeconds]])], 64)) : createCommentVNode("", true), $props.arrowControl ? (openBlock(), createElementBlock(Fragment, {
key: 1
}, [createElementVNode("div", {
onMouseenter: _cache[6] || (_cache[6] = function ($event) {
return _ctx.emitSelectRange('hours');
}),
class: "tiny-time-spinner__wrapper is-arrow"
}, [withDirectives((openBlock(), createElementBlock("i", _hoisted_4, [createVNode(_component_icon_chevron_up)])), [[_directive_repeat_click, _ctx.decrease]]), withDirectives((openBlock(), createElementBlock("i", _hoisted_5, [createVNode(_component_icon_chevron_down)])), [[_directive_repeat_click, _ctx.increase]]), createElementVNode("ul", {
class: normalizeClass(["tiny-time-spinner__list", [_ctx.state.animationName]]),
ref: "hours"
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.state.arrowHourList, function (hour, key) {
return openBlock(), createElementBlock("li", {
class: normalizeClass(["tiny-time-spinner__item", {
active: hour === _ctx.state.hours,
disabled: _ctx.state.hoursList[hour]
}]),
key: key
}, [createElementVNode("span", null, toDisplayString(hour === undefined ? '' : ('0' + ($props.amPmMode ? hour % 12 || 12 : hour)).slice(-2) + _ctx.amPm(hour)), 1)], 2);
}), 128))], 2)], 32), createElementVNode("div", {
onMouseenter: _cache[7] || (_cache[7] = function ($event) {
return _ctx.emitSelectRange('minutes');
}),
class: "tiny-time-spinner__wrapper is-arrow"
}, [withDirectives((openBlock(), createElementBlock("i", _hoisted_6, [createVNode(_component_icon_chevron_up)])), [[_directive_repeat_click, _ctx.decrease]]), withDirectives((openBlock(), createElementBlock("i", _hoisted_7, [createVNode(_component_icon_chevron_down)])), [[_directive_repeat_click, _ctx.increase]]), createElementVNode("ul", {
class: normalizeClass(["tiny-time-spinner__list", [_ctx.state.animationName + '-up']]),
ref: "minutes"
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.state.arrowMinuteList, function (minute, key) {
return openBlock(), createElementBlock("li", {
class: normalizeClass(["tiny-time-spinner__item", {
active: minute === _ctx.state.minutes
}]),
key: key
}, [createElementVNode("span", null, toDisplayString(minute === undefined ? '' : ('0' + minute).slice(-2)), 1)], 2);
}), 128))], 2)], 32), $props.showSeconds ? (openBlock(), createElementBlock("div", {
key: 0,
onMouseenter: _cache[8] || (_cache[8] = function ($event) {
return _ctx.emitSelectRange('seconds');
}),
class: "tiny-time-spinner__wrapper is-arrow"
}, [withDirectives((openBlock(), createElementBlock("i", _hoisted_8, [createVNode(_component_icon_chevron_up)])), [[_directive_repeat_click, _ctx.decrease]]), withDirectives((openBlock(), createElementBlock("i", _hoisted_9, [createVNode(_component_icon_chevron_down)])), [[_directive_repeat_click, _ctx.increase]]), createElementVNode("ul", {
class: normalizeClass(["tiny-time-spinner__list", [_ctx.state.animationName]]),
ref: "seconds"
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.state.arrowSecondList, function (second, key) {
return openBlock(), createElementBlock("li", {
class: normalizeClass(["tiny-time-spinner__item", {
active: second === _ctx.state.seconds
}]),
key: key
}, [createElementVNode("span", null, toDisplayString(second === undefined ? '' : ('0' + second).slice(-2)), 1)], 2);
}), 128))], 2)], 32)) : createCommentVNode("", true)], 64)) : createCommentVNode("", true)], 2);
[(openBlock(true), createElementBlock(
Fragment,
null,
renderList(_ctx.state.arrowSecondList, function(second, key) {
return openBlock(), createElementBlock(
"li",
{
class: normalizeClass(["tiny-time-spinner__item", {
active: second === _ctx.state.seconds
}]),
key
},
[createElementVNode(
"span",
null,
toDisplayString(second === void 0 ? "" : ("0" + second).slice(-2)),
1
/* TEXT */
)],
2
/* CLASS */
);
}),
128
/* KEYED_FRAGMENT */
))],
2
/* CLASS */
)],
32
/* HYDRATE_EVENTS */
)) : createCommentVNode("v-if", true)],
64
/* STABLE_FRAGMENT */
)) : createCommentVNode("v-if", true)],
2
/* CLASS */
);
}
script.render = render;
script.install = function (Vue) {
Vue.component(script.name, script);
var TimeSpinner = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
var version = "3.7.0";
TimeSpinner.install = function(Vue) {
Vue.component(TimeSpinner.name, TimeSpinner);
};
script.version = '3.6.0';
export { script as default };
TimeSpinner.version = version;
export {
TimeSpinner as default
};
{
"name": "@opentiny/vue-time-spinner",
"version": "3.6.0",
"version": "3.6.1-alpha.0",
"description": "",
"main": "lib/index.js",
"scripts": {
"lint": "eslint src/**/*{.js,.html,.vue} --quiet",
"build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js",
"build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js"
},
"main": "./lib/index.js",
"dependencies": {
"@opentiny/vue-renderless": "~3.6.0",
"@opentiny/vue-common": "~3.6.0",
"@opentiny/vue-scrollbar": "~3.6.0",
"@opentiny/vue-icon": "~3.6.0",
"@opentiny/vue-theme": "~3.6.0",
"@opentiny/vue-theme-mobile": "~3.6.0"
"@opentiny/vue-renderless": "~3.6.1-alpha.0",
"@opentiny/vue-common": "~3.6.1-alpha.0",
"@opentiny/vue-scrollbar": "~3.6.1-alpha.0"
},
"license": "MIT",
"types": "index.d.ts",
"sideEffects": false
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
"//postversion": "pnpm build"
}
}

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

declare const _default: import("vue").DefineComponent<{
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<{
_constants: {

@@ -20,3 +20,3 @@ type: ObjectConstructor;

}, {
t: any;
t: (this: any, path: any, options?: any) => any;
vm: any;

@@ -27,3 +27,3 @@ f: (props: any, attrs?: {}) => {};

dp: (props: any) => void;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "select-range")[], "change" | "select-range", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "select-range")[], "change" | "select-range", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
_constants: {

@@ -55,2 +55,2 @@ type: ObjectConstructor;

}>;
export default _default;
export default _sfc_main;
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