Socket
Socket
Sign inDemoInstall

@opentiny/vue-picker

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentiny/vue-picker - npm Package Compare versions

Comparing version 2.14.0 to 2.15.0

767

lib/index.js

@@ -1,19 +0,21 @@

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);
}
import { $prefix, $props, $setup } from "@opentiny/vue-common";
import PcTemplate from "./pc.js";
import MobileFirstTemplate from "./mobile-first.js";
import { iconClose } from "@opentiny/vue-icon";
import { defineComponent, directive, setup, $prefix, $props, $setup } from '@opentiny/vue-common';
import { renderless, api } from '@opentiny/vue-renderless/picker/vue';
import Input from '@opentiny/vue-input';
import Clickoutside from '@opentiny/vue-renderless/common/deps/clickoutside';
import DatePanel from '@opentiny/vue-date-panel';
import DateRange from '@opentiny/vue-date-range';
import MonthRange from '@opentiny/vue-month-range';
import YearRange from '@opentiny/vue-year-range';
import TimePicker from '@opentiny/vue-time';
import TimeRange from '@opentiny/vue-time-range';
import QuarterPanel from '@opentiny/vue-quarter-panel';
import TimePanel from '@opentiny/vue-time-panel';
import Tooltip from '@opentiny/vue-tooltip';
import FilterBox from '@opentiny/vue-filter-box';
import { iconClose, iconCalendar, iconTime, IconCalendar, IconTime, IconClose } from '@opentiny/vue-icon';
import '@opentiny/vue-theme/picker/index.css';
import DatePickerMobileFirst from '@opentiny/vue-date-picker-mobile-first';
import TimePickerMobile from '@opentiny/vue-time-picker-mobile';
import '@opentiny/vue-theme/input/index.css';
var pickerProps = {

@@ -153,5 +155,711 @@ type: {

import "@opentiny/vue-theme/picker/index.css";
import "@opentiny/vue-theme/input/index.css";
import "@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 __vue2_script$1 = defineComponent({
components: {
TinyInput: Input,
TinyFilterBox: FilterBox,
TinyTooltip: Tooltip,
IconCalendar: iconCalendar(),
IconTime: iconTime()
},
emits: ["created", "select-change", "update:modelValue", "blur", "focus", "change"],
props: pickerProps,
directives: directive({
Clickoutside
}),
setup: function setup$1(props, context) {
return setup({
props,
context,
renderless,
api,
extendOptions: {
DatePanel,
DateRangePanel: DateRange,
MonthRangePanel: MonthRange,
YearRangePanel: YearRange,
TimePanel: TimePicker,
TimeRangePanel: TimeRange,
QuarterPanel,
TimeSelect: TimePanel
}
});
}
});
var render$1 = function render2() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("div", {
ref: "reference",
staticClass: "tiny-date-container"
}, [_vm.shape === "filter" ? _c("tiny-filter-box", {
directives: [{
name: "clickoutside",
rawName: "v-clickoutside",
value: _vm.handleClose,
expression: "handleClose"
}],
attrs: {
"show-close": _vm.clearable,
"placeholder": _vm.placeholder,
"disabled": _vm.state.pickerDisabled,
"label": _vm.label,
"tip": _vm.tip,
"value": _vm.state.displayValue.toString(),
"drop-down-visible": _vm.state.pickerVisible,
"blank": _vm.blank
},
on: {
"click": _vm.handleFocus
}
}) : !_vm.state.ranged ? _c("tiny-input", _vm._b({
directives: [{
name: "clickoutside",
rawName: "v-clickoutside",
value: _vm.handleClose,
expression: "handleClose"
}],
staticClass: "tiny-date-editor",
class: "tiny-date-editor--" + _vm.state.type,
attrs: {
"tabindex": _vm.tabindex,
"readonly": !_vm.editable || _vm.readonly || _vm.state.type === "dates" || _vm.state.type === "week",
"disabled": _vm.state.pickerDisabled,
"size": _vm.state.pickerSize,
"name": _vm.name,
"placeholder": _vm.placeholder,
"model-value": _vm.state.displayValue,
"title": _vm.state.type === "date" ? "" : _vm.state.displayValue,
"display-only": _vm.state.isDisplayOnly,
"display-only-content": _vm.state.displayValue,
"validate-event": false
},
on: {
"focus": _vm.handleFocus,
"keydown": _vm.handleKeydown,
"input": _vm.handleInput,
"change": _vm.handleChange,
"mouseenter": _vm.handleMouseEnter,
"mouseleave": function mouseleave($event) {
_vm.state.showClose = false;
}
},
scopedSlots: _vm._u([_vm.label ? {
key: "prefix",
fn: function fn() {
return [_c("tiny-tooltip", {
attrs: {
"effect": "light",
"content": _vm.state.labelTooltip,
"placement": "top"
},
nativeOn: {
"mouseenter": function mouseenter($event) {
return _vm.handleEnterPickerlabel.apply(null, arguments);
}
}
}, [_c("span", {
ref: "label",
staticClass: "tiny-input__label"
}, [_vm._v(" " + _vm._s(_vm.label) + " ")])])];
},
proxy: true
} : null, {
key: "suffix",
fn: function fn() {
return [_c("i", {
staticClass: "tiny-input__icon-container"
}, [_c("transition", {
attrs: {
"name": "tiny-transition-icon-scale-in"
}
}, [_vm.state.haveTrigger ? _c(_vm.state.showClose ? _vm.clearIcon : null, {
tag: "component",
staticClass: "baseClearicon",
on: {
"click": _vm.handleClickIcon,
"mouseenter": function mouseenter($event) {
_vm.state.showClose = true;
},
"mouseleave": function mouseleave($event) {
_vm.state.showClose = false;
}
}
}) : _vm._e()], 1), _c(_vm.state.triggerClass, {
tag: "component",
staticClass: "tiny-svg-size",
on: {
"click": _vm.handleFocus
}
})], 1)];
},
proxy: true
}], null, true)
}, "tiny-input", _vm.state.firstInputId, false)) : _c("div", {
directives: [{
name: "clickoutside",
rawName: "v-clickoutside",
value: _vm.handleClose,
expression: "handleClose"
}],
staticClass: "tiny-date-editor tiny-range-editor tiny-input tiny-input__inner",
class: ["tiny-date-editor--" + _vm.state.type, _vm.state.pickerSize ? "tiny-range-editor--" + _vm.state.pickerSize : "", _vm.state.pickerDisabled ? "is-disabled" : "", _vm.state.pickerVisible ? "is-active" : "", _vm.state.isDisplayOnly ? "is-display-only" : ""],
on: {
"click": _vm.handleFocus,
"mouseenter": _vm.handleMouseEnter,
"mouseleave": function mouseleave($event) {
_vm.state.showClose = false;
},
"keydown": _vm.handleKeydown
}
}, [_c("tiny-tooltip", {
attrs: {
"effect": "light",
"content": _vm.state.labelTooltip,
"placement": "top"
},
nativeOn: {
"mouseenter": function mouseenter($event) {
return _vm.handleEnterPickerlabel.apply(null, arguments);
}
}
}, [_vm.label ? _c("span", {
ref: "label",
staticClass: "tiny-input__label"
}, [_vm._v(" " + _vm._s(_vm.label) + " ")]) : _vm._e()]), _c("input", _vm._b({
staticClass: "tiny-range-input",
attrs: {
"autocomplete": "off",
"placeholder": _vm.startPlaceholder,
"disabled": _vm.state.pickerDisabled,
"readonly": !_vm.editable || _vm.readonly,
"name": _vm.name && _vm.name[0]
},
domProps: {
"value": _vm.state.displayValue && _vm.state.displayValue[0]
},
on: {
"input": _vm.handleStartInput,
"change": _vm.handleStartChange,
"focus": _vm.handleFocus
}
}, "input", _vm.state.firstInputId, false)), _vm._t("range-separator", function() {
return [typeof _vm.rangeSeparator === "string" ? _c("span", {
staticClass: "tiny-range-separator"
}, [_vm._v(_vm._s(_vm.rangeSeparator))]) : _c(_vm.rangeSeparator, {
tag: "component"
})];
}), _c("input", _vm._b({
staticClass: "tiny-range-input",
attrs: {
"autocomplete": "off",
"placeholder": _vm.endPlaceholder,
"disabled": _vm.state.pickerDisabled,
"readonly": !_vm.editable || _vm.readonly,
"name": _vm.name && _vm.name[1]
},
domProps: {
"value": _vm.state.displayValue && _vm.state.displayValue[1]
},
on: {
"input": _vm.handleEndInput,
"change": _vm.handleEndChange,
"focus": _vm.handleFocus
}
}, "input", _vm.state.secondInputId, false)), _vm.state.haveTrigger ? _c("i", {
staticClass: "tiny-input__icon tiny-range__close-icon",
on: {
"click": _vm.handleClickIcon
}
}, [_c("transition", {
attrs: {
"name": "tiny-transition-icon-scale-in"
}
}, [_c(_vm.state.showClose ? _vm.clearIcon : null, {
tag: "component"
})], 1)], 1) : _vm._e(), !_vm.state.isDisplayOnly ? _c("i", {
staticClass: "tiny-input__icon tiny-range__icon tiny-input__suffix"
}, [_c(_vm.state.triggerClass, {
tag: "component"
})], 1) : _vm._e(), _vm.state.isDisplayOnly ? _c("tiny-tooltip", {
staticClass: "tiny-range-editor-display-only",
attrs: {
"content": _vm.state.displayOnlyTooltip,
"effect": "light",
"placement": "top"
},
nativeOn: {
"mouseenter": function mouseenter($event) {
return _vm.handleEnterDisplayOnlyContent.apply(null, arguments);
}
}
}, [_c("span", [_vm._v(_vm._s(_vm.state.displayValue && _vm.state.displayValue.join(" " + _vm.t("ui.datepicker.to") + " ")))])]) : _vm._e()], 2), _c(_vm.state.panel, {
ref: "picker",
tag: "component",
attrs: {
"step": _vm.step,
"show-week-number": _vm.showWeekNumber,
"time-editable": _vm.timeEditable,
"format-weeks": _vm.formatWeeks,
"visible": _vm.state.pickerVisible
},
on: {
"pick": _vm.handlePick,
"select-range": _vm.handleSelectRange,
"select-change": _vm.handleSelectChange
}
})], 1);
};
var staticRenderFns$1 = [];
var __cssModules$1 = {};
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, null, null, null);
function __vue2_injectStyles$1(context) {
for (var o in __cssModules$1) {
this[o] = __cssModules$1[o];
}
}
var pc = /* @__PURE__ */ function() {
return __component__$1.exports;
}();
var classes = {
"input-label": "text-color-text-placeholder text-xs mr-2 inline-block text-left max-w-[100px] truncate",
"range-editor": "bg-color-bg-1 relative inline-flex items-center py-1 sm:px-3 border-0 sm:border border-color-border hover:border-color-border-hover rounded mt-0.5",
"range-input": "appearance-none border-none outline-0 p-0 w-[35%] text-color-text-primary focus:border-color-brand-focus disabled:border-color-border placeholder:text-color-text-placeholder disabled:cursor-not-allowed text-sm sm:placeholder:text-xs sm:text-xs h-full m-0 truncate disabled:text-color-icon-placeholder disabled:bg-transparent sm:disabled:bg-color-border-disabled",
"datetimerange": "w-full sm:w-96 sm:max-w-full",
"range-separator": "px-1 leading-5 w-[12%] text-color-text-primary text-xs h-full m-0",
"close-icon": "absolute right-1.5 text-base w-6 float-right leading-8 mr-5 flex justify-center items-center cursor-pointer",
"suffix": "absolute top-1/2 -translate-y-2/4 transition-all duration-300 text-center text-color-text-secondary flex items-center right-2 pointer-events-none z-[1]",
"is-disabled": "sm:bg-color-border-disabled border-color-border text-color-text-disabled cursor-not-allowed focus:border-color-border hover:border-color-border",
"is-active": "border-color-border-focus",
"is-display-only": "leading-7 relative inline border-0 sm:border-0 text-color-text-primary bg-transparent hover:bg-transparent px-0 py-0"
};
var render = function render2() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("div", {
ref: "reference",
class: _vm.state.isDisplayOnly ? "inline" : "",
attrs: {
"data-tag": "tiny-date-container"
}
}, [_vm.shape === "filter" ? _c("tiny-filter-box", {
directives: [{
name: "clickoutside",
rawName: "v-clickoutside",
value: _vm.handleClose,
expression: "handleClose"
}],
attrs: {
"show-close": _vm.clearable,
"placeholder": _vm.placeholder,
"disabled": _vm.state.pickerDisabled,
"label": _vm.label,
"tip": _vm.tip,
"value": _vm.state.displayValue.toString(),
"drop-down-visible": _vm.state.pickerVisible,
"blank": _vm.blank
},
on: {
"click": _vm.handleFocus
}
}) : !_vm.state.ranged ? _c("tiny-input", _vm._b({
directives: [{
name: "clickoutside",
rawName: "v-clickoutside",
value: _vm.handleClose,
expression: "handleClose"
}],
attrs: {
"tabindex": _vm.tabindex,
"data-tag": "tiny-date-editor",
"readonly": _vm.state.isMobileScreen || !_vm.editable || _vm.readonly || _vm.state.type === "dates" || _vm.state.type === "week",
"disabled": _vm.state.pickerDisabled,
"size": _vm.state.pickerSize,
"name": _vm.name,
"placeholder": _vm.placeholder,
"model-value": _vm.state.displayValue,
"title": _vm.state.type === "date" ? "" : _vm.state.displayValue,
"display-only": _vm.state.isDisplayOnly,
"display-only-content": _vm.state.displayValue,
"validate-event": false,
"custom-class": "sm:border " + _vm.gcls(_vm.state.type)
},
on: {
"focus": _vm.handleFocus,
"keydown": _vm.handleKeydown,
"input": _vm.handleInput,
"change": _vm.handleChange,
"mouseenter": _vm.handleMouseEnter,
"mouseleave": function mouseleave($event) {
_vm.state.showClose = false;
}
},
scopedSlots: _vm._u([_vm.label ? {
key: "prefix",
fn: function fn() {
return [_c("tiny-tooltip", {
attrs: {
"effect": "light",
"content": _vm.state.labelTooltip,
"placement": "top"
},
nativeOn: {
"mouseenter": function mouseenter($event) {
return _vm.handleEnterPickerlabel.apply(null, arguments);
}
}
}, [_c("span", {
ref: "label",
class: _vm.gcls("input-label"),
attrs: {
"data-tag": "tiny-input__label"
}
}, [_vm._v(" " + _vm._s(_vm.label) + " ")])])];
},
proxy: true
} : null, {
key: "suffix",
fn: function fn() {
return [_c("i", {
staticClass: "flex items-center cursor-pointer",
attrs: {
"data-tag": "icon"
}
}, [!_vm.state.isMobileScreen ? _c("transition", {
attrs: {
"name": "tiny-transition-icon-scale-in"
}
}, [_vm.state.haveTrigger ? _c(_vm.state.showClose ? _vm.clearIcon : null, {
tag: "component",
staticClass: "fill-color-text-placeholder hover:fill-color-text-primary",
on: {
"click": _vm.handleClickIcon,
"mouseenter": function mouseenter($event) {
_vm.state.showClose = true;
},
"mouseleave": function mouseleave($event) {
_vm.state.showClose = false;
}
}
}) : _vm._e()], 1) : _vm._e(), _c(_vm.state.triggerClass, {
tag: "component",
class: !_vm.state.isDisplayOnly && _vm.state.pickerDisabled ? "fill-color-icon-placeholder sm:fill-color-icon-secondary" : "fill-color-icon-secondary sm:fill-color-text-placeholder",
attrs: {
"custom-class": "h-5 w-5 sm:h-4 sm:w-4"
},
on: {
"click": _vm.handleFocus
}
})], 1)];
},
proxy: true
}], null, true)
}, "tiny-input", _vm.state.firstInputId, false)) : _c("div", {
directives: [{
name: "clickoutside",
rawName: "v-clickoutside",
value: _vm.handleClose,
expression: "handleClose"
}],
class: _vm.m(_vm.gcls("range-editor"), _vm.gcls(_vm.state.type), _vm.state.pickerVisible && _vm.gcls("is-active"), !_vm.state.isDisplayOnly && _vm.state.pickerDisabled && _vm.gcls("is-disabled"), _vm.state.isDisplayOnly && _vm.gcls("is-display-only")),
attrs: {
"data-tag": "tiny-date-editor tiny-range-editor tiny-input tiny-input__inner"
},
on: {
"click": _vm.handleFocus,
"mouseenter": _vm.handleMouseEnter,
"mouseleave": function mouseleave($event) {
_vm.state.showClose = false;
},
"keydown": _vm.handleKeydown
}
}, [_c("tiny-tooltip", {
attrs: {
"effect": "light",
"content": _vm.state.labelTooltip,
"placement": "top"
},
nativeOn: {
"mouseenter": function mouseenter($event) {
return _vm.handleEnterPickerlabel.apply(null, arguments);
}
}
}, [_vm.label ? _c("span", {
ref: "label",
attrs: {
"data-tag": "tiny-input__label"
}
}, [_vm._v(" " + _vm._s(_vm.label) + " ")]) : _vm._e()]), !_vm.state.isDisplayOnly ? [_c("input", _vm._b({
class: _vm.gcls("range-input"),
attrs: {
"autocomplete": "off",
"placeholder": _vm.startPlaceholder,
"title": _vm.state.displayValue && _vm.state.displayValue[0],
"disabled": _vm.state.pickerDisabled,
"readonly": _vm.state.isMobileScreen || !_vm.editable || _vm.readonly,
"name": _vm.name && _vm.name[0],
"data-tag": "tiny-range-input"
},
domProps: {
"value": _vm.state.displayValue && _vm.state.displayValue[0]
},
on: {
"input": _vm.handleStartInput,
"change": _vm.handleStartChange,
"focus": _vm.handleFocus
}
}, "input", _vm.state.firstInputId, false)), _vm._t("range-separator", function() {
return [typeof _vm.rangeSeparator === "string" ? _c("span", {
class: _vm.m(_vm.gcls("range-separator"), {
"text-center": _vm.type === "datetimerange"
}, {
"text-color-icon-placeholder": !_vm.state.isDisplayOnly && _vm.state.pickerDisabled
}),
attrs: {
"data-tag": "tiny-range-separator"
}
}, [_vm._v(_vm._s(_vm.rangeSeparator))]) : _c(_vm.rangeSeparator, {
tag: "component"
})];
}), _c("input", _vm._b({
class: _vm.gcls("range-input"),
attrs: {
"autocomplete": "off",
"placeholder": _vm.endPlaceholder,
"title": _vm.state.displayValue && _vm.state.displayValue[1],
"disabled": _vm.state.pickerDisabled,
"readonly": _vm.state.isMobileScreen || !_vm.editable || _vm.readonly,
"name": _vm.name && _vm.name[1],
"data-tag": "tiny-range-input"
},
domProps: {
"value": _vm.state.displayValue && _vm.state.displayValue[1]
},
on: {
"input": _vm.handleEndInput,
"change": _vm.handleEndChange,
"focus": _vm.handleFocus
}
}, "input", _vm.state.secondInputId, false)), !_vm.state.isMobileScreen && _vm.state.haveTrigger ? _c("i", {
class: _vm.gcls("close-icon"),
attrs: {
"data-tag": "tiny-input__icon tiny-range__close-icon"
},
on: {
"click": _vm.handleClickIcon
}
}, [_c("transition", {
attrs: {
"name": "tiny-transition-icon-scale-in"
}
}, [_c(_vm.state.showClose ? _vm.clearIcon : null, {
tag: "component",
attrs: {
"custom-class": "fill-color-text-placeholder"
}
})], 1)], 1) : _vm._e(), !_vm.state.isDisplayOnly ? _c("i", {
class: _vm.gcls("suffix"),
attrs: {
"data-tag": "tiny-input__icon tiny-range__icon tiny-input__suffix"
}
}, [_c(_vm.state.triggerClass, {
tag: "component",
class: !_vm.state.isDisplayOnly && _vm.state.pickerDisabled ? "fill-color-icon-placeholder sm:fill-color-icon-secondary" : "fill-color-icon-secondary sm:fill-color-text-placeholder",
attrs: {
"custom-class": "h-5 w-5 sm:h-4 sm:w-4"
}
})], 1) : _vm._e()] : _vm._e(), _vm.state.isDisplayOnly ? _c("tiny-tooltip", {
attrs: {
"data-tag": "tiny-range-editor-display-only",
"content": _vm.state.displayOnlyTooltip,
"effect": "light",
"placement": "top"
},
nativeOn: {
"mouseenter": function mouseenter($event) {
return _vm.handleEnterDisplayOnlyContent.apply(null, arguments);
}
}
}, [_c("span", [_vm._v(_vm._s(_vm.state.displayValue && _vm.state.displayValue.join(" " + _vm.t("ui.datepicker.to") + " ")))])]) : _vm._e()], 2), !_vm.state.isMobileScreen ? _c(_vm.state.panel, {
ref: "picker",
tag: "component",
staticClass: "tiny-tw",
attrs: {
"step": _vm.step,
"show-week-number": _vm.showWeekNumber,
"format-weeks": _vm.formatWeeks,
"visible": _vm.state.pickerVisible
},
on: {
"pick": _vm.handlePick,
"select-range": _vm.handleSelectRange,
"select-change": _vm.handleSelectChange
}
}) : _vm._e(), _vm.state.isMobileScreen && _vm.state.isDateMobileComponent ? _c("tiny-date-picker-mobile", {
ref: "datePickerMobile",
attrs: {
"title": _vm.title,
"clearable": _vm.clearable,
"step": _vm.step,
"show-time-second": _vm.state.showSeconds,
"range-separator": _vm.rangeSeparator,
"end-placeholder": _vm.endPlaceholder,
"custom-class": "max-h-[80%]",
"type": _vm.state.dateMobileOption.type,
"visible": _vm.state.dateMobileOption.visible,
"picker-options": _vm.pickerOptions
},
on: {
"confirm": _vm.emitInput,
"clear": _vm.emitInput,
"update:visible": _vm.dateMobileToggle
},
model: {
value: _vm.state.dateMobileOption.value,
callback: function callback($$v) {
_vm.$set(_vm.state.dateMobileOption, "value", $$v);
},
expression: "state.dateMobileOption.value"
}
}) : _vm._e(), _vm.state.isMobileScreen && _vm.state.isTimeMobileComponent ? _c("tiny-time-picker-mobile", {
ref: "datePickerMobile",
attrs: {
"title": _vm.title,
"clearable": _vm.clearable,
"step": _vm.step,
"show-seconds": _vm.state.showSeconds,
"custom-class": "max-h-[80%]",
"type": _vm.state.timeMobileOption.type,
"visible": _vm.state.timeMobileOption.visible
},
on: {
"confirm": _vm.timeMobileConfirm,
"update:visible": _vm.timeMobileToggle
},
model: {
value: _vm.state.timeMobileOption.value,
callback: function callback($$v) {
_vm.$set(_vm.state.timeMobileOption, "value", $$v);
},
expression: "state.timeMobileOption.value"
}
}) : _vm._e()], 1);
};
var staticRenderFns = [];
var __vue2_script = defineComponent({
components: {
TinyInput: Input,
TinyFilterBox: FilterBox,
TinyDatePickerMobile: DatePickerMobileFirst,
TinyTimePickerMobile: TimePickerMobile,
IconCalendar: IconCalendar(),
IconTime: IconTime(),
IconClose: IconClose(),
TinyTooltip: Tooltip
},
emits: ["created", "select-change", "update:modelValue", "blur", "focus", "change"],
props: pickerProps,
directives: directive({
Clickoutside
}),
setup: function setup$1(props, context) {
return setup({
props,
context,
renderless,
api,
classes,
extendOptions: {
DatePanel,
DateRangePanel: DateRange,
MonthRangePanel: MonthRange,
YearRangePanel: YearRange,
TimePanel: TimePicker,
TimeRangePanel: TimeRange,
TimeSelect: TimePanel
}
});
}
});
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 mobileFirst = /* @__PURE__ */ function() {
return __component__.exports;
}();
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);
}
var template = function template2(mode) {

@@ -161,10 +869,10 @@ var _process$env;

if ("pc" === (tinyMode || mode)) {
return PcTemplate;
return pc;
}
if ("mobile-first" === (tinyMode || mode)) {
return MobileFirstTemplate;
return mobileFirst;
}
return PcTemplate;
return pc;
};
var Picker = {
var Picker = defineComponent({
name: $prefix + "Picker",

@@ -180,4 +888,4 @@ componentName: "Picker",

}
};
var version = "2.14.0";
});
var version = "2.15.0";
Picker.model = {

@@ -191,4 +899,3 @@ prop: "modelValue",

Picker.version = version;
export {
Picker as default
};
export { Picker as default };

47

lib/mobile-first.js

@@ -1,18 +0,18 @@

import { renderless, api } from "@opentiny/vue-renderless/picker/vue";
import { directive, setup as _setup } from "@opentiny/vue-common";
import Input from "@opentiny/vue-input";
import Clickoutside from "@opentiny/vue-renderless/common/deps/clickoutside";
import DatePanel from "@opentiny/vue-date-panel";
import DateRange from "@opentiny/vue-date-range";
import MonthRange from "@opentiny/vue-month-range";
import YearRange from "@opentiny/vue-year-range";
import TimePicker from "@opentiny/vue-time";
import TimeRange from "@opentiny/vue-time-range";
import TimePanel from "@opentiny/vue-time-panel";
import { IconCalendar, IconTime, IconClose } from "@opentiny/vue-icon";
import Tooltip from "@opentiny/vue-tooltip";
import FilterBox from "@opentiny/vue-filter-box";
import DatePickerMobileFirst from "@opentiny/vue-date-picker-mobile-first";
import TimePickerMobile from "@opentiny/vue-time-picker-mobile";
import { iconClose } from "@opentiny/vue-icon";
import { renderless, api } from '@opentiny/vue-renderless/picker/vue';
import { defineComponent, directive, setup } from '@opentiny/vue-common';
import Input from '@opentiny/vue-input';
import Clickoutside from '@opentiny/vue-renderless/common/deps/clickoutside';
import DatePanel from '@opentiny/vue-date-panel';
import DateRange from '@opentiny/vue-date-range';
import MonthRange from '@opentiny/vue-month-range';
import YearRange from '@opentiny/vue-year-range';
import TimePicker from '@opentiny/vue-time';
import TimeRange from '@opentiny/vue-time-range';
import TimePanel from '@opentiny/vue-time-panel';
import { iconClose, IconCalendar, IconTime, IconClose } from '@opentiny/vue-icon';
import Tooltip from '@opentiny/vue-tooltip';
import FilterBox from '@opentiny/vue-filter-box';
import DatePickerMobileFirst from '@opentiny/vue-date-picker-mobile-first';
import TimePickerMobile from '@opentiny/vue-time-picker-mobile';
var pickerProps = {

@@ -532,3 +532,3 @@ type: {

var staticRenderFns = [];
var __vue2_script = {
var __vue2_script = defineComponent({
components: {

@@ -549,4 +549,4 @@ TinyInput: Input,

}),
setup: function setup(props, context) {
return _setup({
setup: function setup$1(props, context) {
return setup({
props,

@@ -568,3 +568,3 @@ context,

}
};
});
var __cssModules = {};

@@ -580,4 +580,3 @@ var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null);

}();
export {
mobileFirst as default
};
export { mobileFirst as default };

@@ -1,16 +0,18 @@

import { renderless, api } from "@opentiny/vue-renderless/picker/vue";
import { defineComponent, directive, setup as _setup } from "@opentiny/vue-common";
import Input from "@opentiny/vue-input";
import Clickoutside from "@opentiny/vue-renderless/common/deps/clickoutside";
import DatePanel from "@opentiny/vue-date-panel";
import DateRange from "@opentiny/vue-date-range";
import MonthRange from "@opentiny/vue-month-range";
import YearRange from "@opentiny/vue-year-range";
import TimePicker from "@opentiny/vue-time";
import TimeRange from "@opentiny/vue-time-range";
import TimePanel from "@opentiny/vue-time-panel";
import Tooltip from "@opentiny/vue-tooltip";
import FilterBox from "@opentiny/vue-filter-box";
import { iconCalendar, iconTime } from "@opentiny/vue-icon";
import { iconClose } from "@opentiny/vue-icon";
import { renderless, api } from '@opentiny/vue-renderless/picker/vue';
import { defineComponent, directive, setup } from '@opentiny/vue-common';
import Input from '@opentiny/vue-input';
import Clickoutside from '@opentiny/vue-renderless/common/deps/clickoutside';
import DatePanel from '@opentiny/vue-date-panel';
import DateRange from '@opentiny/vue-date-range';
import MonthRange from '@opentiny/vue-month-range';
import YearRange from '@opentiny/vue-year-range';
import TimePicker from '@opentiny/vue-time';
import TimeRange from '@opentiny/vue-time-range';
import QuarterPanel from '@opentiny/vue-quarter-panel';
import TimePanel from '@opentiny/vue-time-panel';
import Tooltip from '@opentiny/vue-tooltip';
import FilterBox from '@opentiny/vue-filter-box';
import { iconClose, iconCalendar, iconTime } from '@opentiny/vue-icon';
import '@opentiny/vue-theme/picker/index.css';
var pickerProps = {

@@ -150,3 +152,2 @@ type: {

import "@opentiny/vue-theme/picker/index.css";
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {

@@ -219,4 +220,4 @@ var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;

}),
setup: function setup(props, context) {
return _setup({
setup: function setup$1(props, context) {
return setup({
props,

@@ -233,2 +234,3 @@ context,

TimeRangePanel: TimeRange,
QuarterPanel,
TimeSelect: TimePanel

@@ -475,4 +477,3 @@ }

}();
export {
pc as default
};
export { pc as default };
{
"name": "@opentiny/vue-picker",
"version": "2.14.0",
"version": "2.15.0",
"description": "",

@@ -10,19 +10,19 @@ "main": "./lib/index.js",

"dependencies": {
"@opentiny/vue-common": "~2.14.0",
"@opentiny/vue-renderless": "~3.14.0",
"@opentiny/vue-input": "~2.14.0",
"@opentiny/vue-locale": "~2.14.0",
"@opentiny/vue-date-panel": "~2.14.0",
"@opentiny/vue-date-range": "~2.14.0",
"@opentiny/vue-month-range": "~2.14.0",
"@opentiny/vue-time": "~2.14.0",
"@opentiny/vue-time-range": "~2.14.0",
"@opentiny/vue-time-panel": "~2.14.0",
"@opentiny/vue-year-range": "~2.14.0",
"@opentiny/vue-tooltip": "~2.14.0",
"@opentiny/vue-filter-box": "~2.14.0",
"@opentiny/vue-date-picker-mobile-first": "~2.14.0",
"@opentiny/vue-time-picker-mobile": "~2.14.0",
"@opentiny/vue-icon": "~2.14.0",
"@opentiny/vue-theme": "~3.14.0"
"@opentiny/vue-common": "~2.15.0",
"@opentiny/vue-renderless": "~3.15.0",
"@opentiny/vue-input": "~2.15.0",
"@opentiny/vue-date-panel": "~2.15.0",
"@opentiny/vue-date-range": "~2.15.0",
"@opentiny/vue-month-range": "~2.15.0",
"@opentiny/vue-quarter-panel": "~2.15.0",
"@opentiny/vue-time": "~2.15.0",
"@opentiny/vue-time-range": "~2.15.0",
"@opentiny/vue-time-panel": "~2.15.0",
"@opentiny/vue-year-range": "~2.15.0",
"@opentiny/vue-tooltip": "~2.15.0",
"@opentiny/vue-filter-box": "~2.15.0",
"@opentiny/vue-date-picker-mobile-first": "~2.15.0",
"@opentiny/vue-time-picker-mobile": "~2.15.0",
"@opentiny/vue-icon": "~2.15.0",
"@opentiny/vue-theme": "~3.15.0"
},

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

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

declare const _default: {
name: string;
componentName: string;
props: {
type: {
type: StringConstructor;
default: string;
};
tabindex: {
type: StringConstructor;
default: string;
};
timeArrowControl: BooleanConstructor;
timeEditable: {
type: BooleanConstructor;
default: boolean;
};
size: StringConstructor;
format: StringConstructor;
valueFormat: StringConstructor;
timeFormat: StringConstructor;
readonly: BooleanConstructor;
placeholder: StringConstructor;
startPlaceholder: StringConstructor;
endPlaceholder: StringConstructor;
prefixIcon: ObjectConstructor;
suffixIcon: ObjectConstructor;
label: StringConstructor;
shape: StringConstructor;
tip: StringConstructor;
clearIcon: {
type: ObjectConstructor;
default(): any;
};
name: {
default: string;
validator(value: any): boolean;
};
clearable: {
type: BooleanConstructor;
default: boolean;
};
changeOnConfirm: {
type: BooleanConstructor;
default: boolean;
};
disabled: BooleanConstructor;
id: {
default: string;
validator(value: any): boolean;
};
popperClass: StringConstructor;
popperAppendToBody: {
type: BooleanConstructor;
default: boolean;
};
align: {
type: StringConstructor;
default: string;
};
editable: {
type: BooleanConstructor;
default: boolean;
};
modelValue: {};
defaultValue: {};
defaultTime: {};
rangeSeparator: {
type: (ObjectConstructor | StringConstructor)[];
default: string;
};
unlinkPanels: BooleanConstructor;
pickerOptions: {};
validateEvent: {
type: BooleanConstructor;
default: boolean;
};
isRange: BooleanConstructor;
arrowControl: BooleanConstructor;
timezoneData: {};
showTimezone: {
type: BooleanConstructor;
default: boolean;
};
defaultTimezone: StringConstructor;
isutc8: {
type: BooleanConstructor;
default: boolean;
};
dbTimezone: NumberConstructor;
timezone: NumberConstructor;
timezoneOffset: NumberConstructor;
iso8601: BooleanConstructor;
displayOnly: {
type: BooleanConstructor;
default: boolean;
};
step: {
type: ObjectConstructor;
default(): {
hour: number;
minute: number;
second: number;
};
};
showWeekNumber: {
type: BooleanConstructor;
default: boolean;
};
formatWeeks: FunctionConstructor;
autoFormat: {
type: BooleanConstructor;
default: boolean;
};
title: StringConstructor;
blank: {
type: BooleanConstructor;
default: boolean;
};
changeCompat: {
type: BooleanConstructor;
default: boolean;
};
tiny_mode: StringConstructor;
tiny_mode_root: BooleanConstructor;
tiny_template: (ObjectConstructor | FunctionConstructor)[];
tiny_renderless: FunctionConstructor;
tiny_theme: StringConstructor;
tiny_chart_theme: ObjectConstructor;
};
setup(props: any, context: any): () => any;
};
declare const _default: any;
export default _default;

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

declare const _default: import("vue/types/vue").ExtendedVue<import("vue").default, any, any, any, Record<never, any>>;
declare const _default: any;
export default _default;

@@ -66,3 +66,3 @@ export declare const pickerProps: {

rangeSeparator: {
type: (ObjectConstructor | StringConstructor)[];
type: (StringConstructor | ObjectConstructor)[];
default: string;

@@ -69,0 +69,0 @@ };

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