@opentiny/vue-tree
Advanced tools
Comparing version 3.6.0 to 3.6.1-alpha.0
@@ -13,3 +13,2 @@ /** | ||
import Tree from './src/index.js'; | ||
import '@opentiny/vue-theme/tree/index.css'; | ||
export default Tree; |
142
lib/index.js
@@ -1,63 +0,30 @@ | ||
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); | ||
} | ||
import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common"; | ||
import PcTemplate from "./pc.js"; | ||
import "@opentiny/vue-theme/tree/index.css"; | ||
var template = function template2(mode) { | ||
if ("mobile" === (process.env.TINY_MODE || mode)) | ||
return MobileTemplate; | ||
else | ||
return PcTemplate; | ||
}; | ||
var $constants = { | ||
EMPTY_TEXT_LOCAL: 'ui.tree.emptyText' | ||
EMPTY_TEXT_LOCAL: "ui.tree.emptyText" | ||
}; | ||
var template = function template() { | ||
return PCTemplate; | ||
}; | ||
var Tree = { | ||
name: $prefix + 'Tree', | ||
props: _objectSpread2(_objectSpread2({}, $props), {}, { | ||
var Tree = defineComponent({ | ||
name: $prefix + "Tree", | ||
props: _extends({}, $props, { | ||
_constants: { | ||
@@ -120,7 +87,7 @@ type: Object, | ||
props: { | ||
default: function _default() { | ||
default: function _default2() { | ||
return { | ||
children: 'children', | ||
label: 'label', | ||
disabled: 'disabled' | ||
children: "children", | ||
label: "label", | ||
disabled: "disabled" | ||
}; | ||
@@ -150,44 +117,15 @@ } | ||
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-tree{--ti-tree-text-color:var(--ti-base-color-info-normal);--ti-tree-bg-color:var(--ti-base-color-light);--ti-tree-empty-text-color:#909399;--ti-tree-node-content-current-bg-color:var(--ti-base-color-brand-2);--ti-tree-node-content-hover-bg-color:var(--ti-base-color-hover-background);--ti-tree-node-label-font-size:var(--ti-common-font-size-1);--ti-tree-node-label-margin-left:var(--ti-common-space-base);--ti-tree-node-label-bg-color:var(--ti-base-color-brand-5);--ti-tree-node-label-text-color:var(--ti-base-color-light);--ti-tree-node-icon-font-size:var(--ti-common-font-size-1);--ti-tree-node-loading-icon-color:#1890ff;--ti-tree-node-expand-icon-color:var(--ti-base-color-info-normal);--ti-tree-node-checked-icon-color:var(--ti-base-color-brand-6);position:relative;cursor:default;background:var(--ti-tree-bg-color);color:var(--ti-tree-text-color)}.tiny-tree .is-drop-inner{position:relative}.tiny-tree .is-drop-inner::before{pointer-events:none;border:2px solid var(--ti-tree-node-checked-icon-color);content:' ';position:absolute;top:0;bottom:0;left:0;right:0}.tiny-tree__empty-block{position:relative;min-height:60px;text-align:center;width:100%;height:100%}.tiny-tree__empty-text{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:var(--ti-tree-empty-text-color)}.tiny-tree__drop-indicator{position:absolute;left:0;right:0;height:2px;background-color:var(--ti-tree-node-checked-icon-color)}.tiny-tree.is-dragging .tiny-tree-node__content{cursor:move}.tiny-tree.is-dragging .tiny-tree-node__content *{pointer-events:none}.tiny-tree.is-dragging.is-drop-not-allow .tiny-tree-node__content{cursor:not-allowed}.tiny-tree--highlight-current .tiny-tree-node.is-current>.tiny-tree-node__content{background-color:#f0f7ff}.tiny-tree-node{white-space:nowrap;outline:0}.tiny-tree-node:focus>.tiny-tree-node__content{background-color:var(--ti-tree-node-content-hover-bg-color)}.tiny-tree-node.is-current>.tiny-tree-node__content{background-color:var(--ti-tree-node-content-current-bg-color)}.tiny-tree-node.is-drop-inner>.tiny-tree-node__content .tiny-tree-node__label{background-color:var(--ti-tree-node-label-bg-color);color:var(--ti-tree-node-label-text-color)}.tiny-tree-node.is-checked .tiny-tree-node__expand-icon,.tiny-tree-node.is-expanded .tiny-tree-node__expand-icon,.tiny-tree-node.is-indeterminate .tiny-tree-node__expand-icon{fill:var(--ti-tree-node-expand-icon-color)}.tiny-tree-node__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:30px;cursor:pointer;border-radius:var(--ti-common-border-radius-normal)}.tiny-tree-node__content:hover{background-color:var(--ti-tree-node-content-hover-bg-color)!important}.tiny-tree-node__content:hover .tiny-tree-node__expand-icon{fill:var(--ti-tree-node-checked-icon-color)!important}.tiny-tree-node__content>label.tiny-checkbox{margin-left:var(--ti-tree-node-label-margin-left)}.tiny-tree-node__expand-icon{cursor:pointer;fill:var(--ti-tree-node-expand-icon-color);font-size:var(--ti-tree-node-icon-font-size);-webkit-transform:rotate(0);transform:rotate(0);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out;-ms-flex-negative:0;flex-shrink:0}.tiny-tree-node__expand-icon.expanded{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.tiny-tree-node__expand-icon.is-leaf{visibility:hidden}.tiny-tree-node__label{font-size:var(--ti-tree-node-label-font-size);margin-left:var(--ti-tree-node-label-margin-left)}.tiny-tree-node__loading.circular{margin-right:4px;margin-left:var(--ti-tree-node-label-margin-left);font-size:var(--ti-tree-node-icon-font-size);fill:var(--ti-tree-node-loading-icon-color);-webkit-animation:loading-rotate 2s linear infinite;animation:loading-rotate 2s linear infinite}.tiny-tree-node__loading.circular .path{-webkit-animation:loading-dash 1.5s ease-in-out infinite;animation:loading-dash 1.5s ease-in-out infinite;stroke-dasharray:90,150;stroke-dashoffset:0;stroke-width:2;stroke:#1890ff;stroke-linecap:round}.tiny-tree-node>.tiny-tree-node__children{overflow:hidden;background-color:transparent}.tiny-tree-node.is-expanded>.tiny-tree-node__children{display:block}.tiny-tree-node__menu{position:absolute;top:0;left:0;z-index:5000;font-size:var(--ti-common-font-size-base);-webkit-box-shadow:2px 2px 4px -2px #000;box-shadow:2px 2px 4px -2px #000;padding:0 1px;color:#606266;font-family:Helvetica,Arial,'Microsoft YaHei',sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tiny-tree-node .tiny-radio{margin-right:0}.tiny-tree-node .tiny-radio .tiny-radio__label{display:none}.tiny-tree-node .collapse-transition{-webkit-transition:.3s height ease-in-out,.3s padding-top ease-in-out,.3s padding-bottom ease-in-out;transition:.3s height ease-in-out,.3s padding-top ease-in-out,.3s padding-bottom ease-in-out}@-webkit-keyframes loading-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loading-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes loading-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40px}100%{stroke-dasharray:90,150;stroke-dashoffset:-120px}}@keyframes loading-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40px}100%{stroke-dasharray:90,150;stroke-dashoffset:-120px}}"; | ||
styleInject(css_248z); | ||
Tree.install = function (Vue) { | ||
}); | ||
var version = "3.7.0"; | ||
Tree.install = function(Vue) { | ||
Vue.component(Tree.name, Tree); | ||
}; | ||
Tree.version = '3.6.0'; | ||
export { Tree as default }; | ||
Tree.version = version; | ||
export { | ||
Tree as default | ||
}; |
460
lib/pc.js
@@ -1,72 +0,62 @@ | ||
import { renderless as renderless$1, api as api$1 } from '@opentiny/vue-renderless/tree/vue'; | ||
import { directive, h, setup, props } from '@opentiny/vue-common'; | ||
import { renderless, api } from '@opentiny/vue-renderless/tree-node/vue'; | ||
import CollapseTransition from '@opentiny/vue-collapse-transition'; | ||
import Checkbox from '@opentiny/vue-checkbox'; | ||
import { iconChevronRight, iconLoading } from '@opentiny/vue-icon'; | ||
import Radio from '@opentiny/vue-radio'; | ||
import Clickoutside from '@opentiny/vue-renderless/common/deps/clickoutside'; | ||
import { resolveComponent, resolveDirective, openBlock, createElementBlock, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, createBlock, resolveDynamicComponent, createCommentVNode, createVNode, withCtx, Fragment, renderList, vShow, renderSlot, toDisplayString } from 'vue'; | ||
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; | ||
import { renderless as renderless$1, api as api$1 } from "@opentiny/vue-renderless/tree/vue"; | ||
import { directive, h, setup as _setup, defineComponent, props } from "@opentiny/vue-common"; | ||
import { renderless, api } from "@opentiny/vue-renderless/tree-node/vue"; | ||
import CollapseTransition from "@opentiny/vue-collapse-transition"; | ||
import Checkbox from "@opentiny/vue-checkbox"; | ||
import { iconChevronRight, iconLoading } from "@opentiny/vue-icon"; | ||
import Radio from "@opentiny/vue-radio"; | ||
import Clickoutside from "@opentiny/vue-renderless/common/deps/clickoutside"; | ||
import { resolveComponent, resolveDirective, openBlock, createElementBlock, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, createBlock, resolveDynamicComponent, createCommentVNode, createVNode, withCtx, Fragment, renderList, vShow, renderSlot, toDisplayString } 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++] }; | ||
}; | ||
} | ||
return obj; | ||
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 _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); | ||
} | ||
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."); | ||
} | ||
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."); | ||
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 (hint === "string" ? String : Number)(input); | ||
} | ||
function _toPropertyKey(arg) { | ||
var key = _toPrimitive(arg, "string"); | ||
return typeof key === "symbol" ? key : String(key); | ||
} | ||
return target; | ||
}; | ||
var script$1 = { | ||
name: 'TreeNode', | ||
componentName: 'TreeNode', | ||
var _sfc_main$1 = { | ||
name: "TreeNode", | ||
componentName: "TreeNode", | ||
directives: directive({ | ||
Clickoutside: Clickoutside | ||
Clickoutside | ||
}), | ||
inject: ['TreeRoot'], | ||
inject: ["TreeRoot"], | ||
provide: function provide() { | ||
@@ -77,3 +67,3 @@ return { | ||
}, | ||
emits: ['update:modelValue', 'hook-updated', 'node-expand', 'radio-change', 'tree-node-expand', 'closeMenu'], | ||
emits: ["update:modelValue", "hook-updated", "node-expand", "radio-change", "tree-node-expand", "closeMenu"], | ||
props: { | ||
@@ -103,3 +93,3 @@ node: { | ||
type: Object, | ||
default: function _default() { | ||
default: function _default2() { | ||
return { | ||
@@ -112,4 +102,4 @@ value: null | ||
components: { | ||
CollapseTransition: CollapseTransition, | ||
Checkbox: Checkbox, | ||
CollapseTransition, | ||
Checkbox, | ||
TinyRadio: Radio, | ||
@@ -128,3 +118,3 @@ IconChevronRight: iconChevronRight(), | ||
return tree && tree.scopedSlots && tree.scopedSlots.contextmenu && tree.scopedSlots.contextmenu({ | ||
data: data | ||
data | ||
}); | ||
@@ -140,19 +130,18 @@ } | ||
}, | ||
inject: ['TreeRoot', 'parentTree'], | ||
render: function render() { | ||
inject: ["TreeRoot", "parentTree"], | ||
render: function render2() { | ||
var parent = this.$parent; | ||
var tree = parent.state.tree; | ||
var node = this.node; | ||
var data = node.data, | ||
store = node.store; | ||
var data = node.data, store = node.store; | ||
return this.renderContent ? this.renderContent(h, { | ||
_self: this, | ||
node: node, | ||
data: data, | ||
store: store | ||
node, | ||
data, | ||
store | ||
}) : tree.scopedSlots.default && tree.scopedSlots.default({ | ||
node: node, | ||
data: data | ||
}) || h('span', { | ||
class: 'tiny-tree-node__label' | ||
node, | ||
data | ||
}) || h("span", { | ||
class: "tiny-tree-node__label" | ||
}, node.label); | ||
@@ -162,8 +151,8 @@ } | ||
}, | ||
setup: function setup$1(props, context) { | ||
return setup({ | ||
props: props, | ||
context: context, | ||
renderless: renderless, | ||
api: api, | ||
setup: function setup(props2, context) { | ||
return _setup({ | ||
props: props2, | ||
context, | ||
renderless, | ||
api, | ||
mono: true | ||
@@ -173,6 +162,5 @@ }); | ||
}; | ||
var _hoisted_1$1 = ["aria-expanded", "aria-disabled", "aria-checked", "draggable"]; | ||
var _hoisted_2$1 = ["aria-expanded"]; | ||
function render$1(_ctx, _cache, $props, $setup, $data, $options) { | ||
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { | ||
var _ref; | ||
@@ -189,7 +177,7 @@ var _component_checkbox = resolveComponent("checkbox"); | ||
class: normalizeClass(["tiny-tree-node", (_ref = { | ||
'is-indeterminate': !$props.node.disabled && $props.node.indeterminate, | ||
'is-current': $props.node.isCurrent, | ||
'is-hidden': !$props.node.visible, | ||
'is-checked': !$props.node.disabled && $props.node.checked | ||
}, _defineProperty(_ref, "is-indeterminate", !$props.node.disabled && $props.node.indeterminate), _defineProperty(_ref, 'is-focusable', !$props.node.disabled), _defineProperty(_ref, 'is-expanded', _ctx.state.expanded), _ref)]), | ||
"is-indeterminate": !$props.node.disabled && $props.node.indeterminate, | ||
"is-current": $props.node.isCurrent, | ||
"is-hidden": !$props.node.visible, | ||
"is-checked": !$props.node.disabled && $props.node.checked | ||
}, _ref["is-indeterminate"] = !$props.node.disabled && $props.node.indeterminate, _ref["is-focusable"] = !$props.node.disabled, _ref["is-expanded"] = _ctx.state.expanded, _ref)]), | ||
role: "treeitem", | ||
@@ -201,70 +189,76 @@ tabindex: "-1", | ||
draggable: _ctx.state.tree.draggable, | ||
onClick: _cache[4] || (_cache[4] = withModifiers(function () { | ||
onClick: _cache[4] || (_cache[4] = withModifiers(function() { | ||
return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments); | ||
}, ["stop"])), | ||
onContextmenu: _cache[5] || (_cache[5] = withModifiers(function ($event) { | ||
onContextmenu: _cache[5] || (_cache[5] = withModifiers(function($event) { | ||
return _ctx.handleContextMenu($event); | ||
}, ["stop"])), | ||
onDragstart: _cache[6] || (_cache[6] = withModifiers(function () { | ||
onDragstart: _cache[6] || (_cache[6] = withModifiers(function() { | ||
return _ctx.handleDragStart && _ctx.handleDragStart.apply(_ctx, arguments); | ||
}, ["stop"])), | ||
onDragover: _cache[7] || (_cache[7] = withModifiers(function () { | ||
onDragover: _cache[7] || (_cache[7] = withModifiers(function() { | ||
return _ctx.handleDragOver && _ctx.handleDragOver.apply(_ctx, arguments); | ||
}, ["stop"])), | ||
onDragend: _cache[8] || (_cache[8] = withModifiers(function () { | ||
onDragend: _cache[8] || (_cache[8] = withModifiers(function() { | ||
return _ctx.handleDragEnd && _ctx.handleDragEnd.apply(_ctx, arguments); | ||
}, ["stop"])), | ||
onDrop: _cache[9] || (_cache[9] = withModifiers(function () { | ||
onDrop: _cache[9] || (_cache[9] = withModifiers(function() { | ||
return _ctx.handleDrop && _ctx.handleDrop.apply(_ctx, arguments); | ||
}, ["stop"])), | ||
ref: "node" | ||
}, [createElementVNode("div", { | ||
class: "tiny-tree-node__content", | ||
style: normalizeStyle({ | ||
'padding-left': ($props.node.level - 1) * _ctx.state.tree.indent + 'px' | ||
}), | ||
onClick: _cache[2] || (_cache[2] = function ($event) { | ||
return _ctx.handleContentClick($props.node, $props.currentRadio); | ||
}) | ||
}, [createElementVNode("span", { | ||
class: "tree-node-icon", | ||
onClick: _cache[0] || (_cache[0] = function ($event) { | ||
return _ctx.handleExpandIconClick($event, $props.node); | ||
}) | ||
}, [_ctx.state.expandIcon !== undefined && _ctx.state.shrinkIcon !== undefined ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.expanded ? _ctx.state.shrinkIcon : _ctx.state.expandIcon), { | ||
key: 0, | ||
class: normalizeClass(['tiny-tree-node__expand-icon', { | ||
'is-leaf': $props.node.isLeaf | ||
}]) | ||
}, null, 8, ["class"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.tree.icon ? _ctx.state.tree.icon : 'icon-chevron-right'), { | ||
key: 1, | ||
class: normalizeClass(['tiny-tree-node__expand-icon', { | ||
'is-leaf': $props.node.isLeaf, | ||
expanded: !$props.node.isLeaf && _ctx.state.expanded | ||
}]) | ||
}, null, 8, ["class"]))]), $props.showCheckbox ? (openBlock(), createBlock(_component_checkbox, { | ||
key: 0, | ||
modelValue: $props.node.checked, | ||
ref: "checkbox", | ||
indeterminate: $props.node.indeterminate, | ||
disabled: !!$props.node.disabled, | ||
"validate-event": false, | ||
onChange: _ctx.handleCheckChange | ||
}, null, 8, ["modelValue", "indeterminate", "disabled", "onChange"])) : createCommentVNode("", true), $props.showRadio ? (openBlock(), createBlock(_component_tiny_radio, { | ||
key: 1, | ||
"model-value": $props.currentRadio.value, | ||
"onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) { | ||
return _ctx.$emit('radio-change', $event); | ||
}), | ||
"validate-event": false, | ||
label: $props.node.id, | ||
disabled: !!$props.node.disabled | ||
}, null, 8, ["model-value", "label", "disabled"])) : createCommentVNode("", true), $props.node.loading ? (openBlock(), createBlock(_component_icon_loading, { | ||
key: 2, | ||
class: "tiny-tree-node__loading-icon tiny-svg-size" | ||
})) : createCommentVNode("", true), createVNode(_component_node_content, { | ||
node: $props.node, | ||
"render-content": $props.renderContent | ||
}, null, 8, ["node", "render-content"])], 4), createVNode(_component_collapse_transition, null, { | ||
default: withCtx(function () { | ||
}, [createElementVNode( | ||
"div", | ||
{ | ||
class: "tiny-tree-node__content", | ||
style: normalizeStyle({ | ||
"padding-left": ($props.node.level - 1) * _ctx.state.tree.indent + "px" | ||
}), | ||
onClick: _cache[2] || (_cache[2] = function($event) { | ||
return _ctx.handleContentClick($props.node, $props.currentRadio); | ||
}) | ||
}, | ||
[createElementVNode("span", { | ||
class: "tree-node-icon", | ||
onClick: _cache[0] || (_cache[0] = function($event) { | ||
return _ctx.handleExpandIconClick($event, $props.node); | ||
}) | ||
}, [_ctx.state.expandIcon !== void 0 && _ctx.state.shrinkIcon !== void 0 ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.expanded ? _ctx.state.shrinkIcon : _ctx.state.expandIcon), { | ||
key: 0, | ||
class: normalizeClass(["tiny-tree-node__expand-icon", { | ||
"is-leaf": $props.node.isLeaf | ||
}]) | ||
}, null, 8, ["class"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.tree.icon ? _ctx.state.tree.icon : "icon-chevron-right"), { | ||
key: 1, | ||
class: normalizeClass(["tiny-tree-node__expand-icon", { | ||
"is-leaf": $props.node.isLeaf, | ||
expanded: !$props.node.isLeaf && _ctx.state.expanded | ||
}]) | ||
}, null, 8, ["class"]))]), $props.showCheckbox ? (openBlock(), createBlock(_component_checkbox, { | ||
key: 0, | ||
modelValue: $props.node.checked, | ||
ref: "checkbox", | ||
indeterminate: $props.node.indeterminate, | ||
disabled: !!$props.node.disabled, | ||
"validate-event": false, | ||
onChange: _ctx.handleCheckChange | ||
}, null, 8, ["modelValue", "indeterminate", "disabled", "onChange"])) : createCommentVNode("v-if", true), $props.showRadio ? (openBlock(), createBlock(_component_tiny_radio, { | ||
key: 1, | ||
"model-value": $props.currentRadio.value, | ||
"onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) { | ||
return _ctx.$emit("radio-change", $event); | ||
}), | ||
"validate-event": false, | ||
label: $props.node.id, | ||
disabled: !!$props.node.disabled | ||
}, null, 8, ["model-value", "label", "disabled"])) : createCommentVNode("v-if", true), $props.node.loading ? (openBlock(), createBlock(_component_icon_loading, { | ||
key: 2, | ||
class: "tiny-tree-node__loading-icon tiny-svg-size" | ||
})) : createCommentVNode("v-if", true), createVNode(_component_node_content, { | ||
node: $props.node, | ||
"render-content": $props.renderContent | ||
}, null, 8, ["node", "render-content"])], | ||
4 | ||
/* STYLE */ | ||
), createVNode(_component_collapse_transition, null, { | ||
default: withCtx(function() { | ||
return [!$props.renderAfterExpand || _ctx.state.childNodeRendered ? withDirectives((openBlock(), createElementBlock("div", { | ||
@@ -275,41 +269,54 @@ key: 0, | ||
"aria-expanded": _ctx.state.expanded | ||
}, [(openBlock(true), createElementBlock(Fragment, null, renderList($props.node.childNodes, function (child) { | ||
return openBlock(), createBlock(_component_tree_node, { | ||
showRadio: $props.showRadio, | ||
currentRadio: $props.currentRadio, | ||
onRadioChange: _cache[3] || (_cache[3] = function ($event) { | ||
return _ctx.$emit('radio-change', $event); | ||
}), | ||
"render-content": $props.renderContent, | ||
expandIcon: _ctx.state.expandIcon, | ||
shrinkIcon: _ctx.state.shrinkIcon, | ||
"render-after-expand": $props.renderAfterExpand, | ||
"show-checkbox": $props.showCheckbox, | ||
key: _ctx.getNodeKey(child), | ||
node: child, | ||
onNodeExpand: _ctx.handleChildNodeExpand | ||
}, null, 8, ["showRadio", "currentRadio", "render-content", "expandIcon", "shrinkIcon", "render-after-expand", "show-checkbox", "node", "onNodeExpand"]); | ||
}), 128))], 8, _hoisted_2$1)), [[vShow, _ctx.state.expanded]]) : createCommentVNode("", true)]; | ||
}, [(openBlock(true), createElementBlock( | ||
Fragment, | ||
null, | ||
renderList($props.node.childNodes, function(child) { | ||
return openBlock(), createBlock(_component_tree_node, { | ||
showRadio: $props.showRadio, | ||
currentRadio: $props.currentRadio, | ||
onRadioChange: _cache[3] || (_cache[3] = function($event) { | ||
return _ctx.$emit("radio-change", $event); | ||
}), | ||
"render-content": $props.renderContent, | ||
expandIcon: _ctx.state.expandIcon, | ||
shrinkIcon: _ctx.state.shrinkIcon, | ||
"render-after-expand": $props.renderAfterExpand, | ||
"show-checkbox": $props.showCheckbox, | ||
key: _ctx.getNodeKey(child), | ||
node: child, | ||
onNodeExpand: _ctx.handleChildNodeExpand | ||
}, null, 8, ["showRadio", "currentRadio", "render-content", "expandIcon", "shrinkIcon", "render-after-expand", "show-checkbox", "node", "onNodeExpand"]); | ||
}), | ||
128 | ||
/* KEYED_FRAGMENT */ | ||
))], 8, _hoisted_2$1)), [[vShow, _ctx.state.expanded]]) : createCommentVNode("v-if", true)]; | ||
}), | ||
_: 1 | ||
})], 42, _hoisted_1$1), [[vShow, $props.node.visible]]), _ctx.state.showMenu && $options.TreeRoot.showContextmenu ? withDirectives((openBlock(), createElementBlock("div", { | ||
key: 0, | ||
class: "tiny-tree-node__menu", | ||
style: normalizeStyle(_ctx.state.menuposition), | ||
onContextmenu: _cache[10] || (_cache[10] = withModifiers(function () {}, ["stop"])), | ||
onClick: _cache[11] || (_cache[11] = withModifiers(function () {}, ["stop"])) | ||
}, [createVNode(_component_menu_context, { | ||
node: $props.node | ||
}, null, 8, ["node"])], 36)), [[_directive_clickoutside, _ctx.closeMenu]]) : createCommentVNode("", true)]); | ||
/* STABLE */ | ||
})], 42, _hoisted_1$1), [[vShow, $props.node.visible]]), _ctx.state.showMenu && $options.TreeRoot.showContextmenu ? withDirectives((openBlock(), createElementBlock( | ||
"div", | ||
{ | ||
key: 0, | ||
class: "tiny-tree-node__menu", | ||
style: normalizeStyle(_ctx.state.menuposition), | ||
onContextmenu: _cache[10] || (_cache[10] = withModifiers(function() { | ||
}, ["stop"])), | ||
onClick: _cache[11] || (_cache[11] = withModifiers(function() { | ||
}, ["stop"])) | ||
}, | ||
[createVNode(_component_menu_context, { | ||
node: $props.node | ||
}, null, 8, ["node"])], | ||
36 | ||
/* STYLE, HYDRATE_EVENTS */ | ||
)), [[_directive_clickoutside, _ctx.closeMenu]]) : createCommentVNode("v-if", true)]); | ||
} | ||
script$1.render = render$1; | ||
var script = { | ||
props: [].concat(_toConsumableArray(props), ['data', 'dataset', 'parentKey', 'expandIcon', 'shrinkIcon', 'emptyText', 'renderAfterExpand', 'nodeKey', 'checkStrictly', 'defaultExpandAll', 'expandOnClickNode', 'checkOnClickNode', 'checkDescendants', 'autoExpandParent', 'defaultCheckedKeys', 'defaultExpandedKeys', 'defaultExpandedKeysHighlight', 'currentNodeKey', 'renderContent', 'showCheckbox', 'draggable', 'allowDrag', 'allowDrop', 'props', 'lazy', 'highlightCurrent', 'load', 'filterNodeMethod', 'accordion', 'indent', 'icon', 'iconTriggerClickNode', 'showRadio', 'showContextmenu']), | ||
var TreeNode = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]); | ||
var _sfc_main = /* @__PURE__ */ defineComponent({ | ||
props: [].concat(props, ["data", "dataset", "parentKey", "expandIcon", "shrinkIcon", "emptyText", "renderAfterExpand", "nodeKey", "checkStrictly", "defaultExpandAll", "expandOnClickNode", "checkOnClickNode", "checkDescendants", "autoExpandParent", "defaultCheckedKeys", "defaultExpandedKeys", "defaultExpandedKeysHighlight", "currentNodeKey", "renderContent", "showCheckbox", "draggable", "allowDrag", "allowDrop", "props", "lazy", "highlightCurrent", "load", "filterNodeMethod", "accordion", "indent", "icon", "iconTriggerClickNode", "showRadio", "showContextmenu"]), | ||
components: { | ||
TreeNode: script$1 | ||
TreeNode | ||
}, | ||
emits: ['node-expand', 'node-drag-leave', 'check-change', 'check', 'node-drag-over', 'node-drag-enter', 'node-drag-start', 'node-drag-end', 'node-drop', 'current-change', 'node-click'], | ||
provide: function provide() { | ||
emits: ["node-expand", "node-drag-leave", "check-change", "check", "node-drag-over", "node-drag-enter", "node-drag-start", "node-drag-end", "node-drop", "current-change", "node-click"], | ||
provide: function provide2() { | ||
return { | ||
@@ -320,6 +327,6 @@ parentTree: this, | ||
}, | ||
setup: function setup$1(props, context) { | ||
return setup({ | ||
props: props, | ||
context: context, | ||
setup: function setup2(props2, context) { | ||
return _setup({ | ||
props: props2, | ||
context, | ||
renderless: renderless$1, | ||
@@ -329,4 +336,3 @@ api: api$1 | ||
} | ||
}; | ||
}); | ||
var _hoisted_1 = { | ||
@@ -343,36 +349,60 @@ key: 0, | ||
}; | ||
function render(_ctx, _cache, $props, $setup, $data, $options) { | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
var _component_tree_node = resolveComponent("tree-node"); | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass(["tiny-tree", { | ||
'tiny-tree--highlight-current': $props.highlightCurrent, | ||
'is-dragging': !!_ctx.state.dragState.draggingNode, | ||
'is-drop-not-allow': !_ctx.state.dragState.allowDrop, | ||
'is-drop-inner': _ctx.state.dragState.dropType === 'inner' | ||
}]), | ||
role: "tree" | ||
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.state.root.childNodes, function (child) { | ||
return openBlock(), createBlock(_component_tree_node, { | ||
showRadio: $props.showRadio, | ||
currentRadio: _ctx.state.currentRadio, | ||
onRadioChange: _cache[0] || (_cache[0] = function ($event) { | ||
return _ctx.state.currentRadio.value = $event; | ||
return openBlock(), createElementBlock( | ||
"div", | ||
{ | ||
class: normalizeClass(["tiny-tree", { | ||
"tiny-tree--highlight-current": _ctx.highlightCurrent, | ||
"is-dragging": !!_ctx.state.dragState.draggingNode, | ||
"is-drop-not-allow": !_ctx.state.dragState.allowDrop, | ||
"is-drop-inner": _ctx.state.dragState.dropType === "inner" | ||
}]), | ||
role: "tree" | ||
}, | ||
[(openBlock(true), createElementBlock( | ||
Fragment, | ||
null, | ||
renderList(_ctx.state.root.childNodes, function(child) { | ||
return openBlock(), createBlock(_component_tree_node, { | ||
showRadio: _ctx.showRadio, | ||
currentRadio: _ctx.state.currentRadio, | ||
onRadioChange: _cache[0] || (_cache[0] = function($event) { | ||
return _ctx.state.currentRadio.value = $event; | ||
}), | ||
expandIcon: _ctx.expandIcon, | ||
shrinkIcon: _ctx.shrinkIcon, | ||
node: child, | ||
props: _ctx.props, | ||
"render-after-expand": _ctx.renderAfterExpand, | ||
"show-checkbox": _ctx.showCheckbox, | ||
key: _ctx.getNodeKey(child), | ||
"render-content": _ctx.renderContent, | ||
onNodeExpand: _ctx.handleNodeExpand | ||
}, null, 8, ["showRadio", "currentRadio", "expandIcon", "shrinkIcon", "node", "props", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]); | ||
}), | ||
expandIcon: $props.expandIcon, | ||
shrinkIcon: $props.shrinkIcon, | ||
node: child, | ||
props: $props.props, | ||
"render-after-expand": $props.renderAfterExpand, | ||
"show-checkbox": $props.showCheckbox, | ||
key: _ctx.getNodeKey(child), | ||
"render-content": $props.renderContent, | ||
onNodeExpand: _ctx.handleNodeExpand | ||
}, null, 8, ["showRadio", "currentRadio", "expandIcon", "shrinkIcon", "node", "props", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]); | ||
}), 128)), _ctx.state.isEmpty ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "empty", {}, function () { | ||
return [createElementVNode("span", _hoisted_2, toDisplayString(_ctx.state.showEmptyText), 1)]; | ||
})])) : createCommentVNode("", true), withDirectives(createElementVNode("div", _hoisted_3, null, 512), [[vShow, _ctx.state.dragState.showDropIndicator]])], 2); | ||
128 | ||
/* KEYED_FRAGMENT */ | ||
)), _ctx.state.isEmpty ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "empty", {}, function() { | ||
return [createElementVNode( | ||
"span", | ||
_hoisted_2, | ||
toDisplayString(_ctx.state.showEmptyText), | ||
1 | ||
/* TEXT */ | ||
)]; | ||
})])) : createCommentVNode("v-if", true), withDirectives(createElementVNode( | ||
"div", | ||
_hoisted_3, | ||
null, | ||
512 | ||
/* NEED_PATCH */ | ||
), [[vShow, _ctx.state.dragState.showDropIndicator]])], | ||
2 | ||
/* CLASS */ | ||
); | ||
} | ||
script.render = render; | ||
export { script as default }; | ||
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); | ||
export { | ||
pc as default | ||
}; |
{ | ||
"name": "@opentiny/vue-tree", | ||
"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<{ | ||
_constants: { | ||
@@ -9,6 +9,2 @@ type: ObjectConstructor; | ||
accordion: BooleanConstructor; | ||
checkDescendants: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
allowDrag: FunctionConstructor; | ||
@@ -20,2 +16,6 @@ allowDrop: FunctionConstructor; | ||
}; | ||
checkDescendants: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
checkOnClickNode: BooleanConstructor; | ||
@@ -85,3 +85,5 @@ checkStrictly: BooleanConstructor; | ||
shrinkIcon: ObjectConstructor; | ||
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "current-change" | "check-change" | "node-collapse" | "node-expand" | "node-click" | "node-drag-end" | "node-drag-enter" | "node-drag-leave" | "node-drag-over" | "node-drag-start" | "node-drop" | "node-contextmenu")[], "check" | "current-change" | "check-change" | "node-collapse" | "node-expand" | "node-click" | "node-drag-end" | "node-drag-enter" | "node-drag-leave" | "node-drag-over" | "node-drag-start" | "node-drop" | "node-contextmenu", 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<{ | ||
_constants: { | ||
@@ -95,8 +97,8 @@ type: ObjectConstructor; | ||
allowDrag: FunctionConstructor; | ||
checkDescendants: { | ||
allowDrop: FunctionConstructor; | ||
autoExpandParent: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
allowDrop: FunctionConstructor; | ||
autoExpandParent: { | ||
checkDescendants: { | ||
type: BooleanConstructor; | ||
@@ -169,24 +171,5 @@ default: boolean; | ||
shrinkIcon: ObjectConstructor; | ||
}>> & { | ||
onCheck?: ((...args: any[]) => any) | undefined; | ||
"onCurrent-change"?: ((...args: any[]) => any) | undefined; | ||
"onCheck-change"?: ((...args: any[]) => any) | undefined; | ||
"onNode-collapse"?: ((...args: any[]) => any) | undefined; | ||
"onNode-expand"?: ((...args: any[]) => any) | undefined; | ||
"onNode-click"?: ((...args: any[]) => any) | undefined; | ||
"onNode-drag-end"?: ((...args: any[]) => any) | undefined; | ||
"onNode-drag-enter"?: ((...args: any[]) => any) | undefined; | ||
"onNode-drag-leave"?: ((...args: any[]) => any) | undefined; | ||
"onNode-drag-over"?: ((...args: any[]) => any) | undefined; | ||
"onNode-drag-start"?: ((...args: any[]) => any) | undefined; | ||
"onNode-drop"?: ((...args: any[]) => any) | undefined; | ||
"onNode-contextmenu"?: ((...args: any[]) => any) | undefined; | ||
}, { | ||
props: { | ||
children: string; | ||
label: string; | ||
disabled: string; | ||
}; | ||
}>>, { | ||
props: IfAny<V, V, D>; | ||
_constants: Record<string, any>; | ||
checkStrictly: boolean; | ||
accordion: boolean; | ||
@@ -196,14 +179,15 @@ draggable: boolean; | ||
defaultExpandAll: boolean; | ||
expandOnClickNode: boolean; | ||
showCheckbox: boolean; | ||
expandOnClickNode: boolean; | ||
renderAfterExpand: boolean; | ||
autoExpandParent: boolean; | ||
checkDescendants: boolean; | ||
checkOnClickNode: boolean; | ||
checkDescendants: boolean; | ||
autoExpandParent: boolean; | ||
checkStrictly: boolean; | ||
highlightCurrent: boolean; | ||
iconTriggerClickNode: boolean; | ||
indent: number; | ||
iconTriggerClickNode: boolean; | ||
renderAfterExpand: boolean; | ||
showContextmenu: boolean; | ||
showRadio: boolean; | ||
showContextmenu: boolean; | ||
}>; | ||
export default _default; |
@@ -1,257 +0,27 @@ | ||
declare const _default: { | ||
props: string[]; | ||
components: { | ||
TreeNode: { | ||
name: string; | ||
componentName: string; | ||
directives: any; | ||
inject: string[]; | ||
provide(): { | ||
parentTree: any; | ||
}; | ||
emits: string[]; | ||
props: { | ||
node: { | ||
default(): {}; | ||
}; | ||
props: {}; | ||
expandIcon: ObjectConstructor; | ||
shrinkIcon: ObjectConstructor; | ||
renderContent: FunctionConstructor; | ||
renderAfterExpand: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
showCheckbox: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
showRadio: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
currentRadio: { | ||
type: ObjectConstructor; | ||
default(): { | ||
value: null; | ||
}; | ||
}; | ||
}; | ||
components: { | ||
CollapseTransition: any; | ||
Checkbox: any; | ||
TinyRadio: any; | ||
IconChevronRight: any; | ||
IconLoading: any; | ||
MenuContext: { | ||
props: { | ||
node: { | ||
required: boolean; | ||
}; | ||
}; | ||
render(): any; | ||
}; | ||
NodeContent: { | ||
props: { | ||
node: { | ||
required: boolean; | ||
}; | ||
renderContent: FunctionConstructor; | ||
}; | ||
inject: string[]; | ||
render(): any; | ||
}; | ||
}; | ||
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; | ||
}; | ||
}; | ||
}; | ||
emits: string[]; | ||
provide(): { | ||
parentTree: { | ||
props: string[]; | ||
components: { | ||
TreeNode: { | ||
name: string; | ||
componentName: string; | ||
directives: any; | ||
inject: string[]; | ||
provide(): { | ||
parentTree: any; | ||
}; | ||
emits: string[]; | ||
props: { | ||
node: { | ||
default(): {}; | ||
}; | ||
props: {}; | ||
expandIcon: ObjectConstructor; | ||
shrinkIcon: ObjectConstructor; | ||
renderContent: FunctionConstructor; | ||
renderAfterExpand: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
showCheckbox: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
showRadio: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
currentRadio: { | ||
type: ObjectConstructor; | ||
default(): { | ||
value: null; | ||
}; | ||
}; | ||
}; | ||
components: { | ||
CollapseTransition: any; | ||
Checkbox: any; | ||
TinyRadio: any; | ||
IconChevronRight: any; | ||
IconLoading: any; | ||
MenuContext: { | ||
props: { | ||
node: { | ||
required: boolean; | ||
}; | ||
}; | ||
render(): any; | ||
}; | ||
NodeContent: { | ||
props: { | ||
node: { | ||
required: boolean; | ||
}; | ||
renderContent: FunctionConstructor; | ||
}; | ||
inject: string[]; | ||
render(): any; | ||
}; | ||
}; | ||
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; | ||
}; | ||
}; | ||
}; | ||
emits: string[]; | ||
provide(): any; | ||
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; | ||
}; | ||
}; | ||
TreeRoot: { | ||
props: string[]; | ||
components: { | ||
TreeNode: { | ||
name: string; | ||
componentName: string; | ||
directives: any; | ||
inject: string[]; | ||
provide(): { | ||
parentTree: any; | ||
}; | ||
emits: string[]; | ||
props: { | ||
node: { | ||
default(): {}; | ||
}; | ||
props: {}; | ||
expandIcon: ObjectConstructor; | ||
shrinkIcon: ObjectConstructor; | ||
renderContent: FunctionConstructor; | ||
renderAfterExpand: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
showCheckbox: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
showRadio: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
currentRadio: { | ||
type: ObjectConstructor; | ||
default(): { | ||
value: null; | ||
}; | ||
}; | ||
}; | ||
components: { | ||
CollapseTransition: any; | ||
Checkbox: any; | ||
TinyRadio: any; | ||
IconChevronRight: any; | ||
IconLoading: any; | ||
MenuContext: { | ||
props: { | ||
node: { | ||
required: boolean; | ||
}; | ||
}; | ||
render(): any; | ||
}; | ||
NodeContent: { | ||
props: { | ||
node: { | ||
required: boolean; | ||
}; | ||
renderContent: FunctionConstructor; | ||
}; | ||
inject: string[]; | ||
render(): any; | ||
}; | ||
}; | ||
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; | ||
}; | ||
}; | ||
}; | ||
emits: string[]; | ||
provide(): any; | ||
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; | ||
}; | ||
}; | ||
}; | ||
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, ("check" | "node-drag-leave" | "node-drag-enter" | "node-drag-start" | "node-drag-over" | "node-drag-end" | "node-drop" | "node-expand" | "check-change" | "current-change" | "node-click")[], "check" | "node-drag-leave" | "node-drag-enter" | "node-drag-start" | "node-drag-over" | "node-drag-end" | "node-drop" | "node-expand" | "check-change" | "current-change" | "node-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{ | ||
[x: string]: any; | ||
}>>> & { | ||
onCheck?: ((...args: any[]) => any) | undefined; | ||
"onNode-drag-leave"?: ((...args: any[]) => any) | undefined; | ||
"onNode-drag-enter"?: ((...args: any[]) => any) | undefined; | ||
"onNode-drag-start"?: ((...args: any[]) => any) | undefined; | ||
"onNode-drag-over"?: ((...args: any[]) => any) | undefined; | ||
"onNode-drag-end"?: ((...args: any[]) => any) | undefined; | ||
"onNode-drop"?: ((...args: any[]) => any) | undefined; | ||
"onNode-expand"?: ((...args: any[]) => any) | undefined; | ||
"onCheck-change"?: ((...args: any[]) => any) | undefined; | ||
"onCurrent-change"?: ((...args: any[]) => any) | undefined; | ||
"onNode-click"?: ((...args: any[]) => any) | undefined; | ||
}, { | ||
[x: string]: any; | ||
}>; | ||
export default _sfc_main; |
@@ -1,2 +0,2 @@ | ||
declare const _default: { | ||
declare const _sfc_main: { | ||
name: string; | ||
@@ -7,70 +7,3 @@ componentName: string; | ||
provide(): { | ||
parentTree: { | ||
name: string; | ||
componentName: string; | ||
directives: any; | ||
inject: string[]; | ||
provide(): any; | ||
emits: string[]; | ||
props: { | ||
node: { | ||
default(): {}; | ||
}; | ||
props: {}; | ||
expandIcon: ObjectConstructor; | ||
shrinkIcon: ObjectConstructor; | ||
renderContent: FunctionConstructor; | ||
renderAfterExpand: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
showCheckbox: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
showRadio: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
currentRadio: { | ||
type: ObjectConstructor; | ||
default(): { | ||
value: null; | ||
}; | ||
}; | ||
}; | ||
components: { | ||
CollapseTransition: any; | ||
Checkbox: any; | ||
TinyRadio: any; | ||
IconChevronRight: any; | ||
IconLoading: any; | ||
MenuContext: { | ||
props: { | ||
node: { | ||
required: boolean; | ||
}; | ||
}; | ||
render(): any; | ||
}; | ||
NodeContent: { | ||
props: { | ||
node: { | ||
required: boolean; | ||
}; | ||
renderContent: FunctionConstructor; | ||
}; | ||
inject: string[]; | ||
render(): any; | ||
}; | ||
}; | ||
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; | ||
}; | ||
}; | ||
parentTree: any; | ||
}; | ||
@@ -106,5 +39,138 @@ emits: string[]; | ||
components: { | ||
CollapseTransition: any; | ||
Checkbox: any; | ||
TinyRadio: any; | ||
CollapseTransition: import("@vue/runtime-core").DefineComponent<{}, { | ||
on: { | ||
beforeEnter(elem: any): void; | ||
enter(elem: any): void; | ||
afterEnter(elem: any): void; | ||
beforeLeave(elem: any): void; | ||
leave(elem: any): void; | ||
afterLeave(elem: any): void; | ||
}; | ||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{}>>, {}>; | ||
Checkbox: import("@vue/runtime-core").DefineComponent<{ | ||
_constants: { | ||
type: ObjectConstructor; | ||
default: () => { | ||
FORM_ITEM: string; | ||
FORM_CHANGE: string; | ||
CHECKBOX: string; | ||
CHECKBOX_GROUP: string; | ||
}; | ||
}; | ||
modelValue: {}; | ||
label: {}; | ||
indeterminate: BooleanConstructor; | ||
disabled: BooleanConstructor; | ||
checked: BooleanConstructor; | ||
name: StringConstructor; | ||
trueLabel: (StringConstructor | NumberConstructor)[]; | ||
falseLabel: (StringConstructor | NumberConstructor)[]; | ||
id: StringConstructor; | ||
controls: StringConstructor; | ||
border: BooleanConstructor; | ||
size: StringConstructor; | ||
text: StringConstructor; | ||
validateEvent: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
events: { | ||
type: ObjectConstructor; | ||
default: () => {}; | ||
}; | ||
}, () => 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<{ | ||
_constants: { | ||
type: ObjectConstructor; | ||
default: () => { | ||
FORM_ITEM: string; | ||
FORM_CHANGE: string; | ||
CHECKBOX: string; | ||
CHECKBOX_GROUP: string; | ||
}; | ||
}; | ||
modelValue: {}; | ||
label: {}; | ||
indeterminate: BooleanConstructor; | ||
disabled: BooleanConstructor; | ||
checked: BooleanConstructor; | ||
name: StringConstructor; | ||
trueLabel: (StringConstructor | NumberConstructor)[]; | ||
falseLabel: (StringConstructor | NumberConstructor)[]; | ||
id: StringConstructor; | ||
controls: StringConstructor; | ||
border: BooleanConstructor; | ||
size: StringConstructor; | ||
text: StringConstructor; | ||
validateEvent: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
events: { | ||
type: ObjectConstructor; | ||
default: () => {}; | ||
}; | ||
}>>, { | ||
disabled: boolean; | ||
_constants: Record<string, any>; | ||
validateEvent: boolean; | ||
events: Record<string, any>; | ||
indeterminate: boolean; | ||
checked: boolean; | ||
border: boolean; | ||
}>; | ||
TinyRadio: import("@vue/runtime-core").DefineComponent<{ | ||
_constants: { | ||
type: ObjectConstructor; | ||
default: () => { | ||
RADIO_GROUP: string; | ||
}; | ||
}; | ||
modelValue: {}; | ||
label: {}; | ||
disabled: BooleanConstructor; | ||
name: StringConstructor; | ||
border: BooleanConstructor; | ||
size: StringConstructor; | ||
text: StringConstructor; | ||
events: { | ||
type: ObjectConstructor; | ||
default: () => {}; | ||
}; | ||
tabindex: { | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
}, () => 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<{ | ||
_constants: { | ||
type: ObjectConstructor; | ||
default: () => { | ||
RADIO_GROUP: string; | ||
}; | ||
}; | ||
modelValue: {}; | ||
label: {}; | ||
disabled: BooleanConstructor; | ||
name: StringConstructor; | ||
border: BooleanConstructor; | ||
size: StringConstructor; | ||
text: StringConstructor; | ||
events: { | ||
type: ObjectConstructor; | ||
default: () => {}; | ||
}; | ||
tabindex: { | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
}>>, { | ||
tabindex: string; | ||
disabled: boolean; | ||
_constants: Record<string, any>; | ||
events: Record<string, any>; | ||
border: boolean; | ||
}>; | ||
IconChevronRight: any; | ||
@@ -132,3 +198,3 @@ IconLoading: any; | ||
setup(props: any, context: any): { | ||
t: any; | ||
t: (this: any, path: any, options?: any) => any; | ||
vm: any; | ||
@@ -141,2 +207,2 @@ f: (props: any, attrs?: {}) => {}; | ||
}; | ||
export default _default; | ||
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
34557
959
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)