@opentinyvue/vue-flowchart 3.22.1 → 3.23.0

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.
package/lib/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { defineComponent, props, directive, setup, emitter, h, isVue3, $prefix, $props, $setup } from '@opentinyvue/vue-common';
2
2
  import { renderless, api } from '@opentinyvue/vue-renderless/flowchart/vue';
3
- import { Clickoutside } from '@opentinyvue/vue-directive';
3
+ import { Clickoutside, AutoTip } from '@opentinyvue/vue-directive';
4
4
  import { IconYes, IconClose, iconNotStartedMini, iconNotStarted, iconOnGoingMini, iconOnGoing, iconExceptionMiniO, iconExceptionO, iconDoneMini, iconDone } from '@opentinyvue/vue-icon';
5
5
  import Popover from '@opentinyvue/vue-popover';
6
6
  import { renderless as renderless$1, api as api$1 } from '@opentinyvue/vue-renderless/flowchart/node';
7
- import { openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, Fragment, renderList, toDisplayString, createCommentVNode } from 'vue';
7
+ import { resolveDirective, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, Fragment, renderList, withDirectives, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
8
8
  import { ResizeObserver } from '@opentinyvue/utils';
9
9
  import '@opentinyvue/vue-theme/flowchart/index.css';
10
10
 
@@ -569,7 +569,10 @@ var icons = {
569
569
  }
570
570
  };
571
571
  var _sfc_main = defineComponent({
572
- props: [].concat(props, ["node", "config", "titleClass"]),
572
+ props: [].concat(props, ["node", "config", "titleClass", "cursorPointerFn"]),
573
+ directives: {
574
+ AutoTip
575
+ },
573
576
  setup: function setup2(props2, context) {
574
577
  return setup({
575
578
  props: props2,
@@ -583,8 +586,8 @@ var _sfc_main = defineComponent({
583
586
  });
584
587
  }
585
588
  });
586
- var _hoisted_1 = ["title"];
587
589
  function _sfc_render(_ctx, _cache, $props2, $setup2, $data, $options) {
590
+ var _directive_auto_tip = resolveDirective("auto-tip");
588
591
  return openBlock(), createElementBlock(
589
592
  "div",
590
593
  {
@@ -602,7 +605,9 @@ function _sfc_render(_ctx, _cache, $props2, $setup2, $data, $options) {
602
605
  "div",
603
606
  {
604
607
  ref: "icon",
605
- class: normalizeClass(["w-4 h-4 absolute z-0 rounded-full flex items-center justify-center", "translate-x-1 translate-y-1 text-base cursor-pointer", {
608
+ class: normalizeClass(["w-4 h-4 absolute z-0 rounded-full flex items-center justify-center", "translate-x-1 translate-y-1 text-base", {
609
+ "cursor-pointer": _ctx.cursorPointerFn ? _ctx.cursorPointerFn(_ctx.state) : true
610
+ }, {
606
611
  "sm:w-2 sm:h-2": _ctx.state.icon.size === "mini",
607
612
  "sm:w-6 sm:h-6": _ctx.state.icon.size === "medium"
608
613
  }])
@@ -638,24 +643,33 @@ function _sfc_render(_ctx, _cache, $props2, $setup2, $data, $options) {
638
643
  return openBlock(), createElementBlock(
639
644
  Fragment,
640
645
  null,
641
- [_ctx.state[key].show ? (openBlock(), createElementBlock("div", {
642
- key,
643
- title: _ctx.state[key].text,
644
- class: normalizeClass(["truncate", _ctx.state.layUpdown ? "text-center" : "text-left", key === "title" && _ctx.state.sizeMedium ? "text-sm" : "text-xs", _ctx.state.isSmall ? {
645
- "leading-5": key === "title",
646
- "leading-4": key !== "title"
647
- } : {
648
- "leading-6": key === "title" && _ctx.state.sizeMedium,
649
- "leading-5": key !== "title" && _ctx.state.sizeMedium || key === "title" && _ctx.state.sizeSmall,
650
- "leading-4": key !== "title" && _ctx.state.sizeSmall || _ctx.state.sizeMini
651
- }, {
652
- "text-color-icon-focus": _ctx.state.statOngoing,
653
- "text-color-text-primary": key === "title" && _ctx.state.statCompleted,
654
- "text-color-error": key === "title" && _ctx.state.statFail,
655
- "text-color-icon-secondary": key === "title" && _ctx.state.statNotStarted,
656
- "text-color-icon-placeholder": key !== "title" && !_ctx.state.statOngoing
657
- }])
658
- }, toDisplayString(_ctx.state[key].text), 11, _hoisted_1)) : createCommentVNode("v-if", true)],
646
+ [_ctx.state[key].show ? withDirectives((openBlock(), createElementBlock(
647
+ "div",
648
+ {
649
+ key,
650
+ class: normalizeClass(["truncate", _ctx.state.layUpdown ? "text-center" : "text-left", key === "title" && _ctx.state.sizeMedium ? "text-sm" : "text-xs", _ctx.state.isSmall ? {
651
+ "leading-5": key === "title",
652
+ "leading-4": key !== "title"
653
+ } : {
654
+ "leading-6": key === "title" && _ctx.state.sizeMedium,
655
+ "leading-5": key !== "title" && _ctx.state.sizeMedium || key === "title" && _ctx.state.sizeSmall,
656
+ "leading-4": key !== "title" && _ctx.state.sizeSmall || _ctx.state.sizeMini
657
+ }, {
658
+ "text-color-icon-focus": _ctx.state.statOngoing,
659
+ "text-color-text-primary": key === "title" && _ctx.state.statCompleted,
660
+ "text-color-error": key === "title" && _ctx.state.statFail,
661
+ "text-color-icon-secondary": key === "title" && _ctx.state.statNotStarted,
662
+ "text-color-icon-placeholder": key !== "title" && !_ctx.state.statOngoing
663
+ }])
664
+ },
665
+ [createTextVNode(
666
+ toDisplayString(_ctx.state[key].text),
667
+ 1
668
+ /* TEXT */
669
+ )],
670
+ 2
671
+ /* CLASS */
672
+ )), [[_directive_auto_tip]]) : createCommentVNode("v-if", true)],
659
673
  64
660
674
  /* STABLE_FRAGMENT */
661
675
  );
@@ -709,7 +723,7 @@ var resizeMixin = function resizeMixin2(_ref) {
709
723
  }
710
724
  };
711
725
  };
712
- var version = "3.undefined";
726
+ var version = "3.23.0";
713
727
  Flowchart.install = function(Vue) {
714
728
  Vue.component(Flowchart.name, Flowchart);
715
729
  };
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-flowchart",
3
3
  "type": "module",
4
- "version": "3.22.1",
4
+ "version": "3.23.0",
5
5
  "description": "",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,
8
8
  "main": "./lib/index.js",
9
9
  "module": "./lib/index.js",
10
10
  "dependencies": {
11
- "@opentinyvue/utils": "~3.22.0",
12
- "@opentinyvue/vue-common": "~3.22.0",
13
- "@opentinyvue/vue-directive": "~3.22.0",
14
- "@opentinyvue/vue-icon": "~3.22.0",
15
- "@opentinyvue/vue-popover": "~3.22.0",
16
- "@opentinyvue/vue-renderless": "~3.22.0",
17
- "@opentinyvue/vue-theme": "~3.22.0"
11
+ "@opentinyvue/utils": "~3.23.0",
12
+ "@opentinyvue/vue-common": "~3.23.0",
13
+ "@opentinyvue/vue-directive": "~3.23.0",
14
+ "@opentinyvue/vue-icon": "~3.23.0",
15
+ "@opentinyvue/vue-popover": "~3.23.0",
16
+ "@opentinyvue/vue-renderless": "~3.23.0",
17
+ "@opentinyvue/vue-theme": "~3.23.0"
18
18
  },
19
19
  "types": "index.d.ts",
20
20
  "scripts": {
package/src/node.vue.d.ts CHANGED
@@ -9,6 +9,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
9
9
  titleClass?: any;
10
10
  config?: any;
11
11
  node?: any;
12
+ cursorPointerFn?: any;
12
13
  }>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
13
14
  tiny_mode?: any;
14
15
  tiny_mode_root?: any;
@@ -20,6 +21,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
20
21
  titleClass?: any;
21
22
  config?: any;
22
23
  node?: any;
24
+ cursorPointerFn?: any;
23
25
  }>>>, {
24
26
  readonly tiny_mode?: any;
25
27
  readonly tiny_mode_root?: any;
@@ -31,5 +33,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
31
33
  readonly titleClass?: any;
32
34
  readonly config?: any;
33
35
  readonly node?: any;
36
+ readonly cursorPointerFn?: any;
34
37
  }, {}>;
35
38
  export default _default;