@farris/ui-vue 1.8.0-alpha.0 → 1.8.0-beta.1

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 (193) hide show
  1. package/components/avatar/index.esm.js +138 -1526
  2. package/components/avatar/index.umd.cjs +1 -6
  3. package/components/button/index.css +1 -1
  4. package/components/button/index.esm.js +15951 -15410
  5. package/components/button/index.umd.cjs +27 -27
  6. package/components/calendar/index.esm.js +269 -255
  7. package/components/calendar/index.umd.cjs +3 -3
  8. package/components/collection-property-editor/index.esm.js +243 -229
  9. package/components/collection-property-editor/index.umd.cjs +2 -2
  10. package/components/combo-list/index.esm.js +32 -32
  11. package/components/combo-list/index.umd.cjs +1 -1
  12. package/components/comment/index.esm.js +473 -456
  13. package/components/comment/index.umd.cjs +6 -6
  14. package/components/component/index.css +1 -1
  15. package/components/component/index.esm.js +2503 -2239
  16. package/components/component/index.umd.cjs +2 -2
  17. package/components/condition/index.esm.js +1064 -954
  18. package/components/condition/index.umd.cjs +2 -2
  19. package/components/data-grid/index.esm.js +1 -1
  20. package/components/data-grid/index.umd.cjs +1 -1
  21. package/components/designer-canvas/index.css +1 -1
  22. package/components/designer-canvas/index.esm.js +3894 -3058
  23. package/components/designer-canvas/index.umd.cjs +1 -1
  24. package/components/drawer/index.esm.js +91 -77
  25. package/components/drawer/index.umd.cjs +2 -2
  26. package/components/dynamic-form/index.esm.js +220 -215
  27. package/components/dynamic-form/index.umd.cjs +1 -1
  28. package/components/dynamic-resolver/index.esm.js +145 -131
  29. package/components/dynamic-resolver/index.umd.cjs +2 -2
  30. package/components/dynamic-view/index.esm.js +336 -329
  31. package/components/dynamic-view/index.umd.cjs +1 -1
  32. package/components/events-editor/index.esm.js +1611 -1536
  33. package/components/events-editor/index.umd.cjs +3 -3
  34. package/components/expression-editor/index.esm.js +219 -219
  35. package/components/expression-editor/index.umd.cjs +2 -2
  36. package/components/external-container/index.esm.js +179 -178
  37. package/components/external-container/index.umd.cjs +1 -1
  38. package/components/fieldset/index.esm.js +285 -221
  39. package/components/fieldset/index.umd.cjs +1 -1
  40. package/components/filter-bar/index.css +1 -0
  41. package/components/filter-bar/index.esm.js +1512 -1290
  42. package/components/filter-bar/index.umd.cjs +7 -7
  43. package/components/filter-condition-editor/index.esm.js +851 -831
  44. package/components/filter-condition-editor/index.umd.cjs +3 -3
  45. package/components/flow-canvas/index.esm.js +520 -501
  46. package/components/flow-canvas/index.umd.cjs +8 -8
  47. package/components/image/index.esm.js +101 -79
  48. package/components/image/index.umd.cjs +3 -3
  49. package/components/language-textbox/index.esm.js +330 -251
  50. package/components/language-textbox/index.umd.cjs +2 -2
  51. package/components/list-nav/index.esm.js +399 -313
  52. package/components/list-nav/index.umd.cjs +1 -1
  53. package/components/locale/index.esm.js +3 -0
  54. package/components/locale/index.umd.cjs +1 -1
  55. package/components/lookup/index.esm.js +997 -976
  56. package/components/lookup/index.umd.cjs +2 -2
  57. package/components/mapping-editor/index.esm.js +725 -705
  58. package/components/mapping-editor/index.umd.cjs +1 -1
  59. package/components/message-box/index.esm.js +542 -522
  60. package/components/message-box/index.umd.cjs +1 -1
  61. package/components/nav/index.esm.js +95 -308
  62. package/components/nav/index.umd.cjs +1 -1
  63. package/components/number-range/index.esm.js +115 -107
  64. package/components/number-range/index.umd.cjs +2 -2
  65. package/components/order/index.esm.js +56 -54
  66. package/components/order/index.umd.cjs +1 -1
  67. package/components/page-footer/index.esm.js +135 -123
  68. package/components/page-footer/index.umd.cjs +1 -1
  69. package/components/page-header/index.esm.js +266 -222
  70. package/components/page-header/index.umd.cjs +1 -1
  71. package/components/property-panel/index.esm.js +402 -375
  72. package/components/property-panel/index.umd.cjs +4 -4
  73. package/components/query-solution/index.esm.js +3171 -3061
  74. package/components/query-solution/index.umd.cjs +7 -7
  75. package/components/response-toolbar/index.esm.js +1 -1
  76. package/components/response-toolbar/index.umd.cjs +1 -1
  77. package/components/schema-selector/index.esm.js +1620 -1608
  78. package/components/schema-selector/index.umd.cjs +5 -5
  79. package/components/scroll-navbar/index.esm.js +150 -136
  80. package/components/scroll-navbar/index.umd.cjs +2 -2
  81. package/components/section/index.esm.js +323 -311
  82. package/components/section/index.umd.cjs +2 -2
  83. package/components/sort-condition-editor/index.esm.js +850 -830
  84. package/components/sort-condition-editor/index.umd.cjs +3 -3
  85. package/components/step/index.esm.js +991 -224
  86. package/components/step/index.umd.cjs +1 -1
  87. package/components/tabs/index.esm.js +356 -334
  88. package/components/tabs/index.umd.cjs +1 -1
  89. package/components/wizard/index.esm.js +159 -162
  90. package/components/wizard/index.umd.cjs +1 -1
  91. package/designer/avatar/index.esm.js +1721 -0
  92. package/designer/avatar/index.umd.cjs +6 -0
  93. package/designer/button-edit/index.esm.js +2 -1
  94. package/designer/button-edit/index.umd.cjs +1 -1
  95. package/designer/data-grid/index.esm.js +693 -659
  96. package/designer/data-grid/index.umd.cjs +6 -6
  97. package/designer/data-view/index.esm.js +90 -78
  98. package/designer/data-view/index.umd.cjs +2 -2
  99. package/designer/date-picker/index.esm.js +203 -203
  100. package/designer/date-picker/index.umd.cjs +1 -1
  101. package/designer/drawer/index.esm.js +181 -167
  102. package/designer/drawer/index.umd.cjs +2 -2
  103. package/designer/dynamic-form/index.esm.js +228 -206
  104. package/designer/dynamic-form/index.umd.cjs +2 -2
  105. package/designer/farris-designer.all.esm.js +10014 -9692
  106. package/designer/farris-designer.all.umd.cjs +18 -18
  107. package/designer/index.css +1 -1
  108. package/designer/input-group/index.esm.js +15 -15
  109. package/designer/input-group/index.umd.cjs +1 -1
  110. package/designer/nav/index.esm.js +1719 -0
  111. package/designer/nav/index.umd.cjs +6 -0
  112. package/designer/number-spinner/index.esm.js +8 -7
  113. package/designer/number-spinner/index.umd.cjs +1 -1
  114. package/designer/radio-group/index.esm.js +133 -125
  115. package/designer/radio-group/index.umd.cjs +2 -2
  116. package/designer/response-toolbar/index.esm.js +864 -863
  117. package/designer/response-toolbar/index.umd.cjs +1 -1
  118. package/designer/section/index.esm.js +245 -183
  119. package/designer/section/index.umd.cjs +1 -1
  120. package/designer/tabs/index.css +1 -1
  121. package/designer/tabs/index.esm.js +3667 -2810
  122. package/designer/tabs/index.umd.cjs +2 -2
  123. package/designer/time-picker/index.esm.js +26 -17
  124. package/designer/time-picker/index.umd.cjs +2 -2
  125. package/designer/tree-grid/index.esm.js +69 -37
  126. package/designer/tree-grid/index.umd.cjs +1 -1
  127. package/designer/wizard/index.esm.js +110 -110
  128. package/designer/wizard/index.umd.cjs +3 -3
  129. package/farris.all.esm.js +39993 -39089
  130. package/farris.all.umd.cjs +36 -36
  131. package/index.css +1 -1
  132. package/locales/filter-bar/ui/en.json +1 -0
  133. package/locales/filter-bar/ui/zh-CHS.json +1 -0
  134. package/locales/filter-bar/ui/zh-CHT.json +1 -0
  135. package/locales/ui/en.json +1 -0
  136. package/locales/ui/zh-CHS.json +1 -0
  137. package/locales/ui/zh-CHT.json +1 -0
  138. package/package.json +1 -1
  139. package/types/avatar/designer.d.ts +28 -0
  140. package/types/avatar/index.d.ts +0 -15
  141. package/types/avatar/src/composition/types.d.ts +3 -0
  142. package/types/avatar/src/composition/use-file.d.ts +19 -0
  143. package/types/avatar/src/composition/use-image.d.ts +1 -1
  144. package/types/avatar/src/designer/avatar.design.props.d.ts +24 -0
  145. package/types/avatar/src/property-config/avatar.property-config.d.ts +11 -13
  146. package/types/avatar/src/schema/schema-mapper.d.ts +2 -0
  147. package/types/components.d.ts +3 -0
  148. package/types/condition/index.d.ts +18 -6
  149. package/types/condition/src/condition-fields.component.d.ts +9 -3
  150. package/types/condition/src/condition-fields.design.component.d.ts +9 -3
  151. package/types/condition/src/condition-list.component.d.ts +9 -3
  152. package/types/condition/src/condition.props.d.ts +11 -0
  153. package/types/data-view/designer/property-config/use-appearance.d.ts +17 -10
  154. package/types/data-view/designer/property-config/use-pagination.d.ts +0 -6
  155. package/types/designer-canvas/src/composition/dg-control.d.ts +13 -0
  156. package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -0
  157. package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.props.d.ts +4 -0
  158. package/types/dynamic-resolver/src/converter/tree-auto-check.converter.d.ts +3 -0
  159. package/types/dynamic-view/src/components/maps.d.ts +130 -4
  160. package/types/filter-bar/src/composition/types.d.ts +2 -0
  161. package/types/filter-bar/src/filter-bar.props.d.ts +0 -1
  162. package/types/filter-bar/src/locale/locale.d.ts +2 -1
  163. package/types/filter-bar/src/property-config/filter-bar.property-config.d.ts +0 -1
  164. package/types/language-textbox/index.d.ts +65 -2
  165. package/types/language-textbox/src/designer/language-textbox.design.component.d.ts +36 -0
  166. package/types/language-textbox/src/language-textbox.component.d.ts +38 -1
  167. package/types/language-textbox/src/language-textbox.props.d.ts +20 -0
  168. package/types/lookup/src/components/popup-container.component.d.ts +3 -3
  169. package/types/lookup/src/composition/use-compat.d.ts +28 -0
  170. package/types/lookup/src/composition/use-state.d.ts +1 -0
  171. package/types/message-box/src/message-box.service.d.ts +2 -1
  172. package/types/nav/designer.d.ts +28 -0
  173. package/types/nav/index.d.ts +24 -20
  174. package/types/nav/src/designer/nav.design.props.d.ts +29 -0
  175. package/types/nav/src/designer/use-design-rules.d.ts +3 -0
  176. package/types/nav/src/property-config/nav.property-config.d.ts +9 -0
  177. package/types/nav/src/schema/schema-mapper.d.ts +4 -0
  178. package/types/page-footer/src/designer/use-designer-rules.d.ts +2 -2
  179. package/types/page-header/src/designer/use-designer-rules.d.ts +2 -2
  180. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -0
  181. package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
  182. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -1
  183. package/types/section/src/designer/section.design.props.d.ts +4 -0
  184. package/types/section/src/property-config/section.property-config.d.ts +39 -0
  185. package/types/section/src/schema/toolbar-resolver.d.ts +0 -1
  186. package/types/step/src/designer/use-designer-rules.d.ts +3 -0
  187. package/types/step/src/designer/use-step-creator.d.ts +6 -0
  188. package/types/step/src/property-config/step.property-config.d.ts +15 -0
  189. package/types/step/src/schema/schema-resolver.d.ts +2 -1
  190. package/types/tabs/src/composition/types.d.ts +4 -0
  191. package/types/tabs/src/tabs.props.d.ts +6 -0
  192. package/types/tooltip/index.d.ts +3 -3
  193. package/types/tooltip/src/tooltip.component.d.ts +2 -2
@@ -1,13 +1,14 @@
1
- import { ref as S, computed as y, watch as R, nextTick as V, reactive as be, createVNode as u, withDirectives as Z, resolveDirective as pe, onMounted as N, vModelText as he, Fragment as me, defineComponent as ee, shallowRef as E, provide as ge, inject as ye, onUnmounted as Te, isVNode as we } from "vue";
2
- import { getCustomClass as Ce, isMobilePhone as Se } from "../common/index.esm.js";
3
- import xe from "../capsule/index.esm.js";
1
+ import { ref as S, computed as y, watch as R, nextTick as V, reactive as be, createVNode as c, withDirectives as Z, resolveDirective as pe, onMounted as N, vModelText as he, Fragment as me, defineComponent as ee, shallowRef as E, provide as ge, inject as ye, onUnmounted as Te, isVNode as we } from "vue";
2
+ import { FNotifyService as Ce } from "../notify/index.esm.js";
3
+ import { getCustomClass as Se, isMobilePhone as xe } from "../common/index.esm.js";
4
+ import Be from "../capsule/index.esm.js";
4
5
  import { LocaleService as $ } from "../locale/index.esm.js";
5
- import Be from "../response-toolbar/index.esm.js";
6
+ import Ie from "../response-toolbar/index.esm.js";
6
7
  import "bignumber.js";
7
8
  import "lodash-es";
8
9
  import Q from "../section/index.esm.js";
9
- import { BaseControlProperty as Ie } from "../property-panel/index.esm.js";
10
- const Pe = {
10
+ import { BaseControlProperty as Pe } from "../property-panel/index.esm.js";
11
+ const Oe = {
11
12
  /** 标签页头部区域的展示类型 */
12
13
  tabType: { type: String, default: "default" },
13
14
  /** 标题自适应宽度 */
@@ -28,198 +29,217 @@ const Pe = {
28
29
  fill: { type: Boolean, default: !1 },
29
30
  justifyContent: { type: String, default: "left" },
30
31
  /** 控制是否可见 */
31
- visible: { type: Boolean, default: !0 }
32
+ visible: { type: Boolean, default: !0 },
33
+ showHeader: { type: Boolean, default: !0 },
34
+ /** 标签页选中前事件 */
35
+ beforeTabSelect: { type: Function, default: null }
32
36
  };
33
- function Oe(e, t, l) {
34
- const r = S([]), o = S(e.activeId || "");
35
- let c = "";
36
- const b = S(!0), d = S([]), v = S(!0), f = S(0), h = y(() => {
37
- const s = r.value.find((a) => a.props.id === o.value);
38
- return (s == null ? void 0 : s.props.toolbarPosition) === "inHead";
37
+ function Ze() {
38
+ function e(t, l, r) {
39
+ const s = {};
40
+ return s.beforeTabSelect = (a) => l.call("beforeTabSelect", t, [a, t], r), s;
41
+ }
42
+ return {
43
+ resolve: e
44
+ };
45
+ }
46
+ function je(e, t, l) {
47
+ const r = new Ce(), s = S([]), a = S(e.activeId || "");
48
+ let u = "";
49
+ const b = S(!0), f = S([]), v = S(!0), h = S(0), C = y(() => {
50
+ const n = s.value.find((d) => d.props.id === a.value);
51
+ return (n == null ? void 0 : n.props.toolbarPosition) === "inHead";
39
52
  });
40
- function C(s, n = !0) {
41
- const a = s.findIndex((g) => g.props.show !== !1 && !g.props.disabled);
42
- if (d.value = [], a !== -1) {
43
- if (o.value = s[a].props.id, !n)
53
+ function T(n, o = !0) {
54
+ const d = n.findIndex((g) => g.props.show !== !1 && !g.props.disabled);
55
+ if (d !== -1) {
56
+ if (a.value = n[d].props.id, !o)
44
57
  return;
45
- const g = s[a];
46
- g && g.props.toolbar && g.props.toolbar.buttons && g.props.toolbar.buttons.length && (d.value = [...g.props.toolbar.buttons], v.value = g.props.toolbarVisible);
58
+ f.value = [];
59
+ const g = n[d];
60
+ g && g.props.toolbar && g.props.toolbar.buttons && g.props.toolbar.buttons.length && (f.value = [...g.props.toolbar.buttons], v.value = g.props.toolbarVisible);
47
61
  }
48
62
  }
49
- function T(s) {
50
- o.value = s;
51
- const n = r.value.find((a) => a.props.id === s);
52
- d.value = [], n && n.props.toolbar && n.props.toolbar.buttons && n.props.toolbar.buttons.length && (d.value = [...n.props.toolbar.buttons], v.value = n.props.toolbarVisible), t.emit("update:activeId", s), t.emit("tabChange", {
53
- prevId: c,
54
- nextId: o.value
63
+ function B(n) {
64
+ a.value = n;
65
+ const o = s.value.find((d) => d.props.id === n);
66
+ f.value = [], o && o.props.toolbar && o.props.toolbar.buttons && o.props.toolbar.buttons.length && (f.value = [...o.props.toolbar.buttons], v.value = o.props.toolbarVisible), t.emit("update:activeId", n), t.emit("tabChange", {
67
+ prevId: u,
68
+ nextId: a.value
55
69
  });
56
70
  }
57
- function P(s) {
58
- let n = -1;
59
- if (!o.value) {
60
- if (n = s.findIndex((a) => o.value === a.props.id && a.props.show !== !1 && !a.props.disabled), n > -1)
71
+ async function O(n) {
72
+ var H;
73
+ let o = -1;
74
+ if (!a.value) {
75
+ if (o = n.findIndex((L) => a.value === L.props.id && L.props.show !== !1 && !L.props.disabled), o > -1)
61
76
  return;
62
- c = o.value;
77
+ u = a.value;
63
78
  }
64
- C(s, !1), T(o.value);
79
+ T(n, !1);
80
+ const d = await ((H = e.beforeTabSelect) == null ? void 0 : H.call(e, {
81
+ prevId: u,
82
+ nextId: a.value
83
+ }));
84
+ (typeof d == "boolean" ? d : (d == null ? void 0 : d.canSelect) ?? !0) ? B(a.value) : (a.value = u, typeof d != "boolean" && d.message && (r == null || r.warning({ message: d.message, position: "top-center" })));
65
85
  }
66
- function I(s) {
67
- let n = !1;
68
- if (s) {
69
- const a = r.value.find((g) => g.props.id === s);
70
- n = !a || a.props.show === !1 || a.props.disabled === !0;
86
+ function i(n) {
87
+ let o = !1;
88
+ if (n) {
89
+ const d = s.value.find((g) => g.props.id === n);
90
+ o = !d || d.props.show === !1 || d.props.disabled === !0;
71
91
  }
72
- n ? P(r.value) : (o.value !== s && (c = o.value, o.value = s), T(o.value));
92
+ o ? O(s.value) : (a.value !== n && (u = a.value, a.value = n), B(a.value));
73
93
  }
74
- R(() => e.activeId, (s, n) => {
75
- s !== n && e.activeId !== o.value && I(s);
94
+ R(() => e.activeId, (n, o) => {
95
+ n !== o && e.activeId !== a.value && i(n);
76
96
  });
77
- function i(s) {
78
- var a;
97
+ function m(n) {
98
+ var d;
79
99
  if (e.autoTitleWidth)
80
100
  return;
81
- const n = (a = s.value) == null ? void 0 : a.querySelectorAll(".st-tab-text");
82
- if (!(!n || e.tabType === "pill"))
83
- for (let g = 0; g < n.length; g++) {
84
- const k = n[g].parentNode;
85
- n[g].scrollWidth > k.offsetWidth ? n[g].classList.contains("farris-title-text-custom") || n[g].classList.add("farris-title-text-custom") : n[g].classList.remove("farris-title-text-custom");
101
+ const o = (d = n.value) == null ? void 0 : d.querySelectorAll(".st-tab-text");
102
+ if (!(!o || e.tabType === "pill"))
103
+ for (let g = 0; g < o.length; g++) {
104
+ const H = o[g].parentNode;
105
+ o[g].scrollWidth > H.offsetWidth ? o[g].classList.contains("farris-title-text-custom") || o[g].classList.add("farris-title-text-custom") : o[g].classList.remove("farris-title-text-custom");
86
106
  }
87
107
  }
88
- const m = (s) => {
89
- s.preventDefault(), s.stopPropagation();
108
+ const x = (n) => {
109
+ n.preventDefault(), n.stopPropagation();
90
110
  };
91
- function x(s, n, a = !1) {
92
- const g = r.value.findIndex((k) => k.props.id === n);
93
- r.value = r.value.filter((k) => k.props.id !== n), o.value === n && (c = n, o.value = "", C(r.value)), m(s), V(() => {
94
- f.value++, i(l), a && (b.value = !0), t.emit("tabRemove", {
111
+ function p(n, o, d = !1) {
112
+ const g = s.value.findIndex((H) => H.props.id === o);
113
+ s.value = s.value.filter((H) => H.props.id !== o), a.value === o && (u = o, a.value = "", T(s.value)), x(n), V(() => {
114
+ h.value++, m(l), d && (b.value = !0), t.emit("tabRemove", {
95
115
  removeIndex: g,
96
- removeId: n,
97
- activeId: o.value
116
+ removeId: o,
117
+ activeId: a.value
98
118
  });
99
119
  });
100
120
  }
101
- function p(s, n = !0) {
102
- o.value === s && (o.value = "", c = s, I("")), V(() => {
103
- f.value++, n && (b.value = !0);
121
+ function P(n, o = !0) {
122
+ a.value === n && (a.value = "", u = n, i("")), V(() => {
123
+ h.value++, o && (b.value = !0);
104
124
  });
105
125
  }
106
- let B;
107
- function O(s) {
108
- B = s;
126
+ let I;
127
+ function j(n) {
128
+ I = n;
109
129
  }
110
- function j(s) {
111
- o.value !== s && (c = o.value, T(s), B && B());
130
+ function A(n) {
131
+ a.value !== n && (u = a.value, B(n), I && I());
112
132
  }
113
- function A(s) {
114
- r.value.findIndex((a) => a.props.id === s.props.id) === -1 && r.value.push(s), f.value++;
133
+ function M(n) {
134
+ s.value.findIndex((d) => d.props.id === n.props.id) === -1 && s.value.push(n), h.value++;
115
135
  }
116
- function M(s) {
117
- r.value.findIndex((a) => a.props.id === s.props.id) !== -1 && (r.value.forEach((a) => {
118
- a.props.id === s.props.id && (a = s);
119
- }), s.props.id === o.value && h.value, V(() => {
120
- f.value++, i(l);
136
+ function F(n) {
137
+ s.value.findIndex((d) => d.props.id === n.props.id) !== -1 && (s.value.forEach((d) => {
138
+ d.props.id === n.props.id && (d = n);
139
+ }), n.props.id === a.value && C.value, V(() => {
140
+ h.value++, m(l);
121
141
  }));
122
142
  }
123
143
  return {
124
- activeId: o,
125
- addTab: A,
126
- changeTitleStyle: i,
127
- removeTab: x,
128
- selectTab: j,
129
- tabPages: r,
130
- updateTab: M,
131
- toolbarItems: d,
132
- needUpdateNavigationLayout: f,
133
- checkActiveIdAndSelect: I,
134
- toggleShowTab: p,
135
- hasInHeadClass: h,
136
- setScrollToSelectedTabFunction: O,
144
+ activeId: a,
145
+ addTab: M,
146
+ changeTitleStyle: m,
147
+ removeTab: p,
148
+ selectTab: A,
149
+ tabPages: s,
150
+ updateTab: F,
151
+ toolbarItems: f,
152
+ needUpdateNavigationLayout: h,
153
+ checkActiveIdAndSelect: i,
154
+ toggleShowTab: P,
155
+ hasInHeadClass: C,
156
+ setScrollToSelectedTabFunction: j,
137
157
  toolbarVisible: v
138
158
  };
139
159
  }
140
- function je(e, t, l, r, o) {
160
+ function He(e, t, l, r, s) {
141
161
  const {
142
- activeId: c,
143
- removeTab: b,
144
- selectTab: d
145
- } = o, v = y(() => {
162
+ activeId: a,
163
+ removeTab: u,
164
+ selectTab: b
165
+ } = s, f = y(() => {
146
166
  const p = {
147
167
  "st-tab-text": !0,
148
168
  "text-truncate": e.tabType === "pill" && !e.autoTitleWidth,
149
169
  "farris-title-auto": e.autoTitleWidth
150
170
  };
151
- return Ce(p, t.customTitleClass);
152
- }), f = y(() => ({
171
+ return Se(p, t.customTitleClass);
172
+ }), v = y(() => ({
153
173
  "nav-item": !0,
154
174
  "d-none": t.show !== void 0 ? !t.show : !1,
155
- "f-state-active": t.id === c.value,
175
+ "f-state-active": t.id === a.value,
156
176
  "f-state-disabled": t.disabled
157
177
  })), h = y(() => ({
158
178
  width: `${t.tabWidth}px`
159
179
  })), C = y(() => ({
160
180
  "nav-link": !0,
161
181
  "tabs-text-truncate": !0,
162
- active: t.id === c.value,
182
+ active: t.id === a.value,
163
183
  disabled: t.disabled
164
184
  })), T = be({
165
185
  content: t.title,
166
186
  overflowShown: !0
167
187
  });
168
- function P() {
169
- return e.tabType !== "pill" && !e.autoTitleWidth ? Z(u("span", {
170
- class: v.value,
188
+ function B() {
189
+ return e.tabType !== "pill" && !e.autoTitleWidth ? Z(c("span", {
190
+ class: f.value,
171
191
  "data-tabid": t.id
172
- }, [t.title]), [[pe("tooltip"), T]]) : u("span", {
173
- class: v.value,
192
+ }, [t.title]), [[pe("tooltip"), T]]) : c("span", {
193
+ class: f.value,
174
194
  "data-tabid": t.id,
175
195
  title: t.title
176
196
  }, [t.title]);
177
197
  }
178
- const I = S(t.removeable);
198
+ const O = S(t.removeable);
179
199
  function i() {
180
- return I.value ? u("span", {
200
+ return O.value ? c("span", {
181
201
  class: "st-drop-close",
182
- onClick: (p) => b(p, t.id)
183
- }, [u("i", {
202
+ onClick: (p) => u(p, t.id)
203
+ }, [c("i", {
184
204
  class: "f-icon f-icon-close"
185
205
  }, null)]) : "";
186
206
  }
187
207
  function m(p) {
188
- d(t.id), e.tabType === "one-page" && r.scrollToByPaggId(t.id);
208
+ b(t.id), e.tabType === "one-page" && r.scrollToByPaggId(t.id);
189
209
  }
190
210
  function x() {
191
- return l.slots.title ? u("a", {
211
+ return l.slots.title ? c("a", {
192
212
  class: C.value,
193
213
  onClick: m,
194
214
  id: `${t.id}-design-item`
195
- }, [l.slots.title(l), i()]) : t.titleRenderFunction ? u("a", {
215
+ }, [l.slots.title(l), i()]) : t.titleRenderFunction ? c("a", {
196
216
  class: C.value,
197
217
  onClick: m,
198
218
  id: `${t.id}-design-item`
199
- }, [t.titleRenderFunction(), i()]) : u("a", {
219
+ }, [t.titleRenderFunction(), i()]) : c("a", {
200
220
  class: C.value,
201
221
  onClick: m,
202
222
  id: `${t.id}-design-item`
203
- }, [P(), i()]);
223
+ }, [B(), i()]);
204
224
  }
205
- return u("li", {
206
- class: f.value,
225
+ return c("li", {
226
+ class: v.value,
207
227
  style: h.value
208
228
  }, [x()]);
209
229
  }
210
- function He(e, t, l, r, o) {
230
+ function ke(e, t, l, r, s) {
211
231
  const {
212
- shouldShowNavigationButtons: c
232
+ shouldShowNavigationButtons: a
213
233
  } = l, {
214
- tabPages: b
215
- } = o, d = y(() => ({
234
+ tabPages: u
235
+ } = s, b = y(() => ({
216
236
  spacer: !0,
217
237
  "f-utils-fill": !0,
218
- "spacer-sides-dropdown": c.value
219
- })), v = y(() => ({
238
+ "spacer-sides-dropdown": a.value
239
+ })), f = y(() => ({
220
240
  width: "100%",
221
241
  "justify-content": e.justifyContent
222
- })), f = y(() => ({
242
+ })), v = y(() => ({
223
243
  nav: !0,
224
244
  "farris-nav-tabs": !0,
225
245
  "flex-nowrap": !0,
@@ -228,22 +248,22 @@ function He(e, t, l, r, o) {
228
248
  "flex-row": e.position === "top" || e.position === "bottom",
229
249
  "flex-column": e.position === "left" || e.position === "right"
230
250
  }));
231
- return () => u("div", {
232
- class: d.value,
233
- style: v.value
234
- }, [u("ul", {
235
- class: f.value,
251
+ return () => c("div", {
252
+ class: b.value,
253
+ style: f.value
254
+ }, [c("ul", {
255
+ class: v.value,
236
256
  ref: t
237
- }, [b.value.map((h) => je(e, h.props, h, r, o))])]);
257
+ }, [u.value.map((h) => He(e, h.props, h, r, s))])]);
238
258
  }
239
- function Me(e, t, l, r, o) {
240
- const c = S(), {
241
- shouldShowNavigationButtons: b
259
+ function Me(e, t, l, r, s) {
260
+ const a = S(), {
261
+ shouldShowNavigationButtons: u
242
262
  } = l, {
243
- activeId: d,
244
- tabPages: v,
245
- selectTab: f
246
- } = o, h = S(d.value), C = y(() => v.value.map((i) => ({
263
+ activeId: b,
264
+ tabPages: f,
265
+ selectTab: v
266
+ } = s, h = S(b.value), C = y(() => f.value.map((i) => ({
247
267
  name: i.props.title,
248
268
  value: i.props.id,
249
269
  show: i.props.show,
@@ -251,70 +271,70 @@ function Me(e, t, l, r, o) {
251
271
  }))), T = y(() => ({
252
272
  spacer: !0,
253
273
  "f-utils-fill": !0,
254
- "spacer-sides-dropdown": b.value
255
- })), P = y(() => ({
274
+ "spacer-sides-dropdown": u.value
275
+ })), B = y(() => ({
256
276
  width: "100%",
257
277
  display: "flex",
258
278
  "justify-content": e.justifyContent
259
279
  }));
260
280
  N(() => {
261
- c.value && (t.value = c.value.$el);
281
+ a.value && (t.value = a.value.$el);
262
282
  });
263
- function I(i) {
264
- f(i);
283
+ function O(i) {
284
+ v(i);
265
285
  }
266
- return R(() => d.value, (i) => {
286
+ return R(() => b.value, (i) => {
267
287
  i !== h.value && (h.value = i);
268
288
  }, {
269
289
  immediate: !0
270
- }), () => u("div", {
290
+ }), () => c("div", {
271
291
  class: T.value,
272
- style: P.value
273
- }, [u(xe, {
292
+ style: B.value
293
+ }, [c(Be, {
274
294
  items: C.value,
275
295
  modelValue: h.value,
276
296
  "onUpdate:modelValue": (i) => h.value = i,
277
- onChange: I,
278
- ref: c
297
+ onChange: O,
298
+ ref: a
279
299
  }, null)]);
280
300
  }
281
- function ke(e, t, l, r) {
282
- const o = S(), {
283
- activeId: c,
284
- removeTab: b,
285
- tabPages: d,
286
- selectTab: v
301
+ function Re(e, t, l, r) {
302
+ const s = S(), {
303
+ activeId: a,
304
+ removeTab: u,
305
+ tabPages: b,
306
+ selectTab: f
287
307
  } = r, {
288
- hideDropDown: f,
308
+ hideDropDown: v,
289
309
  searchTabText: h
290
310
  } = t, C = 600;
291
311
  let T = null;
292
- const P = y(() => {
293
- var a, g;
312
+ const B = y(() => {
313
+ var o, d;
294
314
  let n = [];
295
- return e.searchBoxVisible ? n = (a = d.value) == null ? void 0 : a.filter((k) => k.props.title.includes(h.value)) : n = (g = d.value) == null ? void 0 : g.slice(), n;
296
- }), I = y(() => ({
315
+ return e.searchBoxVisible ? n = (o = b.value) == null ? void 0 : o.filter((g) => g.props.title.includes(h.value)) : n = (d = b.value) == null ? void 0 : d.slice(), n;
316
+ }), O = y(() => ({
297
317
  "dropdown-menu": !0,
298
318
  "tabs-pt28": e.searchBoxVisible,
299
319
  // 未看到样式定义
300
- show: !f.value,
301
- "d-none": f.value
320
+ show: !v.value,
321
+ "d-none": v.value
302
322
  }));
303
323
  let i;
304
324
  function m(n) {
305
325
  i = n;
306
326
  }
307
- R(f, (n) => {
327
+ R(v, (n) => {
308
328
  if (i.value)
309
329
  if (n)
310
- o.value.style.width = null;
330
+ s.value.style.width = null;
311
331
  else {
312
- const a = i.value.querySelector(".farris-tabs-header"), g = i.value.clientHeight - a.clientHeight - 20, F = a.querySelector(".farris-tabs-title").clientWidth - 20;
313
- o.value.style.maxWidth = F + "px", o.value.style.maxHeight = g + "px", V(() => {
332
+ const o = i.value.querySelector(".farris-tabs-header"), d = i.value.clientHeight - o.clientHeight - 20, H = o.querySelector(".farris-tabs-title").clientWidth - 20;
333
+ s.value.style.maxWidth = H + "px", s.value.style.maxHeight = d + "px", V(() => {
314
334
  const {
315
335
  width: L
316
- } = o.value.getClientRects()[0];
317
- o.value.style.width = L ? L + "px" : null;
336
+ } = s.value.getClientRects()[0];
337
+ s.value.style.width = L ? L + "px" : null;
318
338
  });
319
339
  }
320
340
  });
@@ -324,213 +344,213 @@ function ke(e, t, l, r) {
324
344
  "text-truncate": !0,
325
345
  "px-2": !0,
326
346
  disabled: n.props.disabled,
327
- active: n.props.id === c.value,
347
+ active: n.props.id === a.value,
328
348
  "d-none": n.props.show !== !0
329
349
  };
330
350
  }
331
351
  function p(n) {
332
352
  n.preventDefault(), n.stopPropagation();
333
353
  }
334
- function B() {
354
+ function P() {
335
355
  T && clearTimeout(T);
336
356
  }
337
- function O() {
338
- f.value || (T = setTimeout(() => {
339
- f.value = !0;
357
+ function I() {
358
+ v.value || (T = setTimeout(() => {
359
+ v.value = !0;
340
360
  }, C));
341
361
  }
342
- function j(n, a) {
343
- n.stopPropagation(), a.disabled || v(a.id), f.value = !0;
362
+ function j(n, o) {
363
+ n.stopPropagation(), o.disabled || f(o.id), v.value = !0;
344
364
  }
345
- function A(n, a) {
346
- n.stopPropagation(), b(n, a, !0);
365
+ function A(n, o) {
366
+ n.stopPropagation(), u(n, o, !0);
347
367
  }
348
368
  function M(n) {
349
- return n.slots.title ? u("a", {
369
+ return n.slots.title ? c("a", {
350
370
  class: "dropdown-title",
351
371
  id: `${n.props.id}-dropdown-item`
352
- }, [n.slots.title(n)]) : n.props.titleRenderFunction ? u("a", {
372
+ }, [n.slots.title(n)]) : n.props.titleRenderFunction ? c("a", {
353
373
  class: "dropdown-title",
354
374
  id: `${n.props.id}-dropdown-item`
355
- }, [n.props.titleRenderFunction()]) : u("a", {
375
+ }, [n.props.titleRenderFunction()]) : c("a", {
356
376
  class: "dropdown-title",
357
377
  id: `${n.props.id}-dropdown-item`
358
378
  }, [n.props.title]);
359
379
  }
360
- function s() {
361
- return u("div", {
362
- ref: o,
363
- class: I.value,
364
- onMouseenter: () => B(),
365
- onMouseleave: () => O()
366
- }, [e.searchBoxVisible && u("div", {
380
+ function F() {
381
+ return c("div", {
382
+ ref: s,
383
+ class: O.value,
384
+ onMouseenter: () => P(),
385
+ onMouseleave: () => I()
386
+ }, [e.searchBoxVisible && c("div", {
367
387
  onClick: (n) => p(n),
368
388
  class: "pb-1 tabs-li-absolute"
369
- }, [Z(u("input", {
389
+ }, [Z(c("input", {
370
390
  type: "text",
371
391
  class: "form-control",
372
392
  "onUpdate:modelValue": (n) => h.value = n
373
- }, null), [[he, h.value]]), u("span", {
393
+ }, null), [[he, h.value]]), c("span", {
374
394
  class: "f-icon f-icon-page-title-query tabs-icon-search"
375
- }, null)]), P.value.length ? u("ul", {
395
+ }, null)]), B.value.length ? c("ul", {
376
396
  class: "tab-dropdown-menu--items flex-fill"
377
- }, [P.value.map((n) => u("li", {
397
+ }, [B.value.map((n) => c("li", {
378
398
  class: x(n),
379
- onClick: (a) => j(a, n.props)
380
- }, [n.props.removeable && n.props.disabled !== !0 && u("span", {
399
+ onClick: (o) => j(o, n.props)
400
+ }, [n.props.removeable && n.props.disabled !== !0 && c("span", {
381
401
  class: "float-right st-drop-close",
382
- onClick: (a) => A(a, n.props.id)
383
- }, [u("i", {
402
+ onClick: (o) => A(o, n.props.id)
403
+ }, [c("i", {
384
404
  class: "f-icon f-icon-close"
385
- }, null)]), M(n)]))]) : u("div", {
405
+ }, null)]), M(n)]))]) : c("div", {
386
406
  class: "dropdown-no-data"
387
407
  }, [$.getLocaleValue("tabs.noData")])]);
388
408
  }
389
409
  return {
390
- renderDropdownMenu: s,
410
+ renderDropdownMenu: F,
391
411
  setTabsRef: m
392
412
  };
393
413
  }
394
- function Re(e, t, l, r) {
414
+ function Ae(e, t, l, r) {
395
415
  const {
396
- hideDropDown: o
416
+ hideDropDown: s
397
417
  } = t, {
398
- renderDropdownMenu: c,
399
- setTabsRef: b
400
- } = ke(e, t, l, r), d = S(e.showDropdown);
401
- function v() {
402
- return d.value && u(me, null, [u("button", {
418
+ renderDropdownMenu: a,
419
+ setTabsRef: u
420
+ } = Re(e, t, l, r), b = S(e.showDropdown);
421
+ function f() {
422
+ return b.value && c(me, null, [c("button", {
403
423
  class: "btn dropdown-toggle-split dropdown-toggle",
404
424
  onClick: () => {
405
- o.value = !1;
425
+ s.value = !1;
406
426
  }
407
- }, null), c()]);
427
+ }, null), a()]);
408
428
  }
409
429
  return {
410
- renderMorePagesButtton: v,
411
- setTabsRef: b
430
+ renderMorePagesButtton: f,
431
+ setTabsRef: u
412
432
  };
413
433
  }
414
- function Ae(e, t, l, r) {
415
- const o = S(!1), { selectTab: c, tabPages: b, needUpdateNavigationLayout: d, activeId: v } = r, f = 4, h = y(() => ({
434
+ function Ve(e, t, l, r) {
435
+ const s = S(!1), { selectTab: a, tabPages: u, needUpdateNavigationLayout: b, activeId: f } = r, v = 4, h = y(() => ({
416
436
  btn: !0,
417
437
  "sc-nav-btn": !0,
418
438
  "px-1": !0,
419
439
  "sc-nav-lr": !0,
420
- "d-none": !o.value
440
+ "d-none": !s.value
421
441
  })), C = y(() => ({
422
442
  "btn-group": !0,
423
443
  "sc-nav-btn": !0,
424
444
  dropdown: !0,
425
- "d-none": !o.value
445
+ "d-none": !s.value
426
446
  })), T = y(() => ({
427
447
  btn: !0,
428
448
  "sc-nav-rg": !0,
429
- "d-none": !o.value
449
+ "d-none": !s.value
430
450
  }));
431
- function P(p, B) {
451
+ function B(p, P) {
432
452
  if (!t.value)
433
453
  return;
434
- const O = t.value.scrollLeft, j = t.value.scrollWidth - t.value.offsetWidth;
435
- if (B > 0) {
454
+ const I = t.value.scrollLeft, j = t.value.scrollWidth - t.value.offsetWidth;
455
+ if (P > 0) {
436
456
  if (t.value.scrollLeft >= j)
437
457
  return;
438
- t.value.scrollLeft = O + e.scrollStep + p;
439
- } else if (B < 0) {
458
+ t.value.scrollLeft = I + e.scrollStep + p;
459
+ } else if (P < 0) {
440
460
  if (t.value.scrollLeft <= 0)
441
461
  return;
442
- t.value.scrollLeft = O - e.scrollStep - p;
462
+ t.value.scrollLeft = I - e.scrollStep - p;
443
463
  }
444
464
  }
445
- function I(p = -1) {
446
- if (!o.value || !t.value)
465
+ function O(p = -1) {
466
+ if (!s.value || !t.value)
447
467
  return;
448
- p < 0 && (p = b.value.findIndex((M) => M.props.id === v.value));
449
- const B = e.tabType === "pills" ? ".f-capsule-item" : ".nav-item", O = t.value.querySelectorAll(B), { parentElement: j } = t.value, A = O[p];
468
+ p < 0 && (p = u.value.findIndex((M) => M.props.id === f.value));
469
+ const P = e.tabType === "pills" ? ".f-capsule-item" : ".nav-item", I = t.value.querySelectorAll(P), { parentElement: j } = t.value, A = I[p];
450
470
  if (A && j) {
451
- const M = j.getBoundingClientRect().left, s = j.getBoundingClientRect().right, n = A.getBoundingClientRect().left, a = A.getBoundingClientRect().right;
452
- n < M ? P(M - n, -1) : s < a && P(a - s, 1), e.tabType === "one-page" && l.scrollTo(p);
471
+ const M = j.getBoundingClientRect().left, F = j.getBoundingClientRect().right, n = A.getBoundingClientRect().left, o = A.getBoundingClientRect().right;
472
+ n < M ? B(M - n, -1) : F < o && B(o - F, 1), e.tabType === "one-page" && l.scrollTo(p);
453
473
  }
454
474
  }
455
475
  function i() {
456
- var O;
476
+ var I;
457
477
  if (!t.value)
458
478
  return;
459
- const p = t.value, B = (O = t.value) == null ? void 0 : O.parentElement;
460
- o.value = B && p && B.offsetWidth < p.scrollWidth - f, o.value && V(() => {
461
- I();
479
+ const p = t.value, P = (I = t.value) == null ? void 0 : I.parentElement;
480
+ s.value = P && p && P.offsetWidth < p.scrollWidth - v, s.value && V(() => {
481
+ O();
462
482
  });
463
483
  }
464
484
  function m(p) {
465
- p.disabled || c(p.id);
485
+ p.disabled || a(p.id);
466
486
  }
467
487
  function x() {
468
488
  ["default", "one-page"].indexOf(e.tabType) > -1 && V(() => {
469
- I();
489
+ O();
470
490
  });
471
491
  }
472
- return R(d, () => {
492
+ return R(b, () => {
473
493
  i();
474
494
  }), {
475
495
  previousButtonClass: h,
476
496
  nextButtonGroupClass: C,
477
497
  nextButtonClass: T,
478
- scrollTab: P,
498
+ scrollTab: B,
479
499
  selectAndScrollToTab: m,
480
- shouldShowNavigationButtons: o,
500
+ shouldShowNavigationButtons: s,
481
501
  updateNavigationLayout: i,
482
502
  scrollToSelectedTab: x
483
503
  };
484
504
  }
485
- function Ve(e, t) {
486
- const { tabPages: l } = t, r = S(""), o = S(!0), c = y(() => e.searchBoxVisible), b = y(() => c.value ? l.value.filter((v) => v.props.title.includes(r.value)) : l.value.slice());
487
- return R(o, (d) => {
488
- d || (r.value = "");
505
+ function Fe(e, t) {
506
+ const { tabPages: l } = t, r = S(""), s = S(!0), a = y(() => e.searchBoxVisible), u = y(() => a.value ? l.value.filter((f) => f.props.title.includes(r.value)) : l.value.slice());
507
+ return R(s, (b) => {
508
+ b || (r.value = "");
489
509
  }), {
490
510
  searchTabText: r,
491
- hideDropDown: o,
492
- shouldShowSearchBox: c,
493
- tabsInDropdownMenu: b
511
+ hideDropDown: s,
512
+ shouldShowSearchBox: a,
513
+ tabsInDropdownMenu: u
494
514
  };
495
515
  }
496
- function Fe(e, t, l) {
497
- const r = ".farris-tab-page", { tabPages: o } = l;
498
- function c(d) {
499
- const v = t.value;
500
- if (v) {
501
- const f = t.value.querySelectorAll(r);
502
- if (f.length > 0) {
503
- const h = f[d], { offsetTop: C } = h, T = C - 32 > 0 ? C - 32 : 0;
504
- v.scrollTop = T;
516
+ function Le(e, t, l) {
517
+ const r = ".farris-tab-page", { tabPages: s } = l;
518
+ function a(b) {
519
+ const f = t.value;
520
+ if (f) {
521
+ const v = t.value.querySelectorAll(r);
522
+ if (v.length > 0) {
523
+ const h = v[b], { offsetTop: C } = h, T = C - 32 > 0 ? C - 32 : 0;
524
+ f.scrollTop = T;
505
525
  }
506
526
  }
507
527
  }
508
- function b(d) {
509
- const v = o.value.findIndex((f) => f.props.id === d);
510
- v > -1 && c(v);
528
+ function u(b) {
529
+ const f = s.value.findIndex((v) => v.props.id === b);
530
+ f > -1 && a(f);
511
531
  }
512
- return { scrollTo: c, scrollToByPaggId: b };
532
+ return { scrollTo: a, scrollToByPaggId: u };
513
533
  }
514
- const Le = ["moz", "ms", "webkit"];
515
- function De() {
534
+ const De = ["moz", "ms", "webkit"];
535
+ function We() {
516
536
  let e = 0;
517
537
  return (t) => {
518
- const l = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (l - e)), o = setTimeout(() => {
538
+ const l = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (l - e)), s = setTimeout(() => {
519
539
  t(l + r);
520
540
  }, r);
521
- return e = l + r, o;
541
+ return e = l + r, s;
522
542
  };
523
543
  }
524
- function We() {
544
+ function Ee() {
525
545
  if (typeof window > "u")
526
546
  return () => 0;
527
547
  if (window.requestAnimationFrame)
528
548
  return window.requestAnimationFrame.bind(window);
529
- const e = Le.filter((t) => `${t}RequestAnimationFrame` in window)[0];
530
- return e ? window[`${e}RequestAnimationFrame`] : De();
549
+ const e = De.filter((t) => `${t}RequestAnimationFrame` in window)[0];
550
+ return e ? window[`${e}RequestAnimationFrame`] : We();
531
551
  }
532
- We();
533
- function Ee() {
552
+ Ee();
553
+ function qe() {
534
554
  const e = navigator.userAgent || navigator.vendor || window.opera, t = [
535
555
  /iPhone/i,
536
556
  /iPod/i,
@@ -550,57 +570,57 @@ function Ee() {
550
570
  /Kindle/i,
551
571
  /Silk/i
552
572
  ];
553
- for (const d of l)
554
- if (d.test(e))
573
+ for (const b of l)
574
+ if (b.test(e))
555
575
  return !1;
556
- for (const d of t)
557
- if (d.test(e))
576
+ for (const b of t)
577
+ if (b.test(e))
558
578
  return !0;
559
- const r = "ontouchstart" in window || navigator.maxTouchPoints > 0, o = screen.width, c = screen.height, b = Math.min(o, c);
560
- return !!(r && b <= 768);
579
+ const r = "ontouchstart" in window || navigator.maxTouchPoints > 0, s = screen.width, a = screen.height, u = Math.min(s, a);
580
+ return !!(r && u <= 768);
561
581
  }
562
582
  const q = /* @__PURE__ */ ee({
563
583
  name: "FTabs",
564
- props: Pe,
584
+ props: Oe,
565
585
  emits: ["tabChange", "tabRemove", "update:activeId", "Click"],
566
586
  setup(e, t) {
567
- const l = S(e.tabType), r = E(), o = Ee(), c = S(e.customClass), b = E(), d = E(), v = S(), f = Oe(e, t, b), {
587
+ const l = S(e.tabType), r = E(), s = qe(), a = S(e.customClass), u = E(), b = E(), f = S(), v = je(e, t, u), {
568
588
  activeId: h,
569
589
  changeTitleStyle: C,
570
590
  tabPages: T,
571
- addTab: P,
572
- updateTab: I,
591
+ addTab: B,
592
+ updateTab: O,
573
593
  toolbarItems: i,
574
594
  checkActiveIdAndSelect: m,
575
595
  toggleShowTab: x,
576
596
  hasInHeadClass: p,
577
- toolbarVisible: B
578
- } = f, O = Fe(e, d, f), j = Ae(e, b, O, f), {
597
+ toolbarVisible: P
598
+ } = v, I = Le(e, b, v), j = Ve(e, u, I, v), {
579
599
  previousButtonClass: A,
580
600
  nextButtonClass: M,
581
- nextButtonGroupClass: s,
601
+ nextButtonGroupClass: F,
582
602
  scrollTab: n,
583
- updateNavigationLayout: a,
584
- scrollToSelectedTab: g
603
+ updateNavigationLayout: o,
604
+ scrollToSelectedTab: d
585
605
  } = j;
586
- f.setScrollToSelectedTabFunction(g);
587
- const k = Ve(e, f), F = He(e, b, j, O, f), L = F, te = Me(e, b, j, O, f), U = /* @__PURE__ */ new Map([["default", F], ["one-page", L], ["pills", te]]);
606
+ v.setScrollToSelectedTabFunction(d);
607
+ const g = Fe(e, v), H = ke(e, u, j, I, v), L = H, te = Me(e, u, j, I, v), U = /* @__PURE__ */ new Map([["default", H], ["one-page", L], ["pills", te]]);
588
608
  y(() => {
589
- const w = T.value.find((H) => H.props.id === h.value);
609
+ const w = T.value.find((k) => k.props.id === h.value);
590
610
  return w == null ? void 0 : w.slots;
591
611
  });
592
- const W = y(() => e.fill), z = (w, H) => {
593
- t.emit("Click", w, H, h.value);
612
+ const W = y(() => e.fill), z = (w, k) => {
613
+ t.emit("Click", w, k, h.value);
594
614
  };
595
615
  ge("tabs", {
596
616
  activeId: h,
597
- addTab: P,
598
- updateTab: I,
617
+ addTab: B,
618
+ updateTab: O,
599
619
  tabPages: T,
600
620
  tabType: l,
601
621
  shouldFillParentContaner: W,
602
622
  toggleShowTab: x,
603
- toolbarVisible: B,
623
+ toolbarVisible: P,
604
624
  clickToolbarItemHandler: z
605
625
  });
606
626
  let G = !1;
@@ -609,7 +629,8 @@ const q = /* @__PURE__ */ ee({
609
629
  "farris-tabs-inHead": p.value,
610
630
  "farris-tabs-inContent": !p.value,
611
631
  "farris-tabs-nav-fill": e.tabType === "fill",
612
- "farris-tabs-nav-pills": e.tabType === "pills"
632
+ "farris-tabs-nav-pills": e.tabType === "pills",
633
+ "d-none": e.showHeader === !1
613
634
  })), le = y(() => {
614
635
  const w = {
615
636
  width: p.value && e.titleWidth ? `${e.titleWidth}%` : ""
@@ -625,28 +646,28 @@ const q = /* @__PURE__ */ ee({
625
646
  "flex-row-reverse": e.position === "right",
626
647
  "one-page": e.tabType === "one-page"
627
648
  };
628
- return c.value && c.value.split(" ").reduce((H, D) => (H[D] = !0, H), w), w;
629
- }), ie = new ResizeObserver((w) => {
630
- w.length && a();
649
+ return a.value && a.value.split(" ").reduce((k, D) => (k[D] = !0, k), w), w;
650
+ }), se = new ResizeObserver((w) => {
651
+ w.length && o();
631
652
  });
632
653
  function _() {
633
- v.value && !G && (ie.observe(v.value), G = !0);
654
+ f.value && !G && (se.observe(f.value), G = !0);
634
655
  }
635
656
  R(() => e.visible, (w) => {
636
657
  V(() => {
637
- T.value.length && m(e.activeId || T.value[0].props.id), a(), C(b), _();
658
+ T.value.length && m(e.activeId || T.value[0].props.id), o(), C(u), _();
638
659
  });
639
660
  }), R(() => e.autoTitleWidth, (w) => {
640
661
  V(() => {
641
- a(), C(b);
662
+ o(), C(u);
642
663
  });
643
664
  }), N(() => {
644
665
  e.visible && (T.value.length && m(e.activeId || T.value[0].props.id), V(() => {
645
- a(), C(b);
666
+ o(), C(u);
646
667
  }), _());
647
668
  });
648
- function se() {
649
- return u("button", {
669
+ function ae() {
670
+ return c("button", {
650
671
  title: $.getLocaleValue("tabs.leftButton"),
651
672
  type: "button",
652
673
  class: A.value,
@@ -655,8 +676,8 @@ const q = /* @__PURE__ */ ee({
655
676
  }
656
677
  }, null);
657
678
  }
658
- function ae() {
659
- return u("button", {
679
+ function ie() {
680
+ return c("button", {
660
681
  title: $.getLocaleValue("tabs.rightButton"),
661
682
  type: "button",
662
683
  class: M.value,
@@ -668,37 +689,37 @@ const q = /* @__PURE__ */ ee({
668
689
  const {
669
690
  renderMorePagesButtton: re,
670
691
  setTabsRef: ue
671
- } = Re(e, k, j, f);
692
+ } = Ae(e, g, j, v);
672
693
  ue(r);
673
694
  function ce() {
674
- return i.value.length ? u("div", {
695
+ return i.value.length ? c("div", {
675
696
  class: {
676
697
  "farris-tabs-toolbar": !0,
677
- "d-none": !B.value
698
+ "d-none": !P.value
678
699
  }
679
- }, [u(Be, {
700
+ }, [c(Ie, {
680
701
  class: "f-utils-fill",
681
702
  alignment: p.value ? "right" : "left",
682
703
  items: i.value,
683
- visible: B.value,
704
+ visible: P.value,
684
705
  onClick: z
685
706
  }, null)]) : null;
686
707
  }
687
708
  const K = U.get(e.tabType) || U.get("default");
688
709
  function de() {
689
- var w, H, D, J;
690
- return u("div", {
710
+ var w, k, D, J;
711
+ return c("div", {
691
712
  class: ne.value
692
- }, [u("div", {
713
+ }, [c("div", {
693
714
  class: "farris-tabs-header-pre"
694
- }, [(H = (w = t.slots).headerPrefix) == null ? void 0 : H.call(w)]), u("div", {
715
+ }, [(k = (w = t.slots).headerPrefix) == null ? void 0 : k.call(w)]), c("div", {
695
716
  class: "farris-tabs-title scroll-tabs",
696
717
  style: le.value,
697
- ref: v
698
- }, [!o && se(), K && K(), u("div", {
699
- hidden: o,
700
- class: s.value
701
- }, [ae(), re()])]), ce(), u("div", {
718
+ ref: f
719
+ }, [!s && ae(), K && K(), c("div", {
720
+ hidden: s,
721
+ class: F.value
722
+ }, [ie(), re()])]), ce(), c("div", {
702
723
  class: "farris-tabs-header-post"
703
724
  }, [(J = (D = t.slots).headerSuffix) == null ? void 0 : J.call(D)])]);
704
725
  }
@@ -707,18 +728,18 @@ const q = /* @__PURE__ */ ee({
707
728
  "f-utils-fill-flex-column": W.value
708
729
  }));
709
730
  function ve() {
710
- var w, H;
711
- return u("div", {
731
+ var w, k;
732
+ return c("div", {
712
733
  class: fe.value,
713
- ref: d
714
- }, [(H = (w = t.slots).default) == null ? void 0 : H.call(w)]);
734
+ ref: b
735
+ }, [(k = (w = t.slots).default) == null ? void 0 : k.call(w)]);
715
736
  }
716
- return () => e.visible ? u("div", {
737
+ return () => e.visible ? c("div", {
717
738
  class: oe.value,
718
739
  ref: r
719
740
  }, [de(), ve()]) : null;
720
741
  }
721
- }), qe = {
742
+ }), $e = {
722
743
  tabWidth: { type: Number },
723
744
  id: { type: String, default: "" },
724
745
  customTitleClass: { type: String, default: "" },
@@ -746,22 +767,22 @@ function X(e) {
746
767
  }
747
768
  const Y = /* @__PURE__ */ ee({
748
769
  name: "FTabPage",
749
- props: qe,
770
+ props: $e,
750
771
  emits: [],
751
772
  setup(e, t) {
752
773
  const l = ye("tabs");
753
- Se();
754
- const r = S(e.show), o = {
774
+ xe();
775
+ const r = S(e.show), s = {
755
776
  slots: t.slots,
756
777
  props: e
757
- }, c = S((l == null ? void 0 : l.tabType.value) || "default");
778
+ }, a = S((l == null ? void 0 : l.tabType.value) || "default");
758
779
  N(() => {
759
780
  const i = l == null ? void 0 : l.tabPages.value.findIndex((m) => m.props.id === e.id);
760
- (!i || i === -1) && (l == null || l.addTab(o));
781
+ (!i || i === -1) && (l == null || l.addTab(s));
761
782
  }), Te(() => {
762
783
  });
763
- const b = y(() => (e == null ? void 0 : e.id) === (l == null ? void 0 : l.activeId.value)), d = y(() => ({
764
- display: b.value ? "" : "none"
784
+ const u = y(() => (e == null ? void 0 : e.id) === (l == null ? void 0 : l.activeId.value)), b = y(() => ({
785
+ display: u.value ? "" : "none"
765
786
  }));
766
787
  R(() => e, (i) => {
767
788
  l == null || l.updateTab({
@@ -774,27 +795,27 @@ const Y = /* @__PURE__ */ ee({
774
795
  }), R(() => e.show, (i) => {
775
796
  l == null || l.toggleShowTab(e.id);
776
797
  }), R(() => e.toolbarVisible, (i) => {
777
- b.value && l && (l.toolbarVisible.value = i);
798
+ u.value && l && (l.toolbarVisible.value = i);
778
799
  });
779
- function v() {
800
+ function f() {
780
801
  var m, x;
781
802
  const i = (x = (m = t.slots).default) == null ? void 0 : x.call(m);
782
- return u(Q, {
803
+ return c(Q, {
783
804
  "main-title": e.title,
784
805
  class: ["farris-tab-page", r.value ? "" : "f-tab-d-none"]
785
806
  }, X(i) ? i : {
786
807
  default: () => [i]
787
808
  });
788
809
  }
789
- function f(i, m) {
810
+ function v(i, m) {
790
811
  l && (l.activeId.value = e.id, l.clickToolbarItemHandler && l.clickToolbarItemHandler(i, m));
791
812
  }
792
813
  function h() {
793
814
  var m, x;
794
815
  const i = (x = (m = t.slots).default) == null ? void 0 : x.call(m);
795
- return u(Q, {
816
+ return c(Q, {
796
817
  customClass: "section-in-tab is-mobile",
797
- onClick: f,
818
+ onClick: v,
798
819
  visible: e.show,
799
820
  "main-title": e.title,
800
821
  buttons: e.toolbar.buttons,
@@ -809,22 +830,22 @@ const Y = /* @__PURE__ */ ee({
809
830
  return {
810
831
  "farris-tab-page": !0,
811
832
  "f-tab-d-none": !r.value,
812
- "f-tab-active": b.value && l && ((m = l.shouldFillParentContaner) == null ? void 0 : m.value)
833
+ "f-tab-active": u.value && l && ((m = l.shouldFillParentContaner) == null ? void 0 : m.value)
813
834
  };
814
835
  });
815
836
  function T() {
816
837
  var m, x;
817
838
  const i = (x = (m = t.slots).default) == null ? void 0 : x.call(m);
818
- return u("div", {
839
+ return c("div", {
819
840
  class: C.value,
820
- style: d.value
841
+ style: b.value
821
842
  }, [i]);
822
843
  }
823
- const I = (/* @__PURE__ */ new Map([["default", T], ["one-page", v], ["mobile", h]])).get(c.value) || T;
824
- return () => I();
844
+ const O = (/* @__PURE__ */ new Map([["default", T], ["one-page", f], ["mobile", h]])).get(a.value) || T;
845
+ return () => O();
825
846
  }
826
847
  });
827
- class Xe extends Ie {
848
+ class et extends Pe {
828
849
  constructor(t, l) {
829
850
  super(t, l);
830
851
  }
@@ -877,18 +898,18 @@ class Xe extends Ie {
877
898
  label: "onClick",
878
899
  name: "点击事件"
879
900
  }
880
- ], r = this, o = r.eventsEditorUtils.formProperties(t, r.viewModelId, l), c = r.createBaseEventProperty(o);
901
+ ], r = this, s = r.eventsEditorUtils.formProperties(t, r.viewModelId, l), a = r.createBaseEventProperty(s);
881
902
  this.propertyConfig.categories.eventsEditor = {
882
903
  title: "事件",
883
904
  hideTitle: !0,
884
- properties: c,
905
+ properties: a,
885
906
  // 这个属性,标记当属性变更得时候触发重新更新属性
886
907
  refreshPanelAfterChanged: !0,
887
908
  tabId: "commands",
888
909
  tabName: "交互",
889
- setPropertyRelates(b, d) {
890
- const v = b.propertyValue;
891
- delete t[r.viewModelId], v && (v.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(t, r.viewModelId, v.events, v));
910
+ setPropertyRelates(u, b) {
911
+ const f = u.propertyValue;
912
+ delete t[r.viewModelId], f && (f.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(t, r.viewModelId, f.events, f));
892
913
  }
893
914
  };
894
915
  }
@@ -899,8 +920,9 @@ q.install = (e) => {
899
920
  export {
900
921
  Y as FTabPage,
901
922
  q as FTabs,
902
- Xe as TabToolbarItemProperty,
923
+ et as TabToolbarItemProperty,
924
+ Ze as createTabsCallbackResolver,
903
925
  q as default,
904
- qe as tabPageProps,
905
- Pe as tabsProps
926
+ $e as tabPageProps,
927
+ Oe as tabsProps
906
928
  };