@fewangsit/wangsvue-fats 1.0.1-alpha.62 → 1.0.1-alpha.63

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.
@@ -87,7 +87,8 @@ export type TimelineItem = {
87
87
  _id: string;
88
88
  nickName: string;
89
89
  };
90
- detail?: KeyValue | DetailType;
90
+ // Detail can be a record of any type if using the detail slot
91
+ detail?: KeyValue | DetailType | SlotDetailType;
91
92
  };
92
93
 
93
94
  export type TimelineProps = {
@@ -124,6 +125,10 @@ export type TimelineSlots = {
124
125
  *
125
126
  */
126
127
  date(slotProps: { date: string }): VNode[];
128
+ /**
129
+ * Custom user template.
130
+ */
131
+ user(slotProps: { user: string; detail: DetailAnyRecord }): VNode[];
127
132
  };
128
133
 
129
134
  /**
@@ -1,4 +1,4 @@
1
- import { defineComponent as N, inject as V, createBlock as p, openBlock as t, unref as a, ref as A, normalizeClass as D, withCtx as b, createElementVNode as n, createElementBlock as l, createCommentVNode as c, mergeProps as u, normalizeProps as x, guardReactiveProps as v, renderSlot as $, createTextVNode as O, toDisplayString as m, Fragment as g, renderList as j, createVNode as S } from "vue";
1
+ import { defineComponent as N, inject as V, createBlock as p, openBlock as t, unref as a, ref as A, normalizeClass as b, withCtx as x, createElementVNode as n, createElementBlock as l, createCommentVNode as c, renderSlot as k, mergeProps as u, normalizeProps as $, guardReactiveProps as v, createTextVNode as O, toDisplayString as f, Fragment as g, renderList as j, createVNode as S } from "vue";
2
2
  import { a as T } from "../utils/date.util.es.js";
3
3
  import { s as P } from "../vendor/primevue/timeline/timeline.esm.es.js";
4
4
  import { _ as F } from "../icon/index.es.js";
@@ -37,43 +37,48 @@ const L = ["onClick"], z = { class: "flex justify-between items-center" }, E = {
37
37
  return typeof d != "string" ? d : { nickName: d };
38
38
  }, B = (s) => s.replace(/`([^`]*)`/g, "<b>$1</b>");
39
39
  return (s, d) => (t(), p(a(P), {
40
- class: D([{ "overflow-auto": !s.noScroll }]),
40
+ class: b([{ "overflow-auto": !s.noScroll }]),
41
41
  value: A(s.value).value,
42
42
  style: { "scrollbar-width": "none" }
43
43
  }, {
44
- marker: b(({ item: e }) => {
45
- var f, _, y;
44
+ marker: x(({ item: e }) => {
45
+ var m, _, y;
46
46
  return [
47
47
  n("div", u({
48
48
  onClick: (r) => e.showDetail = !e.showDetail
49
- }, (f = a(i)) == null ? void 0 : f.marker, { "data-wv-section": "timelinemarker" }), [
49
+ }, (m = a(i)) == null ? void 0 : m.marker, { "data-wv-section": "timelinemarker" }), [
50
50
  S(F, u((_ = a(i)) == null ? void 0 : _.markerArrow(e), { icon: "arrow-down" }), null, 16),
51
- n("div", x(v((y = a(i)) == null ? void 0 : y.markerDot(e))), null, 16)
51
+ n("div", $(v((y = a(i)) == null ? void 0 : y.markerDot(e))), null, 16)
52
52
  ], 16, L)
53
53
  ];
54
54
  }),
55
- content: b(({ item: e }) => {
56
- var f, _, y;
55
+ content: x(({ item: e }) => {
56
+ var m, _, y;
57
57
  return [
58
58
  n("div", z, [
59
59
  n("div", E, [
60
60
  n("h3", u({
61
61
  innerHTML: B(e.action)
62
- }, (f = a(i)) == null ? void 0 : f.contentHeader, {
62
+ }, (m = a(i)) == null ? void 0 : m.contentHeader, {
63
63
  onClick: (r) => e.showDetail = !e.showDetail
64
64
  }), null, 16, M),
65
- e.user || e.username ? (t(), p(H, {
66
- key: 0,
67
- user: C(e),
68
- type: "icon",
69
- "user-name-field": "nickName"
70
- }, null, 8, ["user"])) : c("", !0)
65
+ k(s.$slots, "user", {
66
+ detail: e.detail,
67
+ user: e.user || e.username
68
+ }, () => [
69
+ e.user || e.username ? (t(), p(H, {
70
+ key: 0,
71
+ user: C(e),
72
+ type: "icon",
73
+ "user-name-field": "nickName"
74
+ }, null, 8, ["user"])) : c("", !0)
75
+ ])
71
76
  ]),
72
- n("span", x(v((_ = a(i)) == null ? void 0 : _.contentDate)), [
73
- $(s.$slots, "date", {
77
+ n("span", $(v((_ = a(i)) == null ? void 0 : _.contentDate)), [
78
+ k(s.$slots, "date", {
74
79
  date: e.createdAt
75
80
  }, () => [
76
- O(m(s.noFormatDate ? e.createdAt : a(T)(e.createdAt)), 1)
81
+ O(f(s.noFormatDate ? e.createdAt : a(T)(e.createdAt)), 1)
77
82
  ])
78
83
  ], 16)
79
84
  ]),
@@ -84,30 +89,30 @@ const L = ["onClick"], z = { class: "flex justify-between items-center" }, E = {
84
89
  }, null, 8, ["detail"])) : (y = Object.keys(e.detail ?? {})) != null && y.length ? (t(), l("div", I, [
85
90
  s.$props.alignDetail ? (t(), l("div", K, [
86
91
  (t(!0), l(g, null, j(Object.entries(e.detail), ([r, o]) => (t(), l(g, { key: r }, [
87
- n("span", R, m(r), 1),
92
+ n("span", R, f(r), 1),
88
93
  d[0] || (d[0] = n("span", { class: "font-semibold whitespace-nowrap" }, " : ", -1)),
89
- typeof o == "string" ? (t(), l("span", U, m(o), 1)) : "type" in o ? (t(), p(h, {
94
+ typeof o == "string" ? (t(), l("span", U, f(o), 1)) : "type" in o ? (t(), p(h, {
90
95
  key: 1,
91
96
  detail: o
92
97
  }, null, 8, ["detail"])) : c("", !0)
93
98
  ], 64))), 128))
94
- ])) : (t(!0), l(g, { key: 1 }, j(Object.entries(e.detail), ([r, o]) => $(s.$slots, "detail", u({
99
+ ])) : (t(!0), l(g, { key: 1 }, j(Object.entries(e.detail), ([r, o]) => k(s.$slots, "detail", u({
95
100
  key: r,
96
101
  ref_for: !0
97
102
  }, { key: r, value: o }), () => {
98
- var k, w;
103
+ var w, D;
99
104
  return [
100
105
  typeof o == "string" ? (t(), l("div", q, [
101
- n("span", u({ ref_for: !0 }, (k = a(i)) == null ? void 0 : k.contentDetailKey), m(r) + ": ", 17),
102
- n("span", u({ ref_for: !0 }, (w = a(i)) == null ? void 0 : w.contentDetailValue), m(o), 17)
106
+ n("span", u({ ref_for: !0 }, (w = a(i)) == null ? void 0 : w.contentDetailKey), f(r) + ": ", 17),
107
+ n("span", u({ ref_for: !0 }, (D = a(i)) == null ? void 0 : D.contentDetailValue), f(o), 17)
103
108
  ])) : "type" in o ? (t(), l("div", G, [
104
109
  n("span", {
105
- class: D([
110
+ class: b([
106
111
  "flex gap-1",
107
112
  { "flex-col": o.type === "embed" }
108
113
  ])
109
114
  }, [
110
- n("span", J, m(r) + ": ", 1),
115
+ n("span", J, f(r) + ": ", 1),
111
116
  o.type !== "json" ? (t(), p(h, {
112
117
  key: 0,
113
118
  detail: o
package/tree/index.d.ts CHANGED
@@ -23,7 +23,7 @@ export interface TreeProps extends BaseTreeProps {
23
23
  * For query: roleType, transactionAttribute, systemRole is already stringified in components default props, but for the rest of query params need to be stringified outside
24
24
  */
25
25
  params?: QueryParams;
26
- selectedKeys?: TreeSelectionKeys | number[] | undefined;
26
+ selectedKeys?: TreeSelectionKeys | string[] | number[] | undefined;
27
27
  selectedTreeNodes?: TreeNode[] | undefined;
28
28
  selectionMode?: 'single' | 'checkbox' | undefined;
29
29
  /**
@@ -56,11 +56,11 @@ export interface TreeProps extends BaseTreeProps {
56
56
  /**
57
57
  * A list of node keys that should be disabled along with their children.
58
58
  */
59
- disableKeys?: number[];
59
+ disableKeys?: string[] | number[];
60
60
  /**
61
61
  * A list of node keys that should be disabled, affecting only the specified nodes and not their children.
62
62
  */
63
- exactDisableKeys?: number[];
63
+ exactDisableKeys?: string[] | number[];
64
64
  /**
65
65
  * Defines the tree is readonly and disabled.
66
66
  */
@@ -76,7 +76,7 @@ export interface TreeProps extends BaseTreeProps {
76
76
  /**
77
77
  * Defines the group tree to disable excluded keys
78
78
  */
79
- excludedKeys?: number[];
79
+ excludedKeys?: string[] | number[];
80
80
  /**
81
81
  * Will emit update selection when value is `true`
82
82
  *
package/tree/index.es.js CHANGED
@@ -111,7 +111,7 @@ const be = (r, c = !1) => Object.keys(P(r, c)).map(Number), P = (r, c = !1) => O
111
111
  });
112
112
  }, A = (e) => e.map((t) => {
113
113
  var l;
114
- return (l = t.children) != null && l.length && (v.value = {
114
+ return t.key = t.key ?? t._id, (l = t.children) != null && l.length && (v.value = {
115
115
  ...v.value,
116
116
  [t.key.toString()]: t.children.map((o) => Number(o.key))
117
117
  }, t.children = A(t.children)), s.disableNodeWhen && (t.selectable = !s.disableNodeWhen(t)), t;
@@ -126,7 +126,7 @@ const be = (r, c = !1) => Object.keys(P(r, c)).map(Number), P = (r, c = !1) => O
126
126
  ) ?? { data: [] };
127
127
  if (t) {
128
128
  const l = A(t);
129
- h.value = j(t), y.value = l, sessionStorage.setItem(`${s.type}Tree`, JSON.stringify(l)), sessionStorage.setItem(
129
+ h.value = j(l), y.value = l, sessionStorage.setItem(`${s.type}Tree`, JSON.stringify(l)), sessionStorage.setItem(
130
130
  `flatten${s.type}nodes`,
131
131
  JSON.stringify(h.value)
132
132
  );
@@ -1,10 +1,10 @@
1
- import { defineComponent as xe, inject as Le, ref as oe, computed as i, onMounted as Be, resolveComponent as Ie, createElementBlock as N, openBlock as a, Fragment as V, createElementVNode as C, createBlock as u, createCommentVNode as K, mergeProps as y, unref as d, resolveDynamicComponent as F, normalizeClass as w, withModifiers as A, toDisplayString as le, renderList as Oe, withCtx as We, createVNode as Pe, nextTick as ae } from "vue";
1
+ import { defineComponent as xe, inject as Le, ref as oe, computed as i, onMounted as Be, resolveComponent as Ie, createElementBlock as N, openBlock as a, Fragment as V, createElementVNode as C, createBlock as u, createCommentVNode as K, mergeProps as y, unref as d, resolveDynamicComponent as $, normalizeClass as w, withModifiers as A, toDisplayString as le, renderList as Oe, withCtx as We, createVNode as Pe, nextTick as ae } from "vue";
2
2
  import { D as m } from "../vendor/primevue/utils/utils.esm.es.js";
3
3
  import { _ as Ve } from "../button/index.es.js";
4
- import { _ as Fe } from "../checkbox/index.es.js";
4
+ import { _ as $e } from "../checkbox/index.es.js";
5
5
  import { _ as x } from "../icon/index.es.js";
6
- import { _ as Ge } from "../menu/index.es.js";
7
- const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-posinset", "aria-selected", "aria-setsize", "tabindex"], $e = ["data-p-highlight", "data-p-selectable"], ze = ["data-node-has-children", "data-node-key", "data-node-selected"], He = {
6
+ import { _ as Fe } from "../menu/index.es.js";
7
+ const Ge = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-posinset", "aria-selected", "aria-setsize", "tabindex"], Ue = ["data-p-highlight", "data-p-selectable"], ze = ["data-node-has-children", "data-node-key", "data-node-selected"], He = {
8
8
  "aria-hidden": "true",
9
9
  class: "flex items-center justify-start gap-2 px-4 py-1.5 hover:bg-surface-50 text-xs no-underline overflow-hidden cursor-pointer select-none",
10
10
  "data-pc-section": "action",
@@ -58,7 +58,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
58
58
  var e;
59
59
  return ((e = t.node) == null ? void 0 : e.children) && t.node.children.length > 0;
60
60
  }
61
- ), G = i(
61
+ ), F = i(
62
62
  () => {
63
63
  var e;
64
64
  return +t.node.key != -1 && t.useOption && !((e = t.listLabelsNoOption) != null && e.includes(t.node.name));
@@ -67,7 +67,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
67
67
  () => t.expandedKeys && t.expandedKeys[t.node.key] === !0
68
68
  ), I = i(
69
69
  () => t.node.leaf === !1 ? !1 : !(t.node.children && t.node.children.length)
70
- ), U = i(() => v(t.node) || E(t.node) || t.node.selectable === !1 ? !1 : t.selectionMode != null), D = i(
70
+ ), G = i(() => v(t.node) || E(t.node) || t.node.selectable === !1 ? !1 : t.selectionMode != null), D = i(
71
71
  () => {
72
72
  var e;
73
73
  return ((e = t.nodeSelectedWhen) == null ? void 0 : e.call(t, t.node)) || (t.selectionMode && t.selectionKeys ? t.selectionKeys[t.node.key] === !0 : !1);
@@ -104,7 +104,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
104
104
  ve() ? me(e.type === "dblclick" || t.node.key === -1) : p("nodeClick", {
105
105
  originalEvent: e,
106
106
  nodeTouched: M,
107
- node: { ...t.node, selectable: U.value }
107
+ node: { ...t.node, selectable: G.value }
108
108
  // To prevent selection when the node disabled by disableKeys or exactDisableKeys
109
109
  }), M = !1;
110
110
  }, fe = (e) => {
@@ -120,11 +120,11 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
120
120
  }
121
121
  }, k = (e, n, o) => {
122
122
  e.tabIndex = -1, n.tabIndex = 0, De(o || n);
123
- }, $ = (e) => {
123
+ }, U = (e) => {
124
124
  const n = e.closest("ul").closest("li");
125
125
  if (n) {
126
126
  const o = m.findSingle(n, "button");
127
- return o && o.style.visibility !== "hidden" ? n : $(e.previousElementSibling);
127
+ return o && o.style.visibility !== "hidden" ? n : U(e.previousElementSibling);
128
128
  }
129
129
  return null;
130
130
  }, z = () => {
@@ -245,7 +245,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
245
245
  return !1;
246
246
  if (h.value && !I.value)
247
247
  return n.click(), !1;
248
- const o = $(
248
+ const o = U(
249
249
  e.currentTarget
250
250
  );
251
251
  o && k(e.currentTarget, o);
@@ -295,10 +295,10 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
295
295
  e.focus();
296
296
  }, v = (e) => {
297
297
  var n, o;
298
- return ((n = t.disableKeys) == null ? void 0 : n.includes(+e.key)) || t.disabled || e.selectable == !1 || e.disabled == !0 || ((o = t.disableNodeWhen) == null ? void 0 : o.call(t, e));
298
+ return ((n = t.disableKeys) == null ? void 0 : n.includes(e.key)) || t.disabled || e.selectable == !1 || e.disabled == !0 || ((o = t.disableNodeWhen) == null ? void 0 : o.call(t, e));
299
299
  }, E = (e) => {
300
300
  var n, o;
301
- return e.selectable == !1 || ((n = t.exactDisableKeys) == null ? void 0 : n.includes(+e.key)) || t.disableNodeAll && +e.key == -1 || ((o = t.exactDisableNodeWhen) == null ? void 0 : o.call(t, e));
301
+ return e.selectable == !1 || ((n = t.exactDisableKeys) == null ? void 0 : n.includes(e.key)) || t.disableNodeAll && +e.key == -1 || ((o = t.exactDisableNodeWhen) == null ? void 0 : o.call(t, e));
302
302
  };
303
303
  return Be(() => {
304
304
  z();
@@ -318,7 +318,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
318
318
  "aria-setsize": e.node.children ? e.node.children.length : 0,
319
319
  tabindex: e.index === 0 ? 0 : -1,
320
320
  onKeydown: Ne
321
- }, (l = t.pt ?? d(s)) == null ? void 0 : l.node, {
321
+ }, ((l = t.pt ?? d(s)) == null ? void 0 : l.node) & e.$attrs, {
322
322
  "data-wv-name": "treenode",
323
323
  role: "treeitem"
324
324
  }), [
@@ -333,7 +333,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
333
333
  }),
334
334
  {
335
335
  "data-p-highlight": O.value ? g.value : D.value,
336
- "data-p-selectable": U.value,
336
+ "data-p-selectable": G.value,
337
337
  style: e.node.style,
338
338
  onClick: W,
339
339
  onTouchend: he
@@ -350,7 +350,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
350
350
  class: "animate-spin",
351
351
  icon: "spinner"
352
352
  })) : (a(), N(V, { key: 1 }, [
353
- e.templates.togglericon ? (a(), u(F(e.templates.togglericon), {
353
+ e.templates.togglericon ? (a(), u($(e.templates.togglericon), {
354
354
  key: 0,
355
355
  class: w([...(b = t.pt ?? d(s)) == null ? void 0 : b.togglericon.class]),
356
356
  expanded: h.value,
@@ -366,7 +366,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
366
366
  }, null, 8, ["class"]))
367
367
  ], 64))
368
368
  ], 16),
369
- O.value ? (a(), u(Fe, y({
369
+ O.value ? (a(), u($e, y({
370
370
  key: 0,
371
371
  binary: !1
372
372
  }, (Q = t.pt ?? d(s)) == null ? void 0 : Q.nodeCheckbox.root, {
@@ -380,7 +380,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
380
380
  "data-wv-section": "nodecheckbox",
381
381
  "tri-state": ""
382
382
  }), null, 16, ["disabled", "model-value"])) : K("", !0),
383
- e.templates.nodeicon ? (a(), u(F(e.templates.nodeicon), {
383
+ e.templates.nodeicon ? (a(), u($(e.templates.nodeicon), {
384
384
  key: 1,
385
385
  class: w([...(X = t.pt ?? d(s)) == null ? void 0 : X.nodeicon().class]),
386
386
  node: e.node
@@ -402,7 +402,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
402
402
  }, ["stop"]))
403
403
  }
404
404
  ), [
405
- e.templates[e.node.type] || e.templates.default ? (a(), u(F(e.templates[e.node.type] || e.templates.default), {
405
+ e.templates[e.node.type] || e.templates.default ? (a(), u($(e.templates[e.node.type] || e.templates.default), {
406
406
  key: 0,
407
407
  checked: g.value,
408
408
  disabled: E(e.node) || v(e.node),
@@ -421,7 +421,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
421
421
  info: "Disposable Group",
422
422
  "tooltip-pos": "left"
423
423
  })) : K("", !0),
424
- G.value ? (a(), u(Ve, {
424
+ F.value ? (a(), u(Ve, {
425
425
  key: 3,
426
426
  class: w([
427
427
  "!w-4 !h-4 !min-w-4 p-0.5",
@@ -437,7 +437,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
437
437
  "tooltip-pos": "left"
438
438
  })) : K("", !0)
439
439
  ], 16)
440
- ], 16, $e),
440
+ ], 16, Ue),
441
441
  de.value && h.value ? (a(), N("ul", y({
442
442
  key: 0,
443
443
  role: "group"
@@ -473,8 +473,8 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
473
473
  }), null, 16, ["class", "disable-keys", "disabled", "exact-disable-keys", "expanded-keys", "level", "list-labels-no-option", "loading-mode", "node", "propagate-selection", "pt", "selection-keys", "selection-mode", "show-disposable-groups", "templates", "tree-node-menus", "unstyled", "use-option"]);
474
474
  }), 128))
475
475
  ], 16)) : K("", !0)
476
- ], 16, Ue),
477
- G.value ? (a(), u(Ge, {
476
+ ], 16, Ge),
477
+ F.value ? (a(), u(Fe, {
478
478
  key: 0,
479
479
  ref_key: "treeNodeMenu",
480
480
  ref: L,
@@ -32,7 +32,7 @@ const f = /* @__PURE__ */ c(class extends i {
32
32
  return `icon ic-${this.icon} cursor-pointer !shrink-0`;
33
33
  }
34
34
  render() {
35
- return a(u, { key: "5cab8f5fe45204596e7fa4a154bd03c23bf2b525", class: this.getIconClass() });
35
+ return a(u, { key: "fb2fed3480089f5fb0962fd829037c2e0c3cda0f", class: this.getIconClass() });
36
36
  }
37
37
  }, [0, "wangs-icon", {
38
38
  icon: [1],
@@ -1,11 +1,11 @@
1
- var b = Object.defineProperty;
2
- var f = (d, i, e) => i in d ? b(d, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[i] = e;
3
- var a = (d, i, e) => f(d, typeof i != "symbol" ? i + "" : i, e);
4
- import { p, H as g, c as h, h as l, a as v } from "./p-DTTCzifR.es.js";
1
+ var f = Object.defineProperty;
2
+ var b = (c, i, e) => i in c ? f(c, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[i] = e;
3
+ var a = (c, i, e) => b(c, typeof i != "symbol" ? i + "" : i, e);
4
+ import { p, H as v, c as h, h as l, a as g } from "./p-DTTCzifR.es.js";
5
5
  import { B as x } from "./p-C5lMEBcj.es.js";
6
6
  import { r as u } from "./p-Duri5p90.es.js";
7
- import { d as I } from "./p-CKYwZoTo.es.js";
8
- const m = /* @__PURE__ */ p(class extends g {
7
+ import { d as I } from "./p-C0QfdhKo.es.js";
8
+ const A = /* @__PURE__ */ p(class extends v {
9
9
  constructor() {
10
10
  super();
11
11
  a(this, "base");
@@ -36,6 +36,9 @@ const m = /* @__PURE__ */ p(class extends g {
36
36
  componentDidRender() {
37
37
  this.updateInkBar();
38
38
  }
39
+ function(e) {
40
+ this.currentActiveIndex = e;
41
+ }
39
42
  onUpdateActiveIndex(e) {
40
43
  this.updateActiveIndex.emit(e);
41
44
  }
@@ -66,8 +69,8 @@ const m = /* @__PURE__ */ p(class extends g {
66
69
  for (let s = 0; s < e.length; s++) {
67
70
  const r = e[s];
68
71
  if (r.dataset.pHighlight === "true") {
69
- const c = r.getBoundingClientRect(), o = this.navRef.getBoundingClientRect();
70
- this.inkbarRef.style.width = `${c.width}px`, this.inkbarRef.style.left = `${c.left - o.left}px`, t = !0;
72
+ const d = r.getBoundingClientRect(), o = this.navRef.getBoundingClientRect();
73
+ this.inkbarRef.style.width = `${d.width}px`, this.inkbarRef.style.left = `${d.left - o.left}px`, t = !0;
71
74
  break;
72
75
  }
73
76
  }
@@ -75,8 +78,8 @@ const m = /* @__PURE__ */ p(class extends g {
75
78
  }
76
79
  setActiveIndex() {
77
80
  const e = window.location.pathname, t = (s) => {
78
- var c;
79
- let r = (c = this.model) == null ? void 0 : c.findIndex((o) => o.route && s === o.route);
81
+ var d;
82
+ let r = (d = this.model) == null ? void 0 : d.findIndex((o) => o.route && s === o.route);
80
83
  if (r === -1 && s.includes("/")) {
81
84
  const o = s.substring(0, s.lastIndexOf("/"));
82
85
  r = t(o);
@@ -86,23 +89,24 @@ const m = /* @__PURE__ */ p(class extends g {
86
89
  this.currentActiveIndex = n === -1 ? this.currentActiveIndex : n;
87
90
  }
88
91
  getPtmo(e, t) {
89
- const { activeIndex: n, model: s, type: r, useTrailingLine: c } = this, o = {
92
+ const { activeIndex: n, model: s, type: r, useTrailingLine: d } = this, o = {
90
93
  item: e,
91
94
  index: t,
92
95
  active: t != null && this.currentActiveIndex === t,
93
96
  disabled: e != null && this.disabled(e)
94
97
  };
95
98
  return {
96
- props: { activeIndex: n, model: s, type: r, useTrailingLine: c },
99
+ props: { activeIndex: n, model: s, type: r, useTrailingLine: d },
97
100
  state: { currentActiveIndex: this.currentActiveIndex },
98
101
  context: e ? o : void 0
99
102
  };
100
103
  }
101
104
  render() {
102
- return l(v, { key: "4a399a4b6412de58edb4f06df1ff9246654981a7", ...this.ptm("root") }, l("ul", { key: "37930281d1b0ec7d17a1eb9089edd5fbe89109f7", ...this.ptm("menu", this.getPtmo()), role: "menubar", ref: (e) => this.navRef = e }, this.model.map((e, t) => this.visible(e) ? l("li", { key: this.label(e) + "_" + t, class: this.cx("menuitem", this.getPtmo(e, t)), role: "presentation", "data-ui-highlight": (this.currentActiveIndex === t).toString(), "data-ui-disabled": this.disabled(e).toString(), onClick: (n) => this.onItemClick(n, e, t) }, l("a", { role: "menuitem", href: e.url ?? e.route ? u.normalizePath(e.url ?? e.route) : void 0, target: e.target, "aria-label": this.label(e), "aria-disabled": this.disabled(e) ? "true" : "false", tabIndex: -1, onClick: (n) => e.route && n.preventDefault(), ...this.ptm("action", this.getPtmo(e, t)) }, e.icon && l("wangs-icon", { icon: e.icon }), l("span", { class: this.cx("label") }, this.label(e)))) : null), l("li", { key: "2031b2abfd6285d4b513ad8bed9f522bd7413ecf", ref: (e) => this.inkbarRef = e, class: this.cx("inkbar", this.getPtmo()), role: "none" })));
105
+ return l(g, { key: "7fb3735dced0621a032964f1ae3f73b6ec67c5b2", ...this.ptm("root") }, l("ul", { key: "27c66d9d0501efeaa42edbe9316e9e7aa6af35ff", ...this.ptm("menu", this.getPtmo()), role: "menubar", ref: (e) => this.navRef = e }, this.model.map((e, t) => this.visible(e) ? l("li", { key: this.label(e) + "_" + t, class: this.cx("menuitem", this.getPtmo(e, t)), role: "presentation", "data-ui-highlight": (this.currentActiveIndex === t).toString(), "data-ui-disabled": this.disabled(e).toString(), onClick: (n) => this.onItemClick(n, e, t) }, l("a", { role: "menuitem", href: e.url ?? e.route ? u.normalizePath(e.url ?? e.route) : void 0, target: e.target, "aria-label": this.label(e), "aria-disabled": this.disabled(e) ? "true" : "false", tabIndex: -1, onClick: (n) => e.route && n.preventDefault(), ...this.ptm("action", this.getPtmo(e, t)) }, e.icon && l("wangs-icon", { icon: e.icon }), l("span", { class: this.cx("label") }, this.label(e)))) : null), l("li", { key: "b839c46122db33c4375b28788bdf23eeb5b40305", ref: (e) => this.inkbarRef = e, class: this.cx("inkbar", this.getPtmo()), role: "none" })));
103
106
  }
104
107
  static get watchers() {
105
108
  return {
109
+ activeIndex: ["function"],
106
110
  currentActiveIndex: ["onUpdateActiveIndex"]
107
111
  };
108
112
  }
@@ -114,6 +118,7 @@ const m = /* @__PURE__ */ p(class extends g {
114
118
  useTrailingLine: [4, "use-trailing-line"],
115
119
  currentActiveIndex: [32]
116
120
  }, [[8, "wangs-ui-core:navigation-event", "onRoutePathChanged"]], {
121
+ activeIndex: ["function"],
117
122
  currentActiveIndex: ["onUpdateActiveIndex"]
118
123
  }]);
119
124
  function E() {
@@ -122,7 +127,7 @@ function E() {
122
127
  ["wangs-tab-menu", "wangs-icon"].forEach((i) => {
123
128
  switch (i) {
124
129
  case "wangs-tab-menu":
125
- customElements.get(i) || customElements.define(i, m);
130
+ customElements.get(i) || customElements.define(i, A);
126
131
  break;
127
132
  case "wangs-icon":
128
133
  customElements.get(i) || I();
@@ -1,7 +1,7 @@
1
- var f = Object.defineProperty;
2
- var b = (o, i, e) => i in o ? f(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e;
1
+ var g = Object.defineProperty;
2
+ var b = (o, i, e) => i in o ? g(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e;
3
3
  var s = (o, i, e) => b(o, typeof i != "symbol" ? i + "" : i, e);
4
- import { p as y, H as k, c as l, h as r, a as x } from "./p-DTTCzifR.es.js";
4
+ import { p as y, H as k, c as a, h as r, a as x } from "./p-DTTCzifR.es.js";
5
5
  import { B as T } from "./p-C5lMEBcj.es.js";
6
6
  function u(o) {
7
7
  setTimeout(o, 0);
@@ -30,8 +30,8 @@ const w = /* @__PURE__ */ y(class extends k {
30
30
  s(this, "blur");
31
31
  s(this, "completed");
32
32
  s(this, "onInput", (e, t) => {
33
- const n = e.target, a = this.tokens;
34
- a[t] = n.value, this.tokens = [...a], this.updateModel(e), e.inputType === "deleteContentBackward" ? this.moveToPrev(n) : (e.inputType === "insertText" || e.inputType === "deleteContentForward") && this.moveToNext(n);
33
+ const n = e.target, l = this.tokens;
34
+ l[t] = n.value, this.tokens = [...l], this.updateModel(e), e.inputType === "deleteContentBackward" ? this.moveToPrev(n) : (e.inputType === "insertText" || e.inputType === "deleteContentForward") && this.moveToNext(n);
35
35
  });
36
36
  s(this, "onFocus", (e) => {
37
37
  e.target.select(), this.focus.emit(e), this.focused = !0;
@@ -42,10 +42,10 @@ const w = /* @__PURE__ */ y(class extends k {
42
42
  });
43
43
  });
44
44
  s(this, "onPaste", (e) => {
45
- var a;
45
+ var l;
46
46
  if (this.readonly || this.disabled)
47
47
  return;
48
- const t = ((a = e.clipboardData) == null ? void 0 : a.getData("text")) ?? "";
48
+ const t = ((l = e.clipboardData) == null ? void 0 : l.getData("text")) ?? "";
49
49
  if (!t)
50
50
  return;
51
51
  const n = t.substring(0, this.length);
@@ -68,7 +68,7 @@ const w = /* @__PURE__ */ y(class extends k {
68
68
  break;
69
69
  }
70
70
  });
71
- this.__registerHost(), this.updateModelValue = l(this, "update:modelValue"), this.change = l(this, "change"), this.focus = l(this, "focus"), this.blur = l(this, "blur"), this.completed = l(this, "completed"), this.base = new T({ tag: "WANGS-INPUT-OTP", pt: this.pt });
71
+ this.__registerHost(), this.updateModelValue = a(this, "update:modelValue"), this.change = a(this, "change"), this.focus = a(this, "focus"), this.blur = a(this, "blur"), this.completed = a(this, "completed"), this.base = new T({ tag: "WANGS-INPUT-OTP", pt: this.pt });
72
72
  }
73
73
  get cx() {
74
74
  return this.base.cx;
@@ -110,16 +110,16 @@ const w = /* @__PURE__ */ y(class extends k {
110
110
  return !!this.tokens[e];
111
111
  }
112
112
  getPtmo(e) {
113
- const { invalid: t, mask: n, disabled: a, integerOnly: h, modelValue: d, readonly: p, length: c, variant: m, tokens: g } = this;
113
+ const { invalid: t, mask: n, disabled: l, integerOnly: h, modelValue: d, readonly: p, length: c, variant: m, tokens: f } = this;
114
114
  return {
115
- props: { invalid: t, mask: n, disabled: a, integerOnly: h, modelValue: d, readonly: p, length: c, variant: m },
116
- state: { tokens: g },
115
+ props: { invalid: t, mask: n, disabled: l, integerOnly: h, modelValue: d, readonly: p, length: c, variant: m },
116
+ state: { tokens: f },
117
117
  parent: this.el.parentElement,
118
118
  context: e != null ? { filled: this.isInputFilledIn(e), disabled: this.disabled } : void 0
119
119
  };
120
120
  }
121
121
  render() {
122
- return r(x, { key: "844b6b24ab1e9755147b855a1bfe18e13998eb26", class: this.cx("root", this.getPtmo()) }, Array.from({ length: this.length }).map((e, t) => r("input", { type: this.mask ? "password" : "text", class: this.cx("input", this.getPtmo(t)), value: this.tokens[t] || "", inputmode: this.integerOnly ? "numeric" : "text", disabled: this.disabled, readonly: this.readonly, onInput: (n) => this.onInput(n, t), onFocus: this.onFocus, onBlur: this.onBlur, onPaste: this.onPaste, onKeyDown: this.onKeyDown, maxLength: 1 })));
122
+ return r(x, { key: "465f7467e4adc55b59b7bc134347277b4fe3753c", class: this.cx("root", this.getPtmo()) }, Array.from({ length: this.length }).map((e, t) => r("input", { type: this.mask ? "password" : "text", class: this.cx("input", this.getPtmo(t)), value: this.tokens[t] || "", inputmode: this.integerOnly ? "numeric" : "text", disabled: this.disabled, readonly: this.readonly, onInput: (n) => this.onInput(n, t), onFocus: this.onFocus, onBlur: this.onBlur, onPaste: this.onPaste, onKeyDown: this.onKeyDown, maxLength: 1 })));
123
123
  }
124
124
  static get watchers() {
125
125
  return {
@@ -2,7 +2,7 @@ var c = Object.defineProperty;
2
2
  var f = (t, e, n) => e in t ? c(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var o = (t, e, n) => f(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { p as a, H as r, h as s, a as u } from "./p-DTTCzifR.es.js";
5
- const l = /* @__PURE__ */ a(class extends r {
5
+ const d = /* @__PURE__ */ a(class extends r {
6
6
  constructor() {
7
7
  super();
8
8
  /**
@@ -12,23 +12,23 @@ const l = /* @__PURE__ */ a(class extends r {
12
12
  this.__registerHost();
13
13
  }
14
14
  render() {
15
- return s(u, { key: "b38f4386d6fb33972469caffc9b7f95b7fb0e7c9" }, s("slot", { key: "e1f130e8171a7ac985fc07612e3e8a693d6058ea", name: "icon" }), s("slot", { key: "f7395cc5ea9dc2d6125bf3e30a97e0303dab43e0" }, this.label));
15
+ return s(u, { key: "6d8cd1675cb92185f11a363897c0157ffe14f773" }, s("slot", { key: "0d9bdc2f9307d8545762019da83ec51f8e5f401e", name: "icon" }), s("slot", { key: "a71a60c1d70f5e6c83bbc1a3f2c9aeb2b55313a0" }, this.label));
16
16
  }
17
17
  }, [4, "wangs-button", {
18
18
  label: [1]
19
19
  }]);
20
- function m() {
20
+ function l() {
21
21
  if (typeof customElements > "u")
22
22
  return;
23
23
  ["wangs-button"].forEach((e) => {
24
24
  switch (e) {
25
25
  case "wangs-button":
26
- customElements.get(e) || customElements.define(e, l);
26
+ customElements.get(e) || customElements.define(e, d);
27
27
  break;
28
28
  }
29
29
  });
30
30
  }
31
- const p = m;
31
+ const p = l;
32
32
  export {
33
33
  p as d
34
34
  };
@@ -1,4 +1,4 @@
1
- import { d as e } from "./p-CKYwZoTo.es.js";
1
+ import { d as e } from "./p-C0QfdhKo.es.js";
2
2
  const m = e;
3
3
  export {
4
4
  m as d
@@ -1,4 +1,4 @@
1
- import { d as e } from "./p-CsoK-EWG.es.js";
1
+ import { d as e } from "./p-b33NVvKu.es.js";
2
2
  const m = e;
3
3
  export {
4
4
  m as d
@@ -1,4 +1,4 @@
1
- import { d as e } from "./p-DPHEi31J.es.js";
1
+ import { d as e } from "./p-CRgC2JIi.es.js";
2
2
  const m = e;
3
3
  export {
4
4
  m as d