@opentiny/vue-tree
Advanced tools
Comparing version 2.6.0 to 2.6.1-alpha.0
113
lib/index.js
@@ -1,64 +0,30 @@ | ||
import { $prefix, $props, $setup } from '@opentiny/vue-common'; | ||
import PCTemplate from './pc'; | ||
import '@opentiny/vue-theme/tree/index.css'; | ||
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: { | ||
@@ -121,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" | ||
}; | ||
@@ -151,14 +117,15 @@ } | ||
return $setup({ | ||
props: props, | ||
context: context, | ||
template: template | ||
props, | ||
context, | ||
template | ||
}); | ||
} | ||
}; | ||
Tree.install = function (Vue) { | ||
}); | ||
var version = "3.7.0"; | ||
Tree.install = function(Vue) { | ||
Vue.component(Tree.name, Tree); | ||
}; | ||
Tree.version = '2.6.0'; | ||
export { Tree as default }; | ||
Tree.version = version; | ||
export { | ||
Tree as default | ||
}; |
407
lib/pc.js
@@ -1,71 +0,70 @@ | ||
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'; | ||
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"; | ||
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; | ||
} | ||
return obj; | ||
} | ||
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); | ||
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); | ||
} | ||
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]; | ||
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."); | ||
if (functionalTemplate) { | ||
options.functional = true; | ||
} | ||
return (hint === "string" ? String : Number)(input); | ||
if (scopeId) { | ||
options._scopeId = "data-v-" + scopeId; | ||
} | ||
var hook; | ||
if (moduleIdentifier) { | ||
hook = function hook2(context) { | ||
context = context || // cached call | ||
this.$vnode && this.$vnode.ssrContext || // stateful | ||
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") { | ||
context = __VUE_SSR_CONTEXT__; | ||
} | ||
if (injectStyles) { | ||
injectStyles.call(this, context); | ||
} | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier); | ||
} | ||
}; | ||
options._ssrRegister = hook; | ||
} else if (injectStyles) { | ||
hook = shadowMode ? function() { | ||
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot); | ||
} : injectStyles; | ||
} | ||
if (hook) { | ||
if (options.functional) { | ||
options._injectStyles = hook; | ||
var originalRender = options.render; | ||
options.render = function renderWithStyleInjection(h, context) { | ||
hook.call(context); | ||
return originalRender(h, context); | ||
}; | ||
} else { | ||
var existing = options.beforeCreate; | ||
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; | ||
} | ||
} | ||
return { | ||
exports: scriptExports, | ||
options | ||
}; | ||
} | ||
function _toPropertyKey(arg) { | ||
var key = _toPrimitive(arg, "string"); | ||
return typeof key === "symbol" ? key : String(key); | ||
} | ||
var script$1 = { | ||
name: 'TreeNode', | ||
componentName: 'TreeNode', | ||
var __vue2_script$1 = { | ||
name: "TreeNode", | ||
componentName: "TreeNode", | ||
directives: directive({ | ||
Clickoutside: Clickoutside | ||
Clickoutside | ||
}), | ||
inject: ['TreeRoot'], | ||
inject: ["TreeRoot"], | ||
provide: function provide() { | ||
@@ -76,3 +75,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: { | ||
@@ -102,3 +101,3 @@ node: { | ||
type: Object, | ||
default: function _default() { | ||
default: function _default2() { | ||
return { | ||
@@ -111,4 +110,4 @@ value: null | ||
components: { | ||
CollapseTransition: CollapseTransition, | ||
Checkbox: Checkbox, | ||
CollapseTransition, | ||
Checkbox, | ||
TinyRadio: Radio, | ||
@@ -127,3 +126,3 @@ IconChevronRight: iconChevronRight(), | ||
return tree && tree.scopedSlots && tree.scopedSlots.contextmenu && tree.scopedSlots.contextmenu({ | ||
data: data | ||
data | ||
}); | ||
@@ -139,19 +138,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); | ||
@@ -161,8 +159,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 | ||
@@ -172,90 +170,3 @@ }); | ||
}; | ||
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier | ||
/* server only */ | ||
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { | ||
if (typeof shadowMode !== 'boolean') { | ||
createInjectorSSR = createInjector; | ||
createInjector = shadowMode; | ||
shadowMode = false; | ||
} // Vue.extend constructor export interop. | ||
var options = typeof script === 'function' ? script.options : script; // render functions | ||
if (template && template.render) { | ||
options.render = template.render; | ||
options.staticRenderFns = template.staticRenderFns; | ||
options._compiled = true; // functional template | ||
if (isFunctionalTemplate) { | ||
options.functional = true; | ||
} | ||
} // scopedId | ||
if (scopeId) { | ||
options._scopeId = scopeId; | ||
} | ||
var hook; | ||
if (moduleIdentifier) { | ||
// server build | ||
hook = function hook(context) { | ||
// 2.3 injection | ||
context = context || // cached call | ||
this.$vnode && this.$vnode.ssrContext || // stateful | ||
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional | ||
// 2.2 with runInNewContext: true | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
context = __VUE_SSR_CONTEXT__; | ||
} // inject component styles | ||
if (style) { | ||
style.call(this, createInjectorSSR(context)); | ||
} // register component module identifier for async chunk inference | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier); | ||
} | ||
}; // used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
options._ssrRegister = hook; | ||
} else if (style) { | ||
hook = shadowMode ? function () { | ||
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); | ||
} : function (context) { | ||
style.call(this, createInjector(context)); | ||
}; | ||
} | ||
if (hook) { | ||
if (options.functional) { | ||
// register for functional component in vue file | ||
var originalRender = options.render; | ||
options.render = function renderWithStyleInjection(h, context) { | ||
hook.call(context); | ||
return originalRender(h, context); | ||
}; | ||
} else { | ||
// inject component registration as beforeCreate hook | ||
var existing = options.beforeCreate; | ||
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; | ||
} | ||
} | ||
return script; | ||
} | ||
var normalizeComponent_1 = normalizeComponent; | ||
var __vue_script__$1 = script$1; | ||
var __vue_render__$1 = function __vue_render__() { | ||
var render$1 = function render$12() { | ||
var _class; | ||
@@ -265,3 +176,3 @@ var _vm = this; | ||
var _c = _vm._self._c || _h; | ||
return _c('div', [_c('div', { | ||
return _c("div", [_c("div", { | ||
directives: [{ | ||
@@ -276,7 +187,7 @@ name: "show", | ||
class: (_class = { | ||
'is-indeterminate': !_vm.node.disabled && _vm.node.indeterminate, | ||
'is-current': _vm.node.isCurrent, | ||
'is-hidden': !_vm.node.visible, | ||
'is-checked': !_vm.node.disabled && _vm.node.checked | ||
}, _defineProperty(_class, "is-indeterminate", !_vm.node.disabled && _vm.node.indeterminate), _defineProperty(_class, 'is-focusable', !_vm.node.disabled), _defineProperty(_class, 'is-expanded', _vm.state.expanded), _class), | ||
"is-indeterminate": !_vm.node.disabled && _vm.node.indeterminate, | ||
"is-current": _vm.node.isCurrent, | ||
"is-hidden": !_vm.node.visible, | ||
"is-checked": !_vm.node.disabled && _vm.node.checked | ||
}, _class["is-indeterminate"] = !_vm.node.disabled && _vm.node.indeterminate, _class["is-focusable"] = !_vm.node.disabled, _class["is-expanded"] = _vm.state.expanded, _class), | ||
attrs: { | ||
@@ -297,4 +208,4 @@ "role": "treeitem", | ||
$event.stopPropagation(); | ||
return function ($event) { | ||
return _vm.handleContextMenu($event); | ||
return function($event2) { | ||
return _vm.handleContextMenu($event2); | ||
}.apply(null, arguments); | ||
@@ -319,6 +230,6 @@ }, | ||
} | ||
}, [_c('div', { | ||
}, [_c("div", { | ||
staticClass: "tiny-tree-node__content", | ||
style: { | ||
'padding-left': (_vm.node.level - 1) * _vm.state.tree.indent + 'px' | ||
"padding-left": (_vm.node.level - 1) * _vm.state.tree.indent + "px" | ||
}, | ||
@@ -330,3 +241,3 @@ on: { | ||
} | ||
}, [_c('span', { | ||
}, [_c("span", { | ||
staticClass: "tree-node-icon", | ||
@@ -338,14 +249,14 @@ on: { | ||
} | ||
}, [_vm.state.expandIcon !== undefined && _vm.state.shrinkIcon !== undefined ? [_c(_vm.state.expanded ? _vm.state.shrinkIcon : _vm.state.expandIcon, { | ||
}, [_vm.state.expandIcon !== void 0 && _vm.state.shrinkIcon !== void 0 ? [_c(_vm.state.expanded ? _vm.state.shrinkIcon : _vm.state.expandIcon, { | ||
tag: "component", | ||
class: ['tiny-tree-node__expand-icon', { | ||
'is-leaf': _vm.node.isLeaf | ||
class: ["tiny-tree-node__expand-icon", { | ||
"is-leaf": _vm.node.isLeaf | ||
}] | ||
})] : [_c(_vm.state.tree.icon ? _vm.state.tree.icon : 'icon-chevron-right', { | ||
})] : [_c(_vm.state.tree.icon ? _vm.state.tree.icon : "icon-chevron-right", { | ||
tag: "component", | ||
class: ['tiny-tree-node__expand-icon', { | ||
'is-leaf': _vm.node.isLeaf, | ||
class: ["tiny-tree-node__expand-icon", { | ||
"is-leaf": _vm.node.isLeaf, | ||
expanded: !_vm.node.isLeaf && _vm.state.expanded | ||
}] | ||
})]], 2), _vm._v(" "), _vm.showCheckbox ? _c('checkbox', { | ||
})]], 2), _vm.showCheckbox ? _c("checkbox", { | ||
ref: "checkbox", | ||
@@ -361,3 +272,3 @@ attrs: { | ||
} | ||
}) : _vm._e(), _vm._v(" "), _vm.showRadio ? _c('tiny-radio', { | ||
}) : _vm._e(), _vm.showRadio ? _c("tiny-radio", { | ||
attrs: { | ||
@@ -371,8 +282,8 @@ "model-value": _vm.currentRadio.value, | ||
"update:model-value": function updateModelValue($event) { | ||
return _vm.$emit('radio-change', $event); | ||
return _vm.$emit("radio-change", $event); | ||
} | ||
} | ||
}) : _vm._e(), _vm._v(" "), _vm.node.loading ? _c('icon-loading', { | ||
}) : _vm._e(), _vm.node.loading ? _c("icon-loading", { | ||
staticClass: "tiny-tree-node__loading-icon tiny-svg-size" | ||
}) : _vm._e(), _vm._v(" "), _c('node-content', { | ||
}) : _vm._e(), _c("node-content", { | ||
attrs: { | ||
@@ -382,3 +293,3 @@ "node": _vm.node, | ||
} | ||
})], 1), _vm._v(" "), _c('collapse-transition', [!_vm.renderAfterExpand || _vm.state.childNodeRendered ? _c('div', { | ||
})], 1), _c("collapse-transition", [!_vm.renderAfterExpand || _vm.state.childNodeRendered ? _c("div", { | ||
directives: [{ | ||
@@ -395,4 +306,4 @@ name: "show", | ||
} | ||
}, _vm._l(_vm.node.childNodes, function (child) { | ||
return _c('tree-node', { | ||
}, _vm._l(_vm.node.childNodes, function(child) { | ||
return _c("tree-node", { | ||
key: _vm.getNodeKey(child), | ||
@@ -411,3 +322,3 @@ attrs: { | ||
"radio-change": function radioChange($event) { | ||
return _vm.$emit('radio-change', $event); | ||
return _vm.$emit("radio-change", $event); | ||
}, | ||
@@ -417,3 +328,3 @@ "node-expand": _vm.handleChildNodeExpand | ||
}); | ||
}), 1) : _vm._e()])], 1), _vm._v(" "), _vm.state.showMenu && _vm.TreeRoot.showContextmenu ? _c('div', { | ||
}), 1) : _vm._e()])], 1), _vm.state.showMenu && _vm.TreeRoot.showContextmenu ? _c("div", { | ||
directives: [{ | ||
@@ -435,3 +346,3 @@ name: "clickoutside", | ||
} | ||
}, [_c('menu-context', { | ||
}, [_c("menu-context", { | ||
attrs: { | ||
@@ -442,19 +353,20 @@ "node": _vm.node | ||
}; | ||
var __vue_staticRenderFns__$1 = []; | ||
var __vue_inject_styles__$1 = undefined; | ||
var __vue_scope_id__$1 = undefined; | ||
var __vue_module_identifier__$1 = undefined; | ||
var __vue_is_functional_template__$1 = false; | ||
var __vue_component__$1 = normalizeComponent_1({ | ||
render: __vue_render__$1, | ||
staticRenderFns: __vue_staticRenderFns__$1 | ||
}, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined); | ||
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 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 TreeNode = /* @__PURE__ */ function() { | ||
return __component__$1.exports; | ||
}(); | ||
var __vue2_script = 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: __vue_component__$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 { | ||
@@ -465,6 +377,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, | ||
@@ -474,16 +386,14 @@ api: api$1 | ||
} | ||
}; | ||
var __vue_script__ = script; | ||
var __vue_render__ = function __vue_render__() { | ||
}); | ||
var render3 = function render4() { | ||
var _vm = this; | ||
var _h = _vm.$createElement; | ||
var _c = _vm._self._c || _h; | ||
return _c('div', { | ||
return _c("div", { | ||
staticClass: "tiny-tree", | ||
class: { | ||
'tiny-tree--highlight-current': _vm.highlightCurrent, | ||
'is-dragging': !!_vm.state.dragState.draggingNode, | ||
'is-drop-not-allow': !_vm.state.dragState.allowDrop, | ||
'is-drop-inner': _vm.state.dragState.dropType === 'inner' | ||
"tiny-tree--highlight-current": _vm.highlightCurrent, | ||
"is-dragging": !!_vm.state.dragState.draggingNode, | ||
"is-drop-not-allow": !_vm.state.dragState.allowDrop, | ||
"is-drop-inner": _vm.state.dragState.dropType === "inner" | ||
}, | ||
@@ -493,4 +403,4 @@ attrs: { | ||
} | ||
}, [_vm._l(_vm.state.root.childNodes, function (child) { | ||
return _c('tree-node', { | ||
}, [_vm._l(_vm.state.root.childNodes, function(child) { | ||
return _c("tree-node", { | ||
key: _vm.getNodeKey(child), | ||
@@ -515,9 +425,9 @@ attrs: { | ||
}); | ||
}), _vm._v(" "), _vm.state.isEmpty ? _c('div', { | ||
}), _vm.state.isEmpty ? _c("div", { | ||
staticClass: "tiny-tree__empty-block" | ||
}, [_vm._t("empty", function () { | ||
return [_c('span', { | ||
}, [_vm._t("empty", function() { | ||
return [_c("span", { | ||
staticClass: "tiny-tree__empty-text" | ||
}, [_vm._v(_vm._s(_vm.state.showEmptyText))])]; | ||
})], 2) : _vm._e(), _vm._v(" "), _c('div', { | ||
})], 2) : _vm._e(), _c("div", { | ||
directives: [{ | ||
@@ -533,12 +443,15 @@ name: "show", | ||
}; | ||
var __vue_staticRenderFns__ = []; | ||
var __vue_inject_styles__ = undefined; | ||
var __vue_scope_id__ = undefined; | ||
var __vue_module_identifier__ = undefined; | ||
var __vue_is_functional_template__ = false; | ||
var __vue_component__ = normalizeComponent_1({ | ||
render: __vue_render__, | ||
staticRenderFns: __vue_staticRenderFns__ | ||
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined); | ||
export { __vue_component__ as default }; | ||
var staticRenderFns = []; | ||
var __cssModules = {}; | ||
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render3, staticRenderFns, false, __vue2_injectStyles, null, null, null); | ||
function __vue2_injectStyles(context) { | ||
for (var o in __cssModules) { | ||
this[o] = __cssModules[o]; | ||
} | ||
} | ||
var pc = /* @__PURE__ */ function() { | ||
return __component__.exports; | ||
}(); | ||
export { | ||
pc as default | ||
}; |
{ | ||
"name": "@opentiny/vue-tree", | ||
"version": "2.6.0", | ||
"version": "2.6.1-alpha.0", | ||
"description": "", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"lint": "eslint src/**/*{.js,.html,.vue} --quiet", | ||
"build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", | ||
"build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" | ||
}, | ||
"main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-renderless": "~3.6.0", | ||
"@opentiny/vue-common": "~2.6.0", | ||
"@opentiny/vue-icon": "~2.6.0", | ||
"@opentiny/vue-theme": "~3.6.0", | ||
"@opentiny/vue-theme-mobile": "~3.6.0" | ||
"@opentiny/vue-renderless": "~3.6.1-alpha.0", | ||
"@opentiny/vue-common": "~2.6.1-alpha.0" | ||
}, | ||
"license": "MIT", | ||
"sideEffects": false | ||
"types": "index.d.ts", | ||
"scripts": { | ||
"build": "pnpm -w build:ui $npm_package_name", | ||
"//postversion": "pnpm build" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
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
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35055
2
8
1057
2
80
2
2
1
- Removed@opentiny/vue-icon@~2.6.0
- Removed@opentiny/vue-theme@~3.6.0
- Removed@opentiny/vue-theme-mobile@~3.6.0
- Removed@opentiny/vue-icon@2.6.7(transitive)