@veltra/desktop 1.0.14 → 1.1.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.
Files changed (119) hide show
  1. package/dist/components/action/action-group.vue.d.ts +3 -3
  2. package/dist/components/action/action.vue.d.ts +1 -1
  3. package/dist/components/action/style2.css +2 -2
  4. package/dist/components/auto-complete/auto-complete.vue.d.ts +2 -2
  5. package/dist/components/auto-complete/style2.css +5 -4
  6. package/dist/components/badge/badge.js +2 -1
  7. package/dist/components/badge/badge.js.map +1 -1
  8. package/dist/components/batch-edit/style2.css +2 -2
  9. package/dist/components/breadcrumb/style2.css +1 -1
  10. package/dist/components/button/button.vue.d.ts +1 -1
  11. package/dist/components/button/style2.css +8 -7
  12. package/dist/components/card/style2.css +2 -0
  13. package/dist/components/cascade/cascade.vue.d.ts +5 -5
  14. package/dist/components/cascade/style2.css +4 -3
  15. package/dist/components/check-tag/check-tag.js +1 -1
  16. package/dist/components/checkbox/style2.css +1 -1
  17. package/dist/components/code-editor/style2.css +7 -9
  18. package/dist/components/collapse/collapse.vue.d.ts +1 -1
  19. package/dist/components/collapse/style2.css +3 -3
  20. package/dist/components/context-menu/style2.css +3 -1
  21. package/dist/components/date-picker/date-picker.vue.d.ts +4 -4
  22. package/dist/components/date-range-picker/date-range-picker.vue.d.ts +2 -2
  23. package/dist/components/date-range-picker/style2.css +5 -4
  24. package/dist/components/dialog/style2.css +2 -0
  25. package/dist/components/drawer/style2.css +2 -1
  26. package/dist/components/dropdown/style2.css +2 -0
  27. package/dist/components/expression-editor/components/variable-picker.js +1 -0
  28. package/dist/components/expression-editor/components/variable-picker.js.map +1 -1
  29. package/dist/components/expression-editor/core/editor.js +1 -0
  30. package/dist/components/expression-editor/core/editor.js.map +1 -1
  31. package/dist/components/expression-editor/style2.css +7 -6
  32. package/dist/components/file-viewer/style2.css +6 -6
  33. package/dist/components/form-item/style2.css +5 -2
  34. package/dist/components/input/input.js.map +1 -1
  35. package/dist/components/input/input.vue.d.ts +6 -6
  36. package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js +30 -13
  37. package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js.map +1 -1
  38. package/dist/components/input/style2.css +11 -14
  39. package/dist/components/menu/style2.css +4 -2
  40. package/dist/components/multi-select/multi-select.vue.d.ts +3 -3
  41. package/dist/components/multi-select/style2.css +5 -4
  42. package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +5 -5
  43. package/dist/components/multi-tree-select/style2.css +5 -4
  44. package/dist/components/notification/notification.vue.d.ts +2 -2
  45. package/dist/components/number/number.vue.d.ts +1 -1
  46. package/dist/components/number-input/number-input.js +48 -10
  47. package/dist/components/number-input/number-input.js.map +1 -1
  48. package/dist/components/number-input/number-input.vue.d.ts +4 -2
  49. package/dist/components/number-input/style2.css +25 -0
  50. package/dist/components/number-range-input/number-range-input.vue.d.ts +1 -1
  51. package/dist/components/palette/palette.js +10 -3
  52. package/dist/components/palette/palette.js.map +1 -1
  53. package/dist/components/password-input/password-input.vue.d.ts +1 -1
  54. package/dist/components/progress-nodes/style2.css +1 -1
  55. package/dist/components/rich-text-editor/rich-text-editor.vue.d.ts +1 -1
  56. package/dist/components/rich-text-editor/style2.css +2 -2
  57. package/dist/components/select/select.js +6 -2
  58. package/dist/components/select/select.js.map +1 -1
  59. package/dist/components/select/select.vue.d.ts +2 -2
  60. package/dist/components/switch/style2.css +3 -0
  61. package/dist/components/tabs/tabs-horizontal.vue.d.ts +2 -2
  62. package/dist/components/tabs/tabs-vertical.vue.d.ts +1 -1
  63. package/dist/components/tabs/tabs.vue.d.ts +2 -2
  64. package/dist/components/textarea/style2.css +7 -6
  65. package/dist/components/textarea/textarea.vue.d.ts +4 -4
  66. package/dist/components/theme/style2.css +2 -1
  67. package/dist/components/tip/tip.js +4 -5
  68. package/dist/components/tip/tip.js.map +1 -1
  69. package/dist/components/tip/tip.vue.d.ts +1 -1
  70. package/dist/components/tree-select/tree-select.vue.d.ts +5 -5
  71. package/dist/types/badge.d.ts +1 -1
  72. package/dist/types/check-tag.d.ts +1 -1
  73. package/dist/types/date-picker.d.ts +2 -2
  74. package/dist/types/number-input.d.ts +1 -0
  75. package/package.json +11 -11
  76. package/src/components/action/style.scss +2 -2
  77. package/src/components/auto-complete/style.scss +5 -4
  78. package/src/components/badge/badge.vue +4 -1
  79. package/src/components/batch-edit/style.scss +2 -2
  80. package/src/components/breadcrumb/style.scss +4 -2
  81. package/src/components/button/style.scss +2 -1
  82. package/src/components/card/style.scss +2 -0
  83. package/src/components/cascade/style.scss +4 -4
  84. package/src/components/checkbox/style.scss +2 -1
  85. package/src/components/code-editor/style.scss +7 -8
  86. package/src/components/collapse/style.scss +13 -7
  87. package/src/components/context-menu/style.scss +6 -2
  88. package/src/components/date-range-picker/style.scss +5 -5
  89. package/src/components/dialog/style.scss +2 -1
  90. package/src/components/drawer/style.scss +2 -1
  91. package/src/components/dropdown/style.scss +2 -0
  92. package/src/components/expression-editor/__test__/editor.test.ts +47 -0
  93. package/src/components/expression-editor/components/variable-picker.vue +1 -0
  94. package/src/components/expression-editor/core/editor.ts +1 -0
  95. package/src/components/expression-editor/style.scss +13 -10
  96. package/src/components/file-viewer/style.scss +7 -7
  97. package/src/components/form-item/style.scss +3 -3
  98. package/src/components/input/input.vue +30 -11
  99. package/src/components/input/style.scss +16 -17
  100. package/src/components/menu/style.scss +4 -2
  101. package/src/components/multi-select/style.scss +5 -5
  102. package/src/components/multi-tree-select/style.scss +5 -4
  103. package/src/components/number-input/__test__/number-input.test.ts +60 -0
  104. package/src/components/number-input/number-input.vue +48 -5
  105. package/src/components/number-input/style.scss +30 -0
  106. package/src/components/palette/palette.vue +14 -4
  107. package/src/components/progress-nodes/style.scss +1 -1
  108. package/src/components/rich-text-editor/style.scss +8 -4
  109. package/src/components/select/select.vue +9 -2
  110. package/src/components/switch/style.scss +3 -0
  111. package/src/components/tabs/style.scss +4 -2
  112. package/src/components/textarea/style.scss +9 -8
  113. package/src/components/theme/style.scss +2 -1
  114. package/src/components/tip/tip.vue +4 -3
  115. package/src/components/tree/style.scss +2 -2
  116. package/src/types/badge.ts +1 -1
  117. package/src/types/check-tag.ts +1 -1
  118. package/src/types/date-picker.ts +2 -2
  119. package/src/types/number-input.ts +1 -0
@@ -17,12 +17,12 @@ type __VLS_Slots = {
17
17
  };
18
18
  declare const __VLS_base: _$vue.DefineComponent<_Props, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_Props> & Readonly<{}>, {
19
19
  type: ColorType;
20
- max: number;
21
20
  size: "small" | "default" | "large";
22
- text: boolean;
23
21
  hover: boolean;
24
- loading: boolean;
25
22
  circle: boolean;
23
+ max: number;
24
+ text: boolean;
25
+ loading: boolean;
26
26
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
27
27
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
28
  declare const _default: typeof __VLS_export;
@@ -17,9 +17,9 @@ declare const __VLS_base: _$vue.DefineComponent<ActionProps, {}, {}, {}, {}, _$v
17
17
  }>, {
18
18
  type: ButtonType;
19
19
  size: _$_veltra_utils0.ComponentSize;
20
+ circle: boolean;
20
21
  text: boolean;
21
22
  loading: boolean;
22
- circle: boolean;
23
23
  inDropdown: boolean;
24
24
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
25
25
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -34,8 +34,8 @@
34
34
  .u-action-group.is-hover:hover, .u-action-group.is-hover:focus-within {
35
35
  opacity: 1;
36
36
  background-color: color-mix(in srgb, var(--u-bg-color-top) 70%, transparent);
37
- backdrop-filter: blur(8px);
38
- -webkit-backdrop-filter: blur(8px);
37
+ backdrop-filter: var(--u-bg-filter);
38
+ -webkit-backdrop-filter: var(--u-bg-filter);
39
39
  box-shadow: 0 1px 4px color-mix(in srgb, var(--u-shadow-color) 35%, transparent);
40
40
  }
41
41
  .u-action-group__dropdown {
@@ -24,10 +24,10 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
24
24
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
25
25
  onSelect?: ((value: string) => any) | undefined;
26
26
  }>, {
27
- placeholder: string;
28
- clearable: boolean;
29
27
  disabled: boolean;
30
28
  readonly: boolean;
29
+ placeholder: string;
30
+ clearable: boolean;
31
31
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
32
32
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
33
  declare const _default: typeof __VLS_export;
@@ -23,7 +23,7 @@
23
23
  }
24
24
  .u-auto-complete.is-disabled {
25
25
  background-color: var(--u-color-disabled);
26
- box-shadow: inset 0 0 1px 1px var(--u-border-color);
26
+ box-shadow: none;
27
27
  cursor: not-allowed;
28
28
  }
29
29
  .u-auto-complete.is-disabled .u-auto-complete__arrow {
@@ -83,8 +83,9 @@
83
83
  }
84
84
  .u-auto-complete.is-multiple {
85
85
  line-height: 1;
86
- box-shadow: inset 0 0 1px 1px var(--u-border-color);
87
- transition: box-shadow 0.25s ease;
86
+ border: var(--u-border);
87
+ box-shadow: var(--u-shadow-emboss);
88
+ transition: border-color 0.25s ease, box-shadow 0.25s ease;
88
89
  overflow: hidden;
89
90
  display: inline-flex;
90
91
  justify-content: flex-start;
@@ -92,7 +93,7 @@
92
93
  flex-wrap: nowrap;
93
94
  }
94
95
  .u-auto-complete.is-multiple:hover {
95
- box-shadow: inset 0 0 1px 1px var(--u-color-primary);
96
+ border-color: var(--u-color-primary);
96
97
  }
97
98
  .u-auto-complete--small {
98
99
  min-height: var(--u-form-component-height-small);
@@ -20,7 +20,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  const { size } = useFallbackProps([props], { size: "default" });
21
21
  const badgeValue = computed(() => {
22
22
  if (props.dot) return "";
23
- return props.value > props.max ? `${props.max}+` : props.value;
23
+ if (typeof props.value === "number" && typeof props.max === "number") return props.value > props.max ? `${props.max}+` : props.value;
24
+ return props.value;
24
25
  });
25
26
  const classList = computed(() => {
26
27
  return [
@@ -1 +1 @@
1
- {"version":3,"file":"badge.js","names":[],"sources":["../../../src/components/badge/badge.vue"],"sourcesContent":["<template>\n <div :class=\"cls.b\">\n <slot />\n <sup :class=\"classList\" ref=\"supRef\" v-if=\"!hidden\">{{ badgeValue }}</sup>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps } from '@veltra/compositions'\nimport { bem, setStyles, zIndex } from '@veltra/utils'\nimport { computed, nextTick, onMounted, shallowRef, watch } from 'vue'\n\nimport type { BadgeProps, ComponentSize } from '../../types'\n\ndefineOptions({\n name: 'Badge'\n})\n\nconst cls = bem('badge')\n\nconst props = withDefaults(defineProps<BadgeProps>(), {\n max: 99\n})\n\nconst { size } = useFallbackProps([props], {\n size: 'default' as ComponentSize\n})\n\nconst badgeValue = computed(() => {\n if (props.dot) return ''\n return props.value! > props.max ? `${props.max}+` : props.value\n})\n\nconst classList = computed(() => {\n return [\n cls.e('sup'),\n props.type && cls.m('color-' + props.type),\n cls.m(size.value),\n bem.is('dot', props.dot)\n ]\n})\n\nconst supRef = shallowRef<HTMLElement>()\n\nconst setPosition = () => {\n if (supRef.value) {\n const { width, height } = supRef.value.getBoundingClientRect()\n setStyles(supRef.value, {\n transform: `translate(-${width / 2}px, -${height / 2}px)`,\n backgroundColor: props.color && props.color,\n zIndex: zIndex()\n })\n }\n}\n\nwatch(\n () => size.value,\n () => {\n nextTick(() => {\n setPosition()\n })\n }\n)\n\nonMounted(() => {\n setPosition()\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;EAkBA,MAAM,MAAM,IAAI,QAAO;EAEvB,MAAM,QAAQ;EAId,MAAM,EAAE,SAAS,iBAAiB,CAAC,MAAM,EAAE,EACzC,MAAM,WACP,CAAA;EAED,MAAM,aAAa,eAAe;AAChC,OAAI,MAAM,IAAK,QAAO;AACtB,UAAO,MAAM,QAAS,MAAM,MAAM,GAAG,MAAM,IAAI,KAAK,MAAM;IAC3D;EAED,MAAM,YAAY,eAAe;AAC/B,UAAO;IACL,IAAI,EAAE,MAAM;IACZ,MAAM,QAAQ,IAAI,EAAE,WAAW,MAAM,KAAK;IAC1C,IAAI,EAAE,KAAK,MAAM;IACjB,IAAI,GAAG,OAAO,MAAM,IAAG;IACzB;IACD;EAED,MAAM,SAAS,YAAwB;EAEvC,MAAM,oBAAoB;AACxB,OAAI,OAAO,OAAO;IAChB,MAAM,EAAE,OAAO,WAAW,OAAO,MAAM,uBAAsB;AAC7D,cAAU,OAAO,OAAO;KACtB,WAAW,cAAc,QAAQ,EAAE,OAAO,SAAS,EAAE;KACrD,iBAAiB,MAAM,SAAS,MAAM;KACtC,QAAQ,QAAO;KAChB,CAAA;;;AAIL,cACQ,KAAK,aACL;AACJ,kBAAe;AACb,iBAAY;KACb;IAEL;AAEA,kBAAgB;AACd,gBAAY;IACb;;uBAjEC,mBAGM,OAAA,EAHA,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,EAAA,EAAA,CAChB,WAAQ,KAAA,QAAA,UAAA,EAAA,CACoC,QAAA,UAAA,WAAA,EAA5C,mBAA0E,OAAA;;IAApE,OAAK,eAAE,UAAA,MAAS;aAAM;IAAJ,KAAI;sBAA2B,WAAA,MAAU,EAAA,EAAA,IAAA,mBAAA,QAAA,KAAA,CAAA,EAAA,EAAA"}
1
+ {"version":3,"file":"badge.js","names":[],"sources":["../../../src/components/badge/badge.vue"],"sourcesContent":["<template>\n <div :class=\"cls.b\">\n <slot />\n <sup :class=\"classList\" ref=\"supRef\" v-if=\"!hidden\">{{ badgeValue }}</sup>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps } from '@veltra/compositions'\nimport { bem, setStyles, zIndex } from '@veltra/utils'\nimport { computed, nextTick, onMounted, shallowRef, watch } from 'vue'\n\nimport type { BadgeProps, ComponentSize } from '../../types'\n\ndefineOptions({\n name: 'Badge'\n})\n\nconst cls = bem('badge')\n\nconst props = withDefaults(defineProps<BadgeProps>(), {\n max: 99\n})\n\nconst { size } = useFallbackProps([props], {\n size: 'default' as ComponentSize\n})\n\nconst badgeValue = computed(() => {\n if (props.dot) return ''\n if (typeof props.value === 'number' && typeof props.max === 'number') {\n return props.value > props.max ? `${props.max}+` : props.value\n }\n return props.value\n})\n\nconst classList = computed(() => {\n return [\n cls.e('sup'),\n props.type && cls.m('color-' + props.type),\n cls.m(size.value),\n bem.is('dot', props.dot)\n ]\n})\n\nconst supRef = shallowRef<HTMLElement>()\n\nconst setPosition = () => {\n if (supRef.value) {\n const { width, height } = supRef.value.getBoundingClientRect()\n setStyles(supRef.value, {\n transform: `translate(-${width / 2}px, -${height / 2}px)`,\n backgroundColor: props.color && props.color,\n zIndex: zIndex()\n })\n }\n}\n\nwatch(\n () => size.value,\n () => {\n nextTick(() => {\n setPosition()\n })\n }\n)\n\nonMounted(() => {\n setPosition()\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;EAkBA,MAAM,MAAM,IAAI,QAAO;EAEvB,MAAM,QAAQ;EAId,MAAM,EAAE,SAAS,iBAAiB,CAAC,MAAM,EAAE,EACzC,MAAM,WACP,CAAA;EAED,MAAM,aAAa,eAAe;AAChC,OAAI,MAAM,IAAK,QAAO;AACtB,OAAI,OAAO,MAAM,UAAU,YAAY,OAAO,MAAM,QAAQ,SAC1D,QAAO,MAAM,QAAQ,MAAM,MAAM,GAAG,MAAM,IAAI,KAAK,MAAM;AAE3D,UAAO,MAAM;IACd;EAED,MAAM,YAAY,eAAe;AAC/B,UAAO;IACL,IAAI,EAAE,MAAM;IACZ,MAAM,QAAQ,IAAI,EAAE,WAAW,MAAM,KAAK;IAC1C,IAAI,EAAE,KAAK,MAAM;IACjB,IAAI,GAAG,OAAO,MAAM,IAAG;IACzB;IACD;EAED,MAAM,SAAS,YAAwB;EAEvC,MAAM,oBAAoB;AACxB,OAAI,OAAO,OAAO;IAChB,MAAM,EAAE,OAAO,WAAW,OAAO,MAAM,uBAAsB;AAC7D,cAAU,OAAO,OAAO;KACtB,WAAW,cAAc,QAAQ,EAAE,OAAO,SAAS,EAAE;KACrD,iBAAiB,MAAM,SAAS,MAAM;KACtC,QAAQ,QAAO;KAChB,CAAA;;;AAIL,cACQ,KAAK,aACL;AACJ,kBAAe;AACb,iBAAY;KACb;IAEL;AAEA,kBAAgB;AACd,gBAAY;IACb;;uBApEC,mBAGM,OAAA,EAHA,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,EAAA,EAAA,CAChB,WAAQ,KAAA,QAAA,UAAA,EAAA,CACoC,QAAA,UAAA,WAAA,EAA5C,mBAA0E,OAAA;;IAApE,OAAK,eAAE,UAAA,MAAS;aAAM;IAAJ,KAAI;sBAA2B,WAAA,MAAU,EAAA,EAAA,IAAA,mBAAA,QAAA,KAAA,CAAA,EAAA,EAAA"}
@@ -27,8 +27,8 @@
27
27
  .u-batch-edit .u-table__row.is-current .u-action-group.is-hover {
28
28
  opacity: 1;
29
29
  background-color: color-mix(in srgb, var(--u-bg-color-top) 70%, transparent);
30
- backdrop-filter: blur(8px);
31
- -webkit-backdrop-filter: blur(8px);
30
+ backdrop-filter: var(--u-bg-filter);
31
+ -webkit-backdrop-filter: var(--u-bg-filter);
32
32
  box-shadow: 0 1px 4px color-mix(in srgb, var(--u-shadow-color) 35%, transparent);
33
33
  }
34
34
  .u-batch-edit__add {
@@ -52,7 +52,7 @@
52
52
  border-radius: var(--u-radius-small);
53
53
  transition: color 0.15s ease;
54
54
  }
55
- .u-breadcrumb__link:hover:not(.is-disabled) {
55
+ .u-breadcrumb__link:not(.is-disabled):hover {
56
56
  color: var(--u-color-primary);
57
57
  }
58
58
  .u-breadcrumb__link:focus-visible {
@@ -12,8 +12,8 @@ declare const __VLS_base: _$vue.DefineComponent<ButtonProps, _ButtonExposed, {},
12
12
  onClick?: ((e: MouseEvent) => any) | undefined;
13
13
  }>, {
14
14
  disabled: boolean;
15
- iconPosition: "left" | "right";
16
15
  loadingIcon: _$vue.Component;
16
+ iconPosition: "left" | "right";
17
17
  propagate: boolean;
18
18
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -28,6 +28,7 @@
28
28
  -webkit-appearance: none;
29
29
  border: none;
30
30
  background-color: var(--u-color-default);
31
+ box-shadow: var(--u-shadow-emboss);
31
32
  transition: background-color 0.25s, box-shadow 0.2s;
32
33
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
33
34
  -webkit-tap-highlight-color: transparent; /* For some Androids */
@@ -127,7 +128,7 @@
127
128
  .u-button--color-primary.is-text:hover {
128
129
  box-shadow: 0px 0px 0px 1px var(--u-color-primary);
129
130
  }
130
- .u-button--color-primary.is-text:not(.is-disabled, .is-loading):hover, .u-button--color-primary.is-text:not(.is-disabled, .is-loading):focus {
131
+ .u-button--color-primary.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-primary.is-text:not(.is-disabled):not(.is-loading):focus {
131
132
  background-color: var(--u-color-primary-light-9);
132
133
  }
133
134
  .u-button--color-primary.is-text.is-disabled {
@@ -177,7 +178,7 @@
177
178
  .u-button--color-success.is-text:hover {
178
179
  box-shadow: 0px 0px 0px 1px var(--u-color-success);
179
180
  }
180
- .u-button--color-success.is-text:not(.is-disabled, .is-loading):hover, .u-button--color-success.is-text:not(.is-disabled, .is-loading):focus {
181
+ .u-button--color-success.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-success.is-text:not(.is-disabled):not(.is-loading):focus {
181
182
  background-color: var(--u-color-success-light-9);
182
183
  }
183
184
  .u-button--color-success.is-text.is-disabled {
@@ -227,7 +228,7 @@
227
228
  .u-button--color-warning.is-text:hover {
228
229
  box-shadow: 0px 0px 0px 1px var(--u-color-warning);
229
230
  }
230
- .u-button--color-warning.is-text:not(.is-disabled, .is-loading):hover, .u-button--color-warning.is-text:not(.is-disabled, .is-loading):focus {
231
+ .u-button--color-warning.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-warning.is-text:not(.is-disabled):not(.is-loading):focus {
231
232
  background-color: var(--u-color-warning-light-9);
232
233
  }
233
234
  .u-button--color-warning.is-text.is-disabled {
@@ -277,7 +278,7 @@
277
278
  .u-button--color-danger.is-text:hover {
278
279
  box-shadow: 0px 0px 0px 1px var(--u-color-danger);
279
280
  }
280
- .u-button--color-danger.is-text:not(.is-disabled, .is-loading):hover, .u-button--color-danger.is-text:not(.is-disabled, .is-loading):focus {
281
+ .u-button--color-danger.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-danger.is-text:not(.is-disabled):not(.is-loading):focus {
281
282
  background-color: var(--u-color-danger-light-9);
282
283
  }
283
284
  .u-button--color-danger.is-text.is-disabled {
@@ -327,7 +328,7 @@
327
328
  .u-button--color-info.is-text:hover {
328
329
  box-shadow: 0px 0px 0px 1px var(--u-color-info);
329
330
  }
330
- .u-button--color-info.is-text:not(.is-disabled, .is-loading):hover, .u-button--color-info.is-text:not(.is-disabled, .is-loading):focus {
331
+ .u-button--color-info.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-info.is-text:not(.is-disabled):not(.is-loading):focus {
331
332
  background-color: var(--u-color-info-light-9);
332
333
  }
333
334
  .u-button--color-info.is-text.is-disabled {
@@ -377,7 +378,7 @@
377
378
  .u-button--color-disabled.is-text:hover {
378
379
  box-shadow: 0px 0px 0px 1px var(--u-color-disabled);
379
380
  }
380
- .u-button--color-disabled.is-text:not(.is-disabled, .is-loading):hover, .u-button--color-disabled.is-text:not(.is-disabled, .is-loading):focus {
381
+ .u-button--color-disabled.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-disabled.is-text:not(.is-disabled):not(.is-loading):focus {
381
382
  background-color: var(--u-color-disabled-light-9);
382
383
  }
383
384
  .u-button--color-disabled.is-text.is-disabled {
@@ -427,7 +428,7 @@
427
428
  .u-button--color-default.is-text:hover {
428
429
  box-shadow: 0px 0px 0px 1px var(--u-color-default);
429
430
  }
430
- .u-button--color-default.is-text:not(.is-disabled, .is-loading):hover, .u-button--color-default.is-text:not(.is-disabled, .is-loading):focus {
431
+ .u-button--color-default.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-default.is-text:not(.is-disabled):not(.is-loading):focus {
431
432
  background-color: var(--u-color-default-light-9);
432
433
  }
433
434
  .u-button--color-default.is-text.is-disabled {
@@ -19,6 +19,8 @@
19
19
  border-radius: var(--u-radius-default);
20
20
  background-color: var(--u-bg-color-top);
21
21
  box-shadow: var(--u-shadow);
22
+ backdrop-filter: var(--u-bg-filter);
23
+ -webkit-backdrop-filter: var(--u-bg-filter);
22
24
  overflow: hidden;
23
25
  }
24
26
  .u-card.is-integrate {
@@ -4,24 +4,24 @@ import * as _$vue from "vue";
4
4
  //#region src/components/cascade/cascade.vue.d.ts
5
5
  declare const __VLS_export: _$vue.DefineComponent<CascadeProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {} & {
6
6
  "update:modelValue": (value?: string | string[] | undefined) => any;
7
- clear: () => any;
8
7
  change: (...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any;
8
+ clear: () => any;
9
9
  }, string, _$vue.PublicProps, Readonly<CascadeProps> & Readonly<{
10
10
  "onUpdate:modelValue"?: ((value?: string | string[] | undefined) => any) | undefined;
11
- onClear?: (() => any) | undefined;
12
11
  onChange?: ((...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any) | undefined;
12
+ onClear?: (() => any) | undefined;
13
13
  }>, {
14
14
  labelKey: string;
15
15
  valueKey: string;
16
16
  childrenKey: string;
17
17
  data: Record<string, any>[];
18
+ disabled: boolean;
19
+ readonly: boolean;
18
20
  placeholder: string;
19
21
  clearable: boolean;
22
+ separator: string;
20
23
  filterable: boolean;
21
- disabled: boolean;
22
- readonly: boolean;
23
24
  visibilityLimit: number;
24
- separator: string;
25
25
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
26
26
  declare const _default: typeof __VLS_export;
27
27
  //#endregion
@@ -19,8 +19,9 @@
19
19
  width: 100%;
20
20
  }
21
21
  .u-cascade.is-multiple {
22
- box-shadow: inset 0 0 1px 1px var(--u-border-color);
23
- transition: box-shadow 0.25s ease;
22
+ border: var(--u-border);
23
+ box-shadow: var(--u-shadow-emboss);
24
+ transition: border-color 0.25s ease, box-shadow 0.25s ease;
24
25
  overflow: hidden;
25
26
  cursor: pointer;
26
27
  display: inline-flex;
@@ -29,7 +30,7 @@
29
30
  flex-wrap: nowrap;
30
31
  }
31
32
  .u-cascade.is-multiple:hover {
32
- box-shadow: inset 0 0 1px 1px var(--u-color-primary);
33
+ border-color: var(--u-color-primary);
33
34
  }
34
35
  .u-cascade--small.is-multiple {
35
36
  min-height: var(--u-form-component-height-small);
@@ -5,7 +5,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  name: "CheckTag",
6
6
  __name: "check-tag",
7
7
  props: {
8
- modelValue: {},
8
+ modelValue: { type: Boolean },
9
9
  checked: { type: Boolean }
10
10
  },
11
11
  emits: ["update:modelValue"],
@@ -73,7 +73,7 @@
73
73
  }
74
74
  .u-checkbox__wrap {
75
75
  border: var(--u-border-width) var(--u-border-style) var(--u-checkbox-border, #ccc);
76
- border-radius: var(--u-radius-default);
76
+ border-radius: 6px;
77
77
  color: #fff;
78
78
  transition: background-color 0.15s ease;
79
79
  display: inline-flex;
@@ -31,12 +31,13 @@
31
31
  max-height: 480px;
32
32
  border-radius: var(--u-radius-default);
33
33
  background-color: var(--u-code-editor-bg);
34
- box-shadow: inset 0 0 0 1px var(--u-code-editor-border);
34
+ border: 1px solid var(--u-code-editor-border);
35
+ box-shadow: var(--u-shadow-emboss);
35
36
  overflow: hidden;
36
- transition: box-shadow 0.2s ease;
37
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
37
38
  }
38
39
  .u-code-editor:hover, .u-code-editor:focus-within {
39
- box-shadow: inset 0 0 0 1px var(--u-color-primary);
40
+ border-color: var(--u-color-primary);
40
41
  }
41
42
  .u-code-editor .cm-editor {
42
43
  background: transparent;
@@ -99,19 +100,16 @@
99
100
  }
100
101
  .u-code-editor.is-disabled {
101
102
  background-color: var(--u-color-disabled);
102
- box-shadow: inset 0 0 0 1px var(--u-code-editor-border);
103
+ box-shadow: none;
103
104
  cursor: not-allowed;
104
105
  }
105
106
  .u-code-editor.is-disabled:hover, .u-code-editor.is-disabled:focus-within {
106
- box-shadow: inset 0 0 0 1px var(--u-code-editor-border);
107
+ border-color: var(--u-code-editor-border);
107
108
  }
108
109
  .u-code-editor.is-disabled .cm-editor,
109
110
  .u-code-editor.is-disabled .cm-content {
110
111
  cursor: not-allowed;
111
112
  }
112
- .u-code-editor.is-readonly {
113
- box-shadow: inset 0 0 0 1px var(--u-code-editor-border);
114
- }
115
113
  .u-code-editor.is-readonly:hover, .u-code-editor.is-readonly:focus-within {
116
- box-shadow: inset 0 0 0 1px var(--u-code-editor-border);
114
+ border-color: var(--u-code-editor-border);
117
115
  }
@@ -13,9 +13,9 @@ declare const __VLS_base: _$vue.DefineComponent<CollapseProps, _CollapseExposed,
13
13
  "onUpdate:modelValue"?: ((value: CollapseModelValue) => any) | undefined;
14
14
  onChange?: ((value: CollapseModelValue) => any) | undefined;
15
15
  }>, {
16
+ iconPosition: CollapseIconPosition;
16
17
  accordion: boolean;
17
18
  bordered: boolean;
18
- iconPosition: CollapseIconPosition;
19
19
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
20
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
21
  declare const _default: typeof __VLS_export;
@@ -46,7 +46,7 @@
46
46
  outline: none;
47
47
  transition: color 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
48
48
  }
49
- .u-collapse__header:hover:not(.is-disabled) {
49
+ .u-collapse__header:not(.is-disabled):hover {
50
50
  background-color: var(--u-bg-color-hover);
51
51
  }
52
52
  .u-collapse__header:focus-visible {
@@ -133,12 +133,12 @@
133
133
  .u-collapse:not(.is-bordered) .u-collapse__item + .u-collapse__item {
134
134
  margin-top: 4px;
135
135
  }
136
- .u-collapse:not(.is-bordered) .u-collapse__item:hover:not(.is-disabled) {
136
+ .u-collapse:not(.is-bordered) .u-collapse__item:not(.is-disabled):hover {
137
137
  background-color: var(--u-bg-color-hover);
138
138
  }
139
139
  .u-collapse:not(.is-bordered) .u-collapse__header {
140
140
  border-radius: inherit;
141
141
  }
142
- .u-collapse:not(.is-bordered) .u-collapse__header:hover:not(.is-disabled) {
142
+ .u-collapse:not(.is-bordered) .u-collapse__header:not(.is-disabled):hover {
143
143
  background-color: transparent;
144
144
  }
@@ -21,6 +21,8 @@
21
21
  box-shadow: var(--u-shadow);
22
22
  border-radius: var(--u-radius-default);
23
23
  padding: var(--u-gap-small);
24
+ backdrop-filter: var(--u-bg-filter);
25
+ -webkit-backdrop-filter: var(--u-bg-filter);
24
26
  }
25
27
  .u-context-menu__label {
26
28
  margin-left: var(--u-gap-small);
@@ -34,7 +36,7 @@
34
36
  align-items: center;
35
37
  flex-wrap: nowrap;
36
38
  }
37
- .u-context-menu__item:not(.is-disabled, .is-loading):hover {
39
+ .u-context-menu__item:not(.is-disabled):not(.is-loading):hover {
38
40
  background-color: var(--u-color-primary-light-9);
39
41
  }
40
42
  .u-context-menu__item.is-disabled {
@@ -3,15 +3,15 @@ import * as _$vue from "vue";
3
3
 
4
4
  //#region src/components/date-picker/date-picker.vue.d.ts
5
5
  declare const __VLS_export: _$vue.DefineComponent<DatePickerProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {} & {
6
- "update:modelValue": (value?: string | undefined) => any;
6
+ "update:modelValue": (value?: string | number | Date | undefined) => any;
7
7
  }, string, _$vue.PublicProps, Readonly<DatePickerProps> & Readonly<{
8
- "onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
8
+ "onUpdate:modelValue"?: ((value?: string | number | Date | undefined) => any) | undefined;
9
9
  }>, {
10
10
  type: "date" | "month" | "year";
11
- placeholder: string;
12
- clearable: boolean;
13
11
  disabled: boolean;
14
12
  readonly: boolean;
13
+ placeholder: string;
14
+ clearable: boolean;
15
15
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
16
16
  declare const _default: typeof __VLS_export;
17
17
  //#endregion
@@ -8,10 +8,10 @@ declare const __VLS_export: _$vue.DefineComponent<DateRangePickerProps, {}, {},
8
8
  "onUpdate:modelValue"?: ((value?: [string, string] | undefined) => any) | undefined;
9
9
  }>, {
10
10
  type: "date" | "month" | "year";
11
- placeholder: [string, string];
12
- clearable: boolean;
13
11
  disabled: boolean;
14
12
  readonly: boolean;
13
+ placeholder: [string, string];
14
+ clearable: boolean;
15
15
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
16
16
  declare const _default: typeof __VLS_export;
17
17
  //#endregion
@@ -19,8 +19,9 @@
19
19
  width: 100%;
20
20
  vertical-align: middle;
21
21
  line-height: 1;
22
- box-shadow: inset 0 0 1px 1px var(--u-border-color);
23
- transition: box-shadow 0.25s ease;
22
+ border: var(--u-border);
23
+ box-shadow: var(--u-shadow-emboss);
24
+ transition: border-color 0.25s ease, box-shadow 0.25s ease;
24
25
  overflow: hidden;
25
26
  display: inline-flex;
26
27
  justify-content: flex-start;
@@ -52,7 +53,7 @@
52
53
  font-size: calc(var(--u-form-component-height-large) / 2 + 2px);
53
54
  }
54
55
  .u-date-range-picker:hover {
55
- box-shadow: inset 0 0 0px 1px var(--u-color-primary);
56
+ border-color: var(--u-color-primary);
56
57
  }
57
58
  .u-date-range-picker__input {
58
59
  outline: none;
@@ -88,7 +89,7 @@
88
89
  }
89
90
  .u-date-range-picker.is-disabled {
90
91
  background-color: var(--u-color-disabled);
91
- box-shadow: inset 0 0 1px 1px var(--u-border-color);
92
+ box-shadow: none;
92
93
  }
93
94
  .u-date-range-picker.is-disabled .u-date-range-picker__input {
94
95
  cursor: not-allowed;
@@ -59,6 +59,8 @@
59
59
  flex-shrink: 0;
60
60
  overflow: hidden;
61
61
  background-color: var(--u-bg-color-middle);
62
+ backdrop-filter: var(--u-bg-filter);
63
+ -webkit-backdrop-filter: var(--u-bg-filter);
62
64
  }
63
65
  .u-dialog__header {
64
66
  height: 49px;
@@ -19,7 +19,8 @@
19
19
  position: absolute;
20
20
  border-radius: var(--u-radius-large);
21
21
  background-color: var(--u-bg-color-top);
22
- backdrop-filter: blur(10px);
22
+ backdrop-filter: var(--u-bg-filter);
23
+ -webkit-backdrop-filter: var(--u-bg-filter);
23
24
  box-shadow: 0 0 10px 2px var(--u-shadow-color);
24
25
  }
25
26
  .u-drawer__close {
@@ -21,6 +21,8 @@
21
21
  border: var(--u-border);
22
22
  border-radius: var(--u-radius-default);
23
23
  box-shadow: var(--u-shadow);
24
+ backdrop-filter: var(--u-bg-filter);
25
+ -webkit-backdrop-filter: var(--u-bg-filter);
24
26
  top: 0;
25
27
  left: 0;
26
28
  }
@@ -203,6 +203,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
203
203
  "hide-arrow": "",
204
204
  alignment: "start",
205
205
  direction: "bottom",
206
+ trigger: "click",
206
207
  "trigger-dom": __props.triggerDom,
207
208
  visible: __props.visible,
208
209
  "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => handleVisibleChange($event))
@@ -1 +1 @@
1
- {"version":3,"file":"variable-picker.js","names":[],"sources":["../../../../src/components/expression-editor/components/variable-picker.vue"],"sourcesContent":["<template>\n <u-tip\n hide-arrow\n alignment=\"start\"\n direction=\"bottom\"\n :trigger-dom=\"triggerDom\"\n :visible=\"visible\"\n @update:visible=\"handleVisibleChange($event)\"\n >\n <template #content>\n <div :class=\"cls.e('picker')\" @mousedown.prevent>\n <!-- 面包屑:仅逐级模式且非根级显示 -->\n <div v-if=\"!isFlat && navPath.length > 0\" :class=\"cls.e('breadcrumbs')\">\n <span :class=\"cls.e('breadcrumb-item')\">\n <span :class=\"cls.e('breadcrumb-link')\" @click=\"navigateTo(0)\">全部变量</span>\n <u-icon :class=\"cls.e('breadcrumb-separator')\">\n <ArrowRight />\n </u-icon>\n </span>\n <span\n v-for=\"(crumb, i) in navPath\"\n :key=\"`${i}-${crumb.value}`\"\n :class=\"cls.e('breadcrumb-item')\"\n >\n <span\n :class=\"[\n cls.e('breadcrumb-link'),\n { [cls.em('breadcrumb-link', 'active')]: i === navPath.length - 1 }\n ]\"\n @click=\"navigateTo(i + 1)\"\n >{{ crumb.label }}</span\n >\n <u-icon v-if=\"i < navPath.length - 1\" :class=\"cls.e('breadcrumb-separator')\">\n <ArrowRight />\n </u-icon>\n </span>\n </div>\n\n <div :class=\"cls.e('picker-body')\">\n <div :class=\"cls.e('panel')\" v-if=\"currentList.length > 0\">\n <u-scroll tag=\"ul\" :class=\"cls.e('panel-list')\" :content-class=\"cls.e('panel-content')\">\n <li\n v-for=\"(item, idx) in currentList\"\n :key=\"`${idx}-${item.value}`\"\n :data-idx=\"idx\"\n :class=\"getItemCls(item, idx)\"\n @click=\"handleItemClick(item, idx)\"\n @mouseenter=\"activeIndex = idx\"\n >\n <span :class=\"cls.e('item-label')\">{{ item.label }}</span>\n <u-icon v-if=\"!isFlat && hasChildren(item)\" :class=\"cls.e('item-expand')\">\n <ArrowRight />\n </u-icon>\n </li>\n </u-scroll>\n </div>\n <div v-else :class=\"cls.e('empty')\">\n <UEmpty description=\"暂无可用变量\" />\n </div>\n\n <PathPreview v-if=\"isFlat && activePath.length > 0\" :path=\"activePath\" />\n </div>\n </div>\n </template>\n </u-tip>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ArrowRight } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed, nextTick, ref, watch } from 'vue'\n\nimport type { VariableItem } from '../../../types'\nimport { UEmpty } from '../../empty'\nimport { UIcon } from '../../icon'\nimport { UScroll } from '../../scroll'\nimport { UTip } from '../../tip'\nimport PathPreview from './path-preview.vue'\n\ndefineOptions({\n name: 'VariablePicker'\n})\n\ninterface FlatItem extends VariableItem {\n /** 仅扁平模式使用:从根到当前节点的路径 */\n __path: VariableItem[]\n}\n\nconst props = defineProps<{\n visible: boolean\n triggerDom?: HTMLElement\n /** 顶层变量树 */\n variables?: VariableItem[]\n /** 来自编辑器 mention 状态的过滤字符串。空 = 逐级模式;非空 = 扁平模式。 */\n filter: string\n /** 是否允许选中分支节点 */\n selectableLevels: 'leaf' | 'any'\n}>()\n\nconst emit = defineEmits<{\n (e: 'select', item: VariableItem): void\n (e: 'update:visible', visible: boolean): void\n /** 用户主动取消(按 Esc)。编辑器据此把 mention 状态置为 dismissed。 */\n (e: 'dismiss'): void\n}>()\n\nconst cls = bem('expression-editor')\n\nconst navPath = ref<VariableItem[]>([])\nconst activeIndex = ref(0)\n\nconst isFlat = computed(() => props.filter !== '')\n\nfunction hasChildren(item: VariableItem): boolean {\n return !!item.children && item.children.length > 0\n}\n\nfunction isLeaf(item: VariableItem): boolean {\n return !hasChildren(item)\n}\n\n/** 当前层级展示的列表(来源依模式而定) */\nconst currentList = computed<VariableItem[]>(() => {\n const variables = props.variables ?? []\n if (isFlat.value) return flatList.value\n let level: VariableItem[] = variables\n for (const node of navPath.value) {\n const found = level.find((it) => it.value === node.value)\n if (!found || !found.children) break\n level = found.children\n }\n return level\n})\n\n/** 扁平模式下:根据 selectableLevels 拍平 + 过滤 */\nconst flatList = computed<FlatItem[]>(() => {\n const variables = props.variables ?? []\n const out: FlatItem[] = []\n const includeBranches = props.selectableLevels === 'any'\n function walk(items: VariableItem[], path: VariableItem[]) {\n for (const it of items) {\n const nextPath = [...path, it]\n if (isLeaf(it)) {\n out.push({ ...it, __path: nextPath })\n } else {\n if (includeBranches) out.push({ ...it, __path: nextPath })\n walk(it.children!, nextPath)\n }\n }\n }\n walk(variables, [])\n const q = props.filter.toLowerCase()\n return out.filter((it) => it.label.toLowerCase().includes(q))\n})\n\n/** 当前 active 项;扁平模式下用于驱动路径预览 */\nconst activePath = computed<VariableItem[]>(() => {\n if (!isFlat.value) return []\n const item = flatList.value[activeIndex.value] as FlatItem | undefined\n return item ? item.__path : []\n})\n\nfunction getItemCls(_item: VariableItem, idx: number) {\n return [cls.e('item'), bem.is('active', idx === activeIndex.value)]\n}\n\nfunction navigateTo(i: number) {\n // 0 = 全部变量;i 之后表示进入到 navPath[i-1]\n navPath.value = navPath.value.slice(0, i)\n activeIndex.value = 0\n}\n\nfunction handleItemClick(item: VariableItem, idx: number) {\n activeIndex.value = idx\n selectActive()\n}\n\nfunction selectActive() {\n const item = currentList.value[activeIndex.value]\n if (!item) return\n\n if (isFlat.value) {\n // 扁平模式始终是「选中并替换」\n emit('select', flattenSourceFor(item))\n return\n }\n\n // 逐级模式\n if (hasChildren(item)) {\n if (props.selectableLevels === 'any') {\n // Enter 在分支项上:选中分支本身\n emit('select', item)\n return\n }\n // 默认 'leaf':进入下一级\n navPath.value = [...navPath.value, item]\n activeIndex.value = 0\n return\n }\n emit('select', item)\n}\n\nfunction flattenSourceFor(it: VariableItem): VariableItem {\n const flat = it as FlatItem\n // 还原为「不带 __path 的纯 VariableItem」,避免泄漏内部字段\n const out: VariableItem = { value: flat.value, label: flat.label }\n if (flat.type) out.type = flat.type\n if (flat.children) out.children = flat.children\n return out\n}\n\nfunction moveActive(delta: -1 | 1) {\n const max = currentList.value.length - 1\n if (max < 0) return\n let next = activeIndex.value + delta\n if (next < 0) next = 0\n if (next > max) next = max\n activeIndex.value = next\n scrollActiveIntoView()\n}\n\nfunction scrollActiveIntoView() {\n void nextTick(() => {\n const list = document.querySelector(`.${cls.e('panel-list')}`)\n if (!list) return\n const item = list.querySelector(`[data-idx=\"${activeIndex.value}\"]`)\n if (item && 'scrollIntoView' in item) {\n ;(item as HTMLElement).scrollIntoView({ block: 'nearest' })\n }\n })\n}\n\nfunction handleVisibleChange(v: boolean) {\n emit('update:visible', v)\n if (!v) reset()\n}\n\nfunction reset() {\n navPath.value = []\n activeIndex.value = 0\n}\n\nwatch(\n () => props.visible,\n (v) => {\n if (!v) reset()\n else activeIndex.value = 0\n }\n)\n\nwatch(\n () => props.filter,\n () => {\n // 过滤词变化:重置 active;逐级 → 扁平时清空 navPath\n activeIndex.value = 0\n if (isFlat.value) navPath.value = []\n }\n)\n\n/**\n * 由父级 forward 进来的键盘事件。\n * 返回 true 表示已处理(外部应 preventDefault)。\n */\nfunction handleKeydown(e: KeyboardEvent): boolean {\n if (!props.visible) return false\n\n switch (e.key) {\n case 'Escape':\n emit('dismiss')\n emit('update:visible', false)\n reset()\n return true\n case 'ArrowDown':\n moveActive(1)\n return true\n case 'ArrowUp':\n moveActive(-1)\n return true\n case 'ArrowLeft':\n // 仅逐级模式:返回上一级;扁平模式下不拦截,让光标正常移动并触发 mention dismiss\n if (!isFlat.value && navPath.value.length > 0) {\n navPath.value = navPath.value.slice(0, -1)\n activeIndex.value = 0\n return true\n }\n return false\n case 'ArrowRight': {\n if (isFlat.value) return false\n const item = currentList.value[activeIndex.value]\n if (item && hasChildren(item)) {\n navPath.value = [...navPath.value, item]\n activeIndex.value = 0\n return true\n }\n return false\n }\n case 'Enter':\n selectActive()\n return true\n default:\n return false\n }\n}\n\ndefineExpose({ handleKeydown })\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwFA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAOb,MAAM,MAAM,IAAI,oBAAmB;EAEnC,MAAM,UAAU,IAAoB,EAAE,CAAA;EACtC,MAAM,cAAc,IAAI,EAAC;EAEzB,MAAM,SAAS,eAAe,MAAM,WAAW,GAAE;EAEjD,SAAS,YAAY,MAA6B;AAChD,UAAO,CAAC,CAAC,KAAK,YAAY,KAAK,SAAS,SAAS;;EAGnD,SAAS,OAAO,MAA6B;AAC3C,UAAO,CAAC,YAAY,KAAI;;;EA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mB,YAAA,MAAY,SAAM,KAAA,WAAA,EAArD,mBAgBM,OAAA;;MAhBA,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,QAAA,CAAA;SAChB,YAcW,MAAA,YAAA,EAAA;MAdD,KAAI;MAAM,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,aAAA,CAAA;MAAiB,iBAAe,MAAA,IAAG,CAAC,EAAC,gBAAA;;6BAE/B,EAAA,UAAA,KAAA,EADpC,mBAYK,UAAA,MAAA,WAXmB,YAAA,QAAd,MAAM,QAAG;2BADnB,mBAYK,MAAA;QAVF,KAAG,GAAK,IAAG,GAAI,KAAK;QACpB,YAAU;QACV,OAAK,eAAE,WAAW,MAAM,IAAG,CAAA;QAC3B,UAAK,WAAE,gBAAgB,MAAM,IAAG;QAChC,eAAU,WAAE,YAAA,QAAc;WAE3B,mBAA0D,QAAA,EAAnD,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,aAAA,CAAA,EAAA,EAAA,gBAAmB,KAAK,MAAK,EAAA,EAAA,EAAA,CACjC,OAAA,SAAU,YAAY,KAAI,IAAA,WAAA,EAAzC,YAES,MAAA,YAAA,EAAA;;QAFoC,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,cAAA,CAAA;;+BACzC,CAAd,YAAc,MAAA,WAAA,CAAA,CAAA,CAAA;;;;;6DAKtB,mBAEM,OAAA;;MAFO,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,QAAA,CAAA;SACvB,YAA+B,MAAA,YAAA,EAAA,EAAvB,aAAY,UAAQ,CAAA,CAAA,EAAA,EAAA,GAGX,OAAA,SAAU,WAAA,MAAW,SAAM,KAAA,WAAA,EAA9C,YAAyE,aAAA;;MAApB,MAAM,WAAA"}
1
+ {"version":3,"file":"variable-picker.js","names":[],"sources":["../../../../src/components/expression-editor/components/variable-picker.vue"],"sourcesContent":["<template>\n <u-tip\n hide-arrow\n alignment=\"start\"\n direction=\"bottom\"\n trigger=\"click\"\n :trigger-dom=\"triggerDom\"\n :visible=\"visible\"\n @update:visible=\"handleVisibleChange($event)\"\n >\n <template #content>\n <div :class=\"cls.e('picker')\" @mousedown.prevent>\n <!-- 面包屑:仅逐级模式且非根级显示 -->\n <div v-if=\"!isFlat && navPath.length > 0\" :class=\"cls.e('breadcrumbs')\">\n <span :class=\"cls.e('breadcrumb-item')\">\n <span :class=\"cls.e('breadcrumb-link')\" @click=\"navigateTo(0)\">全部变量</span>\n <u-icon :class=\"cls.e('breadcrumb-separator')\">\n <ArrowRight />\n </u-icon>\n </span>\n <span\n v-for=\"(crumb, i) in navPath\"\n :key=\"`${i}-${crumb.value}`\"\n :class=\"cls.e('breadcrumb-item')\"\n >\n <span\n :class=\"[\n cls.e('breadcrumb-link'),\n { [cls.em('breadcrumb-link', 'active')]: i === navPath.length - 1 }\n ]\"\n @click=\"navigateTo(i + 1)\"\n >{{ crumb.label }}</span\n >\n <u-icon v-if=\"i < navPath.length - 1\" :class=\"cls.e('breadcrumb-separator')\">\n <ArrowRight />\n </u-icon>\n </span>\n </div>\n\n <div :class=\"cls.e('picker-body')\">\n <div :class=\"cls.e('panel')\" v-if=\"currentList.length > 0\">\n <u-scroll tag=\"ul\" :class=\"cls.e('panel-list')\" :content-class=\"cls.e('panel-content')\">\n <li\n v-for=\"(item, idx) in currentList\"\n :key=\"`${idx}-${item.value}`\"\n :data-idx=\"idx\"\n :class=\"getItemCls(item, idx)\"\n @click=\"handleItemClick(item, idx)\"\n @mouseenter=\"activeIndex = idx\"\n >\n <span :class=\"cls.e('item-label')\">{{ item.label }}</span>\n <u-icon v-if=\"!isFlat && hasChildren(item)\" :class=\"cls.e('item-expand')\">\n <ArrowRight />\n </u-icon>\n </li>\n </u-scroll>\n </div>\n <div v-else :class=\"cls.e('empty')\">\n <UEmpty description=\"暂无可用变量\" />\n </div>\n\n <PathPreview v-if=\"isFlat && activePath.length > 0\" :path=\"activePath\" />\n </div>\n </div>\n </template>\n </u-tip>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ArrowRight } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed, nextTick, ref, watch } from 'vue'\n\nimport type { VariableItem } from '../../../types'\nimport { UEmpty } from '../../empty'\nimport { UIcon } from '../../icon'\nimport { UScroll } from '../../scroll'\nimport { UTip } from '../../tip'\nimport PathPreview from './path-preview.vue'\n\ndefineOptions({\n name: 'VariablePicker'\n})\n\ninterface FlatItem extends VariableItem {\n /** 仅扁平模式使用:从根到当前节点的路径 */\n __path: VariableItem[]\n}\n\nconst props = defineProps<{\n visible: boolean\n triggerDom?: HTMLElement\n /** 顶层变量树 */\n variables?: VariableItem[]\n /** 来自编辑器 mention 状态的过滤字符串。空 = 逐级模式;非空 = 扁平模式。 */\n filter: string\n /** 是否允许选中分支节点 */\n selectableLevels: 'leaf' | 'any'\n}>()\n\nconst emit = defineEmits<{\n (e: 'select', item: VariableItem): void\n (e: 'update:visible', visible: boolean): void\n /** 用户主动取消(按 Esc)。编辑器据此把 mention 状态置为 dismissed。 */\n (e: 'dismiss'): void\n}>()\n\nconst cls = bem('expression-editor')\n\nconst navPath = ref<VariableItem[]>([])\nconst activeIndex = ref(0)\n\nconst isFlat = computed(() => props.filter !== '')\n\nfunction hasChildren(item: VariableItem): boolean {\n return !!item.children && item.children.length > 0\n}\n\nfunction isLeaf(item: VariableItem): boolean {\n return !hasChildren(item)\n}\n\n/** 当前层级展示的列表(来源依模式而定) */\nconst currentList = computed<VariableItem[]>(() => {\n const variables = props.variables ?? []\n if (isFlat.value) return flatList.value\n let level: VariableItem[] = variables\n for (const node of navPath.value) {\n const found = level.find((it) => it.value === node.value)\n if (!found || !found.children) break\n level = found.children\n }\n return level\n})\n\n/** 扁平模式下:根据 selectableLevels 拍平 + 过滤 */\nconst flatList = computed<FlatItem[]>(() => {\n const variables = props.variables ?? []\n const out: FlatItem[] = []\n const includeBranches = props.selectableLevels === 'any'\n function walk(items: VariableItem[], path: VariableItem[]) {\n for (const it of items) {\n const nextPath = [...path, it]\n if (isLeaf(it)) {\n out.push({ ...it, __path: nextPath })\n } else {\n if (includeBranches) out.push({ ...it, __path: nextPath })\n walk(it.children!, nextPath)\n }\n }\n }\n walk(variables, [])\n const q = props.filter.toLowerCase()\n return out.filter((it) => it.label.toLowerCase().includes(q))\n})\n\n/** 当前 active 项;扁平模式下用于驱动路径预览 */\nconst activePath = computed<VariableItem[]>(() => {\n if (!isFlat.value) return []\n const item = flatList.value[activeIndex.value] as FlatItem | undefined\n return item ? item.__path : []\n})\n\nfunction getItemCls(_item: VariableItem, idx: number) {\n return [cls.e('item'), bem.is('active', idx === activeIndex.value)]\n}\n\nfunction navigateTo(i: number) {\n // 0 = 全部变量;i 之后表示进入到 navPath[i-1]\n navPath.value = navPath.value.slice(0, i)\n activeIndex.value = 0\n}\n\nfunction handleItemClick(item: VariableItem, idx: number) {\n activeIndex.value = idx\n selectActive()\n}\n\nfunction selectActive() {\n const item = currentList.value[activeIndex.value]\n if (!item) return\n\n if (isFlat.value) {\n // 扁平模式始终是「选中并替换」\n emit('select', flattenSourceFor(item))\n return\n }\n\n // 逐级模式\n if (hasChildren(item)) {\n if (props.selectableLevels === 'any') {\n // Enter 在分支项上:选中分支本身\n emit('select', item)\n return\n }\n // 默认 'leaf':进入下一级\n navPath.value = [...navPath.value, item]\n activeIndex.value = 0\n return\n }\n emit('select', item)\n}\n\nfunction flattenSourceFor(it: VariableItem): VariableItem {\n const flat = it as FlatItem\n // 还原为「不带 __path 的纯 VariableItem」,避免泄漏内部字段\n const out: VariableItem = { value: flat.value, label: flat.label }\n if (flat.type) out.type = flat.type\n if (flat.children) out.children = flat.children\n return out\n}\n\nfunction moveActive(delta: -1 | 1) {\n const max = currentList.value.length - 1\n if (max < 0) return\n let next = activeIndex.value + delta\n if (next < 0) next = 0\n if (next > max) next = max\n activeIndex.value = next\n scrollActiveIntoView()\n}\n\nfunction scrollActiveIntoView() {\n void nextTick(() => {\n const list = document.querySelector(`.${cls.e('panel-list')}`)\n if (!list) return\n const item = list.querySelector(`[data-idx=\"${activeIndex.value}\"]`)\n if (item && 'scrollIntoView' in item) {\n ;(item as HTMLElement).scrollIntoView({ block: 'nearest' })\n }\n })\n}\n\nfunction handleVisibleChange(v: boolean) {\n emit('update:visible', v)\n if (!v) reset()\n}\n\nfunction reset() {\n navPath.value = []\n activeIndex.value = 0\n}\n\nwatch(\n () => props.visible,\n (v) => {\n if (!v) reset()\n else activeIndex.value = 0\n }\n)\n\nwatch(\n () => props.filter,\n () => {\n // 过滤词变化:重置 active;逐级 → 扁平时清空 navPath\n activeIndex.value = 0\n if (isFlat.value) navPath.value = []\n }\n)\n\n/**\n * 由父级 forward 进来的键盘事件。\n * 返回 true 表示已处理(外部应 preventDefault)。\n */\nfunction handleKeydown(e: KeyboardEvent): boolean {\n if (!props.visible) return false\n\n switch (e.key) {\n case 'Escape':\n emit('dismiss')\n emit('update:visible', false)\n reset()\n return true\n case 'ArrowDown':\n moveActive(1)\n return true\n case 'ArrowUp':\n moveActive(-1)\n return true\n case 'ArrowLeft':\n // 仅逐级模式:返回上一级;扁平模式下不拦截,让光标正常移动并触发 mention dismiss\n if (!isFlat.value && navPath.value.length > 0) {\n navPath.value = navPath.value.slice(0, -1)\n activeIndex.value = 0\n return true\n }\n return false\n case 'ArrowRight': {\n if (isFlat.value) return false\n const item = currentList.value[activeIndex.value]\n if (item && hasChildren(item)) {\n navPath.value = [...navPath.value, item]\n activeIndex.value = 0\n return true\n }\n return false\n }\n case 'Enter':\n selectActive()\n return true\n default:\n return false\n }\n}\n\ndefineExpose({ handleKeydown })\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyFA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAOb,MAAM,MAAM,IAAI,oBAAmB;EAEnC,MAAM,UAAU,IAAoB,EAAE,CAAA;EACtC,MAAM,cAAc,IAAI,EAAC;EAEzB,MAAM,SAAS,eAAe,MAAM,WAAW,GAAE;EAEjD,SAAS,YAAY,MAA6B;AAChD,UAAO,CAA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AtCaret(text);
275
275
  }
276
276
  function onSelectionChange() {
277
+ if (composing) return;
277
278
  if (!opts.onSelectionChange) return;
278
279
  const sel = document.getSelection();
279
280
  if (!sel || sel.rangeCount === 0) {