@koi-design/uxd-ui 13.2.0 → 13.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/es/components/Popover/Popover.mjs +2 -1
  2. package/es/components/Popover/Popover.mjs.map +1 -1
  3. package/es/components/Popover/Popover.type.d.ts +4 -0
  4. package/es/components/Popover/Popover.type.mjs +4 -0
  5. package/es/components/Popover/Popover.type.mjs.map +1 -1
  6. package/es/components/Popover/Popover.vue.d.ts +9 -0
  7. package/es/components/Popover/index.d.ts +19 -0
  8. package/es/components/Tree/Tree.mjs +17 -1
  9. package/es/components/Tree/Tree.mjs.map +1 -1
  10. package/es/components/Tree/Tree.type.d.ts +1 -0
  11. package/es/components/Tree/Tree.type.mjs.map +1 -1
  12. package/es/components/Tree/TreeNode.mjs +15 -1
  13. package/es/components/Tree/TreeNode.mjs.map +1 -1
  14. package/lib/components/Popover/Popover.js +2 -1
  15. package/lib/components/Popover/Popover.js.map +1 -1
  16. package/lib/components/Popover/Popover.type.d.ts +4 -0
  17. package/lib/components/Popover/Popover.type.js +4 -0
  18. package/lib/components/Popover/Popover.type.js.map +1 -1
  19. package/lib/components/Popover/Popover.vue.d.ts +9 -0
  20. package/lib/components/Popover/index.d.ts +19 -0
  21. package/lib/components/Tree/Tree.js +17 -1
  22. package/lib/components/Tree/Tree.js.map +1 -1
  23. package/lib/components/Tree/Tree.type.d.ts +1 -0
  24. package/lib/components/Tree/Tree.type.js.map +1 -1
  25. package/lib/components/Tree/TreeNode.js +15 -1
  26. package/lib/components/Tree/TreeNode.js.map +1 -1
  27. package/package.json +1 -1
  28. package/styles/components/table/index.css +1 -1
  29. package/styles/components/table/index.less +53 -40
  30. package/styles/components/tooltip/index.css +1 -1
  31. package/styles/components/tooltip/var.less +2 -2
  32. package/styles/components/tree/index.css +1 -1
  33. package/styles/components/tree/index.less +10 -1
  34. package/styles/index.css +1 -1
  35. package/styles/tokens/colors/index.css +4 -4
  36. package/types/components/Popover/Popover.type.d.ts +4 -0
  37. package/types/components/Popover/Popover.vue.d.ts +9 -0
  38. package/types/components/Popover/index.d.ts +19 -0
  39. package/types/components/Tree/Tree.type.d.ts +1 -0
  40. package/uxd-ui.css +1 -1
  41. package/uxd-ui.esm.min.mjs +5 -5
  42. package/uxd-ui.esm.mjs +39 -4
  43. package/uxd-ui.umd.js +39 -4
  44. package/uxd-ui.umd.min.js +5 -5
package/uxd-ui.esm.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @koi-design/uxd-ui@3.2.0 */
1
+ /*! @koi-design/uxd-ui@3.2.2 */
2
2
 
3
3
  import { defineComponent, reactive, watch, provide, inject, computed, onMounted, ref, onBeforeUnmount, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot, withDirectives, vShow, createBlock, resolveDynamicComponent, createCommentVNode, toRaw, resolveComponent, Transition, withCtx, createVNode, toDisplayString, isVNode, Comment as Comment$1, Fragment, Text as Text$1, h, shallowRef, toRef, nextTick, onUpdated, onUnmounted, cloneVNode, Teleport, toRefs, withModifiers, mergeProps, renderList, onBeforeUpdate, createTextVNode, watchEffect, onActivated, onDeactivated, normalizeProps, guardReactiveProps, createStaticVNode, withKeys, TransitionGroup, createApp, onBeforeMount } from 'vue';
4
4
  import { URoundClose, USolidCheckmarkCircle, USolidCloseCircle, USolidAlertCircle, USolidInfoCircle, ULineLoading, URoundSearch, URoundCloseCircle, URoundEyeOpen, URoundEyeOff, URoundCheck, ULineEnter, ULineUp, ULineDown, ULineRight, ULineMenu, URoundDown, USolidCheck, USolidRemove, UColorfulEmpty, ULineSearch, ULineLeft, USolidDown, ULineSortRight, ULineLeftDouble, ULineRightDouble, URoundCalendar, ULineShrink, ULineMagnify, ULineRefreshLeft, ULineRefreshRight, ULineScreenOpen, ULineScaleToOriginal, USolidCaretLeft, USolidCaretRight, ULineUnfold, ULinePack, ULinePicture, ULineAlertCircle, USolidStar, UColorfulNotFound, UColorfulStatisticsEmpty, UColorfulMessageEmpty, USolidFilter, USolidCaretUp, USolidCaretDown, ULineCanDrag, ULineAdd, URoundTime, ULineText, ULineDelete, USolidHelpCircle, URoundHelpCircle, ULineInfoCircle, ULineCheckmarkCircle } from '@koi-design/uxd-icon';
@@ -10586,6 +10586,10 @@ const popoverProps = {
10586
10586
  showArrow: {
10587
10587
  type: Boolean,
10588
10588
  default: true
10589
+ },
10590
+ showDelay: {
10591
+ type: Number,
10592
+ default: 0
10589
10593
  }
10590
10594
  };
10591
10595
  const popoverEmits = {
@@ -10689,6 +10693,7 @@ function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) {
10689
10693
  visible: _ctx.visible,
10690
10694
  placement: _ctx.placement,
10691
10695
  trigger: [_ctx.trigger],
10696
+ "mouse-enter-delay": _ctx.showDelay / 1e3,
10692
10697
  "transition-name": "zoom-big-fast",
10693
10698
  offset: _ctx.offset,
10694
10699
  "destroy-popup-on-hide": _ctx.destroyOnHide,
@@ -10730,7 +10735,7 @@ function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) {
10730
10735
  renderSlot(_ctx.$slots, "default")
10731
10736
  ]),
10732
10737
  _: 3
10733
- }, 8, ["class", "style", "prefix-cls", "popup-class", "popup-style", "visible", "placement", "trigger", "offset", "destroy-popup-on-hide", "onPopupVisibleChange"]));
10738
+ }, 8, ["class", "style", "prefix-cls", "popup-class", "popup-style", "visible", "placement", "trigger", "mouse-enter-delay", "offset", "destroy-popup-on-hide", "onPopupVisibleChange"]));
10734
10739
  }
10735
10740
  var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$22], ["__file", "Popover.vue"]]);
10736
10741
 
@@ -39472,7 +39477,19 @@ const _sfc_main$f = defineComponent({
39472
39477
  return tree.loadingKeys.includes(dataKey.value);
39473
39478
  });
39474
39479
  const isDisabled = computed(() => {
39475
- return props.data.disabled !== void 0 ? props.data.disabled : tree.props.disabled;
39480
+ if (props.data.disabled !== void 0) {
39481
+ return props.data.disabled;
39482
+ }
39483
+ if (!tree.props.checkStrictly) {
39484
+ const parentDisabled = tree.isDisabledNode(dataKey.value);
39485
+ if (parentDisabled) {
39486
+ return true;
39487
+ }
39488
+ }
39489
+ return tree.props.disabled;
39490
+ });
39491
+ const checkStrictly = computed(() => {
39492
+ return tree.props.checkable && tree.props.checkStrictly;
39476
39493
  });
39477
39494
  const pauseEvent = (e) => {
39478
39495
  e.stopPropagation();
@@ -39558,6 +39575,7 @@ const _sfc_main$f = defineComponent({
39558
39575
  dragOverGapBottom,
39559
39576
  isLeaf,
39560
39577
  treeNodeOperate,
39578
+ checkStrictly,
39561
39579
  ...toRefs(tree.props)
39562
39580
  };
39563
39581
  }
@@ -39577,6 +39595,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
39577
39595
  {
39578
39596
  [`${_ctx.prefixCls}-node-open`]: _ctx.expanded,
39579
39597
  [`${_ctx.prefixCls}-node-disabled`]: _ctx.isDisabled,
39598
+ [`${_ctx.prefixCls}-node-checkStrictly`]: !_ctx.isDisabled && _ctx.checkStrictly,
39580
39599
  [`${_ctx.prefixCls}-block-node`]: _ctx.blockNode,
39581
39600
  [`${_ctx.prefixCls}-node-selected`]: !_ctx.disabled && !_ctx.data.disabled && _ctx.selected && _ctx.blockNode && !_ctx.checkable,
39582
39601
  "drag-over": _ctx.dragOver,
@@ -39930,6 +39949,21 @@ const _sfc_main$d = defineComponent({
39930
39949
  emit("update:expandedKeys", expandedKeys.value);
39931
39950
  emit("expand", expandedKeys.value, e);
39932
39951
  };
39952
+ const getParentDisabled = (key) => {
39953
+ const node = treeDataMap.value.get(key);
39954
+ if (node == null ? void 0 : node.disabled)
39955
+ return true;
39956
+ if (node == null ? void 0 : node.parent) {
39957
+ return getParentDisabled(node.parent.key);
39958
+ }
39959
+ return false;
39960
+ };
39961
+ const isDisabledNode = (key) => {
39962
+ const node = treeDataMap.value.get(key);
39963
+ if (node == null ? void 0 : node.disabled)
39964
+ return true;
39965
+ return getParentDisabled(key);
39966
+ };
39933
39967
  provide(
39934
39968
  TREE_CONTEXT_INJECTION_KEY,
39935
39969
  reactive({
@@ -39950,7 +39984,8 @@ const _sfc_main$d = defineComponent({
39950
39984
  fireTreeSelect,
39951
39985
  fireTreeCheck,
39952
39986
  fireTreeExpand,
39953
- getDataKey
39987
+ getDataKey,
39988
+ isDisabledNode
39954
39989
  })
39955
39990
  );
39956
39991
  return {
package/uxd-ui.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @koi-design/uxd-ui@3.2.0 */
1
+ /*! @koi-design/uxd-ui@3.2.2 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('@koi-design/uxd-icon')) :
@@ -10589,6 +10589,10 @@
10589
10589
  showArrow: {
10590
10590
  type: Boolean,
10591
10591
  default: true
10592
+ },
10593
+ showDelay: {
10594
+ type: Number,
10595
+ default: 0
10592
10596
  }
10593
10597
  };
10594
10598
  const popoverEmits = {
@@ -10692,6 +10696,7 @@
10692
10696
  visible: _ctx.visible,
10693
10697
  placement: _ctx.placement,
10694
10698
  trigger: [_ctx.trigger],
10699
+ "mouse-enter-delay": _ctx.showDelay / 1e3,
10695
10700
  "transition-name": "zoom-big-fast",
10696
10701
  offset: _ctx.offset,
10697
10702
  "destroy-popup-on-hide": _ctx.destroyOnHide,
@@ -10733,7 +10738,7 @@
10733
10738
  vue.renderSlot(_ctx.$slots, "default")
10734
10739
  ]),
10735
10740
  _: 3
10736
- }, 8, ["class", "style", "prefix-cls", "popup-class", "popup-style", "visible", "placement", "trigger", "offset", "destroy-popup-on-hide", "onPopupVisibleChange"]));
10741
+ }, 8, ["class", "style", "prefix-cls", "popup-class", "popup-style", "visible", "placement", "trigger", "mouse-enter-delay", "offset", "destroy-popup-on-hide", "onPopupVisibleChange"]));
10737
10742
  }
10738
10743
  var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$22], ["__file", "Popover.vue"]]);
10739
10744
 
@@ -39475,7 +39480,19 @@
39475
39480
  return tree.loadingKeys.includes(dataKey.value);
39476
39481
  });
39477
39482
  const isDisabled = vue.computed(() => {
39478
- return props.data.disabled !== void 0 ? props.data.disabled : tree.props.disabled;
39483
+ if (props.data.disabled !== void 0) {
39484
+ return props.data.disabled;
39485
+ }
39486
+ if (!tree.props.checkStrictly) {
39487
+ const parentDisabled = tree.isDisabledNode(dataKey.value);
39488
+ if (parentDisabled) {
39489
+ return true;
39490
+ }
39491
+ }
39492
+ return tree.props.disabled;
39493
+ });
39494
+ const checkStrictly = vue.computed(() => {
39495
+ return tree.props.checkable && tree.props.checkStrictly;
39479
39496
  });
39480
39497
  const pauseEvent = (e) => {
39481
39498
  e.stopPropagation();
@@ -39561,6 +39578,7 @@
39561
39578
  dragOverGapBottom,
39562
39579
  isLeaf,
39563
39580
  treeNodeOperate,
39581
+ checkStrictly,
39564
39582
  ...vue.toRefs(tree.props)
39565
39583
  };
39566
39584
  }
@@ -39580,6 +39598,7 @@
39580
39598
  {
39581
39599
  [`${_ctx.prefixCls}-node-open`]: _ctx.expanded,
39582
39600
  [`${_ctx.prefixCls}-node-disabled`]: _ctx.isDisabled,
39601
+ [`${_ctx.prefixCls}-node-checkStrictly`]: !_ctx.isDisabled && _ctx.checkStrictly,
39583
39602
  [`${_ctx.prefixCls}-block-node`]: _ctx.blockNode,
39584
39603
  [`${_ctx.prefixCls}-node-selected`]: !_ctx.disabled && !_ctx.data.disabled && _ctx.selected && _ctx.blockNode && !_ctx.checkable,
39585
39604
  "drag-over": _ctx.dragOver,
@@ -39933,6 +39952,21 @@
39933
39952
  emit("update:expandedKeys", expandedKeys.value);
39934
39953
  emit("expand", expandedKeys.value, e);
39935
39954
  };
39955
+ const getParentDisabled = (key) => {
39956
+ const node = treeDataMap.value.get(key);
39957
+ if (node == null ? void 0 : node.disabled)
39958
+ return true;
39959
+ if (node == null ? void 0 : node.parent) {
39960
+ return getParentDisabled(node.parent.key);
39961
+ }
39962
+ return false;
39963
+ };
39964
+ const isDisabledNode = (key) => {
39965
+ const node = treeDataMap.value.get(key);
39966
+ if (node == null ? void 0 : node.disabled)
39967
+ return true;
39968
+ return getParentDisabled(key);
39969
+ };
39936
39970
  vue.provide(
39937
39971
  TREE_CONTEXT_INJECTION_KEY,
39938
39972
  vue.reactive({
@@ -39953,7 +39987,8 @@
39953
39987
  fireTreeSelect,
39954
39988
  fireTreeCheck,
39955
39989
  fireTreeExpand,
39956
- getDataKey
39990
+ getDataKey,
39991
+ isDisabledNode
39957
39992
  })
39958
39993
  );
39959
39994
  return {