@opentiny/vue-select-dropdown
Advanced tools
Comparing version 3.6.0 to 3.6.1-alpha.0
@@ -13,3 +13,2 @@ /** | ||
import SelectDropdown from './src/index'; | ||
import '@opentiny/vue-theme/select-dropdown/index.css'; | ||
export default SelectDropdown; |
154
lib/index.js
@@ -1,62 +0,29 @@ | ||
import { $prefix, $props, $setup } from '@opentiny/vue-common'; | ||
import PCTemplate from './pc'; | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
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); | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
return target; | ||
} | ||
function _defineProperty(obj, key, value) { | ||
key = _toPropertyKey(key); | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function _toPrimitive(input, hint) { | ||
if (typeof input !== "object" || input === null) return input; | ||
var prim = input[Symbol.toPrimitive]; | ||
if (prim !== undefined) { | ||
var res = prim.call(input, hint || "default"); | ||
if (typeof res !== "object") return res; | ||
throw new TypeError("@@toPrimitive must return a primitive value."); | ||
} | ||
return (hint === "string" ? String : Number)(input); | ||
} | ||
function _toPropertyKey(arg) { | ||
var key = _toPrimitive(arg, "string"); | ||
return typeof key === "symbol" ? key : String(key); | ||
} | ||
var template = function template() { | ||
return PCTemplate; | ||
import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common"; | ||
import PcTemplate from "./pc.js"; | ||
import "@opentiny/vue-theme/select-dropdown/index.css"; | ||
var template = function template2(mode) { | ||
if ("mobile" === (process.env.TINY_MODE || mode)) | ||
return MobileTemplate; | ||
else | ||
return PcTemplate; | ||
}; | ||
var SelectDropdown = { | ||
name: $prefix + 'SelectDropdown', | ||
componentName: 'SelectDropdown', | ||
inject: ['select'], | ||
props: _objectSpread2(_objectSpread2({}, $props), {}, { | ||
var SelectDropdown = defineComponent({ | ||
name: $prefix + "SelectDropdown", | ||
componentName: "SelectDropdown", | ||
inject: ["select"], | ||
props: _extends({}, $props, { | ||
appendToBody: { | ||
@@ -70,3 +37,3 @@ type: Boolean, | ||
type: Number, | ||
default: function _default() { | ||
default: function _default2() { | ||
return 35; | ||
@@ -76,3 +43,3 @@ } | ||
boundariesPadding: { | ||
default: function _default() { | ||
default: function _default3() { | ||
return 0; | ||
@@ -84,3 +51,3 @@ } | ||
offset: { | ||
default: function _default() { | ||
default: function _default4() { | ||
return 0; | ||
@@ -90,4 +57,4 @@ } | ||
placement: { | ||
default: function _default() { | ||
return 'bottom-start'; | ||
default: function _default5() { | ||
return "bottom-start"; | ||
} | ||
@@ -97,3 +64,3 @@ }, | ||
popperOptions: { | ||
default: function _default() { | ||
default: function _default6() { | ||
return { | ||
@@ -107,3 +74,3 @@ gpuAcceleration: false | ||
type: [Boolean, String], | ||
default: function _default() { | ||
default: function _default7() { | ||
return true; | ||
@@ -113,3 +80,3 @@ } | ||
visibleArrow: { | ||
default: function _default() { | ||
default: function _default8() { | ||
return false; | ||
@@ -121,48 +88,19 @@ } | ||
return $setup({ | ||
props: props, | ||
context: context, | ||
template: template | ||
props, | ||
context, | ||
template | ||
}); | ||
} | ||
}; | ||
function styleInject(css, ref) { | ||
if ( ref === void 0 ) ref = {}; | ||
var insertAt = ref.insertAt; | ||
if (!css || typeof document === 'undefined') { return; } | ||
var head = document.head || document.getElementsByTagName('head')[0]; | ||
var style = document.createElement('style'); | ||
style.type = 'text/css'; | ||
if (insertAt === 'top') { | ||
if (head.firstChild) { | ||
head.insertBefore(style, head.firstChild); | ||
} else { | ||
head.appendChild(style); | ||
} | ||
} else { | ||
head.appendChild(style); | ||
} | ||
if (style.styleSheet) { | ||
style.styleSheet.cssText = css; | ||
} else { | ||
style.appendChild(document.createTextNode(css)); | ||
} | ||
} | ||
var css_248z = ".tiny-select-dropdown{--ti-select-dropdown-border-color:transparent;--ti-select-dropdown-border-radius:var(--ti-common-border-radius-normal);--ti-select-dropdown-bg-color:var(--ti-base-color-light);--ti-select-dropdown-empty-text-color:var(--ti-base-color-placeholder);--ti-select-dropdown-empty-font-size:var(--ti-common-font-size-1);--ti-select-dropdown-list-padding-top:0;--ti-select-dropdown-list-padding-horizontal:0;--ti-select-dropdown-list-padding-bottom:6px;--ti-select-dropdown-item-padding-vertical:0;--ti-select-dropdown-item-padding-horizontal:8px;--ti-select-dropdown-item-margin-top:0;--ti-select-dropdown-search-bg-color:var(--ti-base-color-brand-1);--ti-select-dropdown-search-margin-bottom:var(--ti-common-space-base);--ti-select-dropdown-line-bg-color:var(--ti-base-color-common-1);--ti-select-dropdown-line-margin-vertical:0;--ti-select-dropdown-line-margin-horizontal:var(--ti-common-space-2x);--ti-select-dropdown-line-height:var(--ti-common-font-size-1);--ti-select-dropdown-line-width:1px;--ti-select-dropdown-active-text-color:var(--ti-base-color-brand-6);position:absolute;z-index:1001;border:1px solid var(--ti-select-dropdown-border-color);border-radius:var(--ti-select-dropdown-border-radius);background-color:var(--ti-select-dropdown-bg-color);-webkit-box-shadow:var(--ti-base-box-shadow);box-shadow:var(--ti-base-box-shadow);margin-top:var(--ti-base-dropdown-gap);-webkit-box-sizing:border-box;box-sizing:border-box}.tiny-select-dropdown .tiny-tree{max-height:300px;overflow-y:auto}.tiny-select-dropdown.tiny-popper{margin-top:var(--ti-base-dropdown-gap)}.tiny-select-dropdown .tiny-scrollbar.is-empty .tiny-select-dropdown__list{padding:0}.tiny-select-dropdown .tiny-select-dropdown__search{margin-bottom:var(--ti-select-dropdown-search-margin-bottom)}.tiny-select-dropdown .tiny-select-dropdown__search .tiny-input__inner{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;background-color:var(--ti-select-dropdown-search-bg-color);padding-right:54px}.tiny-select-dropdown .tiny-select-dropdown__search .tiny-icon-close::after{content:'';display:inline-block;height:var(--ti-select-dropdown-line-height);width:var(--ti-select-dropdown-line-width);background-color:var(--ti-select-dropdown-line-bg-color);line-height:100%;vertical-align:middle;margin:var(--ti-select-dropdown-line-margin-vertical) var(--ti-select-dropdown-line-margin-horizontal)}.tiny-select-dropdown .tiny-select-dropdown__search .tiny-svg:hover{fill:var(--ti-select-dropdown-active-text-color)}.tiny-select-dropdown__empty{padding:10px 0;margin:0;text-align:center;color:var(--ti-select-dropdown-empty-text-color);font-size:var(--ti-select-dropdown-empty-font-size)}.tiny-select-dropdown .tiny-select-dropdown__wrap{max-height:197px;margin-right:-4px}.tiny-select-dropdown .tiny-select-dropdown__list{list-style:none;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:var(--ti-select-dropdown-list-padding-top) var(--ti-select-dropdown-list-padding-horizontal) var(--ti-select-dropdown-list-padding-bottom);text-align:left}.tiny-select-dropdown .tiny-select-dropdown__item{white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;padding:var(--ti-select-dropdown-item-padding-vertical) var(--ti-select-dropdown-item-padding-horizontal);margin-top:var(--ti-select-dropdown-item-margin-top);border-radius:var(--ti-common-border-radius-normal)}.tiny-select-dropdown .tiny-select-dropdown__wrap.virtual{position:relative;margin-right:0!important}.tiny-select-dropdown .tiny-select-dropdown__wrap.virtual .tiny-select-dropdown__item{position:absolute;width:100%}"; | ||
styleInject(css_248z); | ||
}); | ||
var version = "3.7.0"; | ||
SelectDropdown.model = { | ||
prop: 'modelValue', | ||
event: 'update:modelValue' | ||
prop: "modelValue", | ||
event: "update:modelValue" | ||
}; | ||
SelectDropdown.install = function (Vue) { | ||
SelectDropdown.install = function(Vue) { | ||
Vue.component(SelectDropdown.name, SelectDropdown); | ||
}; | ||
SelectDropdown.version = '3.6.0'; | ||
export { SelectDropdown as default }; | ||
SelectDropdown.version = version; | ||
export { | ||
SelectDropdown as default | ||
}; |
118
lib/pc.js
@@ -1,58 +0,82 @@ | ||
import { renderless, api } from '@opentiny/vue-renderless/select-dropdown/vue'; | ||
import { setup, props } from '@opentiny/vue-common'; | ||
import { openBlock, createElementBlock, normalizeClass, withModifiers, normalizeStyle, renderSlot } from 'vue'; | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); | ||
import { renderless, api } from "@opentiny/vue-renderless/select-dropdown/vue"; | ||
import { defineComponent, props, setup as _setup } from "@opentiny/vue-common"; | ||
import { openBlock, createElementBlock, normalizeClass, withModifiers, normalizeStyle, renderSlot } 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 _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); | ||
} | ||
function _iterableToArray(iter) { | ||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(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); | ||
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]; | ||
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; | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
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 script = { | ||
props: [].concat(_toConsumableArray(props), ['placement', 'boundariesPadding', 'popperOptions', 'visibleArrow', 'appendToBody', 'transformOrigin', 'reference', 'popper', 'offset', 'modelValue', 'arrowOffset', 'isDropInheritWidth']), | ||
setup: function setup$1(props, context) { | ||
return setup({ | ||
props: props, | ||
context: context, | ||
renderless: renderless, | ||
api: api | ||
var _sfc_main = /* @__PURE__ */ defineComponent({ | ||
props: [].concat(props, ["placement", "boundariesPadding", "popperOptions", "visibleArrow", "appendToBody", "transformOrigin", "reference", "popper", "offset", "modelValue", "arrowOffset", "isDropInheritWidth"]), | ||
setup: function setup(props2, context) { | ||
return _setup({ | ||
props: props2, | ||
context, | ||
renderless, | ||
api | ||
}); | ||
} | ||
}); | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock( | ||
"div", | ||
{ | ||
class: normalizeClass(["tiny-select-dropdown tiny-popper", [{ | ||
"is-multiple": _ctx.state.multiple | ||
}, _ctx.state.popperClass]]), | ||
onMousedown: _cache[0] || (_cache[0] = withModifiers(function() { | ||
}, ["stop"])), | ||
style: normalizeStyle({ | ||
minWidth: _ctx.state.minWidth, | ||
width: _ctx.isDropInheritWidth ? _ctx.state.minWidth : "auto" | ||
}) | ||
}, | ||
[renderSlot(_ctx.$slots, "default")], | ||
38 | ||
/* CLASS, STYLE, HYDRATE_EVENTS */ | ||
); | ||
} | ||
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); | ||
export { | ||
pc as default | ||
}; | ||
function render(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass(["tiny-select-dropdown tiny-popper", [{ | ||
'is-multiple': _ctx.state.multiple | ||
}, _ctx.state.popperClass]]), | ||
onMousedown: _cache[0] || (_cache[0] = withModifiers(function () {}, ["stop"])), | ||
style: normalizeStyle({ | ||
minWidth: _ctx.state.minWidth, | ||
width: $props.isDropInheritWidth ? _ctx.state.minWidth : 'auto' | ||
}) | ||
}, [renderSlot(_ctx.$slots, "default")], 38); | ||
} | ||
script.render = render; | ||
export { script as default }; |
{ | ||
"name": "@opentiny/vue-select-dropdown", | ||
"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-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" | ||
}, | ||
"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 _default: import("@vue/runtime-core").DefineComponent<{ | ||
appendToBody: { | ||
@@ -29,3 +29,3 @@ type: BooleanConstructor; | ||
transformOrigin: { | ||
type: (BooleanConstructor | StringConstructor)[]; | ||
type: (StringConstructor | BooleanConstructor)[]; | ||
default: () => boolean; | ||
@@ -36,3 +36,5 @@ }; | ||
}; | ||
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { | ||
[key: string]: any; | ||
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{ | ||
appendToBody: { | ||
@@ -65,3 +67,3 @@ type: BooleanConstructor; | ||
transformOrigin: { | ||
type: (BooleanConstructor | StringConstructor)[]; | ||
type: (StringConstructor | BooleanConstructor)[]; | ||
default: () => boolean; | ||
@@ -74,11 +76,9 @@ }; | ||
modelValue: boolean; | ||
popperOptions: { | ||
gpuAcceleration: boolean; | ||
}; | ||
placement: string; | ||
visibleArrow: boolean; | ||
offset: number; | ||
boundariesPadding: number; | ||
visibleArrow: IfAny<V, V, D>; | ||
arrowOffset: number; | ||
placement: IfAny<V, V, D>; | ||
appendToBody: boolean; | ||
boundariesPadding: IfAny<V, V, D>; | ||
offset: IfAny<V, V, D>; | ||
popperOptions: IfAny<V, V, D>; | ||
transformOrigin: string | boolean; | ||
@@ -85,0 +85,0 @@ isDropInheritWidth: boolean; |
@@ -1,12 +0,15 @@ | ||
declare const _default: { | ||
props: string[]; | ||
setup(props: any, context: any): { | ||
t: any; | ||
vm: any; | ||
f: (props: any, attrs?: {}) => {}; | ||
a: (attrs: any, filters: any, include: any) => {}; | ||
d: (props: any) => void; | ||
dp: (props: any) => void; | ||
}; | ||
}; | ||
export default _default; | ||
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<Readonly<{ | ||
[x: string]: any; | ||
}>, { | ||
t: (this: any, path: any, options?: any) => any; | ||
vm: any; | ||
f: (props: any, attrs?: {}) => {}; | ||
a: (attrs: any, filters: any, include: any) => {}; | ||
d: (props: any) => void; | ||
dp: (props: any) => void; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{ | ||
[x: string]: any; | ||
}>>>, { | ||
[x: string]: any; | ||
}>; | ||
export default _sfc_main; |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2
7
10349
291
2
1
- Removed@opentiny/vue-icon@~3.6.0
- Removed@opentiny/vue-theme@~3.6.0
- Removed@opentiny/vue-theme-mobile@~3.6.0
- Removed@opentiny/vue-icon@3.6.7(transitive)