@opentiny/vue-year-range
Advanced tools
Comparing version 2.16.0 to 2.17.0
@@ -1,2 +0,2 @@ | ||
import YearRange from './src/pc.vue'; | ||
import YearRange from './src/index'; | ||
export default YearRange; |
231
lib/index.js
@@ -1,213 +0,39 @@ | ||
import { renderless, api } from '@opentiny/vue-renderless/year-range/vue'; | ||
import { defineComponent, $prefix, directive, setup, $props } from '@opentiny/vue-common'; | ||
import Clickoutside from '@opentiny/vue-renderless/common/deps/clickoutside'; | ||
import YearTable from '@opentiny/vue-year-table'; | ||
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); | ||
} | ||
}; | ||
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 | ||
}; | ||
} | ||
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 _extends = Object.assign ? Object.assign.bind() : function(n) { | ||
for (var e = 1; e < arguments.length; e++) { | ||
var t = arguments[e]; | ||
for (var r in t) | ||
({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
return n; | ||
}, _extends.apply(null, arguments); | ||
} | ||
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, idx) { | ||
return _c("button", { | ||
key: idx, | ||
staticClass: "tiny-picker-panel__shortcut", | ||
attrs: { | ||
"type": "button", | ||
"title": shortcut.text | ||
}, | ||
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)])]); | ||
import { $prefix, $props, $setup } from "@opentiny/vue-common"; | ||
import PcTemplate from "./pc.js"; | ||
import MobileFirstTemplate from "./mobile-first.js"; | ||
var template = function template2(mode) { | ||
var _process$env; | ||
var tinyMode = typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null; | ||
if ("pc" === (tinyMode || mode)) { | ||
return PcTemplate; | ||
} | ||
if ("mobile-first" === (tinyMode || mode)) { | ||
return MobileFirstTemplate; | ||
} | ||
return PcTemplate; | ||
}; | ||
var staticRenderFns = []; | ||
var __vue2_script = defineComponent({ | ||
var YearRange = { | ||
name: $prefix + "YearRange", | ||
directives: directive({ | ||
Clickoutside | ||
}), | ||
components: { | ||
YearTable, | ||
IconDoubleRight: IconDoubleRight(), | ||
IconDoubleLeft: IconDoubleLeft() | ||
}, | ||
props: _extends({}, $props, { | ||
emitter: Object | ||
}), | ||
emits: ["dodestroy", "pick"], | ||
setup: function setup$1(props, context) { | ||
return setup({ | ||
setup: function setup(props, context) { | ||
return $setup({ | ||
props, | ||
context, | ||
renderless, | ||
api, | ||
mono: true | ||
template | ||
}); | ||
} | ||
}); | ||
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 YearRange = /* @__PURE__ */ function() { | ||
return __component__.exports; | ||
}(); | ||
var version = "2.16.0"; | ||
}; | ||
var version = "2.17.0"; | ||
YearRange.install = function(Vue) { | ||
@@ -217,3 +43,4 @@ Vue.component(YearRange.name, YearRange); | ||
YearRange.version = version; | ||
export { YearRange as default }; | ||
export { | ||
YearRange as default | ||
}; |
{ | ||
"name": "@opentiny/vue-year-range", | ||
"version": "2.16.0", | ||
"version": "2.17.0", | ||
"description": "", | ||
@@ -10,6 +10,6 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-renderless": "~3.16.0", | ||
"@opentiny/vue-common": "~2.16.0", | ||
"@opentiny/vue-year-table": "~2.16.0", | ||
"@opentiny/vue-icon": "~2.16.0" | ||
"@opentiny/vue-renderless": "~3.17.0", | ||
"@opentiny/vue-common": "~2.17.0", | ||
"@opentiny/vue-year-table": "~2.17.0", | ||
"@opentiny/vue-icon": "~2.17.0" | ||
}, | ||
@@ -16,0 +16,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
16326
9
453
2
1
+ Added@opentiny/vue-common@2.17.0(transitive)
+ Added@opentiny/vue-icon@2.17.0(transitive)
+ Added@opentiny/vue-locale@2.17.0(transitive)
+ Added@opentiny/vue-renderless@3.17.6(transitive)
+ Added@opentiny/vue-theme@3.17.5(transitive)
+ Added@opentiny/vue-theme-mobile@3.17.0(transitive)
+ Added@opentiny/vue-year-table@2.17.0(transitive)
- Removed@opentiny/vue-common@2.16.0(transitive)
- Removed@opentiny/vue-icon@2.16.0(transitive)
- Removed@opentiny/vue-locale@2.16.0(transitive)
- Removed@opentiny/vue-renderless@3.16.2(transitive)
- Removed@opentiny/vue-theme@3.16.4(transitive)
- Removed@opentiny/vue-theme-mobile@3.16.0(transitive)
- Removed@opentiny/vue-year-table@2.16.0(transitive)
Updated@opentiny/vue-common@~2.17.0
Updated@opentiny/vue-icon@~2.17.0