@opentiny/vue-time-spinner
Advanced tools
Comparing version 2.6.0 to 2.6.1-alpha.0
324
lib/index.js
@@ -1,13 +0,66 @@ | ||
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 { 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"; | ||
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); | ||
} | ||
}; | ||
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]; | ||
} | ||
} | ||
return { | ||
exports: scriptExports, | ||
options | ||
}; | ||
} | ||
var $constants = { | ||
ANIMATIONNAME: 'tiny-transition-timepicker' | ||
ANIMATIONNAME: "tiny-transition-timepicker" | ||
}; | ||
var script = { | ||
name: $prefix + 'TimeSpinner', | ||
emits: ['change', 'select-range'], | ||
var __vue2_script = defineComponent({ | ||
name: $prefix + "TimeSpinner", | ||
emits: ["change", "select-range"], | ||
components: { | ||
@@ -20,3 +73,3 @@ TinyScrollbar: Scrollbar, | ||
repeatClick: { | ||
bind: bind | ||
bind | ||
} | ||
@@ -40,112 +93,26 @@ }), | ||
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 | ||
}); | ||
} | ||
}; | ||
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier | ||
/* server only */ | ||
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { | ||
if (typeof shadowMode !== 'boolean') { | ||
createInjectorSSR = createInjector; | ||
createInjector = shadowMode; | ||
shadowMode = false; | ||
} // Vue.extend constructor export interop. | ||
var options = typeof script === 'function' ? script.options : script; // render functions | ||
if (template && template.render) { | ||
options.render = template.render; | ||
options.staticRenderFns = template.staticRenderFns; | ||
options._compiled = true; // functional template | ||
if (isFunctionalTemplate) { | ||
options.functional = true; | ||
} | ||
} // scopedId | ||
if (scopeId) { | ||
options._scopeId = scopeId; | ||
} | ||
var hook; | ||
if (moduleIdentifier) { | ||
// server build | ||
hook = function hook(context) { | ||
// 2.3 injection | ||
context = context || // cached call | ||
this.$vnode && this.$vnode.ssrContext || // stateful | ||
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional | ||
// 2.2 with runInNewContext: true | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
context = __VUE_SSR_CONTEXT__; | ||
} // inject component styles | ||
if (style) { | ||
style.call(this, createInjectorSSR(context)); | ||
} // register component module identifier for async chunk inference | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier); | ||
} | ||
}; // used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
options._ssrRegister = hook; | ||
} else if (style) { | ||
hook = shadowMode ? function () { | ||
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); | ||
} : function (context) { | ||
style.call(this, createInjector(context)); | ||
}; | ||
} | ||
if (hook) { | ||
if (options.functional) { | ||
// register for functional component in vue file | ||
var originalRender = options.render; | ||
options.render = function renderWithStyleInjection(h, context) { | ||
hook.call(context); | ||
return originalRender(h, context); | ||
}; | ||
} else { | ||
// inject component registration as beforeCreate hook | ||
var existing = options.beforeCreate; | ||
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; | ||
} | ||
} | ||
return script; | ||
} | ||
var normalizeComponent_1 = normalizeComponent; | ||
var __vue_script__ = script; | ||
var __vue_render__ = function __vue_render__() { | ||
}); | ||
var render = function render2() { | ||
var _vm = this; | ||
var _h = _vm.$createElement; | ||
var _c = _vm._self._c || _h; | ||
return _c('div', { | ||
return _c("div", { | ||
staticClass: "tiny-time-spinner", | ||
class: { | ||
'has-seconds': _vm.showSeconds | ||
"has-seconds": _vm.showSeconds | ||
} | ||
}, [!_vm.arrowControl ? [_c('tiny-scrollbar', { | ||
}, [!_vm.arrowControl ? [_c("tiny-scrollbar", { | ||
ref: "hours", | ||
@@ -162,10 +129,10 @@ staticClass: "tiny-time-spinner__wrapper", | ||
"mouseenter": function mouseenter($event) { | ||
return _vm.emitSelectRange('hours'); | ||
return _vm.emitSelectRange("hours"); | ||
}, | ||
"mousemove": function mousemove($event) { | ||
return _vm.adjustCurrentSpinner('hours'); | ||
return _vm.adjustCurrentSpinner("hours"); | ||
} | ||
} | ||
}, _vm._l(_vm.state.hoursList, function (disabled, hour) { | ||
return _c('li', { | ||
}, _vm._l(_vm.state.hoursList, function(disabled, hour) { | ||
return _c("li", { | ||
key: hour, | ||
@@ -175,17 +142,17 @@ staticClass: "tiny-time-spinner__item", | ||
active: hour === _vm.state.hours, | ||
disabled: disabled | ||
disabled | ||
}, | ||
on: { | ||
"click": function click($event) { | ||
return _vm.handleClick('hours', { | ||
return _vm.handleClick("hours", { | ||
value: hour, | ||
disabled: disabled | ||
disabled | ||
}); | ||
} | ||
} | ||
}, [_c('span', [_vm._v(_vm._s(('0' + (_vm.amPmMode ? hour % 12 || 12 : hour)).slice(-2)) + _vm._s(_vm.amPm(hour)))])]); | ||
}), 0), _vm._v(" "), _c('tiny-scrollbar', { | ||
}, [_c("span", [_vm._v(_vm._s(("0" + (_vm.amPmMode ? hour % 12 || 12 : hour)).slice(-2)) + _vm._s(_vm.amPm(hour)))])]); | ||
}), 0), _c("tiny-scrollbar", { | ||
ref: "minutes", | ||
staticClass: "tiny-time-spinner__wrapper", | ||
class: [_vm.state.animationName + '-up'], | ||
class: [_vm.state.animationName + "-up"], | ||
attrs: { | ||
@@ -199,11 +166,11 @@ "wrap-style": "max-height: inherit;", | ||
"mouseenter": function mouseenter($event) { | ||
return _vm.emitSelectRange('minutes'); | ||
return _vm.emitSelectRange("minutes"); | ||
}, | ||
"mousemove": function mousemove($event) { | ||
return _vm.adjustCurrentSpinner('minutes'); | ||
return _vm.adjustCurrentSpinner("minutes"); | ||
} | ||
} | ||
}, _vm._l(_vm.state.minutesList, function (enabled, key) { | ||
return _c('li', { | ||
key: key, | ||
}, _vm._l(_vm.state.minutesList, function(enabled, key) { | ||
return _c("li", { | ||
key, | ||
staticClass: "tiny-time-spinner__item", | ||
@@ -216,3 +183,3 @@ class: { | ||
"click": function click($event) { | ||
return _vm.handleClick('minutes', { | ||
return _vm.handleClick("minutes", { | ||
value: key, | ||
@@ -223,4 +190,4 @@ disabled: false | ||
} | ||
}, [_c('span', [_vm._v(_vm._s(('0' + key).slice(-2)))])]); | ||
}), 0), _vm._v(" "), _c('tiny-scrollbar', { | ||
}, [_c("span", [_vm._v(_vm._s(("0" + key).slice(-2)))])]); | ||
}), 0), _c("tiny-scrollbar", { | ||
directives: [{ | ||
@@ -243,11 +210,11 @@ name: "show", | ||
"mouseenter": function mouseenter($event) { | ||
return _vm.emitSelectRange('seconds'); | ||
return _vm.emitSelectRange("seconds"); | ||
}, | ||
"mousemove": function mousemove($event) { | ||
return _vm.adjustCurrentSpinner('seconds'); | ||
return _vm.adjustCurrentSpinner("seconds"); | ||
} | ||
} | ||
}, _vm._l(60, function (second, key) { | ||
return _c('li', { | ||
key: key, | ||
}, _vm._l(60, function(second, key) { | ||
return _c("li", { | ||
key, | ||
staticClass: "tiny-time-spinner__item", | ||
@@ -259,3 +226,3 @@ class: { | ||
"click": function click($event) { | ||
return _vm.handleClick('seconds', { | ||
return _vm.handleClick("seconds", { | ||
value: key, | ||
@@ -266,11 +233,11 @@ disabled: false | ||
} | ||
}, [_c('span', [_vm._v(_vm._s(('0' + key).slice(-2)))])]); | ||
}), 0)] : _vm._e(), _vm._v(" "), _vm.arrowControl ? [_c('div', { | ||
}, [_c("span", [_vm._v(_vm._s(("0" + key).slice(-2)))])]); | ||
}), 0)] : _vm._e(), _vm.arrowControl ? [_c("div", { | ||
staticClass: "tiny-time-spinner__wrapper is-arrow", | ||
on: { | ||
"mouseenter": function mouseenter($event) { | ||
return _vm.emitSelectRange('hours'); | ||
return _vm.emitSelectRange("hours"); | ||
} | ||
} | ||
}, [_c('i', { | ||
}, [_c("i", { | ||
directives: [{ | ||
@@ -283,3 +250,3 @@ name: "repeat-click", | ||
staticClass: "tiny-time-spinner__arrow tiny-icon-arrow-up" | ||
}, [_c('icon-chevron-up')], 1), _vm._v(" "), _c('i', { | ||
}, [_c("icon-chevron-up")], 1), _c("i", { | ||
directives: [{ | ||
@@ -292,9 +259,9 @@ name: "repeat-click", | ||
staticClass: "tiny-time-spinner__arrow tiny-icon-arrow-down" | ||
}, [_c('icon-chevron-down')], 1), _vm._v(" "), _c('ul', { | ||
}, [_c("icon-chevron-down")], 1), _c("ul", { | ||
ref: "hours", | ||
staticClass: "tiny-time-spinner__list", | ||
class: [_vm.state.animationName] | ||
}, _vm._l(_vm.state.arrowHourList, function (hour, key) { | ||
return _c('li', { | ||
key: key, | ||
}, _vm._l(_vm.state.arrowHourList, function(hour, key) { | ||
return _c("li", { | ||
key, | ||
staticClass: "tiny-time-spinner__item", | ||
@@ -305,11 +272,11 @@ class: { | ||
} | ||
}, [_c('span', [_vm._v(_vm._s(hour === undefined ? '' : ('0' + (_vm.amPmMode ? hour % 12 || 12 : hour)).slice(-2) + _vm.amPm(hour)))])]); | ||
}), 0)]), _vm._v(" "), _c('div', { | ||
}, [_c("span", [_vm._v(_vm._s(hour === void 0 ? "" : ("0" + (_vm.amPmMode ? hour % 12 || 12 : hour)).slice(-2) + _vm.amPm(hour)))])]); | ||
}), 0)]), _c("div", { | ||
staticClass: "tiny-time-spinner__wrapper is-arrow", | ||
on: { | ||
"mouseenter": function mouseenter($event) { | ||
return _vm.emitSelectRange('minutes'); | ||
return _vm.emitSelectRange("minutes"); | ||
} | ||
} | ||
}, [_c('i', { | ||
}, [_c("i", { | ||
directives: [{ | ||
@@ -322,3 +289,3 @@ name: "repeat-click", | ||
staticClass: "tiny-time-spinner__arrow tiny-icon-arrow-up" | ||
}, [_c('icon-chevron-up')], 1), _vm._v(" "), _c('i', { | ||
}, [_c("icon-chevron-up")], 1), _c("i", { | ||
directives: [{ | ||
@@ -331,9 +298,9 @@ name: "repeat-click", | ||
staticClass: "tiny-time-spinner__arrow tiny-icon-arrow-down" | ||
}, [_c('icon-chevron-down')], 1), _vm._v(" "), _c('ul', { | ||
}, [_c("icon-chevron-down")], 1), _c("ul", { | ||
ref: "minutes", | ||
staticClass: "tiny-time-spinner__list", | ||
class: [_vm.state.animationName + '-up'] | ||
}, _vm._l(_vm.state.arrowMinuteList, function (minute, key) { | ||
return _c('li', { | ||
key: key, | ||
class: [_vm.state.animationName + "-up"] | ||
}, _vm._l(_vm.state.arrowMinuteList, function(minute, key) { | ||
return _c("li", { | ||
key, | ||
staticClass: "tiny-time-spinner__item", | ||
@@ -343,11 +310,11 @@ class: { | ||
} | ||
}, [_c('span', [_vm._v(_vm._s(minute === undefined ? '' : ('0' + minute).slice(-2)))])]); | ||
}), 0)]), _vm._v(" "), _vm.showSeconds ? _c('div', { | ||
}, [_c("span", [_vm._v(_vm._s(minute === void 0 ? "" : ("0" + minute).slice(-2)))])]); | ||
}), 0)]), _vm.showSeconds ? _c("div", { | ||
staticClass: "tiny-time-spinner__wrapper is-arrow", | ||
on: { | ||
"mouseenter": function mouseenter($event) { | ||
return _vm.emitSelectRange('seconds'); | ||
return _vm.emitSelectRange("seconds"); | ||
} | ||
} | ||
}, [_c('i', { | ||
}, [_c("i", { | ||
directives: [{ | ||
@@ -360,3 +327,3 @@ name: "repeat-click", | ||
staticClass: "tiny-time-spinner__arrow tiny-icon-arrow-up" | ||
}, [_c('icon-chevron-up')], 1), _vm._v(" "), _c('i', { | ||
}, [_c("icon-chevron-up")], 1), _c("i", { | ||
directives: [{ | ||
@@ -369,9 +336,9 @@ name: "repeat-click", | ||
staticClass: "tiny-time-spinner__arrow tiny-icon-arrow-down" | ||
}, [_c('icon-chevron-down')], 1), _vm._v(" "), _c('ul', { | ||
}, [_c("icon-chevron-down")], 1), _c("ul", { | ||
ref: "seconds", | ||
staticClass: "tiny-time-spinner__list", | ||
class: [_vm.state.animationName] | ||
}, _vm._l(_vm.state.arrowSecondList, function (second, key) { | ||
return _c('li', { | ||
key: key, | ||
}, _vm._l(_vm.state.arrowSecondList, function(second, key) { | ||
return _c("li", { | ||
key, | ||
staticClass: "tiny-time-spinner__item", | ||
@@ -381,20 +348,23 @@ class: { | ||
} | ||
}, [_c('span', [_vm._v(_vm._s(second === undefined ? '' : ('0' + second).slice(-2)))])]); | ||
}, [_c("span", [_vm._v(_vm._s(second === void 0 ? "" : ("0" + second).slice(-2)))])]); | ||
}), 0)]) : _vm._e()] : _vm._e()], 2); | ||
}; | ||
var __vue_staticRenderFns__ = []; | ||
var __vue_inject_styles__ = undefined; | ||
var __vue_scope_id__ = undefined; | ||
var __vue_module_identifier__ = undefined; | ||
var __vue_is_functional_template__ = false; | ||
var __vue_component__ = normalizeComponent_1({ | ||
render: __vue_render__, | ||
staticRenderFns: __vue_staticRenderFns__ | ||
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined); | ||
__vue_component__.install = function (Vue) { | ||
Vue.component(__vue_component__.name, __vue_component__); | ||
var staticRenderFns = []; | ||
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 TimeSpinner = /* @__PURE__ */ function() { | ||
return __component__.exports; | ||
}(); | ||
var version = "3.7.0"; | ||
TimeSpinner.install = function(Vue) { | ||
Vue.component(TimeSpinner.name, TimeSpinner); | ||
}; | ||
__vue_component__.version = '2.6.0'; | ||
export { __vue_component__ as default }; | ||
TimeSpinner.version = version; | ||
export { | ||
TimeSpinner as default | ||
}; |
{ | ||
"name": "@opentiny/vue-time-spinner", | ||
"version": "2.6.0", | ||
"version": "2.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": "~2.6.0", | ||
"@opentiny/vue-scrollbar": "~2.6.0", | ||
"@opentiny/vue-icon": "~2.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": "~2.6.1-alpha.0", | ||
"@opentiny/vue-scrollbar": "~2.6.1-alpha.0" | ||
}, | ||
"license": "MIT", | ||
"sideEffects": false | ||
"types": "index.d.ts", | ||
"scripts": { | ||
"build": "pnpm -w build:ui $npm_package_name", | ||
"//postversion": "pnpm build" | ||
} | ||
} |
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
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
14497
3
5
425
2
80
2
1
- Removed@opentiny/vue-icon@~2.6.0
- Removed@opentiny/vue-theme@~3.6.0
- Removed@opentiny/vue-theme-mobile@~3.6.0
- Removed@opentiny/vue-icon@2.6.7(transitive)